Bug 1159042 - p6. Use NS_FRAME_DYNAMIC_REFLOW_ROOT - r=dholbert
☠☠ backed out by d5a15c64bd40 ☠ ☠
authorL. David Baron <dbaron@dbaron.org>
Sun, 25 Nov 2018 23:18:19 +0000
changeset 507378 fe77c09dee3107e675162b760a6efa9b5f0bcce3
parent 507377 db0e173a6ed2ed65c22a2e60bc3f358e3d19d82c
child 507379 cea43bc88c7a564f0ca72995f6eac6b0d118f3f1
push id1905
push userffxbld-merge
push dateMon, 21 Jan 2019 12:33:13 +0000
treeherdermozilla-release@c2fca1944d8c [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersdholbert
bugs1159042
milestone65.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 1159042 - p6. Use NS_FRAME_DYNAMIC_REFLOW_ROOT - r=dholbert Differential Revision: https://phabricator.services.mozilla.com/D9492
layout/base/PresShell.cpp
layout/generic/ReflowInput.cpp
--- a/layout/base/PresShell.cpp
+++ b/layout/base/PresShell.cpp
@@ -2732,17 +2732,18 @@ PresShell::VerifyHasDirtyRootAncestor(ns
   // handles the root frame correctly.
   if (!aFrame->GetParent()) {
     return;
   }
 
   // Make sure that there is a reflow root ancestor of |aFrame| that's
   // in mDirtyRoots already.
   while (aFrame && (aFrame->GetStateBits() & NS_FRAME_HAS_DIRTY_CHILDREN)) {
-    if (((aFrame->GetStateBits() & NS_FRAME_REFLOW_ROOT) ||
+    if ((aFrame->HasAnyStateBits(NS_FRAME_REFLOW_ROOT |
+                                 NS_FRAME_DYNAMIC_REFLOW_ROOT) ||
          !aFrame->GetParent()) &&
         mDirtyRoots.Contains(aFrame)) {
       return;
     }
 
     aFrame = aFrame->GetParent();
   }
 
@@ -2816,18 +2817,19 @@ PresShell::FrameNeedsReflow(nsIFrame *aF
       case eNoPositionOrSizeChange:
         targetNeedsReflowFromParent = false;
         break;
       case eInferFromBitToAdd:
         targetNeedsReflowFromParent = (aBitToAdd == NS_FRAME_IS_DIRTY);
         break;
     }
 
-#define FRAME_IS_REFLOW_ROOT(_f)                   \
-  ((_f->GetStateBits() & NS_FRAME_REFLOW_ROOT) &&  \
+#define FRAME_IS_REFLOW_ROOT(_f)                                              \
+  (_f->HasAnyStateBits(NS_FRAME_REFLOW_ROOT |                                 \
+                       NS_FRAME_DYNAMIC_REFLOW_ROOT) &&                       \
    (_f != subtreeRoot || !targetNeedsReflowFromParent))
 
 
     // Mark the intrinsic widths as dirty on the frame, all of its ancestors,
     // and all of its descendants, if needed:
 
     if (aIntrinsicDirty != nsIPresShell::eResize) {
       // Mark argument and all ancestors dirty. (Unless we hit a reflow
--- a/layout/generic/ReflowInput.cpp
+++ b/layout/generic/ReflowInput.cpp
@@ -2688,18 +2688,20 @@ SizeComputationInput::InitOffsets(Writin
     needPaddingProp = false;
   }
   else if (nsSVGUtils::IsInSVGTextSubtree(mFrame)) {
     ComputedPhysicalPadding().SizeTo(0, 0, 0, 0);
     needPaddingProp = false;
   }
   else if (aPadding) { // padding is an input arg
     ComputedPhysicalPadding() = *aPadding;
-    needPaddingProp = mFrame->StylePadding()->IsWidthDependent() ||
-    (mFrame->GetStateBits() & NS_FRAME_REFLOW_ROOT);
+    needPaddingProp =
+      mFrame->StylePadding()->IsWidthDependent() ||
+      mFrame->HasAnyStateBits(NS_FRAME_REFLOW_ROOT |
+                              NS_FRAME_DYNAMIC_REFLOW_ROOT);
   }
   else {
     needPaddingProp = ComputePadding(aWM, aPercentBasis, aFrameType);
   }
 
   // Add [align|justify]-content:baseline padding contribution.
   typedef const FramePropertyDescriptor<SmallValueHolder<nscoord>>* Prop;
   auto ApplyBaselinePadding = [this, &needPaddingProp]