diff --git a/mozilla/layout/html/table/src/BasicTableLayoutStrategy.cpp b/mozilla/layout/html/table/src/BasicTableLayoutStrategy.cpp index a55729a544e..3ebcdc42071 100644 --- a/mozilla/layout/html/table/src/BasicTableLayoutStrategy.cpp +++ b/mozilla/layout/html/table/src/BasicTableLayoutStrategy.cpp @@ -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", diff --git a/mozilla/layout/tables/BasicTableLayoutStrategy.cpp b/mozilla/layout/tables/BasicTableLayoutStrategy.cpp index a55729a544e..3ebcdc42071 100644 --- a/mozilla/layout/tables/BasicTableLayoutStrategy.cpp +++ b/mozilla/layout/tables/BasicTableLayoutStrategy.cpp @@ -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",