fixed calculation for width of auto-width cells in constrained layout

git-svn-id: svn://10.0.0.236/trunk@12040 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
buster%netscape.com 1998-10-06 08:00:07 +00:00
parent 7af035a69d
commit a7bcace080
2 changed files with 4 additions and 10 deletions

View File

@ -2171,12 +2171,9 @@ void BasicTableLayoutStrategy::DistributeRemainingSpace(nscoord aTableSpecified
// in an auto width table, the column cannot be wider than its max width
if (PR_TRUE==aTableIsAutoWidth)
{ // since the table shrinks to the content width, don't be wider than the content max width
nscoord newColWidth = PR_MIN(colWidth, colFrame->GetMaxColWidth());
aComputedTableWidth += newColWidth-colWidth;
colWidth = newColWidth;
colWidth = PR_MIN(colWidth, colFrame->GetMaxColWidth());
}
else
aComputedTableWidth += colWidth - startingColWidth;
aComputedTableWidth += colWidth - startingColWidth;
if (gsDebug==PR_TRUE)
printf(" distribute width to auto columns: column %d was %d, now set to %d\n",
colIndex, colFrame->GetEffectiveMaxColWidth(), colWidth);

View File

@ -2171,12 +2171,9 @@ void BasicTableLayoutStrategy::DistributeRemainingSpace(nscoord aTableSpecified
// in an auto width table, the column cannot be wider than its max width
if (PR_TRUE==aTableIsAutoWidth)
{ // since the table shrinks to the content width, don't be wider than the content max width
nscoord newColWidth = PR_MIN(colWidth, colFrame->GetMaxColWidth());
aComputedTableWidth += newColWidth-colWidth;
colWidth = newColWidth;
colWidth = PR_MIN(colWidth, colFrame->GetMaxColWidth());
}
else
aComputedTableWidth += colWidth - startingColWidth;
aComputedTableWidth += colWidth - startingColWidth;
if (gsDebug==PR_TRUE)
printf(" distribute width to auto columns: column %d was %d, now set to %d\n",
colIndex, colFrame->GetEffectiveMaxColWidth(), colWidth);