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

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

Issue 1181693004: Add out-of-flow descendants of spanners to their containing blocks in time. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 6 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
« Source/core/layout/LayoutBlock.cpp ('K') | « Source/core/layout/LayoutBlock.cpp ('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 d9929f020024998d91e7adcc88ee8be360e91edb..de8922526ca61d40729a23d21903d9ba71e31991 100644
--- a/Source/core/layout/LayoutMultiColumnFlowThread.cpp
+++ b/Source/core/layout/LayoutMultiColumnFlowThread.cpp
@@ -567,6 +567,19 @@ LayoutUnit LayoutMultiColumnFlowThread::skipColumnSpanner(LayoutBox* layoutObjec
m_lastSetWorkedOn = nextSet;
nextSet->beginFlow(logicalTopInFlowThread);
}
+
+ // We'll lay out of spanners after flow thread layout has finished (during layout of the spanner
+ // placeholders). There may be containing blocks for out-of-flow positioned descendants of the
+ // spanner in the flow thread, so that out-of-flow objects inside the spanner will be laid out
+ // as part of flow thread layout (even if the spanner itself won't). We need to add such
+ // out-of-flow positioned objects to their containing blocks now, or they'll never get laid
+ // out. Since it's non-trivial to determine if we need this, and where such out-of-flow objects
+ // might be, just go through the whole subtree.
+ for (LayoutObject* descendant = layoutObject->slowFirstChild(); descendant; descendant = descendant->nextInPreOrder()) {
+ if (descendant->isBox() && descendant->isOutOfFlowPositioned())
+ descendant->containingBlock()->insertPositionedObject(toLayoutBox(descendant));
+ }
+
return adjustment;
}
« Source/core/layout/LayoutBlock.cpp ('K') | « Source/core/layout/LayoutBlock.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698