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

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

Issue 9570038: Merge 109140 (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/before-child-anonymous-column-block-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 109435)
+++ Source/WebCore/rendering/RenderBlock.cpp (working copy)
@@ -374,8 +374,17 @@
ASSERT(!continuation()); // We don't yet support column spans that aren't immediate children of the multi-column block.
// The goal is to locate a suitable box in which to place our child.
- RenderBlock* beforeChildParent = toRenderBlock(beforeChild && beforeChild->parent()->isRenderBlock() ? beforeChild->parent() : lastChild());
-
+ RenderBlock* beforeChildParent = 0;
+ if (beforeChild) {
+ RenderObject* curr = beforeChild;
+ while (curr && curr->parent() != this)
+ curr = curr->parent();
+ beforeChildParent = toRenderBlock(curr);
+ ASSERT(beforeChildParent);
+ ASSERT(beforeChildParent->isAnonymousColumnsBlock() || beforeChildParent->isAnonymousColumnSpanBlock());
+ } else
+ beforeChildParent = toRenderBlock(lastChild());
+
// If the new child is floating or positioned it can just go in that block.
if (newChild->isFloatingOrPositioned()) {
beforeChildParent->addChildIgnoringAnonymousColumnBlocks(newChild, beforeChild);
« no previous file with comments | « LayoutTests/fast/multicol/span/before-child-anonymous-column-block-expected.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698