Bug 1277129 Part 2c - Rename nsBlockReflowState to BlockReflowInput. draft
authorTing-Yu Lin <tlin@mozilla.com>
Thu, 21 Jul 2016 11:50:12 +0800
changeset 390397 82e1c212e00c14bef07127a39f142179a39394c2
parent 390396 4fe7d795bc4977c21c03c654933d28ed6a7ee7a1
child 390398 c17801e5fbd8458b526473242fb79364932a0409
push id23665
push usertlin@mozilla.com
push dateThu, 21 Jul 2016 03:51:24 +0000
Bug 1277129 Part 2c - Rename nsBlockReflowState to BlockReflowInput. This patch is generated by the following script: 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 "nsBlockReflowState" "BlockReflowInput" MozReview-Commit-ID: KIXUZUCBTCm
--- a/layout/generic/BlockReflowInput.cpp
+++ b/layout/generic/BlockReflowInput.cpp
@@ -23,17 +23,17 @@
 using namespace mozilla;
 using namespace mozilla::layout;
 static bool sFloatFragmentsInsideColumnEnabled;
 static bool sFloatFragmentsInsideColumnPrefCached;
-nsBlockReflowState::nsBlockReflowState(const ReflowInput& aReflowState,
+BlockReflowInput::BlockReflowInput(const ReflowInput& aReflowState,
                                        nsPresContext* aPresContext,
                                        nsBlockFrame* aFrame,
                                        bool aBStartMarginRoot,
                                        bool aBEndMarginRoot,
                                        bool aBlockNeedsFloatManager,
                                        nscoord aConsumedBSize)
   : mBlock(aFrame),
@@ -96,17 +96,17 @@ nsBlockReflowState::nsBlockReflowState(c
   if (aBlockNeedsFloatManager) {
     SetFlag(BRS_FLOAT_MGR, true);
   mFloatManager = aReflowState.mFloatManager;
-               "FloatManager should be set in nsBlockReflowState" );
+               "FloatManager should be set in BlockReflowInput" );
   if (mFloatManager) {
     // Save the coordinate system origin for later.
     mFloatManager->GetTranslation(mFloatManagerI, mFloatManagerB);
     mFloatManager->PushState(&mFloatManagerStateBefore); // never popped
   mReflowStatus = NS_FRAME_COMPLETE;
@@ -142,27 +142,27 @@ nsBlockReflowState::nsBlockReflowState(c
   mPrevChild = nullptr;
   mCurrentLine = aFrame->end_lines();
   mMinLineHeight = aReflowState.CalcLineHeight();
   if (mConsumedBSize == NS_INTRINSICSIZE) {
     mConsumedBSize = mBlock->GetConsumedBSize();
   return mConsumedBSize;
                       nsIFrame* aFrame,
                       const LogicalRect& aFloatAvailableSpace,
                       nscoord& aIStartResult,
                       nscoord& aIEndResult) const
   WritingMode wm = mReflowState.GetWritingMode();
   // The frame is clueless about the float manager and therefore we
   // only give it free space. An example is a table frame - the
@@ -217,17 +217,17 @@ GetBEndMarginClone(nsIFrame* aFrame,
   return 0;
 // Compute the amount of available space for reflowing a block frame
 // at the current Y coordinate. This method assumes that
 // GetAvailableSpace has already been called.
-nsBlockReflowState::ComputeBlockAvailSpace(nsIFrame* aFrame,
+BlockReflowInput::ComputeBlockAvailSpace(nsIFrame* aFrame,
                                            const nsStyleDisplay* aDisplay,
                                            const nsFlowAreaRect& aFloatAvailableSpace,
                                            bool aBlockAvoidsFloats,
                                            LogicalRect& aResult)
   printf("CBAS frame=%p has floats %d\n",
          aFrame, aFloatAvailableSpace.mHasFloats);
@@ -298,17 +298,17 @@ nsBlockReflowState::ComputeBlockAvailSpa
   printf("  CBAS: result %d %d %d %d\n", aResult.IStart(wm), aResult.BStart(wm),
          aResult.ISize(wm), aResult.BSize(wm));
-nsBlockReflowState::ReplacedBlockFitsInAvailSpace(nsIFrame* aReplacedBlock,
+BlockReflowInput::ReplacedBlockFitsInAvailSpace(nsIFrame* aReplacedBlock,
                             const nsFlowAreaRect& aFloatAvailableSpace) const
   if (!aFloatAvailableSpace.mHasFloats) {
     // If there aren't any floats here, then we always fit.
     // We check this before calling ISizeToClearPastFloats, which is
     // somewhat expensive.
     return true;
@@ -325,17 +325,17 @@ nsBlockReflowState::ReplacedBlockFitsInA
                   replacedISize.marginIStart) +
            replacedISize.borderBoxISize +
            (mContentArea.IEnd(wm) -
             aFloatAvailableSpace.mRect.IEnd(wm)) <=
                       nscoord aBCoord,
                       nsFloatManager::SavedState *aState) const
   WritingMode wm = mReflowState.GetWritingMode();
 #ifdef DEBUG
   // Verify that the caller setup the coordinate system properly
   nscoord wI, wB;
   mFloatManager->GetTranslation(wI, wB);
@@ -362,17 +362,17 @@ nsBlockReflowState::GetFloatAvailableSpa
            result.mRect.IStart(wm), result.mRect.BStart(wm),
            result.mRect.ISize(wm), result.mRect.BSize(wm), result.mHasFloats);
   return result;
                       nscoord aBCoord, nscoord aBSize,
                       nsFloatManager::SavedState *aState) const
   WritingMode wm = mReflowState.GetWritingMode();
 #ifdef DEBUG
   // Verify that the caller setup the coordinate system properly
   nscoord wI, wB;
   mFloatManager->GetTranslation(wI, wB);
@@ -408,17 +408,17 @@ nsBlockReflowState::GetFloatAvailableSpa
  * 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
  * a full reflow (under the rule in CSS2 that all adjacent vertical
  * margins of blocks collapse).
-nsBlockReflowState::ReconstructMarginBefore(nsLineList::iterator aLine)
+BlockReflowInput::ReconstructMarginBefore(nsLineList::iterator aLine)
   nsBlockFrame *block = mBlock;
   nsLineList::iterator firstLine = block->begin_lines();
   for (;;) {
     if (aLine->IsBlock()) {
@@ -435,17 +435,17 @@ nsBlockReflowState::ReconstructMarginBef
              "flag mismatch");
     // If we're being re-Reflow'd without our next-in-flow having been
     // reflowed, some pushed floats from our previous reflow might
     // still be on our pushed floats list.  However, that's
     // actually fine, since they'll all end up being stolen and
@@ -453,17 +453,17 @@ nsBlockReflowState::SetupPushedFloatList
     // (nsBlockFrame::ReflowDirtyLines ensures that any lines with
     // pushed floats are reflowed.)
     mPushedFloats = mBlock->EnsurePushedFloats();
-nsBlockReflowState::AppendPushedFloatChain(nsIFrame* aFloatCont)
+BlockReflowInput::AppendPushedFloatChain(nsIFrame* aFloatCont)
   while (true) {
     mPushedFloats->AppendFrame(mBlock, aFloatCont);
     aFloatCont = aFloatCont->GetNextInFlow();
     if (!aFloatCont || aFloatCont->GetParent() != mBlock) {
@@ -477,17 +477,17 @@ nsBlockReflowState::AppendPushedFloatCha
  * Restore information about floats into the float manager for an
  * incremental reflow, and simultaneously push the floats by
  * |aDeltaBCoord|, which is the amount |aLine| was pushed relative to its
  * parent.  The recovery of state is one of the things that makes
  * incremental reflow O(N^2) and this state should really be kept
  * around, attached to the frame tree.
-nsBlockReflowState::RecoverFloats(nsLineList::iterator aLine,
+BlockReflowInput::RecoverFloats(nsLineList::iterator aLine,
                                   nscoord aDeltaBCoord)
   WritingMode wm = mReflowState.GetWritingMode();
   if (aLine->HasFloats()) {
     // Place the floats into the space-manager again. Also slide
     // them, just like the regular frames on the line.
     nsFloatCache* fc = aLine->GetFirstFloat();
     while (fc) {
@@ -526,23 +526,23 @@ nsBlockReflowState::RecoverFloats(nsLine
  * Everything done in this function is done O(N) times for each pass of
  * reflow so it is O(N*M) where M is the number of incremental reflow
  * passes.  That's bad.  Don't do stuff here.
  * When this function is called, |aLine| has just been slid by |aDeltaBCoord|
  * and the purpose of RecoverStateFrom is to ensure that the
- * nsBlockReflowState is in the same state that it would have been in
+ * BlockReflowInput is in the same state that it would have been in
  * had the line just been reflowed.
  * Most of the state recovery that we have to do involves floats.
-nsBlockReflowState::RecoverStateFrom(nsLineList::iterator aLine,
+BlockReflowInput::RecoverStateFrom(nsLineList::iterator aLine,
                                      nscoord aDeltaBCoord)
   // Make the line being recovered the current line
   mCurrentLine = aLine;
   // Place floats for this line into the float manager
   if (aLine->HasFloats() || aLine->IsBlock()) {
     RecoverFloats(aLine, aDeltaBCoord);
@@ -561,17 +561,17 @@ nsBlockReflowState::RecoverStateFrom(nsL
 // then the float is place immediately, otherwise the float
 // placement is deferred until the line has been reflowed.
 // XXXldb This behavior doesn't quite fit with CSS1 and CSS2 --
 // technically we're supposed let the current line flow around the
 // float as well unless it won't fit next to what we already have.
 // But nobody else implements it that way...
-nsBlockReflowState::AddFloat(nsLineLayout*       aLineLayout,
+BlockReflowInput::AddFloat(nsLineLayout*       aLineLayout,
                              nsIFrame*           aFloat,
                              nscoord             aAvailableISize)
   NS_PRECONDITION(aLineLayout, "must have line layout");
   NS_PRECONDITION(mBlock->end_lines() != mCurrentLine, "null ptr");
                   "aFloat must be an out-of-flow frame");
@@ -652,17 +652,17 @@ nsBlockReflowState::AddFloat(nsLineLayou
   // Restore coordinate system
   mFloatManager->Translate(dI, dB);
   return placed;
-nsBlockReflowState::CanPlaceFloat(nscoord aFloatISize,
+BlockReflowInput::CanPlaceFloat(nscoord aFloatISize,
                                   const nsFlowAreaRect& aFloatAvailableSpace)
   // A float fits at a given block-dir position if there are no floats
   // at its inline-dir position (no matter what its inline size) or if
   // its inline size fits in the space remaining after prior floats have
   // been placed.
   // FIXME: We should allow overflow by up to half a pixel here (bug 21193).
   return !aFloatAvailableSpace.mHasFloats ||
@@ -705,17 +705,17 @@ FloatMarginISize(const ReflowInput& aCBR
   return floatISize +
            ConvertTo(cbwm, wm).ISize(cbwm) +
            ConvertTo(cbwm, wm).ISize(cbwm);
-nsBlockReflowState::FlowAndPlaceFloat(nsIFrame* aFloat)
+BlockReflowInput::FlowAndPlaceFloat(nsIFrame* aFloat)
   WritingMode wm = mReflowState.GetWritingMode();
   // Save away the Y coordinate before placing the float. We will
   // restore mBCoord at the end after placing the float. This is
   // necessary because any adjustments to mBCoord during the float
   // placement are for the float only, not for any non-floating
   // content.
   AutoRestore<nscoord> restoreBCoord(mBCoord);
@@ -1024,17 +1024,17 @@ nsBlockReflowState::FlowAndPlaceFloat(ns
     printf(" %d,%d,%d,%d\n", r.x, r.y, r.width, r.height);
   return true;
-nsBlockReflowState::PushFloatPastBreak(nsIFrame *aFloat)
+BlockReflowInput::PushFloatPastBreak(nsIFrame *aFloat)
   // This ensures that we:
   //  * don't try to place later but smaller floats (which CSS says
   //    must have their tops below the top of this float)
   //  * don't waste much time trying to reflow this float again until
   //    after the break
   uint8_t floatStyle =
@@ -1052,17 +1052,17 @@ nsBlockReflowState::PushFloatPastBreak(n
  * Place below-current-line floats.
-nsBlockReflowState::PlaceBelowCurrentLineFloats(nsFloatCacheFreeList& aList,
+BlockReflowInput::PlaceBelowCurrentLineFloats(nsFloatCacheFreeList& aList,
                                                 nsLineBox* aLine)
   nsFloatCache* fc = aList.Head();
   while (fc) {
 #ifdef DEBUG
     if (nsBlockFrame::gNoisyReflow) {
       nsFrame::IndentBy(stdout, nsBlockFrame::gNoiseIndent);
       printf("placing bcl float: ");
@@ -1078,29 +1078,29 @@ nsBlockReflowState::PlaceBelowCurrentLin
       delete fc;
     fc = next;
-nsBlockReflowState::ClearFloats(nscoord aBCoord, uint8_t aBreakType,
+BlockReflowInput::ClearFloats(nscoord aBCoord, uint8_t aBreakType,
                                 nsIFrame *aReplacedBlock,
                                 uint32_t aFlags)
 #ifdef DEBUG
   if (nsBlockFrame::gNoisyReflow) {
     nsFrame::IndentBy(stdout, nsBlockFrame::gNoiseIndent);
     printf("clear floats: in: aBCoord=%d\n", aBCoord);
-  printf("nsBlockReflowState::ClearFloats: aBCoord=%d breakType=%d\n",
+  printf("BlockReflowInput::ClearFloats: aBCoord=%d breakType=%d\n",
          aBCoord, aBreakType);
   if (!mFloatManager->HasAnyFloats()) {
     return aBCoord;
--- a/layout/generic/BlockReflowInput.h
+++ b/layout/generic/BlockReflowInput.h
@@ -1,41 +1,41 @@
 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 /* state used in reflow of block frames */
-#ifndef mozilla_nsBlockReflowState_h
-#define mozilla_nsBlockReflowState_h
+#ifndef mozilla_BlockReflowInput_h
+#define mozilla_BlockReflowInput_h
 #include "nsFloatManager.h"
 #include "nsLineBox.h"
 #include "mozilla/ReflowInput.h"
 class nsBlockFrame;
 class nsFrameList;
 class nsOverflowContinuationTracker;
 // Block reflow state flags.
-// BRS_UNCONSTRAINEDBSIZE is set in the nsBlockReflowState constructor when the
+// BRS_UNCONSTRAINEDBSIZE is set in the BlockReflowInput constructor when the
 // frame being reflowed has been given NS_UNCONSTRAINEDSIZE as its available
 // BSize in the ReflowInput. If set, NS_UNCONSTRAINEDSIZE is passed to
 // nsLineLayout as the available BSize.
 #define BRS_UNCONSTRAINEDBSIZE    0x00000001
-// BRS_ISBSTARTMARGINROOT is set in the nsBlockReflowState constructor when
+// BRS_ISBSTARTMARGINROOT is set in the BlockReflowInput constructor when
 // reflowing a "block margin root" frame (i.e. a frame with the
 // NS_BLOCK_MARGIN_ROOT flag set, for which margins apply by default).
 // The flag is also set when reflowing a frame whose computed BStart border
 // padding is non-zero.
 #define BRS_ISBSTARTMARGINROOT    0x00000002
-// BRS_ISBENDMARGINROOT is set in the nsBlockReflowState constructor when
+// BRS_ISBENDMARGINROOT is set in the BlockReflowInput constructor when
 // reflowing a "block margin root" frame (i.e. a frame with the
 // NS_BLOCK_MARGIN_ROOT flag set, for which margins apply by default).
 // The flag is also set when reflowing a frame whose computed BEnd border
 // padding is non-zero.
 #define BRS_ISBENDMARGINROOT      0x00000004
 // BRS_APPLYBSTARTMARGIN is set if the BStart margin should be considered when
 // placing a linebox that contains a block frame. It may be set as a side-effect
@@ -47,17 +47,17 @@ class nsOverflowContinuationTracker;
 // ShouldApplyBStartMargin() will crawl the line list to see if a block frame
 // precedes the specified frame. If so, the BStart margin should be applied, and
 // the flag is set to cache the result. (If not, the BStart margin will be
 // applied as a result of the generational margin collapsing logic in
 // nsBlockReflowContext::ComputeCollapsedBStartMargin(). In this case, the flag
 // won't be set, so subsequent calls to ShouldApplyBStartMargin() will continue
 // crawl the line list.)
-// This flag is also set in the nsBlockReflowState constructor if
+// This flag is also set in the BlockReflowInput constructor if
 // BRS_ISBSTARTMARGINROOT is set; that is, the frame being reflowed is a margin
 // root by default.
 #define BRS_APPLYBSTARTMARGIN     0x00000008
 #define BRS_ISFIRSTINFLOW         0x00000010
 // Set when mLineAdjacentToTop is valid
 // Set when the block has the equivalent of NS_BLOCK_FLOAT_MGR
 #define BRS_FLOAT_MGR             0x00000040
@@ -68,24 +68,24 @@ class nsOverflowContinuationTracker;
 // Our mPushedFloats list is stored on the blocks' proptable
 #define BRS_PROPTABLE_FLOATCLIST  0x00000200
 // Set when the pref layout.float-fragments-inside-column.enabled is true.
 namespace mozilla {
-// nsBlockReflowState contains additional reflow state information that the
+// BlockReflowInput contains additional reflow state information that the
 // block frame uses along with ReflowInput. Like ReflowInput, this
 // is read-only data that is passed down from a parent frame to its children.
-class nsBlockReflowState {
+class BlockReflowInput {
   using ReflowInput = mozilla::ReflowInput;
-  nsBlockReflowState(const ReflowInput& aReflowState,
+  BlockReflowInput(const ReflowInput& aReflowState,
                      nsPresContext* aPresContext,
                      nsBlockFrame* aFrame,
                      bool aBStartMarginRoot, bool aBEndMarginRoot,
                      bool aBlockNeedsFloatManager,
                      nscoord aConsumedBSize = NS_INTRINSICSIZE);
    * Get the available reflow space (the area not occupied by floats)
@@ -377,9 +377,9 @@ private:
   void PushFloatPastBreak(nsIFrame* aFloat);
   void RecoverFloats(nsLineList::iterator aLine, nscoord aDeltaBCoord);
 }; // namespace mozilla
-#endif // mozilla_nsBlockReflowState_h
+#endif // mozilla_BlockReflowInput_h
--- a/layout/generic/nsBlockFrame.cpp
+++ b/layout/generic/nsBlockFrame.cpp
@@ -1097,17 +1097,17 @@ nsBlockFrame::Reflow(nsPresContext*     
   bool blockStartMarginRoot, blockEndMarginRoot;
   IsMarginRoot(&blockStartMarginRoot, &blockEndMarginRoot);
   // Cache the consumed height in the block reflow state so that we don't have
   // to continually recompute it.
-  nsBlockReflowState state(*reflowState, aPresContext, this,
+  BlockReflowInput state(*reflowState, aPresContext, this,
                            blockStartMarginRoot, blockEndMarginRoot,
                            needFloatManager, consumedBSize);
   if (RenumberLists(aPresContext)) {
@@ -1268,17 +1268,17 @@ nsBlockFrame::Reflow(nsPresContext*     
   // Compute our final size
   nscoord blockEndEdgeOfChildren;
   ComputeFinalSize(*reflowState, state, aMetrics, &blockEndEdgeOfChildren);
   // If the block direction is right-to-left, we need to update the bounds of
   // lines that were placed relative to mContainerSize during reflow, as
   // we typically do not know the true container size until we've reflowed all
   // its children. So we use a dummy mContainerSize during reflow (see
-  // nsBlockReflowState's constructor) and then fix up the positions of the
+  // BlockReflowInput's constructor) and then fix up the positions of the
   // lines here, once the final block size is known.
   // Note that writing-mode:vertical-rl is the only case where the block
   // logical direction progresses in a negative physical direction, and
   // therefore block-dir coordinate conversion depends on knowing the width
   // of the coordinate space in order to translate between the logical and
   // physical origins.
   if (wm.IsVerticalRL()) {
@@ -1472,17 +1472,17 @@ nsBlockFrame::CheckForCollapsedBEndMargi
       return true;
   // not reached
 nsBlockFrame::ComputeFinalSize(const ReflowInput& aReflowState,
-                               nsBlockReflowState&      aState,
+                               BlockReflowInput&      aState,
                                nsHTMLReflowMetrics&     aMetrics,
                                nscoord*                 aBEndEdgeOfChildren)
   WritingMode wm = aState.mReflowState.GetWritingMode();
   const LogicalMargin& borderPadding = aState.BorderPadding();
   printf(": mBCoord=%d mIsBEndMarginRoot=%s mPrevBEndMargin=%d bp=%d,%d\n",
@@ -1843,17 +1843,17 @@ IsAlignedLeft(uint8_t aAlignment,
          (((NS_STYLE_TEXT_ALIGN_START == aAlignment &&
            NS_STYLE_DIRECTION_LTR == aDirection) ||
           (NS_STYLE_TEXT_ALIGN_END == aAlignment &&
            NS_STYLE_DIRECTION_RTL == aDirection)) &&
          !(NS_STYLE_UNICODE_BIDI_PLAINTEXT & aUnicodeBidi));
-nsBlockFrame::PrepareResizeReflow(nsBlockReflowState& aState)
+nsBlockFrame::PrepareResizeReflow(BlockReflowInput& aState)
   // See if we can try and avoid marking all the lines as dirty
   bool tryAndSkipLines =
     // The left content-edge must be a constant distance from the left
     // border-edge.
 #ifdef DEBUG
@@ -1946,17 +1946,17 @@ nsBlockFrame::PrepareResizeReflow(nsBloc
  *  2. The combination of nonzero |aDeltaBCoord| and any impact by a
  *     float, either the previous reflow or now.
  * When entering this function, |aLine| is still at its old position and
  * |aDeltaBCoord| indicates how much it will later be slid (assuming it
  * doesn't get marked dirty and reflowed entirely).
-nsBlockFrame::PropagateFloatDamage(nsBlockReflowState& aState,
+nsBlockFrame::PropagateFloatDamage(BlockReflowInput& aState,
                                    nsLineBox* aLine,
                                    nscoord aDeltaBCoord)
   nsFloatManager *floatManager = aState.mReflowState.mFloatManager;
   NS_ASSERTION((aState.mReflowState.mParentReflowState &&
                 aState.mReflowState.mParentReflowState->mFloatManager == floatManager) ||
                 aState.mReflowState.mBlockDelta == 0, "Bad block delta passed in");
@@ -2045,17 +2045,17 @@ nsBlockFrame::ReparentFloats(nsIFrame* a
       MOZ_ASSERT(!(f->GetStateBits() & NS_FRAME_IS_PUSHED_FLOAT),
                  "CollectFloats should've removed that bit");
       ReparentFrame(f, aOldParent, this);
     mFloats.AppendFrames(nullptr, list);
-static void DumpLine(const nsBlockReflowState& aState, nsLineBox* aLine,
+static void DumpLine(const BlockReflowInput& aState, nsLineBox* aLine,
                      nscoord aDeltaBCoord, int32_t aDeltaIndent) {
 #ifdef DEBUG
   if (nsBlockFrame::gNoisyReflow) {
     nsRect ovis(aLine->GetVisualOverflowArea());
     nsRect oscr(aLine->GetScrollableOverflowArea());
     nsBlockFrame::IndentBy(stdout, nsBlockFrame::gNoiseIndent + aDeltaIndent);
     printf("line=%p mBCoord=%d dirty=%s oldBounds={%d,%d,%d,%d} oldoverflow-vis={%d,%d,%d,%d} oldoverflow-scr={%d,%d,%d,%d} deltaBCoord=%d mPrevBEndMargin=%d childCount=%d\n",
            static_cast<void*>(aLine), aState.mBCoord,
@@ -2065,17 +2065,17 @@ static void DumpLine(const nsBlockReflow
            ovis.x, ovis.y, ovis.width, ovis.height,
            oscr.x, oscr.y, oscr.width, oscr.height,
            aDeltaBCoord, aState.mPrevBEndMargin.get(), aLine->GetChildCount());
-nsBlockFrame::ReflowDirtyLines(nsBlockReflowState& aState)
+nsBlockFrame::ReflowDirtyLines(BlockReflowInput& aState)
   bool keepGoing = true;
   bool repositionViews = false; // should we really need this?
   bool foundAnyClears = aState.mFloatBreakType != NS_STYLE_CLEAR_NONE;
   bool willReflowAgain = false;
 #ifdef DEBUG
   if (gNoisyReflow) {
@@ -2704,17 +2704,17 @@ nsBlockFrame::MarkLineDirtyForInterrupt(
     nsBlockFrame* bf = nsLayoutUtils::GetAsBlock(aLine->mFirstChild);
     if (bf) {
-nsBlockFrame::DeleteLine(nsBlockReflowState& aState,
+nsBlockFrame::DeleteLine(BlockReflowInput& aState,
                          nsLineList::iterator aLine,
                          nsLineList::iterator aLineEnd)
   NS_PRECONDITION(0 == aLine->GetChildCount(), "can't delete !empty line");
   if (0 == aLine->GetChildCount()) {
     NS_ASSERTION(aState.mCurrentLine == aLine,
                  "using function more generally than designed, "
                  "but perhaps OK now");
@@ -2729,17 +2729,17 @@ nsBlockFrame::DeleteLine(nsBlockReflowSt
  * Reflow a line. The line will either contain a single block frame
  * or contain 1 or more inline frames. aKeepReflowGoing indicates
  * whether or not the caller should continue to reflow more lines.
-nsBlockFrame::ReflowLine(nsBlockReflowState& aState,
+nsBlockFrame::ReflowLine(BlockReflowInput& aState,
                          line_iterator aLine,
                          bool* aKeepReflowGoing)
   MOZ_ASSERT(aLine->GetChildCount(), "reflowing empty line");
   // Setup the line-layout for the new line
   aState.mCurrentLine = aLine;
@@ -2751,17 +2751,17 @@ nsBlockFrame::ReflowLine(nsBlockReflowSt
     ReflowBlockFrame(aState, aLine, aKeepReflowGoing);
   } else {
     ReflowInlineFrames(aState, aLine, aKeepReflowGoing);
-nsBlockFrame::PullFrame(nsBlockReflowState& aState,
+nsBlockFrame::PullFrame(BlockReflowInput& aState,
                         line_iterator       aLine)
   // First check our remaining lines.
   if (end_lines() != aLine.next()) {
     return PullFrameFrom(aLine, this, aLine.next());
@@ -2848,17 +2848,17 @@ nsBlockFrame::PullFrameFrom(nsLineBox*  
   return frame;
-nsBlockFrame::SlideLine(nsBlockReflowState& aState,
+nsBlockFrame::SlideLine(BlockReflowInput& aState,
                         nsLineBox* aLine, nscoord aDeltaBCoord)
   NS_PRECONDITION(aDeltaBCoord != 0, "why slide a line nowhere?");
   // Adjust line state
   aLine->SlideBy(aDeltaBCoord, aState.ContainerSize());
   // Adjust the frames in the line
@@ -3064,17 +3064,17 @@ nsBlockFrame::IsEmpty()
     if (!line->IsEmpty())
       return false;
   return true;
-nsBlockFrame::ShouldApplyBStartMargin(nsBlockReflowState& aState,
+nsBlockFrame::ShouldApplyBStartMargin(BlockReflowInput& aState,
                                       nsLineBox* aLine,
                                       nsIFrame* aChildFrame)
   if (aState.GetFlag(BRS_APPLYBSTARTMARGIN)) {
     // Apply short-circuit check to avoid searching the line list
     return true;
@@ -3109,17 +3109,17 @@ nsBlockFrame::ShouldApplyBStartMargin(ns
   // The line being reflowed is "essentially" the first line in the
   // block. Therefore its block-start margin will be collapsed by the
   // generational collapsing logic with its parent (us).
   return false;
-nsBlockFrame::ReflowBlockFrame(nsBlockReflowState& aState,
+nsBlockFrame::ReflowBlockFrame(BlockReflowInput& aState,
                                line_iterator aLine,
                                bool* aKeepReflowGoing)
   NS_PRECONDITION(*aKeepReflowGoing, "bad caller");
   nsIFrame* frame = aLine->mFirstChild;
   if (!frame) {
     NS_ASSERTION(false, "program error - unexpected empty line"); 
@@ -3707,17 +3707,17 @@ nsBlockFrame::ReflowBlockFrame(nsBlockRe
 #ifdef DEBUG
-nsBlockFrame::ReflowInlineFrames(nsBlockReflowState& aState,
+nsBlockFrame::ReflowInlineFrames(BlockReflowInput& aState,
                                  line_iterator aLine,
                                  bool* aKeepReflowGoing)
   *aKeepReflowGoing = true;
   // Setup initial coordinate system for reflowing the inline frames
@@ -3782,17 +3782,17 @@ nsBlockFrame::ReflowInlineFrames(nsBlock
         // Don't allow pullup on a subsequent LINE_REFLOW_REDO_NO_PULL pass
         allowPullUp = false;
       } while (LINE_REFLOW_REDO_NO_PULL == lineReflowStatus);
     } while (LINE_REFLOW_REDO_MORE_FLOATS == lineReflowStatus);
   } while (LINE_REFLOW_REDO_NEXT_BAND == lineReflowStatus);
-nsBlockFrame::PushTruncatedLine(nsBlockReflowState& aState,
+nsBlockFrame::PushTruncatedLine(BlockReflowInput& aState,
                                 line_iterator       aLine,
                                 bool*               aKeepReflowGoing)
   PushLines(aState, aLine.prev());
   *aKeepReflowGoing = false;
@@ -3800,17 +3800,17 @@ nsBlockFrame::PushTruncatedLine(nsBlockR
 static const char* LineReflowStatusNames[] = {
-nsBlockFrame::DoReflowInlineFrames(nsBlockReflowState& aState,
+nsBlockFrame::DoReflowInlineFrames(BlockReflowInput& aState,
                                    nsLineLayout& aLineLayout,
                                    line_iterator aLine,
                                    nsFlowAreaRect& aFloatAvailableSpace,
                                    nscoord& aAvailableSpaceHeight,
                                    bool* aKeepReflowGoing,
                                    LineReflowStatus* aLineReflowStatus,
@@ -3967,17 +3967,17 @@ nsBlockFrame::DoReflowInlineFrames(nsBlo
     // the floats.
     // What we do is to advance past the first float we find and
     // then reflow the line all over again.
                  "unconstrained block size on totally empty line");
-    // See the analogous code for blocks in nsBlockReflowState::ClearFloats.
+    // See the analogous code for blocks in BlockReflowInput::ClearFloats.
     if (aFloatAvailableSpace.mRect.BSize(outerWM) > 0) {
                    "redo line on totally empty line with non-empty band...");
       // We should never hit this case if we've placed floats on the
       // line; if we have, then the GetFloatAvailableSpace call is wrong
       // and needs to happen after the caller pops the space manager
       // state.
@@ -4056,17 +4056,17 @@ nsBlockFrame::DoReflowInlineFrames(nsBlo
  * Reflow an inline frame. The reflow status is mapped from the frames
  * reflow status to the lines reflow status (not to our reflow status).
  * The line reflow status is simple: true means keep placing frames
  * on the line; false means don't (the line is done). If the line
  * has some sort of breaking affect then aLine's break-type will be set
  * to something other than NS_STYLE_CLEAR_NONE.
-nsBlockFrame::ReflowInlineFrame(nsBlockReflowState& aState,
+nsBlockFrame::ReflowInlineFrame(BlockReflowInput& aState,
                                 nsLineLayout& aLineLayout,
                                 line_iterator aLine,
                                 nsIFrame* aFrame,
                                 LineReflowStatus* aLineReflowStatus)
   if (!aFrame) { // XXX change to MOZ_ASSERT(aFrame)
     NS_ERROR("why call me?");
@@ -4197,17 +4197,17 @@ nsBlockFrame::ReflowInlineFrame(nsBlockR
       // Split line after the current frame
       *aLineReflowStatus = LINE_REFLOW_STOP;
       SplitLine(aState, aLineLayout, aLine, aFrame->GetNextSibling(), aLineReflowStatus);
-nsBlockFrame::CreateContinuationFor(nsBlockReflowState& aState,
+nsBlockFrame::CreateContinuationFor(BlockReflowInput& aState,
                                     nsLineBox*          aLine,
                                     nsIFrame*           aFrame)
   nsIFrame* newFrame = nullptr;
   if (!aFrame->GetNextInFlow()) {
     newFrame = aState.mPresContext->PresShell()->FrameConstructor()->
       CreateContinuingFrame(aState.mPresContext, aFrame, this);
@@ -4220,17 +4220,17 @@ nsBlockFrame::CreateContinuationFor(nsBl
 #ifdef DEBUG
   return !!newFrame;
-nsBlockFrame::SplitFloat(nsBlockReflowState& aState,
+nsBlockFrame::SplitFloat(BlockReflowInput& aState,
                          nsIFrame*           aFloat,
                          nsReflowStatus      aFloatStatus)
              "why split the frame if it's fully complete?");
   MOZ_ASSERT(aState.mBlock == this);
   nsIFrame* nextInFlow = aFloat->GetNextInFlow();
@@ -4291,17 +4291,17 @@ CheckPlaceholderInLine(nsIFrame* aBlock,
     if (f->GetParent() == aBlock)
       return aLine->Contains(f);
   NS_ASSERTION(false, "aBlock is not an ancestor of aFrame!");
   return true;
-nsBlockFrame::SplitLine(nsBlockReflowState& aState,
+nsBlockFrame::SplitLine(BlockReflowInput& aState,
                         nsLineLayout& aLineLayout,
                         line_iterator aLine,
                         nsIFrame* aFrame,
                         LineReflowStatus* aLineReflowStatus)
   MOZ_ASSERT(aLine->IsInline(), "illegal SplitLine on block line");
   int32_t pushCount = aLine->GetChildCount() - aLineLayout.GetCurrentSpanCount();
@@ -4365,17 +4365,17 @@ nsBlockFrame::SplitLine(nsBlockReflowSta
 #ifdef DEBUG
-nsBlockFrame::IsLastLine(nsBlockReflowState& aState,
+nsBlockFrame::IsLastLine(BlockReflowInput& aState,
                          line_iterator aLine)
   while (++aLine != end_lines()) {
     // There is another line
     if (0 != aLine->GetChildCount()) {
       // If the next line is a block line then this line is the last in a
       // group of inline lines.
       return aLine->IsBlock();
@@ -4398,17 +4398,17 @@ nsBlockFrame::IsLastLine(nsBlockReflowSt
     nextInFlow = (nsBlockFrame*) nextInFlow->GetNextInFlow();
   // This is the last line - so don't allow justification
   return true;
-nsBlockFrame::PlaceLine(nsBlockReflowState& aState,
+nsBlockFrame::PlaceLine(BlockReflowInput& aState,
                         nsLineLayout&       aLineLayout,
                         line_iterator       aLine,
                         nsFloatManager::SavedState *aFloatStateBeforeLine,
                         LogicalRect&        aFloatAvailableSpace,
                         nscoord&            aAvailableSpaceHeight,
                         bool*             aKeepReflowGoing)
   // Trim extra white-space from the line before placing the frames
@@ -4610,17 +4610,17 @@ nsBlockFrame::PlaceLine(nsBlockReflowSta
   // This must stay in sync with |ReflowDirtyLines|.
   if (aLine->HasFloatBreakAfter()) {
     aState.mBCoord = aState.ClearFloats(aState.mBCoord, aLine->GetBreakTypeAfter());
   return true;
-nsBlockFrame::PushLines(nsBlockReflowState&  aState,
+nsBlockFrame::PushLines(BlockReflowInput&  aState,
                         nsLineList::iterator aLineBefore)
   // NOTE: aLineBefore is always a normal line, not an overflow line.
   // The following expression will assert otherwise.
   DebugOnly<bool> check = aLineBefore == mLines.begin();
   nsLineList::iterator overBegin(aLineBefore.next());
@@ -4804,17 +4804,17 @@ nsBlockFrame::DrainSelfOverflowList()
  * Temporarily, during reflow, they also live on the pushed floats list,
  * which only holds them between (a) when one continuation pushes them to
  * its pushed floats list because they don't fit and (b) when the next
  * continuation pulls them onto the beginning of its float list.
  * DrainPushedFloats sets up pushed floats the way we need them at the
  * start of reflow; they are then reflowed by ReflowPushedFloats (which
  * might push some of them on).  Floats with placeholders in this block
- * are reflowed by (nsBlockReflowState/nsLineLayout)::AddFloat, which
+ * are reflowed by (BlockReflowInput/nsLineLayout)::AddFloat, which
  * also maintains these invariants.
  * DrainSelfPushedFloats moves any pushed floats from this block's own
  * PushedFloats list back into mFloats.  DrainPushedFloats additionally
  * moves frames from its prev-in-flow's PushedFloats list into mFloats.
@@ -5367,17 +5367,17 @@ nsBlockFrame::RemoveFloat(nsIFrame* aFlo
   if (mFloats.StartRemoveFrame(aFloat)) {
   nsFrameList* list = GetPushedFloats();
   if (list && list->ContinueRemoveFrame(aFloat)) {
 #if 0
-    // XXXmats not yet - need to investigate nsBlockReflowState::mPushedFloats
+    // XXXmats not yet - need to investigate BlockReflowInput::mPushedFloats
     // first so we don't leave it pointing to a deleted list.
     if (list->IsEmpty()) {
       delete RemovePushedFloats();
@@ -6037,32 +6037,32 @@ nsBlockFrame::StyleTextForLineLayout()
   // Return the pointer to an unmodified style text
   return StyleText();
 // Float support
-nsBlockFrame::AdjustFloatAvailableSpace(nsBlockReflowState& aState,
+nsBlockFrame::AdjustFloatAvailableSpace(BlockReflowInput& aState,
                                         const LogicalRect& aFloatAvailableSpace,
                                         nsIFrame* aFloatFrame)
   // Compute the available inline size. By default, assume the inline
   // size of the containing block.
   nscoord availISize;
   const nsStyleDisplay* floatDisplay = aFloatFrame->StyleDisplay();
   WritingMode wm = aState.mReflowState.GetWritingMode();
   if (NS_STYLE_DISPLAY_TABLE != floatDisplay->mDisplay ||
       eCompatibility_NavQuirks != aState.mPresContext->CompatibilityMode() ) {
     availISize = aState.ContentISize();
   else {
-    // This quirk matches the one in nsBlockReflowState::FlowAndPlaceFloat
+    // This quirk matches the one in BlockReflowInput::FlowAndPlaceFloat
     // give tables only the available space
     // if they can shrink we may not be constrained to place
     // them in the next line
     availISize = aFloatAvailableSpace.ISize(wm);
   nscoord availBSize = NS_UNCONSTRAINEDSIZE == aState.ContentBSize()
                        ? NS_UNCONSTRAINEDSIZE
@@ -6078,17 +6078,17 @@ nsBlockFrame::AdjustFloatAvailableSpace(
   return LogicalRect(wm, aState.ContentIStart(), aState.ContentBStart(),
                      availISize, availBSize);
-nsBlockFrame::ComputeFloatISize(nsBlockReflowState& aState,
+nsBlockFrame::ComputeFloatISize(BlockReflowInput& aState,
                                 const LogicalRect&  aFloatAvailableSpace,
                                 nsIFrame*           aFloat)
                   "aFloat must be an out-of-flow frame");
   // Reflow the float.
   LogicalRect availSpace = AdjustFloatAvailableSpace(aState,
@@ -6099,17 +6099,17 @@ nsBlockFrame::ComputeFloatISize(nsBlockR
     floatRS(aState.mPresContext, aState.mReflowState, aFloat,
             availSpace.Size(blockWM).ConvertTo(floatWM, blockWM));
   return floatRS.ComputedSizeWithMarginBorderPadding(blockWM).ISize(blockWM);
-nsBlockFrame::ReflowFloat(nsBlockReflowState& aState,
+nsBlockFrame::ReflowFloat(BlockReflowInput& aState,
                           const LogicalRect&  aAdjustedAvailableSpace,
                           nsIFrame*           aFloat,
                           LogicalMargin&      aFloatMargin,
                           LogicalMargin&      aFloatOffsets,
                           bool                aFloatPushedDown,
                           nsReflowStatus&     aReflowStatus)
@@ -6204,17 +6204,17 @@ nsBlockFrame::ReflowFloat(nsBlockReflowS
   aFloatOffsets =
     floatRS.ComputedLogicalOffsets().ConvertTo(wm, floatRS.GetWritingMode());
   const nsHTMLReflowMetrics& metrics = brc.GetMetrics();
   // Set the rect, make sure the view is properly sized and positioned,
   // and tell the frame we're done reflowing it
   // XXXldb This seems like the wrong place to be doing this -- shouldn't
-  // we be doing this in nsBlockReflowState::FlowAndPlaceFloat after
+  // we be doing this in BlockReflowInput::FlowAndPlaceFloat after
   // we've positioned the float, and shouldn't we be doing the equivalent
   // of |PlaceFrameView| here?
   WritingMode metricsWM = metrics.GetWritingMode();
   aFloat->SetSize(metricsWM, metrics.Size(metricsWM));
   if (aFloat->HasView()) {
     nsContainerFrame::SyncFrameViewAfterReflow(aState.mPresContext, aFloat,
@@ -6241,17 +6241,17 @@ nsBlockFrame::FindTrailingClear()
       return endLine->GetBreakTypeAfter();
-nsBlockFrame::ReflowPushedFloats(nsBlockReflowState& aState,
+nsBlockFrame::ReflowPushedFloats(BlockReflowInput& aState,
                                  nsOverflowAreas&    aOverflowAreas,
                                  nsReflowStatus&     aStatus)
   // Pushed floats live at the start of our float list; see comment
   // above nsBlockFrame::DrainPushedFloats.
   nsIFrame* f = mFloats.FirstChild();
   nsIFrame* prev = nullptr;
   while (f && (f->GetStateBits() & NS_FRAME_IS_PUSHED_FLOAT)) {
@@ -7167,17 +7167,17 @@ nsBlockFrame::RenumberListsFor(nsPresCon
   return kidRenumberedABullet;
 nsBlockFrame::ReflowBullet(nsIFrame* aBulletFrame,
-                           nsBlockReflowState& aState,
+                           BlockReflowInput& aState,
                            nsHTMLReflowMetrics& aMetrics,
                            nscoord aLineTop)
   const ReflowInput &rs = aState.mReflowState;
   // Reflow the bullet now
   WritingMode bulletWM = aBulletFrame->GetWritingMode();
   LogicalSize availSize(bulletWM);
@@ -7272,17 +7272,17 @@ nsBlockFrame::DoCollectFloats(nsIFrame* 
     if (!aCollectSiblings)
     aFrame = aFrame->GetNextSibling();
-nsBlockFrame::CheckFloats(nsBlockReflowState& aState)
+nsBlockFrame::CheckFloats(BlockReflowInput& aState)
 #ifdef DEBUG
   // If any line is still dirty, that must mean we're going to reflow this
   // block again soon (e.g. because we bailed out after noticing that
   // clearance was imposed), so don't worry if the floats are out of sync.
   bool anyLineDirty = false;
   // Check that the float list is what we would have built
@@ -7387,17 +7387,17 @@ nsBlockFrame::BlockCanIntersectFloats(ns
 // Note that this width can vary based on the vertical position.
 // However, the cases where it varies are the cases where the width fits
 // in the available space given, which means that variation shouldn't
 // matter.
 /* static */
-nsBlockFrame::ISizeToClearPastFloats(const nsBlockReflowState& aState,
+nsBlockFrame::ISizeToClearPastFloats(const BlockReflowInput& aState,
                                      const LogicalRect& aFloatAvailableSpace,
                                      nsIFrame* aFrame)
   nscoord inlineStartOffset, inlineEndOffset;
   WritingMode wm = aState.mReflowState.GetWritingMode();
   SizeComputationInput offsetState(aFrame, aState.mReflowState.rendContext,
                                wm, aState.mContentArea.ISize(wm));
--- a/layout/generic/nsBlockFrame.h
+++ b/layout/generic/nsBlockFrame.h
@@ -38,17 +38,17 @@ enum LineReflowStatus {
   // The line did not fit in the available vertical space. Try pushing it to
   // the next page or column if it's not the first line on the current page/column.
 class nsBlockInFlowLineIterator;
 class nsBulletFrame;
 namespace mozilla {
-class nsBlockReflowState;
+class BlockReflowInput;
 } // namespace mozilla
  * Some invariants:
  * -- The overflow out-of-flows list contains the out-of-
  * flow frames whose placeholders are in the overflow list.
  * -- A given piece of content has at most one placeholder
  * frame in a block's normal child list.
@@ -72,17 +72,17 @@ class nsBlockReflowState;
  * Base class for block and inline frames.
  * The block frame has an additional child list, kAbsoluteList, which
  * contains the absolutely positioned frames.
 class nsBlockFrame : public nsContainerFrame
-  using nsBlockReflowState = mozilla::nsBlockReflowState;
+  using BlockReflowInput = mozilla::BlockReflowInput;
   typedef nsLineList::iterator                  line_iterator;
   typedef nsLineList::const_iterator            const_line_iterator;
   typedef nsLineList::reverse_iterator          reverse_line_iterator;
@@ -292,17 +292,17 @@ public:
    * Determines whether the collapsed margin carried out of the last
    * line includes the margin-top of a line with clearance (in which
    * case we must avoid collapsing that margin with our bottom margin)
   bool CheckForCollapsedBEndMarginFromClearanceLine();
-  static nsresult GetCurrentLine(nsBlockReflowState *aState, nsLineBox **aOutCurrentLine);
+  static nsresult GetCurrentLine(BlockReflowInput *aState, nsLineBox **aOutCurrentLine);
    * Determine if this block is a margin root at the top/bottom edges.
   void IsMarginRoot(bool* aBStartMarginRoot, bool* aBEndMarginRoot);
   static bool BlockNeedsFloatManager(nsIFrame* aBlock);
@@ -320,28 +320,28 @@ public:
    * care about (which need not be its current mBCoord)
   struct ReplacedElementISizeToClear {
     // Note that we care about the inline-start margin but can ignore
     // the inline-end margin.
     nscoord marginIStart, borderBoxISize;
   static ReplacedElementISizeToClear
-    ISizeToClearPastFloats(const nsBlockReflowState& aState,
+    ISizeToClearPastFloats(const BlockReflowInput& aState,
                            const mozilla::LogicalRect& aFloatAvailableSpace,
                            nsIFrame* aFrame);
    * Creates a contination for aFloat and adds it to the list of overflow floats.
    * Also updates aState.mReflowStatus to include the float's incompleteness.
    * Must only be called while this block frame is in reflow.
    * aFloatStatus must be the float's true, unmodified reflow status.
-  nsresult SplitFloat(nsBlockReflowState& aState,
+  nsresult SplitFloat(BlockReflowInput& aState,
                       nsIFrame*           aFloat,
                       nsReflowStatus      aFloatStatus);
    * Walks up the frame tree, starting with aCandidate, and returns the first
    * block frame that it encounters.
   static nsBlockFrame* GetNearestAncestorBlock(nsIFrame* aCandidate);
@@ -400,27 +400,27 @@ protected:
   void SetFlags(nsFrameState aFlags) {
     mState &= ~NS_BLOCK_FLAGS_MASK;
     mState |= aFlags;
   /** move the frames contained by aLine by aDeltaBCoord
     * if aLine is a block, its child floats are added to the state manager
-  void SlideLine(nsBlockReflowState& aState,
+  void SlideLine(BlockReflowInput& aState,
                  nsLineBox* aLine, nscoord aDeltaBCoord);
   void UpdateLineContainerSize(nsLineBox* aLine,
                                const nsSize& aNewContainerSize);
   // helper for SlideLine and UpdateLineContainerSize
   void MoveChildFramesOfLine(nsLineBox* aLine, nscoord aDeltaBCoord);
   void ComputeFinalSize(const ReflowInput& aReflowState,
-                        nsBlockReflowState&      aState,
+                        BlockReflowInput&      aState,
                         nsHTMLReflowMetrics&     aMetrics,
                         nscoord*                 aBottomEdgeOfChildren);
   void ComputeOverflowAreas(const nsRect&         aBounds,
                             const nsStyleDisplay* aDisplay,
                             nscoord               aBottomEdgeOfChildren,
                             nsOverflowAreas&      aOverflowAreas);
@@ -561,17 +561,17 @@ protected:
    *  Assumes float manager is in our own coordinate system.
   void RecoverFloats(nsFloatManager&      aFloatManager,
                      mozilla::WritingMode aWM,
                      const nsSize&        aContainerSize);
   /** Reflow pushed floats
-  void ReflowPushedFloats(nsBlockReflowState& aState,
+  void ReflowPushedFloats(BlockReflowInput& aState,
                           nsOverflowAreas&    aOverflowAreas,
                           nsReflowStatus&     aStatus);
   /** Find any trailing BR clear from the last line of the block (or its PIFs)
   uint8_t FindTrailingClear();
@@ -593,41 +593,41 @@ protected:
                        bool aCollectFromSiblings);
   // Remove a float, abs, rel positioned frame from the appropriate block's list
   static void DoRemoveOutOfFlowFrame(nsIFrame* aFrame);
   /** set up the conditions necessary for an resize reflow
     * the primary task is to mark the minimumly sufficient lines dirty. 
-  void PrepareResizeReflow(nsBlockReflowState& aState);
+  void PrepareResizeReflow(BlockReflowInput& aState);
   /** reflow all lines that have been marked dirty */
-  void ReflowDirtyLines(nsBlockReflowState& aState);
+  void ReflowDirtyLines(BlockReflowInput& aState);
   /** Mark a given line dirty due to reflow being interrupted on or before it */
   void MarkLineDirtyForInterrupt(nsLineBox* aLine);
   // Methods for line reflow
    * Reflow a line.  
    * @param aState           the current reflow state
    * @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(nsBlockReflowState& aState,
+  void ReflowLine(BlockReflowInput& aState,
                   line_iterator aLine,
                   bool* aKeepReflowGoing);
   // Return false if it needs another reflow because of reduced space
   // between floats that are next to it (but not next to its top), and
   // return true otherwise.
-  bool PlaceLine(nsBlockReflowState&           aState,
+  bool PlaceLine(BlockReflowInput&           aState,
                    nsLineLayout&               aLineLayout,
                    line_iterator               aLine,
                    nsFloatManager::SavedState* aFloatStateBeforeLine,
                    mozilla::LogicalRect&       aFloatAvailableSpace, //in-out
                    nscoord&                    aAvailableSpaceHeight, // in-out
                    bool*                       aKeepReflowGoing);
@@ -642,69 +642,69 @@ protected:
    * on those lines because the text in the lines might have changed due to
    * addition/removal of frames.
    * @param aLine the line to mark dirty
    * @param aLineList the line list containing that line
   void MarkLineDirty(line_iterator aLine, const nsLineList* aLineList);
   // XXX where to go
-  bool IsLastLine(nsBlockReflowState& aState,
+  bool IsLastLine(BlockReflowInput& aState,
                   line_iterator aLine);
-  void DeleteLine(nsBlockReflowState& aState,
+  void DeleteLine(BlockReflowInput& aState,
                   nsLineList::iterator aLine,
                   nsLineList::iterator aLineEnd);
   // Methods for individual frame reflow
-  bool ShouldApplyBStartMargin(nsBlockReflowState& aState,
+  bool ShouldApplyBStartMargin(BlockReflowInput& aState,
                                nsLineBox* aLine,
                                nsIFrame* aChildFrame);
-  void ReflowBlockFrame(nsBlockReflowState& aState,
+  void ReflowBlockFrame(BlockReflowInput& aState,
                         line_iterator aLine,
                         bool* aKeepGoing);
-  void ReflowInlineFrames(nsBlockReflowState& aState,
+  void ReflowInlineFrames(BlockReflowInput& aState,
                           line_iterator aLine,
                           bool* aKeepLineGoing);
-  void DoReflowInlineFrames(nsBlockReflowState& aState,
+  void DoReflowInlineFrames(BlockReflowInput& aState,
                             nsLineLayout& aLineLayout,
                             line_iterator aLine,
                             nsFlowAreaRect& aFloatAvailableSpace,
                             nscoord& aAvailableSpaceHeight,
                             bool* aKeepReflowGoing,
                             LineReflowStatus* aLineReflowStatus,
                             bool aAllowPullUp);
-  void ReflowInlineFrame(nsBlockReflowState& aState,
+  void ReflowInlineFrame(BlockReflowInput& aState,
                          nsLineLayout& aLineLayout,
                          line_iterator aLine,
                          nsIFrame* aFrame,
                          LineReflowStatus* aLineReflowStatus);
   // Compute the available inline size for a float.
   mozilla::LogicalRect AdjustFloatAvailableSpace(
-                         nsBlockReflowState&         aState,
+                         BlockReflowInput&         aState,
                          const mozilla::LogicalRect& aFloatAvailableSpace,
                          nsIFrame*                   aFloatFrame);
   // Computes the border-box inline size of the float
-  nscoord ComputeFloatISize(nsBlockReflowState&         aState,
+  nscoord ComputeFloatISize(BlockReflowInput&         aState,
                             const mozilla::LogicalRect& aFloatAvailableSpace,
                             nsIFrame*                   aFloat);
   // An incomplete aReflowStatus indicates the float should be split
   // but only if the available height is constrained.
   // aAdjustedAvailableSpace is the result of calling
   // nsBlockFrame::AdjustFloatAvailableSpace.
-  void ReflowFloat(nsBlockReflowState&         aState,
+  void ReflowFloat(BlockReflowInput&         aState,
                    const mozilla::LogicalRect& aAdjustedAvailableSpace,
                    nsIFrame*                   aFloat,
                    mozilla::LogicalMargin&     aFloatMargin,
                    mozilla::LogicalMargin&     aFloatOffsets,
                    // Whether the float's position
                    // (aAdjustedAvailableSpace) has been pushed down
                    // due to the presence of other floats.
                    bool                        aFloatPushedDown,
@@ -716,41 +716,41 @@ protected:
    * 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 aLine where to put a new frame
    * @param aFrame the frame
    * @return true if a new frame was created, false if not
-  bool CreateContinuationFor(nsBlockReflowState& aState,
+  bool CreateContinuationFor(BlockReflowInput& aState,
                              nsLineBox*          aLine,
                              nsIFrame*           aFrame);
    * Push aLine (and any after it), since it cannot be placed on this
    * page/column.  Set aKeepReflowGoing to false and set
    * flag aState.mReflowStatus as incomplete.
-  void PushTruncatedLine(nsBlockReflowState& aState,
+  void PushTruncatedLine(BlockReflowInput& aState,
                          line_iterator       aLine,
                          bool*               aKeepReflowGoing);
-  void SplitLine(nsBlockReflowState& aState,
+  void SplitLine(BlockReflowInput& aState,
                  nsLineLayout& aLineLayout,
                  line_iterator aLine,
                  nsIFrame* aFrame,
                  LineReflowStatus* aLineReflowStatus);
    * Pull a frame from the next available location (one of our lines or
    * one of our next-in-flows lines).
    * @return the pulled frame or nullptr
-  nsIFrame* PullFrame(nsBlockReflowState& aState,
+  nsIFrame* PullFrame(BlockReflowInput& aState,
                       line_iterator       aLine);
    * Try to pull a frame out of a line pointed at by aFromLine.
    * Note: pulling a frame from a line that is a place-holder frame
    * doesn't automatically remove the corresponding float from the
    * line's float array. This happens indirectly: either the line gets
@@ -764,24 +764,24 @@ protected:
                           nsBlockFrame*        aFromContainer,
                           nsLineList::iterator aFromLine);
    * Push the line after aLineBefore to the overflow line list.
    * @param aLineBefore a line in 'mLines' (or begin_lines() when
    *        pushing the first line)
-  void PushLines(nsBlockReflowState& aState,
+  void PushLines(BlockReflowInput& aState,
                  nsLineList::iterator aLineBefore);
-  void PropagateFloatDamage(nsBlockReflowState& aState,
+  void PropagateFloatDamage(BlockReflowInput& aState,
                             nsLineBox* aLine,
                             nscoord aDeltaBCoord);
-  void CheckFloats(nsBlockReflowState& aState);
+  void CheckFloats(BlockReflowInput& aState);
   // List handling kludge
   // If this returns true, the block it's called on should get the
   // NS_FRAME_HAS_DIRTY_CHILDREN bit set on it by the caller; either directly
   // if it's already in reflow, or via calling FrameNeedsReflow() to schedule a
   // reflow.
@@ -795,17 +795,17 @@ protected:
   static bool RenumberListsFor(nsPresContext* aPresContext, nsIFrame* aKid,
                                int32_t* aOrdinal, int32_t aDepth,
                                int32_t aIncrement);
   static bool FrameStartsCounterScope(nsIFrame* aFrame);
   void ReflowBullet(nsIFrame* aBulletFrame,
-                    nsBlockReflowState& aState,
+                    BlockReflowInput& aState,
                     nsHTMLReflowMetrics& aMetrics,
                     nscoord aLineTop);
   virtual nsILineIterator* GetLineIterator() override;
@@ -887,17 +887,17 @@ protected:
   nscoord mMinWidth, mPrefWidth;
   nsLineList mLines;
   // List of all floats in this block
   // XXXmats blocks rarely have floats, make it a frame property
   nsFrameList mFloats;
-  friend class mozilla::nsBlockReflowState;
+  friend class mozilla::BlockReflowInput;
   friend class nsBlockInFlowLineIterator;
 #ifdef DEBUG
   static bool gLamePaintMetrics;
   static bool gLameReflowMetrics;
   static bool gNoisy;
   static bool gNoisyDamageRepair;
--- a/layout/generic/nsBlockReflowContext.cpp
+++ b/layout/generic/nsBlockReflowContext.cpp
@@ -224,17 +224,17 @@ void
 nsBlockReflowContext::ReflowBlock(const LogicalRect&  aSpace,
                                   bool                aApplyBStartMargin,
                                   nsCollapsingMargin& aPrevMargin,
                                   nscoord             aClearance,
                                   bool                aIsAdjacentWithBStart,
                                   nsLineBox*          aLine,
                                   ReflowInput&  aFrameRS,
                                   nsReflowStatus&     aFrameReflowStatus,
-                                  nsBlockReflowState& aState)
+                                  BlockReflowInput& aState)
   mFrame = aFrameRS.frame;
   mWritingMode = aState.mReflowState.GetWritingMode();
   mContainerSize = aState.ContainerSize();
   mSpace = aSpace;
   if (!aIsAdjacentWithBStart) {
     aFrameRS.mFlags.mIsTopOfPage = false;  // make sure this is cleared
--- a/layout/generic/nsBlockReflowContext.h
+++ b/layout/generic/nsBlockReflowContext.h
@@ -10,40 +10,40 @@
 #define nsBlockReflowContext_h___
 #include "nsIFrame.h"
 #include "nsHTMLReflowMetrics.h"
 class nsLineBox;
 class nsPresContext;
 namespace mozilla {
-class nsBlockReflowState;
+class BlockReflowInput;
 } // namespace mozilla
  * An encapsulation of the state and algorithm for reflowing block frames.
 class nsBlockReflowContext {
-  using nsBlockReflowState = mozilla::nsBlockReflowState;
+  using BlockReflowInput = mozilla::BlockReflowInput;
   using ReflowInput = mozilla::ReflowInput;
   nsBlockReflowContext(nsPresContext* aPresContext,
                        const ReflowInput& aParentRS);
   ~nsBlockReflowContext() { }
   void ReflowBlock(const mozilla::LogicalRect& aSpace,
                    bool                        aApplyBStartMargin,
                    nsCollapsingMargin&         aPrevMargin,
                    nscoord                     aClearance,
                    bool                        aIsAdjacentWithBStart,
                    nsLineBox*                  aLine,
                    ReflowInput&          aReflowState,
                    nsReflowStatus&             aReflowStatus,
-                   nsBlockReflowState&         aState);
+                   BlockReflowInput&         aState);
   bool PlaceBlock(const ReflowInput& aReflowState,
                   bool                     aForceFit,
                   nsLineBox*               aLine,
                   nsCollapsingMargin&      aBEndMarginResult /* out */,
                   nsOverflowAreas&         aOverflowAreas,
                   nsReflowStatus           aReflowStatus);
--- a/layout/generic/nsFrameStateBits.h
+++ b/layout/generic/nsFrameStateBits.h
@@ -462,17 +462,17 @@ FRAME_STATE_BIT(Block, 20, NS_BLOCK_NEED
 // This indicates that this is a frame from which child margins can be
 // calculated. The absence of this flag implies that child margin calculations
 // should ignore the frame and look further up the parent chain. Used in
 // nsBlockReflowContext::ComputeCollapsedBStartMargin() via
 // nsBlockFrame::IsMarginRoot().
-// This causes the nsBlockReflowState's constructor to set the
+// This causes the BlockReflowInput's constructor to set the
 // This indicates that a block frame should create its own float manager. This
 // is required by each block frame that can contain floats. The float manager is
 // used to reserve space for the floated frames.
--- a/layout/generic/nsLineLayout.h
+++ b/layout/generic/nsLineLayout.h
@@ -23,32 +23,32 @@
 #include "mozilla/BlockReflowInput.h"
 #include "nsLineBox.h"
 #include "plarena.h"
 class nsFloatManager;
 struct nsStyleText;
 class nsLineLayout {
-  using nsBlockReflowState = mozilla::nsBlockReflowState;
+  using BlockReflowInput = mozilla::BlockReflowInput;
   using ReflowInput = mozilla::ReflowInput;
    * @param aBaseLineLayout the nsLineLayout for ruby base,
    * nullptr if no separate base nsLineLayout is needed.
   nsLineLayout(nsPresContext* aPresContext,
                nsFloatManager* aFloatManager,
                const ReflowInput* aOuterReflowState,
                const nsLineList::iterator* aLine,
                nsLineLayout* aBaseLineLayout);
-  void Init(nsBlockReflowState* aState, nscoord aMinLineBSize,
+  void Init(BlockReflowInput* aState, nscoord aMinLineBSize,
             int32_t aLineNumber) {
     mBlockRS = aState;
     mMinLineBSize = aMinLineBSize;
     mLineNumber = aLineNumber;
   int32_t GetLineNumber() const {
     return mLineNumber;
@@ -406,17 +406,17 @@ protected:
   // XXX remove this when landing bug 154892 (splitting absolute positioned frames)
   friend class nsInlineFrame;
   // XXX Take care that nsRubyBaseContainer would give nullptr to this
   //     member. It should not be a problem currently, since the only
   //     code use it is handling float, which does not affect ruby.
   //     See comment in nsLineLayout::AddFloat
-  nsBlockReflowState* mBlockRS;/* XXX hack! */
+  BlockReflowInput* mBlockRS;/* XXX hack! */
   nsLineList::iterator mLineBox;
   // Per-frame data recorded by the line-layout reflow logic. This
   // state is the state needed to post-process the line after reflow
   // has completed (block-direction alignment, inline-direction alignment,
   // justification and relative positioning).