Index: Source/WebCore/rendering/RenderBlock.cpp |
=================================================================== |
--- Source/WebCore/rendering/RenderBlock.cpp (revision 118027) |
+++ Source/WebCore/rendering/RenderBlock.cpp (working copy) |
@@ -5965,6 +5965,9 @@ |
remainingText->setFirstLetter(newFirstLetter); |
toRenderBoxModelObject(newFirstLetter)->setFirstLetterRemainingText(remainingText); |
} |
+ // To prevent removal of single anonymous block in RenderBlock::removeChild and causing |
+ // |nextSibling| to go stale, we remove the old first letter using removeChildNode first. |
+ firstLetterContainer->virtualChildren()->removeChildNode(firstLetterContainer, firstLetter); |
firstLetter->destroy(); |
firstLetter = newFirstLetter; |
firstLetterContainer->addChild(firstLetter, nextSibling); |