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 NGUnits_h | 5 #ifndef NGUnits_h |
6 #define NGUnits_h | 6 #define NGUnits_h |
7 | 7 |
8 #include "core/CoreExport.h" | 8 #include "core/CoreExport.h" |
9 #include "core/layout/ng/ng_direction.h" | 9 #include "core/layout/ng/ng_direction.h" |
10 #include "core/layout/ng/ng_writing_mode.h" | 10 #include "core/layout/ng/ng_writing_mode.h" |
(...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
120 // This struct is used for the margin collapsing calculation. | 120 // This struct is used for the margin collapsing calculation. |
121 struct CORE_EXPORT NGMarginStrut { | 121 struct CORE_EXPORT NGMarginStrut { |
122 LayoutUnit margin_block_start; | 122 LayoutUnit margin_block_start; |
123 LayoutUnit margin_block_end; | 123 LayoutUnit margin_block_end; |
124 | 124 |
125 LayoutUnit negative_margin_block_start; | 125 LayoutUnit negative_margin_block_start; |
126 LayoutUnit negative_margin_block_end; | 126 LayoutUnit negative_margin_block_end; |
127 | 127 |
128 void AppendMarginBlockStart(const LayoutUnit& value); | 128 void AppendMarginBlockStart(const LayoutUnit& value); |
129 void AppendMarginBlockEnd(const LayoutUnit& value); | 129 void AppendMarginBlockEnd(const LayoutUnit& value); |
| 130 void SetMarginBlockStart(const LayoutUnit& value); |
130 void SetMarginBlockEnd(const LayoutUnit& value); | 131 void SetMarginBlockEnd(const LayoutUnit& value); |
131 | 132 |
132 String ToString() const; | 133 String ToString() const; |
133 | 134 |
134 bool operator==(const NGMarginStrut& other) const; | 135 bool operator==(const NGMarginStrut& other) const; |
135 }; | 136 }; |
136 | 137 |
137 inline std::ostream& operator<<(std::ostream& stream, | 138 inline std::ostream& operator<<(std::ostream& stream, |
138 const NGMarginStrut& value) { | 139 const NGMarginStrut& value) { |
139 return stream << value.ToString(); | 140 return stream << value.ToString(); |
140 } | 141 } |
141 | 142 |
142 } // namespace blink | 143 } // namespace blink |
143 | 144 |
144 #endif // NGUnits_h | 145 #endif // NGUnits_h |
OLD | NEW |