Bug 1291786 - stylo: Move eRestyle_Subtree translation handling to Servo. r=bholley draft
authorCameron McCormack <cam@mcc.id.au>
Fri, 10 Mar 2017 17:54:19 +0800
changeset 496984 bf8b8e497a19f7cf3ec9cd2062d3271a7448d860
parent 496313 35398cae65c1526ce45c23a5f8b5568c5ada4762
child 548776 b3d8cc61839722bed7941980fd341acf6ff6a7f9
push id48770
push userbmo:cam@mcc.id.au
push dateSat, 11 Mar 2017 01:53:30 +0000
reviewersbholley
bugs1291786
milestone55.0a1
Bug 1291786 - stylo: Move eRestyle_Subtree translation handling to Servo. r=bholley MozReview-Commit-ID: LHTJzImnj6h
layout/base/ServoRestyleManager.cpp
--- a/layout/base/ServoRestyleManager.cpp
+++ b/layout/base/ServoRestyleManager.cpp
@@ -57,26 +57,16 @@ ServoRestyleManager::PostRestyleEvent(El
 
   // XXX This is a temporary hack to make style attribute change works.
   //     In the future, we should be able to use this hint directly.
   if (aRestyleHint & eRestyle_StyleAttribute) {
     aRestyleHint &= ~eRestyle_StyleAttribute;
     aRestyleHint |= eRestyle_Self | eRestyle_Subtree;
   }
 
-  // XXX For now, convert eRestyle_Subtree into (eRestyle_Self |
-  // eRestyle_SomeDescendants), which Servo will interpret as
-  // RESTYLE_SELF | RESTYLE_DESCENDANTS, since this is a commonly
-  // posted restyle hint that doesn't yet align with RestyleHint's
-  // bits.
-  if (aRestyleHint & eRestyle_Subtree) {
-    aRestyleHint &= ~eRestyle_Subtree;
-    aRestyleHint |= eRestyle_Self | eRestyle_SomeDescendants;
-  }
-
   if (aRestyleHint || aMinChangeHint) {
     Servo_NoteExplicitHints(aElement, aRestyleHint, aMinChangeHint);
   }
 
   PostRestyleEventInternal(false);
 }
 
 void