From e4ee61a82c7b5801400a41eae5e4dd1324b5422e Mon Sep 17 00:00:00 2001 From: "bzbarsky%mit.edu" Date: Fri, 3 Feb 2006 18:50:41 +0000 Subject: [PATCH] Fix bug 303039 -- make sure to get the right max-width even if we have no lines. r+sr=roc git-svn-id: svn://10.0.0.236/trunk@188867 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/layout/generic/nsBlockReflowState.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/mozilla/layout/generic/nsBlockReflowState.cpp b/mozilla/layout/generic/nsBlockReflowState.cpp index 6c80cb993f0..c0a35bf6472 100644 --- a/mozilla/layout/generic/nsBlockReflowState.cpp +++ b/mozilla/layout/generic/nsBlockReflowState.cpp @@ -165,7 +165,11 @@ nsBlockReflowState::nsBlockReflowState(const nsHTMLReflowState& aReflowState, mMaxElementWidth = 0; SetFlag(BRS_COMPUTEMAXWIDTH, (NS_REFLOW_CALC_MAX_WIDTH == (aMetrics.mFlags & NS_REFLOW_CALC_MAX_WIDTH))); - mMaximumWidth = 0; + + // Preset mMaximumWidth to our left border + padding. All the values we'll + // try to set it to already include that, and we depend on it always + // including the left border + padding in nsBlockFrame::ComputeFinalSize. + mMaximumWidth = BorderPadding().left; mMinLineHeight = nsHTMLReflowState::CalcLineHeight(mPresContext, aReflowState.rendContext,