Backed out 6 changesets (bug 743402) for reftest failures on a CLOSED TREE.
authorRyan VanderMeulen <ryanvm@gmail.com>
Wed, 24 Jul 2013 15:14:04 -0400
changeset 139874 91356879fbfd87ec111b2ecd317a85f6bc081b85
parent 139873 3b36617ed67cdc31401819f4c97f56683a7e1ab5
child 139875 ff8930432f20864827c27c399b1678e8313529cd
push id1
push userroot
push dateMon, 20 Oct 2014 17:29:22 +0000
bugs743402
milestone25.0a1
backs out19848fff857e5652ef04d78c9ab06e5b2fb8a8a9
049168537ae07a051c426cf2ed23350c1cb9be83
3098fea37f2d9a3dec4180226415ae68517bf71a
ada93e976dca5a5a1eaa6e28ec03031720cca21e
c7907c54187f551b6a5e605985771b33733155ad
2edbbf6440c4d33150ef1788d408ad5d5ae1ccfe
Backed out 6 changesets (bug 743402) for reftest failures on a CLOSED TREE. Backed out changeset 19848fff857e (bug 743402) Backed out changeset 049168537ae0 (bug 743402) Backed out changeset 3098fea37f2d (bug 743402) Backed out changeset ada93e976dca (bug 743402) Backed out changeset c7907c54187f (bug 743402) Backed out changeset 2edbbf6440c4 (bug 743402)
layout/generic/nsBlockFrame.cpp
layout/generic/nsBlockFrame.h
layout/generic/nsBlockReflowState.cpp
layout/generic/nsBlockReflowState.h
layout/generic/nsColumnSetFrame.cpp
layout/generic/nsColumnSetFrame.h
layout/generic/nsFlexContainerFrame.cpp
layout/generic/nsFlexContainerFrame.h
layout/generic/nsFrame.cpp
layout/generic/nsHTMLReflowState.h
layout/generic/nsIFrame.h
layout/generic/nsImageFrame.cpp
layout/generic/nsImageFrame.h
layout/generic/nsInlineFrame.cpp
layout/generic/nsInlineFrame.h
layout/generic/nsSplittableFrame.cpp
layout/generic/nsSplittableFrame.h
layout/reftests/columns/columnrule-padding-ref.html
layout/reftests/columns/columnrule-padding.html
layout/reftests/w3c-css/submitted/multicol3/multicol-height-001.xht
layout/reftests/w3c-css/submitted/multicol3/reference/multicol-height-001.xht
layout/reftests/w3c-css/submitted/multicol3/reftest.list
layout/tables/nsTableCellFrame.cpp
layout/tables/nsTableCellFrame.h
layout/tables/nsTableColGroupFrame.cpp
layout/tables/nsTableColGroupFrame.h
layout/tables/nsTableFrame.cpp
layout/tables/nsTableFrame.h
layout/tables/nsTableRowFrame.cpp
layout/tables/nsTableRowFrame.h
layout/tables/nsTableRowGroupFrame.cpp
layout/tables/nsTableRowGroupFrame.h
--- a/layout/generic/nsBlockFrame.cpp
+++ b/layout/generic/nsBlockFrame.cpp
@@ -902,35 +902,32 @@ nsBlockFrame::Reflow(nsPresContext*     
   int32_t ctc = 0;        // We only use these if they are set (gLameReflowMetrics).
   if (gLameReflowMetrics) {
     start = PR_Now();
     ctc = nsLineBox::GetCtorCount();
   }
 #endif
 
   const nsHTMLReflowState *reflowState = &aReflowState;
-  nscoord consumedHeight = GetConsumedHeight();
-  nscoord effectiveComputedHeight = GetEffectiveComputedHeight(aReflowState,
-                                                               consumedHeight);
   Maybe<nsHTMLReflowState> mutableReflowState;
   // If we have non-auto height, we're clipping our kids and we fit,
   // make sure our kids fit too.
   if (aReflowState.availableHeight != NS_UNCONSTRAINEDSIZE &&
       aReflowState.ComputedHeight() != NS_AUTOHEIGHT &&
       ShouldApplyOverflowClipping(this, aReflowState.mStyleDisplay)) {
     nsMargin heightExtras = aReflowState.mComputedBorderPadding;
     if (GetSkipSides() & NS_SIDE_TOP) {
       heightExtras.top = 0;
     } else {
       // Bottom margin never causes us to create continuations, so we
       // don't need to worry about whether it fits in its entirety.
       heightExtras.top += aReflowState.mComputedMargin.top;
     }
 
-    if (effectiveComputedHeight + heightExtras.TopBottom() <=
+    if (GetEffectiveComputedHeight(aReflowState) + heightExtras.TopBottom() <=
         aReflowState.availableHeight) {
       mutableReflowState.construct(aReflowState);
       mutableReflowState.ref().availableHeight = NS_UNCONSTRAINEDSIZE;
       reflowState = mutableReflowState.addr();
     }
   }
 
   // See comment below about oldSize. Use *only* for the
@@ -955,22 +952,18 @@ nsBlockFrame::Reflow(nsPresContext*     
   ClearLineCursor();
 
   if (IsFrameTreeTooDeep(*reflowState, aMetrics, aStatus)) {
     return NS_OK;
   }
 
   bool topMarginRoot, bottomMarginRoot;
   IsMarginRoot(&topMarginRoot, &bottomMarginRoot);
-
-  // Cache the consumed height in the block reflow state so that we don't have
-  // to continually recompute it.
   nsBlockReflowState state(*reflowState, aPresContext, this,
-                           topMarginRoot, bottomMarginRoot, needFloatManager,
-                           consumedHeight);
+                           topMarginRoot, bottomMarginRoot, needFloatManager);
 
 #ifdef IBMBIDI
   if (GetStateBits() & NS_BLOCK_NEEDS_BIDI_RESOLUTION)
     static_cast<nsBlockFrame*>(GetFirstContinuation())->ResolveBidi();
 #endif // IBMBIDI
 
   if (RenumberLists(aPresContext)) {
     AddStateBits(NS_FRAME_HAS_DIRTY_CHILDREN);
@@ -1334,34 +1327,66 @@ nsBlockFrame::ComputeFinalSize(const nsH
     // bottom margin of any floated elements; e.g., inside a table cell.
     nscoord floatHeight =
       aState.ClearFloats(bottomEdgeOfChildren, NS_STYLE_CLEAR_LEFT_AND_RIGHT,
                          nullptr, nsFloatManager::DONT_CLEAR_PUSHED_FLOATS);
     bottomEdgeOfChildren = std::max(bottomEdgeOfChildren, floatHeight);
   }
 
   // Compute final height
-  if (NS_UNCONSTRAINEDSIZE != aReflowState.ComputedHeight()
-      && (mParent->GetType() != nsGkAtoms::columnSetFrame ||
-          aReflowState.parentReflowState->availableHeight == NS_UNCONSTRAINEDSIZE)) {
-    ComputeFinalHeight(aReflowState, &aState.mReflowStatus,
-                       aState.mY + nonCarriedOutVerticalMargin,
-                       borderPadding, aMetrics, aState.mConsumedHeight);
-    if (!NS_FRAME_IS_COMPLETE(aState.mReflowStatus)) {
+  if (NS_UNCONSTRAINEDSIZE != aReflowState.ComputedHeight()) {
+    // Figure out how much of the computed height should be
+    // applied to this frame.
+    nscoord computedHeightLeftOver = GetEffectiveComputedHeight(aReflowState);
+    NS_ASSERTION(!( IS_TRUE_OVERFLOW_CONTAINER(this)
+                    && computedHeightLeftOver ),
+                 "overflow container must not have computedHeightLeftOver");
+
+    aMetrics.height =
+      NSCoordSaturatingAdd(NSCoordSaturatingAdd(borderPadding.top,
+                                                computedHeightLeftOver),
+                           borderPadding.bottom);
+
+    if (NS_FRAME_IS_NOT_COMPLETE(aState.mReflowStatus)
+        && aMetrics.height < aReflowState.availableHeight) {
+      // We ran out of height on this page but we're incomplete
+      // Set status to complete except for overflow
+      NS_FRAME_SET_OVERFLOW_INCOMPLETE(aState.mReflowStatus);
+    }
+
+    if (NS_FRAME_IS_COMPLETE(aState.mReflowStatus)) {
+      if (computedHeightLeftOver > 0 &&
+          NS_UNCONSTRAINEDSIZE != aReflowState.availableHeight &&
+          aMetrics.height > aReflowState.availableHeight) {
+        if (ShouldAvoidBreakInside(aReflowState)) {
+          aState.mReflowStatus = NS_INLINE_LINE_BREAK_BEFORE();
+          return;
+        }
+        // We don't fit and we consumed some of the computed height,
+        // so we should consume all the available height and then
+        // break.  If our bottom border/padding straddles the break
+        // point, then this will increase our height and push the
+        // border/padding to the next page/column.
+        aMetrics.height = std::max(aReflowState.availableHeight,
+                                 aState.mY + nonCarriedOutVerticalMargin);
+        NS_FRAME_SET_INCOMPLETE(aState.mReflowStatus);
+        if (!GetNextInFlow())
+          aState.mReflowStatus |= NS_FRAME_REFLOW_NEXTINFLOW;
+      }
+    }
+    else {
       // Use the current height; continuations will take up the rest.
       // Do extend the height to at least consume the available
       // height, otherwise our left/right borders (for example) won't
       // extend all the way to the break.
       aMetrics.height = std::max(aReflowState.availableHeight,
                                aState.mY + nonCarriedOutVerticalMargin);
       // ... but don't take up more height than is available
-      nscoord effectiveComputedHeight =
-        GetEffectiveComputedHeight(aReflowState, aState.GetConsumedHeight());
       aMetrics.height = std::min(aMetrics.height,
-                               borderPadding.top + effectiveComputedHeight);
+                               borderPadding.top + computedHeightLeftOver);
       // XXX It's pretty wrong that our bottom border still gets drawn on
       // on its own on the last-in-flow, even if we ran out of height
       // here. We need GetSkipSides to check whether we ran out of content
       // height in the current frame, not whether it's last-in-flow.
     }
 
     // Don't carry out a bottom margin when our height is fixed.
     aMetrics.mCarriedOutBottomMargin.Zero();
@@ -5989,16 +6014,34 @@ nsBlockFrame::RecoverFloatsFor(nsIFrame*
     block->RecoverFloats(aFloatManager);
     aFloatManager.Translate(-pos.x, -pos.y);
   }
 }
 
 //////////////////////////////////////////////////////////////////////
 // Painting, event handling
 
+int
+nsBlockFrame::GetSkipSides() const
+{
+  if (IS_TRUE_OVERFLOW_CONTAINER(this)) {
+    return (1 << NS_SIDE_TOP) | (1 << NS_SIDE_BOTTOM);
+  }
+
+  int skip = 0;
+  if (GetPrevInFlow()) {
+    skip |= 1 << NS_SIDE_TOP;
+  }
+  nsIFrame* nif = GetNextInFlow();
+  if (nif && !IS_TRUE_OVERFLOW_CONTAINER(nif)) {
+    skip |= 1 << NS_SIDE_BOTTOM;
+  }
+  return skip;
+}
+
 #ifdef DEBUG
 static void ComputeVisualOverflowArea(nsLineList& aLines,
                                       nscoord aWidth, nscoord aHeight,
                                       nsRect& aResult)
 {
   nscoord xa = 0, ya = 0, xb = aWidth, yb = aHeight;
   for (nsLineList::iterator line = aLines.begin(), line_end = aLines.end();
        line != line_end;
@@ -7030,16 +7073,36 @@ nsBlockFrame::GetNearestAncestorBlock(ns
     }
     // Not a block. Check its parent next.
     aCandidate = aCandidate->GetParent();
   }
   NS_NOTREACHED("Fell off frame tree looking for ancestor block!");
   return nullptr;
 }
 
+nscoord
+nsBlockFrame::GetEffectiveComputedHeight(const nsHTMLReflowState& aReflowState) const
+{
+  nscoord height = aReflowState.ComputedHeight();
+  NS_ABORT_IF_FALSE(height != NS_UNCONSTRAINEDSIZE, "Don't call me!");
+
+  if (GetPrevInFlow()) {
+    // Reduce the height by the computed height of prev-in-flows.
+    for (nsIFrame* prev = GetPrevInFlow(); prev; prev = prev->GetPrevInFlow()) {
+      height -= prev->GetRect().height;
+    }
+    // We just subtracted our top-border padding, since it was included in the
+    // first frame's height. Add it back to get the content height.
+    height += aReflowState.mComputedBorderPadding.top;
+    // We may have stretched the frame beyond its computed height. Oh well.
+    height = std::max(0, height);
+  }
+  return height;
+}
+
 #ifdef IBMBIDI
 nsresult
 nsBlockFrame::ResolveBidi()
 {
   NS_ASSERTION(!GetPrevInFlow(),
                "ResolveBidi called on non-first continuation");
 
   nsPresContext* presContext = PresContext();
--- a/layout/generic/nsBlockFrame.h
+++ b/layout/generic/nsBlockFrame.h
@@ -407,16 +407,18 @@ protected:
   }
 
   /** move the frames contained by aLine by aDY
     * if aLine is a block, its child floats are added to the state manager
     */
   void SlideLine(nsBlockReflowState& aState,
                  nsLineBox* aLine, nscoord aDY);
 
+  virtual int GetSkipSides() const MOZ_OVERRIDE;
+
   void ComputeFinalSize(const nsHTMLReflowState& aReflowState,
                         nsBlockReflowState&      aState,
                         nsHTMLReflowMetrics&     aMetrics,
                         nscoord*                 aBottomEdgeOfChildren);
 
   void ComputeOverflowAreas(const nsRect&         aBounds,
                             const nsStyleDisplay* aDisplay,
                             nscoord               aBottomEdgeOfChildren,
@@ -789,16 +791,23 @@ public:
     return 0 != (GetStateBits() & NS_BLOCK_HAS_OVERFLOW_LINES);
   }
   FrameLines* GetOverflowLines() const;
 protected:
   FrameLines* RemoveOverflowLines();
   void SetOverflowLines(FrameLines* aOverflowLines);
   void DestroyOverflowLines();
 
+  // Determine the computed height that's in effect for this block
+  // frame (that is, our computed height minus the heights of our
+  // previous in-flows).
+  // XXXbz this clearly makes laying out a block with N in-flows
+  // O(N^2)!  Good thing the constant is tiny.
+  nscoord GetEffectiveComputedHeight(const nsHTMLReflowState& aReflowState) const;
+
   /**
    * This class is useful for efficiently modifying the out of flow
    * overflow list. It gives the client direct writable access to
    * the frame list temporarily but ensures that property is only
    * written back if absolutely necessary.
    */
   struct nsAutoOOFFrameList {
     nsFrameList mList;
--- a/layout/generic/nsBlockReflowState.cpp
+++ b/layout/generic/nsBlockReflowState.cpp
@@ -30,28 +30,26 @@
 using namespace mozilla;
 using namespace mozilla::layout;
 
 nsBlockReflowState::nsBlockReflowState(const nsHTMLReflowState& aReflowState,
                                        nsPresContext* aPresContext,
                                        nsBlockFrame* aFrame,
                                        bool aTopMarginRoot,
                                        bool aBottomMarginRoot,
-                                       bool aBlockNeedsFloatManager,
-                                       nscoord aConsumedHeight)
+                                       bool aBlockNeedsFloatManager)
   : mBlock(aFrame),
     mPresContext(aPresContext),
     mReflowState(aReflowState),
     mPushedFloats(nullptr),
     mOverflowTracker(nullptr),
     mPrevBottomMargin(),
     mLineNumber(0),
     mFlags(0),
-    mFloatBreakType(NS_STYLE_CLEAR_NONE),
-    mConsumedHeight(aConsumedHeight)
+    mFloatBreakType(NS_STYLE_CLEAR_NONE)
 {
   SetFlag(BRS_ISFIRSTINFLOW, aFrame->GetPrevInFlow() == nullptr);
   SetFlag(BRS_ISOVERFLOWCONTAINER,
           IS_TRUE_OVERFLOW_CONTAINER(aFrame));
 
   const nsMargin& borderPadding = BorderPadding();
 
   if (aTopMarginRoot || 0 != aReflowState.mComputedBorderPadding.top) {
@@ -110,26 +108,16 @@ nsBlockReflowState::nsBlockReflowState(c
   mY = mContentArea.y = borderPadding.top;
 
   mPrevChild = nullptr;
   mCurrentLine = aFrame->end_lines();
 
   mMinLineHeight = aReflowState.CalcLineHeight();
 }
 
-nscoord
-nsBlockReflowState::GetConsumedHeight()
-{
-  if (mConsumedHeight == NS_INTRINSICSIZE) {
-    mConsumedHeight = mBlock->GetConsumedHeight();
-  }
-
-  return mConsumedHeight;
-}
-
 void
 nsBlockReflowState::ComputeReplacedBlockOffsetsForFloats(nsIFrame* aFrame,
                                                          const nsRect& aFloatAvailableSpace,
                                                          nscoord& aLeftResult,
                                                          nscoord& aRightResult)
 {
   // The frame is clueless about the float manager and therefore we
   // only give it free space. An example is a table frame - the
--- a/layout/generic/nsBlockReflowState.h
+++ b/layout/generic/nsBlockReflowState.h
@@ -35,18 +35,17 @@ class nsOverflowContinuationTracker;
 #define BRS_LASTFLAG              BRS_PROPTABLE_FLOATCLIST
 
 class nsBlockReflowState {
 public:
   nsBlockReflowState(const nsHTMLReflowState& aReflowState,
                      nsPresContext* aPresContext,
                      nsBlockFrame* aFrame,
                      bool aTopMarginRoot, bool aBottomMarginRoot,
-                     bool aBlockNeedsFloatManager,
-                     nscoord aConsumedHeight = NS_INTRINSICSIZE);
+                     bool aBlockNeedsFloatManager);
 
   /**
    * Get the available reflow space (the area not occupied by floats)
    * for the current y coordinate. The available space is relative to
    * our coordinate system, which is the content box, with (0, 0) in the
    * upper left.
    *
    * Returns whether there are floats present at the given vertical
@@ -106,21 +105,16 @@ public:
       result.top = 0;
       if (mFlags & BRS_ISOVERFLOWCONTAINER) {
         result.bottom = 0;
       }
     }
     return result;
   }
 
-  /**
-   * Retrieve the height "consumed" by any previous-in-flows.
-   */
-  nscoord GetConsumedHeight();
-
   // Reconstruct the previous bottom margin that goes above |aLine|.
   void ReconstructMarginAbove(nsLineList::iterator aLine);
 
   // Caller must have called GetAvailableSpace for the correct position
   // (which need not be the current mY).
   void ComputeReplacedBlockOffsetsForFloats(nsIFrame* aFrame,
                                             const nsRect& aFloatAvailableSpace,
                                             nscoord& aLeftResult,
@@ -258,19 +252,16 @@ public:
   nscoord mMinLineHeight;
 
   int32_t mLineNumber;
 
   int16_t mFlags;
  
   uint8_t mFloatBreakType;
 
-  // The amount of computed height "consumed" by previous-in-flows.
-  nscoord mConsumedHeight;
-
   void SetFlag(uint32_t aFlag, bool aValue)
   {
     NS_ASSERTION(aFlag<=BRS_LASTFLAG, "bad flag");
     if (aValue) { // set flag
       mFlags |= aFlag;
     }
     else {        // unset flag
       mFlags &= ~aFlag;
--- a/layout/generic/nsColumnSetFrame.cpp
+++ b/layout/generic/nsColumnSetFrame.cpp
@@ -141,27 +141,26 @@ GetAvailableContentWidth(const nsHTMLRef
     return NS_INTRINSICSIZE;
   }
   nscoord borderPaddingWidth =
     aReflowState.mComputedBorderPadding.left +
     aReflowState.mComputedBorderPadding.right;
   return std::max(0, aReflowState.availableWidth - borderPaddingWidth);
 }
 
-nscoord
-nsColumnSetFrame::GetAvailableContentHeight(const nsHTMLReflowState& aReflowState)
+static nscoord
+GetAvailableContentHeight(const nsHTMLReflowState& aReflowState)
 {
   if (aReflowState.availableHeight == NS_INTRINSICSIZE) {
     return NS_INTRINSICSIZE;
   }
-
-  nsMargin bp = aReflowState.mComputedBorderPadding;
-  ApplySkipSides(bp, &aReflowState);
-  bp.bottom = aReflowState.mComputedBorderPadding.bottom;
-  return std::max(0, aReflowState.availableHeight - bp.TopBottom());
+  nscoord borderPaddingHeight =
+    aReflowState.mComputedBorderPadding.top +
+    aReflowState.mComputedBorderPadding.bottom;
+  return std::max(0, aReflowState.availableHeight - borderPaddingHeight);
 }
 
 static nscoord
 GetColumnGap(nsColumnSetFrame*    aFrame,
              const nsStyleColumn* aColStyle)
 {
   if (eStyleUnit_Normal == aColStyle->mColumnGap.GetUnit())
     return aFrame->StyleFont()->mFont.size;
@@ -185,30 +184,21 @@ nsColumnSetFrame::ChooseColumnStrategy(c
   nscoord knownFeasibleHeight = aFeasibleHeight;
   nscoord knownInfeasibleHeight = aInfeasibleHeight;
 
   const nsStyleColumn* colStyle = StyleColumn();
   nscoord availContentWidth = GetAvailableContentWidth(aReflowState);
   if (aReflowState.ComputedWidth() != NS_INTRINSICSIZE) {
     availContentWidth = aReflowState.ComputedWidth();
   }
-
-  nscoord consumedHeight = GetConsumedHeight();
-
-  // The effective computed height is the height of the current continuation
-  // of the column set frame. This should be the same as the computed height
-  // if we have an unconstrained available height.
-  nscoord computedHeight = GetEffectiveComputedHeight(aReflowState,
-                                                      consumedHeight);
   nscoord colHeight = GetAvailableContentHeight(aReflowState);
-
   if (aReflowState.ComputedHeight() != NS_INTRINSICSIZE) {
     colHeight = aReflowState.ComputedHeight();
   } else if (aReflowState.mComputedMaxHeight != NS_INTRINSICSIZE) {
-    colHeight = std::min(colHeight, aReflowState.mComputedMaxHeight);
+    colHeight = aReflowState.mComputedMaxHeight;
   }
 
   nscoord colGap = GetColumnGap(this, colStyle);
   int32_t numColumns = colStyle->mColumnCount;
 
   // If column-fill is set to 'balance', then we want to balance the columns.
   const bool isBalancing = colStyle->mColumnFill == NS_STYLE_COLUMN_FILL_BALANCE
                            && !aForceAuto;
@@ -307,17 +297,17 @@ nsColumnSetFrame::ChooseColumnStrategy(c
   }
 
 #ifdef DEBUG_roc
   printf("*** nsColumnSetFrame::ChooseColumnStrategy: numColumns=%d, colWidth=%d, expectedWidthLeftOver=%d, colHeight=%d, colGap=%d\n",
          numColumns, colWidth, expectedWidthLeftOver, colHeight, colGap);
 #endif
   ReflowConfig config = { numColumns, colWidth, expectedWidthLeftOver, colGap,
                           colHeight, isBalancing, knownFeasibleHeight,
-                          knownInfeasibleHeight, computedHeight, consumedHeight };
+                          knownInfeasibleHeight };
   return config;
 }
 
 bool
 nsColumnSetFrame::ReflowColumns(nsHTMLReflowMetrics& aDesiredSize,
                                 const nsHTMLReflowState& aReflowState,
                                 nsReflowStatus& aReflowStatus,
                                 ReflowConfig& aConfig,
@@ -458,18 +448,17 @@ nsColumnSetFrame::ReflowChildren(nsHTMLR
     // We need a way to do an incremental reflow and be sure availableHeight
     // changes are taken account of! Right now I think block frames with absolute
     // children might exit early.
     //NS_ASSERTION(aKidReason != eReflowReason_Incremental,
     //             "incremental reflow should not have changed the balance height");
   }
 
   // get our border and padding
-  nsMargin borderPadding = aReflowState.mComputedBorderPadding;
-  ApplySkipSides(borderPadding, &aReflowState);
+  const nsMargin &borderPadding = aReflowState.mComputedBorderPadding;
   
   nsRect contentRect(0, 0, 0, 0);
   nsOverflowAreas overflowRects;
 
   nsIFrame* child = mFrames.FirstChild();
   nsPoint childOrigin = nsPoint(borderPadding.left, borderPadding.top);
   // For RTL, figure out where the last column's left edge should be. Since the
   // columns might not fill the frame exactly, we need to account for the
@@ -730,42 +719,40 @@ nsColumnSetFrame::ReflowChildren(nsHTMLR
   mLastFrameStatus = aStatus;
   
   // contentRect included the borderPadding.left,borderPadding.top of the child rects
   contentRect -= nsPoint(borderPadding.left, borderPadding.top);
   
   nsSize contentSize = nsSize(contentRect.XMost(), contentRect.YMost());
 
   // Apply computed and min/max values
-  if (aConfig.mComputedHeight != NS_INTRINSICSIZE) {
-    if (aReflowState.availableHeight != NS_INTRINSICSIZE) {
-      contentSize.height = std::min(contentSize.height,
-                                    aConfig.mComputedHeight);
-    } else {
-      contentSize.height = aConfig.mComputedHeight;
-    }
+  if (aReflowState.ComputedHeight() != NS_INTRINSICSIZE) {
+    contentSize.height = aReflowState.ComputedHeight();
   } else {
-    // We add the "consumed" height back in so that we're applying
-    // constraints to the correct height value, then subtract it again
-    // after we've finished with the min/max calculation. This prevents us from
-    // having a last continuation that is smaller than the min height. but which
-    // has prev-in-flows, trigger a larger height than actually required.
-    contentSize.height = aReflowState.ApplyMinMaxHeight(contentSize.height,
-                                                        aConfig.mConsumedHeight);
+    if (NS_UNCONSTRAINEDSIZE != aReflowState.mComputedMaxHeight) {
+      contentSize.height = std::min(aReflowState.mComputedMaxHeight, contentSize.height);
+    }
+    if (NS_UNCONSTRAINEDSIZE != aReflowState.mComputedMinHeight) {
+      contentSize.height = std::max(aReflowState.mComputedMinHeight, contentSize.height);
+    }
   }
   if (aReflowState.ComputedWidth() != NS_INTRINSICSIZE) {
     contentSize.width = aReflowState.ComputedWidth();
   } else {
-    contentSize.width = aReflowState.ApplyMinMaxWidth(contentSize.width);
+    if (NS_UNCONSTRAINEDSIZE != aReflowState.mComputedMaxWidth) {
+      contentSize.width = std::min(aReflowState.mComputedMaxWidth, contentSize.width);
+    }
+    if (NS_UNCONSTRAINEDSIZE != aReflowState.mComputedMinWidth) {
+      contentSize.width = std::max(aReflowState.mComputedMinWidth, contentSize.width);
+    }
   }
-
-  aDesiredSize.height = contentSize.height +
-                        borderPadding.TopBottom();
-  aDesiredSize.width = contentSize.width +
-                       borderPadding.LeftRight();
+    
+  aDesiredSize.height = borderPadding.top + contentSize.height +
+    borderPadding.bottom;
+  aDesiredSize.width = contentSize.width + borderPadding.left + borderPadding.right;
   aDesiredSize.mOverflowAreas = overflowRects;
   aDesiredSize.UnionOverflowAreasWithDesiredBounds();
 
 #ifdef DEBUG_roc
   printf("*** DONE PASS feasible=%d\n", allFit && NS_FRAME_IS_FULLY_COMPLETE(aStatus)
          && !NS_FRAME_IS_TRUNCATED(aStatus));
 #endif
   return allFit && NS_FRAME_IS_FULLY_COMPLETE(aStatus)
@@ -806,23 +793,17 @@ nsColumnSetFrame::FindBestBalanceHeight(
                                         ColumnBalanceData& aColData,
                                         nsHTMLReflowMetrics& aDesiredSize,
                                         nsCollapsingMargin& aOutMargin,
                                         bool& aUnboundedLastColumn,
                                         bool& aRunWasFeasible,
                                         nsReflowStatus& aStatus)
 {
   bool feasible = aRunWasFeasible;
-
-  nsMargin bp = aReflowState.mComputedBorderPadding;
-  ApplySkipSides(bp);
-  bp.bottom = aReflowState.mComputedBorderPadding.bottom;
-
-  nscoord availableContentHeight =
-    GetAvailableContentHeight(aReflowState);
+  nscoord availableContentHeight = GetAvailableContentHeight(aReflowState);
 
   // Termination of the algorithm below is guaranteed because
   // aConfig.knownFeasibleHeight - aConfig.knownInfeasibleHeight decreases in every
   // iteration.
 
   // We set this flag when we detect that we may contain a frame
   // that can break anywhere (thus foiling the linear decrease-by-one
   // search)
@@ -868,16 +849,17 @@ nsColumnSetFrame::FindBestBalanceHeight(
     printf("*** nsColumnSetFrame::Reflow balancing knownInfeasible=%d knownFeasible=%d\n",
            aConfig.mKnownInfeasibleHeight, aConfig.mKnownFeasibleHeight);
 #endif
 
 
     if (aConfig.mKnownInfeasibleHeight >= aConfig.mKnownFeasibleHeight - 1) {
       // aConfig.mKnownFeasibleHeight is where we want to be
       break;
+
     }
 
     if (aConfig.mKnownInfeasibleHeight >= availableContentHeight) {
       break;
     }
 
     if (lastKnownFeasibleHeight - aConfig.mKnownFeasibleHeight == 1) {
       // We decreased the feasible height by one twip only. This could
@@ -970,17 +952,17 @@ nsColumnSetFrame::Reflow(nsPresContext* 
   DISPLAY_REFLOW(aPresContext, this, aReflowState, aDesiredSize, aStatus);
 
   // Initialize OUT parameter
   aStatus = NS_FRAME_COMPLETE;
 
   // Our children depend on our height if we have a fixed height.
   if (aReflowState.ComputedHeight() != NS_AUTOHEIGHT) {
     NS_ASSERTION(aReflowState.ComputedHeight() != NS_INTRINSICSIZE,
-                 "Unexpected computed height");
+                 "Unexpected mComputedHeight");
     AddStateBits(NS_FRAME_CONTAINS_RELATIVE_HEIGHT);
   }
   else {
     RemoveStateBits(NS_FRAME_CONTAINS_RELATIVE_HEIGHT);
   }
 
   //------------ Handle Incremental Reflow -----------------
 
--- a/layout/generic/nsColumnSetFrame.h
+++ b/layout/generic/nsColumnSetFrame.h
@@ -41,22 +41,16 @@ public:
                            nsIFrame*       aPrevFrame,
                            nsFrameList&    aFrameList) MOZ_OVERRIDE;
   NS_IMETHOD  RemoveFrame(ChildListID     aListID,
                           nsIFrame*       aOldFrame) MOZ_OVERRIDE;
 
   virtual nscoord GetMinWidth(nsRenderingContext *aRenderingContext) MOZ_OVERRIDE;
   virtual nscoord GetPrefWidth(nsRenderingContext *aRenderingContext) MOZ_OVERRIDE;
 
-  /**
-   * Retrieve the available height for content of this frame. The available content
-   * height is the available height for the frame, minus borders and padding.
-   */
-  virtual nscoord GetAvailableContentHeight(const nsHTMLReflowState& aReflowState);
-
   virtual nsIFrame* GetContentInsertionFrame() MOZ_OVERRIDE {
     nsIFrame* frame = GetFirstPrincipalChild();
 
     // if no children return nullptr
     if (!frame)
       return nullptr;
 
     return frame->GetContentInsertionFrame();
@@ -124,24 +118,16 @@ protected:
 
     // The last known column height that was 'feasible'. A column height is
     // feasible if all child content fits within the specified height.
     nscoord mKnownFeasibleHeight;
 
     // The last known height that was 'infeasible'. A column height is
     // infeasible if not all child content fits within the specified height.
     nscoord mKnownInfeasibleHeight;
-
-    // Height of the column set frame
-    nscoord mComputedHeight;
-
-    // The height "consumed" by previous-in-flows.
-    // The computed height should be equal to the height of the element (i.e.
-    // the computed height itself) plus the consumed height.
-    nscoord mConsumedHeight;
   };
 
   /**
    * Some data that is better calculated during reflow
    */
   struct ColumnBalanceData {
     // The maximum "content height" of any column
     nscoord mMaxHeight;
--- a/layout/generic/nsFlexContainerFrame.cpp
+++ b/layout/generic/nsFlexContainerFrame.cpp
@@ -1095,17 +1095,17 @@ nsFlexContainerFrame::SortChildrenIfNeed
 nsIAtom*
 nsFlexContainerFrame::GetType() const
 {
   return nsGkAtoms::flexContainerFrame;
 }
 
 /* virtual */
 int
-nsFlexContainerFrame::GetSkipSides(const nsHTMLReflowState* aReflowState) const
+nsFlexContainerFrame::GetSkipSides() const
 {
   // (same as nsBlockFrame's GetSkipSides impl)
   if (IS_TRUE_OVERFLOW_CONTAINER(this)) {
     return (1 << NS_SIDE_TOP) | (1 << NS_SIDE_BOTTOM);
   }
 
   int skip = 0;
   if (GetPrevInFlow()) {
--- a/layout/generic/nsFlexContainerFrame.h
+++ b/layout/generic/nsFlexContainerFrame.h
@@ -45,17 +45,17 @@ public:
                     nsReflowStatus&          aStatus) MOZ_OVERRIDE;
 
   virtual nscoord
     GetMinWidth(nsRenderingContext* aRenderingContext) MOZ_OVERRIDE;
   virtual nscoord
     GetPrefWidth(nsRenderingContext* aRenderingContext) MOZ_OVERRIDE;
 
   virtual nsIAtom* GetType() const MOZ_OVERRIDE;
-  virtual int GetSkipSides(const nsHTMLReflowState* aReflowState = nullptr) const MOZ_OVERRIDE;
+  virtual int GetSkipSides() const MOZ_OVERRIDE;
 #ifdef DEBUG
   NS_IMETHOD GetFrameName(nsAString& aResult) const MOZ_OVERRIDE;
 #endif // DEBUG
   // Flexbox-specific public methods
   bool IsHorizontal();
 
 protected:
   // Protected constructor & destructor
--- a/layout/generic/nsFrame.cpp
+++ b/layout/generic/nsFrame.cpp
@@ -953,20 +953,19 @@ nsIFrame::GetUsedPadding() const
 #endif
     StylePadding()->GetPadding(padding);
     NS_ASSERTION(hasPadding, "We should have padding here! (out of memory?)");
   }
   return padding;
 }
 
 void
-nsIFrame::ApplySkipSides(nsMargin& aMargin,
-                         const nsHTMLReflowState* aReflowState) const
-{
-  int skipSides = GetSkipSides(aReflowState);
+nsIFrame::ApplySkipSides(nsMargin& aMargin) const
+{
+  int skipSides = GetSkipSides();
   if (skipSides & (1 << NS_SIDE_TOP))
     aMargin.top = 0;
   if (skipSides & (1 << NS_SIDE_RIGHT))
     aMargin.right = 0;
   if (skipSides & (1 << NS_SIDE_BOTTOM))
     aMargin.bottom = 0;
   if (skipSides & (1 << NS_SIDE_LEFT))
     aMargin.left = 0;
--- a/layout/generic/nsHTMLReflowState.h
+++ b/layout/generic/nsHTMLReflowState.h
@@ -475,38 +475,25 @@ public:
    * size computed so far.
    */
   nscoord ApplyMinMaxWidth(nscoord aWidth) const {
     if (NS_UNCONSTRAINEDSIZE != mComputedMaxWidth) {
       aWidth = std::min(aWidth, mComputedMaxWidth);
     }
     return std::max(aWidth, mComputedMinWidth);
   }
-
   /**
    * Apply the mComputed(Min/Max)Height constraints to the content
    * size computed so far.
-   *
-   * @param aHeight The height that we've computed an to which we want to apply
-   *        min/max constraints.
-   * @param aConsumed The amount of the computed height that was consumed by
-   *        our prev-in-flows.
    */
-  nscoord ApplyMinMaxHeight(nscoord aHeight, nscoord aConsumed = 0) const {
-    aHeight += aConsumed;
-
+  nscoord ApplyMinMaxHeight(nscoord aHeight) const {
     if (NS_UNCONSTRAINEDSIZE != mComputedMaxHeight) {
       aHeight = std::min(aHeight, mComputedMaxHeight);
     }
-
-    if (NS_UNCONSTRAINEDSIZE != mComputedMinHeight) {
-      aHeight = std::max(aHeight, mComputedMinHeight);
-    }
-
-    return aHeight - aConsumed;
+    return std::max(aHeight, mComputedMinHeight);
   }
 
   bool ShouldReflowAllKids() const {
     // Note that we could make a stronger optimization for mVResize if
     // we use it in a ShouldReflowChild test that replaces the current
     // checks of NS_FRAME_IS_DIRTY | NS_FRAME_HAS_DIRTY_CHILDREN, if it
     // were tested there along with NS_FRAME_CONTAINS_RELATIVE_HEIGHT.
     // This would need to be combined with a slight change in which
--- a/layout/generic/nsIFrame.h
+++ b/layout/generic/nsIFrame.h
@@ -980,31 +980,18 @@ public:
 
   nsMargin GetUsedBorderAndPadding() const {
     return GetUsedBorder() + GetUsedPadding();
   }
 
   /**
    * Apply the result of GetSkipSides() on this frame to an nsMargin by
    * setting to zero any sides that are skipped.
-   *
-   * @param aMargin The margin to apply the result of GetSkipSides() to.
-   * @param aReflowState An optional reflow state parameter, which is used if
-   *        ApplySkipSides() is being called in the middle of reflow.
-   *
-   * @note (See also bug 743402, comment 11) GetSkipSides() and it's sister
-   *       method, ApplySkipSides() checks to see if this frame has a previous
-   *       or next continuation to determine if a side should be skipped.
-   *       Unfortunately, this only works after reflow has been completed. In
-   *       lieu of this, during reflow, an nsHTMLReflowState parameter can be
-   *       passed in, indicating that it should be used to determine if sides
-   *       should be skipped during reflow.
    */
-  void ApplySkipSides(nsMargin& aMargin,
-                      const nsHTMLReflowState* aReflowState = nullptr) const;
+  void ApplySkipSides(nsMargin& aMargin) const;
 
   /**
    * Like the frame's rect (see |GetRect|), which is the border rect,
    * other rectangles of the frame, in app units, relative to the parent.
    */
   nsRect GetPaddingRect() const;
   nsRect GetPaddingRectRelativeToSelf() const;
   nsRect GetContentRect() const;
@@ -2414,26 +2401,18 @@ public:
    * Removes any stored overflow rects (visual and scrollable) from the frame.
    * Returns true if the overflow changed.
    */
   bool ClearOverflowRects();
 
   /**
    * Determine whether borders should not be painted on certain sides of the
    * frame.
-   *
-   * @note (See also bug 743402, comment 11) GetSkipSides() and it's sister
-   *       method, ApplySkipSides() checks to see if this frame has a previous
-   *       or next continuation to determine if a side should be skipped.
-   *       Unfortunately, this only works after reflow has been completed. In
-   *       lieu of this, during reflow, an nsHTMLReflowState parameter can be
-   *       passed in, indicating that it should be used to determine if sides
-   *       should be skipped during reflow.
    */
-  virtual int GetSkipSides(const nsHTMLReflowState* aReflowState = nullptr) const { return 0; }
+  virtual int GetSkipSides() const { return 0; }
 
   /**
    * @returns true if this frame is selected.
    */
   bool IsSelected() const {
     return (GetContent() && GetContent()->IsSelectionDescendant()) ?
       IsFrameSelected() : false;
   }
--- a/layout/generic/nsImageFrame.cpp
+++ b/layout/generic/nsImageFrame.cpp
@@ -1766,17 +1766,17 @@ nsImageFrame::List(FILE* out, int32_t aI
       fprintf(out, " [src=%s]", uristr.get());
     }
   }
   fputs("\n", out);
 }
 #endif
 
 int
-nsImageFrame::GetSkipSides(const nsHTMLReflowState* aReflowState) const
+nsImageFrame::GetSkipSides() const
 {
   int skip = 0;
   if (nullptr != GetPrevInFlow()) {
     skip |= 1 << NS_SIDE_TOP;
   }
   if (nullptr != GetNextInFlow()) {
     skip |= 1 << NS_SIDE_BOTTOM;
   }
--- a/layout/generic/nsImageFrame.h
+++ b/layout/generic/nsImageFrame.h
@@ -111,17 +111,17 @@ public:
     return ImageFrameSuper::IsFrameOfType(aFlags & ~(nsIFrame::eReplaced));
   }
 
 #ifdef DEBUG
   NS_IMETHOD GetFrameName(nsAString& aResult) const;
   void List(FILE* out, int32_t aIndent, uint32_t aFlags = 0) const;
 #endif
 
-  virtual int GetSkipSides(const nsHTMLReflowState* aReflowState = nullptr) const MOZ_OVERRIDE;
+  virtual int GetSkipSides() const MOZ_OVERRIDE;
 
   nsresult GetIntrinsicImageSize(nsSize& aSize);
 
   static void ReleaseGlobals() {
     if (gIconLoad) {
       gIconLoad->Shutdown();
       NS_RELEASE(gIconLoad);
     }
--- a/layout/generic/nsInlineFrame.cpp
+++ b/layout/generic/nsInlineFrame.cpp
@@ -842,17 +842,17 @@ nsInlineFrame::PushFrames(nsPresContext*
     aState.mLineLayout->SetDirtyNextLine();
   }
 }
 
 
 //////////////////////////////////////////////////////////////////////
 
 int
-nsInlineFrame::GetSkipSides(const nsHTMLReflowState* aReflowState) const
+nsInlineFrame::GetSkipSides() const
 {
   int skip = 0;
   if (!IsLeftMost()) {
     nsInlineFrame* prev = (nsInlineFrame*) GetPrevContinuation();
     if ((GetStateBits() & NS_INLINE_FRAME_BIDI_VISUAL_STATE_IS_SET) ||
         (prev && (prev->mRect.height || prev->mRect.width))) {
       // Prev continuation is not empty therefore we don't render our left
       // border edge.
--- a/layout/generic/nsInlineFrame.h
+++ b/layout/generic/nsInlineFrame.h
@@ -131,17 +131,17 @@ protected:
       mLineContainer = nullptr;
       mLineLayout = nullptr;
       mSetParentPointer = false;
     }
   };
 
   nsInlineFrame(nsStyleContext* aContext) : nsContainerFrame(aContext) {}
 
-  virtual int GetSkipSides(const nsHTMLReflowState* aReflowState = nullptr) const MOZ_OVERRIDE;
+  virtual int GetSkipSides() const MOZ_OVERRIDE;
 
   nsresult ReflowFrames(nsPresContext* aPresContext,
                         const nsHTMLReflowState& aReflowState,
                         InlineReflowState& rs,
                         nsHTMLReflowMetrics& aMetrics,
                         nsReflowStatus& aStatus);
 
   nsresult ReflowInlineFrame(nsPresContext* aPresContext,
--- a/layout/generic/nsSplittableFrame.cpp
+++ b/layout/generic/nsSplittableFrame.cpp
@@ -7,17 +7,16 @@
  * base class for rendering objects that can be split across lines,
  * columns, or pages
  */
 
 #include "nsSplittableFrame.h"
 #include "nsIContent.h"
 #include "nsPresContext.h"
 #include "nsStyleContext.h"
-#include "nsContainerFrame.h"
 
 NS_IMPL_FRAMEARENA_HELPERS(nsSplittableFrame)
 
 void
 nsSplittableFrame::Init(nsIContent*      aContent,
                         nsIFrame*        aParent,
                         nsIFrame*        aPrevInFlow)
 {
@@ -199,140 +198,16 @@ nsSplittableFrame::RemoveFromFlow(nsIFra
       nextContinuation->SetPrevContinuation(prevContinuation);
     }
   }
 
   aFrame->SetPrevInFlow(nullptr);
   aFrame->SetNextInFlow(nullptr);
 }
 
-nscoord
-nsSplittableFrame::GetConsumedHeight() const
-{
-  nscoord height = 0;
-
-  // Reduce the height by the computed height of prev-in-flows.
-  for (nsIFrame* prev = GetPrevInFlow(); prev; prev = prev->GetPrevInFlow()) {
-    height += prev->GetRect().height;
-  }
-
-  return height;
-}
-
-nscoord
-nsSplittableFrame::GetEffectiveComputedHeight(const nsHTMLReflowState& aReflowState,
-                                              nscoord aConsumedHeight) const
-{
-  nscoord height = aReflowState.ComputedHeight();
-  if (height == NS_INTRINSICSIZE) {
-    return NS_INTRINSICSIZE;
-  }
-
-  if (aConsumedHeight == NS_INTRINSICSIZE) {
-    aConsumedHeight = GetConsumedHeight();
-  }
-
-  height -= aConsumedHeight;
-
-  if (aConsumedHeight != 0 && aConsumedHeight != NS_INTRINSICSIZE) {
-    // We just subtracted our top-border padding, since it was included in the
-    // first frame's height. Add it back to get the content height.
-    height += aReflowState.mComputedBorderPadding.top;
-  }
-
-  // We may have stretched the frame beyond its computed height. Oh well.
-  height = std::max(0, height);
-
-  return height;
-}
-
-void
-nsSplittableFrame::ComputeFinalHeight(const nsHTMLReflowState& aReflowState,
-                                      nsReflowStatus*          aStatus,
-                                      nscoord                  aContentHeight,
-                                      const nsMargin&          aBorderPadding,
-                                      nsHTMLReflowMetrics&     aMetrics,
-                                      nscoord                  aConsumed)
-{
-
-  // Figure out how much of the computed height should be
-  // applied to this frame.
-  nscoord computedHeightLeftOver = GetEffectiveComputedHeight(aReflowState,
-                                                              aConsumed);
-  NS_ASSERTION(!( IS_TRUE_OVERFLOW_CONTAINER(this)
-                  && computedHeightLeftOver ),
-               "overflow container must not have computedHeightLeftOver");
-
-  aMetrics.height =
-    NSCoordSaturatingAdd(NSCoordSaturatingAdd(aBorderPadding.top,
-                                              computedHeightLeftOver),
-                         aBorderPadding.bottom);
-
-  if (NS_FRAME_IS_NOT_COMPLETE(*aStatus)
-      && aMetrics.height < aReflowState.availableHeight) {
-    // We ran out of height on this page but we're incomplete
-    // Set status to complete except for overflow
-    NS_FRAME_SET_OVERFLOW_INCOMPLETE(*aStatus);
-  }
-
-  if (NS_FRAME_IS_COMPLETE(*aStatus)) {
-    if (computedHeightLeftOver > 0 &&
-        NS_UNCONSTRAINEDSIZE != aReflowState.availableHeight &&
-        aMetrics.height > aReflowState.availableHeight) {
-      // We don't fit and we consumed some of the computed height,
-      // so we should consume all the available height and then
-      // break.  If our bottom border/padding straddles the break
-      // point, then this will increase our height and push the
-      // border/padding to the next page/column.
-      aMetrics.height = std::max(aReflowState.availableHeight,
-                                 aContentHeight);
-      NS_FRAME_SET_INCOMPLETE(*aStatus);
-      if (!GetNextInFlow())
-        *aStatus |= NS_FRAME_REFLOW_NEXTINFLOW;
-    }
-  }
-}
-
-int
-nsSplittableFrame::GetSkipSides(const nsHTMLReflowState* aReflowState) const
-{
-  if (IS_TRUE_OVERFLOW_CONTAINER(this)) {
-    return (1 << NS_SIDE_TOP) | (1 << NS_SIDE_BOTTOM);
-  }
-
-  int skip = 0;
-
-  if (GetPrevInFlow()) {
-    skip |= 1 << NS_SIDE_TOP;
-  }
-
-  if (aReflowState) {
-    // We're in the midst of reflow right now, so it's possible that we haven't
-    // created a nif yet. If our content height is going to exceed our available
-    // height, though, then we're going to need a next-in-flow, it just hasn't
-    // been created yet.
-
-    if (NS_UNCONSTRAINEDSIZE != aReflowState->availableHeight) {
-      nscoord effectiveCH = this->GetEffectiveComputedHeight(*aReflowState);
-      if (effectiveCH > aReflowState->availableHeight) {
-        // Our content height is going to exceed our available height, so we're
-        // going to need a next-in-flow.
-        skip |= 1 << NS_SIDE_BOTTOM;
-      }
-    }
-  } else {
-    nsIFrame* nif = GetNextInFlow();
-    if (nif && !IS_TRUE_OVERFLOW_CONTAINER(nif)) {
-      skip |= 1 << NS_SIDE_BOTTOM;
-    }
-  }
-
- return skip;
-}
-
 #ifdef DEBUG
 void
 nsSplittableFrame::DumpBaseRegressionData(nsPresContext* aPresContext, FILE* out, int32_t aIndent)
 {
   nsFrame::DumpBaseRegressionData(aPresContext, out, aIndent);
   if (nullptr != mNextContinuation) {
     IndentBy(out, aIndent);
     fprintf(out, "<next-continuation va=\"%p\"/>\n", (void*)mNextContinuation);
--- a/layout/generic/nsSplittableFrame.h
+++ b/layout/generic/nsSplittableFrame.h
@@ -71,64 +71,16 @@ public:
 
   // Remove the frame from the flow. Connects the frame's prev-in-flow
   // and its next-in-flow. This should only be called in frame Destroy() methods.
   static void RemoveFromFlow(nsIFrame* aFrame);
 
 protected:
   nsSplittableFrame(nsStyleContext* aContext) : nsFrame(aContext) {}
 
-  /**
-   * Determine the height consumed by our previous-in-flows.
-   *
-   * @note (bz) This makes laying out a splittable frame with N in-flows
-   *       O(N^2)! So, use this function with caution and minimize the number
-   *       of calls to this method.
-   */
-  nscoord GetConsumedHeight() const;
-
-  /**
-   * Retrieve the effective computed height of this frame, which is the computed
-   * height, minus the height consumed by any previous in-flows.
-   */
-  nscoord GetEffectiveComputedHeight(const nsHTMLReflowState& aReflowState,
-                                     nscoord aConsumed = NS_INTRINSICSIZE) const;
-
-  /**
-   * Compute the final height of this frame.
-   *
-   * @param aReflowState Data structure passed from parent during reflow.
-   * @param aReflowStatus A pointed to the reflow status for when we're finished
-   *        doing reflow. this will get set appropriately if the height causes
-   *        us to exceed the current available (page) height.
-   * @param aContentHeight The height of content, precomputed outside of this
-   *        function. The final height that is used in aMetrics will be set to
-   *        either this or the available height, whichever is larger, in the
-   *        case where our available height is constrained, and we overflow that
-   *        available height.
-   * @param aBorderPadding The margins representing the border padding for block
-   *        frames. Can be 0.
-   * @param aMetrics Out parameter for final height. Taken as an
-   *        nsHTMLReflowMetrics object so that aMetrics can be passed in
-   *        directly during reflow.
-   * @param aConsumed The height already consumed by our previous-in-flows.
-   */
-  void ComputeFinalHeight(const nsHTMLReflowState& aReflowState,
-                          nsReflowStatus*          aStatus,
-                          nscoord                  aContentHeight,
-                          const nsMargin&          aBorderPadding,
-                          nsHTMLReflowMetrics&     aMetrics,
-                          nscoord                  aConsumed);
-
-  /**
-   * @see nsIFrame::GetSkipSides()
-   * @see nsIFrame::ApplySkipSides()
-   */
-  virtual int GetSkipSides(const nsHTMLReflowState* aReflowState = nullptr) const;
-
 #ifdef DEBUG
   virtual void DumpBaseRegressionData(nsPresContext* aPresContext, FILE* out, int32_t aIndent) MOZ_OVERRIDE;
 #endif
 
   nsIFrame*   mPrevContinuation;
   nsIFrame*   mNextContinuation;
 };
 
--- a/layout/reftests/columns/columnrule-padding-ref.html
+++ b/layout/reftests/columns/columnrule-padding-ref.html
@@ -1,30 +1,29 @@
 <body style="overflow:hidden">
 <div style="position: absolute;
   top: 40px; left: 337px;
   width: 6px;
-  background-color: green;
+  background-color: red;
   height: 100px;">
 </div>
 <div style="position: absolute;
   top: 40px; left: 637px;
   width: 6px;
-  background-color: green;
+  background-color: red;
   height: 100px;">
 </div>
 <div style="position: absolute;
   top: 40px; left: 937px;
   width: 6px;
-  background-color: green;
+  background-color: red;
   height: 100px;">
 </div>
 <div style="position: absolute;
   top: 40px; left: 40px;
-  height: 100px;
   -moz-column-count: 4;
   -moz-column-gap: 0px;">
 <div style="height:400px;
   width: 300px;
   font-size: 16px;">
 Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Sed feugiat libero vel diam. Pellentesque pulvinar commodo lacus. Sed fringilla. Sed lectus. Praesent laoreet orci vitae nisi. Duis venenatis tristique massa.
 </div>
 </div>
--- a/layout/reftests/columns/columnrule-padding.html
+++ b/layout/reftests/columns/columnrule-padding.html
@@ -1,15 +1,14 @@
-<!doctype html>
 <body style="overflow:hidden">
 <div style="padding: 20px;
   position: absolute;
   top: 20px; left: 20px;
   -moz-column-count: 4;
   -moz-column-gap: 0px;
-  -moz-column-rule: 6px green solid;">
+  -moz-column-rule: 6px red solid;">
 <div style="height:400px;
   width: 300px;
   font-size: 16px;">
 Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Sed feugiat libero vel diam. Pellentesque pulvinar commodo lacus. Sed fringilla. Sed lectus. Praesent laoreet orci vitae nisi. Duis venenatis tristique massa.
 </div>
 </div>
 </body>
deleted file mode 100644
--- a/layout/reftests/w3c-css/submitted/multicol3/multicol-height-001.xht
+++ /dev/null
@@ -1,44 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
- <head class="reftest-print">
-  <title>CSS Test: Percentage Computed Height on Multicol Child (Definite Multicol Height)</title>
-  <link rel="author" title="Elika J. Etemad" href="http://fantasai.inkedblade.net/contact" />
-  <link rel="help" href="http://www.w3.org/TR/css3-multicol/#the-multi-column-model" />
-  <link rel="help" href="http://www.w3.org/TR/CSS21/visudet.html#the-height-property"/>
-  <meta name="flags" content="" />
-  <meta name="assert" content="Percentage heights with a multi-column element are relative to the computed height of the multicolumn box, and this works even when the multi-column element is paginated." />
-  <link rel="match" href="reference/multicol-height-001.xht" />
-  <style type="text/css"><![CDATA[
-    html, body { height: 100%; }
-    * { margin: 0; }
-    div {
-      border: double blue 12px;
-      -moz-column-count:2;
-      -moz-column-gap:0;
-      -moz-column-fill: balance;
-      height: 150%;
-    }
-    div > p {
-      border-right: solid orange 12px;
-      width: 0;
-      margin: 0 auto;
-      height: 200%;
-    }
-    blockquote {
-      border: solid thick yellow;
-    }
-  ]]></style>
- </head>
- <body>
-  <p>Test passes if even when printed:</p>
-  <ul>
-    <li>Two vertical orange stripes stretch exactly
-    from the inner top edge to the inner bottom edge of the blue box below.</li>
-    <li>There is a yellow stripe immediately below the blue box.</li>
-  </ul>
-  <div>
-    <p></p>
-  </div>
-  <blockquote></blockquote>
- </body>
-</html>
deleted file mode 100644
--- a/layout/reftests/w3c-css/submitted/multicol3/reference/multicol-height-001.xht
+++ /dev/null
@@ -1,37 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
- <head class="reftest-print">
-  <title>CSS Reftest Reference</title>
-  <link rel="author" title="Elika J. Etemad" href="http://fantasai.inkedblade.net/contact" />
-  <style type="text/css"><![CDATA[
-    html, body { height: 100%; }
-    * { margin: 0; }
-    div {
-      border: double blue 12px;
-      height: 150%;
-      padding: 0 12px;
-    }
-    div > p {
-      border-right: solid orange 12px;
-      border-left: solid orange 12px;
-      width: 50%;
-      margin: 0 auto;
-      height: 100%;
-    }
-    blockquote {
-      border: solid thick yellow;
-    }  ]]></style>
- </head>
- <body>
-  <p>Test passes if even when printed:</p>
-  <ul>
-    <li>Two vertical orange stripes stretch exactly
-    from the inner top edge to the inner bottom edge of the blue box below.</li>
-    <li>There is a yellow stripe immediately below the blue box.</li>
-  </ul>
-  <div>
-    <p></p>
-  </div>
-  <blockquote></blockquote>
- </body>
-</html>
--- a/layout/reftests/w3c-css/submitted/multicol3/reftest.list
+++ b/layout/reftests/w3c-css/submitted/multicol3/reftest.list
@@ -1,2 +1,1 @@
 == moz-multicol3-column-balancing-break-inside-avoid-1.html moz-multicol3-column-balancing-break-inside-avoid-1-ref.html
-== multicol-height-001.xht reference/multicol-height-001.xht
--- a/layout/tables/nsTableCellFrame.cpp
+++ b/layout/tables/nsTableCellFrame.cpp
@@ -517,17 +517,17 @@ nsTableCellFrame::BuildDisplayList(nsDis
   // event handling. We do not call BuildDisplayListForNonBlockChildren
   // because that/ would put the child's background in the Content() list
   // which isn't right (e.g., would end up on top of our child floats for
   // event handling).
   BuildDisplayListForChild(aBuilder, kid, aDirtyRect, aLists);
 }
 
 int
-nsTableCellFrame::GetSkipSides(const nsHTMLReflowState* aReflowState) const
+nsTableCellFrame::GetSkipSides() const
 {
   int skip = 0;
   if (nullptr != GetPrevInFlow()) {
     skip |= 1 << NS_SIDE_TOP;
   }
   if (nullptr != GetNextInFlow()) {
     skip |= 1 << NS_SIDE_BOTTOM;
   }
--- a/layout/tables/nsTableCellFrame.h
+++ b/layout/tables/nsTableCellFrame.h
@@ -216,17 +216,17 @@ public:
     return nsContainerFrame::IsFrameOfType(aFlags & ~(nsIFrame::eTablePart));
   }
   
   virtual void InvalidateFrame(uint32_t aDisplayItemKey = 0) MOZ_OVERRIDE;
   virtual void InvalidateFrameWithRect(const nsRect& aRect, uint32_t aDisplayItemKey = 0) MOZ_OVERRIDE;
   virtual void InvalidateFrameForRemoval() MOZ_OVERRIDE { InvalidateFrameSubtree(); }
 
 protected:
-  virtual int GetSkipSides(const nsHTMLReflowState* aReflowState= nullptr) const MOZ_OVERRIDE;
+  virtual int GetSkipSides() const MOZ_OVERRIDE;
 
   /**
    * GetBorderOverflow says how far the cell's own borders extend
    * outside its own bounds.  In the separated borders model this should
    * just be zero (as it is for most frames), but in the collapsed
    * borders model (for which nsBCTableCellFrame overrides this virtual
    * method), it considers the extents of the collapsed border.
    */
--- a/layout/tables/nsTableColGroupFrame.cpp
+++ b/layout/tables/nsTableColGroupFrame.cpp
@@ -332,17 +332,17 @@ nsTableColGroupFrame::RemoveFrame(ChildL
   else {
     mFrames.DestroyFrame(aOldFrame);
   }
 
   return NS_OK;
 }
 
 int
-nsTableColGroupFrame::GetSkipSides(const nsHTMLReflowState* aReflowState) const
+nsTableColGroupFrame::GetSkipSides() const
 {
   int skip = 0;
   if (nullptr != GetPrevInFlow()) {
     skip |= 1 << NS_SIDE_TOP;
   }
   if (nullptr != GetNextInFlow()) {
     skip |= 1 << NS_SIDE_BOTTOM;
   }
--- a/layout/tables/nsTableColGroupFrame.h
+++ b/layout/tables/nsTableColGroupFrame.h
@@ -207,17 +207,17 @@ public:
   virtual void InvalidateFrameForRemoval() MOZ_OVERRIDE { InvalidateFrameSubtree(); }
 
 protected:
   nsTableColGroupFrame(nsStyleContext* aContext);
 
   void InsertColsReflow(int32_t                   aColIndex,
                         const nsFrameList::Slice& aCols);
 
-  virtual int GetSkipSides(const nsHTMLReflowState* aReflowState = nullptr) const MOZ_OVERRIDE;
+  virtual int GetSkipSides() const MOZ_OVERRIDE;
 
   // data members
   int32_t mColCount;
   // the starting column index this col group represents. Must be >= 0. 
   int32_t mStartColIndex;
 
   // border width in pixels
   BCPixelSize mTopContBorderWidth;
--- a/layout/tables/nsTableFrame.cpp
+++ b/layout/tables/nsTableFrame.cpp
@@ -1327,17 +1327,17 @@ nsTableFrame::PaintTableBorderBackground
       // But that would mean modifying PaintBCBorders, ugh
       nsRenderingContext::AutoPushTranslation translate(&aRenderingContext, aPt);
       PaintBCBorders(aRenderingContext, aDirtyRect - aPt);
     }
   }
 }
 
 int
-nsTableFrame::GetSkipSides(const nsHTMLReflowState* aReflowState) const
+nsTableFrame::GetSkipSides() const
 {
   int skip = 0;
   // frame attribute was accounted for in nsHTMLTableElement::MapTableBorderInto
   // account for pagination
   if (nullptr != GetPrevInFlow()) {
     skip |= 1 << NS_SIDE_TOP;
   }
   if (nullptr != GetNextInFlow()) {
--- a/layout/tables/nsTableFrame.h
+++ b/layout/tables/nsTableFrame.h
@@ -504,17 +504,17 @@ protected:
     */
   nsTableFrame(nsStyleContext* aContext);
 
   /** destructor, responsible for mColumnLayoutData */
   virtual ~nsTableFrame();
 
   void InitChildReflowState(nsHTMLReflowState& aReflowState);
 
-  virtual int GetSkipSides(const nsHTMLReflowState* aReflowState = nullptr) const MOZ_OVERRIDE;
+  virtual int GetSkipSides() const MOZ_OVERRIDE;
 
 public:
   bool IsRowInserted() const;
   void   SetRowInserted(bool aValue);
 
 protected:
     
   // A helper function to reflow a header or footer with unconstrained height
--- a/layout/tables/nsTableRowFrame.cpp
+++ b/layout/tables/nsTableRowFrame.cpp
@@ -587,17 +587,17 @@ nsTableRowFrame::BuildDisplayList(nsDisp
       item = new (aBuilder) nsDisplayTableRowBackground(aBuilder, this);
       aLists.BorderBackground()->AppendNewToTop(item);
     }
   }
   nsTableFrame::DisplayGenericTablePart(aBuilder, this, aDirtyRect, aLists, item);
 }
 
 int
-nsTableRowFrame::GetSkipSides(const nsHTMLReflowState* aReflowState) const
+nsTableRowFrame::GetSkipSides() const
 {
   int skip = 0;
   if (nullptr != GetPrevInFlow()) {
     skip |= 1 << NS_SIDE_TOP;
   }
   if (nullptr != GetNextInFlow()) {
     skip |= 1 << NS_SIDE_BOTTOM;
   }
--- a/layout/tables/nsTableRowFrame.h
+++ b/layout/tables/nsTableRowFrame.h
@@ -244,17 +244,17 @@ protected:
     */
   nsTableRowFrame(nsStyleContext *aContext);
 
   void InitChildReflowState(nsPresContext&         aPresContext,
                             const nsSize&           aAvailSize,
                             bool                    aBorderCollapse,
                             nsTableCellReflowState& aReflowState);
   
-  virtual int GetSkipSides(const nsHTMLReflowState* aReflowState = nullptr) const MOZ_OVERRIDE;
+  virtual int GetSkipSides() const MOZ_OVERRIDE;
 
   // row-specific methods
 
   nscoord ComputeCellXOffset(const nsHTMLReflowState& aState,
                              nsIFrame*                aKidFrame,
                              const nsMargin&          aKidMargin) const;
   /**
    * Called for incremental/dirty and resize reflows. If aDirtyOnly is true then
--- a/layout/tables/nsTableRowGroupFrame.cpp
+++ b/layout/tables/nsTableRowGroupFrame.cpp
@@ -239,17 +239,17 @@ nsTableRowGroupFrame::BuildDisplayList(n
       aLists.BorderBackground()->AppendNewToTop(item);
     }
   }  
   nsTableFrame::DisplayGenericTablePart(aBuilder, this, aDirtyRect,
                                         aLists, item, DisplayRows);
 }
 
 int
-nsTableRowGroupFrame::GetSkipSides(const nsHTMLReflowState* aReflowState) const
+nsTableRowGroupFrame::GetSkipSides() const
 {
   int skip = 0;
   if (nullptr != GetPrevInFlow()) {
     skip |= 1 << NS_SIDE_TOP;
   }
   if (nullptr != GetNextInFlow()) {
     skip |= 1 << NS_SIDE_BOTTOM;
   }
--- a/layout/tables/nsTableRowGroupFrame.h
+++ b/layout/tables/nsTableRowGroupFrame.h
@@ -338,17 +338,17 @@ public:
 
 protected:
   nsTableRowGroupFrame(nsStyleContext* aContext);
 
   void InitChildReflowState(nsPresContext&     aPresContext, 
                             bool               aBorderCollapse,
                             nsHTMLReflowState& aReflowState);
   
-  virtual int GetSkipSides(const nsHTMLReflowState* aReflowState = nullptr) const MOZ_OVERRIDE;
+  virtual int GetSkipSides() const MOZ_OVERRIDE;
 
   void PlaceChild(nsPresContext*         aPresContext,
                   nsRowGroupReflowState& aReflowState,
                   nsIFrame*              aKidFrame,
                   nsHTMLReflowMetrics&   aDesiredSize,
                   const nsRect&          aOriginalKidRect,
                   const nsRect&          aOriginalKidVisualOverflow);