Bug 898333, patch 1: Restyle the :after pseudo-element after the content children. r=bzbarsky
authorL. David Baron <dbaron@dbaron.org>
Wed, 25 Sep 2013 12:28:07 -0700
changeset 148700 b680053ea755d57715e2b5e65b94e70bcc406bb0
parent 148699 8879393c2552aae23373deb63d01e92e7b99172d
child 148701 ed9c22ef51e0478b4d2c2b9e2e3b9b9210fb3f47
push id34309
push userdbaron@mozilla.com
push dateWed, 25 Sep 2013 19:28:30 +0000
treeherdermozilla-inbound@9e259b87bdcf [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbzbarsky
bugs898333
milestone27.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 898333, patch 1: Restyle the :after pseudo-element after the content children. r=bzbarsky
layout/base/RestyleManager.cpp
--- a/layout/base/RestyleManager.cpp
+++ b/layout/base/RestyleManager.cpp
@@ -2369,39 +2369,39 @@ ElementRestyler::RestyleChildren(nsResty
   // mFrame->StyleContext(), which is out of date if mHintsHandled has a
   // ReconstructFrame hint.  Using an out of date style context could
   // trigger assertions about mismatched rule trees.
   if (!(mHintsHandled & nsChangeHint_ReconstructFrame) &&
       aChildRestyleHint) {
     RestyleBeforePseudo();
   }
 
-  // Check whether we might need to create a new ::after frame.
-  // See comments above regarding :before.
-  if (!(mHintsHandled & nsChangeHint_ReconstructFrame) &&
-      aChildRestyleHint) {
-    RestyleAfterPseudo();
-  }
-
   // There is no need to waste time crawling into a frame's children
   // on a frame change.  The act of reconstructing frames will force
   // new style contexts to be resolved on all of this frame's
   // descendants anyway, so we want to avoid wasting time processing
   // style contexts that we're just going to throw away anyway. - dwh
   // It's also important to check mHintsHandled since reresolving the
   // kids would use mFrame->StyleContext(), which is out of date if
   // mHintsHandled has a ReconstructFrame hint; doing this could trigger
   // assertions about mismatched rule trees.
   if (!(mHintsHandled & nsChangeHint_ReconstructFrame)) {
     InitializeAccessibilityNotifications();
 
     RestyleContentChildren(aChildRestyleHint);
 
     SendAccessibilityNotifications();
   }
+
+  // Check whether we might need to create a new ::after frame.
+  // See comments above regarding :before.
+  if (!(mHintsHandled & nsChangeHint_ReconstructFrame) &&
+      aChildRestyleHint) {
+    RestyleAfterPseudo();
+  }
 }
 
 void
 ElementRestyler::RestyleUndisplayedChildren(nsRestyleHint aChildRestyleHint)
 {
   // When the root element is display:none, we still construct *some*
   // frames that have the root element as their mContent, down to the
   // DocElementContainingBlock.