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

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

Issue 1429903003: Always lay out the flow thread when the multicol container is laid out. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 1 month 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 | « third_party/WebKit/Source/core/layout/LayoutMultiColumnFlowThread.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/layout/LayoutMultiColumnFlowThread.cpp
diff --git a/third_party/WebKit/Source/core/layout/LayoutMultiColumnFlowThread.cpp b/third_party/WebKit/Source/core/layout/LayoutMultiColumnFlowThread.cpp
index 950e16c653dd73f1f5c383ad7f4fe67a3d659809..eed23177ee2bee1d5b4521df11500b253785a40d 100644
--- a/third_party/WebKit/Source/core/layout/LayoutMultiColumnFlowThread.cpp
+++ b/third_party/WebKit/Source/core/layout/LayoutMultiColumnFlowThread.cpp
@@ -339,21 +339,14 @@ LayoutMultiColumnSet* LayoutMultiColumnFlowThread::columnSetAtBlockOffset(Layout
return adapter.result();
}
-void LayoutMultiColumnFlowThread::layoutColumns(bool relayoutChildren, SubtreeLayoutScope& layoutScope)
+void LayoutMultiColumnFlowThread::layoutColumns(SubtreeLayoutScope& layoutScope)
{
- if (relayoutChildren)
- layoutScope.setChildNeedsLayout(this);
+ // Since we ended up here, it means that the multicol container (our parent) needed
+ // layout. Since contents of the multicol container are diverted to the flow thread, the flow
+ // thread needs layout as well.
+ layoutScope.setChildNeedsLayout(this);
m_needsColumnHeightsRecalculation = false;
- if (!needsLayout()) {
- // Just before the multicol container (our parent LayoutBlockFlow) finishes laying out, it
- // will call recalculateColumnHeights() on us unconditionally, but we only want that method
- // to do any work if we actually laid out the flow thread. Otherwise, the balancing
- // machinery would kick in needlessly, and trigger additional layout passes. Furthermore, we
- // actually depend on a proper flowthread layout pass in order to do balancing, since it's
- // flowthread layout that sets up content runs.
- return;
- }
m_blockOffsetInEnclosingFlowThread = enclosingFlowThread() ? multiColumnBlockFlow()->offsetFromLogicalTopOfFirstPage() : LayoutUnit();
« no previous file with comments | « third_party/WebKit/Source/core/layout/LayoutMultiColumnFlowThread.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698