From 7f1681beaafd93b43f218772f5a4d2f995db43d5 Mon Sep 17 00:00:00 2001 From: Brian Birtles Date: Wed, 13 Jan 2016 13:38:16 +0900 Subject: [PATCH] Bug 1238660 part 1 - Make mWinsInCascade initially false; r=hiro As of bug 1228229, the mWinsInCascade member of animation properties is set consistently for both animations and transitions such that we only set this to true if an animation is "in effect". When an effect is initially created it is not "in effect" until it is attached to a non-idle animation. We should, therefore, initialize this to false and, when we become in effect, mark the cascade as needing an update. --- dom/animation/KeyframeEffect.cpp | 2 -- dom/animation/KeyframeEffect.h | 6 +++++- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/dom/animation/KeyframeEffect.cpp b/dom/animation/KeyframeEffect.cpp index 12a4cabbcadb..f9e1f9c97b30 100644 --- a/dom/animation/KeyframeEffect.cpp +++ b/dom/animation/KeyframeEffect.cpp @@ -1381,7 +1381,6 @@ BuildSegmentsFromValueEntries(nsTArray& aEntries, MOZ_ASSERT(aEntries[i].mOffset == 0.0f); animationProperty = aResult.AppendElement(); animationProperty->mProperty = aEntries[i].mProperty; - animationProperty->mWinsInCascade = true; lastProperty = aEntries[i].mProperty; } @@ -1583,7 +1582,6 @@ BuildAnimationPropertyListFromPropertyIndexedKeyframes( animationPropertyIndexes[i] = aResult.Length(); AnimationProperty* animationProperty = aResult.AppendElement(); animationProperty->mProperty = p; - animationProperty->mWinsInCascade = true; properties.AddProperty(p); } } diff --git a/dom/animation/KeyframeEffect.h b/dom/animation/KeyframeEffect.h index c481b0a530d5..a069bbc68154 100644 --- a/dom/animation/KeyframeEffect.h +++ b/dom/animation/KeyframeEffect.h @@ -131,9 +131,10 @@ struct AnimationProperty // For CSS Animations, which are overridden by !important rules in the // cascade, we actually determine this from the CSS cascade // computations, and then use it for OMTA. + // // **NOTE**: This member is not included when comparing AnimationProperty // objects for equality. - bool mWinsInCascade = true; + bool mWinsInCascade = false; // If true, the propery is currently being animated on the compositor. // @@ -141,6 +142,9 @@ struct AnimationProperty // between calling RequestRestyle on its AnimationCollection and when the // restyle is performed, this member may temporarily become false even if // the animation remains on the layer after the restyle. + // + // **NOTE**: This member is not included when comparing AnimationProperty + // objects for equality. bool mIsRunningOnCompositor = false; InfallibleTArray mSegments;