Bug 1543571 Part 1 - Replace "reflow state" with "reflow input". r=dholbert
authorTing-Yu Lin <tlin@mozilla.com>
Thu, 11 Apr 2019 20:27:37 +0000
changeset 469088 4eb0aa21e01d6bda2013268ad041bb772c2238d9
parent 469087 dfe3306614fd22ab41a4a3e5b07609312ae32e79
child 469089 2668dff6a521ac8a02556cd52a956e622686359e
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 1 - Replace "reflow state" with "reflow input". r=dholbert This patch is generated by the following script 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 "reflow state" "reflow input" Differential Revision: https://phabricator.services.mozilla.com/D27022
layout/base/PresShell.cpp
layout/base/RestyleManager.cpp
layout/base/nsLayoutUtils.cpp
layout/generic/BlockReflowInput.cpp
layout/generic/ReflowInput.cpp
layout/generic/ReflowInput.h
layout/generic/ViewportFrame.cpp
layout/generic/nsAbsoluteContainingBlock.h
layout/generic/nsBlockFrame.cpp
layout/generic/nsBlockFrame.h
layout/generic/nsBlockReflowContext.cpp
layout/generic/nsBlockReflowContext.h
layout/generic/nsContainerFrame.cpp
layout/generic/nsFirstLetterFrame.cpp
layout/generic/nsFlexContainerFrame.cpp
layout/generic/nsFlexContainerFrame.h
layout/generic/nsFrame.cpp
layout/generic/nsGridContainerFrame.cpp
layout/generic/nsImageFrame.cpp
layout/generic/nsInlineFrame.cpp
layout/generic/nsInlineFrame.h
layout/generic/nsLineLayout.cpp
layout/generic/nsLineLayout.h
layout/generic/nsRubyBaseContainerFrame.cpp
layout/generic/nsRubyFrame.cpp
layout/generic/nsTextFrame.cpp
layout/svg/nsSVGForeignObjectFrame.cpp
layout/tables/nsTableCellFrame.cpp
layout/tables/nsTableFrame.cpp
layout/tables/nsTableFrame.h
layout/tables/nsTableRowGroupFrame.cpp
layout/tables/nsTableWrapperFrame.cpp
layout/xul/nsBoxFrame.cpp
layout/xul/nsBoxLayoutState.h
layout/xul/nsLeafBoxFrame.cpp
--- a/layout/base/PresShell.cpp
+++ b/layout/base/PresShell.cpp
@@ -9091,17 +9091,17 @@ bool nsIPresShell::DoReflow(nsIFrame* ta
   nsOverflowAreas oldOverflow;  // initialized and used only when !isRoot
   if (!isRoot) {
     oldOverflow = target->GetOverflowAreas();
   }
 
   NS_ASSERTION(!target->GetNextInFlow() && !target->GetPrevInFlow(),
                "reflow roots should never split");
 
-  // Don't pass size directly to the reflow state, since a
+  // Don't pass size directly to the reflow input, since a
   // constrained height implies page/column breaking.
   LogicalSize reflowSize(wm, size.ISize(wm), NS_UNCONSTRAINEDSIZE);
   ReflowInput reflowInput(mPresContext, target, rcx, reflowSize,
                           ReflowInput::CALLER_WILL_INIT);
   reflowInput.mOrthogonalLimit = size.BSize(wm);
 
   if (isRoot) {
     reflowInput.Init(mPresContext);
@@ -9116,38 +9116,38 @@ bool nsIPresShell::DoReflow(nsIFrame* ta
     bool hasUnconstrainedBSize = size.BSize(wm) == NS_UNCONSTRAINEDSIZE;
 
     if (hasUnconstrainedBSize || mLastRootReflowHadUnconstrainedBSize) {
       reflowInput.SetBResize(true);
     }
 
     mLastRootReflowHadUnconstrainedBSize = hasUnconstrainedBSize;
   } else {
-    // Initialize reflow state with current used border and padding,
+    // Initialize reflow input with current used border and padding,
     // in case this was set specially by the parent frame when the reflow root
     // was reflowed by its parent.
     nsMargin currentBorder = target->GetUsedBorder();
     nsMargin currentPadding = target->GetUsedPadding();
     reflowInput.Init(mPresContext, nullptr, &currentBorder, &currentPadding);
   }
 
   // fix the computed height
   NS_ASSERTION(reflowInput.ComputedPhysicalMargin() == nsMargin(0, 0, 0, 0),
-               "reflow state should not set margin for reflow roots");
+               "reflow input should not set margin for reflow roots");
   if (size.BSize(wm) != NS_UNCONSTRAINEDSIZE) {
     nscoord computedBSize =
         size.BSize(wm) -
         reflowInput.ComputedLogicalBorderPadding().BStartEnd(wm);
     computedBSize = std::max(computedBSize, 0);
     reflowInput.SetComputedBSize(computedBSize);
   }
   NS_ASSERTION(reflowInput.ComputedISize() ==
                    size.ISize(wm) -
                        reflowInput.ComputedLogicalBorderPadding().IStartEnd(wm),
-               "reflow state computed incorrect inline size");
+               "reflow input computed incorrect inline size");
 
   mPresContext->ReflowStarted(aInterruptible);
   mIsReflowing = true;
 
   nsReflowStatus status;
   ReflowOutput desiredSize(reflowInput);
   target->Reflow(mPresContext, desiredSize, reflowInput, status);
 
--- a/layout/base/RestyleManager.cpp
+++ b/layout/base/RestyleManager.cpp
@@ -767,25 +767,25 @@ static bool RecomputePosition(nsIFrame* 
 
     if (aFrame->IsInScrollAnchorChain()) {
       ScrollAnchorContainer* container = ScrollAnchorContainer::FindFor(aFrame);
       aFrame->PresShell()->PostPendingScrollAnchorAdjustment(container);
     }
     return true;
   }
 
-  // For the absolute positioning case, set up a fake HTML reflow state for
+  // For the absolute positioning case, set up a fake HTML reflow input for
   // the frame, and then get the offsets and size from it. If the frame's size
   // doesn't need to change, we can simply update the frame position. Otherwise
   // we fall back to a reflow.
   RefPtr<gfxContext> rc =
       aFrame->PresShell()->CreateReferenceRenderingContext();
 
-  // Construct a bogus parent reflow state so that there's a usable
-  // containing block reflow state.
+  // Construct a bogus parent reflow input so that there's a usable
+  // containing block reflow input.
   nsIFrame* parentFrame = aFrame->GetParent();
   WritingMode parentWM = parentFrame->GetWritingMode();
   WritingMode frameWM = aFrame->GetWritingMode();
   LogicalSize parentSize = parentFrame->GetLogicalSize();
 
   nsFrameState savedState = parentFrame->GetStateBits();
   ReflowInput parentReflowInput(aFrame->PresContext(), parentFrame, rc,
                                 parentSize);
