Bug 1390409 part 1 - Remove unused ServoTraversalFlags param from ServoRestyleManager::ProcessPostTraversal. r?emilio draft
authorXidorn Quan <me@upsuper.org>
Mon, 28 Aug 2017 14:27:46 +1000
changeset 654214 4a70386de34e3a57fcfa35324f3df856f616a438
parent 654213 0a7b47d4246ed67221817c0a54f92b99a8c83260
child 654215 6931ad54cf10dbc94a2327bb33e611c27f396d53
child 654221 56964921fb1f6b386bf6ed7faab88d623bbb0d1e
push id76504
push userxquan@mozilla.com
push dateMon, 28 Aug 2017 11:40:50 +0000
reviewersemilio
bugs1390409, 1384769, 1388031
milestone57.0a1
Bug 1390409 part 1 - Remove unused ServoTraversalFlags param from ServoRestyleManager::ProcessPostTraversal. r?emilio This was added in bug 1384769 for passing into Servo_TakeChangeHint, but bug 1388031 changed Servo_TakeChangeHint to no longer take it, and there is nothing else in the function which uses the flags. MozReview-Commit-ID: LvZkJZHENUB
layout/base/ServoRestyleManager.cpp
layout/base/ServoRestyleManager.h
--- a/layout/base/ServoRestyleManager.cpp
+++ b/layout/base/ServoRestyleManager.cpp
@@ -645,17 +645,16 @@ UpdateFramePseudoElementStyles(nsIFrame*
     aFrame, aRestyleState.StyleSet(), aRestyleState.ChangeList());
 }
 
 bool
 ServoRestyleManager::ProcessPostTraversal(
   Element* aElement,
   ServoStyleContext* aParentContext,
   ServoRestyleState& aRestyleState,
-  ServoTraversalFlags aFlags,
   bool aParentWasRestyled)
 {
   nsIFrame* styleFrame = nsLayoutUtils::GetStyleFrame(aElement);
   nsIFrame* primaryFrame = aElement->GetPrimaryFrame();
 
   // NOTE(emilio): This is needed because for table frames the bit is set on the
   // table wrapper (which is the primary frame), not on the table itself.
   const bool isOutOfFlow =
@@ -824,17 +823,16 @@ ServoRestyleManager::ProcessPostTraversa
                                      upToDateContext,
                                      displayContentsStyle && wasRestyled,
                                      childrenRestyleState);
     for (nsIContent* n = it.GetNextChild(); n; n = it.GetNextChild()) {
       if (traverseElementChildren && n->IsElement()) {
         recreatedAnyContext |= ProcessPostTraversal(n->AsElement(),
                                                     upToDateContext,
                                                     childrenRestyleState,
-                                                    aFlags,
                                                     wasRestyled);
       } else if (traverseTextChildren && n->IsNodeOfType(nsINode::eTEXT)) {
         recreatedAnyContext |= ProcessPostTraversalForText(n, textState,
                                                            childrenRestyleState,
                                                            wasRestyled);
       }
     }
   }
@@ -1022,17 +1020,17 @@ ServoRestyleManager::DoProcessPendingRes
     // lazy frame construction).
     {
       AutoRestyleTimelineMarker marker(mPresContext->GetDocShell(), false);
       DocumentStyleRootIterator iter(doc->GetServoRestyleRoot());
       while (Element* root = iter.GetNextStyleRoot()) {
         nsTArray<nsIFrame*> wrappersToRestyle;
         ServoRestyleState state(*styleSet, currentChanges, wrappersToRestyle);
         anyStyleChanged |=
-          ProcessPostTraversal(root, nullptr, state, aFlags,
+          ProcessPostTraversal(root, nullptr, state,
                                /* aParentWasRestyled = */ false);
       }
     }
 
     doc->ClearServoRestyleRoot();
 
     // Process the change hints.
     //
--- a/layout/base/ServoRestyleManager.h
+++ b/layout/base/ServoRestyleManager.h
@@ -256,17 +256,16 @@ private:
    * Returns whether any style did actually change. There may be cases where we
    * didn't need to change any style after all, for example, when a content
    * attribute changes that happens not to have any effect on the style of that
    * element or any descendant or sibling.
    */
   bool ProcessPostTraversal(Element* aElement,
                             ServoStyleContext* aParentContext,
                             ServoRestyleState& aRestyleState,
-                            ServoTraversalFlags aFlags,
                             bool aParentWasRestyled);
 
   struct TextPostTraversalState;
   bool ProcessPostTraversalForText(nsIContent* aTextNode,
                                    TextPostTraversalState& aState,
                                    ServoRestyleState& aRestyleState,
                                    bool aParentWasRestyled);