Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(158)

Side by Side Diff: third_party/WebKit/Source/core/css/cssom/CSSRotation.h

Issue 2039093003: [Typed OM] Implement CSSValue->CSSRotation conversion (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Sync to HEAD Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698