Bug 87543. Don't try to do arithmetic when psd->mRightEdge == NS_UNCONSTRAINEDSIZE. r=rbs, sr=attinasi

This commit is contained in:
waterson@netscape.com
2001-07-04 06:07:14 +00:00
parent c5a4a8f789
commit de37c8518d
2 changed files with 16 additions and 2 deletions

View File

@@ -847,10 +847,17 @@ nsLineLayout::ReflowFrame(nsIFrame* aFrame,
}
}
// Unless we're doing an unconstrained reflow, compute the
// containing block's width.
nscoord containingBlockWidth =
(NS_UNCONSTRAINEDSIZE != psd->mRightEdge)
? (psd->mRightEdge - psd->mLeftEdge)
: NS_UNCONSTRAINEDSIZE;
// Setup reflow state for reflowing the frame
nsHTMLReflowState reflowState(mPresContext, *psd->mReflowState,
aFrame, availSize,
(psd->mRightEdge - psd->mLeftEdge),
containingBlockWidth,
psd->mReflowState->availableHeight);
reflowState.reason = reason;
reflowState.mLineLayout = this;