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/layout/style/LayoutStyleConstants.h" | 8 #include "core/layout/style/ComputedStyleConstants.h" |
9 #include "core/layout/style/StyleMotionPath.h" | 9 #include "core/layout/style/StyleMotionPath.h" |
10 #include "platform/Length.h" | 10 #include "platform/Length.h" |
11 | 11 |
12 namespace blink { | 12 namespace blink { |
13 | 13 |
14 class StyleMotionData { | 14 class StyleMotionData { |
15 public: | 15 public: |
16 StyleMotionData(StyleMotionPath* path, const Length& offset, float rotation,
MotionRotationType rotationType) | 16 StyleMotionData(StyleMotionPath* path, const Length& offset, float rotation,
MotionRotationType rotationType) |
17 : m_path(path) | 17 : m_path(path) |
18 , m_offset(offset) | 18 , m_offset(offset) |
19 , m_rotation(rotation) | 19 , m_rotation(rotation) |
20 , m_rotationType(rotationType) | 20 , m_rotationType(rotationType) |
21 { | 21 { |
22 } | 22 } |
23 | 23 |
24 bool operator==(const StyleMotionData&) const; | 24 bool operator==(const StyleMotionData&) const; |
25 | 25 |
26 bool operator!=(const StyleMotionData& o) const { return !(*this == o); } | 26 bool operator!=(const StyleMotionData& o) const { return !(*this == o); } |
27 | 27 |
28 // Must be public for SET_VAR in LayoutStyle.h | 28 // Must be public for SET_VAR in ComputedStyle.h |
29 RefPtr<StyleMotionPath> m_path; // nullptr indicates path is 'none' | 29 RefPtr<StyleMotionPath> m_path; // nullptr indicates path is 'none' |
30 Length m_offset; | 30 Length m_offset; |
31 float m_rotation; | 31 float m_rotation; |
32 MotionRotationType m_rotationType; | 32 MotionRotationType m_rotationType; |
33 }; | 33 }; |
34 | 34 |
35 } // namespace blink | 35 } // namespace blink |
36 | 36 |
37 #endif // StyleMotionData_h | 37 #endif // StyleMotionData_h |
OLD | NEW |