| 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 NGMarginStrut { | 121 struct 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 SetMarginBlockEnd(const LayoutUnit& value); |
| 130 | 131 |
| 131 String ToString() const; | 132 String ToString() const; |
| 133 |
| 134 bool operator==(const NGMarginStrut& other) const; |
| 132 }; | 135 }; |
| 133 | 136 |
| 134 inline std::ostream& operator<<(std::ostream& stream, | 137 inline std::ostream& operator<<(std::ostream& stream, |
| 135 const NGMarginStrut& value) { | 138 const NGMarginStrut& value) { |
| 136 return stream << value.ToString(); | 139 return stream << value.ToString(); |
| 137 } | 140 } |
| 138 | 141 |
| 139 } // namespace blink | 142 } // namespace blink |
| 140 | 143 |
| 141 #endif // NGUnits_h | 144 #endif // NGUnits_h |
| OLD | NEW |