Bug 1388566 - Drop unused Element argument from ServoStyleSet::PreTraverse(). r?bholley draft
authorHiroyuki Ikezoe <hikezoe@mozilla.com>
Wed, 04 Oct 2017 13:19:57 +0900
changeset 674659 48549566ba4679ab55a71ea5c7a10daa74ea3bcc
parent 674658 11e1a4940d7c2b12b1abdc15b49773e12e839d3f
child 674660 96ccc268eb680aa0b0a5bdee049c7f5d7f242e88
push id82901
push userhikezoe@mozilla.com
push dateWed, 04 Oct 2017 04:25:45 +0000
reviewersbholley
bugs1388566, 1388031
milestone58.0a1
Bug 1388566 - Drop unused Element argument from ServoStyleSet::PreTraverse(). r?bholley It has not been used since bug 1388031. MozReview-Commit-ID: Gk0le1row75
layout/style/ServoStyleSet.cpp
layout/style/ServoStyleSet.h
--- a/layout/style/ServoStyleSet.cpp
+++ b/layout/style/ServoStyleSet.cpp
@@ -449,38 +449,30 @@ ServoStyleSet::PreTraverseSync()
     }
   }
 
   UpdateStylistIfNeeded();
   mPresContext->CacheAllLangs();
 }
 
 void
-ServoStyleSet::PreTraverse(ServoTraversalFlags aFlags, Element* aRoot)
+ServoStyleSet::PreTraverse(ServoTraversalFlags aFlags)
 {
   PreTraverseSync();
 
   // Process animation stuff that we should avoid doing during the parallel
   // traversal.
   nsSMILAnimationController* smilController =
     mPresContext->Document()->HasAnimationController()
     ? mPresContext->Document()->GetAnimationController()
     : nullptr;
 
-  if (aRoot) {
-    mPresContext->EffectCompositor()
-                ->PreTraverseInSubtree(aFlags, aRoot);
-    if (smilController) {
-      smilController->PreTraverseInSubtree(aRoot);
-    }
-  } else {
-    mPresContext->EffectCompositor()->PreTraverse(aFlags);
-    if (smilController) {
-      smilController->PreTraverse();
-    }
+  mPresContext->EffectCompositor()->PreTraverse(aFlags);
+  if (smilController) {
+    smilController->PreTraverse();
   }
 }
 
 static inline already_AddRefed<ServoStyleContext>
 ResolveStyleForTextOrFirstLetterContinuation(
     RawServoStyleSetBorrowed aStyleSet,
     ServoStyleContext& aParent,
     nsIAtom* aAnonBox)
--- a/layout/style/ServoStyleSet.h
+++ b/layout/style/ServoStyleSet.h
@@ -513,18 +513,17 @@ private:
   void ClearNonInheritingStyleContexts();
 
   /**
    * Perform processes that we should do before traversing.
    *
    * When aRoot is null, the entire document is pre-traversed.  Otherwise,
    * only the subtree rooted at aRoot is pre-traversed.
    */
-  void PreTraverse(ServoTraversalFlags aFlags,
-                   dom::Element* aRoot = nullptr);
+  void PreTraverse(ServoTraversalFlags aFlags);
 
   // Subset of the pre-traverse steps that involve syncing up data
   void PreTraverseSync();
 
   /**
    * Records that the contents of style sheets at the specified origin have
    * changed since the last.  Calling this will ensure that the Stylist
    * rebuilds its selector maps.