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_physical_constraint_space.h" | 9 #include "core/layout/ng/ng_physical_constraint_space.h" |
10 #include "core/layout/ng/ng_writing_mode.h" | 10 #include "core/layout/ng/ng_writing_mode.h" |
(...skipping 13 matching lines...) Expand all Loading... |
24 // logical coordinate system defined by the writing mode given. | 24 // logical coordinate system defined by the writing mode given. |
25 class CORE_EXPORT NGConstraintSpace final | 25 class CORE_EXPORT NGConstraintSpace final |
26 : public GarbageCollected<NGConstraintSpace> { | 26 : public GarbageCollected<NGConstraintSpace> { |
27 public: | 27 public: |
28 // Constructs a constraint space based on an existing backing | 28 // Constructs a constraint space based on an existing backing |
29 // NGPhysicalConstraintSpace. Sets this constraint space's size to the | 29 // NGPhysicalConstraintSpace. Sets this constraint space's size to the |
30 // physical constraint space's container size, converted to logical | 30 // physical constraint space's container size, converted to logical |
31 // coordinates. | 31 // coordinates. |
32 NGConstraintSpace(NGWritingMode, NGDirection, NGPhysicalConstraintSpace*); | 32 NGConstraintSpace(NGWritingMode, NGDirection, NGPhysicalConstraintSpace*); |
33 | 33 |
34 // Constructs a constraint space with a new backing NGPhysicalConstraintSpace. | |
35 // The size will be used for both for the physical constraint space's | |
36 // container size and this constraint space's Size(). | |
37 // TODO(layout-dev): Remove once NGConstraintSpaceBuilder exists. | |
38 NGConstraintSpace(NGWritingMode, NGDirection, NGLogicalSize); | |
39 | |
40 // Constructs a derived constraint space that shares the exclusions of the | 34 // Constructs a derived constraint space that shares the exclusions of the |
41 // input constraint space, but has a different container size, writing mode | 35 // input constraint space, but has a different container size, writing mode |
42 // and direction. Sets the offset to zero. For use by layout algorithms | 36 // and direction. Sets the offset to zero. For use by layout algorithms |
43 // to use as the basis to find layout opportunities for children. | 37 // to use as the basis to find layout opportunities for children. |
44 // TODO(layout-dev): Remove once NGConstraintSpaceBuilder exists. | 38 // TODO(layout-dev): Remove once NGConstraintSpaceBuilder exists. |
45 NGConstraintSpace(NGWritingMode, | 39 NGConstraintSpace(NGWritingMode, |
46 NGDirection, | 40 NGDirection, |
47 const NGConstraintSpace& other, | 41 const NGConstraintSpace& other, |
48 NGLogicalSize); | 42 NGLogicalSize); |
49 | 43 |
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
140 }; | 134 }; |
141 | 135 |
142 inline std::ostream& operator<<(std::ostream& stream, | 136 inline std::ostream& operator<<(std::ostream& stream, |
143 const NGConstraintSpace& value) { | 137 const NGConstraintSpace& value) { |
144 return stream << value.ToString(); | 138 return stream << value.ToString(); |
145 } | 139 } |
146 | 140 |
147 } // namespace blink | 141 } // namespace blink |
148 | 142 |
149 #endif // NGConstraintSpace_h | 143 #endif // NGConstraintSpace_h |
OLD | NEW |