Bug 1181392 part 8 - Remove use of IsFinishedTransition from nsTransitionManager::PruneCompletedTransitions; r=dbaron
authorBrian Birtles <birtles@gmail.com>
Fri, 07 Aug 2015 12:29:36 +0900
changeset 288404 c105cadd52e2ba00b5b87718a59c7da7eeb459df
parent 288403 766cbaaa78792f400079900ab1b31b02adcd6026
child 288405 76626b00fac91ccc669e704da276498e61695178
push id5067
push userraliiev@mozilla.com
push dateMon, 21 Sep 2015 14:04:52 +0000
treeherdermozilla-beta@14221ffe5b2f [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersdbaron
bugs1181392
milestone42.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1181392 part 8 - Remove use of IsFinishedTransition from nsTransitionManager::PruneCompletedTransitions; r=dbaron This patch generalizes the logic in nsTransitionManager::PruneCompletedTransitions to consider all transitions that are no longer current (i.e. not running or scheduled to run) rather than those marked as finished.
layout/style/nsTransitionManager.cpp
--- a/layout/style/nsTransitionManager.cpp
+++ b/layout/style/nsTransitionManager.cpp
@@ -735,25 +735,25 @@ nsTransitionManager::PruneCompletedTrans
   // FIXME (bug 1158431): Really, we should also cancel running
   // transitions whose destination doesn't match as well.
   AnimationPtrArray& animations = collection->mAnimations;
   size_t i = animations.Length();
   MOZ_ASSERT(i != 0, "empty transitions list?");
   do {
     --i;
     Animation* anim = animations[i];
-    dom::KeyframeEffectReadOnly* effect = anim->GetEffect();
 
-    if (!effect->IsFinishedTransition()) {
+    if (anim->HasCurrentEffect()) {
       continue;
     }
 
-    MOZ_ASSERT(effect && effect->Properties().Length() == 1,
+    dom::KeyframeEffectReadOnly* effect = anim->GetEffect();
+    MOZ_ASSERT(effect->Properties().Length() == 1,
                "Should have one animation property for a transition");
-    MOZ_ASSERT(effect && effect->Properties()[0].mSegments.Length() == 1,
+    MOZ_ASSERT(effect->Properties()[0].mSegments.Length() == 1,
                "Animation property should have one segment for a transition");
     const AnimationProperty& prop = effect->Properties()[0];
     const AnimationPropertySegment& segment = prop.mSegments[0];
 
     // Since effect is a finished transition, we know it didn't
     // influence style.
     StyleAnimationValue currentValue;
     if (!ExtractComputedValueForTransition(prop.mProperty, aNewStyleContext,