Bug 1437774 - Mark stylist dirty when author style disabled state changes. r=emilio
authorXidorn Quan <me@upsuper.org>
Tue, 13 Feb 2018 18:33:00 +1100
changeset 456106 f7e2a78331801fd50fddc617fc08e422f7f5cf25
parent 456105 4cecfca0155ba996b9161b4ef427846e1d2b998e
child 456107 17454f8c2ea8a1a600a95207b6856976178494a7
push id8799
push usermtabara@mozilla.com
push dateThu, 01 Mar 2018 16:46:23 +0000
treeherdermozilla-beta@15334014dc67 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersemilio
bugs1437774, 1436798
milestone60.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
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
layout/style/ServoStyleSet.cpp
--- 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