| 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 13 matching lines...) Expand all Loading... |
| 49 m_ax(CSSAngleValue::create(ax->value(), ax->unit())), | 47 m_ax(CSSAngleValue::create(ax->value(), ax->unit())), |
| 50 m_ay(CSSAngleValue::create(ay->value(), ay->unit())) {} | 48 m_ay(CSSAngleValue::create(ay->value(), ay->unit())) {} |
| 51 | 49 |
| 52 Member<const CSSAngleValue> m_ax; | 50 Member<const CSSAngleValue> m_ax; |
| 53 Member<const CSSAngleValue> m_ay; | 51 Member<const CSSAngleValue> m_ay; |
| 54 }; | 52 }; |
| 55 | 53 |
| 56 } // namespace blink | 54 } // namespace blink |
| 57 | 55 |
| 58 #endif | 56 #endif |
| OLD | NEW |