Bug 1412716 - Drop KeyframeEffectReadOnly::mIsComposingStyle. r?emilio draft
authorHiroyuki Ikezoe <hikezoe@mozilla.com>
Mon, 09 Apr 2018 20:15:59 +0900
changeset 779417 2045d119b3963f4ff3a7524eebff23cdb2c13e73
parent 779416 03619b9967cf26c734e2cc7615152d1771506cba
child 779418 95c1aa2615235c827d644c5e61176263e3300851
push id105766
push userhikezoe@mozilla.com
push dateMon, 09 Apr 2018 20:53:39 +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