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 CSSSkew_h | 5 #ifndef CSSSkew_h |
6 #define CSSSkew_h | 6 #define CSSSkew_h |
7 | 7 |
8 #include "core/css/cssom/CSSAngleValue.h" | 8 #include "core/css/cssom/CSSAngleValue.h" |
9 #include "core/css/cssom/CSSMatrixTransformComponent.h" | 9 #include "core/css/cssom/CSSMatrixTransformComponent.h" |
10 #include "core/css/cssom/CSSTransformComponent.h" | 10 #include "core/css/cssom/CSSTransformComponent.h" |
11 | 11 |
12 namespace blink { | 12 namespace blink { |
13 | 13 |
14 class CORE_EXPORT CSSSkew final : public CSSTransformComponent { | 14 class CORE_EXPORT CSSSkew final : public CSSTransformComponent { |
15 WTF_MAKE_NONCOPYABLE(CSSSkew); | 15 WTF_MAKE_NONCOPYABLE(CSSSkew); |
16 DEFINE_WRAPPERTYPEINFO(); | 16 DEFINE_WRAPPERTYPEINFO(); |
17 | 17 |
18 public: | 18 public: |
19 static CSSSkew* create(const CSSAngleValue* ax, const CSSAngleValue* ay) { | 19 static CSSSkew* create(const CSSAngleValue* ax, const CSSAngleValue* ay) { |
20 return new CSSSkew(ax, ay); | 20 return new CSSSkew(ax, ay); |
21 } | 21 } |
22 | 22 |
23 static CSSSkew* fromCSSValue(const CSSFunctionValue& value) { | 23 static CSSSkew* fromCSSValue(const CSSFunctionValue&); |
24 return nullptr; | |
25 } | |
26 | 24 |
27 // Bindings requires returning non-const pointers. This is safe because | 25 // Bindings requires returning non-const pointers. This is safe because |
28 // CSSAngleValues are immutable. | 26 // CSSAngleValues are immutable. |
29 CSSAngleValue* ax() const { return const_cast<CSSAngleValue*>(m_ax.get()); } | 27 CSSAngleValue* ax() const { return const_cast<CSSAngleValue*>(m_ax.get()); } |
30 CSSAngleValue* ay() const { return const_cast<CSSAngleValue*>(m_ay.get()); } | 28 CSSAngleValue* ay() const { return const_cast<CSSAngleValue*>(m_ay.get()); } |
31 | 29 |
32 TransformComponentType type() const override { return SkewType; } | 30 TransformComponentType type() const override { return SkewType; } |
33 | 31 |
34 CSSMatrixTransformComponent* asMatrix() const override { | 32 CSSMatrixTransformComponent* asMatrix() const override { |
35 return CSSMatrixTransformComponent::skew(m_ax->degrees(), m_ay->degrees()); | 33 return CSSMatrixTransformComponent::skew(m_ax->degrees(), m_ay->degrees()); |
(...skipping 11 matching lines...) Expand all Loading... |
47 CSSSkew(const CSSAngleValue* ax, const CSSAngleValue* ay) | 45 CSSSkew(const CSSAngleValue* ax, const CSSAngleValue* ay) |
48 : CSSTransformComponent(), m_ax(ax), m_ay(ay) {} | 46 : CSSTransformComponent(), m_ax(ax), m_ay(ay) {} |
49 | 47 |
50 Member<const CSSAngleValue> m_ax; | 48 Member<const CSSAngleValue> m_ax; |
51 Member<const CSSAngleValue> m_ay; | 49 Member<const CSSAngleValue> m_ay; |
52 }; | 50 }; |
53 | 51 |
54 } // namespace blink | 52 } // namespace blink |
55 | 53 |
56 #endif | 54 #endif |
OLD | NEW |