From 911d3089e882db0de6c09bb8fee85ddf72747ced Mon Sep 17 00:00:00 2001 From: "kipp%netscape.com" Date: Fri, 29 Oct 1999 14:32:11 +0000 Subject: [PATCH] r=troy; use new line-layout api to help with some resize-reflow optimization bugs --- layout/generic/nsBRFrame.cpp | 6 ++++-- layout/html/base/src/nsBRFrame.cpp | 6 ++++-- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/layout/generic/nsBRFrame.cpp b/layout/generic/nsBRFrame.cpp index a26132032d89..9619a3d7cf86 100644 --- a/layout/generic/nsBRFrame.cpp +++ b/layout/generic/nsBRFrame.cpp @@ -103,8 +103,9 @@ BRFrame::Reflow(nsIPresContext& aPresContext, // Only when the BR is operating in a line-layout situation will it // behave like a BR. - if (nsnull != aReflowState.mLineLayout) { - if (aReflowState.mLineLayout->CanPlaceFloaterNow()) { + nsLineLayout* ll = aReflowState.mLineLayout; + if (ll) { + if (ll->CanPlaceFloaterNow()) { // If we can place a floater on the line now it means that the // line is effectively empty (there may be zero sized compressed // white-space frames on the line, but they are to be ignored). @@ -151,6 +152,7 @@ BRFrame::Reflow(nsIPresContext& aPresContext, aStatus = NS_INLINE_BREAK | NS_INLINE_BREAK_AFTER | NS_INLINE_MAKE_BREAK_TYPE(breakType); + ll->SetLineEndsInBR(PR_TRUE); } else { aStatus = NS_FRAME_COMPLETE; diff --git a/layout/html/base/src/nsBRFrame.cpp b/layout/html/base/src/nsBRFrame.cpp index a26132032d89..9619a3d7cf86 100644 --- a/layout/html/base/src/nsBRFrame.cpp +++ b/layout/html/base/src/nsBRFrame.cpp @@ -103,8 +103,9 @@ BRFrame::Reflow(nsIPresContext& aPresContext, // Only when the BR is operating in a line-layout situation will it // behave like a BR. - if (nsnull != aReflowState.mLineLayout) { - if (aReflowState.mLineLayout->CanPlaceFloaterNow()) { + nsLineLayout* ll = aReflowState.mLineLayout; + if (ll) { + if (ll->CanPlaceFloaterNow()) { // If we can place a floater on the line now it means that the // line is effectively empty (there may be zero sized compressed // white-space frames on the line, but they are to be ignored). @@ -151,6 +152,7 @@ BRFrame::Reflow(nsIPresContext& aPresContext, aStatus = NS_INLINE_BREAK | NS_INLINE_BREAK_AFTER | NS_INLINE_MAKE_BREAK_TYPE(breakType); + ll->SetLineEndsInBR(PR_TRUE); } else { aStatus = NS_FRAME_COMPLETE;