Bug 1159042 - p6. Use NS_FRAME_DYNAMIC_REFLOW_ROOT - r=dholbert
authorL. David Baron <dbaron@dbaron.org>
Tue, 11 Dec 2018 20:34:09 +0000
changeset 450146 c07fb8a8d472ef4d40cd6a04726a9d851817e48a
parent 450145 60524976c8f66f4ebfc93b7fb17fd850f2c6f352
child 450147 ec8271296a279e42abd174c08b1ee2e12d2cf794
push id35190
push userccoroiu@mozilla.com
push dateWed, 12 Dec 2018 05:10:47 +0000
treeherdermozilla-central@5bcbe5232a26 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersdholbert
bugs1159042
milestone66.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
layout/generic/crashtests/crashtests.list
--- a/layout/base/PresShell.cpp
+++ b/layout/base/PresShell.cpp
@@ -2523,17 +2523,18 @@ void PresShell::VerifyHasDirtyRootAncest
   // 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();
   }
 
@@ -2604,19 +2605,20 @@ void PresShell::FrameNeedsReflow(nsIFram
       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) && \
-   (_f != subtreeRoot || !targetNeedsReflowFromParent))
+#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
       // root that should contain the reflow.  That root could be
       // subtreeRoot itself if it's not dirty, or it could be some
--- a/layout/generic/ReflowInput.cpp
+++ b/layout/generic/ReflowInput.cpp
@@ -2564,17 +2564,18 @@ void SizeComputationInput::InitOffsets(W
         widgetPadding, presContext->AppUnitsPerDevPixel());
     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);
+                      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](LogicalAxis aAxis,
                                                        Prop aProp) {
--- a/layout/generic/crashtests/crashtests.list
+++ b/layout/generic/crashtests/crashtests.list
@@ -20,17 +20,17 @@ load 309322-1.html
 load 309322-2.html
 load 309322-3.html
 load 309322-4.html
 load 310556-1.xhtml
 load 321224.xul
 load 322780-1.xul
 load 323381-1.html
 load 323381-2.html
-asserts-if(gtkWidget,1) asserts-if(Android&&asyncPan,1) load 323386-1.html # Bug 718883
+asserts-if(Android&&asyncPan,1) load 323386-1.html # Bug 718883
 load 323389-1.html
 load 323389-2.html
 load 323493-1.html
 load 323495-1.html
 load 324318-1.html
 load 328946-1.html
 load 331284-1.xhtml
 load 331292.html