in default 2-pass layout, tables with auto width and with all columns coord width now act like auto width tables,
not like specified width (which you might logically expect since all column widths are specified, but sadly that's not the way Nav or IE interprets this case. ) nsTableFrame's use of IsPseudoFrame has been removed. git-svn-id: svn://10.0.0.236/trunk@14095 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
@@ -2035,26 +2035,19 @@ PRBool BasicTableLayoutStrategy::BalanceColumnsConstrained( const nsHTMLReflowSt
|
||||
}
|
||||
|
||||
// second, fix up tables where column width attributes give us a table that is too wide or too narrow
|
||||
// IFF the table is NOT (auto-width && all columns have fixed width)
|
||||
PRInt32 numFixedColumns=0;
|
||||
PRInt32 *fixedColumns=nsnull;
|
||||
mTableFrame->GetColumnsByType(eStyleUnit_Coord, numFixedColumns, fixedColumns);
|
||||
if (!((PR_TRUE==aTableIsAutoWidth) && (numFixedColumns==mNumCols)))
|
||||
{
|
||||
nscoord computedWidth=0;
|
||||
for (PRInt32 i=0; i<mNumCols; i++) {
|
||||
computedWidth += mTableFrame->GetColumnWidth(i) + colInset;
|
||||
}
|
||||
if (computedWidth<aMaxWidth)
|
||||
{ // then widen the table because it's too narrow
|
||||
// do not widen auto-width tables, they shrinkwrap to their content's width
|
||||
if (PR_FALSE==aTableIsAutoWidth)
|
||||
AdjustTableThatIsTooNarrow(computedWidth, aMaxWidth);
|
||||
}
|
||||
else if (computedWidth>aMaxWidth)
|
||||
{ // then shrink the table width because its too wide
|
||||
AdjustTableThatIsTooWide(computedWidth, aMaxWidth, PR_FALSE);
|
||||
}
|
||||
nscoord computedWidth=0;
|
||||
for (PRInt32 i=0; i<mNumCols; i++) {
|
||||
computedWidth += mTableFrame->GetColumnWidth(i) + colInset;
|
||||
}
|
||||
if (computedWidth<aMaxWidth)
|
||||
{ // then widen the table because it's too narrow
|
||||
// do not widen auto-width tables, they shrinkwrap to their content's width
|
||||
if (PR_FALSE==aTableIsAutoWidth)
|
||||
AdjustTableThatIsTooNarrow(computedWidth, aMaxWidth);
|
||||
}
|
||||
else if (computedWidth>aMaxWidth)
|
||||
{ // then shrink the table width because its too wide
|
||||
AdjustTableThatIsTooWide(computedWidth, aMaxWidth, PR_FALSE);
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user