From 7dcbe365fc7cbce7d28568c3c7c22689318ca730 Mon Sep 17 00:00:00 2001 From: "karnaze%netscape.com" Date: Fri, 13 Jul 2001 23:49:30 +0000 Subject: [PATCH] bug 89116 - rebalance table on cell incremental reflow when maximum width changes. sr=attinasi, r=alexsavulov. --- layout/html/table/src/nsTableRowFrame.cpp | 8 +++----- layout/tables/nsTableRowFrame.cpp | 8 +++----- 2 files changed, 6 insertions(+), 10 deletions(-) diff --git a/layout/html/table/src/nsTableRowFrame.cpp b/layout/html/table/src/nsTableRowFrame.cpp index 09d0d408804..e7d0984f87e 100644 --- a/layout/html/table/src/nsTableRowFrame.cpp +++ b/layout/html/table/src/nsTableRowFrame.cpp @@ -1128,11 +1128,9 @@ nsTableRowFrame::IR_TargetIsChild(nsIPresContext* aPresContext, // if the cell's desired size didn't changed, our height is unchanged aDesiredSize.mNothingChanged = PR_FALSE; PRInt32 rowSpan = aTableFrame.GetEffectiveRowSpan(*cellFrame); - if ((initCellDesSize.width == oldCellDesSize.width) && - (initCellDesSize.height == oldCellDesSize.height)) { - // XXX replace the line above with these two after testing the performance impact - //(initCellDesSize.height == oldCellDesSize.height) && - //!maxWidthChanged) { + if ((initCellDesSize.width == oldCellDesSize.width) && + (initCellDesSize.height == oldCellDesSize.height) && + (oldCellMaximumWidth == cellMet.mMaximumWidth)) { if (!hasVerticalAlignBaseline) { // only the cell's height matters aDesiredSize.mNothingChanged = PR_TRUE; } diff --git a/layout/tables/nsTableRowFrame.cpp b/layout/tables/nsTableRowFrame.cpp index 09d0d408804..e7d0984f87e 100644 --- a/layout/tables/nsTableRowFrame.cpp +++ b/layout/tables/nsTableRowFrame.cpp @@ -1128,11 +1128,9 @@ nsTableRowFrame::IR_TargetIsChild(nsIPresContext* aPresContext, // if the cell's desired size didn't changed, our height is unchanged aDesiredSize.mNothingChanged = PR_FALSE; PRInt32 rowSpan = aTableFrame.GetEffectiveRowSpan(*cellFrame); - if ((initCellDesSize.width == oldCellDesSize.width) && - (initCellDesSize.height == oldCellDesSize.height)) { - // XXX replace the line above with these two after testing the performance impact - //(initCellDesSize.height == oldCellDesSize.height) && - //!maxWidthChanged) { + if ((initCellDesSize.width == oldCellDesSize.width) && + (initCellDesSize.height == oldCellDesSize.height) && + (oldCellMaximumWidth == cellMet.mMaximumWidth)) { if (!hasVerticalAlignBaseline) { // only the cell's height matters aDesiredSize.mNothingChanged = PR_TRUE; }