OLD | NEW |
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/geometry/ng_logical_offset.h" | 9 #include "core/layout/ng/geometry/ng_logical_offset.h" |
10 #include "core/layout/ng/geometry/ng_logical_size.h" | 10 #include "core/layout/ng/geometry/ng_logical_size.h" |
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
101 bool IsFixedSizeBlock() const { return is_fixed_size_block_; } | 101 bool IsFixedSizeBlock() const { return is_fixed_size_block_; } |
102 | 102 |
103 // Whether an auto inline-size should be interpreted as shrink-to-fit | 103 // Whether an auto inline-size should be interpreted as shrink-to-fit |
104 // (ie. fit-content). This is used for inline-block, floats, etc. | 104 // (ie. fit-content). This is used for inline-block, floats, etc. |
105 bool IsShrinkToFit() const { return is_shrink_to_fit_; } | 105 bool IsShrinkToFit() const { return is_shrink_to_fit_; } |
106 | 106 |
107 // If specified a layout should produce a Fragment which fragments at the | 107 // If specified a layout should produce a Fragment which fragments at the |
108 // blockSize if possible. | 108 // blockSize if possible. |
109 NGFragmentationType BlockFragmentationType() const; | 109 NGFragmentationType BlockFragmentationType() const; |
110 | 110 |
111 NGLayoutOpportunityIterator* LayoutOpportunityIterator(); | 111 // Returns a pointer to already existing Layout Opportunity iterator |
| 112 // associated with this constraint space and {@code iter_offset} or creates a |
| 113 // new one. |
| 114 NGLayoutOpportunityIterator* LayoutOpportunityIterator( |
| 115 const NGLogicalOffset& iter_offset); |
112 | 116 |
113 // Return true if this contraint space participates in a fragmentation | 117 // Return true if this contraint space participates in a fragmentation |
114 // context. | 118 // context. |
115 bool HasBlockFragmentation() const { | 119 bool HasBlockFragmentation() const { |
116 return BlockFragmentationType() != kFragmentNone; | 120 return BlockFragmentationType() != kFragmentNone; |
117 } | 121 } |
118 | 122 |
119 NGMarginStrut MarginStrut() const { return margin_strut_; } | 123 NGMarginStrut MarginStrut() const { return margin_strut_; } |
120 | 124 |
121 NGLogicalOffset BfcOffset() const { return bfc_offset_; } | 125 NGLogicalOffset BfcOffset() const { return bfc_offset_; } |
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
185 }; | 189 }; |
186 | 190 |
187 inline std::ostream& operator<<(std::ostream& stream, | 191 inline std::ostream& operator<<(std::ostream& stream, |
188 const NGConstraintSpace& value) { | 192 const NGConstraintSpace& value) { |
189 return stream << value.ToString(); | 193 return stream << value.ToString(); |
190 } | 194 } |
191 | 195 |
192 } // namespace blink | 196 } // namespace blink |
193 | 197 |
194 #endif // NGConstraintSpace_h | 198 #endif // NGConstraintSpace_h |
OLD | NEW |