Fix for bug 102615: After changing font color, backspacing

to a previous line does not let caret
                    update position

Modified RemoveFrame() so that it generates a reflow
command when removing a <br> from an inline with a next-in-flow.

r=dbaron@fas.harvard.edu  sr=attinasi@netscape.com  a=scc@mozilla.org
This commit is contained in:
kin%netscape.com 2002-03-20 01:44:43 +00:00
parent fb795c0731
commit 9b16927a2b
2 changed files with 20 additions and 0 deletions

View File

@ -249,6 +249,16 @@ nsInlineFrame::RemoveFrame(nsIPresContext* aPresContext,
if (aOldFrame) {
// 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.
nsCOMPtr<nsIAtom> frameType;
aOldFrame->GetFrameType(getter_AddRefs(frameType));
if (frameType == nsLayoutAtoms::brFrame && mNextInFlow)
generateReflowCommand = PR_TRUE;
nsIFrame* oldFrameParent;
aOldFrame->GetParent(&oldFrameParent);
nsInlineFrame* parent = (nsInlineFrame*) oldFrameParent;

View File

@ -249,6 +249,16 @@ nsInlineFrame::RemoveFrame(nsIPresContext* aPresContext,
if (aOldFrame) {
// 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.
nsCOMPtr<nsIAtom> frameType;
aOldFrame->GetFrameType(getter_AddRefs(frameType));
if (frameType == nsLayoutAtoms::brFrame && mNextInFlow)
generateReflowCommand = PR_TRUE;
nsIFrame* oldFrameParent;
aOldFrame->GetParent(&oldFrameParent);
nsInlineFrame* parent = (nsInlineFrame*) oldFrameParent;