Bug 1237467 part 2 - Clear mProgressOnLastCompose when the effect is no longer relevant; r=heycam
☠☠ backed out by d353d4310837 ☠ ☠
authorBrian Birtles <birtles@gmail.com>
Thu, 14 Jan 2016 08:02:39 +0900
changeset 279823 d63ca2677bd52b3ee47210cc9b3dd04a825b90fc
parent 279822 5a3d7e16b1e02e1f04c9769f2d5c5557770663f6
child 279824 7609ca218902a293b83022902344244cf54264ba
push id70233
push userbbirtles@mozilla.com
push dateWed, 13 Jan 2016 23:03:11 +0000
treeherdermozilla-inbound@ac21baf87df2 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersheycam
bugs1237467
milestone46.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 1237467 part 2 - Clear mProgressOnLastCompose when the effect is no longer relevant; r=heycam
dom/animation/KeyframeEffect.cpp
--- a/dom/animation/KeyframeEffect.cpp
+++ b/dom/animation/KeyframeEffect.cpp
@@ -181,16 +181,24 @@ KeyframeEffectReadOnly::NotifyAnimationT
       EffectCompositor::RestyleType::Throttled :
       EffectCompositor::RestyleType::Standard;
     nsPresContext* presContext = GetPresContext();
     if (presContext) {
       presContext->EffectCompositor()->
         RequestRestyle(mTarget, mPseudoType, restyleType,
                        mAnimation->CascadeLevel());
     }
+
+    // If we're not relevant, we will have been removed from the EffectSet.
+    // As a result, when the restyle we requested above is fulfilled, our
+    // ComposeStyle will not get called and mProgressOnLastCompose will not
+    // be updated. Instead, we need to manually clear it.
+    if (!isRelevant) {
+      mProgressOnLastCompose.SetNull();
+    }
   }
 }
 
 Nullable<TimeDuration>
 KeyframeEffectReadOnly::GetLocalTime() const
 {
   // Since the *animation* start time is currently always zero, the local
   // time is equal to the parent time.