From 7d2fbdcb39436849caefd7e30eee981f53aa7af8 Mon Sep 17 00:00:00 2001 From: "kipp%netscape.com" Date: Wed, 28 Oct 1998 21:10:20 +0000 Subject: [PATCH] Added code to honor constrained width git-svn-id: svn://10.0.0.236/trunk@13623 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/layout/html/base/src/nsBodyFrame.cpp | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/mozilla/layout/html/base/src/nsBodyFrame.cpp b/mozilla/layout/html/base/src/nsBodyFrame.cpp index c1d276731c2..1ae480d0ce2 100644 --- a/mozilla/layout/html/base/src/nsBodyFrame.cpp +++ b/mozilla/layout/html/base/src/nsBodyFrame.cpp @@ -116,12 +116,16 @@ nsBodyFrame::Reflow(nsIPresContext& aPresContext, const nsHTMLReflowState& aReflowState, nsReflowStatus& aStatus) { + NS_FRAME_TRACE(NS_FRAME_TRACE_CALLS, + ("enter nsBodyFrame::Reflow: maxSize=%d,%d reason=%d", + aReflowState.maxSize.width, + aReflowState.maxSize.height, + aReflowState.reason)); + const nsHTMLReflowState* rsp = &aReflowState; nsHTMLReflowState resizeReflowState(aReflowState); resizeReflowState.spaceManager = mSpaceManager; - NS_FRAME_TRACE_REFLOW_IN("nsBodyFrame::Reflow"); - aStatus = NS_FRAME_COMPLETE; // initialize out parameter #if 0 @@ -496,13 +500,21 @@ nsBodyFrame::GetColumnAvailSpace(nsIPresContext& aPresContext, } else { if (aReflowState.HaveConstrainedWidth()) { - result.width -= aBorderPadding.left + aBorderPadding.right; + result.width = aReflowState.minWidth + + aBorderPadding.left + aBorderPadding.right; } if (aReflowState.HaveConstrainedHeight()) { result.height -= aBorderPadding.top + aBorderPadding.bottom; } } + NS_FRAME_TRACE_MSG(NS_FRAME_TRACE_CALLS, + (": nsBodyFrame: columnAvailSpace=%d,%d [%s,%s]\n", + result.width, result.height, + aReflowState.HaveConstrainedWidth() + ? "constrained" : "not-constrained", + aReflowState.HaveConstrainedHeight() + ? "constrained" : "not-constrained")); return result; }