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

Unified Diff: Source/core/layout/LayoutMultiColumnFlowThread.cpp

Issue 1110383002: [New Multicolumn] Out-of-flow objects don't establish column sets. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: code review. Created 5 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 | « LayoutTests/fast/multicol/dynamic/insert-before-sole-abspos-expected.txt ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/layout/LayoutMultiColumnFlowThread.cpp
diff --git a/Source/core/layout/LayoutMultiColumnFlowThread.cpp b/Source/core/layout/LayoutMultiColumnFlowThread.cpp
index b0c841ac62d4ceb5eb374af1c2908908239f6f26..aead95d7b6e694a670a41c84459d706e705a836e 100644
--- a/Source/core/layout/LayoutMultiColumnFlowThread.cpp
+++ b/Source/core/layout/LayoutMultiColumnFlowThread.cpp
@@ -532,6 +532,21 @@ void LayoutMultiColumnFlowThread::flowThreadDescendantWasInserted(LayoutObject*
continue;
}
// This layoutObject is regular column content (i.e. not a spanner). Create a set if necessary.
+ while (objectAfterSubtree) {
+ // Walk through the siblings and find the first one which is either in-flow or has this
+ // flow thread as its containing block flow thread.
+ if (!objectAfterSubtree->isOutOfFlowPositioned()) {
+ // In-flow objects are always part of the flow thread (unless it's a spanner - but
+ // we'll deal with that further below).
+ break;
+ }
+ if (objectAfterSubtree->containingBlock()->flowThreadContainingBlock() == this) {
+ // This out-of-flow object is still part of the flow thread, because its containing
+ // block (probably relatively positioned) is part of the flow thread.
+ break;
+ }
+ objectAfterSubtree = objectAfterSubtree->nextInPreOrderAfterChildren(this);
+ }
if (objectAfterSubtree) {
if (LayoutMultiColumnSpannerPlaceholder* placeholder = objectAfterSubtree->spannerPlaceholder()) {
// If inserted right before a spanner, we need to make sure that there's a set for us there.
« no previous file with comments | « LayoutTests/fast/multicol/dynamic/insert-before-sole-abspos-expected.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698