| Index: Source/core/page/animation/CompositeAnimation.cpp
|
| diff --git a/Source/core/page/animation/CompositeAnimation.cpp b/Source/core/page/animation/CompositeAnimation.cpp
|
| index f70d95492a45de9906e5095a5c573d0eb8162e07..810861eea32116561a219f0ca723b16bd8a86102 100644
|
| --- a/Source/core/page/animation/CompositeAnimation.cpp
|
| +++ b/Source/core/page/animation/CompositeAnimation.cpp
|
| @@ -474,51 +474,31 @@ bool CompositeAnimation::isAnimatingProperty(CSSPropertyID property, bool accele
|
| return false;
|
| }
|
|
|
| -bool CompositeAnimation::pauseAnimationAtTime(const AtomicString& name, double t)
|
| +void CompositeAnimation::pauseAnimationsForTesting(double t)
|
| {
|
| m_keyframeAnimations.checkConsistency();
|
|
|
| - RefPtr<KeyframeAnimation> keyframeAnim = m_keyframeAnimations.get(name.impl());
|
| - if (!keyframeAnim || !keyframeAnim->running())
|
| - return false;
|
| + AnimationNameMap::const_iterator animationsEnd = m_keyframeAnimations.end();
|
| + for (AnimationNameMap::const_iterator it = m_keyframeAnimations.begin(); it != animationsEnd; ++it) {
|
| + RefPtr<KeyframeAnimation> keyframeAnim = it->value;
|
| + if (!keyframeAnim || !keyframeAnim->running())
|
| + continue;
|
|
|
| - double count = keyframeAnim->m_animation->iterationCount();
|
| - if ((t >= 0.0) && ((count == CSSAnimationData::IterationCountInfinite) || (t <= count * keyframeAnim->duration()))) {
|
| - keyframeAnim->freezeAtTime(t);
|
| - return true;
|
| + double count = keyframeAnim->m_animation->iterationCount();
|
| + if ((t >= 0.0) && ((count == CSSAnimationData::IterationCountInfinite) || (t <= count * keyframeAnim->duration())))
|
| + keyframeAnim->freezeAtTime(t);
|
| }
|
|
|
| - return false;
|
| -}
|
| -
|
| -bool CompositeAnimation::pauseTransitionAtTime(CSSPropertyID property, double t)
|
| -{
|
| - if ((property < firstCSSProperty) || (property >= firstCSSProperty + numCSSProperties))
|
| - return false;
|
| -
|
| - ImplicitAnimation* implAnim = m_transitions.get(property).get();
|
| - if (!implAnim) {
|
| - // Check to see if this property is being animated via a shorthand.
|
| - // This code is only used for testing, so performance is not critical here.
|
| - HashSet<CSSPropertyID> shorthandProperties = CSSPropertyAnimation::animatableShorthandsAffectingProperty(property);
|
| - bool anyPaused = false;
|
| - HashSet<CSSPropertyID>::const_iterator end = shorthandProperties.end();
|
| - for (HashSet<CSSPropertyID>::const_iterator it = shorthandProperties.begin(); it != end; ++it) {
|
| - if (pauseTransitionAtTime(*it, t))
|
| - anyPaused = true;
|
| - }
|
| - return anyPaused;
|
| - }
|
| + CSSPropertyTransitionsMap::const_iterator transitionsEnd = m_transitions.end();
|
| + for (CSSPropertyTransitionsMap::const_iterator it = m_transitions.begin(); it != transitionsEnd; ++it) {
|
| + RefPtr<ImplicitAnimation> implAnim = it->value;
|
|
|
| - if (!implAnim->running())
|
| - return false;
|
| + if (!implAnim->running())
|
| + continue;
|
|
|
| - if ((t >= 0.0) && (t <= implAnim->duration())) {
|
| - implAnim->freezeAtTime(t);
|
| - return true;
|
| + if ((t >= 0.0) && (t <= implAnim->duration()))
|
| + implAnim->freezeAtTime(t);
|
| }
|
| -
|
| - return false;
|
| }
|
|
|
| unsigned CompositeAnimation::numberOfActiveAnimations() const
|
|
|