Bug 1315851 - stylo: tweak temporary eRestyle_StyleAttribute handling. r?xidorn
MozReview-Commit-ID: Jgv5El6Kxdu
--- 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);