verify that proportionate-width columns (1* format, or COLS attribute)

get sized to at least their minimum width


git-svn-id: svn://10.0.0.236/trunk@8255 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
buster%netscape.com 1998-08-20 17:31:20 +00:00
parent cf540377a4
commit 0e5df88ea8
2 changed files with 24 additions and 0 deletions

View File

@ -1430,7 +1430,13 @@ PRBool BasicTableLayoutStrategy::BalanceColumnsTableFits(const nsReflowState& aR
{ // for every proportionally-sized column, set the col width to the computed width
ProportionalColumnLayoutStruct * info =
(ProportionalColumnLayoutStruct *)(proportionalColumnsList->ElementAt(i));
// verify that the computed width is at least the minimum width
nscoord computedColWidth = info->mProportion*widthPerSlice;
// compute the requested proportional width
nsTableColFrame *colFrame;
mTableFrame->GetColumnFrame(info->mColIndex, colFrame);
nscoord minColWidth = colFrame->GetMinColWidth();
computedColWidth = PR_MAX(computedColWidth, minColWidth);
mTableFrame->SetColumnWidth(info->mColIndex, computedColWidth);
if (gsDebug==PR_TRUE)
printf (" 3 proportional step 2: col %d given %d proportion of remaining space %d, set to width = %d\n",
@ -2010,7 +2016,13 @@ PRBool BasicTableLayoutStrategy::BalanceColumnsConstrained( const nsReflowState&
}
else
{
// compute the requested proportional width
nscoord computedColWidth = info->mProportion*widthPerSlice;
// verify that the computed width is at least the minimum width
nsTableColFrame *colFrame;
mTableFrame->GetColumnFrame(info->mColIndex, colFrame);
nscoord minColWidth = colFrame->GetMinColWidth();
computedColWidth = PR_MAX(computedColWidth, minColWidth);
mTableFrame->SetColumnWidth(info->mColIndex, computedColWidth);
if (gsDebug==PR_TRUE)
printf (" 4 proportion: col %d given %d proportion of remaining space %d, set to width = %d\n",

View File

@ -1430,7 +1430,13 @@ PRBool BasicTableLayoutStrategy::BalanceColumnsTableFits(const nsReflowState& aR
{ // for every proportionally-sized column, set the col width to the computed width
ProportionalColumnLayoutStruct * info =
(ProportionalColumnLayoutStruct *)(proportionalColumnsList->ElementAt(i));
// verify that the computed width is at least the minimum width
nscoord computedColWidth = info->mProportion*widthPerSlice;
// compute the requested proportional width
nsTableColFrame *colFrame;
mTableFrame->GetColumnFrame(info->mColIndex, colFrame);
nscoord minColWidth = colFrame->GetMinColWidth();
computedColWidth = PR_MAX(computedColWidth, minColWidth);
mTableFrame->SetColumnWidth(info->mColIndex, computedColWidth);
if (gsDebug==PR_TRUE)
printf (" 3 proportional step 2: col %d given %d proportion of remaining space %d, set to width = %d\n",
@ -2010,7 +2016,13 @@ PRBool BasicTableLayoutStrategy::BalanceColumnsConstrained( const nsReflowState&
}
else
{
// compute the requested proportional width
nscoord computedColWidth = info->mProportion*widthPerSlice;
// verify that the computed width is at least the minimum width
nsTableColFrame *colFrame;
mTableFrame->GetColumnFrame(info->mColIndex, colFrame);
nscoord minColWidth = colFrame->GetMinColWidth();
computedColWidth = PR_MAX(computedColWidth, minColWidth);
mTableFrame->SetColumnWidth(info->mColIndex, computedColWidth);
if (gsDebug==PR_TRUE)
printf (" 4 proportion: col %d given %d proportion of remaining space %d, set to width = %d\n",