Minor code cleanup in AnimationBase::progress

https://bugs.webkit.org/show_bug.cgi?id=114371

Reviewed by Dean Jackson.

Convert some "return; else if" to just "return; if".

* page/animation/AnimationBase.cpp:
(WebCore::AnimationBase::progress):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@148122 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent 19a94343
2013-04-10 Simon Fraser <simon.fraser@apple.com>
Minor code cleanup in AnimationBase::progress
https://bugs.webkit.org/show_bug.cgi?id=114371
Reviewed by Dean Jackson.
Convert some "return; else if" to just "return; if".
* page/animation/AnimationBase.cpp:
(WebCore::AnimationBase::progress):
2013-04-10 Robert Hogan <robert@webkit.org>
Empty inline continuations should only get lineboxes if the padding applies to their side of the inline
......@@ -522,6 +522,7 @@ double AnimationBase::progress(double scale, double offset, const TimingFunction
if (postActive() || !m_animation->duration())
return 1.0;
if (m_animation->iterationCount() > 0 && elapsedTime >= dur) {
const int integralIterationCount = static_cast<int>(m_animation->iterationCount());
const bool iterationCountHasFractional = m_animation->iterationCount() - integralIterationCount;
......@@ -540,11 +541,14 @@ double AnimationBase::progress(double scale, double offset, const TimingFunction
ctf->x2(),
ctf->y2(),
fractionalTime, m_animation->duration());
} else if (tf->isStepsTimingFunction()) {
}
if (tf->isStepsTimingFunction()) {
const StepsTimingFunction* stf = static_cast<const StepsTimingFunction*>(tf);
return solveStepsFunction(stf->numberOfSteps(), stf->stepAtStart(), fractionalTime);
} else
return fractionalTime;
}
return fractionalTime;
}
void AnimationBase::getTimeToNextEvent(double& time, bool& isLooping) const
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment