Bug 1047928 patch 4a - Explain why we need to rerun selector matching for preference changes. r=bzbarsky
authorL. David Baron <dbaron@dbaron.org>
Wed, 08 Oct 2014 14:27:02 -0700
changeset 209471 fd1674f6a37ade81a0e3a61409b1bbea527927c2
parent 209470 7aa21afed324a5f0dccc551b7417efd9687ba402
child 209472 56ee0c224417e0e02c6d2a9f0d861121cfb1f6e0
push id1
push userroot
push dateMon, 20 Oct 2014 17:29:22 +0000
reviewersbzbarsky
bugs1047928
milestone35.0a1
Bug 1047928 patch 4a - Explain why we need to rerun selector matching for preference changes. r=bzbarsky
layout/base/nsPresContext.cpp
--- a/layout/base/nsPresContext.cpp
+++ b/layout/base/nsPresContext.cpp
@@ -940,16 +940,18 @@ nsPresContext::UpdateAfterPreferencesCha
   mDeviceContext->FlushFontCache();
 
   nsChangeHint hint = nsChangeHint(0);
 
   if (mPrefChangePendingNeedsReflow) {
     NS_UpdateHint(hint, NS_STYLE_HINT_REFLOW);
   }
 
+  // Preferences require rerunning selector matching because we rebuild
+  // the pref style sheet for some preference changes.
   RebuildAllStyleData(hint, eRestyle_Subtree);
 }
 
 nsresult
 nsPresContext::Init(nsDeviceContext* aDeviceContext)
 {
   NS_ASSERTION(!mInitialized, "attempt to reinit pres context");
   NS_ENSURE_ARG(aDeviceContext);