Bug 1437774 - Mark stylist dirty when author style disabled state changes. r=emilio
This is a workaround for regression from
bug 1436798.
MozReview-Commit-ID: BJzk5cjjPd5
--- a/layout/style/ServoStyleSet.cpp
+++ b/layout/style/ServoStyleSet.cpp
@@ -364,16 +364,22 @@ ServoStyleSet::SetAuthorStyleDisabled(bo
mAuthorStyleDisabled = aStyleDisabled;
if (Element* root = mDocument->GetRootElement()) {
if (nsPresContext* pc = GetPresContext()) {
pc->RestyleManager()->PostRestyleEvent(root, eRestyle_Subtree, nsChangeHint(0));
}
}
Servo_StyleSet_SetAuthorStyleDisabled(mRawSet.get(), mAuthorStyleDisabled);
+ // XXX Workaround for the assertion in InvalidateStyleForDocumentStateChanges
+ // which is called by nsIPresShell::SetAuthorStyleDisabled via nsIPresShell::
+ // RestyleForCSSRuleChanges. It is not really necessary because we don't need
+ // to rebuild stylist for this change. But we have bug around this, and we
+ // may want to rethink how things should work. See bug 1437785.
+ SetStylistStyleSheetsDirty();
}
void
ServoStyleSet::BeginUpdate()
{
}
nsresult