Bug 1543571 Part 4 - Manually replace "reflow state" with "reflow input" that are break across lines. r=dholbert
authorTing-Yu Lin <tlin@mozilla.com>
Thu, 11 Apr 2019 21:22:16 +0000
changeset 469091 1a92c531a9af2815c1a8bb79716f0dd9d8b883a8
parent 469090 cb49246c2a26c63e5966c6caacea6f0e1a601936
child 469092 ca9b52a04b085152ad38b468d3d87e4f56df86f3
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 4 - Manually replace "reflow state" with "reflow input" that are break across lines. r=dholbert This is a follow-up for Part 1. I find all the candidates by running the following command under layout/, and manually replace them. ag -A 1 reflow$ | ag -B 1 state Differential Revision: https://phabricator.services.mozilla.com/D27162
layout/generic/ReflowInput.cpp
layout/generic/ReflowInput.h
layout/generic/nsBlockFrame.cpp
layout/generic/nsBlockReflowContext.cpp
layout/generic/nsFlexContainerFrame.cpp
layout/tables/nsTableFrame.cpp
--- a/layout/generic/ReflowInput.cpp
+++ b/layout/generic/ReflowInput.cpp
@@ -294,24 +294,24 @@ nscoord SizeComputationInput::ComputeBSi
 }
 
 void ReflowInput::SetComputedWidth(nscoord aComputedWidth) {
   NS_ASSERTION(mFrame, "Must have a frame!");
   // It'd be nice to assert that |frame| is not in reflow, but this fails for
   // two reasons:
   //
   // 1) Viewport frames reset the computed width on a copy of their reflow
-  //    state when reflowing fixed-pos kids.  In that case we actually don't
+  //    input when reflowing fixed-pos kids.  In that case we actually don't
   //    want to mess with the resize flags, because comparing the frame's rect
   //    to the munged computed width is pointless.
   // 2) nsFrame::BoxReflow creates a reflow input for its parent.  This reflow
-  //    state is not used to reflow the parent, but just as a parent for the
+  //    input is not used to reflow the parent, but just as a parent for the
   //    frame's own reflow input.  So given a nsBoxFrame inside some non-XUL
   //    (like a text control, for example), we'll end up creating a reflow
-  //    state for the parent while the parent is reflowing.
+  //    input for the parent while the parent is reflowing.
 
   MOZ_ASSERT(aComputedWidth >= 0, "Invalid computed width");
   if (ComputedWidth() != aComputedWidth) {
     ComputedWidth() = aComputedWidth;
     LayoutFrameType frameType = mFrame->Type();
     if (frameType != LayoutFrameType::Viewport ||  // Or check GetParent()?
         mWritingMode.IsVertical()) {
       InitResizeFlags(mFrame->PresContext(), frameType);
@@ -320,20 +320,20 @@ void ReflowInput::SetComputedWidth(nscoo
 }
 
 void ReflowInput::SetComputedHeight(nscoord aComputedHeight) {
   NS_ASSERTION(mFrame, "Must have a frame!");
   // It'd be nice to assert that |frame| is not in reflow, but this fails
   // because:
   //
   //    nsFrame::BoxReflow creates a reflow input for its parent.  This reflow
-  //    state is not used to reflow the parent, but just as a parent for the
+  //    input is not used to reflow the parent, but just as a parent for the
   //    frame's own reflow input.  So given a nsBoxFrame inside some non-XUL
   //    (like a text control, for example), we'll end up creating a reflow
-  //    state for the parent while the parent is reflowing.
+  //    input for the parent while the parent is reflowing.
 
   MOZ_ASSERT(aComputedHeight >= 0, "Invalid computed height");
   if (ComputedHeight() != aComputedHeight) {
     ComputedHeight() = aComputedHeight;
     LayoutFrameType frameType = mFrame->Type();
     if (frameType != LayoutFrameType::Viewport || !mWritingMode.IsVertical()) {
       InitResizeFlags(mFrame->PresContext(), frameType);
     }
--- a/layout/generic/ReflowInput.h
+++ b/layout/generic/ReflowInput.h
@@ -908,17 +908,17 @@ struct ReflowInput : public SizeComputat
       SetComputedWidth(aComputedBSize);
     } else {
       SetComputedHeight(aComputedBSize);
     }
   }
 
   void SetComputedBSizeWithoutResettingResizeFlags(nscoord aComputedBSize) {
     // Viewport frames reset the computed block size on a copy of their reflow
-    // state when reflowing fixed-pos kids.  In that case we actually don't
+    // input when reflowing fixed-pos kids.  In that case we actually don't
     // want to mess with the resize flags, because comparing the frame's rect
     // to the munged computed isize is pointless.
     ComputedBSize() = aComputedBSize;
   }
 
   void SetTruncated(const ReflowOutput& aMetrics,
                     nsReflowStatus* aStatus) const;
 
--- a/layout/generic/nsBlockFrame.cpp
+++ b/layout/generic/nsBlockFrame.cpp
@@ -6069,17 +6069,17 @@ void nsBlockFrame::ReflowFloat(BlockRefl
          aAdjustedAvailableSpace.BSize(wm));
 #endif
 
   ReflowInput floatRS(
       aState.mPresContext, aState.mReflowInput, aFloat,
       aAdjustedAvailableSpace.Size(wm).ConvertTo(aFloat->GetWritingMode(), wm));
 
   // Normally the mIsTopOfPage state is copied from the parent reflow
-  // state.  However, when reflowing a float, if we've placed other
+  // input.  However, when reflowing a float, if we've placed other
   // floats that force this float *down* or *narrower*, we should unset
   // the mIsTopOfPage state.
   // FIXME: This is somewhat redundant with the |isAdjacentWithTop|
   // variable below, which has the exact same effect.  Perhaps it should
   // be merged into that, except that the test for narrowing here is not
   // about adjacency with the top, so it seems misleading.
   if (floatRS.mFlags.mIsTopOfPage &&
       (aFloatPushedDown ||
--- a/layout/generic/nsBlockReflowContext.cpp
+++ b/layout/generic/nsBlockReflowContext.cpp
@@ -139,17 +139,17 @@ bool nsBlockReflowContext::ComputeCollap
               *aBlockIsEmpty = false;
             }
             goto done;
           }
           // Here is where we recur. Now that we have determined that a
           // generational collapse is required we need to compute the
           // child blocks margin and so in so that we can look into
           // it. For its margins to be computed we need to have a reflow
-          // state for it.
+          // input for it.
 
           // We may have to construct an extra reflow input here if
           // we drilled down through a block wrapper. At the moment
           // we can only drill down one level so we only have to support
           // one extra reflow input.
           const ReflowInput* outerReflowInput = &aRI;
           if (frame != aRI.mFrame) {
             NS_ASSERTION(frame->GetParent() == aRI.mFrame,
--- a/layout/generic/nsFlexContainerFrame.cpp
+++ b/layout/generic/nsFlexContainerFrame.cpp
@@ -4645,17 +4645,17 @@ void nsFlexContainerFrame::DoFlexLayout(
     for (FlexItem* item = line->GetFirstItem(); item; item = item->getNext()) {
       // The item may already have the correct cross-size; only recalculate
       // if the item's main size resolution (flexing) could have influenced it:
       if (item->CanMainSizeInfluenceCrossSize(aAxisTracker)) {
         Maybe<AutoFlexItemMainSizeOverride> sizeOverride;
         if (item->HasIntrinsicRatio()) {
           // For flex items with an aspect ratio, we have to impose an override
           // for the main-size property *before* we even instantiate the reflow
-          // state, in order for aspect ratio calculations to produce the right
+          // input, in order for aspect ratio calculations to produce the right
           // cross size in the reflow input. (For other flex items, it's OK
           // (and cheaper) to impose our main size *after* the reflow input has
           // been constructed, since the main size shouldn't influence anything
           // about cross-size measurement until we actually reflow the child.)
           sizeOverride.emplace(*item, aAxisTracker);
         }
 
         WritingMode wm = item->Frame()->GetWritingMode();
--- a/layout/tables/nsTableFrame.cpp
+++ b/layout/tables/nsTableFrame.cpp
@@ -1865,17 +1865,17 @@ void nsTableFrame::RequestSpecialBSizeRe
  *    (the cell is the reflow input's mPercentBSizeObserver in this case).
  *    NotifyPercentBSize() calls RequestSpecialBSizeReflow().
  *
  * XXX (jfkthame) This comment appears to be out of date; it refers to
  * methods/flags that are no longer present in the code.
  *
  * 2) After the pass 2 reflow, if the table's NeedToInitiateSpecialReflow(true)
  *    was called, it will do the special bsize reflow, setting the reflow
- *    state's mFlags.mSpecialBSizeReflow to true and mSpecialHeightInitiator to
+ *    input's mFlags.mSpecialBSizeReflow to true and mSpecialHeightInitiator to
  *    itself. It won't do this if IsPrematureSpecialHeightReflow() returns true
  *    because in that case another special bsize reflow will be coming along
  *    with the containing table as the mSpecialHeightInitiator. It is only
  *    relevant to do the reflow when the mSpecialHeightInitiator is the
  *    containing table, because if it is a remote ancestor, then appropriate
  *    bsizes will not be known.
  *
  * 3) Since the bsizes of the table, row groups, rows, and cells was determined