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

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

Issue 2664403003: [LayoutNG] Stack allocate NGLayoutOpportunityIterator. (Closed)
Patch Set: rebase Created 3 years, 10 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 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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 NGConstraintSpace_h 5 #ifndef NGConstraintSpace_h
6 #define NGConstraintSpace_h 6 #define NGConstraintSpace_h
7 7
8 #include "core/CoreExport.h" 8 #include "core/CoreExport.h"
9 #include "core/layout/ng/ng_units.h" 9 #include "core/layout/ng/ng_units.h"
10 #include "core/layout/ng/ng_writing_mode.h" 10 #include "core/layout/ng/ng_writing_mode.h"
11 #include "platform/heap/Handle.h" 11 #include "platform/heap/Handle.h"
12 #include "wtf/Optional.h" 12 #include "wtf/Optional.h"
13 #include "wtf/text/WTFString.h" 13 #include "wtf/text/WTFString.h"
14 14
15 namespace blink { 15 namespace blink {
16 16
17 class LayoutBox; 17 class LayoutBox;
18 class NGBoxFragment; 18 class NGBoxFragment;
19 class NGLayoutOpportunityIterator;
20 19
21 enum NGFragmentationType { 20 enum NGFragmentationType {
22 kFragmentNone, 21 kFragmentNone,
23 kFragmentPage, 22 kFragmentPage,
24 kFragmentColumn, 23 kFragmentColumn,
25 kFragmentRegion 24 kFragmentRegion
26 }; 25 };
27 26
28 // The NGConstraintSpace represents a set of constraints and available space 27 // The NGConstraintSpace represents a set of constraints and available space
29 // which a layout algorithm may produce a NGFragment within. 28 // which a layout algorithm may produce a NGFragment within.
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
102 // context. 101 // context.
103 bool HasBlockFragmentation() const { 102 bool HasBlockFragmentation() const {
104 return BlockFragmentationType() != kFragmentNone; 103 return BlockFragmentationType() != kFragmentNone;
105 } 104 }
106 105
107 // Modifies constraint space to account for a placed fragment. Depending on 106 // Modifies constraint space to account for a placed fragment. Depending on
108 // the shape of the fragment this will either modify the inline or block 107 // the shape of the fragment this will either modify the inline or block
109 // size, or add an exclusion. 108 // size, or add an exclusion.
110 void Subtract(const NGBoxFragment*); 109 void Subtract(const NGBoxFragment*);
111 110
112 NGLayoutOpportunityIterator* LayoutOpportunities(
113 const WTF::Optional<NGLogicalOffset>& opt_origin_point = WTF::nullopt);
114
115 NGMarginStrut MarginStrut() const { return margin_strut_; } 111 NGMarginStrut MarginStrut() const { return margin_strut_; }
116 112
117 NGLogicalOffset BfcOffset() const { return bfc_offset_; } 113 NGLogicalOffset BfcOffset() const { return bfc_offset_; }
118 114
119 DEFINE_INLINE_VIRTUAL_TRACE() {} 115 DEFINE_INLINE_VIRTUAL_TRACE() {}
120 116
121 String ToString() const; 117 String ToString() const;
122 118
123 private: 119 private:
124 friend class NGConstraintSpaceBuilder; 120 friend class NGConstraintSpaceBuilder;
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
167 }; 163 };
168 164
169 inline std::ostream& operator<<(std::ostream& stream, 165 inline std::ostream& operator<<(std::ostream& stream,
170 const NGConstraintSpace& value) { 166 const NGConstraintSpace& value) {
171 return stream << value.ToString(); 167 return stream << value.ToString();
172 } 168 }
173 169
174 } // namespace blink 170 } // namespace blink
175 171
176 #endif // NGConstraintSpace_h 172 #endif // NGConstraintSpace_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698