bug 2961 - table desired size considers pass1 size

This commit is contained in:
karnaze%netscape.com 1999-05-12 04:15:44 +00:00
Родитель a812de0cbe
Коммит 1d003a1433
2 изменённых файлов: 16 добавлений и 12 удалений

Просмотреть файл

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

Просмотреть файл

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