OLD | NEW |
(Empty) | |
| 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 |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef NGMarginStrut_h |
| 6 #define NGMarginStrut_h |
| 7 |
| 8 #include "core/CoreExport.h" |
| 9 #include "platform/LayoutUnit.h" |
| 10 |
| 11 namespace blink { |
| 12 |
| 13 // This struct is used for the margin collapsing calculation. |
| 14 struct CORE_EXPORT NGMarginStrut { |
| 15 LayoutUnit margin; |
| 16 LayoutUnit negative_margin; |
| 17 |
| 18 // Appends negative or positive value to the current margin strut. |
| 19 void Append(const LayoutUnit& value); |
| 20 |
| 21 // Sum up negative and positive margins of this strut. |
| 22 LayoutUnit Sum() const; |
| 23 |
| 24 bool operator==(const NGMarginStrut& other) const; |
| 25 |
| 26 String ToString() const; |
| 27 }; |
| 28 |
| 29 CORE_EXPORT std::ostream& operator<<(std::ostream&, const NGMarginStrut&); |
| 30 |
| 31 } // namespace blink |
| 32 |
| 33 #endif // NGMarginStrut_h |
OLD | NEW |