| Index: Source/WebCore/rendering/RenderBlock.cpp
|
| ===================================================================
|
| --- Source/WebCore/rendering/RenderBlock.cpp (revision 109418)
|
| +++ Source/WebCore/rendering/RenderBlock.cpp (working copy)
|
| @@ -456,7 +456,8 @@
|
| cloneBlock->setChildrenInline(childrenInline());
|
| }
|
| else {
|
| - cloneBlock = new (renderArena()) RenderBlock(node());
|
| + RenderObject* cloneRenderer = node()->createRenderer(renderArena(), style());
|
| + cloneBlock = toRenderBlock(cloneRenderer);
|
| cloneBlock->setStyle(style());
|
|
|
| // This takes care of setting the right value of childrenInline in case
|
| @@ -476,10 +477,16 @@
|
| if (!isAnonymousBlock())
|
| cloneBlock->setContinuation(oldCont);
|
|
|
| + if (!beforeChild && isAfterContent(lastChild()))
|
| + beforeChild = lastChild();
|
| +
|
| + // If we are moving inline children from |this| to cloneBlock, then we need
|
| + // to clear our line box tree.
|
| + if (beforeChild && childrenInline())
|
| + deleteLineBoxTree();
|
| +
|
| // Now take all of the children from beforeChild to the end and remove
|
| // them from |this| and place them in the clone.
|
| - if (!beforeChild && isAfterContent(lastChild()))
|
| - beforeChild = lastChild();
|
| moveChildrenTo(cloneBlock, beforeChild, 0, true);
|
|
|
| // Hook |clone| up as the continuation of the middle block.
|
|
|