Fix insertion of content into blocks with first-letter styles to put the frames

in the right place.  Bug 277686, r+sr=dbaron


git-svn-id: svn://10.0.0.236/trunk@168647 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
bzbarsky%mit.edu 2005-02-01 18:46:35 +00:00
parent 72bd005a24
commit 416b08acd9

View File

@ -9343,9 +9343,6 @@ nsCSSFrameConstructor::ContentInserted(nsPresContext* aPresContext,
// Get the correct parentFrame and prevSibling - if a
// letter-frame is present, use its parent.
if (parentFrame->GetType() == nsLayoutAtoms::letterFrame) {
if (prevSibling)
prevSibling = parentFrame;
parentFrame = parentFrame->GetParent();
}
@ -9378,6 +9375,14 @@ nsCSSFrameConstructor::ContentInserted(nsPresContext* aPresContext,
return NS_OK;
}
// Removing the letterframes messes around with the frame tree, removing
// and creating frames. We need to reget our prevsibling.
// See XXX comment the first time we do this in this method....
prevSibling = (aIndexInContainer >= 0)
? FindPreviousSibling(shell, container, parentFrame,
aIndexInContainer, aChild)
: FindPreviousAnonymousSibling(shell, mDocument, aContainer, aChild);
}
}