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

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

Issue 1461923005: When balancing columns, we must check inner multicols for unbreakable content. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: code review - std::max FTW 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
Index: third_party/WebKit/Source/core/layout/LayoutMultiColumnSet.h
diff --git a/third_party/WebKit/Source/core/layout/LayoutMultiColumnSet.h b/third_party/WebKit/Source/core/layout/LayoutMultiColumnSet.h
index c5884e9524104f591a29112a9ae8ff9b10473c62..a167878585897a9bf5a97e14977ae817653197d9 100644
--- a/third_party/WebKit/Source/core/layout/LayoutMultiColumnSet.h
+++ b/third_party/WebKit/Source/core/layout/LayoutMultiColumnSet.h
@@ -82,6 +82,8 @@ public:
LayoutUnit pageLogicalHeightForOffset(LayoutUnit) const;
LayoutUnit pageRemainingLogicalHeightForOffset(LayoutUnit, PageBoundaryRule) const;
bool isPageLogicalHeightKnown() const;
+ LayoutUnit tallestUnbreakableLogicalHeight() const { return m_tallestUnbreakableLogicalHeight; }
+ void propagateTallestUnbreakableLogicalHeight(LayoutUnit value) { m_tallestUnbreakableLogicalHeight = std::max(value, m_tallestUnbreakableLogicalHeight); }
LayoutFlowThread* flowThread() const { return m_flowThread; }
@@ -168,6 +170,14 @@ private:
MultiColumnFragmentainerGroupList m_fragmentainerGroups;
LayoutFlowThread* m_flowThread;
+
+ // Height of the tallest piece of unbreakable content. This is the minimum column logical height
+ // required to avoid fragmentation where it shouldn't occur (inside unbreakable content, between
+ // orphans and widows, etc.). We only store this so that outer fragmentation contexts (if any)
+ // can query this when calculating their own minimum. Note that we don't store this value in
+ // every fragmentainer group (but rather here, in the column set), since we only need the
+ // largest one among them.
+ LayoutUnit m_tallestUnbreakableLogicalHeight;
};
DEFINE_LAYOUT_OBJECT_TYPE_CASTS(LayoutMultiColumnSet, isLayoutMultiColumnSet());

Powered by Google App Engine
This is Rietveld 408576698