OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2014 Apple Inc. All rights reserved. | 2 * Copyright (C) 2014 Apple Inc. All rights reserved. |
3 * | 3 * |
4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions | 5 * modification, are permitted provided that the following conditions |
6 * are met: | 6 * are met: |
7 * 1. Redistributions of source code must retain the above copyright | 7 * 1. Redistributions of source code must retain the above copyright |
8 * notice, this list of conditions and the following disclaimer. | 8 * notice, this list of conditions and the following disclaimer. |
9 * 2. Redistributions in binary form must reproduce the above copyright | 9 * 2. Redistributions in binary form must reproduce the above copyright |
10 * notice, this list of conditions and the following disclaimer in the | 10 * notice, this list of conditions and the following disclaimer in the |
(...skipping 12 matching lines...) Expand all Loading... |
23 * THE POSSIBILITY OF SUCH DAMAGE. | 23 * THE POSSIBILITY OF SUCH DAMAGE. |
24 */ | 24 */ |
25 | 25 |
26 #include "core/style/StyleScrollSnapData.h" | 26 #include "core/style/StyleScrollSnapData.h" |
27 | 27 |
28 #include "core/style/ComputedStyle.h" | 28 #include "core/style/ComputedStyle.h" |
29 | 29 |
30 namespace blink { | 30 namespace blink { |
31 | 31 |
32 StyleScrollSnapData::StyleScrollSnapData() | 32 StyleScrollSnapData::StyleScrollSnapData() |
33 : x_points_(ComputedStyle::InitialScrollSnapPointsX()), | 33 : type_(ComputedStyle::InitialScrollSnapType()), |
34 y_points_(ComputedStyle::InitialScrollSnapPointsY()), | 34 align_(ComputedStyle::InitialScrollSnapAlign()), |
35 destination_(ComputedStyle::InitialScrollSnapDestination()), | 35 padding_(ComputedStyle::InitialScrollPadding()), |
36 coordinates_(ComputedStyle::InitialScrollSnapCoordinate()) {} | 36 margin_(ComputedStyle::InitialScrollSnapMargin()) {} |
37 | 37 |
38 StyleScrollSnapData::StyleScrollSnapData(const StyleScrollSnapData& other) | 38 StyleScrollSnapData::StyleScrollSnapData(const StyleScrollSnapData& other) |
39 : x_points_(other.x_points_), | 39 : type_(other.type_), |
40 y_points_(other.y_points_), | 40 align_(other.align_), |
41 destination_(other.destination_), | 41 padding_(other.padding_), |
42 coordinates_(other.coordinates_) {} | 42 margin_(other.margin_) {} |
43 | 43 |
44 bool operator==(const StyleScrollSnapData& a, const StyleScrollSnapData& b) { | 44 bool operator==(const StyleScrollSnapData& a, const StyleScrollSnapData& b) { |
45 return a.x_points_ == b.x_points_ && a.y_points_ == b.y_points_ && | 45 return a.type_ == b.type_ && a.align_ == b.align_ && |
46 a.destination_ == b.destination_ && a.coordinates_ == b.coordinates_; | 46 a.padding_ == b.padding_ && a.margin_ == b.margin_; |
47 } | 47 } |
48 | 48 |
49 } // namespace blink | 49 } // namespace blink |
OLD | NEW |