Bug 743402, Part 4: Refactor ApplySkipSides() and GetSkipSides() to return the correct value during reflow by adding an optional nsHTMLReflowState parameter. [r=roc]
authorScott Johnson <sjohnson@mozilla.com>
Thu, 25 Jul 2013 10:34:27 -0500
changeset 140018 352501d3f390a01f44036782973c154a13f7b9ad
parent 140017 f1bd0ed5fb4e958815404e88244080d7e5e83b6f
child 140019 993dc8e10a424d1d537bf0f911934584463cde0e
push id25013
push userryanvm@gmail.com
push dateFri, 26 Jul 2013 14:47:14 +0000
treeherdermozilla-central@52f9e8ffe111 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersroc
bugs743402
milestone25.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 743402, Part 4: Refactor ApplySkipSides() and GetSkipSides() to return the correct value during reflow by adding an optional nsHTMLReflowState parameter. [r=roc]
layout/generic/nsBlockFrame.cpp
layout/generic/nsBlockFrame.h
layout/generic/nsFlexContainerFrame.cpp
layout/generic/nsFlexContainerFrame.h
layout/generic/nsFrame.cpp
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/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
@@ -5988,34 +5988,16 @@ 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;
--- a/layout/generic/nsBlockFrame.h
+++ b/layout/generic/nsBlockFrame.h
@@ -433,18 +433,16 @@ 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,
--- 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
+nsFlexContainerFrame::GetSkipSides(const nsHTMLReflowState* aReflowState) 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 MOZ_OVERRIDE;
+  virtual int GetSkipSides(const nsHTMLReflowState* aReflowState = nullptr) 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,19 +953,20 @@ 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
-{
-  int skipSides = GetSkipSides();
+nsIFrame::ApplySkipSides(nsMargin& aMargin,
+                         const nsHTMLReflowState* aReflowState) const
+{
+  int skipSides = GetSkipSides(aReflowState);
   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/nsIFrame.h
+++ b/layout/generic/nsIFrame.h
@@ -980,18 +980,31 @@ 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;
+  void ApplySkipSides(nsMargin& aMargin,
+                      const nsHTMLReflowState* aReflowState = nullptr) 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;
@@ -2401,18 +2414,26 @@ 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 { return 0; }
+  virtual int GetSkipSides(const nsHTMLReflowState* aReflowState = nullptr) 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
+nsImageFrame::GetSkipSides(const nsHTMLReflowState* aReflowState) 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 MOZ_OVERRIDE;
+  virtual int GetSkipSides(const nsHTMLReflowState* aReflowState = nullptr) 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
+nsInlineFrame::GetSkipSides(const nsHTMLReflowState* aReflowState) 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 MOZ_OVERRIDE;
+  virtual int GetSkipSides(const nsHTMLReflowState* aReflowState = nullptr) 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
@@ -239,16 +239,53 @@ nsSplittableFrame::GetEffectiveComputedH
   }
 
   // We may have stretched the frame beyond its computed height. Oh well.
   height = std::max(0, height);
 
   return height;
 }
 
+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
@@ -87,16 +87,22 @@ protected:
 
   /**
    * 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;
 
+  /**
+   * @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/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
+nsTableCellFrame::GetSkipSides(const nsHTMLReflowState* aReflowState) 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 MOZ_OVERRIDE;
+  virtual int GetSkipSides(const nsHTMLReflowState* aReflowState= nullptr) 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
+nsTableColGroupFrame::GetSkipSides(const nsHTMLReflowState* aReflowState) 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 MOZ_OVERRIDE;
+  virtual int GetSkipSides(const nsHTMLReflowState* aReflowState = nullptr) 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
+nsTableFrame::GetSkipSides(const nsHTMLReflowState* aReflowState) 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 MOZ_OVERRIDE;
+  virtual int GetSkipSides(const nsHTMLReflowState* aReflowState = nullptr) 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
+nsTableRowFrame::GetSkipSides(const nsHTMLReflowState* aReflowState) 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 MOZ_OVERRIDE;
+  virtual int GetSkipSides(const nsHTMLReflowState* aReflowState = nullptr) 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
+nsTableRowGroupFrame::GetSkipSides(const nsHTMLReflowState* aReflowState) 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 MOZ_OVERRIDE;
+  virtual int GetSkipSides(const nsHTMLReflowState* aReflowState = nullptr) const MOZ_OVERRIDE;
 
   void PlaceChild(nsPresContext*         aPresContext,
                   nsRowGroupReflowState& aReflowState,
                   nsIFrame*              aKidFrame,
                   nsHTMLReflowMetrics&   aDesiredSize,
                   const nsRect&          aOriginalKidRect,
                   const nsRect&          aOriginalKidVisualOverflow);