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 19 matching lines...) Expand all Loading... |
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. | 34 // Constructs a constraint space with a new backing NGPhysicalConstraintSpace. |
35 // The size will be used for both for the physical constraint space's | 35 // The size will be used for both for the physical constraint space's |
36 // container size and this constraint space's Size(). | 36 // container size and this constraint space's Size(). |
37 // TODO(layout-dev): Remove once NGConstraintSpaceBuilder exists. | 37 // TODO(layout-dev): Remove once NGConstraintSpaceBuilder exists. |
38 NGConstraintSpace(NGWritingMode, NGDirection, NGLogicalSize); | 38 NGConstraintSpace(NGWritingMode, NGDirection, NGLogicalSize); |
39 | 39 |
40 // Constructs a derived constraint space sharing the same backing | |
41 // NGPhysicalConstraintSpace, NGWritingMode and NGDirection. Primarily for use | |
42 // by NGLayoutOpportunityIterator. | |
43 // TODO(layout-dev): Remove once NGConstraintSpaceBuilder exists. | |
44 NGConstraintSpace(const NGConstraintSpace& other, | |
45 NGLogicalOffset, | |
46 NGLogicalSize); | |
47 | |
48 // Constructs a derived constraint space that shares the exclusions of the | 40 // Constructs a derived constraint space that shares the exclusions of the |
49 // input constraint space, but has a different container size, writing mode | 41 // input constraint space, but has a different container size, writing mode |
50 // and direction. Sets the offset to zero. For use by layout algorithms | 42 // and direction. Sets the offset to zero. For use by layout algorithms |
51 // to use as the basis to find layout opportunities for children. | 43 // to use as the basis to find layout opportunities for children. |
52 // TODO(layout-dev): Remove once NGConstraintSpaceBuilder exists. | 44 // TODO(layout-dev): Remove once NGConstraintSpaceBuilder exists. |
53 NGConstraintSpace(NGWritingMode, | 45 NGConstraintSpace(NGWritingMode, |
54 NGDirection, | 46 NGDirection, |
55 const NGConstraintSpace& other, | 47 const NGConstraintSpace& other, |
56 NGLogicalSize); | 48 NGLogicalSize); |
57 | 49 |
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
148 }; | 140 }; |
149 | 141 |
150 inline std::ostream& operator<<(std::ostream& stream, | 142 inline std::ostream& operator<<(std::ostream& stream, |
151 const NGConstraintSpace& value) { | 143 const NGConstraintSpace& value) { |
152 return stream << value.ToString(); | 144 return stream << value.ToString(); |
153 } | 145 } |
154 | 146 |
155 } // namespace blink | 147 } // namespace blink |
156 | 148 |
157 #endif // NGConstraintSpace_h | 149 #endif // NGConstraintSpace_h |
OLD | NEW |