Bug 1174711 - patch 4 - Rename mSpecialHeightReflow to mSpecialBSizeReflow, and update comments to match. r=dholbert
authorJonathan Kew <jkew@mozilla.com>
Mon, 22 Jun 2015 10:33:34 +0100
changeset 268101 dbc622672848986638ad7544c6c39b4f15cc9f2c
parent 268100 ca41ad40687f5d7c3f3d89c3e9b5c68e93f5d9f5
child 268102 3fca18104696e85d3f90c84802e03479b9c023ee
push id4932
push userjlund@mozilla.com
push dateMon, 10 Aug 2015 18:23:06 +0000
treeherdermozilla-esr52@6dd5a4f5f745 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersdholbert
bugs1174711
milestone41.0a1
Bug 1174711 - patch 4 - Rename mSpecialHeightReflow to mSpecialBSizeReflow, and update comments to match. r=dholbert
layout/generic/nsFrame.cpp
layout/generic/nsHTMLReflowState.cpp
layout/generic/nsHTMLReflowState.h
layout/tables/nsTableCellFrame.cpp
layout/tables/nsTableFrame.cpp
layout/tables/nsTableFrame.h
layout/tables/nsTableRowFrame.cpp
layout/tables/nsTableRowGroupFrame.cpp
--- a/layout/generic/nsFrame.cpp
+++ b/layout/generic/nsFrame.cpp
@@ -9738,18 +9738,18 @@ static void DisplayReflowEnterPrint(nsPr
     printf("c=%s,%s ", width, height);
 
     if (aFrame->GetStateBits() & NS_FRAME_IS_DIRTY)
       printf("dirty ");
 
     if (aFrame->GetStateBits() & NS_FRAME_HAS_DIRTY_CHILDREN)
       printf("dirty-children ");
 
-    if (aReflowState.mFlags.mSpecialHeightReflow)
-      printf("special-height ");
+    if (aReflowState.mFlags.mSpecialBSizeReflow)
+      printf("special-bsize ");
 
     if (aReflowState.IsHResize())
       printf("h-resize ");
 
     if (aReflowState.IsVResize())
       printf("v-resize ");
 
     nsIFrame* inFlow = aFrame->GetPrevInFlow();
--- a/layout/generic/nsHTMLReflowState.cpp
+++ b/layout/generic/nsHTMLReflowState.cpp
@@ -174,26 +174,26 @@ nsHTMLReflowState::nsHTMLReflowState(
   , mBlockDelta(0)
   , mOrthogonalLimit(NS_UNCONSTRAINEDSIZE)
   , mReflowDepth(aParentReflowState.mReflowDepth + 1)
   , mFlags(aParentReflowState.mFlags)
 {
   MOZ_ASSERT(aPresContext, "no pres context");
   MOZ_ASSERT(aFrame, "no frame");
   MOZ_ASSERT(aPresContext == aFrame->PresContext(), "wrong pres context");
-  NS_PRECONDITION(!mFlags.mSpecialHeightReflow ||
+  NS_PRECONDITION(!mFlags.mSpecialBSizeReflow ||
                   !NS_SUBTREE_DIRTY(aFrame),
-                  "frame should be clean when getting special height reflow");
+                  "frame should be clean when getting special bsize reflow");
 
   parentReflowState = &aParentReflowState;
 
   // If the parent is dirty, then the child is as well.
   // XXX Are the other cases where the parent reflows a child a second
   // time, as a resize?
-  if (!mFlags.mSpecialHeightReflow)
+  if (!mFlags.mSpecialBSizeReflow)
     frame->AddStateBits(parentReflowState->frame->GetStateBits() &
                         NS_FRAME_IS_DIRTY);
 
   AvailableISize() = aAvailableSpace.ISize(mWritingMode);
   AvailableBSize() = aAvailableSpace.BSize(mWritingMode);
 
   if (mWritingMode.IsOrthogonalTo(aParentReflowState.GetWritingMode())) {
     // If we're setting up for an orthogonal flow, and the parent reflow state
@@ -608,17 +608,17 @@ nsHTMLReflowState::InitResizeFlags(nsPre
   }
 
   SetIResize(!(frame->GetStateBits() & NS_FRAME_IS_DIRTY) &&
              isIResize);
 
   // XXX Should we really need to null check mCBReflowState?  (We do for
   // at least nsBoxFrame).
   if (IS_TABLE_CELL(aFrameType) &&
-      (mFlags.mSpecialHeightReflow ||
+      (mFlags.mSpecialBSizeReflow ||
        (frame->FirstInFlow()->GetStateBits() &
          NS_TABLE_CELL_HAD_SPECIAL_REFLOW)) &&
       (frame->GetStateBits() & NS_FRAME_CONTAINS_RELATIVE_BSIZE)) {
     // Need to set the bit on the cell so that
     // mCBReflowState->IsBResize() is set correctly below when
     // reflowing descendant.
     SetBResize(true);
   } else if (mCBReflowState && !nsLayoutUtils::IsNonWrapperBlock(frame)) {
@@ -657,36 +657,36 @@ nsHTMLReflowState::InitResizeFlags(nsPre
                  "bad line-height value");
 
     // line-height depends on block bsize
     frame->AddStateBits(NS_FRAME_CONTAINS_RELATIVE_BSIZE);
     // but only on containing blocks if this frame is not a suitable block
     dependsOnCBBSize |= !nsLayoutUtils::IsNonWrapperBlock(frame);
   }
 
-  // If we're the descendant of a table cell that performs special height
+  // If we're the descendant of a table cell that performs special bsize
   // reflows and we could be the child that requires them, always set
   // the block-axis resize in case this is the first pass before the
-  // special height reflow.  However, don't do this if it actually is
-  // the special height reflow, since in that case it will already be
+  // special bsize reflow.  However, don't do this if it actually is
+  // the special bsize reflow, since in that case it will already be
   // set correctly above if we need it set.
   if (!IsBResize() && mCBReflowState &&
       (IS_TABLE_CELL(mCBReflowState->frame->GetType()) || 
        mCBReflowState->mFlags.mHeightDependsOnAncestorCell) &&
-      !mCBReflowState->mFlags.mSpecialHeightReflow && 
+      !mCBReflowState->mFlags.mSpecialBSizeReflow && 
       dependsOnCBBSize) {
     SetBResize(true);
     mFlags.mHeightDependsOnAncestorCell = true;
   }
 
   // Set NS_FRAME_CONTAINS_RELATIVE_BSIZE if it's needed.
 
   // It would be nice to check that |ComputedBSize != NS_AUTOHEIGHT|
   // &&ed with the percentage bsize check.  However, this doesn't get
-  // along with table special height reflows, since a special height
+  // along with table special bsize reflows, since a special bsize
   // reflow (a quirk that makes such percentage height work on children
   // of table cells) can cause not just a single percentage height to
   // become fixed, but an entire descendant chain of percentage height
   // to become fixed.
   if (dependsOnCBBSize && mCBReflowState) {
     const nsHTMLReflowState *rs = this;
     bool hitCBReflowState = false;
     do {
--- a/layout/generic/nsHTMLReflowState.h
+++ b/layout/generic/nsHTMLReflowState.h
@@ -524,18 +524,18 @@ public:
   // requested here.
   nsIFrame** mDiscoveredClearance;
 
   // This value keeps track of how deeply nested a given reflow state
   // is from the top of the frame tree.
   int16_t mReflowDepth;
 
   struct ReflowStateFlags {
-    uint16_t mSpecialHeightReflow:1; // used by tables to communicate special reflow (in process) to handle
-                                     // percent height frames inside cells which may not have computed heights
+    uint16_t mSpecialBSizeReflow:1;  // used by tables to communicate special reflow (in process) to handle
+                                     // percent bsize frames inside cells which may not have computed bsizes
     uint16_t mNextInFlowUntouched:1; // nothing in the frame's next-in-flow (or its descendants)
                                      // is changing
     uint16_t mIsTopOfPage:1;         // Is the current context at the top of a
                                      // page?  When true, we force something
                                      // that's too tall for a page/column to
                                      // fit anyway to avoid infinite loops.
     uint16_t mHasClearance:1;        // Block has clearance
     uint16_t mAssumingHScrollbar:1;  // parent frame is an nsIScrollableFrame and it
--- a/layout/tables/nsTableCellFrame.cpp
+++ b/layout/tables/nsTableCellFrame.cpp
@@ -862,21 +862,21 @@ nsTableCellFrame::Reflow(nsPresContext* 
                          nsHTMLReflowMetrics&     aDesiredSize,
                          const nsHTMLReflowState& aReflowState,
                          nsReflowStatus&          aStatus)
 {
   MarkInReflow();
   DO_GLOBAL_REFLOW_COUNT("nsTableCellFrame");
   DISPLAY_REFLOW(aPresContext, this, aReflowState, aDesiredSize, aStatus);
 
-  if (aReflowState.mFlags.mSpecialHeightReflow) {
+  if (aReflowState.mFlags.mSpecialBSizeReflow) {
     FirstInFlow()->AddStateBits(NS_TABLE_CELL_HAD_SPECIAL_REFLOW);
   }
 
-  // see if a special height reflow needs to occur due to having a pct height
+  // see if a special bsize reflow needs to occur due to having a pct height
   nsTableFrame::CheckRequestSpecialBSizeReflow(aReflowState);
 
   aStatus = NS_FRAME_COMPLETE;
   WritingMode wm = aReflowState.GetWritingMode();
   LogicalSize availSize(wm, aReflowState.AvailableISize(),
                             aReflowState.AvailableBSize());
 
   LogicalMargin borderPadding = aReflowState.ComputedLogicalPadding();
@@ -897,17 +897,17 @@ nsTableCellFrame::Reflow(nsPresContext* 
 
   nsHTMLReflowMetrics kidSize(wm, aDesiredSize.mFlags);
   kidSize.ClearSize();
   SetPriorAvailISize(aReflowState.AvailableISize());
   nsIFrame* firstKid = mFrames.FirstChild();
   NS_ASSERTION(firstKid, "Frame construction error, a table cell always has an inner cell frame");
   nsTableFrame* tableFrame = GetTableFrame();
 
-  if (aReflowState.mFlags.mSpecialHeightReflow) {
+  if (aReflowState.mFlags.mSpecialBSizeReflow) {
     const_cast<nsHTMLReflowState&>(aReflowState).
       SetComputedBSize(BSize(wm) - borderPadding.BStartEnd(wm));
     DISPLAY_REFLOW_CHANGE();
   }
   else if (aPresContext->IsPaginated()) {
     nscoord computedUnpaginatedBSize =
       CalcUnpaginatedBSize(aPresContext, (nsTableCellFrame&)*this,
                            *tableFrame, borderPadding.BStartEnd(wm));
@@ -920,32 +920,32 @@ nsTableCellFrame::Reflow(nsPresContext* 
     SetHasPctOverBSize(false);
   }
 
   WritingMode kidWM = firstKid->GetWritingMode();
   nsHTMLReflowState kidReflowState(aPresContext, aReflowState, firstKid,
                                    availSize.ConvertTo(kidWM, wm));
 
   // Don't be a percent height observer if we're in the middle of
-  // special-height reflow, in case we get an accidental NotifyPercentBSize()
-  // call (which we shouldn't honor during special-height reflow)
-  if (!aReflowState.mFlags.mSpecialHeightReflow) {
+  // special-bsize reflow, in case we get an accidental NotifyPercentBSize()
+  // call (which we shouldn't honor during special-bsize reflow)
+  if (!aReflowState.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.
     kidReflowState.mPercentBSizeObserver = this;
   }
-  // Don't propagate special height reflow state to our kids
-  kidReflowState.mFlags.mSpecialHeightReflow = false;
+  // Don't propagate special bsize reflow state to our kids
+  kidReflowState.mFlags.mSpecialBSizeReflow = false;
 
-  if (aReflowState.mFlags.mSpecialHeightReflow ||
+  if (aReflowState.mFlags.mSpecialBSizeReflow ||
       (FirstInFlow()->GetStateBits() & 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 height reflow.
+    // resize back to what it was without the special bsize reflow.
     kidReflowState.SetBResize(true);
   }
 
   nscoord containerWidth;
   if (aReflowState.ComputedWidth() == NS_UNCONSTRAINEDSIZE) {
     containerWidth = 0; // avoid passing unconstrained container width to
                         // ReflowChild; but position will not be valid
   } else {
@@ -1011,17 +1011,17 @@ nsTableCellFrame::Reflow(nsPresContext* 
     cellSize.ISize(wm) += borderPadding.IStartEnd(wm);
   }
 
   // set the cell's desired size and max element size
   aDesiredSize.SetSize(wm, cellSize);
 
   // the overflow area will be computed when BlockDirAlignChild() gets called
 
-  if (aReflowState.mFlags.mSpecialHeightReflow) {
+  if (aReflowState.mFlags.mSpecialBSizeReflow) {
     if (aDesiredSize.BSize(wm) > BSize(wm)) {
       // set a bit indicating that the pct bsize contents exceeded
       // the height that they could honor in the pass 2 reflow
       SetHasPctOverBSize(true);
     }
     if (NS_UNCONSTRAINEDSIZE == aReflowState.AvailableBSize()) {
       aDesiredSize.BSize(wm) = BSize(wm);
     }
--- a/layout/tables/nsTableFrame.cpp
+++ b/layout/tables/nsTableFrame.cpp
@@ -1756,17 +1756,17 @@ nsTableFrame::RequestSpecialBSizeReflow(
  *    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).
  *    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.mSpecialHeightReflow
+ *    will do the special bsize reflow, setting the reflow state's mFlags.mSpecialBSizeReflow
  *    to true and mSpecialHeightInitiator to itself. It won't do this if IsPrematureSpecialHeightReflow()
  *    returns true because in that case another special bsize reflow will be coming along with the
  *    containing table as the mSpecialHeightInitiator. It is only relevant to do the reflow when
  *    the mSpecialHeightInitiator is the containing table, because if it is a remote ancestor, then
  *    appropriate bsizes will not be known.
  *
  * 3) Since the bsizes of the table, row groups, rows, and cells was determined during the pass 2
  *    reflow, they return their last desired sizes during the special bsize reflow. The reflow only
@@ -1859,17 +1859,17 @@ nsTableFrame::Reflow(nsPresContext*     
       nscoord tableSpecifiedBSize = CalcBorderBoxBSize(aReflowState);
       if ((tableSpecifiedBSize > 0) &&
           (tableSpecifiedBSize != NS_UNCONSTRAINEDSIZE)) {
         needToInitiateSpecialReflow = true;
       }
     }
     nsIFrame* lastChildReflowed = nullptr;
 
-    NS_ASSERTION(!aReflowState.mFlags.mSpecialHeightReflow,
+    NS_ASSERTION(!aReflowState.mFlags.mSpecialBSizeReflow,
                  "Shouldn't be in special bsize reflow here!");
 
     // do the pass 2 reflow unless this is a special bsize reflow and we will be
     // initiating a special bsize reflow
     // XXXldb I changed this.  Should I change it back?
 
     // if we need to initiate a special bsize reflow, then don't constrain the
     // bsize of the reflow before that
@@ -1889,32 +1889,32 @@ nsTableFrame::Reflow(nsPresContext*     
     if (needToInitiateSpecialReflow && NS_FRAME_IS_COMPLETE(aStatus)) {
       // XXXldb Do we need to set the IsBResize flag on any reflow states?
 
       nsHTMLReflowState &mutable_rs =
         const_cast<nsHTMLReflowState&>(aReflowState);
 
       // distribute extra block-direction space to rows
       CalcDesiredBSize(aReflowState, aDesiredSize);
-      mutable_rs.mFlags.mSpecialHeightReflow = true;
+      mutable_rs.mFlags.mSpecialBSizeReflow = true;
 
       ReflowTable(aDesiredSize, aReflowState, aReflowState.AvailableBSize(),
                   lastChildReflowed, aStatus);
 
       if (lastChildReflowed && NS_FRAME_IS_NOT_COMPLETE(aStatus)) {
         // if there is an incomplete child, then set the desired bsize
         // to include it but not the next one
         LogicalMargin borderPadding = GetChildAreaOffset(wm, &aReflowState);
         aDesiredSize.BSize(wm) =
           borderPadding.BEnd(wm) + GetRowSpacing(GetRowCount()) +
           lastChildReflowed->GetNormalRect().YMost(); // XXX YMost should be B-flavored
       }
       haveDesiredBSize = true;
 
-      mutable_rs.mFlags.mSpecialHeightReflow = false;
+      mutable_rs.mFlags.mSpecialBSizeReflow = false;
     }
   }
   else {
     // Calculate the overflow area contribution from our children.
     for (nsIFrame* kid : mFrames) {
       ConsiderChildOverflow(aDesiredSize.mOverflowAreas, kid);
     }
   }
@@ -2710,17 +2710,17 @@ nsTableFrame::InitChildReflowState(nsHTM
     WritingMode wm = GetWritingMode();
     LogicalMargin border = rgFrame->GetBCBorderWidth(wm);
     collapseBorder = border.GetPhysicalMargin(wm);
     pCollapseBorder = &collapseBorder;
   }
   aReflowState.Init(presContext, nullptr, pCollapseBorder, &padding);
 
   NS_ASSERTION(!mBits.mResizedColumns ||
-               !aReflowState.parentReflowState->mFlags.mSpecialHeightReflow,
+               !aReflowState.parentReflowState->mFlags.mSpecialBSizeReflow,
                "should not resize columns on special bsize reflow");
   if (mBits.mResizedColumns) {
     aReflowState.SetHResize(true);
   }
 }
 
 // Position and size aKidFrame and update our reflow state. The origin of
 // aKidRect is relative to the upper-left origin of our frame
@@ -3021,17 +3021,17 @@ nsTableFrame::ReflowChildren(nsTableRefl
     nsIFrame* kidFrame = rowGroups[childX];
     nsTableRowGroupFrame* rowGroupFrame = rowGroups[childX];
     nscoord cellSpacingB = GetRowSpacing(rowGroupFrame->GetStartRowIndex()+
                                          rowGroupFrame->GetRowCount());
     // Get the frame state bits
     // See if we should only reflow the dirty child frames
     if (reflowAllKids ||
         NS_SUBTREE_DIRTY(kidFrame) ||
-        (aReflowState.reflowState.mFlags.mSpecialHeightReflow &&
+        (aReflowState.reflowState.mFlags.mSpecialBSizeReflow &&
          (isPaginated || (kidFrame->GetStateBits() &
                           NS_FRAME_CONTAINS_RELATIVE_BSIZE)))) {
       if (pageBreak) {
         if (allowRepeatedFooter) {
           PlaceRepeatedFooter(aReflowState, tfoot, footerHeight);
         }
         else if (tfoot && tfoot->IsRepeatable()) {
           tfoot->SetRepeatable(false);
--- a/layout/tables/nsTableFrame.h
+++ b/layout/tables/nsTableFrame.h
@@ -156,17 +156,17 @@ public:
                     nsIFrame*         aPrevInFlow) override;
 
   static float GetTwipsToPixels(nsPresContext* aPresContext);
 
   // Return true if aParentReflowState.frame or any of its ancestors within
   // the containing table have non-auto bsize. (e.g. pct or fixed bsize)
   static bool AncestorsHaveStyleBSize(const nsHTMLReflowState& aParentReflowState);
 
-  // See if a special height reflow will occur due to having a pct bsize when
+  // See if a special bsize reflow will occur due to having a pct bsize when
   // the pct bsize basis may not yet be valid.
   static void CheckRequestSpecialBSizeReflow(const nsHTMLReflowState& aReflowState);
 
   // Notify the frame and its ancestors (up to the containing table) that a special
   // height reflow will occur.
   static void RequestSpecialBSizeReflow(const nsHTMLReflowState& aReflowState);
 
   static void RePositionViews(nsIFrame* aFrame);
--- a/layout/tables/nsTableRowFrame.cpp
+++ b/layout/tables/nsTableRowFrame.cpp
@@ -352,17 +352,17 @@ nsTableRowFrame::DidResize()
       // skip this if the bsize didn't change... maybe.  Hard to tell.
       cellFrame->BlockDirAlignChild(wm, mMaxCellAscent);
 
       // Always store the overflow, even if the height didn't change, since
       // we'll lose part of our overflow area otherwise.
       ConsiderChildOverflow(desiredSize.mOverflowAreas, cellFrame);
 
       // Note that if the cell's *content* needs to change in response
-      // to this height, it will get a special height reflow.
+      // to this height, it will get a special bsize reflow.
     }
     // Get the next child
     childFrame = iter.Next();
   }
   FinishAndStoreOverflow(&desiredSize);
   if (HasView()) {
     nsContainerFrame::SyncFrameViewAfterReflow(PresContext(), this, GetView(),
                                                desiredSize.VisualOverflow(), 0);
@@ -817,27 +817,27 @@ nsTableRowFrame::ReflowChildren(nsPresCo
       continue;
     }
 
     // See if we should only reflow the dirty child frames
     bool doReflowChild = true;
     if (!aReflowState.ShouldReflowAllKids() &&
         !aTableFrame.IsGeometryDirty() &&
         !NS_SUBTREE_DIRTY(kidFrame)) {
-      if (!aReflowState.mFlags.mSpecialHeightReflow)
+      if (!aReflowState.mFlags.mSpecialBSizeReflow)
         doReflowChild = false;
     }
     else if ((NS_UNCONSTRAINEDSIZE != aReflowState.AvailableBSize())) {
       // We don't reflow a rowspan >1 cell here with a constrained bsize.
       // That happens in nsTableRowGroupFrame::SplitSpanningCells.
       if (aTableFrame.GetEffectiveRowSpan(*cellFrame) > 1) {
         doReflowChild = false;
       }
     }
-    if (aReflowState.mFlags.mSpecialHeightReflow) {
+    if (aReflowState.mFlags.mSpecialBSizeReflow) {
       if (!isPaginated && !(cellFrame->GetStateBits() &
                             NS_FRAME_CONTAINS_RELATIVE_BSIZE)) {
         continue;
       }
     }
 
     int32_t cellColIndex;
     cellFrame->GetColIndex(cellColIndex);
@@ -1008,17 +1008,17 @@ nsTableRowFrame::ReflowChildren(nsPresCo
     ConsiderChildOverflow(aDesiredSize.mOverflowAreas, kidFrame);
     iCoord += aTableFrame.GetColSpacing(cellColIndex);
   }
 
   // Just set our isize to what was available.
   // The table will calculate the isize and not use our value.
   aDesiredSize.ISize(wm) = aReflowState.AvailableISize();
 
-  if (aReflowState.mFlags.mSpecialHeightReflow) {
+  if (aReflowState.mFlags.mSpecialBSizeReflow) {
     aDesiredSize.BSize(wm) = BSize(wm);
   } else if (NS_UNCONSTRAINEDSIZE == aReflowState.AvailableBSize()) {
     aDesiredSize.BSize(wm) = CalcBSize(aReflowState);
     if (GetPrevInFlow()) {
       nscoord bsize = CalcBSizeFromUnpaginatedBSize(aPresContext, *this, wm);
       aDesiredSize.BSize(wm) = std::max(aDesiredSize.BSize(wm), bsize);
     } else {
       if (isPaginated && HasStyleBSize()) {
--- a/layout/tables/nsTableRowGroupFrame.cpp
+++ b/layout/tables/nsTableRowGroupFrame.cpp
@@ -364,17 +364,17 @@ nsTableRowGroupFrame::ReflowChildren(nsP
       continue;
     }
     nscoord cellSpacingB = tableFrame->GetRowSpacing(rowFrame->GetRowIndex());
     haveRow = true;
 
     // Reflow the row frame
     if (reflowAllKids ||
         NS_SUBTREE_DIRTY(kidFrame) ||
-        (aReflowState.reflowState.mFlags.mSpecialHeightReflow &&
+        (aReflowState.reflowState.mFlags.mSpecialBSizeReflow &&
          (isPaginated || (kidFrame->GetStateBits() &
                           NS_FRAME_CONTAINS_RELATIVE_BSIZE)))) {
       LogicalRect oldKidRect = kidFrame->GetLogicalRect(wm, containerWidth);
       nsRect oldKidVisualOverflow = kidFrame->GetVisualOverflowRect();
 
       // XXXldb We used to only pass aDesiredSize.mFlags through for the
       // incremental reflow codepath.
       nsHTMLReflowMetrics desiredSize(aReflowState.reflowState,
@@ -461,17 +461,17 @@ nsTableRowGroupFrame::ReflowChildren(nsP
     aReflowState.bCoord -= tableFrame->GetRowSpacing(GetStartRowIndex() +
                                                      GetRowCount());
   }
 
   // Return our desired rect
   aDesiredSize.ISize(wm) = aReflowState.reflowState.AvailableISize();
   aDesiredSize.BSize(wm) = aReflowState.bCoord;
 
-  if (aReflowState.reflowState.mFlags.mSpecialHeightReflow) {
+  if (aReflowState.reflowState.mFlags.mSpecialBSizeReflow) {
     DidResizeRows(aDesiredSize);
     if (isPaginated) {
       CacheRowBSizesForPrinting(aPresContext, GetFirstRow(), wm);
     }
   }
   else if (needToCalcRowBSizes) {
     CalculateRowBSizes(aPresContext, aDesiredSize, aReflowState.reflowState);
     if (!reflowAllKids) {
@@ -1351,23 +1351,23 @@ nsTableRowGroupFrame::Reflow(nsPresConte
 
   // See if all the frames fit. Do not try to split anything if we're
   // not paginated ... we can't split across columns yet.
   if (aReflowState.mFlags.mTableIsSplittable &&
       NS_UNCONSTRAINEDSIZE != aReflowState.AvailableHeight() &&
       (NS_FRAME_NOT_COMPLETE == aStatus || splitDueToPageBreak ||
        aDesiredSize.Height() > aReflowState.AvailableHeight())) {
     // Nope, find a place to split the row group
-    bool specialReflow = (bool)aReflowState.mFlags.mSpecialHeightReflow;
-    ((nsHTMLReflowState::ReflowStateFlags&)aReflowState.mFlags).mSpecialHeightReflow = false;
+    bool specialReflow = (bool)aReflowState.mFlags.mSpecialBSizeReflow;
+    ((nsHTMLReflowState::ReflowStateFlags&)aReflowState.mFlags).mSpecialBSizeReflow = false;
 
     SplitRowGroup(aPresContext, aDesiredSize, aReflowState, tableFrame, aStatus,
                   splitDueToPageBreak);
 
-    ((nsHTMLReflowState::ReflowStateFlags&)aReflowState.mFlags).mSpecialHeightReflow = specialReflow;
+    ((nsHTMLReflowState::ReflowStateFlags&)aReflowState.mFlags).mSpecialBSizeReflow = specialReflow;
   }
 
   // XXXmats The following is just bogus.  We leave it here for now because
   // ReflowChildren should pull up rows from our next-in-flow before returning
   // a Complete status, but doesn't (bug 804888).
   if (GetNextInFlow() && GetNextInFlow()->GetFirstPrincipalChild()) {
     NS_FRAME_SET_INCOMPLETE(aStatus);
   }