Chromium Code Reviews| 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 { | |
|
majidvp
2017/06/15 13:57:11
nit: typical style is to have a blank line after n
| |
| 12 struct QuadLengthValue { | |
| 13 DISALLOW_NEW(); | |
| 14 | |
| 15 QuadLengthValue() {} | |
| 16 | |
| 17 explicit QuadLengthValue(Length length) | |
| 18 : top(length), right(length), bottom(length), left(length) {} | |
| 19 | |
| 20 QuadLengthValue(const QuadLengthValue& other) | |
| 21 : top(other.top), | |
| 22 right(other.right), | |
| 23 bottom(other.bottom), | |
| 24 left(other.left) {} | |
| 25 | |
| 26 bool operator==(const QuadLengthValue& other) const { | |
| 27 return top == other.top && right == other.right && bottom == other.bottom && | |
| 28 left == other.left; | |
| 29 } | |
| 30 | |
| 31 bool operator!=(const QuadLengthValue& other) const { | |
| 32 return !(*this == other); | |
| 33 } | |
| 34 | |
| 35 Length top; | |
| 36 Length right; | |
| 37 Length bottom; | |
| 38 Length left; | |
| 39 }; | |
| 40 | |
| 41 } // namespace blink | |
| 42 | |
| 43 #endif // QuadLengthValue_h | |
| OLD | NEW |