--- a/layout/base/nsLayoutUtils.cpp
+++ b/layout/base/nsLayoutUtils.cpp
@@ -4748,17 +4748,17 @@ static bool GetPercentBSize(const Length
   if (!aStyle.HasPercent()) {
     return false;
   }
 
   MOZ_ASSERT(!aStyle.ConvertsToLength(),
              "GetAbsoluteCoord should have handled this");
 
   // During reflow, nsHTMLScrollFrame::ReflowScrolledFrame uses
-  // SetComputedHeight on the reflow state for its child to propagate its
+  // SetComputedHeight on the reflow input for its child to propagate its
   // computed height to the scrolled content. So here we skip to the scroll
   // frame that contains this scrolled content in order to get the same
   // behavior as layout when computing percentage heights.
   nsIFrame* f = aFrame->GetContainingBlock(nsIFrame::SKIP_SCROLLED_FRAME);
   if (!f) {
     MOZ_ASSERT_UNREACHABLE("top of frame tree not a containing block");
     return false;
   }
--- a/layout/generic/BlockReflowInput.cpp
+++ b/layout/generic/BlockReflowInput.cpp
@@ -378,17 +378,17 @@ nsFlowAreaRect BlockReflowInput::GetFloa
  * Reconstruct the vertical margin before the line |aLine| in order to
  * do an incremental reflow that begins with |aLine| without reflowing
  * the line before it.  |aLine| may point to the fencepost at the end of
  * the line list, and it is used this way since we (for now, anyway)
  * always need to recover margins at the end of a block.
  *
  * The reconstruction involves walking backward through the line list to
  * find any collapsed margins preceding the line that would have been in
- * the reflow state's |mPrevBEndMargin| when we reflowed that line in
+ * the reflow input's |mPrevBEndMargin| when we reflowed that line in
  * a full reflow (under the rule in CSS2 that all adjacent vertical
  * margins of blocks collapse).
  */
 void BlockReflowInput::ReconstructMarginBefore(nsLineList::iterator aLine) {
   mPrevBEndMargin.Zero();
   nsBlockFrame* block = mBlock;
 
   nsLineList::iterator firstLine = block->LinesBegin();
--- a/layout/generic/ReflowInput.cpp
+++ b/layout/generic/ReflowInput.cpp
@@ -48,17 +48,17 @@ enum eNormalLineHeightControl {
   eNoExternalLeading = 0,   // does not include external leading
   eIncludeExternalLeading,  // use whatever value font vendor provides
   eCompensateLeading  // compensate leading if leading provided by font vendor
                       // is not enough
 };
 
 static eNormalLineHeightControl sNormalLineHeightControl = eUninitialized;
 
-// Initialize a <b>root</b> reflow state with a rendering context to
+// Initialize a <b>root</b> reflow input with a rendering context to
 // use for measuring things.
 ReflowInput::ReflowInput(nsPresContext* aPresContext, nsIFrame* aFrame,
                          gfxContext* aRenderingContext,
                          const LogicalSize& aAvailableSpace, uint32_t aFlags)
     : SizeComputationInput(aFrame, aRenderingContext),
       // will be setup properly later in InitCBReflowInput
       mCBReflowInput(nullptr),
       mBlockDelta(0),
@@ -172,18 +172,18 @@ SizeComputationInput::SizeComputationInp
     : mFrame(aFrame),
       mRenderingContext(aRenderingContext),
       mWritingMode(aFrame->GetWritingMode()) {
   ReflowInputFlags flags;
   InitOffsets(aContainingBlockWritingMode, aContainingBlockISize,
               mFrame->Type(), flags);
 }
 
-// Initialize a reflow state for a child frame's reflow. Some state
-// is copied from the parent reflow state; the remaining state is
+// Initialize a reflow input for a child frame's reflow. Some state
+// is copied from the parent reflow input; the remaining state is
 // computed.
 ReflowInput::ReflowInput(nsPresContext* aPresContext,
                          const ReflowInput& aParentReflowInput,
                          nsIFrame* aFrame, const LogicalSize& aAvailableSpace,
                          const LogicalSize* aContainingBlockSize,
                          uint32_t aFlags)
     : SizeComputationInput(aFrame, aParentReflowInput.mRenderingContext),
       // will be setup properly later in InitCBReflowInput
@@ -202,17 +202,17 @@ ReflowInput::ReflowInput(nsPresContext* 
              "frame should be clean when getting special bsize reflow");
 
   mParentReflowInput = &aParentReflowInput;
 
   AvailableISize() = aAvailableSpace.ISize(mWritingMode);
   AvailableBSize() = aAvailableSpace.BSize(mWritingMode);
 
   if (mWritingMode.IsOrthogonalTo(aParentReflowInput.GetWritingMode())) {
-    // If we're setting up for an orthogonal flow, and the parent reflow state
+    // If we're setting up for an orthogonal flow, and the parent reflow input
     // had a constrained ComputedBSize, we can use that as our AvailableISize
     // in preference to leaving it unconstrained.
     if (AvailableISize() == NS_UNCONSTRAINEDSIZE &&
         aParentReflowInput.ComputedBSize() != NS_UNCONSTRAINEDSIZE) {
       AvailableISize() = aParentReflowInput.ComputedBSize();
     }
   }
 
@@ -297,19 +297,19 @@ void ReflowInput::SetComputedWidth(nscoo
   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
   //    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 state for its parent.  This reflow
+  // 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
-  //    frame's own reflow state.  So given a nsBoxFrame inside some non-XUL
+  //    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.
 
   MOZ_ASSERT(aComputedWidth >= 0, "Invalid computed width");
   if (ComputedWidth() != aComputedWidth) {
     ComputedWidth() = aComputedWidth;
     LayoutFrameType frameType = mFrame->Type();
     if (frameType != LayoutFrameType::Viewport ||  // Or check GetParent()?
@@ -319,19 +319,19 @@ 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 state for its parent.  This reflow
+  //    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
-  //    frame's own reflow state.  So given a nsBoxFrame inside some non-XUL
+  //    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.
 
   MOZ_ASSERT(aComputedHeight >= 0, "Invalid computed height");
   if (ComputedHeight() != aComputedHeight) {
     ComputedHeight() = aComputedHeight;
     LayoutFrameType frameType = mFrame->Type();
     if (frameType != LayoutFrameType::Viewport || !mWritingMode.IsVertical()) {
@@ -517,17 +517,17 @@ void ReflowInput::InitCBReflowInput() {
       mCBReflowInput = mParentReflowInput;
     }
   } else {
     mCBReflowInput = mParentReflowInput->mCBReflowInput;
   }
 }
 
 /* Check whether CalcQuirkContainingBlockHeight would stop on the
- * given reflow state, using its block as a height.  (essentially
+ * given reflow input, using its block as a height.  (essentially
  * returns false for any case in which CalcQuirkContainingBlockHeight
  * has a "continue" in its main loop.)
  *
  * XXX Maybe refactor CalcQuirkContainingBlockHeight so it uses
  * this function as well
  */
 static bool IsQuirkContainingBlockHeight(const ReflowInput* rs,
                                          LayoutFrameType aFrameType) {
@@ -584,18 +584,18 @@ void ReflowInput::InitResizeFlags(nsPres
 
   if ((mFrame->GetStateBits() & NS_FRAME_FONT_INFLATION_FLOW_ROOT) &&
       nsLayoutUtils::FontSizeInflationEnabled(aPresContext)) {
     // Create our font inflation data if we don't have it already, and
     // give it our current width information.
     bool dirty = nsFontInflationData::UpdateFontInflationDataISizeFor(*this) &&
                  // Avoid running this at the box-to-block interface
                  // (where we shouldn't be inflating anyway, and where
-                 // reflow state construction is probably to construct a
-                 // dummy parent reflow state anyway).
+                 // reflow input construction is probably to construct a
+                 // dummy parent reflow input anyway).
                  !mFlags.mDummyParentReflowInput;
 
     if (dirty || (!mFrame->GetParent() && isIResize)) {
       // When font size inflation is enabled, a change in either:
       //  * the effective width of a font inflation flow root
       //  * the width of the frame
       // needs to cause a dirty reflow since they change the font size
       // inflation calculations, which in turn change the size of text,
@@ -2265,17 +2265,17 @@ void ReflowInput::InitConstraints(nsPres
       }
     } else {
       ComputedBSize() = NS_UNCONSTRAINEDSIZE;
     }
 
     ComputedMinWidth() = ComputedMinHeight() = 0;
     ComputedMaxWidth() = ComputedMaxHeight() = NS_UNCONSTRAINEDSIZE;
   } else {
-    // Get the containing block reflow state
+    // Get the containing block reflow input
     const ReflowInput* cbri = mCBReflowInput;
     MOZ_ASSERT(cbri, "no containing block");
     MOZ_ASSERT(mFrame->GetParent());
 
     // If we weren't given a containing block width and height, then
     // compute one
     LogicalSize cbSize =
         (aContainingBlockSize == LogicalSize(wm, -1, -1))
@@ -2315,17 +2315,17 @@ void ReflowInput::InitConstraints(nsPres
     if (blockSize.HasPercent()) {
       if (NS_AUTOHEIGHT == cbSize.BSize(wm)) {
         // this if clause enables %-blockSize on replaced inline frames,
         // such as images.  See bug 54119.  The else clause "blockSizeUnit =
         // eStyleUnit_Auto;" used to be called exclusively.
         if (NS_FRAME_REPLACED(NS_CSS_FRAME_TYPE_INLINE) == mFrameType ||
             NS_FRAME_REPLACED_CONTAINS_BLOCK(NS_CSS_FRAME_TYPE_INLINE) ==
                 mFrameType) {
-          // Get the containing block reflow state
+          // Get the containing block reflow input
           NS_ASSERTION(nullptr != cbri, "no containing block");
           // in quirks mode, get the cb height using the special quirk method
           if (!wm.IsVertical() &&
               eCompatibility_NavQuirks == aPresContext->CompatibilityMode()) {
             if (!IsTableCell(cbri->mFrame->Type())) {
               cbSize.BSize(wm) = CalcQuirkContainingBlockHeight(cbri);
               if (cbSize.BSize(wm) == NS_AUTOHEIGHT) {
                 isAutoBSize = true;
@@ -2691,17 +2691,17 @@ void SizeComputationInput::InitOffsets(W
 //   = width of containing block
 //
 // Note: the width unit is not auto when this is called
 void ReflowInput::CalculateBlockSideMargins(LayoutFrameType aFrameType) {
   // Calculations here are done in the containing block's writing mode,
   // which is where margins will eventually be applied: we're calculating
   // margins that will be used by the container in its inline direction,
   // which in the case of an orthogonal contained block will correspond to
-  // the block direction of this reflow state. So in the orthogonal-flow
+  // the block direction of this reflow input. So in the orthogonal-flow
   // case, "CalculateBlock*Side*Margins" will actually end up adjusting
   // the BStart/BEnd margins; those are the "sides" of the block from its
   // container's point of view.
   WritingMode cbWM =
       mCBReflowInput ? mCBReflowInput->GetWritingMode() : GetWritingMode();
 
   nscoord availISizeCBWM = AvailableSize(cbWM).ISize(cbWM);
   nscoord computedISizeCBWM = ComputedSize(cbWM).ISize(cbWM);
--- a/layout/generic/ReflowInput.h
+++ b/layout/generic/ReflowInput.h
@@ -36,17 +36,17 @@ NumericType NS_CSS_MINMAX(NumericType aV
                           NumericType aMaxValue) {
   NumericType result = aValue;
   if (aMaxValue < result) result = aMaxValue;
   if (aMinValue > result) result = aMinValue;
   return result;
 }
 
 /**
- * CSS Frame type. Included as part of the reflow state.
+ * CSS Frame type. Included as part of the reflow input.
  */
 typedef uint32_t nsCSSFrameType;
 
 #define NS_CSS_FRAME_TYPE_UNKNOWN 0
 #define NS_CSS_FRAME_TYPE_INLINE 1
 #define NS_CSS_FRAME_TYPE_BLOCK 2 /* block-level in normal flow */
 #define NS_CSS_FRAME_TYPE_FLOATING 3
 #define NS_CSS_FRAME_TYPE_ABSOLUTE 4
@@ -223,17 +223,17 @@ struct SizeComputationInput {
 
     // nsColumnSetFrame is balancing columns
     bool mIsColumnBalancing : 1;
 
     // nsFlexContainerFrame is reflowing this child to measure its intrinsic
     // BSize.
     bool mIsFlexContainerMeasuringBSize : 1;
 
-    // a "fake" reflow state made in order to be the parent of a real one
+    // a "fake" reflow input made in order to be the parent of a real one
     bool mDummyParentReflowInput : 1;
 
     // Should this frame reflow its place-holder children? If the available
     // height of this frame didn't change, but its in a paginated environment
     // (e.g. columns), it should always reflow its placeholder children.
     bool mMustReflowPlaceholders : 1;
 
     // stores the COMPUTE_SIZE_SHRINK_WRAP ctor flag
@@ -345,29 +345,29 @@ struct SizeComputationInput {
  * State passed to a frame during reflow or intrinsic size calculation.
  *
  * XXX Refactor so only a base class (nsSizingState?) is used for intrinsic
  * size calculation.
  *
  * @see nsIFrame#Reflow()
  */
 struct ReflowInput : public SizeComputationInput {
-  // the reflow states are linked together. this is the pointer to the
-  // parent's reflow state
+  // the reflow inputs are linked together. this is the pointer to the
+  // parent's reflow input
   const ReflowInput* mParentReflowInput;
 
   // A non-owning pointer to the float manager associated with this area,
   // which points to the object owned by nsAutoFloatManager::mNew.
   nsFloatManager* mFloatManager;
 
   // LineLayout object (only for inline reflow; set to nullptr otherwise)
   nsLineLayout* mLineLayout;
 
-  // The appropriate reflow state for the containing block (for
-  // percentage widths, etc.) of this reflow state's frame.
+  // The appropriate reflow input for the containing block (for
+  // percentage widths, etc.) of this reflow input's frame.
   const ReflowInput* mCBReflowInput;
 
   // The type of frame, from css's perspective. This value is
   // initialized by the Init method below.
   MOZ_INIT_OUTSIDE_CTOR
   nsCSSFrameType mFrameType;
 
   // The amount the in-flow position of the block is moving vertically relative
@@ -653,17 +653,17 @@ struct ReflowInput : public SizeComputat
   // optimistically assuming that margins collapse to see if clearance
   // is required. When we discover that clearance is required, we
   // store the frame in which clearance was discovered to the location
   // requested here.
   nsIFrame** mDiscoveredClearance;
 
   ReflowInputFlags mFlags;
 
-  // This value keeps track of how deeply nested a given reflow state
+  // This value keeps track of how deeply nested a given reflow input
   // is from the top of the frame tree.
   int16_t mReflowDepth;
 
   // Logical and physical accessors for the resize flags. All users should go
   // via these accessors, so that in due course we can change the storage from
   // physical to logical.
   bool IsHResize() const {
     return mWritingMode.IsVertical() ? mFlags.mIsBResize : mFlags.mIsIResize;
@@ -694,59 +694,59 @@ struct ReflowInput : public SizeComputat
   void SetIResize(bool aValue) { mFlags.mIsIResize = aValue; }
   void SetBResize(bool aValue) { mFlags.mIsBResize = aValue; }
 
   // Note: The copy constructor is written by the compiler automatically. You
   // can use that and then override specific values if you want, or you can
   // call Init as desired...
 
   /**
-   * Initialize a ROOT reflow state.
+   * Initialize a ROOT reflow input.
    *
    * @param aPresContext Must be equal to aFrame->PresContext().
-   * @param aFrame The frame for whose reflow state is being constructed.
+   * @param aFrame The frame for whose reflow input is being constructed.
    * @param aRenderingContext The rendering context to be used for measurements.
    * @param aAvailableSpace See comments for availableHeight and availableWidth
    *        members.
    * @param aFlags A set of flags used for additional boolean parameters (see
    *        below).
    */
   ReflowInput(nsPresContext* aPresContext, nsIFrame* aFrame,
               gfxContext* aRenderingContext,
               const mozilla::LogicalSize& aAvailableSpace, uint32_t aFlags = 0);
 
   /**
-   * Initialize a reflow state for a child frame's reflow. Some parts of the
-   * state are copied from the parent's reflow state. The remainder is computed.
+   * Initialize a reflow input for a child frame's reflow. Some parts of the
+   * state are copied from the parent's reflow input. The remainder is computed.
    *
    * @param aPresContext Must be equal to aFrame->PresContext().
    * @param aParentReflowInput A reference to an ReflowInput object that
    *        is to be the parent of this object.
-   * @param aFrame The frame for whose reflow state is being constructed.
+   * @param aFrame The frame for whose reflow input is being constructed.
    * @param aAvailableSpace See comments for availableHeight and availableWidth
    *        members.
    * @param aContainingBlockSize An optional size, in app units, specifying
    *        the containing block size to use instead of the default which is
    *        to use the aAvailableSpace.
    * @param aFlags A set of flags used for additional boolean parameters (see
    *        below).
    */
   ReflowInput(nsPresContext* aPresContext,
               const ReflowInput& aParentReflowInput, nsIFrame* aFrame,
               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 state is "fake" (see
+    // Indicates that the parent of this reflow input is "fake" (see
     // mDummyParentReflowInput in mFlags).
     DUMMY_PARENT_REFLOW_STATE = (1 << 0),
 
-    // Indicates that the calling function will initialize the reflow state, and
+    // 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),
 
     // The caller wants 'auto' bsize behavior (ComputeSizeFlags::eUseAutoBSize
@@ -773,28 +773,28 @@ struct ReflowInput : public SizeComputat
   // called by the various constructors
   void Init(nsPresContext* aPresContext,
             const mozilla::LogicalSize* aContainingBlockSize = nullptr,
             const nsMargin* aBorder = nullptr,
             const nsMargin* aPadding = nullptr);
 
   /**
    * Find the content isize of our containing block for the given writing mode,
-   * which need not be the same as the reflow state's mode.
+   * which need not be the same as the reflow input's mode.
    */
   nscoord GetContainingBlockContentISize(
       mozilla::WritingMode aWritingMode) const;
 
   /**
    * Calculate the used line-height property. The return value will be >= 0.
    */
   nscoord CalcLineHeight() const;
 
   /**
-   * Same as CalcLineHeight() above, but doesn't need a reflow state.
+   * Same as CalcLineHeight() above, but doesn't need a reflow input.
    *
    * @param aBlockBSize The computed block size of the content rect of the block
    *                     that the line should fill.
    *                     Only used with line-height:-moz-block-height.
    *                     NS_AUTOHEIGHT results in a normal line-height for
    *                     line-height:-moz-block-height.
    * @param aFontSizeInflation The result of the appropriate
    *                           nsLayoutUtils::FontSizeInflationFor call,
--- a/layout/generic/ViewportFrame.cpp
+++ b/layout/generic/ViewportFrame.cpp
@@ -324,17 +324,17 @@ void ViewportFrame::Reflow(nsPresContext
                       // means we should return our child's intrinsic size.
                       aReflowInput.ComputedBSize() != NS_UNCONSTRAINEDSIZE
                           ? aReflowInput.ComputedBSize()
                           : kidBSize);
   aDesiredSize.SetSize(wm, maxSize);
   aDesiredSize.SetOverflowAreasToDesiredBounds();
 
   if (HasAbsolutelyPositionedChildren()) {
-    // Make a copy of the reflow state and change the computed width and height
+    // Make a copy of the reflow input and change the computed width and height
     // to reflect the available space for the fixed items
     ReflowInput reflowInput(aReflowInput);
 
     if (reflowInput.AvailableBSize() == NS_UNCONSTRAINEDSIZE) {
       // We have an intrinsic-height document with abs-pos/fixed-pos children.
       // Set the available height and mComputedHeight to our chosen height.
       reflowInput.AvailableBSize() = maxSize.BSize(wm);
       // Not having border/padding simplifies things
--- a/layout/generic/nsAbsoluteContainingBlock.h
+++ b/layout/generic/nsAbsoluteContainingBlock.h
@@ -117,17 +117,17 @@ class nsAbsoluteContainingBlock {
    * containing block dimension that changed.
    */
   bool FrameDependsOnContainer(nsIFrame* aFrame, bool aCBWidthChanged,
                                bool aCBHeightChanged);
 
   /**
    * After an abspos child's size is known, this method can be used to
    * resolve size-dependent values in the ComputedLogicalOffsets on its
-   * reflow state. (This may involve resolving the inline dimension of
+   * reflow input. (This may involve resolving the inline dimension of
    * aLogicalCBSize, too; hence, that variable is an in/outparam.)
    *
    * aKidSize, aMargin, aOffsets, and aLogicalCBSize are all expected to be
    * represented in terms of the absolute containing block's writing-mode.
    */
   void ResolveSizeDependentOffsets(nsPresContext* aPresContext,
                                    ReflowInput& aKidReflowInput,
                                    const mozilla::LogicalSize& aKidSize,
--- a/layout/generic/nsBlockFrame.cpp
+++ b/layout/generic/nsBlockFrame.cpp
@@ -973,17 +973,17 @@ static bool AvailableSpaceShrunk(Writing
   }
   // Have we shrunk on either side?
   return aNewAvailableSpace.IStart(aWM) > aOldAvailableSpace.IStart(aWM) ||
          aNewAvailableSpace.IEnd(aWM) < aOldAvailableSpace.IEnd(aWM);
 }
 
 static LogicalSize CalculateContainingBlockSizeForAbsolutes(
     WritingMode aWM, const ReflowInput& aReflowInput, LogicalSize aFrameSize) {
-  // The issue here is that for a 'height' of 'auto' the reflow state
+  // The issue here is that for a 'height' of 'auto' the reflow input
   // code won't know how to calculate the containing block height
   // because it's calculated bottom up. So we use our own computed
   // size as the dimensions.
   nsIFrame* frame = aReflowInput.mFrame;
 
   LogicalSize cbSize(aFrameSize);
   // Containing block is relative to the padding edge
   const LogicalMargin& border =
@@ -998,17 +998,17 @@ static LogicalSize CalculateContainingBl
     // canvas frame, whose size is not meaningful here).
     // Use the container's dimensions, if they have been precomputed.
     // XXX This is a hack! We really should be waiting until the outermost
     // frame is fully reflowed and using the resulting dimensions, even
     // if they're intrinsic.
     // In fact we should be attaching absolute children to the outermost
     // frame and not always sticking them in block frames.
 
-    // First, find the reflow state for the outermost frame for this
+    // First, find the reflow input for the outermost frame for this
     // content, except for fieldsets where the inner anonymous frame has
     // the correct padding area with the legend taken into account.
     const ReflowInput* aLastRI = &aReflowInput;
     const ReflowInput* lastButOneRI = &aReflowInput;
     while (aLastRI->mParentReflowInput &&
            aLastRI->mParentReflowInput->mFrame->GetContent() ==
                frame->GetContent() &&
            !aLastRI->mParentReflowInput->mFrame->IsFieldSetFrame()) {
@@ -1026,17 +1026,17 @@ static LogicalSize CalculateContainingBl
             aLastRI->mFrame->PresContext(), aLastRI->mRenderingContext);
         if (!lastButOneRI->mFlags.mAssumingHScrollbar) {
           scrollbars.top = scrollbars.bottom = 0;
         }
         if (!lastButOneRI->mFlags.mAssumingVScrollbar) {
           scrollbars.left = scrollbars.right = 0;
         }
       }
-      // We found a reflow state for the outermost wrapping frame, so use
+      // We found a reflow input for the outermost wrapping frame, so use
       // its computed metrics if available, converted to our writing mode
       WritingMode lastWM = aLastRI->GetWritingMode();
       LogicalSize lastRISize = aLastRI->ComputedSize().ConvertTo(aWM, lastWM);
       LogicalMargin lastRIPadding =
           aLastRI->ComputedLogicalPadding().ConvertTo(aWM, lastWM);
       LogicalMargin logicalScrollbars(aWM, scrollbars);
       if (lastRISize.ISize(aWM) != NS_UNCONSTRAINEDSIZE) {
         cbSize.ISize(aWM) =
@@ -1144,17 +1144,17 @@ void nsBlockFrame::Reflow(nsPresContext*
   // ALWAYS drain overflow. We never want to leave the previnflow's
   // overflow lines hanging around; block reflow depends on the
   // overflow line lists being cleared out between reflow passes.
   DrainOverflowLines();
 
   bool blockStartMarginRoot, blockEndMarginRoot;
   IsMarginRoot(&blockStartMarginRoot, &blockEndMarginRoot);
 
-  // Cache the consumed height in the block reflow state so that we don't have
+  // Cache the consumed height in the block reflow input so that we don't have
   // to continually recompute it.
   BlockReflowInput state(*reflowInput, aPresContext, this, blockStartMarginRoot,
                          blockEndMarginRoot, needFloatManager, consumedBSize);
 
   if (GetStateBits() & NS_BLOCK_NEEDS_BIDI_RESOLUTION)
     static_cast<nsBlockFrame*>(FirstContinuation())->ResolveBidi();
 
   // Handle paginated overflow (see nsContainerFrame.h)
@@ -3188,17 +3188,17 @@ void nsBlockFrame::ReflowBlockFrame(Bloc
     bool clearedFloats = false;
     if (applyBStartMargin) {
       // Precompute the blocks block-start margin value so that we can get the
       // correct available space (there might be a float that's
       // already been placed below the aState.mPrevBEndMargin
 
       // Setup a reflowInput to get the style computed block-start margin
       // value. We'll use a reason of `resize' so that we don't fudge
-      // any incremental reflow state.
+      // any incremental reflow input.
 
       // The availSpace here is irrelevant to our needs - all we want
       // out if this setup is the block-start margin value which doesn't depend
       // on the childs available space.
       // XXX building a complete ReflowInput just to get the block-start
       // margin seems like a waste. And we do this for almost every block!
       WritingMode wm = frame->GetWritingMode();
       LogicalSize availSpace = aState.ContentSize(wm);
@@ -3332,17 +3332,17 @@ void nsBlockFrame::ReflowBlockFrame(Bloc
     // Now put the block-dir coordinate back to the start of the
     // block-start-margin + clearance.
     aState.mBCoord -= bStartMargin;
     availSpace.BStart(wm) -= bStartMargin;
     if (NS_UNCONSTRAINEDSIZE != availSpace.BSize(wm)) {
       availSpace.BSize(wm) += bStartMargin;
     }
 
-    // construct the html reflow state for the block. ReflowBlock
+    // construct the html reflow input for the block. ReflowBlock
     // will initialize it.
     Maybe<ReflowInput> blockHtmlRI;
     blockHtmlRI.emplace(
         aState.mPresContext, aState.mReflowInput, frame,
         availSpace.Size(wm).ConvertTo(frame->GetWritingMode(), wm));
 
     nsFloatManager::SavedState floatManagerState;
     nsReflowStatus frameReflowStatus;
--- a/layout/generic/nsBlockFrame.h
+++ b/layout/generic/nsBlockFrame.h
@@ -668,17 +668,17 @@ class nsBlockFrame : public nsContainerF
   void MarkLineDirtyForInterrupt(nsLineBox* aLine);
 
   //----------------------------------------
   // Methods for line reflow
   /**
    * Reflow a line.
    *
    * @param aState
-   *   the current reflow state
+   *   the current reflow input
    * @param aLine
    *   the line to reflow.  can contain a single block frame or contain 1 or
    *   more inline frames.
    * @param aKeepReflowGoing [OUT]
    *   indicates whether the caller should continue to reflow more lines
    */
   void ReflowLine(BlockReflowInput& aState, LineIterator aLine,
                   bool* aKeepReflowGoing);
@@ -759,17 +759,17 @@ class nsBlockFrame : public nsContainerF
                    bool aFloatPushedDown, nsReflowStatus& aReflowStatus);
 
   //----------------------------------------
   // Methods for pushing/pulling lines/frames
 
   /**
    * Create a next-in-flow, if necessary, for aFrame. If a new frame is
    * created, place it in aLine if aLine is not null.
-   * @param aState the block reflow state
+   * @param aState the block reflow input
    * @param aLine where to put a new frame
    * @param aFrame the frame
    * @return true if a new frame was created, false if not
    */
   bool CreateContinuationFor(BlockReflowInput& aState, nsLineBox* aLine,
                              nsIFrame* aFrame);
 
   /**
--- a/layout/generic/nsBlockReflowContext.cpp
+++ b/layout/generic/nsBlockReflowContext.cpp
@@ -141,20 +141,20 @@ bool nsBlockReflowContext::ComputeCollap
             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.
 
-          // We may have to construct an extra reflow state here if
+          // 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 state.
+          // one extra reflow input.
           const ReflowInput* outerReflowInput = &aRI;
           if (frame != aRI.mFrame) {
             NS_ASSERTION(frame->GetParent() == aRI.mFrame,
                          "Can only drill through one level of block wrapper");
             LogicalSize availSpace = aRI.ComputedSize(frame->GetWritingMode());
             outerReflowInput =
                 new ReflowInput(prescontext, aRI, frame, availSpace);
           }
--- a/layout/generic/nsBlockReflowContext.h
+++ b/layout/generic/nsBlockReflowContext.h
@@ -46,17 +46,17 @@ class nsBlockReflowContext {
   nsCollapsingMargin& GetCarriedOutBEndMargin() {
     return mMetrics.mCarriedOutBEndMargin;
   }
 
   const ReflowOutput& GetMetrics() const { return mMetrics; }
 
   /**
    * Computes the collapsed block-start margin (in the context's parent's
-   * writing mode) for a block whose reflow state is in aRI.
+   * writing mode) for a block whose reflow input is in aRI.
    * The computed margin is added into aMargin, whose writing mode is the
    * parent's mode as found in mMetrics.GetWritingMode(); note this may not be
    * the block's own writing mode as found in aRI.
    * If aClearanceFrame is null then this is the first optimistic pass which
    * shall assume that no frames have clearance, and we clear the HasClearance
    * on all frames encountered.
    * If non-null, this is the second pass and the caller has decided
    * aClearanceFrame needs clearance (and we will therefore stop collapsing
--- a/layout/generic/nsContainerFrame.cpp
+++ b/layout/generic/nsContainerFrame.cpp
@@ -865,17 +865,17 @@ LogicalSize nsContainerFrame::ComputeAut
 }
 
 void nsContainerFrame::ReflowChild(
     nsIFrame* aKidFrame, nsPresContext* aPresContext,
     ReflowOutput& aDesiredSize, const ReflowInput& aReflowInput,
     const WritingMode& aWM, const LogicalPoint& aPos,
     const nsSize& aContainerSize, uint32_t aFlags, nsReflowStatus& aStatus,
     nsOverflowContinuationTracker* aTracker) {
-  MOZ_ASSERT(aReflowInput.mFrame == aKidFrame, "bad reflow state");
+  MOZ_ASSERT(aReflowInput.mFrame == aKidFrame, "bad reflow input");
   if (aWM.IsVerticalRL() || (!aWM.IsVertical() && !aWM.IsBidiLTR())) {
     NS_ASSERTION(aContainerSize.width != NS_UNCONSTRAINEDSIZE,
                  "ReflowChild with unconstrained container width!");
   }
   MOZ_ASSERT(aDesiredSize.VisualOverflow() == nsRect(0, 0, 0, 0) &&
                  aDesiredSize.ScrollableOverflow() == nsRect(0, 0, 0, 0),
              "please reset the overflow areas before calling ReflowChild");
 
@@ -911,17 +911,17 @@ void nsContainerFrame::ReflowChild(
 //    ReflowChild so that we can convert callers incrementally.
 void nsContainerFrame::ReflowChild(nsIFrame* aKidFrame,
                                    nsPresContext* aPresContext,
                                    ReflowOutput& aDesiredSize,
                                    const ReflowInput& aReflowInput, nscoord aX,
                                    nscoord aY, uint32_t aFlags,
                                    nsReflowStatus& aStatus,
                                    nsOverflowContinuationTracker* aTracker) {
-  MOZ_ASSERT(aReflowInput.mFrame == aKidFrame, "bad reflow state");
+  MOZ_ASSERT(aReflowInput.mFrame == aKidFrame, "bad reflow input");
 
   // Position the child frame and its view if requested.
   if (NS_FRAME_NO_MOVE_FRAME != (aFlags & NS_FRAME_NO_MOVE_FRAME)) {
     aKidFrame->SetPosition(nsPoint(aX, aY));
   }
 
   if (0 == (aFlags & NS_FRAME_NO_MOVE_VIEW)) {
     PositionFrameView(aKidFrame);
--- a/layout/generic/nsFirstLetterFrame.cpp
+++ b/layout/generic/nsFirstLetterFrame.cpp
@@ -148,17 +148,17 @@ void nsFirstLetterFrame::Reflow(nsPresCo
   MOZ_ASSERT(aReflowStatus.IsEmpty(),
              "Caller should pass a fresh reflow status!");
 
   // Grab overflow list
   DrainOverflowFrames(aPresContext);
 
   nsIFrame* kid = mFrames.FirstChild();
 
-  // Setup reflow state for our child
+  // Setup reflow input for our child
   WritingMode wm = aReflowInput.GetWritingMode();
   LogicalSize availSize = aReflowInput.AvailableSize();
   const LogicalMargin& bp = aReflowInput.ComputedLogicalBorderPadding();
   NS_ASSERTION(availSize.ISize(wm) != NS_UNCONSTRAINEDSIZE,
                "should no longer use unconstrained inline size");
   availSize.ISize(wm) -= bp.IStartEnd(wm);
   if (NS_UNCONSTRAINEDSIZE != availSize.BSize(wm)) {
     availSize.BSize(wm) -= bp.BStartEnd(wm);
--- a/layout/generic/nsFlexContainerFrame.cpp
+++ b/layout/generic/nsFlexContainerFrame.cpp
@@ -1262,19 +1262,19 @@ uint16_t nsFlexContainerFrame::CSSAlignm
 
   return (alignment | alignmentFlags);
 }
 
 UniquePtr<FlexItem> nsFlexContainerFrame::GenerateFlexItemForChild(
     nsPresContext* aPresContext, nsIFrame* aChildFrame,
     const ReflowInput& aParentReflowInput,
     const FlexboxAxisTracker& aAxisTracker) {
-  // Create temporary reflow state just for sizing -- to get hypothetical
+  // Create temporary reflow input just for sizing -- to get hypothetical
   // main-size and the computed values of min / max main-size property.
-  // (This reflow state will _not_ be used for reflow.)
+  // (This reflow input will _not_ be used for reflow.)
   ReflowInput childRI(
       aPresContext, aParentReflowInput, aChildFrame,
       aParentReflowInput.ComputedSize(aChildFrame->GetWritingMode()));
 
   // FLEX GROW & SHRINK WEIGHTS
   // --------------------------
   float flexGrow, flexShrink;
   if (IsLegacyBox(this)) {
@@ -1297,17 +1297,17 @@ UniquePtr<FlexItem> nsFlexContainerFrame
   nscoord mainMaxSize = GET_MAIN_COMPONENT_LOGICAL(aAxisTracker, childWM,
                                                    childRI.ComputedMaxISize(),
                                                    childRI.ComputedMaxBSize());
   // This is enforced by the ReflowInput where these values come from:
   MOZ_ASSERT(mainMinSize <= mainMaxSize, "min size is larger than max size");
 
   // CROSS SIZES (tentative cross size, min/max cross size)
   // ------------------------------------------------------
-  // Grab the cross size from the reflow state. This might be the right value,
+  // Grab the cross size from the reflow input. This might be the right value,
   // or we might resolve it to something else in SizeItemInCrossAxis(); hence,
   // it's tentative. See comment under "Cross Size Determination" for more.
   nscoord tentativeCrossSize = GET_CROSS_COMPONENT_LOGICAL(
       aAxisTracker, childWM, childRI.ComputedISize(), childRI.ComputedBSize());
   nscoord crossMinSize = GET_CROSS_COMPONENT_LOGICAL(
       aAxisTracker, childWM, childRI.ComputedMinISize(),
       childRI.ComputedMinBSize());
   nscoord crossMaxSize = GET_CROSS_COMPONENT_LOGICAL(
@@ -1579,17 +1579,17 @@ void nsFlexContainerFrame::ResolveAutoFl
   // BEFORE WE DO THAT, we need let the item "pre-stretch" its cross size (if
   // it's got 'align-self:stretch'), for a certain case where the spec says
   // the stretched cross size is considered "definite". That case is if we
   // have a single-line (nowrap) flex container which itself has a definite
   // cross-size.  Otherwise, we'll wait to do stretching, since (in other
   // cases) we don't know how much the item should stretch yet.
   const ReflowInput* flexContainerRI = aItemReflowInput.mParentReflowInput;
   MOZ_ASSERT(flexContainerRI,
-             "flex item's reflow state should have ptr to container's state");
+             "flex item's reflow input should have ptr to container's state");
   if (NS_STYLE_FLEX_WRAP_NOWRAP == flexContainerRI->mStylePosition->mFlexWrap) {
     // XXXdholbert Maybe this should share logic with ComputeCrossSize()...
     // Alternately, maybe tentative container cross size should be passed down.
     nscoord containerCrossSize = GET_CROSS_COMPONENT_LOGICAL(
         aAxisTracker, aAxisTracker.GetWritingMode(),
         flexContainerRI->ComputedISize(), flexContainerRI->ComputedBSize());
     // Is container's cross size "definite"?
     // - If it's column-oriented, then "yes", because its cross size is its
@@ -1635,17 +1635,17 @@ void nsFlexContainerFrame::ResolveAutoFl
     if (aFlexItem.IsInlineAxisMainAxis()) {
       if (minSizeNeedsToMeasureContent) {
         nscoord frameMinISize =
             aFlexItem.Frame()->GetMinISize(aItemReflowInput.mRenderingContext);
         resolvedMinSize = std::min(resolvedMinSize, frameMinISize);
       }
       NS_ASSERTION(!flexBasisNeedsToMeasureContent,
                    "flex-basis:auto should have been resolved in the "
-                   "reflow state, for horizontal flexbox. It shouldn't need "
+                   "reflow input, for horizontal flexbox. It shouldn't need "
                    "special handling here");
     } else {
       // If this item is flexible (in its block axis)...
       // OR if we're measuring its 'auto' min-BSize, with its main-size (in its
       // block axis) being something non-"auto"...
       // THEN: we assume that the computed BSize that we're reflowing with now
       // could be different from the one we'll use for this flex item's
       // "actual" reflow later on.  In that case, we need to be sure the flex
@@ -1824,17 +1824,17 @@ void nsFlexContainerFrame::MarkIntrinsic
 
   nsContainerFrame::MarkIntrinsicISizesDirty();
 }
 
 nscoord nsFlexContainerFrame::MeasureFlexItemContentBSize(
     nsPresContext* aPresContext, FlexItem& aFlexItem,
     bool aForceBResizeForMeasuringReflow,
     const ReflowInput& aParentReflowInput) {
-  // Set up a reflow state for measuring the flex item's auto-height:
+  // Set up a reflow input for measuring the flex item's auto-height:
   WritingMode wm = aFlexItem.Frame()->GetWritingMode();
   LogicalSize availSize = aParentReflowInput.ComputedSize(wm);
   availSize.BSize(wm) = NS_UNCONSTRAINEDSIZE;
   ReflowInput childRIForMeasuringBSize(aPresContext, aParentReflowInput,
                                        aFlexItem.Frame(), availSize, nullptr,
                                        ReflowInput::CALLER_WILL_INIT);
   childRIForMeasuringBSize.mFlags.mIsFlexContainerMeasuringBSize = true;
   childRIForMeasuringBSize.Init(aPresContext);
@@ -3352,17 +3352,17 @@ void FlexItem::ResolveStretchedCrossSize
   // Reserve space for margins & border & padding, and then use whatever
   // remains as our item's cross-size (clamped to its min/max range).
   nscoord stretchedSize =
       aLineCrossSize - GetMarginBorderPaddingSizeInAxis(crossAxis);
 
   stretchedSize = NS_CSS_MINMAX(stretchedSize, mCrossMinSize, mCrossMaxSize);
 
   // Update the cross-size & make a note that it's stretched, so we know to
-  // override the reflow state's computed cross-size in our final reflow.
+  // override the reflow input's computed cross-size in our final reflow.
   SetCrossSize(stretchedSize);
   mIsStretched = true;
 }
 
 void SingleLineCrossAxisPositionTracker::ResolveAutoMarginsInCrossAxis(
     const FlexLine& aLine, FlexItem& aItem) {
   // Subtract the space that our item is already occupying, to see how much
   // space (if any) is available for its auto margins.
@@ -3876,17 +3876,17 @@ void nsFlexContainerFrame::GenerateFlexL
         childFrame->StyleDisplay()->BreakAfter()) {
       curLine = AddNewFlexLineToList(aLines, shouldInsertAtFront, aMainGapSize);
     }
     itemIdxInContainer++;
   }
 }
 
 // Retrieves the content-box main-size of our flex container from the
-// reflow state (specifically, the main-size of *this continuation* of the
+// reflow input (specifically, the main-size of *this continuation* of the
 // flex container).
 nscoord nsFlexContainerFrame::GetMainSizeFromReflowInput(
     const ReflowInput& aReflowInput, const FlexboxAxisTracker& aAxisTracker) {
   if (aAxisTracker.IsRowOriented()) {
     // Row-oriented --> our main axis is the inline axis, so our main size
     // is our inline size (which should already be resolved).
     NS_WARNING_ASSERTION(
         aReflowInput.ComputedISize() != NS_UNCONSTRAINEDSIZE,
@@ -3928,27 +3928,27 @@ static bool FrameHasRelativeBSizeDepende
       }
     }
   }
   return false;
 }
 
 /* Resolves the content-box main-size of a flex container frame,
  * primarily based on:
- * - the "tentative" main size, taken from the reflow state ("tentative"
+ * - the "tentative" main size, taken from the reflow input ("tentative"
  *    because it may be unconstrained or may run off the page).
  * - the available BSize (needed if the main axis is the block axis).
  * - the sizes of our lines of flex items.
  *
  * Guaranteed to return a definite length, i.e. not NS_UNCONSTRAINEDSIZE,
  * aside from cases with huge lengths which happen to compute to that value.
  *
  * (Note: This function should be structurally similar to 'ComputeCrossSize()',
  * except that here, the caller has already grabbed the tentative size from the
- * reflow state.)
+ * reflow input.)
  */
 static nscoord ResolveFlexContainerMainSize(
     const ReflowInput& aReflowInput, const FlexboxAxisTracker& aAxisTracker,
     nscoord aTentativeMainSize, nscoord aAvailableBSizeForContent,
     const FlexLine* aFirstLine, nsReflowStatus& aStatus) {
   MOZ_ASSERT(aFirstLine, "null first line pointer");
 
   if (aAxisTracker.IsRowOriented()) {
@@ -3958,17 +3958,17 @@ static nscoord ResolveFlexContainerMainS
   }
 
   if (aTentativeMainSize != NS_INTRINSICSIZE) {
     // Column-oriented case, with fixed BSize:
     if (aAvailableBSizeForContent == NS_UNCONSTRAINEDSIZE ||
         aTentativeMainSize < aAvailableBSizeForContent) {
       // Not in a fragmenting context, OR no need to fragment because we have
       // more available BSize than we need. Either way, we don't need to clamp.
-      // (Note that the reflow state has already done the appropriate
+      // (Note that the reflow input has already done the appropriate
       // min/max-BSize clamping.)
       return aTentativeMainSize;
     }
 
     // Fragmenting *and* our fixed BSize is larger than available BSize:
     // Mark incomplete so we get a next-in-flow, and take up all of the
     // available BSize (or the amount of BSize required by our children, if
     // that's larger; but of course not more than our own computed BSize).
@@ -4019,17 +4019,17 @@ nscoord nsFlexContainerFrame::ComputeCro
   nscoord effectiveComputedBSize = GetEffectiveComputedBSize(aReflowInput);
   if (effectiveComputedBSize != NS_INTRINSICSIZE) {
     // Row-oriented case (cross axis is block-axis), with fixed BSize:
     *aIsDefinite = true;
     if (aAvailableBSizeForContent == NS_UNCONSTRAINEDSIZE ||
         effectiveComputedBSize < aAvailableBSizeForContent) {
       // Not in a fragmenting context, OR no need to fragment because we have
       // more available BSize than we need. Either way, just use our fixed
-      // BSize.  (Note that the reflow state has already done the appropriate
+      // BSize.  (Note that the reflow input has already done the appropriate
       // min/max-BSize clamping.)
       return effectiveComputedBSize;
     }
 
     // Fragmenting *and* our fixed BSize is too tall for available BSize:
     // Mark incomplete so we get a next-in-flow, and take up all of the
     // available BSize (or the amount of BSize required by our children, if
     // that's larger; but of course not more than our own computed BSize).
@@ -4101,17 +4101,17 @@ static nscoord ComputePhysicalAscentFrom
          PhysicalCoordFromFlexRelativeCoord(aFlexRelativeAscent,
                                             aContentBoxCrossSize,
                                             aAxisTracker.GetCrossAxis());
 }
 
 void nsFlexContainerFrame::SizeItemInCrossAxis(
     nsPresContext* aPresContext, const FlexboxAxisTracker& aAxisTracker,
     ReflowInput& aChildReflowInput, FlexItem& aItem) {
-  // If cross axis is the item's inline axis, just use ISize from reflow state,
+  // If cross axis is the item's inline axis, just use ISize from reflow input,
   // and don't bother with a full reflow.
   if (aItem.IsInlineAxisCrossAxis()) {
     aItem.SetCrossSize(aChildReflowInput.ComputedISize());
     return;
   }
 
   MOZ_ASSERT(!aItem.HadMeasuringReflow(),
              "We shouldn't need more than one measuring reflow");
@@ -4298,17 +4298,17 @@ void nsFlexContainerFrame::Reflow(nsPres
   }
 }
 
 // Class to let us temporarily provide an override value for the the main-size
 // CSS property ('width' or 'height') on a flex item, for use in
 // nsFrame::ComputeSizeWithIntrinsicDimensions.
 // (We could use this overridden size more broadly, too, but it's probably
 // better to avoid property-table accesses.  So, where possible, we communicate
-// the resolved main-size to the child via modifying its reflow state directly,
+// the resolved main-size to the child via modifying its reflow input directly,
 // instead of using this class.)
 class MOZ_RAII AutoFlexItemMainSizeOverride final {
  public:
   explicit AutoFlexItemMainSizeOverride(FlexItem& aItem,
                                         const FlexboxAxisTracker& aAxisTracker
                                             MOZ_GUARD_OBJECT_NOTIFIER_PARAM)
       : mItemFrame(aItem.Frame()) {
     MOZ_GUARD_OBJECT_NOTIFIER_INIT;
@@ -4646,30 +4646,30 @@ void nsFlexContainerFrame::DoFlexLayout(
       // 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
-          // cross size in the reflow state. (For other flex items, it's OK
-          // (and cheaper) to impose our main size *after* the reflow state has
+          // 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();
         LogicalSize availSize = aReflowInput.ComputedSize(wm);
         availSize.BSize(wm) = NS_UNCONSTRAINEDSIZE;
         ReflowInput childReflowInput(aPresContext, aReflowInput, item->Frame(),
                                      availSize);
         if (!sizeOverride) {
-          // Directly override the computed main-size, by tweaking reflow state:
+          // Directly override the computed main-size, by tweaking reflow input:
           if (item->IsInlineAxisMainAxis()) {
             childReflowInput.SetComputedISize(item->GetMainSize());
           } else {
             childReflowInput.SetComputedBSize(item->GetMainSize());
           }
         }
 
         SizeItemInCrossAxis(aPresContext, aAxisTracker, childReflowInput,
@@ -5053,21 +5053,21 @@ void nsFlexContainerFrame::ReflowFlexIte
   if (aItem.IsInlineAxisMainAxis()) {
     childReflowInput.SetComputedISize(aItem.GetMainSize());
     didOverrideComputedISize = true;
   } else {
     childReflowInput.SetComputedBSize(aItem.GetMainSize());
     didOverrideComputedBSize = true;
   }
 
-  // Override reflow state's computed cross-size if either:
+  // Override reflow input's computed cross-size if either:
   // - the item was stretched (in which case we're imposing a cross size)
   // ...or...
   // - the item it has an aspect ratio (in which case the cross-size that's
-  // currently in the reflow state is based on arithmetic involving a stale
+  // currently in the reflow input is based on arithmetic involving a stale
   // main-size value that we just stomped on above). (Note that we could handle
   // this case using an AutoFlexItemMainSizeOverride, as we do elsewhere; but
   // given that we *already know* the correct cross size to use here, it's
   // cheaper to just directly set it instead of setting a frame property.)
   if (aItem.IsStretched() || aItem.HasIntrinsicRatio()) {
     if (aItem.IsInlineAxisCrossAxis()) {
       childReflowInput.SetComputedISize(aItem.GetCrossSize());
       didOverrideComputedISize = true;
--- a/layout/generic/nsFlexContainerFrame.h
+++ b/layout/generic/nsFlexContainerFrame.h
@@ -376,34 +376,34 @@ class nsFlexContainerFrame final : publi
   /**
    * Moves the given flex item's frame to the given LogicalPosition (modulo any
    * relative positioning).
    *
    * This can be used in cases where we've already done a "measuring reflow"
    * for the flex item at the correct size, and hence can skip its final reflow
    * (but still need to move it to the right final position).
    *
-   * @param aReflowInput    The flex container's reflow state.
+   * @param aReflowInput    The flex container's reflow input.
    * @param aItem           The flex item whose frame should be moved.
    * @param aFramePos       The position where the flex item's frame should
    *                        be placed. (pre-relative positioning)
    * @param aContainerSize  The flex container's size (required by some methods
    *                        that we call, to interpret aFramePos correctly).
    */
   void MoveFlexItemToFinalPosition(const ReflowInput& aReflowInput,
                                    const FlexItem& aItem,
                                    mozilla::LogicalPoint& aFramePos,
                                    const nsSize& aContainerSize);
   /**
    * Helper-function to reflow a child frame, at its final position determined
    * by flex layout.
    *
    * @param aPresContext    The presentation context being used in reflow.
    * @param aAxisTracker    A FlexboxAxisTracker with the flex container's axes.
-   * @param aReflowInput    The flex container's reflow state.
+   * @param aReflowInput    The flex container's reflow input.
    * @param aItem           The flex item to be reflowed.
    * @param aFramePos       The position where the flex item's frame should
    *                        be placed. (pre-relative positioning)
    * @param aContainerSize  The flex container's size (required by some methods
    *                        that we call, to interpret aFramePos correctly).
    */
   void ReflowFlexItem(nsPresContext* aPresContext,
                       const FlexboxAxisTracker& aAxisTracker,
--- a/layout/generic/nsFrame.cpp
+++ b/layout/generic/nsFrame.cpp
@@ -10173,20 +10173,20 @@ void nsFrame::BoxReflow(nsBoxLayoutState
       needsReflow = true;
     }
   }
 
   // ok now reflow the child into the spacers calculated space
   if (needsReflow) {
     aDesiredSize.ClearSize();
 
-    // create a reflow state to tell our child to flow at the given size.
-
-    // Construct a bogus parent reflow state so that there's a usable
-    // containing block reflow state.
+    // create a reflow input to tell our child to flow at the given size.
+
+    // Construct a bogus parent reflow input so that there's a usable
+    // containing block reflow input.
     nsMargin margin(0, 0, 0, 0);
     GetXULMargin(margin);
 
     nsSize parentSize(aWidth, aHeight);
     if (parentSize.height != NS_INTRINSICSIZE)
       parentSize.height += margin.TopBottom();
     if (parentSize.width != NS_INTRINSICSIZE)
       parentSize.width += margin.LeftRight();
@@ -10214,25 +10214,25 @@ void nsFrame::BoxReflow(nsBoxLayoutState
     // messes up dimensions.
     const ReflowInput* outerReflowInput = aState.OuterReflowInput();
     NS_ASSERTION(!outerReflowInput || outerReflowInput->mFrame != this,
                  "in and out of XUL on a single frame?");
     const ReflowInput* parentRI;
     if (outerReflowInput && outerReflowInput->mFrame == parentFrame) {
       // We're a frame (such as a text control frame) that jumps into
       // box reflow and then straight out of it on the child frame.
-      // This means we actually have a real parent reflow state.
+      // This means we actually have a real parent reflow input.
       // nsLayoutUtils::InflationMinFontSizeFor used to need this to be
       // linked up correctly for text control frames, so do so here).
       parentRI = outerReflowInput;
     } else {
       parentRI = &parentReflowInput;
     }
 
-    // XXX Is it OK that this reflow state has only one ancestor?
+    // 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);
 
     // XXX_jwir3: This is somewhat fishy. If this is actually changing the value
@@ -11710,17 +11710,17 @@ void DR_State::FindMatchingRule(DR_Frame
         break;
       }
     }
   }
 }
 
 DR_FrameTreeNode* DR_State::CreateTreeNode(nsIFrame* aFrame,
                                            const ReflowInput* aReflowInput) {
-  // find the frame of the parent reflow state (usually just the parent of
+  // find the frame of the parent reflow input (usually just the parent of
   // aFrame)
   nsIFrame* parentFrame;
   if (aReflowInput) {
     const ReflowInput* parentRI = aReflowInput->mParentReflowInput;
     parentFrame = (parentRI) ? parentRI->mFrame : nullptr;
   } else {
     parentFrame = aFrame->GetParent();
   }
--- a/layout/generic/nsGridContainerFrame.cpp
+++ b/layout/generic/nsGridContainerFrame.cpp
@@ -1695,17 +1695,17 @@ struct nsGridContainerFrame::Tracks {
  * Grid data shared by all continuations, owned by the first-in-flow.
  * The data is initialized from the first-in-flow's GridReflowInput at
  * the end of its reflow.  Fragmentation will modify mRows.mSizes -
  * the mPosition to remove the row gap at the break boundary, the mState
  * by setting the eBreakBefore flag, and mBase is modified when we decide
  * to grow a row.  mOriginalRowData is setup by the first-in-flow and
  * not modified after that.  It's used for undoing the changes to mRows.
  * mCols, mGridItems, mAbsPosItems are used for initializing the grid
- * reflow state for continuations, see GridReflowInput::Initialize below.
+ * reflow input for continuations, see GridReflowInput::Initialize below.
  */
 struct nsGridContainerFrame::SharedGridData {
   SharedGridData()
       : mCols(eLogicalAxisInline),
         mRows(eLogicalAxisBlock),
         mGenerateComputedGridInfo(false) {}
   Tracks mCols;
   Tracks mRows;
@@ -1884,17 +1884,17 @@ struct MOZ_STACK_CLASS nsGridContainerFr
   nsTArray<GridItemInfo> mGridItems;
   /**
    * Info about each grid-aligned abs.pos. child.
    */
   nsTArray<GridItemInfo> mAbsPosItems;
 
   /**
    * @note mReflowInput may be null when using the 2nd ctor above. In this case
-   * we'll construct a dummy parent reflow state if we need it to calculate
+   * we'll construct a dummy parent reflow input if we need it to calculate
    * min/max-content contributions when sizing tracks.
    */
   const ReflowInput* const mReflowInput;
   gfxContext& mRenderingContext;
   nsGridContainerFrame* const mFrame;
   SharedGridData* mSharedGridData;  // [weak] owned by mFrame's first-in-flow.
   /** Computed border+padding with mSkipSides applied. */
   LogicalMargin mBorderPadding;
@@ -4657,17 +4657,17 @@ LogicalRect nsGridContainerFrame::GridRe
                                            &iSize);
   aArea.mRows.ToPositionAndLengthForAbsPos(mRows, aGridOrigin.B(mWM), &b,
                                            &bSize);
   return LogicalRect(mWM, i, b, iSize, bSize);
 }
 
 /**
  * Return a Fragmentainer object if we have a fragmentainer frame in our
- * ancestor chain of containing block (CB) reflow states.  We'll only
+ * ancestor chain of containing block (CB) reflow inputs.  We'll only
  * continue traversing the ancestor chain as long as the CBs have
  * the same writing-mode and have overflow:visible.
  */
 Maybe<nsGridContainerFrame::Fragmentainer>
 nsGridContainerFrame::GetNearestFragmentainer(
     const GridReflowInput& aState) const {
   Maybe<nsGridContainerFrame::Fragmentainer> data;
   const ReflowInput* gridRI = aState.mReflowInput;
@@ -5200,17 +5200,17 @@ nscoord nsGridContainerFrame::ReflowRows
           }
           maxRowSize -= sz.mPosition;
           // ...and only if there is space for it to grow.
           rowCanGrow = maxRowSize > sz.mBase;
         }
       }
     }
 
-    // aFragmentainer.mIsTopOfPage is propagated to the child reflow state.
+    // aFragmentainer.mIsTopOfPage is propagated to the child reflow input.
     // When it's false the child may request InlineBreak::Before.  We set it
     // to false when the row is growable (as determined in the CSS Grid
     // Fragmentation spec) and there is a non-zero space between it and the
     // fragmentainer end (that can be used to grow it).  If the child reports
     // a forced break in this case, we grow this row to fill the fragment and
     // restart the loop.  We also restart the loop with |aEndRow = row|
     // (but without growing any row) for a InlineBreak::Before child if it spans
     // beyond the last row in this fragment.  This is to avoid fragmenting it.
--- a/layout/generic/nsImageFrame.cpp
+++ b/layout/generic/nsImageFrame.cpp
@@ -109,17 +109,17 @@ StaticRefPtr<nsImageFrame::IconLoad> nsI
 
 // cached IO service for loading icons
 nsIIOService* nsImageFrame::sIOService;
 
 // test if the width and height are fixed, looking at the style data
 // This is used by nsImageFrame::ShouldCreateImageFrameFor and should
 // not be used for layout decisions.
 static bool HaveSpecifiedSize(const nsStylePosition* aStylePosition) {
-  // check the width and height values in the reflow state's style struct
+  // check the width and height values in the reflow input's style struct
   // - if width and height are specified as either coord or percentage, then
   //   the size of the image frame is constrained
   return aStylePosition->mWidth.IsLengthPercentage() &&
          aStylePosition->mHeight.IsLengthPercentage();
 }
 
 // Decide whether we can optimize away reflows that result from the
 // image's intrinsic size changing.
--- a/layout/generic/nsInlineFrame.cpp
+++ b/layout/generic/nsInlineFrame.cpp
@@ -341,17 +341,17 @@ void nsInlineFrame::Reflow(nsPresContext
     NS_ASSERTION(!overflowFrames || overflowFrames->IsEmpty(),
                  "overflow list is not empty for initial reflow");
   }
 #endif
   if (!(GetStateBits() & NS_FRAME_FIRST_REFLOW)) {
     DrainSelfOverflowListInternal(aReflowInput.mLineLayout->GetInFirstLine());
   }
 
-  // Set our own reflow state (additional state above and beyond aReflowInput).
+  // Set our own reflow input (additional state above and beyond aReflowInput).
   InlineReflowInput irs;
   irs.mPrevFrame = nullptr;
   irs.mLineContainer = aReflowInput.mLineLayout->LineContainerFrame();
   irs.mLineLayout = aReflowInput.mLineLayout;
   irs.mNextInFlow = (nsInlineFrame*)GetNextInFlow();
   irs.mSetParentPointer = lazilySetParentPointer;
 
   if (mFrames.IsEmpty()) {
@@ -1009,17 +1009,17 @@ void nsFirstLineFrame::Reflow(nsPresCont
           mFrames.InsertFrames(this, nullptr, *prevOverflowFrames);
       ReparentChildListStyle(aPresContext, newFrames, this);
     }
   }
 
   // It's also possible that we have an overflow list for ourselves.
   DrainSelfOverflowList();
 
-  // Set our own reflow state (additional state above and beyond aReflowInput).
+  // Set our own reflow input (additional state above and beyond aReflowInput).
   InlineReflowInput irs;
   irs.mPrevFrame = nullptr;
   irs.mLineContainer = aReflowInput.mLineLayout->LineContainerFrame();
   irs.mLineLayout = aReflowInput.mLineLayout;
   irs.mNextInFlow = (nsInlineFrame*)GetNextInFlow();
 
   bool wasEmpty = mFrames.IsEmpty();
   if (wasEmpty) {
--- a/layout/generic/nsInlineFrame.h
+++ b/layout/generic/nsInlineFrame.h
@@ -115,17 +115,17 @@ class nsInlineFrame : public nsContainer
   }
 
   // Restyles the block wrappers around our non-inline-outside kids.
   // This will only be called when such wrappers in fact exist.
   void UpdateStyleOfOwnedAnonBoxesForIBSplit(
       mozilla::ServoRestyleState& aRestyleState);
 
  protected:
-  // Additional reflow state used during our reflow methods
+  // Additional reflow input used during our reflow methods
   struct InlineReflowInput {
     nsIFrame* mPrevFrame;
     nsInlineFrame* mNextInFlow;
     nsIFrame* mLineContainer;
     nsLineLayout* mLineLayout;
     bool mSetParentPointer;  // when reflowing child frame first set its
                              // parent frame pointer
 
--- a/layout/generic/nsLineLayout.cpp
+++ b/layout/generic/nsLineLayout.cpp
@@ -803,17 +803,17 @@ void nsLineLayout::ReflowFrame(nsIFrame*
   // everything else does.  We need to give them an available width that
   // reflects the space left on the line.
   LAYOUT_WARN_IF_FALSE(psd->mIEnd != NS_UNCONSTRAINEDSIZE,
                        "have unconstrained width; this should only result from "
                        "very large sizes, not attempts at intrinsic width "
                        "calculation");
   nscoord availableSpaceOnLine = psd->mIEnd - psd->mICoord;
 
-  // Setup reflow state for reflowing the frame
+  // Setup reflow input for reflowing the frame
   Maybe<ReflowInput> reflowInputHolder;
   if (!isText) {
     // Compute the available size for the frame. This available width
     // includes room for the side margins.
     // For now, set the available block-size to unconstrained always.
     LogicalSize availSize = mBlockReflowInput->ComputedSize(frameWM);
     availSize.BSize(frameWM) = NS_UNCONSTRAINEDSIZE;
     reflowInputHolder.emplace(mPresContext, *psd->mReflowInput, aFrame,
@@ -1122,17 +1122,17 @@ void nsLineLayout::AllowForStartMargin(P
     // the frame we will properly avoid adding in the starting margin.
     pfd->mMargin.IStart(lineWM) = 0;
   } else if (NS_UNCONSTRAINEDSIZE == aReflowInput.ComputedISize()) {
     NS_WARNING_ASSERTION(
         NS_UNCONSTRAINEDSIZE != aReflowInput.AvailableISize(),
         "have unconstrained inline-size; this should only result from very "
         "large sizes, not attempts at intrinsic inline-size calculation");
     // For inline-ish and text-ish things (which don't compute widths
-    // in the reflow state), adjust available inline-size to account
+    // in the reflow input), adjust available inline-size to account
     // for the start margin. The end margin will be accounted for when
     // we finish flowing the frame.
     WritingMode wm = aReflowInput.GetWritingMode();
     aReflowInput.AvailableISize() -=
         pfd->mMargin.ConvertTo(wm, lineWM).IStart(wm);
   }
 }
 
--- a/layout/generic/nsLineLayout.h
+++ b/layout/generic/nsLineLayout.h
@@ -141,22 +141,22 @@ class nsLineLayout {
   bool GetLineEndsInBR() const { return mLineEndsInBR; }
 
   void SetLineEndsInBR(bool aOn) { mLineEndsInBR = aOn; }
 
   //----------------------------------------
   // Inform the line-layout about the presence of a floating frame
   // XXX get rid of this: use get-frame-type?
   bool AddFloat(nsIFrame* aFloat, nscoord aAvailableISize) {
-    // When reflowing ruby text frames, no block reflow state is
+    // When reflowing ruby text frames, no block reflow input is
     // provided to the line layout. However, floats should never be
     // associated with ruby text containers, hence this method should
     // not be called in that case.
     MOZ_ASSERT(mBlockRI,
-               "Should not call this method if there is no block reflow state "
+               "Should not call this method if there is no block reflow input "
                "available");
     return mBlockRI->AddFloat(this, aFloat, aAvailableISize);
   }
 
   void SetTrimmableISize(nscoord aTrimmableISize) {
     mTrimmableISize = aTrimmableISize;
   }
 
--- a/layout/generic/nsRubyBaseContainerFrame.cpp
+++ b/layout/generic/nsRubyBaseContainerFrame.cpp
@@ -298,21 +298,21 @@ void nsRubyBaseContainerFrame::Reflow(ns
   for (uint32_t i = 0; i < rtcCount; i++) {
     textContainers[i]->MoveInlineOverflowToChildList(lineContainer);
   }
 
   WritingMode lineWM = aReflowInput.mLineLayout->GetWritingMode();
   LogicalSize availSize(lineWM, aReflowInput.AvailableISize(),
                         aReflowInput.AvailableBSize());
 
-  // We have a reflow state and a line layout for each RTC.
+  // We have a reflow input and a line layout for each RTC.
   // They are conceptually the state of the RTCs, but we don't actually
   // reflow those RTCs in this code. These two arrays are holders of
-  // the reflow states and line layouts.
-  // Since there are pointers refer to reflow states and line layouts,
+  // the reflow inputs and line layouts.
+  // Since there are pointers refer to reflow inputs and line layouts,
   // it is necessary to guarantee that they won't be moved. For this
   // reason, they are wrapped in UniquePtr here.
   AutoTArray<UniquePtr<ReflowInput>, RTC_ARRAY_SIZE> reflowInputs;
   AutoTArray<UniquePtr<nsLineLayout>, RTC_ARRAY_SIZE> lineLayouts;
   reflowInputs.SetCapacity(rtcCount);
   lineLayouts.SetCapacity(rtcCount);
 
   // Begin the line layout for each ruby text container in advance.
--- a/layout/generic/nsRubyFrame.cpp
+++ b/layout/generic/nsRubyFrame.cpp
@@ -306,17 +306,17 @@ void nsRubyFrame::ReflowSegment(nsPresCo
                                 availSize.ConvertTo(rtcWM, lineWM));
     textContainer->Reflow(aPresContext, textMetrics, textReflowInput,
                           textReflowStatus);
     // Ruby text containers always return complete reflow status even when
     // they have continuations, because the breaking has already been
     // handled when reflowing the base containers.
     NS_ASSERTION(textReflowStatus.IsEmpty(),
                  "Ruby text container must not break itself inside");
-    // The metrics is initialized with reflow state of this ruby frame,
+    // The metrics is initialized with reflow input of this ruby frame,
     // hence the writing-mode is tied to rubyWM instead of rtcWM.
     LogicalSize size = textMetrics.Size(rubyWM).ConvertTo(lineWM, rubyWM);
     textContainer->SetSize(lineWM, size);
 
     nscoord reservedISize = RubyUtils::GetReservedISize(textContainer);
     segmentISize = std::max(segmentISize, size.ISize(lineWM) + reservedISize);
 
     uint8_t rubyPosition = textContainer->StyleText()->mRubyPosition;
--- a/layout/generic/nsTextFrame.cpp
+++ b/layout/generic/nsTextFrame.cpp
@@ -8691,17 +8691,17 @@ void nsTextFrame::ReflowText(nsLineLayou
     ReflowTextA11yNotifier(presContext, mContent);
   }
 #endif
 
   /////////////////////////////////////////////////////////////////////
   // Set up flags and clear out state
   /////////////////////////////////////////////////////////////////////
 
-  // Clear out the reflow state flags in mState. We also clear the whitespace
+  // Clear out the reflow input flags in mState. We also clear the whitespace
   // flags because this can change whether the frame maps whitespace-only text
   // or not. We also clear the flag that tracks whether we had a pending
   // reflow request from CharacterDataChanged (since we're reflowing now).
   RemoveStateBits(TEXT_REFLOW_FLAGS | TEXT_WHITESPACE_FLAGS);
   mReflowRequestedForCharDataChange = false;
 
   // Temporarily map all possible content while we construct our new textrun.
   // so that when doing reflow our styles prevail over any part of the
--- a/layout/svg/nsSVGForeignObjectFrame.cpp
+++ b/layout/svg/nsSVGForeignObjectFrame.cpp
@@ -518,17 +518,17 @@ void nsSVGForeignObjectFrame::DoReflow()
   // We don't use mRect.height above because that tells the child to do
   // page/column breaking at that height.
   NS_ASSERTION(
       reflowInput.ComputedPhysicalBorderPadding() == nsMargin(0, 0, 0, 0) &&
           reflowInput.ComputedPhysicalMargin() == nsMargin(0, 0, 0, 0),
       "style system should ensure that :-moz-svg-foreign-content "
       "does not get styled");
   NS_ASSERTION(reflowInput.ComputedISize() == ISize(wm),
-               "reflow state made child wrong size");
+               "reflow input made child wrong size");
   reflowInput.SetComputedBSize(BSize(wm));
 
   ReflowChild(kid, presContext, desiredSize, reflowInput, 0, 0,
               NS_FRAME_NO_MOVE_FRAME, status);
   NS_ASSERTION(mRect.width == desiredSize.Width() &&
                    mRect.height == desiredSize.Height(),
                "unexpected size");
   FinishReflowChild(kid, presContext, desiredSize, &reflowInput, 0, 0,
--- a/layout/tables/nsTableCellFrame.cpp
+++ b/layout/tables/nsTableCellFrame.cpp
@@ -125,17 +125,17 @@ void nsTableCellFrame::DestroyFrom(nsIFr
 void nsTableCellFrame::NotifyPercentBSize(const ReflowInput& aReflowInput) {
   // ReflowInput ensures the mCBReflowInput of blocks inside a
   // cell is the cell frame, not the inner-cell block, and that the
   // containing block of an inner table is the containing block of its
   // table wrapper.
   // XXXldb Given the now-stricter |NeedsToObserve|, many if not all of
   // these tests are probably unnecessary.
 
-  // Maybe the cell reflow state; we sure if we're inside the |if|.
+  // Maybe the cell reflow input; we sure if we're inside the |if|.
   const ReflowInput* cellRI = aReflowInput.mCBReflowInput;
 
   if (cellRI && cellRI->mFrame == this &&
       (cellRI->ComputedBSize() == NS_UNCONSTRAINEDSIZE ||
        cellRI->ComputedBSize() == 0)) {  // XXXldb Why 0?
     // This is a percentage bsize on a frame whose percentage bsizes
     // are based on the bsize of the cell, since its containing block
     // is the inner cell frame.
@@ -831,17 +831,17 @@ void nsTableCellFrame::Reflow(nsPresCont
   // special-bsize reflow, in case we get an accidental NotifyPercentBSize()
   // call (which we shouldn't honor during special-bsize reflow)
   if (!aReflowInput.mFlags.mSpecialBSizeReflow) {
     // mPercentBSizeObserver is for children of cells in quirks mode,
     // but only those than are tables in standards mode.  NeedsToObserve
     // will determine how far this is propagated to descendants.
     kidReflowInput.mPercentBSizeObserver = this;
   }
-  // Don't propagate special bsize reflow state to our kids
+  // Don't propagate special bsize reflow input to our kids
   kidReflowInput.mFlags.mSpecialBSizeReflow = false;
 
   if (aReflowInput.mFlags.mSpecialBSizeReflow ||
       FirstInFlow()->HasAnyStateBits(NS_TABLE_CELL_HAD_SPECIAL_REFLOW)) {
     // We need to force the kid to have mBResize set if we've had a
     // special reflow in the past, since the non-special reflow needs to
     // resize back to what it was without the special bsize reflow.
     kidReflowInput.SetBResize(true);
--- a/layout/tables/nsTableFrame.cpp
+++ b/layout/tables/nsTableFrame.cpp
@@ -65,17 +65,17 @@ using mozilla::gfx::ToDeviceColor;
 
 /********************************************************************************
  ** TableReflowInput                                                         **
  ********************************************************************************/
 
 namespace mozilla {
 
 struct TableReflowInput {
-  // the real reflow state
+  // the real reflow input
   const ReflowInput& reflowInput;
 
   // The table's available size (in reflowInput's writing mode)
   LogicalSize availSize;
 
   // Stationary inline-offset
   nscoord iCoord;
 
@@ -1857,17 +1857,17 @@ void nsTableFrame::RequestSpecialBSizeRe
  * 1) Each table related frame (table, row group, row, cell) implements
  *    NeedsSpecialReflow() to indicate that it should get the reflow. It does
  *    this when it has a percent bsize but no computed bsize by calling
  *    CheckRequestSpecialBSizeReflow(). This method calls
  *    RequestSpecialBSizeReflow() which calls SetNeedSpecialReflow() on its
  *    ancestors until it reaches the containing table and calls
  *    SetNeedToInitiateSpecialReflow() on it. For percent bsize frames inside
  *    cells, during DidReflow(), the cell's NotifyPercentBSize() is called
- *    (the cell is the reflow state's mPercentBSizeObserver in this case).
+ *    (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
@@ -2031,17 +2031,17 @@ void nsTableFrame::Reflow(nsPresContext*
 
     // reevaluate special bsize reflow conditions
     if (HasAnyStateBits(NS_FRAME_CONTAINS_RELATIVE_BSIZE)) {
       needToInitiateSpecialReflow = true;
     }
 
     // XXXldb Are all these conditions correct?
     if (needToInitiateSpecialReflow && aStatus.IsComplete()) {
-      // XXXldb Do we need to set the IsBResize flag on any reflow states?
+      // XXXldb Do we need to set the IsBResize flag on any reflow inputs?
 
       ReflowInput& mutable_rs = const_cast<ReflowInput&>(aReflowInput);
 
       // distribute extra block-direction space to rows
       CalcDesiredBSize(aReflowInput, aDesiredSize);
       mutable_rs.mFlags.mSpecialBSizeReflow = true;
 
       ReflowTable(aDesiredSize, aReflowInput, aReflowInput.AvailableBSize(),
@@ -2138,19 +2138,19 @@ void nsTableFrame::FixupPositionedTableP
     // areas have already been assigned, so we just pull them back out.
     nsSize size(positionedPart->GetSize());
     ReflowOutput desiredSize(aReflowInput.GetWritingMode());
     desiredSize.Width() = size.width;
     desiredSize.Height() = size.height;
     desiredSize.mOverflowAreas =
         positionedPart->GetOverflowAreasRelativeToSelf();
 
-    // Construct a dummy reflow state and reflow status.
-    // XXX(seth): Note that the dummy reflow state doesn't have a correct
-    // chain of parent reflow states. It also doesn't necessarily have a
+    // Construct a dummy reflow input and reflow status.
+    // 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);
     nsReflowStatus reflowStatus;
@@ -2806,17 +2806,17 @@ LogicalMargin nsTableFrame::GetIncludedO
 LogicalMargin nsTableFrame::GetExcludedOuterBCBorder(
     const WritingMode aWM) const {
   return GetOuterBCBorder(aWM) - GetIncludedOuterBCBorder(aWM);
 }
 
 static LogicalMargin GetSeparateModelBorderPadding(
     const WritingMode aWM, const ReflowInput* aReflowInput,
     ComputedStyle* aComputedStyle) {
-  // XXXbz Either we _do_ have a reflow state and then we can use its
+  // XXXbz Either we _do_ have a reflow input and then we can use its
   // mComputedBorderPadding or we don't and then we get the padding
   // wrong!
   const nsStyleBorder* border = aComputedStyle->StyleBorder();
   LogicalMargin borderPadding(aWM, border->GetComputedBorder());
   if (aReflowInput) {
     borderPadding += aReflowInput->ComputedLogicalPadding();
   }
   return borderPadding;
@@ -2847,17 +2847,17 @@ void nsTableFrame::InitChildReflowInput(
   NS_ASSERTION(!mBits.mResizedColumns ||
                    !aReflowInput.mParentReflowInput->mFlags.mSpecialBSizeReflow,
                "should not resize columns on special bsize reflow");
   if (mBits.mResizedColumns) {
     aReflowInput.SetIResize(true);
   }
 }
 
-// Position and size aKidFrame and update our reflow state. The origin of
+// Position and size aKidFrame and update our reflow input. The origin of
 // aKidRect is relative to the upper-left origin of our frame
 void nsTableFrame::PlaceChild(TableReflowInput& aReflowInput,
                               nsIFrame* aKidFrame, nsPoint aKidPosition,
                               ReflowOutput& aKidDesiredSize,
                               const nsRect& aOriginalKidRect,
                               const nsRect& aOriginalKidVisualOverflow) {
   WritingMode wm = aReflowInput.reflowInput.GetWritingMode();
   bool isFirstReflow = aKidFrame->HasAnyStateBits(NS_FRAME_FIRST_REFLOW);
@@ -3362,17 +3362,17 @@ void nsTableFrame::ReflowChildren(TableR
 }
 
 void nsTableFrame::ReflowColGroups(gfxContext* aRenderingContext) {
   if (!GetPrevInFlow() && !HaveReflowedColGroups()) {
     ReflowOutput kidMet(GetWritingMode());
     nsPresContext* presContext = PresContext();
     for (nsIFrame* kidFrame : mColGroups) {
       if (NS_SUBTREE_DIRTY(kidFrame)) {
-        // The column groups don't care about dimensions or reflow states.
+        // The column groups don't care about dimensions or reflow inputs.
         ReflowInput kidReflowInput(presContext, kidFrame, aRenderingContext,
                                    LogicalSize(kidFrame->GetWritingMode()));
         nsReflowStatus cgStatus;
         ReflowChild(kidFrame, presContext, kidMet, kidReflowInput, 0, 0, 0,
                     cgStatus);
         FinishReflowChild(kidFrame, presContext, kidMet, nullptr, 0, 0, 0);
       }
     }
--- a/layout/tables/nsTableFrame.h
+++ b/layout/tables/nsTableFrame.h
@@ -641,22 +641,22 @@ class nsTableFrame : public nsContainerF
   /* Handle a row that got inserted during reflow.  aNewHeight is the
      new height of the table after reflow. */
   void ProcessRowInserted(nscoord aNewHeight);
 
   // WIDTH AND HEIGHT CALCULATION
 
  public:
   // calculate the computed block-size of aFrame including its border and
-  // padding given its reflow state.
+  // padding given its reflow input.
   nscoord CalcBorderBoxBSize(const ReflowInput& aReflowInput);
 
  protected:
   // update the  desired block-size of this table taking into account the
-  // current reflow state, the table attributes and the content driven rowgroup
+  // current reflow input, the table attributes and the content driven rowgroup
   // bsizes this function can change the overflow area
   void CalcDesiredBSize(const ReflowInput& aReflowInput,
                         ReflowOutput& aDesiredSize);
 
   // The following is a helper for CalcDesiredBSize
 
   void DistributeBSizeToRows(const ReflowInput& aReflowInput, nscoord aAmount);
 
--- a/layout/tables/nsTableRowGroupFrame.cpp
+++ b/layout/tables/nsTableRowGroupFrame.cpp
@@ -24,17 +24,17 @@
 #include <algorithm>
 
 using namespace mozilla;
 using namespace mozilla::layout;
 
 namespace mozilla {
 
 struct TableRowGroupReflowInput {
-  const ReflowInput& reflowInput;  // Our reflow state
+  const ReflowInput& reflowInput;  // Our reflow input
 
   nsTableFrame* tableFrame;
 
   // The available size (computed from the parent)
   mozilla::LogicalSize availSize;
 
   // Running block-offset
   nscoord bCoord;
@@ -253,17 +253,17 @@ nsIFrame::LogicalSides nsTableRowGroupFr
     skip |= eLogicalSideBitsBStart;
   }
   if (nullptr != GetNextInFlow()) {
     skip |= eLogicalSideBitsBEnd;
   }
   return skip;
 }
 
-// Position and size aKidFrame and update our reflow state.
+// Position and size aKidFrame and update our reflow input.
 void nsTableRowGroupFrame::PlaceChild(
     nsPresContext* aPresContext, TableRowGroupReflowInput& aReflowInput,
     nsIFrame* aKidFrame, WritingMode aWM, const LogicalPoint& aKidPosition,
     const nsSize& aContainerSize, ReflowOutput& aDesiredSize,
     const nsRect& aOriginalKidRect, const nsRect& aOriginalKidVisualOverflow) {
   bool isFirstReflow = aKidFrame->HasAnyStateBits(NS_FRAME_FIRST_REFLOW);
 
   // Place and size the child
--- a/layout/tables/nsTableWrapperFrame.cpp
+++ b/layout/tables/nsTableWrapperFrame.cpp
@@ -257,21 +257,21 @@ void nsTableWrapperFrame::InitChildReflo
 void nsTableWrapperFrame::GetChildMargin(nsPresContext* aPresContext,
                                          const ReflowInput& aOuterRI,
                                          nsIFrame* aChildFrame,
                                          nscoord aAvailISize,
                                          LogicalMargin& aMargin) {
   NS_ASSERTION(!aChildFrame->IsTableCaption(),
                "didn't expect caption frame; writing-mode may be wrong!");
 
-  // construct a reflow state to compute margin and padding. Auto margins
+  // construct a reflow input to compute margin and padding. Auto margins
   // will not be computed at this time.
 
-  // create and init the child reflow state
-  // XXX We really shouldn't construct a reflow state to do this.
+  // create and init the child reflow input
+  // XXX We really shouldn't construct a reflow input to do this.
   WritingMode wm = aOuterRI.GetWritingMode();
   LogicalSize availSize(wm, aAvailISize, aOuterRI.AvailableSize(wm).BSize(wm));
   ReflowInput childRI(aPresContext, aOuterRI, aChildFrame, availSize, nullptr,
                       ReflowInput::CALLER_WILL_INIT);
   InitChildReflowInput(*aPresContext, aOuterRI, childRI);
 
   aMargin = childRI.ComputedLogicalMargin();
 }
@@ -728,17 +728,17 @@ void nsTableWrapperFrame::OuterBeginRefl
       availBSize -= margin.BStart(wm);
 
       NS_ASSERTION(NS_UNCONSTRAINEDSIZE != margin.BEnd(wm),
                    "No unconstrainedsize arithmetic, please");
       availBSize -= margin.BEnd(wm);
     }
   }
   LogicalSize availSize(wm, aAvailISize, availBSize);
-  // create and init the child reflow state, using passed-in Maybe<>,
+  // create and init the child reflow input, using passed-in Maybe<>,
   // so that caller can use it after we return.
   aChildRI.emplace(aPresContext, aOuterRI, aChildFrame, availSize, nullptr,
                    ReflowInput::CALLER_WILL_INIT);
   InitChildReflowInput(*aPresContext, aOuterRI, *aChildRI);
 
   // see if we need to reset top-of-page due to a caption
   if (aChildRI->mFlags.mIsTopOfPage &&
       mCaptionFrames.FirstChild() == aChildFrame) {
--- a/layout/xul/nsBoxFrame.cpp
+++ b/layout/xul/nsBoxFrame.cpp
@@ -517,17 +517,17 @@ static void printSize(char* aDesc, nscoo
 nscoord nsBoxFrame::GetMinISize(gfxContext* aRenderingContext) {
   nscoord result;
   DISPLAY_MIN_INLINE_SIZE(this, result);
 
   nsBoxLayoutState state(PresContext(), aRenderingContext);
   nsSize minSize = GetXULMinSize(state);
 
   // GetXULMinSize returns border-box width, and we want to return content
-  // width.  Since Reflow uses the reflow state's border and padding, we
+  // width.  Since Reflow uses the reflow input's border and padding, we
   // actually just want to subtract what GetXULMinSize added, which is the
   // result of GetXULBorderAndPadding.
   nsMargin bp;
   GetXULBorderAndPadding(bp);
 
   result = minSize.width - bp.LeftRight();
   result = std::max(result, 0);
 
@@ -538,17 +538,17 @@ nscoord nsBoxFrame::GetMinISize(gfxConte
 nscoord nsBoxFrame::GetPrefISize(gfxContext* aRenderingContext) {
   nscoord result;
   DISPLAY_PREF_INLINE_SIZE(this, result);
 
   nsBoxLayoutState state(PresContext(), aRenderingContext);
   nsSize prefSize = GetXULPrefSize(state);
 
   // GetXULPrefSize returns border-box width, and we want to return content
-  // width.  Since Reflow uses the reflow state's border and padding, we
+  // width.  Since Reflow uses the reflow input's border and padding, we
   // actually just want to subtract what GetXULPrefSize added, which is the
   // result of GetXULBorderAndPadding.
   nsMargin bp;
   GetXULBorderAndPadding(bp);
 
   result = prefSize.width - bp.LeftRight();
   result = std::max(result, 0);
 
--- a/layout/xul/nsBoxLayoutState.h
+++ b/layout/xul/nsBoxLayoutState.h
@@ -53,17 +53,17 @@ class MOZ_STACK_CLASS nsBoxLayoutState {
   struct AutoReflowDepth {
     explicit AutoReflowDepth(nsBoxLayoutState& aState) : mState(aState) {
       ++mState.mReflowDepth;
     }
     ~AutoReflowDepth() { --mState.mReflowDepth; }
     nsBoxLayoutState& mState;
   };
 
-  // The HTML reflow state that lives outside the box-block boundary.
+  // The HTML reflow input that lives outside the box-block boundary.
   // May not be set reliably yet.
   const ReflowInput* OuterReflowInput() { return mOuterReflowInput; }
 
   uint16_t GetReflowDepth() { return mReflowDepth; }
 
  private:
   RefPtr<nsPresContext> mPresContext;
   gfxContext* mRenderingContext;
--- a/layout/xul/nsLeafBoxFrame.cpp
+++ b/layout/xul/nsLeafBoxFrame.cpp
@@ -102,17 +102,17 @@ nscoord nsLeafBoxFrame::GetMinISize(gfxC
   nscoord result;
   DISPLAY_MIN_INLINE_SIZE(this, result);
   nsBoxLayoutState state(PresContext(), aRenderingContext);
 
   WritingMode wm = GetWritingMode();
   LogicalSize minSize(wm, GetXULMinSize(state));
 
   // GetXULMinSize returns border-box size, and we want to return content
-  // inline-size.  Since Reflow uses the reflow state's border and padding, we
+  // inline-size.  Since Reflow uses the reflow input's border and padding, we
   // actually just want to subtract what GetXULMinSize added, which is the
   // result of GetXULBorderAndPadding.
   nsMargin bp;
   GetXULBorderAndPadding(bp);
 
   result = minSize.ISize(wm) - LogicalMargin(wm, bp).IStartEnd(wm);
 
   return result;
@@ -123,17 +123,17 @@ nscoord nsLeafBoxFrame::GetPrefISize(gfx
   nscoord result;
   DISPLAY_PREF_INLINE_SIZE(this, result);
   nsBoxLayoutState state(PresContext(), aRenderingContext);
 
   WritingMode wm = GetWritingMode();
   LogicalSize prefSize(wm, GetXULPrefSize(state));
 
   // GetXULPrefSize returns border-box size, and we want to return content
-  // inline-size.  Since Reflow uses the reflow state's border and padding, we
+  // inline-size.  Since Reflow uses the reflow input's border and padding, we
   // actually just want to subtract what GetXULPrefSize added, which is the
   // result of GetXULBorderAndPadding.
   nsMargin bp;
   GetXULBorderAndPadding(bp);
 
   result = prefSize.ISize(wm) - LogicalMargin(wm, bp).IStartEnd(wm);
 
   return result;
@@ -244,17 +244,17 @@ void nsLeafBoxFrame::Reflow(nsPresContex
   }
 
   if (aReflowInput.ComputedHeight() == NS_INTRINSICSIZE) {
     computedSize.height = prefSize.height;
   } else {
     computedSize.height += m.top + m.bottom;
   }
 
-  // handle reflow state min and max sizes
+  // handle reflow input min and max sizes
   // XXXbz the width handling here seems to be wrong, since
   // mComputedMin/MaxWidth is a content-box size, whole
   // computedSize.width is a border-box size...
   if (computedSize.width > aReflowInput.ComputedMaxWidth())
     computedSize.width = aReflowInput.ComputedMaxWidth();
 
   if (computedSize.width < aReflowInput.ComputedMinWidth())
     computedSize.width = aReflowInput.ComputedMinWidth();