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 129 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
140 // | 140 // |
141 // This value should be propogated to child layouts if the current layout | 141 // This value should be propogated to child layouts if the current layout |
142 // hasn't resolved its BFC offset yet. | 142 // hasn't resolved its BFC offset yet. |
143 // | 143 // |
144 // This value is calculated *after* an initial pass of the tree, this value | 144 // This value is calculated *after* an initial pass of the tree, this value |
145 // should only be present during the second pass. | 145 // should only be present during the second pass. |
146 WTF::Optional<NGLogicalOffset> FloatsBfcOffset() const { | 146 WTF::Optional<NGLogicalOffset> FloatsBfcOffset() const { |
147 return floats_bfc_offset_; | 147 return floats_bfc_offset_; |
148 } | 148 } |
149 | 149 |
150 Vector<RefPtr<NGUnpositionedFloat>>& UnpositionedFloats() { | 150 const Vector<RefPtr<NGUnpositionedFloat>>& UnpositionedFloats() const { |
151 return unpositioned_floats_; | 151 return unpositioned_floats_; |
152 } | 152 } |
153 | 153 |
154 WTF::Optional<LayoutUnit> ClearanceOffset() const { | 154 WTF::Optional<LayoutUnit> ClearanceOffset() const { |
155 return clearance_offset_; | 155 return clearance_offset_; |
156 } | 156 } |
157 | 157 |
158 bool operator==(const NGConstraintSpace&) const; | 158 bool operator==(const NGConstraintSpace&) const; |
159 bool operator!=(const NGConstraintSpace&) const; | 159 bool operator!=(const NGConstraintSpace&) const; |
160 | 160 |
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
223 }; | 223 }; |
224 | 224 |
225 inline std::ostream& operator<<(std::ostream& stream, | 225 inline std::ostream& operator<<(std::ostream& stream, |
226 const NGConstraintSpace& value) { | 226 const NGConstraintSpace& value) { |
227 return stream << value.ToString(); | 227 return stream << value.ToString(); |
228 } | 228 } |
229 | 229 |
230 } // namespace blink | 230 } // namespace blink |
231 | 231 |
232 #endif // NGConstraintSpace_h | 232 #endif // NGConstraintSpace_h |
OLD | NEW |