mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-12-15 03:00:30 +00:00
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:
parent
fb795c0731
commit
9b16927a2b
@ -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;
|
||||
|
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user