bug 16284, 14159 nested auto table with percent cells was not growing auto table. nested coord or percent table was only getting min size.

git-svn-id: svn://10.0.0.236/trunk@51767 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
karnaze%netscape.com
1999-10-25 22:49:51 +00:00
parent bb554f06d2
commit f98a03f3ac
2 changed files with 18 additions and 10 deletions

View File

@@ -202,10 +202,14 @@ BasicTableLayoutStrategy::BalanceColumnWidths(nsIStyleContext* aTableSty
colFrame->SetWidth(PCT, WIDTH_NOT_SET);
colFrame->SetWidth(PCT_ADJ, WIDTH_NOT_SET);
}
// set PCT and PCT_ADJ widths on col frames and for an auto table return
// set PCT and PCT_ADJ widths on col frames. An auto table returns
// a new table width based on percent cells/cols if they exist
nscoord perAdjTableWidth = (maxWidth != NS_UNCONSTRAINEDSIZE)
? AssignPercentageColumnWidths(maxWidth - mCellSpacingTotal, tableIsAutoWidth) : 0;
nscoord perAdjTableWidth = 0;
if ((NS_UNCONSTRAINEDSIZE != maxWidth) || (tableIsAutoWidth)) {
// for an auto width table, use a large basis just so that the quirky
// auto table sizing will get as big as it should
perAdjTableWidth = AssignPercentageColumnWidths(maxWidth - mCellSpacingTotal, tableIsAutoWidth);
}
PRBool recomputedAdjMin = RecomputeAdjMinIfNecessary();
// set the table's columns to the min width
@@ -310,8 +314,8 @@ BasicTableLayoutStrategy::BalanceColumnWidths(nsIStyleContext* aTableSty
}
}
// if this is a nested table and pass1 reflow, we are done
if (maxWidth == NS_UNCONSTRAINEDSIZE) {
// if this is a nested non auto table and pass1 reflow, we are done
if ((maxWidth == NS_UNCONSTRAINEDSIZE) && (!tableIsAutoWidth)) {
return BCW_Wrapup(this, mTableFrame, allocTypes);
}