From 17cb2cee954d7431d6dcc10911bbc834ff34dbfe Mon Sep 17 00:00:00 2001 From: "karnaze%netscape.com" Date: Thu, 11 Jan 2001 22:51:35 +0000 Subject: [PATCH] bug 56201 - allow cell to return larger desired size than avail during incremental reflow. sr=buster, r=peterl --- layout/html/table/src/nsTableCellFrame.cpp | 6 +++--- layout/tables/nsTableCellFrame.cpp | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/layout/html/table/src/nsTableCellFrame.cpp b/layout/html/table/src/nsTableCellFrame.cpp index 6f90182e4faa..276ff3d3c370 100644 --- a/layout/html/table/src/nsTableCellFrame.cpp +++ b/layout/html/table/src/nsTableCellFrame.cpp @@ -876,10 +876,10 @@ NS_METHOD nsTableCellFrame::Reflow(nsIPresContext* aPresContext, kidSize.width = PR_MAX(kidSize.width, smallestMinWidth); + if (eReflowReason_Resize == aReflowState.reason) { + NS_ASSERTION(kidSize.width <= availSize.width, "child needed more space during resize reflow"); + } // Place the child - //////////////////////////////// HACK ////////////////////////////// - kidSize.width = PR_MIN(kidSize.width, availSize.width); - ///////////////////////////// END HACK ///////////////////////////// FinishReflowChild(firstKid, aPresContext, kidSize, kidOrigin.x, kidOrigin.y, 0); diff --git a/layout/tables/nsTableCellFrame.cpp b/layout/tables/nsTableCellFrame.cpp index 6f90182e4faa..276ff3d3c370 100644 --- a/layout/tables/nsTableCellFrame.cpp +++ b/layout/tables/nsTableCellFrame.cpp @@ -876,10 +876,10 @@ NS_METHOD nsTableCellFrame::Reflow(nsIPresContext* aPresContext, kidSize.width = PR_MAX(kidSize.width, smallestMinWidth); + if (eReflowReason_Resize == aReflowState.reason) { + NS_ASSERTION(kidSize.width <= availSize.width, "child needed more space during resize reflow"); + } // Place the child - //////////////////////////////// HACK ////////////////////////////// - kidSize.width = PR_MIN(kidSize.width, availSize.width); - ///////////////////////////// END HACK ///////////////////////////// FinishReflowChild(firstKid, aPresContext, kidSize, kidOrigin.x, kidOrigin.y, 0);