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

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

Issue 1558963003: Recalculate column heights as part of column set layout. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 12 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
Index: third_party/WebKit/Source/core/layout/LayoutMultiColumnFlowThread.h
diff --git a/third_party/WebKit/Source/core/layout/LayoutMultiColumnFlowThread.h b/third_party/WebKit/Source/core/layout/LayoutMultiColumnFlowThread.h
index bacdc4e7363564750291bc16ddb78bbf0890ccce..1f518c0284b14f3347ee633824d3f3ba13503862 100644
--- a/third_party/WebKit/Source/core/layout/LayoutMultiColumnFlowThread.h
+++ b/third_party/WebKit/Source/core/layout/LayoutMultiColumnFlowThread.h
@@ -183,7 +183,14 @@ public:
// containing block is the multicol container).
void skipColumnSpanner(LayoutBox*, LayoutUnit logicalTopInFlowThread);
- bool recalculateColumnHeights();
+ // Returns true if at least one column got a new height after flow thread layout (during column
+ // set layout), in which case we need another layout pass. Column heights may change after flow
+ // thread layout because of balancing. We may have to do multiple layout passes, depending on
+ // how the contents is fitted to the changed column heights. In most cases, laying out again
+ // twice or even just once will suffice. Sometimes we need more passes than that, though, but
+ // the number of retries should not exceed the number of columns, unless we have a bug.
+ bool columnHeightsChanged() const { return m_columnHeightsChanged; }
+ void setColumnHeightsChanged() { m_columnHeightsChanged = true; }
void columnRuleStyleDidChange();
@@ -243,8 +250,7 @@ private:
// the coordinate space of the enclosing fragmentation context.
LayoutUnit m_blockOffsetInEnclosingFragmentationContext;
- bool m_inBalancingPass; // Set when relayouting for column balancing.
- bool m_needsColumnHeightsRecalculation; // Set when we need to recalculate the column set heights after layout.
+ bool m_columnHeightsChanged; // Set when column heights are out of sync with actual layout.
bool m_progressionIsInline; // Always true for regular multicol. False for paged-y overflow.
bool m_isBeingEvacuated;
};

Powered by Google App Engine
This is Rietveld 408576698