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

Unified Diff: third_party/WebKit/Source/core/layout/ColumnBalancer.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/ColumnBalancer.h
diff --git a/third_party/WebKit/Source/core/layout/ColumnBalancer.h b/third_party/WebKit/Source/core/layout/ColumnBalancer.h
index 161f5a0564a9d1135d285f7232ef89b43b648d42..9bf1dacc3e370adfe2d4b3313cedb4c208696164 100644
--- a/third_party/WebKit/Source/core/layout/ColumnBalancer.h
+++ b/third_party/WebKit/Source/core/layout/ColumnBalancer.h
@@ -62,16 +62,17 @@ private:
// of this class, named MinimumSpaceShortageFinder.
class InitialColumnHeightFinder final : public ColumnBalancer {
public:
- static LayoutUnit initialMinimalBalancedHeight(const MultiColumnFragmentainerGroup& group)
- {
- return InitialColumnHeightFinder(group).initialMinimalBalancedHeight();
- }
-
-private:
InitialColumnHeightFinder(const MultiColumnFragmentainerGroup&);
LayoutUnit initialMinimalBalancedHeight() const;
+ // 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.). This will be used as a hint to the column balancer to help set a
+ // good initial column height.
+ LayoutUnit tallestUnbreakableLogicalHeight() const { return m_tallestUnbreakableLogicalHeight; }
+
+private:
void examineBoxAfterEntering(const LayoutBox&);
void examineBoxBeforeLeaving(const LayoutBox&);
void examineLine(const RootInlineBox&);
@@ -139,7 +140,7 @@ private:
// [1] http://www.w3.org/TR/css3-break/#parallel-flows
Vector<LayoutUnit, 32> m_shortestStruts;
- LayoutUnit m_minimumColumnLogicalHeight;
+ LayoutUnit m_tallestUnbreakableLogicalHeight;
};
// If we have previously used InitialColumnHeightFinder to estimate an initial column height, and

Powered by Google App Engine
This is Rietveld 408576698