OLD | NEW |
(Empty) | |
| 1 // Copyright 2017 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 QuadLengthValue_h |
| 6 #define QuadLengthValue_h |
| 7 |
| 8 #include <memory> |
| 9 #include "platform/Length.h" |
| 10 |
| 11 namespace blink { |
| 12 |
| 13 struct QuadLengthValue { |
| 14 DISALLOW_NEW(); |
| 15 |
| 16 QuadLengthValue() {} |
| 17 |
| 18 explicit QuadLengthValue(Length length) |
| 19 : top(length), right(length), bottom(length), left(length) {} |
| 20 |
| 21 QuadLengthValue(const QuadLengthValue& other) |
| 22 : top(other.top), |
| 23 right(other.right), |
| 24 bottom(other.bottom), |
| 25 left(other.left) {} |
| 26 |
| 27 bool operator==(const QuadLengthValue& other) const { |
| 28 return top == other.top && right == other.right && bottom == other.bottom && |
| 29 left == other.left; |
| 30 } |
| 31 |
| 32 bool operator!=(const QuadLengthValue& other) const { |
| 33 return !(*this == other); |
| 34 } |
| 35 |
| 36 Length top; |
| 37 Length right; |
| 38 Length bottom; |
| 39 Length left; |
| 40 }; |
| 41 |
| 42 } // namespace blink |
| 43 |
| 44 #endif // QuadLengthValue_h |
OLD | NEW |