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

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

Issue 9570026: Merge 107627 (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/1025/
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/split-flow-anonymous-wrapper-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 109397)
+++ Source/WebCore/rendering/RenderBlock.cpp (working copy)
@@ -429,14 +429,18 @@
RenderBlock* RenderBlock::containingColumnsBlock(bool allowAnonymousColumnBlock)
{
+ RenderBlock* firstChildIgnoringAnonymousWrappers = 0;
for (RenderObject* curr = this; curr; curr = curr->parent()) {
if (!curr->isRenderBlock() || curr->isFloatingOrPositioned() || curr->isTableCell() || curr->isRoot() || curr->isRenderView() || curr->hasOverflowClip()
|| curr->isInlineBlockOrInlineTable())
return 0;
RenderBlock* currBlock = toRenderBlock(curr);
+ if (!currBlock->createsAnonymousWrapper())
+ firstChildIgnoringAnonymousWrappers = currBlock;
+
if (currBlock->style()->specifiesColumns() && (allowAnonymousColumnBlock || !currBlock->isAnonymousColumnsBlock()))
- return currBlock;
+ return firstChildIgnoringAnonymousWrappers;
if (currBlock->isAnonymousColumnSpanBlock())
return 0;
@@ -673,22 +677,17 @@
RenderBlock* columnsBlockAncestor = 0;
if (!newChild->isText() && newChild->style()->columnSpan() && !newChild->isBeforeOrAfterContent()
&& !newChild->isFloatingOrPositioned() && !newChild->isInline() && !isAnonymousColumnSpanBlock()) {
- if (style()->specifiesColumns())
- columnsBlockAncestor = this;
- else if (!isInline() && parent() && parent()->isRenderBlock()) {
- columnsBlockAncestor = toRenderBlock(parent())->containingColumnsBlock(false);
-
- if (columnsBlockAncestor) {
- // Make sure that none of the parent ancestors have a continuation.
- // If yes, we do not want split the block into continuations.
- RenderObject* curr = this;
- while (curr && curr != columnsBlockAncestor) {
- if (curr->isRenderBlock() && toRenderBlock(curr)->continuation()) {
- columnsBlockAncestor = 0;
- break;
- }
- curr = curr->parent();
+ columnsBlockAncestor = containingColumnsBlock(false);
+ if (columnsBlockAncestor) {
+ // Make sure that none of the parent ancestors have a continuation.
+ // If yes, we do not want split the block into continuations.
+ RenderObject* curr = this;
+ while (curr && curr != columnsBlockAncestor) {
+ if (curr->isRenderBlock() && toRenderBlock(curr)->continuation()) {
+ columnsBlockAncestor = 0;
+ break;
}
+ curr = curr->parent();
}
}
}
« no previous file with comments | « LayoutTests/fast/multicol/span/split-flow-anonymous-wrapper-crash-expected.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698