OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef StyleMotionData_h | 5 #ifndef StyleMotionData_h |
6 #define StyleMotionData_h | 6 #define StyleMotionData_h |
7 | 7 |
8 #include "core/style/StyleMotionRotation.h" | 8 #include "core/style/StyleOffsetRotation.h" |
9 #include "core/style/StylePath.h" | 9 #include "core/style/StylePath.h" |
10 #include "platform/Length.h" | 10 #include "platform/Length.h" |
| 11 #include "platform/LengthPoint.h" |
11 #include "wtf/Allocator.h" | 12 #include "wtf/Allocator.h" |
12 | 13 |
13 namespace blink { | 14 namespace blink { |
14 | 15 |
15 class StyleMotionData { | 16 class StyleMotionData { |
16 DISALLOW_NEW(); | 17 DISALLOW_NEW(); |
17 public: | 18 public: |
18 StyleMotionData(StylePath* path, const Length& offset, StyleMotionRotation r
otation) | 19 StyleMotionData(const LengthPoint& anchor, const LengthPoint& position, Styl
ePath* path, const Length& distance, StyleOffsetRotation rotation) |
19 : m_path(path) | 20 : m_anchor(anchor) |
20 , m_offset(offset) | 21 , m_position(position) |
| 22 , m_path(path) |
| 23 , m_distance(distance) |
21 , m_rotation(rotation) | 24 , m_rotation(rotation) |
22 { | 25 { |
23 } | 26 } |
24 | 27 |
25 bool operator==(const StyleMotionData&) const; | 28 bool operator==(const StyleMotionData&) const; |
26 | 29 |
27 bool operator!=(const StyleMotionData& o) const { return !(*this == o); } | 30 bool operator!=(const StyleMotionData& o) const { return !(*this == o); } |
28 | 31 |
29 // Must be public for SET_VAR in ComputedStyle.h | 32 // Must be public for SET_VAR in ComputedStyle.h |
| 33 LengthPoint m_anchor; |
| 34 LengthPoint m_position; |
30 RefPtr<StylePath> m_path; // nullptr indicates path is 'none' | 35 RefPtr<StylePath> m_path; // nullptr indicates path is 'none' |
31 Length m_offset; | 36 Length m_distance; |
32 StyleMotionRotation m_rotation; | 37 StyleOffsetRotation m_rotation; |
33 }; | 38 }; |
34 | 39 |
35 } // namespace blink | 40 } // namespace blink |
36 | 41 |
37 #endif // StyleMotionData_h | 42 #endif // StyleMotionData_h |
OLD | NEW |