Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(327)

Side by Side Diff: third_party/WebKit/Source/core/layout/ColumnBalancer.h

Issue 2345583004: Add PageBoundaryRule parameter to fragmentainerGroupAtFlowThreadOffset(). (Closed)
Patch Set: Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 be longs to one or 9 // A column balancer traverses a portion of the subtree of a flow thread that be longs to one or
10 // more fragmentainer groups within one column set, in order to collect certain data to be used for 10 // more fragmentainer groups within one column set, in order to collect certain data to be used for
11 // column balancing. This is an abstract class that just walks the subtree and l eaves it to 11 // column balancing. This is an abstract class that just walks the subtree and l eaves it to
12 // subclasses to actually collect data. 12 // subclasses to actually collect data.
13 class ColumnBalancer { 13 class ColumnBalancer {
14 protected: 14 protected:
15 ColumnBalancer(const LayoutMultiColumnSet&, LayoutUnit logicalTopInFlowThrea d, LayoutUnit logicalBottomInFlowThread); 15 ColumnBalancer(const LayoutMultiColumnSet&, LayoutUnit logicalTopInFlowThrea d, LayoutUnit logicalBottomInFlowThread);
16 16
17 const LayoutMultiColumnSet& columnSet() const { return m_columnSet; } 17 const LayoutMultiColumnSet& columnSet() const { return m_columnSet; }
18 18
19 // The flow thread portion we're examining. It may be that of the entire col umn set, or just of 19 // The flow thread portion we're examining. It may be that of the entire col umn set, or just of
20 // a fragmentainer group. 20 // a fragmentainer group.
21 const LayoutUnit logicalTopInFlowThread() const { return m_logicalTopInFlowT hread; } 21 const LayoutUnit logicalTopInFlowThread() const { return m_logicalTopInFlowT hread; }
22 const LayoutUnit logicalBottomInFlowThread() const { return m_logicalBottomI nFlowThread; } 22 const LayoutUnit logicalBottomInFlowThread() const { return m_logicalBottomI nFlowThread; }
23 23
24 const MultiColumnFragmentainerGroup& groupAtOffset(LayoutUnit offsetInFlowTh read) const 24 const MultiColumnFragmentainerGroup& groupAtOffset(LayoutUnit offsetInFlowTh read) const
25 { 25 {
26 return m_columnSet.fragmentainerGroupAtFlowThreadOffset(offsetInFlowThre ad); 26 return m_columnSet.fragmentainerGroupAtFlowThreadOffset(offsetInFlowThre ad, LayoutBox::AssociateWithLatterPage);
27 } 27 }
28 28
29 LayoutUnit offsetFromColumnLogicalTop(LayoutUnit offsetInFlowThread) const 29 LayoutUnit offsetFromColumnLogicalTop(LayoutUnit offsetInFlowThread) const
30 { 30 {
31 return offsetInFlowThread - groupAtOffset(offsetInFlowThread).columnLogi calTopForOffset(offsetInFlowThread); 31 return offsetInFlowThread - groupAtOffset(offsetInFlowThread).columnLogi calTopForOffset(offsetInFlowThread);
32 } 32 }
33 33
34 // Flow thread offset for the layout object that we're currently examining. 34 // Flow thread offset for the layout object that we're currently examining.
35 LayoutUnit flowThreadOffset() const { return m_flowThreadOffset; } 35 LayoutUnit flowThreadOffset() const { return m_flowThreadOffset; }
36 36
(...skipping 171 matching lines...) Expand 10 before | Expand all | Expand 10 after
208 LayoutUnit m_minimumSpaceShortage; 208 LayoutUnit m_minimumSpaceShortage;
209 209
210 // Set when breaking before a block, and we're looking for the first unbreak able descendant, in 210 // Set when breaking before a block, and we're looking for the first unbreak able descendant, in
211 // order to report correct space shortage for that one. 211 // order to report correct space shortage for that one.
212 LayoutUnit m_pendingStrut; 212 LayoutUnit m_pendingStrut;
213 213
214 unsigned m_forcedBreaksCount; 214 unsigned m_forcedBreaksCount;
215 }; 215 };
216 216
217 } // namespace blink 217 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698