fixed some nested table layout problems

This commit is contained in:
buster@netscape.com
1998-11-30 15:10:20 +00:00
parent e9b38f0c40
commit ec6e2ff575
4 changed files with 26 additions and 6 deletions
@@ -184,6 +184,9 @@ PRBool BasicTableLayoutStrategy::BalanceColumnWidths(nsIStyleContext *aTableStyl
nscoord specifiedTableWidth = 0; // not cached as a data member because it can vary depending on aMaxWidth
PRBool tableIsAutoWidth = nsTableFrame::TableIsAutoWidth(mTableFrame, aTableStyle, aReflowState, specifiedTableWidth);
// HACK! Fix TableIsAutoWidth to return the right width
if (specifiedTableWidth>aMaxWidth)
specifiedTableWidth = aMaxWidth;
if (NS_UNCONSTRAINEDSIZE==specifiedTableWidth)
{
specifiedTableWidth=0;
@@ -2030,7 +2033,7 @@ PRBool BasicTableLayoutStrategy::BalanceColumnsConstrained( const nsHTMLReflowSt
}
// second, fix up tables where column width attributes give us a table that is too wide or too narrow
nscoord computedWidth=0;
nscoord computedWidth=colInset;
for (PRInt32 i=0; i<mNumCols; i++) {
computedWidth += mTableFrame->GetColumnWidth(i) + colInset;
}