Bug 1315851 - stylo: tweak temporary eRestyle_StyleAttribute handling. r?xidorn draft
authorCameron McCormack <cam@mcc.id.au>
Tue, 08 Nov 2016 10:23:31 +0800
changeset 435099 08bbb8f184accacdf2a70b0a28616c3cce3cd611
parent 435098 db6a856a9d378ded5fb8f2642e14e4cbef57c82c
child 536215 c4e8e98182d028ae1d404838a99aeefd98291d93
push id34936
push userbmo:cam@mcc.id.au
push dateTue, 08 Nov 2016 02:24:02 +0000
reviewersxidorn
bugs1315851
milestone52.0a1
Bug 1315851 - stylo: tweak temporary eRestyle_StyleAttribute handling. r?xidorn MozReview-Commit-ID: Jgv5El6Kxdu
layout/base/ServoRestyleManager.cpp
--- a/layout/base/ServoRestyleManager.cpp
+++ b/layout/base/ServoRestyleManager.cpp
@@ -33,17 +33,18 @@ ServoRestyleManager::PostRestyleEvent(El
 
   if (aRestyleHint == 0 && !aMinChangeHint && !HasPendingRestyles()) {
     return; // Nothing to do.
   }
 
   // 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_Subtree;
+    aRestyleHint &= ~eRestyle_StyleAttribute;
+    aRestyleHint |= eRestyle_Self | eRestyle_Subtree;
   }
 
   // Note that unlike in Servo, we don't mark elements as dirty until we process
   // the restyle hints in ProcessPendingRestyles.
   if (aRestyleHint || aMinChangeHint) {
     ServoElementSnapshot* snapshot = SnapshotForElement(aElement);
     snapshot->AddExplicitRestyleHint(aRestyleHint);
     snapshot->AddExplicitChangeHint(aMinChangeHint);