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 #include "core/layout/LayoutMultiColumnSet.h" | 5 #include "core/layout/LayoutMultiColumnSet.h" |
6 | 6 |
7 namespace blink { | 7 namespace blink { |
8 | 8 |
9 // A column balancer traverses a portion of the subtree of a flow thread that | 9 // A column balancer traverses a portion of the subtree of a flow thread that |
10 // belongs to one or more fragmentainer groups within one column set, in order | 10 // belongs to one or more fragmentainer groups within one column set, in order |
(...skipping 207 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
218 // strut found at a column boundary is the amount of space that we wasted at | 218 // strut found at a column boundary is the amount of space that we wasted at |
219 // said column boundary, and it needs to be deducted when estimating the | 219 // said column boundary, and it needs to be deducted when estimating the |
220 // initial balanced column height, or we risk making the column row too tall. | 220 // initial balanced column height, or we risk making the column row too tall. |
221 // An entry set to LayoutUnit::max() means that we didn't detect any object | 221 // An entry set to LayoutUnit::max() means that we didn't detect any object |
222 // crossing that boundary. | 222 // crossing that boundary. |
223 // | 223 // |
224 // [1] http://www.w3.org/TR/css3-break/#parallel-flows | 224 // [1] http://www.w3.org/TR/css3-break/#parallel-flows |
225 Vector<LayoutUnit, 32> m_shortestStruts; | 225 Vector<LayoutUnit, 32> m_shortestStruts; |
226 | 226 |
227 LayoutUnit m_tallestUnbreakableLogicalHeight; | 227 LayoutUnit m_tallestUnbreakableLogicalHeight; |
| 228 LayoutUnit m_lastBreakSeen; |
228 }; | 229 }; |
229 | 230 |
230 // If we have previously used InitialColumnHeightFinder to estimate an initial | 231 // If we have previously used InitialColumnHeightFinder to estimate an initial |
231 // column height, and that didn't result in tall enough columns, we need | 232 // column height, and that didn't result in tall enough columns, we need |
232 // subsequent layout passes where we increase the column height by the minimum | 233 // subsequent layout passes where we increase the column height by the minimum |
233 // space shortage at column breaks. This class finds the minimum space shortage | 234 // space shortage at column breaks. This class finds the minimum space shortage |
234 // after having laid out with the current column height. | 235 // after having laid out with the current column height. |
235 class MinimumSpaceShortageFinder final : public ColumnBalancer { | 236 class MinimumSpaceShortageFinder final : public ColumnBalancer { |
236 public: | 237 public: |
237 MinimumSpaceShortageFinder(const LayoutMultiColumnSet&, | 238 MinimumSpaceShortageFinder(const LayoutMultiColumnSet&, |
(...skipping 23 matching lines...) Expand all Loading... |
261 | 262 |
262 // Set when breaking before a block, and we're looking for the first | 263 // Set when breaking before a block, and we're looking for the first |
263 // unbreakable descendant, in order to report correct space shortage for that | 264 // unbreakable descendant, in order to report correct space shortage for that |
264 // one. | 265 // one. |
265 LayoutUnit m_pendingStrut; | 266 LayoutUnit m_pendingStrut; |
266 | 267 |
267 unsigned m_forcedBreaksCount; | 268 unsigned m_forcedBreaksCount; |
268 }; | 269 }; |
269 | 270 |
270 } // namespace blink | 271 } // namespace blink |
OLD | NEW |