| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef MultiColumnFragmentainerGroup_h | 5 #ifndef MultiColumnFragmentainerGroup_h |
| 6 #define MultiColumnFragmentainerGroup_h | 6 #define MultiColumnFragmentainerGroup_h |
| 7 | 7 |
| 8 #include "core/layout/LayoutMultiColumnFlowThread.h" | 8 #include "core/layout/LayoutMultiColumnFlowThread.h" |
| 9 #include "wtf/Allocator.h" | 9 #include "wtf/Allocator.h" |
| 10 | 10 |
| (...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 60 LayoutUnit logicalHeightInFlowThread() const { return m_logicalBottomInFlowT
hread - m_logicalTopInFlowThread; } | 60 LayoutUnit logicalHeightInFlowThread() const { return m_logicalBottomInFlowT
hread - m_logicalTopInFlowThread; } |
| 61 | 61 |
| 62 void resetColumnHeight(); | 62 void resetColumnHeight(); |
| 63 bool recalculateColumnHeight(LayoutMultiColumnSet&); | 63 bool recalculateColumnHeight(LayoutMultiColumnSet&); |
| 64 | 64 |
| 65 LayoutSize flowThreadTranslationAtOffset(LayoutUnit, LayoutBox::PageBoundary
Rule, CoordinateSpaceConversion) const; | 65 LayoutSize flowThreadTranslationAtOffset(LayoutUnit, LayoutBox::PageBoundary
Rule, CoordinateSpaceConversion) const; |
| 66 LayoutUnit columnLogicalTopForOffset(LayoutUnit offsetInFlowThread) const; | 66 LayoutUnit columnLogicalTopForOffset(LayoutUnit offsetInFlowThread) const; |
| 67 LayoutPoint visualPointToFlowThreadPoint(const LayoutPoint& visualPoint) con
st; | 67 LayoutPoint visualPointToFlowThreadPoint(const LayoutPoint& visualPoint) con
st; |
| 68 LayoutRect fragmentsBoundingBox(const LayoutRect& boundingBoxInFlowThread) c
onst; | 68 LayoutRect fragmentsBoundingBox(const LayoutRect& boundingBoxInFlowThread) c
onst; |
| 69 | 69 |
| 70 LayoutRect flowThreadPortionRectAt(unsigned columnIndex) const; |
| 70 LayoutRect flowThreadPortionOverflowRectAt(unsigned columnIndex) const; | 71 LayoutRect flowThreadPortionOverflowRectAt(unsigned columnIndex) const; |
| 71 | 72 |
| 72 // Get the first and the last column intersecting the specified block range. | 73 // Get the first and the last column intersecting the specified block range. |
| 73 // Note that |logicalBottomInFlowThread| is an exclusive endpoint. | 74 // Note that |logicalBottomInFlowThread| is an exclusive endpoint. |
| 74 void columnIntervalForBlockRangeInFlowThread(LayoutUnit logicalTopInFlowThre
ad, LayoutUnit logicalBottomInFlowThread, unsigned& firstColumn, unsigned& lastC
olumn) const; | 75 void columnIntervalForBlockRangeInFlowThread(LayoutUnit logicalTopInFlowThre
ad, LayoutUnit logicalBottomInFlowThread, unsigned& firstColumn, unsigned& lastC
olumn) const; |
| 75 | 76 |
| 76 // Get the first and the last column intersecting the specified visual recta
ngle. | 77 // Get the first and the last column intersecting the specified visual recta
ngle. |
| 77 void columnIntervalForVisualRect(const LayoutRect&, unsigned& firstColumn, u
nsigned& lastColumn) const; | 78 void columnIntervalForVisualRect(const LayoutRect&, unsigned& firstColumn, u
nsigned& lastColumn) const; |
| 78 | 79 |
| 79 LayoutRect calculateOverflow() const; | 80 LayoutRect calculateOverflow() const; |
| 80 | 81 |
| 81 unsigned columnIndexAtOffset(LayoutUnit offsetInFlowThread, LayoutBox::PageB
oundaryRule) const; | 82 unsigned columnIndexAtOffset(LayoutUnit offsetInFlowThread, LayoutBox::PageB
oundaryRule) const; |
| 82 | 83 |
| 83 // The "CSS actual" value of column-count. This includes overflowing columns
, if any. | 84 // The "CSS actual" value of column-count. This includes overflowing columns
, if any. |
| 84 // Returns 1 or greater, never 0. | 85 // Returns 1 or greater, never 0. |
| 85 unsigned actualColumnCount() const; | 86 unsigned actualColumnCount() const; |
| 86 | 87 |
| 87 private: | 88 private: |
| 88 LayoutUnit heightAdjustedForRowOffset(LayoutUnit height) const; | 89 LayoutUnit heightAdjustedForRowOffset(LayoutUnit height) const; |
| 89 LayoutUnit calculateMaxColumnHeight() const; | 90 LayoutUnit calculateMaxColumnHeight() const; |
| 90 void setAndConstrainColumnHeight(LayoutUnit); | 91 void setAndConstrainColumnHeight(LayoutUnit); |
| 91 | 92 |
| 92 LayoutUnit rebalanceColumnHeightIfNeeded() const; | 93 LayoutUnit rebalanceColumnHeightIfNeeded() const; |
| 93 | 94 |
| 94 LayoutRect columnRectAt(unsigned columnIndex) const; | 95 LayoutRect columnRectAt(unsigned columnIndex) const; |
| 95 LayoutUnit logicalTopInFlowThreadAt(unsigned columnIndex) const { return m_l
ogicalTopInFlowThread + columnIndex * m_columnHeight; } | 96 LayoutUnit logicalTopInFlowThreadAt(unsigned columnIndex) const { return m_l
ogicalTopInFlowThread + columnIndex * m_columnHeight; } |
| 96 LayoutRect flowThreadPortionRectAt(unsigned columnIndex) const; | |
| 97 | 97 |
| 98 // Return the column that the specified visual point belongs to. Only the co
ordinate on the | 98 // Return the column that the specified visual point belongs to. Only the co
ordinate on the |
| 99 // column progression axis is relevant. Every point belongs to a column, eve
n if said point is | 99 // column progression axis is relevant. Every point belongs to a column, eve
n if said point is |
| 100 // not inside any of the columns. | 100 // not inside any of the columns. |
| 101 unsigned columnIndexAtVisualPoint(const LayoutPoint& visualPoint) const; | 101 unsigned columnIndexAtVisualPoint(const LayoutPoint& visualPoint) const; |
| 102 | 102 |
| 103 const LayoutMultiColumnSet& m_columnSet; | 103 const LayoutMultiColumnSet& m_columnSet; |
| 104 | 104 |
| 105 LayoutUnit m_logicalTop; | 105 LayoutUnit m_logicalTop; |
| 106 LayoutUnit m_logicalTopInFlowThread; | 106 LayoutUnit m_logicalTopInFlowThread; |
| (...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 148 | 148 |
| 149 private: | 149 private: |
| 150 LayoutMultiColumnSet& m_columnSet; | 150 LayoutMultiColumnSet& m_columnSet; |
| 151 | 151 |
| 152 Vector<MultiColumnFragmentainerGroup, 1> m_groups; | 152 Vector<MultiColumnFragmentainerGroup, 1> m_groups; |
| 153 }; | 153 }; |
| 154 | 154 |
| 155 } // namespace blink | 155 } // namespace blink |
| 156 | 156 |
| 157 #endif // MultiColumnFragmentainerGroup_h | 157 #endif // MultiColumnFragmentainerGroup_h |
| OLD | NEW |