From c802915a2e9902408205fb58291135d50536b409 Mon Sep 17 00:00:00 2001 From: "kin%netscape.com" Date: Fri, 10 Dec 1999 18:41:43 +0000 Subject: [PATCH] Fix for bug #18622 (UMR in nsLineLayout::CanPlaceFrame) nsLineLayout::ReflowFrame() now sets some of the psd flags before calling aFrame->Reflow(). r=troy@netscape.com,norris@netscape.com a=chofmann@netscape.com --- layout/generic/nsLineLayout.cpp | 10 ++++++---- layout/html/base/src/nsLineLayout.cpp | 10 ++++++---- 2 files changed, 12 insertions(+), 8 deletions(-) diff --git a/layout/generic/nsLineLayout.cpp b/layout/generic/nsLineLayout.cpp index dd28f41c7cfb..66765a848c59 100644 --- a/layout/generic/nsLineLayout.cpp +++ b/layout/generic/nsLineLayout.cpp @@ -952,16 +952,18 @@ nsLineLayout::ReflowFrame(nsIFrame* aFrame, nscoord tx = x - psd->mReflowState->mComputedBorderPadding.left; nscoord ty = y - psd->mReflowState->mComputedBorderPadding.top; mSpaceManager->Translate(tx, ty); + + pfd->mIsTextFrame = PR_FALSE; + pfd->mIsLetterFrame = PR_FALSE; + pfd->mIsNonEmptyTextFrame = PR_FALSE; + pfd->mIsSticky = PR_FALSE; + aFrame->Reflow(mPresContext, metrics, reflowState, aReflowStatus); // XXX See if the frame is a placeholderFrame and if it is process // the floater. nsIAtom* frameType; aFrame->GetFrameType(&frameType); - pfd->mIsTextFrame = PR_FALSE; - pfd->mIsLetterFrame = PR_FALSE; - pfd->mIsNonEmptyTextFrame = PR_FALSE; - pfd->mIsSticky = PR_FALSE; if (frameType) { if (frameType == nsLayoutAtoms::placeholderFrame) { nsIFrame* outOfFlowFrame = ((nsPlaceholderFrame*)aFrame)->GetOutOfFlowFrame(); diff --git a/layout/html/base/src/nsLineLayout.cpp b/layout/html/base/src/nsLineLayout.cpp index dd28f41c7cfb..66765a848c59 100644 --- a/layout/html/base/src/nsLineLayout.cpp +++ b/layout/html/base/src/nsLineLayout.cpp @@ -952,16 +952,18 @@ nsLineLayout::ReflowFrame(nsIFrame* aFrame, nscoord tx = x - psd->mReflowState->mComputedBorderPadding.left; nscoord ty = y - psd->mReflowState->mComputedBorderPadding.top; mSpaceManager->Translate(tx, ty); + + pfd->mIsTextFrame = PR_FALSE; + pfd->mIsLetterFrame = PR_FALSE; + pfd->mIsNonEmptyTextFrame = PR_FALSE; + pfd->mIsSticky = PR_FALSE; + aFrame->Reflow(mPresContext, metrics, reflowState, aReflowStatus); // XXX See if the frame is a placeholderFrame and if it is process // the floater. nsIAtom* frameType; aFrame->GetFrameType(&frameType); - pfd->mIsTextFrame = PR_FALSE; - pfd->mIsLetterFrame = PR_FALSE; - pfd->mIsNonEmptyTextFrame = PR_FALSE; - pfd->mIsSticky = PR_FALSE; if (frameType) { if (frameType == nsLayoutAtoms::placeholderFrame) { nsIFrame* outOfFlowFrame = ((nsPlaceholderFrame*)aFrame)->GetOutOfFlowFrame();