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 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
54 | 54 |
55 // The bottom of our flow thread portion | 55 // The bottom of our flow thread portion |
56 LayoutUnit logicalBottomInFlowThread() const { return m_logicalBottomInFlowT
hread; } | 56 LayoutUnit logicalBottomInFlowThread() const { return m_logicalBottomInFlowT
hread; } |
57 void setLogicalBottomInFlowThread(LayoutUnit logicalBottomInFlowThread) { AS
SERT(logicalBottomInFlowThread >= m_logicalTopInFlowThread); m_logicalBottomInFl
owThread = logicalBottomInFlowThread; } | 57 void setLogicalBottomInFlowThread(LayoutUnit logicalBottomInFlowThread) { AS
SERT(logicalBottomInFlowThread >= m_logicalTopInFlowThread); m_logicalBottomInFl
owThread = logicalBottomInFlowThread; } |
58 | 58 |
59 // The height of our flow thread portion | 59 // The height of our flow thread portion |
60 LayoutUnit logicalHeightInFlowThread() const { return m_logicalBottomInFlowT
hread - m_logicalTopInFlowThread; } | 60 LayoutUnit logicalHeightInFlowThread() const { return m_logicalBottomInFlowT
hread - m_logicalTopInFlowThread; } |
61 | 61 |
62 bool heightIsAuto() const; | 62 bool heightIsAuto() const; |
63 void resetColumnHeight(); | 63 void resetColumnHeight(); |
64 void updateMinimumColumnHeight(LayoutUnit height) { m_minimumColumnHeight =
std::max(height, m_minimumColumnHeight); } | |
65 bool recalculateColumnHeight(BalancedColumnHeightCalculation calculationMode
); | 64 bool recalculateColumnHeight(BalancedColumnHeightCalculation calculationMode
); |
66 | 65 |
67 LayoutSize flowThreadTranslationAtOffset(LayoutUnit offsetInFlowThread) cons
t; | 66 LayoutSize flowThreadTranslationAtOffset(LayoutUnit offsetInFlowThread) cons
t; |
68 LayoutUnit columnLogicalTopForOffset(LayoutUnit offsetInFlowThread) const; | 67 LayoutUnit columnLogicalTopForOffset(LayoutUnit offsetInFlowThread) const; |
69 LayoutPoint visualPointToFlowThreadPoint(const LayoutPoint& visualPoint) con
st; | 68 LayoutPoint visualPointToFlowThreadPoint(const LayoutPoint& visualPoint) con
st; |
70 LayoutRect fragmentsBoundingBox(const LayoutRect& boundingBoxInFlowThread) c
onst; | 69 LayoutRect fragmentsBoundingBox(const LayoutRect& boundingBoxInFlowThread) c
onst; |
71 | 70 |
72 void collectLayerFragments(PaintLayerFragments&, const LayoutRect& layerBoun
dingBox, const LayoutRect& dirtyRect) const; | 71 void collectLayerFragments(PaintLayerFragments&, const LayoutRect& layerBoun
dingBox, const LayoutRect& dirtyRect) const; |
73 LayoutRect calculateOverflow() const; | 72 LayoutRect calculateOverflow() const; |
74 | 73 |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
106 void columnIntervalForVisualRect(const LayoutRect&, unsigned& firstColumn, u
nsigned& lastColumn) const; | 105 void columnIntervalForVisualRect(const LayoutRect&, unsigned& firstColumn, u
nsigned& lastColumn) const; |
107 | 106 |
108 LayoutMultiColumnSet& m_columnSet; | 107 LayoutMultiColumnSet& m_columnSet; |
109 | 108 |
110 LayoutUnit m_logicalTop; | 109 LayoutUnit m_logicalTop; |
111 LayoutUnit m_logicalTopInFlowThread; | 110 LayoutUnit m_logicalTopInFlowThread; |
112 LayoutUnit m_logicalBottomInFlowThread; | 111 LayoutUnit m_logicalBottomInFlowThread; |
113 | 112 |
114 LayoutUnit m_columnHeight; | 113 LayoutUnit m_columnHeight; |
115 | 114 |
116 // The following variables are used when balancing the column set. | |
117 LayoutUnit m_maxColumnHeight; // Maximum column height allowed. | 115 LayoutUnit m_maxColumnHeight; // Maximum column height allowed. |
118 LayoutUnit m_minimumColumnHeight; | |
119 }; | 116 }; |
120 | 117 |
121 // List of all fragmentainer groups within a column set. There will always be at
least one | 118 // List of all fragmentainer groups within a column set. There will always be at
least one |
122 // group. Deleting the one group is not allowed (or possible). There will be mor
e than one group if | 119 // group. Deleting the one group is not allowed (or possible). There will be mor
e than one group if |
123 // the owning column set lives in multiple outer fragmentainers (e.g. multicol i
nside paged media). | 120 // the owning column set lives in multiple outer fragmentainers (e.g. multicol i
nside paged media). |
124 class CORE_EXPORT MultiColumnFragmentainerGroupList { | 121 class CORE_EXPORT MultiColumnFragmentainerGroupList { |
125 DISALLOW_NEW(); | 122 DISALLOW_NEW(); |
126 public: | 123 public: |
127 MultiColumnFragmentainerGroupList(LayoutMultiColumnSet&); | 124 MultiColumnFragmentainerGroupList(LayoutMultiColumnSet&); |
128 ~MultiColumnFragmentainerGroupList(); | 125 ~MultiColumnFragmentainerGroupList(); |
(...skipping 26 matching lines...) Expand all Loading... |
155 | 152 |
156 private: | 153 private: |
157 LayoutMultiColumnSet& m_columnSet; | 154 LayoutMultiColumnSet& m_columnSet; |
158 | 155 |
159 Vector<MultiColumnFragmentainerGroup, 1> m_groups; | 156 Vector<MultiColumnFragmentainerGroup, 1> m_groups; |
160 }; | 157 }; |
161 | 158 |
162 } // namespace blink | 159 } // namespace blink |
163 | 160 |
164 #endif // MultiColumnFragmentainerGroup_h | 161 #endif // MultiColumnFragmentainerGroup_h |
OLD | NEW |