From faebb2c7a80cea17e79ef7ebb54bc079ed264a9c Mon Sep 17 00:00:00 2001 From: "bzbarsky%mit.edu" Date: Sun, 9 Jan 2005 21:23:43 +0000 Subject: [PATCH] Make scrollbox report the correct maximum width. Bug 276286, patch by bernd, r+sr=bzbarsky, a=asa --- layout/xul/base/src/nsBoxFrame.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/layout/xul/base/src/nsBoxFrame.cpp b/layout/xul/base/src/nsBoxFrame.cpp index 1dab3d4bace..440acc0dd0d 100644 --- a/layout/xul/base/src/nsBoxFrame.cpp +++ b/layout/xul/base/src/nsBoxFrame.cpp @@ -878,6 +878,10 @@ nsBoxFrame::Reflow(nsPresContext* aPresContext, aDesiredSize.mOverflowArea = *overflowArea; } + if(aDesiredSize.mFlags & NS_REFLOW_CALC_MAX_WIDTH) { + aDesiredSize.mMaximumWidth = prefSize.width; + } + // max sure the max element size reflects // our min width nscoord* maxElementWidth = state.GetMaxElementWidth();