Bug 1046055 part 5 - Check for current animations from ActiveLayerTracker::IsStyleAnimated; r=dbaron
authorBrian Birtles <birtles@gmail.com>
Thu, 02 Oct 2014 15:14:14 +0900
changeset 208350 dedaffb8297a9167a9677c531edbac427ded6b53
parent 208349 4945682e29a6f714ff04e93e0221030f5d6a343e
child 208351 3a4ecfff302a300e8165265eabca94f95d95dfda
push id1
push userroot
push dateMon, 20 Oct 2014 17:29:22 +0000
reviewersdbaron
bugs1046055
milestone35.0a1
Bug 1046055 part 5 - Check for current animations from ActiveLayerTracker::IsStyleAnimated; r=dbaron Within the context of determining of a layer is active, we should only consider an element animated if it has an animation that is yet to finish, i.e. a current animation. Animations that have finished should not cause a layer to be active (even if they are applying a forwards fill). This patch makes that change by calling nsLayoutUtils::HasCurrentAnimationsForProperty instead of nsLayoutUtils::HasAnimations.
layout/base/ActiveLayerTracker.cpp
--- a/layout/base/ActiveLayerTracker.cpp
+++ b/layout/base/ActiveLayerTracker.cpp
@@ -277,17 +277,17 @@ ActiveLayerTracker::IsStyleAnimated(nsIF
       return true;
     }
   }
   if (aProperty == eCSSProperty_transform && aFrame->Preserves3D()) {
     return IsStyleAnimated(aFrame->GetParent(), aProperty);
   }
   nsIContent* content = aFrame->GetContent();
   if (content) {
-    return nsLayoutUtils::HasAnimations(content, aProperty);
+    return nsLayoutUtils::HasCurrentAnimationsForProperty(content, aProperty);
   }
 
   return false;
 }
 
 /* static */ bool
 ActiveLayerTracker::IsOffsetOrMarginStyleAnimated(nsIFrame* aFrame)
 {