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();