Bug 1412716 - Drop KeyframeEffectReadOnly::mIsComposingStyle. r=emilio
authorHiroyuki Ikezoe <hikezoe@mozilla.com>
Mon, 09 Apr 2018 20:15:59 +0900
changeset 779676 607f333a9cd7b26e4b666a5a7d34ba807e060422
parent 779675 9a88cf9d43086b7adc3ed2ba217c058f205133eb
child 779677 187de5006e65b29be0a3826bb279406aa113cbe5
push id105836
push userbmo:ato@sny.no
push dateTue, 10 Apr 2018 12:07:22 +0000
reviewersemilio
bugs1412716, 1322291
milestone61.0a1
Bug 1412716 - Drop KeyframeEffectReadOnly::mIsComposingStyle. r=emilio The flag was introduced in bug 1322291 to prevent recursive calls of KeyframeEffectReadOnly::ComposeStyle() on the old style system. On the new style system we never call the function recursively. MozReview-Commit-ID: L5gb8G3bl4M
dom/animation/KeyframeEffectReadOnly.cpp
dom/animation/KeyframeEffectReadOnly.h
--- a/dom/animation/KeyframeEffectReadOnly.cpp
+++ b/dom/animation/KeyframeEffectReadOnly.cpp
@@ -278,25 +278,16 @@ SpecifiedKeyframeArraysAreEqual(const ns
 }
 #endif
 
 void
 KeyframeEffectReadOnly::UpdateProperties(const ComputedStyle* aStyle)
 {
   MOZ_ASSERT(aStyle);
 
-  // Skip updating properties when we are composing style.
-  // FIXME: Bug 1324966. Drop this check once we have a function to get
-  // ComputedStyle without resolving animating style.
-  MOZ_DIAGNOSTIC_ASSERT(!mIsComposingStyle,
-                        "Should not be called while processing ComposeStyle()");
-  if (mIsComposingStyle) {
-    return;
-  }
-
   nsTArray<AnimationProperty> properties = BuildProperties(aStyle);
 
   // We need to update base styles even if any properties are not changed at all
   // since base styles might have been changed due to parent style changes, etc.
   EnsureBaseStyles(aStyle, properties);
 
   if (mProperties == properties) {
     return;
@@ -421,25 +412,16 @@ KeyframeEffectReadOnly::ComposeStyleRule
                          mEffectOptions.mIterationComposite);
 }
 
 void
 KeyframeEffectReadOnly::ComposeStyle(
   RawServoAnimationValueMap& aComposeResult,
   const nsCSSPropertyIDSet& aPropertiesToSkip)
 {
-  MOZ_DIAGNOSTIC_ASSERT(!mIsComposingStyle,
-                        "Should not be called recursively");
-  if (mIsComposingStyle) {
-    return;
-  }
-
-  AutoRestore<bool> isComposingStyle(mIsComposingStyle);
-  mIsComposingStyle = true;
-
   ComputedTiming computedTiming = GetComputedTiming();
 
   // If the progress is null, we don't have fill data for the current
   // time so we shouldn't animate.
   if (computedTiming.mProgress.IsNull()) {
     return;
   }
 
--- a/dom/animation/KeyframeEffectReadOnly.h
+++ b/dom/animation/KeyframeEffectReadOnly.h
@@ -416,17 +416,14 @@ private:
   // This function is used for updating scroll bars or notifying intersection
   // observers reflected by the transform.
   bool HasTransformThatMightAffectOverflow() const
   {
     return mCumulativeChangeHint & (nsChangeHint_UpdatePostTransformOverflow |
                                     nsChangeHint_AddOrRemoveTransform |
                                     nsChangeHint_UpdateTransformLayer);
   }
-
-  // FIXME: This flag will be removed in bug 1324966.
-  bool mIsComposingStyle = false;
 };
 
 } // namespace dom
 } // namespace mozilla
 
 #endif // mozilla_dom_KeyframeEffectReadOnly_h