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

This commit is contained in:
karnaze%netscape.com 1999-10-25 22:49:51 +00:00
Родитель ac8f37a098
Коммит a7b3246a33
2 изменённых файлов: 18 добавлений и 10 удалений

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

@ -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);
}

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

@ -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);
}