Bug 1439428 - Make EffectCompositor::UpdateCascadeResults public. r?
We will call the function directly in a sequential task in the case where we
already detected that !important styles for animations has been changed in
parallel traversal.
MozReview-Commit-ID: 7j6CfONYD08
--- a/dom/animation/EffectCompositor.h
+++ b/dom/animation/EffectCompositor.h
@@ -216,16 +216,39 @@ public:
// This method does NOT detect if other styles that apply above the
// animation level of the cascade have changed.
static void
MaybeUpdateCascadeResults(StyleBackendType aBackendType,
dom::Element* aElement,
CSSPseudoElementType aPseudoType,
nsStyleContext* aStyleContext);
+ // Update the mPropertiesWithImportantRules and
+ // mPropertiesForAnimationsLevel members of the given EffectSet, and also
+ // request any restyles required by changes to the cascade result.
+ //
+ // NOTE: This can be expensive so we should only call it if styles that apply
+ // above the animation level of the cascade might have changed. For all
+ // other cases we should call MaybeUpdateCascadeResults.
+ //
+ // This is typically reserved for internal callers but is public here since
+ // when we detect changes to the cascade on the Servo side we can't call
+ // MarkCascadeNeedsUpdate during the traversal so instead we call this as part
+ // of a follow-up sequential task.
+ //
+ // As with MaybeUpdateCascadeResults, |aStyleContext| is only used
+ // when |aBackendType| is StyleBackendType::Gecko. When |aBackendType| is
+ // StyleBackendType::Servo, it is ignored.
+ static void
+ UpdateCascadeResults(StyleBackendType aBackendType,
+ EffectSet& aEffectSet,
+ dom::Element* aElement,
+ CSSPseudoElementType aPseudoType,
+ nsStyleContext* aStyleContext);
+
// Helper to fetch the corresponding element and pseudo-type from a frame.
//
// For frames corresponding to pseudo-elements, the returned element is the
// element on which we store the animations (i.e. the EffectSet and/or
// AnimationCollection), *not* the generated content.
//
// Returns an empty result when a suitable element cannot be found including
// when the frame represents a pseudo-element on which we do not support
@@ -288,34 +311,16 @@ private:
// stored on the (pseudo-)element indicated by |aElement| and |aPseudoType|.
static nsCSSPropertyIDSet
GetOverriddenProperties(StyleBackendType aBackendType,
EffectSet& aEffectSet,
dom::Element* aElement,
CSSPseudoElementType aPseudoType,
nsStyleContext* aStyleContext);
- // Update the mPropertiesWithImportantRules and
- // mPropertiesForAnimationsLevel members of the given EffectSet, and also
- // request any restyles required by changes to the cascade result.
- //
- // This can be expensive so we should only call it if styles that apply
- // above the animation level of the cascade might have changed. For all
- // other cases we should call MaybeUpdateCascadeResults.
- //
- // As with MaybeUpdateCascadeResults, |aStyleContext| is only used
- // when |aBackendType| is StyleBackendType::Gecko. When |aBackendType| is
- // StyleBackendType::Servo, it is ignored.
- static void
- UpdateCascadeResults(StyleBackendType aBackendType,
- EffectSet& aEffectSet,
- dom::Element* aElement,
- CSSPseudoElementType aPseudoType,
- nsStyleContext* aStyleContext);
-
static nsPresContext* GetPresContext(dom::Element* aElement);
nsPresContext* mPresContext;
// Elements with a pending animation restyle. The associated bool value is
// true if a pending animation restyle has also been dispatched. For
// animations that can be throttled, we will add an entry to the hashtable to
// indicate that the style rule on the element is out of date but without