Bug 1047928 patch 7 - Don't rerun selector matching when user font set is updated. r=bzbarsky
authorL. David Baron <dbaron@dbaron.org>
Wed, 08 Oct 2014 14:27:03 -0700
changeset 209474 a1bc385f0ad4708d468ac8816e54e4f65b93604d
parent 209473 d4f6fe019942566a24ea02747674186ac53c56f7
child 209475 6e95d6d112f3b7a93a3b4e12db61db6d1a54cff2
push id1
push userroot
push dateMon, 20 Oct 2014 17:29:22 +0000
reviewersbzbarsky
bugs1047928
milestone35.0a1
Bug 1047928 patch 7 - Don't rerun selector matching when user font set is updated. r=bzbarsky
layout/base/nsPresContext.cpp
--- a/layout/base/nsPresContext.cpp
+++ b/layout/base/nsPresContext.cpp
@@ -2177,17 +2177,17 @@ nsPresContext::UserFontSetUpdated()
   //      intrinsic widths, and any other parts of layout that depend on
   //      font metrics.  This requires a style change reflow to update.
   //
   //   2. Changing the value of the 'ex' and 'ch' units in style data,
   //      which also depend on font metrics.  Updating this information
   //      requires rebuilding the rule tree from the top, avoiding the
   //      reuse of cached data even when no style rules have changed.
 
-  PostRebuildAllStyleDataEvent(NS_STYLE_HINT_REFLOW, eRestyle_Subtree);
+  PostRebuildAllStyleDataEvent(NS_STYLE_HINT_REFLOW, eRestyle_ForceDescendants);
 }
 
 FontFaceSet*
 nsPresContext::Fonts()
 {
   if (!mFontFaceSet) {
     mFontFaceSet = new FontFaceSet(mDocument->GetInnerWindow(), this);
     GetUserFontSet();  // this will cause the user font set to be created/updated