From c57b75e7837261e5ffd75bc7dfa938e31ec09f15 Mon Sep 17 00:00:00 2001 From: "peterlubczynski%netscape.com" Date: Mon, 11 Sep 2000 22:58:59 +0000 Subject: [PATCH] Fix for bug 46368. Fixed cellMet.mMaximumWidth for incremental reflow. r=karnaze git-svn-id: svn://10.0.0.236/trunk@78792 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/layout/html/table/src/nsTableRowFrame.cpp | 12 ------------ mozilla/layout/tables/nsTableRowFrame.cpp | 12 ------------ 2 files changed, 24 deletions(-) diff --git a/mozilla/layout/html/table/src/nsTableRowFrame.cpp b/mozilla/layout/html/table/src/nsTableRowFrame.cpp index 877db326617..94692642fcf 100644 --- a/mozilla/layout/html/table/src/nsTableRowFrame.cpp +++ b/mozilla/layout/html/table/src/nsTableRowFrame.cpp @@ -1360,18 +1360,6 @@ NS_METHOD nsTableRowFrame::IR_TargetIsChild(nsIPresContext* aPresContext, // then inform the table that its maximum width needs to be recomputed ((nsTableCellFrame *)aNextFrame)->SetPass1MaxElementSize(kidMaxElementSize); if (cellMet.mFlags & NS_REFLOW_CALC_MAX_WIDTH) { - // If the cell is not auto-width, then the natural width is the - // desired width. XXX what about Pct width? - PRBool isAutoWidth = eStyleUnit_Auto == kidRS.mStylePosition->mWidth.GetUnit(); - - if (!isAutoWidth) { - // Reset the natural width to be the desired width - // XXX This isn't the best thing to do, but if we don't then the table - // layout strategy will compute a different maximum content width than we - // computed for the initial reflow. That's because the table layout - // strategy doesn't check whether the cell is auto-width... - cellMet.mMaximumWidth = PR_MIN(cellMet.mMaximumWidth, cellMet.width); - } ((nsTableCellFrame *)aNextFrame)->SetMaximumWidth(cellMet.mMaximumWidth); if (oldCellMaximumWidth != cellMet.mMaximumWidth) { aReflowState.tableFrame->InvalidateMaximumWidth(); diff --git a/mozilla/layout/tables/nsTableRowFrame.cpp b/mozilla/layout/tables/nsTableRowFrame.cpp index 877db326617..94692642fcf 100644 --- a/mozilla/layout/tables/nsTableRowFrame.cpp +++ b/mozilla/layout/tables/nsTableRowFrame.cpp @@ -1360,18 +1360,6 @@ NS_METHOD nsTableRowFrame::IR_TargetIsChild(nsIPresContext* aPresContext, // then inform the table that its maximum width needs to be recomputed ((nsTableCellFrame *)aNextFrame)->SetPass1MaxElementSize(kidMaxElementSize); if (cellMet.mFlags & NS_REFLOW_CALC_MAX_WIDTH) { - // If the cell is not auto-width, then the natural width is the - // desired width. XXX what about Pct width? - PRBool isAutoWidth = eStyleUnit_Auto == kidRS.mStylePosition->mWidth.GetUnit(); - - if (!isAutoWidth) { - // Reset the natural width to be the desired width - // XXX This isn't the best thing to do, but if we don't then the table - // layout strategy will compute a different maximum content width than we - // computed for the initial reflow. That's because the table layout - // strategy doesn't check whether the cell is auto-width... - cellMet.mMaximumWidth = PR_MIN(cellMet.mMaximumWidth, cellMet.width); - } ((nsTableCellFrame *)aNextFrame)->SetMaximumWidth(cellMet.mMaximumWidth); if (oldCellMaximumWidth != cellMet.mMaximumWidth) { aReflowState.tableFrame->InvalidateMaximumWidth();