OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2012 Apple Inc. All rights reserved. | 2 * Copyright (C) 2012 Apple Inc. All rights reserved. |
3 * | 3 * |
4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions | 5 * modification, are permitted provided that the following conditions |
6 * are met: | 6 * are met: |
7 * 1. Redistributions of source code must retain the above copyright | 7 * 1. Redistributions of source code must retain the above copyright |
8 * notice, this list of conditions and the following disclaimer. | 8 * notice, this list of conditions and the following disclaimer. |
9 * 2. Redistributions in binary form must reproduce the above copyright | 9 * 2. Redistributions in binary form must reproduce the above copyright |
10 * notice, this list of conditions and the following disclaimer in the | 10 * notice, this list of conditions and the following disclaimer in the |
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
112 | 112 |
113 // Find the column that contains the given block offset, and return the tran
slation needed to | 113 // Find the column that contains the given block offset, and return the tran
slation needed to |
114 // get from flow thread coordinates to visual coordinates. | 114 // get from flow thread coordinates to visual coordinates. |
115 LayoutSize flowThreadTranslationAtOffset(LayoutUnit) const; | 115 LayoutSize flowThreadTranslationAtOffset(LayoutUnit) const; |
116 | 116 |
117 LayoutPoint visualPointToFlowThreadPoint(const LayoutPoint& visualPoint) con
st; | 117 LayoutPoint visualPointToFlowThreadPoint(const LayoutPoint& visualPoint) con
st; |
118 | 118 |
119 // (Re-)calculate the column height if it's auto. This is first and foremost
needed by sets that | 119 // (Re-)calculate the column height if it's auto. This is first and foremost
needed by sets that |
120 // are to balance the column height, but even when it isn't to be balanced,
this is necessary if | 120 // are to balance the column height, but even when it isn't to be balanced,
this is necessary if |
121 // the multicol container's height is constrained. | 121 // the multicol container's height is constrained. |
122 bool recalculateColumnHeight(BalancedColumnHeightCalculation); | 122 bool recalculateColumnHeight(); |
123 | 123 |
124 // Reset previously calculated column height. Will mark for layout if needed
. | 124 // Reset previously calculated column height. Will mark for layout if needed
. |
125 void resetColumnHeight(); | 125 void resetColumnHeight(); |
126 | 126 |
| 127 void storeOldPosition() { m_oldLogicalTop = logicalTop(); } |
| 128 bool isInitialHeightCalculated() const { return m_initialHeightCalculated; } |
| 129 |
127 // Layout of flow thread content that's to be rendered inside this column se
t begins. This | 130 // Layout of flow thread content that's to be rendered inside this column se
t begins. This |
128 // happens at the beginning of flow thread layout, and when advancing from a
previous column set | 131 // happens at the beginning of flow thread layout, and when advancing from a
previous column set |
129 // or spanner to this one. | 132 // or spanner to this one. |
130 void beginFlow(LayoutUnit offsetInFlowThread); | 133 void beginFlow(LayoutUnit offsetInFlowThread); |
131 | 134 |
132 // Layout of flow thread content that was to be rendered inside this column
set has | 135 // Layout of flow thread content that was to be rendered inside this column
set has |
133 // finished. This happens at end of flow thread layout, and when advancing t
o the next column | 136 // finished. This happens at end of flow thread layout, and when advancing t
o the next column |
134 // set or spanner. | 137 // set or spanner. |
135 void endFlow(LayoutUnit offsetInFlowThread); | 138 void endFlow(LayoutUnit offsetInFlowThread); |
136 | 139 |
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
174 MultiColumnFragmentainerGroupList m_fragmentainerGroups; | 177 MultiColumnFragmentainerGroupList m_fragmentainerGroups; |
175 LayoutFlowThread* m_flowThread; | 178 LayoutFlowThread* m_flowThread; |
176 | 179 |
177 // Height of the tallest piece of unbreakable content. This is the minimum c
olumn logical height | 180 // Height of the tallest piece of unbreakable content. This is the minimum c
olumn logical height |
178 // required to avoid fragmentation where it shouldn't occur (inside unbreaka
ble content, between | 181 // required to avoid fragmentation where it shouldn't occur (inside unbreaka
ble content, between |
179 // orphans and widows, etc.). We only store this so that outer fragmentation
contexts (if any) | 182 // orphans and widows, etc.). We only store this so that outer fragmentation
contexts (if any) |
180 // can query this when calculating their own minimum. Note that we don't sto
re this value in | 183 // can query this when calculating their own minimum. Note that we don't sto
re this value in |
181 // every fragmentainer group (but rather here, in the column set), since we
only need the | 184 // every fragmentainer group (but rather here, in the column set), since we
only need the |
182 // largest one among them. | 185 // largest one among them. |
183 LayoutUnit m_tallestUnbreakableLogicalHeight; | 186 LayoutUnit m_tallestUnbreakableLogicalHeight; |
| 187 |
| 188 // Logical top in previous layout pass. |
| 189 LayoutUnit m_oldLogicalTop; |
| 190 |
| 191 bool m_initialHeightCalculated; |
184 }; | 192 }; |
185 | 193 |
186 DEFINE_LAYOUT_OBJECT_TYPE_CASTS(LayoutMultiColumnSet, isLayoutMultiColumnSet()); | 194 DEFINE_LAYOUT_OBJECT_TYPE_CASTS(LayoutMultiColumnSet, isLayoutMultiColumnSet()); |
187 | 195 |
188 } // namespace blink | 196 } // namespace blink |
189 | 197 |
190 #endif // LayoutMultiColumnSet_h | 198 #endif // LayoutMultiColumnSet_h |
191 | 199 |
OLD | NEW |