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

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

Issue 10272008: Merge 113497 (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/1084/
Patch Set: Created 8 years, 8 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 | « Source/WebCore/rendering/RenderBlock.h ('k') | Source/WebCore/rendering/RenderBox.h » ('j') | 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 115615)
+++ Source/WebCore/rendering/RenderBlock.cpp (working copy)
@@ -690,7 +690,7 @@
RenderBlock* blockToSplit = toRenderBlock(beforeChild->parent());
if (blockToSplit->firstChild() != beforeChild) {
// We have to split the parentBlock into two blocks.
- RenderBlock* post = createAnonymousBlockWithSameTypeAs(blockToSplit);
+ RenderBlock* post = toRenderBlock(blockToSplit->createAnonymousBoxWithSameTypeAs(this));
post->setChildrenInline(blockToSplit->childrenInline());
RenderBlock* parentBlock = toRenderBlock(blockToSplit->parent());
parentBlock->children()->insertChildNode(parentBlock, post, blockToSplit->nextSibling());
@@ -6644,13 +6644,13 @@
inlineElementContinuation()->addFocusRingRects(rects, flooredLayoutPoint(additionalOffset + inlineElementContinuation()->containingBlock()->location() - location()));
}
-RenderBlock* RenderBlock::createAnonymousBlockWithSameTypeAs(RenderBlock* otherAnonymousBlock) const
+RenderBox* RenderBlock::createAnonymousBoxWithSameTypeAs(const RenderObject* parent) const
{
- if (otherAnonymousBlock->isAnonymousColumnsBlock())
- return createAnonymousColumnsBlock();
- if (otherAnonymousBlock->isAnonymousColumnSpanBlock())
- return createAnonymousColumnSpanBlock();
- return createAnonymousBlock(otherAnonymousBlock->style()->display());
+ if (isAnonymousColumnsBlock())
+ return createAnonymousColumnsWithParentRenderer(parent);
+ if (isAnonymousColumnSpanBlock())
+ return createAnonymousColumnSpanWithParentRenderer(parent);
+ return createAnonymousWithParentRendererAndDisplay(parent, style()->display());
}
bool RenderBlock::hasNextPage(LayoutUnit logicalOffset, PageBoundaryRule pageBoundaryRule) const
« no previous file with comments | « Source/WebCore/rendering/RenderBlock.h ('k') | Source/WebCore/rendering/RenderBox.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698