Bug 1315851 - stylo: tweak temporary eRestyle_StyleAttribute handling. r=xidorn
authorCameron McCormack <cam@mcc.id.au>
Tue, 08 Nov 2016 10:39:30 +0800
changeset 351642 5fd4012825e23ccd38d7134fb44e34571eacdfac
parent 351641 db6a856a9d378ded5fb8f2642e14e4cbef57c82c
child 351643 816fef70c11d709995182ac7c11c13bea7ac0b62
push id6795
push userjlund@mozilla.com
push dateMon, 23 Jan 2017 14:19:46 +0000
treeherdermozilla-esr52@76101b503191 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
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);