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

Unified Diff: WebCore/rendering/RenderBlock.cpp

Issue 6097012: Merge 74981 - Merge 74743 (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/597/
Patch Set: Created 9 years, 11 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/platform/mac/fast/multicol/span/clone-anonymous-block-non-inline-child-crash-expected.txt ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: WebCore/rendering/RenderBlock.cpp
===================================================================
--- WebCore/rendering/RenderBlock.cpp (revision 75414)
+++ WebCore/rendering/RenderBlock.cpp (working copy)
@@ -389,10 +389,15 @@
RenderBlock* RenderBlock::clone() const
{
- RenderBlock* o = new (renderArena()) RenderBlock(node());
- o->setStyle(style());
- o->setChildrenInline(childrenInline());
- return o;
+ RenderBlock* cloneBlock;
+ if (isAnonymousBlock())
+ cloneBlock = createAnonymousBlock();
+ else {
+ cloneBlock = new (renderArena()) RenderBlock(node());
+ cloneBlock->setStyle(style());
+ }
+ cloneBlock->setChildrenInline(childrenInline());
+ return cloneBlock;
}
void RenderBlock::splitBlocks(RenderBlock* fromBlock, RenderBlock* toBlock,
@@ -400,13 +405,9 @@
RenderObject* beforeChild, RenderBoxModelObject* oldCont)
{
// Create a clone of this inline.
- RenderBlock* cloneBlock;
- if (isAnonymousBlock())
- cloneBlock = createAnonymousBlock();
- else {
- cloneBlock = clone();
+ RenderBlock* cloneBlock = clone();
+ if (!isAnonymousBlock())
cloneBlock->setContinuation(oldCont);
- }
// Now take all of the children from beforeChild to the end and remove
// them from |this| and place them in the clone.
@@ -431,7 +432,7 @@
// Create a new clone.
RenderBlock* cloneChild = cloneBlock;
- cloneBlock = blockCurr->isAnonymousBlock() ? blockCurr->createAnonymousBlock() : blockCurr->clone();
+ cloneBlock = blockCurr->clone();
// Insert our child clone as the first child.
cloneBlock->children()->appendChildNode(cloneBlock, cloneChild);
« no previous file with comments | « LayoutTests/platform/mac/fast/multicol/span/clone-anonymous-block-non-inline-child-crash-expected.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698