| 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 15 matching lines...) Expand all Loading... |
| 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 : x_points_(ComputedStyle::InitialScrollSnapPointsX()), |
| 34 y_points_(ComputedStyle::InitialScrollSnapPointsY()), | 34 y_points_(ComputedStyle::InitialScrollSnapPointsY()), |
| 35 destination_(ComputedStyle::InitialScrollSnapDestination()), | 35 destination_(ComputedStyle::InitialScrollSnapDestination()), |
| 36 coordinates_(ComputedStyle::InitialScrollSnapCoordinate()) {} | 36 coordinates_(ComputedStyle::InitialScrollSnapCoordinate()), |
| 37 type_(ComputedStyle::InitialScrollSnapType()), |
| 38 align_(ComputedStyle::InitialScrollSnapAlign()), |
| 39 padding_(), |
| 40 margin_(), |
| 41 stop_(ComputedStyle::InitialScrollSnapStop()) {} |
| 37 | 42 |
| 38 StyleScrollSnapData::StyleScrollSnapData(const StyleScrollSnapData& other) | 43 StyleScrollSnapData::StyleScrollSnapData(const StyleScrollSnapData& other) |
| 39 : x_points_(other.x_points_), | 44 : x_points_(other.x_points_), |
| 40 y_points_(other.y_points_), | 45 y_points_(other.y_points_), |
| 41 destination_(other.destination_), | 46 destination_(other.destination_), |
| 42 coordinates_(other.coordinates_) {} | 47 coordinates_(other.coordinates_), |
| 48 type_(other.type_), |
| 49 align_(other.align_), |
| 50 padding_(other.padding_), |
| 51 margin_(other.margin_), |
| 52 stop_(other.stop_) {} |
| 43 | 53 |
| 44 bool operator==(const StyleScrollSnapData& a, const StyleScrollSnapData& b) { | 54 bool operator==(const StyleScrollSnapData& a, const StyleScrollSnapData& b) { |
| 45 return a.x_points_ == b.x_points_ && a.y_points_ == b.y_points_ && | 55 return a.x_points_ == b.x_points_ && a.y_points_ == b.y_points_ && |
| 46 a.destination_ == b.destination_ && a.coordinates_ == b.coordinates_; | 56 a.destination_ == b.destination_ && a.coordinates_ == b.coordinates_ && |
| 57 a.type_ == b.type_ && a.align_ == b.align_ && |
| 58 a.padding_ == b.padding_ && a.margin_ == b.margin_ && |
| 59 a.stop_ == b.stop_; |
| 47 } | 60 } |
| 48 | 61 |
| 49 } // namespace blink | 62 } // namespace blink |
| OLD | NEW |