From d2e02afe6c3be6d03869912b0860784399ff7d50 Mon Sep 17 00:00:00 2001 From: "smontagu%netscape.com" Date: Wed, 23 Apr 2003 00:24:24 +0000 Subject: [PATCH] Bug 170547 Caret is in the wrong place after deleting
  • 's. r+sr=kin. --- layout/generic/nsInlineFrame.cpp | 9 ++++----- layout/html/base/src/nsInlineFrame.cpp | 9 ++++----- 2 files changed, 8 insertions(+), 10 deletions(-) diff --git a/layout/generic/nsInlineFrame.cpp b/layout/generic/nsInlineFrame.cpp index 28cc7c3f6605..b2b98e5a1f36 100644 --- a/layout/generic/nsInlineFrame.cpp +++ b/layout/generic/nsInlineFrame.cpp @@ -249,13 +249,12 @@ nsInlineFrame::RemoveFrame(nsIPresContext* aPresContext, // Loop and destroy the frame and all of its continuations. PRBool generateReflowCommand = PR_FALSE; - // If the frame we are removing is a brFrame and we have a - // nextInFlow, we need a reflow so we can attempt to pull up - // any frames in the nextInFlow that can fit on the line - // the brFrame was on. + // If the frame we are removing is a brFrame, we need a reflow so + // the line the brFrame was on can attempt to pull up any frames + // that can fit from lines below it. nsCOMPtr frameType; aOldFrame->GetFrameType(getter_AddRefs(frameType)); - if (frameType == nsLayoutAtoms::brFrame && mNextInFlow) + if (frameType == nsLayoutAtoms::brFrame) generateReflowCommand = PR_TRUE; nsIFrame* oldFrameParent; diff --git a/layout/html/base/src/nsInlineFrame.cpp b/layout/html/base/src/nsInlineFrame.cpp index 28cc7c3f6605..b2b98e5a1f36 100644 --- a/layout/html/base/src/nsInlineFrame.cpp +++ b/layout/html/base/src/nsInlineFrame.cpp @@ -249,13 +249,12 @@ nsInlineFrame::RemoveFrame(nsIPresContext* aPresContext, // Loop and destroy the frame and all of its continuations. PRBool generateReflowCommand = PR_FALSE; - // If the frame we are removing is a brFrame and we have a - // nextInFlow, we need a reflow so we can attempt to pull up - // any frames in the nextInFlow that can fit on the line - // the brFrame was on. + // If the frame we are removing is a brFrame, we need a reflow so + // the line the brFrame was on can attempt to pull up any frames + // that can fit from lines below it. nsCOMPtr frameType; aOldFrame->GetFrameType(getter_AddRefs(frameType)); - if (frameType == nsLayoutAtoms::brFrame && mNextInFlow) + if (frameType == nsLayoutAtoms::brFrame) generateReflowCommand = PR_TRUE; nsIFrame* oldFrameParent;