Chromium Code Reviews| Index: third_party/WebKit/Source/core/layout/MultiColumnFragmentainerGroup.h |
| diff --git a/third_party/WebKit/Source/core/layout/MultiColumnFragmentainerGroup.h b/third_party/WebKit/Source/core/layout/MultiColumnFragmentainerGroup.h |
| index d78409af784c9dcaa6cece63943b10e5f30ac384..d8d92ec568275f15892044b244bd242fd3b2f72a 100644 |
| --- a/third_party/WebKit/Source/core/layout/MultiColumnFragmentainerGroup.h |
| +++ b/third_party/WebKit/Source/core/layout/MultiColumnFragmentainerGroup.h |
| @@ -31,6 +31,9 @@ class MultiColumnFragmentainerGroup { |
| public: |
| MultiColumnFragmentainerGroup(LayoutMultiColumnSet&); |
| + const LayoutMultiColumnSet& columnSet() const { return m_columnSet; } |
| + |
| + bool isFirstGroup() const; |
| bool isLastGroup() const; |
| // Position within the LayoutMultiColumnSet. |
| @@ -58,9 +61,7 @@ public: |
| bool heightIsAuto() const; |
| void resetColumnHeight(); |
| - void addContentRun(LayoutUnit endOffsetInFlowThread); |
| void updateMinimumColumnHeight(LayoutUnit height) { m_minimumColumnHeight = std::max(height, m_minimumColumnHeight); } |
| - void recordSpaceShortage(LayoutUnit); |
| bool recalculateColumnHeight(BalancedColumnHeightCalculation calculationMode); |
| LayoutSize flowThreadTranslationAtOffset(LayoutUnit offsetInFlowThread) const; |
| @@ -71,6 +72,12 @@ public: |
| void collectLayerFragments(PaintLayerFragments&, const LayoutRect& layerBoundingBox, const LayoutRect& dirtyRect) const; |
| LayoutRect calculateOverflow() const; |
| + enum ColumnIndexCalculationMode { |
|
leviw_travelin_and_unemployed
2015/10/08 09:53:47
Is this change related? It doesn't appear that thi
mstensho (USE GERRIT)
2015/10/08 10:49:40
Yeah, no need for this change yet. Reverted.
|
| + ClampToExistingColumns, // Stay within the range of already existing columns. |
| + AssumeNewColumns // Allow column indices outside the range of already existing columns. |
| + }; |
| + unsigned columnIndexAtOffset(LayoutUnit offsetInFlowThread, ColumnIndexCalculationMode = ClampToExistingColumns) const; |
| + |
| // The "CSS actual" value of column-count. This includes overflowing columns, if any. |
| unsigned actualColumnCount() const; |
| @@ -79,15 +86,6 @@ private: |
| LayoutUnit calculateMaxColumnHeight() const; |
| void setAndConstrainColumnHeight(LayoutUnit); |
| - // Return the index of the content run with the currently tallest columns, taking all implicit |
| - // breaks assumed so far into account. |
| - unsigned findRunWithTallestColumns() const; |
| - |
| - // Given the current list of content runs, make assumptions about where we need to insert |
| - // implicit breaks (if there's room for any at all; depending on the number of explicit breaks), |
| - // and store the results. This is needed in order to balance the columns. |
| - void distributeImplicitBreaks(); |
| - |
| LayoutUnit calculateColumnHeight(BalancedColumnHeightCalculation) const; |
| LayoutRect columnRectAt(unsigned columnIndex) const; |
| @@ -95,12 +93,6 @@ private: |
| LayoutRect flowThreadPortionRectAt(unsigned columnIndex) const; |
| LayoutRect flowThreadPortionOverflowRectAt(unsigned columnIndex) const; |
| - enum ColumnIndexCalculationMode { |
| - ClampToExistingColumns, // Stay within the range of already existing columns. |
| - AssumeNewColumns // Allow column indices outside the range of already existing columns. |
| - }; |
| - unsigned columnIndexAtOffset(LayoutUnit offsetInFlowThread, ColumnIndexCalculationMode = ClampToExistingColumns) const; |
| - |
| // Return the column that the specified visual point belongs to. Only the coordinate on the |
| // column progression axis is relevant. Every point belongs to a column, even if said point is |
| // not inside any of the columns. |
| @@ -123,35 +115,7 @@ private: |
| // The following variables are used when balancing the column set. |
| LayoutUnit m_maxColumnHeight; // Maximum column height allowed. |
| - LayoutUnit m_minSpaceShortage; // The smallest amout of space shortage that caused a column break. |
| LayoutUnit m_minimumColumnHeight; |
| - |
| - // A run of content without explicit (forced) breaks; i.e. a flow thread portion between two |
| - // explicit breaks, between flow thread start and an explicit break, between an explicit break |
| - // and flow thread end, or, in cases when there are no explicit breaks at all: between flow |
| - // thread portion start and flow thread portion end. We need to know where the explicit breaks |
| - // are, in order to figure out where the implicit breaks will end up, so that we get the columns |
| - // properly balanced. A content run starts out as representing one single column, and will |
| - // represent one additional column for each implicit break "inserted" there. |
| - class ContentRun { |
| - public: |
| - ContentRun(LayoutUnit breakOffset) |
| - : m_breakOffset(breakOffset) |
| - , m_assumedImplicitBreaks(0) { } |
| - |
| - unsigned assumedImplicitBreaks() const { return m_assumedImplicitBreaks; } |
| - void assumeAnotherImplicitBreak() { m_assumedImplicitBreaks++; } |
| - LayoutUnit breakOffset() const { return m_breakOffset; } |
| - |
| - // Return the column height that this content run would require, considering the implicit |
| - // breaks assumed so far. |
| - LayoutUnit columnLogicalHeight(LayoutUnit startOffset) const { return ceilf((m_breakOffset - startOffset).toFloat() / float(m_assumedImplicitBreaks + 1)); } |
| - |
| - private: |
| - LayoutUnit m_breakOffset; // Flow thread offset where this run ends. |
| - unsigned m_assumedImplicitBreaks; // Number of implicit breaks in this run assumed so far. |
| - }; |
| - Vector<ContentRun, 1> m_contentRuns; |
| }; |
| // List of all fragmentainer groups within a column set. There will always be at least one |