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

Side by Side Diff: third_party/WebKit/Source/core/layout/LayoutMultiColumnSet.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 /* 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 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
57 // is inside another fragmentation context (e.g. paged media, or an another mult icol container), we 57 // is inside another fragmentation context (e.g. paged media, or an another mult icol container), we
58 // may need to group the columns, so that we get one MultiColumnFragmentainerGro up for each outer 58 // may need to group the columns, so that we get one MultiColumnFragmentainerGro up for each outer
59 // fragmentainer (page / column) that the inner multicol container lives in. Eac h fragmentainer 59 // fragmentainer (page / column) that the inner multicol container lives in. Eac h fragmentainer
60 // group has its own column height, but the column height is uniform within a gr oup. 60 // group has its own column height, but the column height is uniform within a gr oup.
61 class CORE_EXPORT LayoutMultiColumnSet : public LayoutBlockFlow { 61 class CORE_EXPORT LayoutMultiColumnSet : public LayoutBlockFlow {
62 public: 62 public:
63 static LayoutMultiColumnSet* createAnonymous(LayoutFlowThread&, const Comput edStyle& parentStyle); 63 static LayoutMultiColumnSet* createAnonymous(LayoutFlowThread&, const Comput edStyle& parentStyle);
64 64
65 const MultiColumnFragmentainerGroup& firstFragmentainerGroup() const { retur n m_fragmentainerGroups.first(); } 65 const MultiColumnFragmentainerGroup& firstFragmentainerGroup() const { retur n m_fragmentainerGroups.first(); }
66 const MultiColumnFragmentainerGroup& lastFragmentainerGroup() const { return m_fragmentainerGroups.last(); } 66 const MultiColumnFragmentainerGroup& lastFragmentainerGroup() const { return m_fragmentainerGroups.last(); }
67 unsigned fragmentainerGroupIndexAtFlowThreadOffset(LayoutUnit) const; 67 unsigned fragmentainerGroupIndexAtFlowThreadOffset(LayoutUnit, PageBoundaryR ule) const;
68 MultiColumnFragmentainerGroup& fragmentainerGroupAtFlowThreadOffset(LayoutUn it flowThreadOffset) 68 MultiColumnFragmentainerGroup& fragmentainerGroupAtFlowThreadOffset(LayoutUn it flowThreadOffset, PageBoundaryRule rule)
69 { 69 {
70 return m_fragmentainerGroups[fragmentainerGroupIndexAtFlowThreadOffset(f lowThreadOffset)]; 70 return m_fragmentainerGroups[fragmentainerGroupIndexAtFlowThreadOffset(f lowThreadOffset, rule)];
71 } 71 }
72 const MultiColumnFragmentainerGroup& fragmentainerGroupAtFlowThreadOffset(La youtUnit flowThreadOffset) const 72 const MultiColumnFragmentainerGroup& fragmentainerGroupAtFlowThreadOffset(La youtUnit flowThreadOffset, PageBoundaryRule rule) const
73 { 73 {
74 return m_fragmentainerGroups[fragmentainerGroupIndexAtFlowThreadOffset(f lowThreadOffset)]; 74 return m_fragmentainerGroups[fragmentainerGroupIndexAtFlowThreadOffset(f lowThreadOffset, rule)];
75 } 75 }
76 const MultiColumnFragmentainerGroup& fragmentainerGroupAtVisualPoint(const L ayoutPoint&) const; 76 const MultiColumnFragmentainerGroup& fragmentainerGroupAtVisualPoint(const L ayoutPoint&) const;
77 const MultiColumnFragmentainerGroupList& fragmentainerGroups() const { retur n m_fragmentainerGroups; } 77 const MultiColumnFragmentainerGroupList& fragmentainerGroups() const { retur n m_fragmentainerGroups; }
78 78
79 bool isOfType(LayoutObjectType type) const override { return type == LayoutO bjectLayoutMultiColumnSet || LayoutBlockFlow::isOfType(type); } 79 bool isOfType(LayoutObjectType type) const override { return type == LayoutO bjectLayoutMultiColumnSet || LayoutBlockFlow::isOfType(type); }
80 bool canHaveChildren() const final { return false; } 80 bool canHaveChildren() const final { return false; }
81 81
82 // Return the width and height of a single column or page in the set. 82 // Return the width and height of a single column or page in the set.
83 LayoutUnit pageLogicalWidth() const { return flowThread()->logicalWidth(); } 83 LayoutUnit pageLogicalWidth() const { return flowThread()->logicalWidth(); }
84 LayoutUnit pageLogicalHeightForOffset(LayoutUnit) const; 84 LayoutUnit pageLogicalHeightForOffset(LayoutUnit) const;
(...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after
207 207
208 bool m_initialHeightCalculated; 208 bool m_initialHeightCalculated;
209 }; 209 };
210 210
211 DEFINE_LAYOUT_OBJECT_TYPE_CASTS(LayoutMultiColumnSet, isLayoutMultiColumnSet()); 211 DEFINE_LAYOUT_OBJECT_TYPE_CASTS(LayoutMultiColumnSet, isLayoutMultiColumnSet());
212 212
213 } // namespace blink 213 } // namespace blink
214 214
215 #endif // LayoutMultiColumnSet_h 215 #endif // LayoutMultiColumnSet_h
216 216
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698