Bug 457514. If an out of flow first letter frame is the insertion parent, then use the placeholder frame to get the parent, not the out of flow frame. r=bz

--HG--
extra : rebase_source : 8913cd4c0484baecba53d239263a761b9c9dcf8b
This commit is contained in:
Timothy Nikkel 2009-10-15 21:48:44 -05:00
Родитель 40ffa23361
Коммит c8b9504038
1 изменённых файлов: 10 добавлений и 1 удалений

Просмотреть файл

@ -6674,7 +6674,16 @@ nsCSSFrameConstructor::ContentInserted(nsIContent* aContainer,
// If our current parentFrame is a Letter frame, use its parent as our
// new parent hint
if (parentFrame->GetType() == nsGkAtoms::letterFrame) {
parentFrame = parentFrame->GetParent();
// If parentFrame is out of flow, then we actually want the parent of
// the placeholder frame.
if (parentFrame->GetStateBits() & NS_FRAME_OUT_OF_FLOW) {
nsPlaceholderFrame* placeholderFrame =
state.mFrameManager->GetPlaceholderFrameFor(parentFrame);
NS_ASSERTION(placeholderFrame, "No placeholder for out-of-flow?");
parentFrame = placeholderFrame->GetParent();
} else {
parentFrame = parentFrame->GetParent();
}
}
// Remove the old letter frames before doing the insertion