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
--- 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