Bug 434733: Don't apply width on colgroups to columns that have their own width. r=dbaron
This commit is contained in:
@@ -273,14 +273,18 @@ BasicTableLayoutStrategy::ComputeColumnIntrinsicWidths(nsIRenderingContext* aRen
|
||||
// Consider the widths on the column-group. Note that we follow
|
||||
// what the HTML spec says here, and make the width apply to
|
||||
// each column in the group, not the group as a whole.
|
||||
// XXX Should we be doing this when we have widths on the column?
|
||||
NS_ASSERTION(colFrame->GetParent()->GetType() ==
|
||||
nsGkAtoms::tableColGroupFrame,
|
||||
"expected a column-group");
|
||||
colInfo = GetColWidthInfo(aRenderingContext, colFrame->GetParent());
|
||||
colFrame->AddCoords(colInfo.minCoord, colInfo.prefCoord,
|
||||
colInfo.hasSpecifiedWidth);
|
||||
colFrame->AddPrefPercent(colInfo.prefPercent);
|
||||
|
||||
// If column has width, column-group doesn't override width.
|
||||
if (colInfo.minCoord == 0 && colInfo.prefCoord == 0 &&
|
||||
colInfo.prefPercent == 0.0f) {
|
||||
NS_ASSERTION(colFrame->GetParent()->GetType() ==
|
||||
nsGkAtoms::tableColGroupFrame,
|
||||
"expected a column-group");
|
||||
colInfo = GetColWidthInfo(aRenderingContext, colFrame->GetParent());
|
||||
colFrame->AddCoords(colInfo.minCoord, colInfo.prefCoord,
|
||||
colInfo.hasSpecifiedWidth);
|
||||
colFrame->AddPrefPercent(colInfo.prefPercent);
|
||||
}
|
||||
|
||||
// Consider the contents of and the widths on the cells without
|
||||
// colspans.
|
||||
|
||||
Reference in New Issue
Block a user