Bug 1543571 Part 2 - Replace DUMMY_PARENT_REFLOW_STATE with DUMMY_PARENT_REFLOW_INPUT. r=dholbert
authorTing-Yu Lin <tlin@mozilla.com>
Thu, 11 Apr 2019 20:27:18 +0000
changeset 469089 2668dff6a521ac8a02556cd52a956e622686359e
parent 469088 4eb0aa21e01d6bda2013268ad041bb772c2238d9
child 469090 cb49246c2a26c63e5966c6caacea6f0e1a601936
push id35856
push usercsabou@mozilla.com
push dateFri, 12 Apr 2019 03:19:48 +0000
treeherdermozilla-central@940684cd1065 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersdholbert
bugs1543571
milestone68.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 1543571 Part 2 - Replace DUMMY_PARENT_REFLOW_STATE with DUMMY_PARENT_REFLOW_INPUT. r=dholbert This patch is generated by the following script running on Linux: function rename() { find .\ -type f\ ! -path "./obj*"\ ! -path "./.git"\ ! -path "./.hg"\ \( -name "*.cpp" -or\ -name "*.h" \)\ -exec sed -i -e "s/$1/$2/g" "{}" \; } rename DUMMY_PARENT_REFLOW_STATE DUMMY_PARENT_REFLOW_INPUT Differential Revision: https://phabricator.services.mozilla.com/D27023
layout/generic/ReflowInput.cpp
layout/generic/ReflowInput.h
layout/generic/nsFrame.cpp
layout/generic/nsGridContainerFrame.cpp
layout/tables/nsTableFrame.cpp
--- a/layout/generic/ReflowInput.cpp
+++ b/layout/generic/ReflowInput.cpp
@@ -74,17 +74,17 @@ ReflowInput::ReflowInput(nsPresContext* 
   mParentReflowInput = nullptr;
   AvailableISize() = aAvailableSpace.ISize(mWritingMode);
   AvailableBSize() = aAvailableSpace.BSize(mWritingMode);
   mFloatManager = nullptr;
   mLineLayout = nullptr;
   mDiscoveredClearance = nullptr;
   mPercentBSizeObserver = nullptr;
 
-  if (aFlags & DUMMY_PARENT_REFLOW_STATE) {
+  if (aFlags & DUMMY_PARENT_REFLOW_INPUT) {
     mFlags.mDummyParentReflowInput = true;
   }
   if (aFlags & COMPUTE_SIZE_SHRINK_WRAP) {
     mFlags.mShrinkWrap = true;
   }
   if (aFlags & COMPUTE_SIZE_USE_AUTO_BSIZE) {
     mFlags.mUseAutoBSize = true;
   }
@@ -242,17 +242,17 @@ ReflowInput::ReflowInput(nsPresContext* 
 
   mDiscoveredClearance = nullptr;
   mPercentBSizeObserver =
       (aParentReflowInput.mPercentBSizeObserver &&
        aParentReflowInput.mPercentBSizeObserver->NeedsToObserve(*this))
           ? aParentReflowInput.mPercentBSizeObserver
           : nullptr;
 
-  if ((aFlags & DUMMY_PARENT_REFLOW_STATE) ||
+  if ((aFlags & DUMMY_PARENT_REFLOW_INPUT) ||
       (mParentReflowInput->mFlags.mDummyParentReflowInput &&
        mFrame->IsTableFrame())) {
     mFlags.mDummyParentReflowInput = true;
   }
 
   if (!(aFlags & CALLER_WILL_INIT)) {
     Init(aPresContext, aContainingBlockSize);
   }
--- a/layout/generic/ReflowInput.h
+++ b/layout/generic/ReflowInput.h
@@ -734,17 +734,17 @@ struct ReflowInput : public SizeComputat
               const mozilla::LogicalSize& aAvailableSpace,
               const mozilla::LogicalSize* aContainingBlockSize = nullptr,
               uint32_t aFlags = 0);
 
   // Values for |aFlags| passed to constructor
   enum {
     // Indicates that the parent of this reflow input is "fake" (see
     // mDummyParentReflowInput in mFlags).
-    DUMMY_PARENT_REFLOW_STATE = (1 << 0),
+    DUMMY_PARENT_REFLOW_INPUT = (1 << 0),
 
     // Indicates that the calling function will initialize the reflow input, and
     // that the constructor should not call Init().
     CALLER_WILL_INIT = (1 << 1),
 
     // The caller wants shrink-wrap behavior (i.e. ComputeSizeFlags::eShrinkWrap
     // will be passed to ComputeSize()).
     COMPUTE_SIZE_SHRINK_WRAP = (1 << 2),
--- a/layout/generic/nsFrame.cpp
+++ b/layout/generic/nsFrame.cpp
@@ -10086,17 +10086,17 @@ nsresult nsFrame::DoXULLayout(nsBoxLayou
   desiredSize.BSize(outerWM) = size.BSize(outerWM);
   desiredSize.UnionOverflowAreasWithDesiredBounds();
 
   if (HasAbsolutelyPositionedChildren()) {
     // Set up a |reflowInput| to pass into ReflowAbsoluteFrames
     ReflowInput reflowInput(aState.PresContext(), this,
                             aState.GetRenderingContext(),
                             LogicalSize(ourWM, ISize(), NS_UNCONSTRAINEDSIZE),
-                            ReflowInput::DUMMY_PARENT_REFLOW_STATE);
+                            ReflowInput::DUMMY_PARENT_REFLOW_INPUT);
 
     AddStateBits(NS_FRAME_IN_REFLOW);
     // Set up a |reflowStatus| to pass into ReflowAbsoluteFrames
     // (just a dummy value; hopefully that's OK)
     nsReflowStatus reflowStatus;
     ReflowAbsoluteFrames(aState.PresContext(), desiredSize, reflowInput,
                          reflowStatus);
     RemoveStateBits(NS_FRAME_IN_REFLOW);
@@ -10190,17 +10190,17 @@ void nsFrame::BoxReflow(nsBoxLayoutState
       parentSize.height += margin.TopBottom();
     if (parentSize.width != NS_INTRINSICSIZE)
       parentSize.width += margin.LeftRight();
 
     nsIFrame* parentFrame = GetParent();
     WritingMode parentWM = parentFrame->GetWritingMode();
     ReflowInput parentReflowInput(aPresContext, parentFrame, aRenderingContext,
                                   LogicalSize(parentWM, parentSize),
-                                  ReflowInput::DUMMY_PARENT_REFLOW_STATE);
+                                  ReflowInput::DUMMY_PARENT_REFLOW_INPUT);
 
     // This may not do very much useful, but it's probably worth trying.
     if (parentSize.width != NS_INTRINSICSIZE)
       parentReflowInput.SetComputedWidth(std::max(parentSize.width, 0));
     if (parentSize.height != NS_INTRINSICSIZE)
       parentReflowInput.SetComputedHeight(std::max(parentSize.height, 0));
     parentReflowInput.ComputedPhysicalMargin().SizeTo(0, 0, 0, 0);
     // XXX use box methods
@@ -10228,17 +10228,17 @@ void nsFrame::BoxReflow(nsBoxLayoutState
     }
 
     // XXX Is it OK that this reflow input has only one ancestor?
     // (It used to have a bogus parent, skipping all the boxes).
     WritingMode wm = GetWritingMode();
     LogicalSize logicalSize(wm, nsSize(aWidth, aHeight));
     logicalSize.BSize(wm) = NS_INTRINSICSIZE;
     ReflowInput reflowInput(aPresContext, *parentRI, this, logicalSize, nullptr,
-                            ReflowInput::DUMMY_PARENT_REFLOW_STATE);
+                            ReflowInput::DUMMY_PARENT_REFLOW_INPUT);
 
     // XXX_jwir3: This is somewhat fishy. If this is actually changing the value
     //            here (which it might be), then we should make sure that it's
     //            correct the first time around, rather than changing it later.
     reflowInput.mCBReflowInput = parentRI;
 
     reflowInput.mReflowDepth = aState.GetReflowDepth();
 
--- a/layout/generic/nsGridContainerFrame.cpp
+++ b/layout/generic/nsGridContainerFrame.cpp
@@ -3364,17 +3364,17 @@ static nscoord MeasuringReflow(nsIFrame*
   nsPresContext* pc = aChild->PresContext();
   Maybe<ReflowInput> dummyParentState;
   const ReflowInput* rs = aReflowInput;
   if (!aReflowInput) {
     MOZ_ASSERT(!parent->HasAnyStateBits(NS_FRAME_IN_REFLOW));
     dummyParentState.emplace(
         pc, parent, aRC,
         LogicalSize(parent->GetWritingMode(), 0, NS_UNCONSTRAINEDSIZE),
-        ReflowInput::DUMMY_PARENT_REFLOW_STATE);
+        ReflowInput::DUMMY_PARENT_REFLOW_INPUT);
     rs = dummyParentState.ptr();
   }
 #ifdef DEBUG
   // This will suppress various CRAZY_SIZE warnings for this reflow.
   parent->SetProperty(nsContainerFrame::DebugReflowingWithInfiniteISize(),
                       true);
 #endif
   auto wm = aChild->GetWritingMode();
--- a/layout/tables/nsTableFrame.cpp
+++ b/layout/tables/nsTableFrame.cpp
@@ -2147,17 +2147,17 @@ void nsTableFrame::FixupPositionedTableP
     // XXX(seth): Note that the dummy reflow input doesn't have a correct
     // chain of parent reflow inputs. It also doesn't necessarily have a
     // correct containing block.
     WritingMode wm = positionedPart->GetWritingMode();
     LogicalSize availSize(wm, size);
     availSize.BSize(wm) = NS_UNCONSTRAINEDSIZE;
     ReflowInput reflowInput(aPresContext, positionedPart,
                             aReflowInput.mRenderingContext, availSize,
-                            ReflowInput::DUMMY_PARENT_REFLOW_STATE);
+                            ReflowInput::DUMMY_PARENT_REFLOW_INPUT);
     nsReflowStatus reflowStatus;
 
     // Reflow absolutely-positioned descendants of the positioned part.
     // FIXME: Unconditionally using NS_UNCONSTRAINEDSIZE for the bsize and
     // ignoring any change to the reflow status aren't correct. We'll never
     // paginate absolutely positioned frames.
     nsFrame* positionedFrame = static_cast<nsFrame*>(positionedPart);
     positionedFrame->FinishReflowWithAbsoluteFrames(