Changed it so we get the computed width from the first-in-flow

This commit is contained in:
troy%netscape.com 1999-03-09 15:35:08 +00:00
parent 4e4dc0f626
commit 0cbeed3e6c
2 changed files with 16 additions and 4 deletions

View File

@ -2495,9 +2495,15 @@ NS_METHOD nsTableFrame::Reflow(nsIPresContext& aPresContext,
SetTableWidth(aPresContext);
}
// Constrain our reflow width to the computed table width
// Constrain our reflow width to the computed table width. Note: this is based
// on the width of the first-in-flow
nsHTMLReflowState reflowState(aReflowState);
reflowState.availableWidth = mRect.width;
if (mPrevInFlow) {
nsTableFrame* table = (nsTableFrame*)GetFirstInFlow();
reflowState.availableWidth = table->mRect.width;
} else {
reflowState.availableWidth = mRect.width;
}
rv = ResizeReflowPass2(aPresContext, aDesiredSize, reflowState, aStatus);
if (NS_FAILED(rv))
return rv;

View File

@ -2495,9 +2495,15 @@ NS_METHOD nsTableFrame::Reflow(nsIPresContext& aPresContext,
SetTableWidth(aPresContext);
}
// Constrain our reflow width to the computed table width
// Constrain our reflow width to the computed table width. Note: this is based
// on the width of the first-in-flow
nsHTMLReflowState reflowState(aReflowState);
reflowState.availableWidth = mRect.width;
if (mPrevInFlow) {
nsTableFrame* table = (nsTableFrame*)GetFirstInFlow();
reflowState.availableWidth = table->mRect.width;
} else {
reflowState.availableWidth = mRect.width;
}
rv = ResizeReflowPass2(aPresContext, aDesiredSize, reflowState, aStatus);
if (NS_FAILED(rv))
return rv;