mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-02-12 02:31:41 +00:00
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:
parent
ac8f37a098
commit
a7b3246a33
@ -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);
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user