Bug 1334036 - Part 4: Remove unused UpdateCascadeResults function. r=birtles,hiro
authorBoris Chiou <boris.chiou@gmail.com>
Wed, 10 May 2017 13:46:36 +0800
changeset 407875 e417ced91e375ffe66fb598942b0fa6b5a2d2a1b
parent 407874 babbbe4db7072be2672271e415987ed6d7c0cfd2
child 407876 750c87d6188415b5ba3d10b1ed95bc6cfb7266d0
push id7391
push usermtabara@mozilla.com
push dateMon, 12 Jun 2017 13:08:53 +0000
treeherdermozilla-beta@2191d7f87e2e [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbirtles, hiro
bugs1334036
milestone55.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1334036 - Part 4: Remove unused UpdateCascadeResults function. r=birtles,hiro We don't use the public UpdateCascadeResults method, so remove it. MozReview-Commit-ID: A2lWZaHWHTZ
dom/animation/EffectCompositor.cpp
dom/animation/EffectCompositor.h
--- a/dom/animation/EffectCompositor.cpp
+++ b/dom/animation/EffectCompositor.cpp
@@ -683,29 +683,16 @@ EffectCompositor::MaybeUpdateCascadeResu
   }
 
   // FIXME: Implement the rule node traversal for stylo in Bug 1334036.
   UpdateCascadeResults(*effects, aElement, aPseudoType, nullptr);
 
   MOZ_ASSERT(!effects->CascadeNeedsUpdate(), "Failed to update cascade state");
 }
 
-/* static */ void
-EffectCompositor::UpdateCascadeResults(Element* aElement,
-                                       CSSPseudoElementType aPseudoType,
-                                       nsStyleContext* aStyleContext)
-{
-  EffectSet* effects = EffectSet::GetEffectSet(aElement, aPseudoType);
-  if (!effects) {
-    return;
-  }
-
-  UpdateCascadeResults(*effects, aElement, aPseudoType, aStyleContext);
-}
-
 /* static */ Maybe<NonOwningAnimationTarget>
 EffectCompositor::GetAnimationElementAndPseudoForFrame(const nsIFrame* aFrame)
 {
   // Always return the same object to benefit from return-value optimization.
   Maybe<NonOwningAnimationTarget> result;
 
   CSSPseudoElementType pseudoType =
     aFrame->StyleContext()->GetPseudoType();
--- a/dom/animation/EffectCompositor.h
+++ b/dom/animation/EffectCompositor.h
@@ -205,27 +205,16 @@ public:
   // Variant of MaybeUpdateCascadeResults for the Servo backend.
   // The Servo backend doesn't use an nsStyleContext to get the rule node
   // to traverse the style tree to find !important rules and instead
   // gets the rule node from |aElement|.
   static void
   MaybeUpdateCascadeResults(dom::Element* aElement,
                             CSSPseudoElementType aPseudoType);
 
-  // Update the mPropertiesWithImportantRules and
-  // mPropertiesForAnimationsLevel members of the corresponding EffectSet.
-  //
-  // 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.
-  static void
-  UpdateCascadeResults(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
@@ -269,16 +258,22 @@ private:
   // Get the properties in |aEffectSet| that we are able to animate on the
   // compositor but which are also specified at a higher level in the cascade
   // than the animations level in |aStyleContext|.
   static void
   GetOverriddenProperties(nsStyleContext* aStyleContext,
                           EffectSet& aEffectSet,
                           nsCSSPropertyIDSet& aPropertiesOverridden);
 
+  // Update the mPropertiesWithImportantRules and
+  // mPropertiesForAnimationsLevel members of the given EffectSet.
+  //
+  // 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.
   static void
   UpdateCascadeResults(EffectSet& aEffectSet,
                        dom::Element* aElement,
                        CSSPseudoElementType aPseudoType,
                        nsStyleContext* aStyleContext);
 
   static nsPresContext* GetPresContext(dom::Element* aElement);