Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(292)

Unified Diff: Source/WebCore/rendering/RenderBlock.cpp

Issue 9562030: Merge 108543 (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/963/
Patch Set: Created 8 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « LayoutTests/fast/multicol/span/textbox-not-removed-crash-expected.txt ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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.
« no previous file with comments | « LayoutTests/fast/multicol/span/textbox-not-removed-crash-expected.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698