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/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" |
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
103 return BlockFragmentationType() != kFragmentNone; | 103 return BlockFragmentationType() != kFragmentNone; |
104 } | 104 } |
105 | 105 |
106 // Modifies constraint space to account for a placed fragment. Depending on | 106 // Modifies constraint space to account for a placed fragment. Depending on |
107 // 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 |
108 // size, or add an exclusion. | 108 // size, or add an exclusion. |
109 void Subtract(const NGBoxFragment*); | 109 void Subtract(const NGBoxFragment*); |
110 | 110 |
111 NGMarginStrut MarginStrut() const { return margin_strut_; } | 111 NGMarginStrut MarginStrut() const { return margin_strut_; } |
112 | 112 |
113 // TODO(glebl): Rename to Offset() or AbsoluteOffset(). | |
114 NGLogicalOffset BfcOffset() const { return bfc_offset_; } | 113 NGLogicalOffset BfcOffset() const { return bfc_offset_; } |
115 | 114 |
116 DEFINE_INLINE_VIRTUAL_TRACE() {} | 115 DEFINE_INLINE_VIRTUAL_TRACE() {} |
117 | 116 |
118 String ToString() const; | 117 String ToString() const; |
119 | 118 |
120 private: | 119 private: |
121 friend class NGConstraintSpaceBuilder; | 120 friend class NGConstraintSpaceBuilder; |
122 // Default constructor. | 121 // Default constructor. |
123 NGConstraintSpace(NGWritingMode, | 122 NGConstraintSpace(NGWritingMode, |
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
164 }; | 163 }; |
165 | 164 |
166 inline std::ostream& operator<<(std::ostream& stream, | 165 inline std::ostream& operator<<(std::ostream& stream, |
167 const NGConstraintSpace& value) { | 166 const NGConstraintSpace& value) { |
168 return stream << value.ToString(); | 167 return stream << value.ToString(); |
169 } | 168 } |
170 | 169 |
171 } // namespace blink | 170 } // namespace blink |
172 | 171 |
173 #endif // NGConstraintSpace_h | 172 #endif // NGConstraintSpace_h |
OLD | NEW |