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

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

Issue 2711473005: Rename CSSMatrixTransformComponent -> CSSMatrixComponent (Closed)
Patch Set: Rename cssMatrixTransformComponent.html => cssMatrixComponent.html Created 3 years, 10 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 CSSScale_h 5 #ifndef CSSScale_h
6 #define CSSScale_h 6 #define CSSScale_h
7 7
8 #include "core/css/cssom/CSSMatrixTransformComponent.h" 8 #include "core/css/cssom/CSSMatrixComponent.h"
9 #include "core/css/cssom/CSSTransformComponent.h" 9 #include "core/css/cssom/CSSTransformComponent.h"
10 10
11 namespace blink { 11 namespace blink {
12 12
13 class CORE_EXPORT CSSScale final : public CSSTransformComponent { 13 class CORE_EXPORT CSSScale final : public CSSTransformComponent {
14 WTF_MAKE_NONCOPYABLE(CSSScale); 14 WTF_MAKE_NONCOPYABLE(CSSScale);
15 DEFINE_WRAPPERTYPEINFO(); 15 DEFINE_WRAPPERTYPEINFO();
16 16
17 public: 17 public:
18 static CSSScale* create(double x, double y) { return new CSSScale(x, y); } 18 static CSSScale* create(double x, double y) { return new CSSScale(x, y); }
19 19
20 static CSSScale* create(double x, double y, double z) { 20 static CSSScale* create(double x, double y, double z) {
21 return new CSSScale(x, y, z); 21 return new CSSScale(x, y, z);
22 } 22 }
23 23
24 static CSSScale* fromCSSValue(const CSSFunctionValue&); 24 static CSSScale* fromCSSValue(const CSSFunctionValue&);
25 25
26 double x() const { return m_x; } 26 double x() const { return m_x; }
27 double y() const { return m_y; } 27 double y() const { return m_y; }
28 double z() const { return m_z; } 28 double z() const { return m_z; }
29 29
30 TransformComponentType type() const override { 30 TransformComponentType type() const override {
31 return m_is2D ? ScaleType : Scale3DType; 31 return m_is2D ? ScaleType : Scale3DType;
32 } 32 }
33 33
34 CSSMatrixTransformComponent* asMatrix() const override { 34 CSSMatrixComponent* asMatrix() const override {
35 return m_is2D ? CSSMatrixTransformComponent::scale(m_x, m_y) 35 return m_is2D ? CSSMatrixComponent::scale(m_x, m_y)
36 : CSSMatrixTransformComponent::scale3d(m_x, m_y, m_z); 36 : CSSMatrixComponent::scale3d(m_x, m_y, m_z);
37 } 37 }
38 38
39 CSSFunctionValue* toCSSValue() const override; 39 CSSFunctionValue* toCSSValue() const override;
40 40
41 private: 41 private:
42 CSSScale(double x, double y) : m_x(x), m_y(y), m_z(1), m_is2D(true) {} 42 CSSScale(double x, double y) : m_x(x), m_y(y), m_z(1), m_is2D(true) {}
43 CSSScale(double x, double y, double z) 43 CSSScale(double x, double y, double z)
44 : m_x(x), m_y(y), m_z(z), m_is2D(false) {} 44 : m_x(x), m_y(y), m_z(z), m_is2D(false) {}
45 45
46 double m_x; 46 double m_x;
47 double m_y; 47 double m_y;
48 double m_z; 48 double m_z;
49 bool m_is2D; 49 bool m_is2D;
50 }; 50 };
51 51
52 } // namespace blink 52 } // namespace blink
53 53
54 #endif 54 #endif
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/css/cssom/CSSRotation.h ('k') | third_party/WebKit/Source/core/css/cssom/CSSSkew.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698