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" |
11 #include "platform/heap/Handle.h" | 11 #include "platform/heap/Handle.h" |
12 #include "wtf/text/WTFString.h" | 12 #include "wtf/text/WTFString.h" |
13 | 13 |
14 namespace blink { | 14 namespace blink { |
15 | 15 |
16 class ComputedStyle; | |
17 class LayoutBox; | 16 class LayoutBox; |
18 class NGFragment; | 17 class NGFragment; |
19 class NGLayoutOpportunityIterator; | 18 class NGLayoutOpportunityIterator; |
20 | 19 |
21 // TODO(glebl@): unused, delete. | 20 // TODO(glebl@): unused, delete. |
22 enum NGExclusionType { | 21 enum NGExclusionType { |
23 kNGClearNone = 0, | 22 kNGClearNone = 0, |
24 kNGClearFloatLeft = 1, | 23 kNGClearFloatLeft = 1, |
25 kNGClearFloatRight = 2, | 24 kNGClearFloatRight = 2, |
26 kNGClearFragment = 4 | 25 kNGClearFragment = 4 |
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
103 // the shape of the fragment this will either modify the inline or block | 102 // the shape of the fragment this will either modify the inline or block |
104 // size, or add an exclusion. | 103 // size, or add an exclusion. |
105 void Subtract(const NGFragment*); | 104 void Subtract(const NGFragment*); |
106 | 105 |
107 NGLayoutOpportunityIterator* LayoutOpportunities( | 106 NGLayoutOpportunityIterator* LayoutOpportunities( |
108 unsigned clear = kNGClearNone, | 107 unsigned clear = kNGClearNone, |
109 bool for_inline_or_bfc = false); | 108 bool for_inline_or_bfc = false); |
110 | 109 |
111 DEFINE_INLINE_VIRTUAL_TRACE() {} | 110 DEFINE_INLINE_VIRTUAL_TRACE() {} |
112 | 111 |
113 NGConstraintSpace* ChildSpace(const ComputedStyle* style) const; | |
114 String ToString() const; | 112 String ToString() const; |
115 | 113 |
116 private: | 114 private: |
117 friend class NGConstraintSpaceBuilder; | 115 friend class NGConstraintSpaceBuilder; |
118 // Default constructor. | 116 // Default constructor. |
119 NGConstraintSpace(NGWritingMode, | 117 NGConstraintSpace(NGWritingMode, |
120 TextDirection, | 118 TextDirection, |
121 NGLogicalSize available_size, | 119 NGLogicalSize available_size, |
122 NGLogicalSize percentage_resolution_size, | 120 NGLogicalSize percentage_resolution_size, |
123 bool is_fixed_size_inline, | 121 bool is_fixed_size_inline, |
(...skipping 27 matching lines...) Expand all Loading... |
151 }; | 149 }; |
152 | 150 |
153 inline std::ostream& operator<<(std::ostream& stream, | 151 inline std::ostream& operator<<(std::ostream& stream, |
154 const NGConstraintSpace& value) { | 152 const NGConstraintSpace& value) { |
155 return stream << value.ToString(); | 153 return stream << value.ToString(); |
156 } | 154 } |
157 | 155 |
158 } // namespace blink | 156 } // namespace blink |
159 | 157 |
160 #endif // NGConstraintSpace_h | 158 #endif // NGConstraintSpace_h |
OLD | NEW |