tables can be used as rectangular items without content, bug 227123 r/sr=bzbarsky

This commit is contained in:
bmlk%gmx.de 2003-12-23 07:22:16 +00:00
parent 4a0aaeb2e9
commit 76cf6abfab
2 changed files with 16 additions and 2 deletions

View File

@ -3441,7 +3441,14 @@ nsTableFrame::CalcDesiredHeight(nsIPresContext* aPresContext,
nsAutoVoidArray rowGroups;
PRUint32 numRowGroups;
OrderRowGroups(rowGroups, numRowGroups, nsnull);
if (numRowGroups <= 0) return 0;
if (numRowGroups <= 0) {
// tables can be used as rectangular items without content
nscoord tableSpecifiedHeight = CalcBorderBoxHeight(aPresContext, aReflowState);
if ((NS_UNCONSTRAINEDSIZE != tableSpecifiedHeight) &&
(tableSpecifiedHeight > 0))
return tableSpecifiedHeight;
return 0;
}
nscoord desiredHeight = borderPadding.top + cellSpacingY + borderPadding.bottom;
for (PRUint32 rgX = 0; rgX < numRowGroups; rgX++) {

View File

@ -3441,7 +3441,14 @@ nsTableFrame::CalcDesiredHeight(nsIPresContext* aPresContext,
nsAutoVoidArray rowGroups;
PRUint32 numRowGroups;
OrderRowGroups(rowGroups, numRowGroups, nsnull);
if (numRowGroups <= 0) return 0;
if (numRowGroups <= 0) {
// tables can be used as rectangular items without content
nscoord tableSpecifiedHeight = CalcBorderBoxHeight(aPresContext, aReflowState);
if ((NS_UNCONSTRAINEDSIZE != tableSpecifiedHeight) &&
(tableSpecifiedHeight > 0))
return tableSpecifiedHeight;
return 0;
}
nscoord desiredHeight = borderPadding.top + cellSpacingY + borderPadding.bottom;
for (PRUint32 rgX = 0; rgX < numRowGroups; rgX++) {