OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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 CSSRotation_h | 5 #ifndef CSSRotation_h |
6 #define CSSRotation_h | 6 #define CSSRotation_h |
7 | 7 |
8 #include "core/css/cssom/CSSMatrixTransformComponent.h" | 8 #include "core/css/cssom/CSSMatrixTransformComponent.h" |
9 #include "core/css/cssom/TransformComponent.h" | 9 #include "core/css/cssom/TransformComponent.h" |
10 | 10 |
11 namespace blink { | 11 namespace blink { |
12 | 12 |
13 class CORE_EXPORT CSSRotation final : public TransformComponent { | 13 class CORE_EXPORT CSSRotation final : public TransformComponent { |
14 WTF_MAKE_NONCOPYABLE(CSSRotation); | 14 WTF_MAKE_NONCOPYABLE(CSSRotation); |
15 DEFINE_WRAPPERTYPEINFO(); | 15 DEFINE_WRAPPERTYPEINFO(); |
16 public: | 16 public: |
17 static CSSRotation* create(double angle) | 17 static CSSRotation* create(double angle) |
18 { | 18 { |
19 return new CSSRotation(angle); | 19 return new CSSRotation(angle); |
20 } | 20 } |
21 | 21 |
22 static CSSRotation* create(double angle, double x, double y, double z) | 22 static CSSRotation* create(double angle, double x, double y, double z) |
23 { | 23 { |
24 return new CSSRotation(angle, x, y, z); | 24 return new CSSRotation(angle, x, y, z); |
25 } | 25 } |
26 | 26 |
27 static CSSRotation* fromCSSValue(const CSSFunctionValue&) { return nullptr;
} | 27 static CSSRotation* fromCSSValue(const CSSFunctionValue&); |
28 | 28 |
29 double angle() const { return m_angle; } | 29 double angle() const { return m_angle; } |
30 double x() const { return m_x; } | 30 double x() const { return m_x; } |
31 double y() const { return m_y; } | 31 double y() const { return m_y; } |
32 double z() const { return m_z; } | 32 double z() const { return m_z; } |
33 | 33 |
34 TransformComponentType type() const override { return m_is2D ? RotationType
: Rotation3DType; } | 34 TransformComponentType type() const override { return m_is2D ? RotationType
: Rotation3DType; } |
35 | 35 |
36 CSSMatrixTransformComponent* asMatrix() const override | 36 CSSMatrixTransformComponent* asMatrix() const override |
37 { | 37 { |
(...skipping 23 matching lines...) Expand all Loading... |
61 double m_angle; | 61 double m_angle; |
62 double m_x; | 62 double m_x; |
63 double m_y; | 63 double m_y; |
64 double m_z; | 64 double m_z; |
65 bool m_is2D; | 65 bool m_is2D; |
66 }; | 66 }; |
67 | 67 |
68 } // namespace blink | 68 } // namespace blink |
69 | 69 |
70 #endif | 70 #endif |
OLD | NEW |