Bug 1074634 - Don't overwrite eRestyleResult_ContinueAndForceDescendants with eRestyleResult_Continue. r=heycam
authorL. David Baron <dbaron@dbaron.org>
Thu, 02 Oct 2014 21:53:22 -0700
changeset 231729 db62faf07ac4e3a5b5adf4146cf8c896923ab7ef
parent 231728 77b599edbab4ced5d91f6a374d842b56f991e325
child 231730 11120e8d123d76ad8c985b2d6ba13a6228665876
push id4187
push userbhearsum@mozilla.com
push dateFri, 28 Nov 2014 15:29:12 +0000
treeherdermozilla-beta@f23cc6a30c11 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersheycam
bugs1074634
milestone35.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 1074634 - Don't overwrite eRestyleResult_ContinueAndForceDescendants with eRestyleResult_Continue. r=heycam
layout/base/RestyleManager.cpp
--- a/layout/base/RestyleManager.cpp
+++ b/layout/base/RestyleManager.cpp
@@ -2741,19 +2741,17 @@ ElementRestyler::RestyleSelf(nsIFrame* a
 
   LOG_RESTYLE("RestyleSelf %s, aRestyleHint = %s",
               FrameTagToString(aSelf).get(),
               RestyleManager::RestyleHintToString(aRestyleHint).get());
   LOG_RESTYLE_INDENT();
 
   RestyleResult result;
 
-  if (aRestyleHint & eRestyle_ForceDescendants) {
-    result = eRestyleResult_ContinueAndForceDescendants;
-  } else if (aRestyleHint) {
+  if (aRestyleHint) {
     result = eRestyleResult_Continue;
   } else {
     result = ComputeRestyleResultFromFrame(aSelf);
   }
 
   nsChangeHint assumeDifferenceHint = NS_STYLE_HINT_NONE;
   nsRefPtr<nsStyleContext> oldContext = aSelf->StyleContext();
   nsStyleSet* styleSet = mPresContext->StyleSet();
@@ -3153,16 +3151,20 @@ ElementRestyler::RestyleSelf(nsIFrame* a
         LOG_RESTYLE("setting new extra style context");
         aSelf->SetAdditionalStyleContext(contextIndex, newExtraContext);
       } else {
         LOG_RESTYLE("not setting new extra style context, since we'll reframe");
       }
     }
   }
 
+  if (aRestyleHint & eRestyle_ForceDescendants) {
+    result = eRestyleResult_ContinueAndForceDescendants;
+  }
+
   LOG_RESTYLE("returning %s", RestyleResultToString(result).get());
 
   return result;
 }
 
 void
 ElementRestyler::RestyleChildren(nsRestyleHint aChildRestyleHint)
 {