bug 85738 - added 3rd pass reflow for tables in pagination mode which specified heights. sr=attinasi, r=savulov

This commit is contained in:
karnaze@netscape.com
2001-08-08 01:13:35 +00:00
parent 04e9e14f22
commit 22e2fdee40
8 changed files with 294 additions and 148 deletions

View File

@@ -838,11 +838,18 @@ NS_METHOD nsTableCellFrame::Reflow(nsIPresContext* aPresContext,
// first, compute the height which can be set w/o being restricted by aMaxSize.height
nscoord cellHeight = kidSize.height;
if (NS_UNCONSTRAINEDSIZE != cellHeight) {
cellHeight += topInset + bottomInset;
}
cellHeight = nsTableFrame::RoundToPixel(cellHeight, p2t); // work around block rounding errors
// if the table allocated extra vertical space to row groups, rows, cells in pagination mode
// then use that height as the desired height unless the cell needs to split.
nsTableFrame* tableFrameFirstInFlow = (nsTableFrame*)tableFrame->GetFirstInFlow();
if ((NS_FRAME_COMPLETE == aStatus) && tableFrameFirstInFlow->IsThirdPassReflow()) {
cellHeight = PR_MAX(cellHeight, mRect.height);
}
// next determine the cell's width
nscoord cellWidth = kidSize.width; // at this point, we've factored in the cell's style attributes