Bug 63895 (Part 4) - Propagate overflow of relatively positioned table parts to the table frame. r=dbaron

This commit is contained in:
Seth Fowler 2014-03-19 11:04:23 +08:00
parent ab2d9e71a6
commit 13ce20ef58
2 changed files with 10 additions and 4 deletions

View File

@ -1894,7 +1894,7 @@ nsresult nsTableFrame::Reflow(nsPresContext* aPresContext,
// If there are any relatively-positioned table parts, we need to reflow their
// absolutely-positioned descendants now that their dimensions are final.
FixupPositionedTableParts(aPresContext, aReflowState);
FixupPositionedTableParts(aPresContext, aDesiredSize, aReflowState);
// make sure the table overflow area does include the table rect.
nsRect tableRect(0, 0, aDesiredSize.Width(), aDesiredSize.Height()) ;
@ -1917,7 +1917,8 @@ nsresult nsTableFrame::Reflow(nsPresContext* aPresContext,
}
void
nsTableFrame::FixupPositionedTableParts(nsPresContext* aPresContext,
nsTableFrame::FixupPositionedTableParts(nsPresContext* aPresContext,
nsHTMLReflowMetrics& aDesiredSize,
const nsHTMLReflowState& aReflowState)
{
auto positionedParts =
@ -1965,6 +1966,11 @@ nsTableFrame::FixupPositionedTableParts(nsPresContext* aPresContext,
// Propagate updated overflow areas up the tree.
overflowTracker.Flush();
// Update our own overflow areas. (OverflowChangedTracker doesn't update the
// subtree root itself.)
aDesiredSize.SetOverflowAreasToDesiredBounds();
nsLayoutUtils::UnionChildOverflow(this, aDesiredSize.mOverflowAreas);
}
bool

View File

@ -572,8 +572,8 @@ protected:
* necessary because the dimensions of table parts may change after they've
* been reflowed (e.g. in AdjustForCollapsingRowsCols).
*/
void FixupPositionedTableParts(nsPresContext* aPresContext,
void FixupPositionedTableParts(nsPresContext* aPresContext,
nsHTMLReflowMetrics& aDesiredSize,
const nsHTMLReflowState& aReflowState);
// Clears the list of positioned table parts.