Bug 1237467 part 2 - Clear mProgressOnLastCompose when the effect is no longer relevant; r=heycam
--- a/dom/animation/KeyframeEffect.cpp
+++ b/dom/animation/KeyframeEffect.cpp
@@ -175,16 +175,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.