| 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 CSSPerspective_h | 5 #ifndef CSSPerspective_h |
| 6 #define CSSPerspective_h | 6 #define CSSPerspective_h |
| 7 | 7 |
| 8 #include "core/CoreExport.h" | 8 #include "core/CoreExport.h" |
| 9 #include "core/css/cssom/CSSLengthValue.h" | 9 #include "core/css/cssom/CSSLengthValue.h" |
| 10 #include "core/css/cssom/TransformComponent.h" | 10 #include "core/css/cssom/TransformComponent.h" |
| 11 | 11 |
| 12 namespace blink { | 12 namespace blink { |
| 13 | 13 |
| 14 class ExceptionState; | 14 class ExceptionState; |
| 15 | 15 |
| 16 class CORE_EXPORT CSSPerspective : public TransformComponent { | 16 class CORE_EXPORT CSSPerspective : public TransformComponent { |
| 17 WTF_MAKE_NONCOPYABLE(CSSPerspective); | 17 WTF_MAKE_NONCOPYABLE(CSSPerspective); |
| 18 DEFINE_WRAPPERTYPEINFO(); | 18 DEFINE_WRAPPERTYPEINFO(); |
| 19 public: | 19 public: |
| 20 static CSSPerspective* create(const CSSLengthValue*, ExceptionState&); | 20 static CSSPerspective* create(const CSSLengthValue*, ExceptionState&); |
| 21 | 21 |
| 22 // Bindings require a non const return value. | 22 // Bindings require a non const return value. |
| 23 CSSLengthValue* length() const { return const_cast<CSSLengthValue*>(m_length
.get()); } | 23 CSSLengthValue* length() const { return const_cast<CSSLengthValue*>(m_length
.get()); } |
| 24 | 24 |
| 25 TransformComponentType type() const override { return PerspectiveType; } | 25 TransformComponentType type() const override { return PerspectiveType; } |
| 26 | 26 |
| 27 // TODO: Implement asMatrix for CSSPerspective. | 27 // TODO: Implement asMatrix for CSSPerspective. |
| 28 MatrixTransformComponent* asMatrix() const override { return nullptr; } | 28 CSSMatrixTransformComponent* asMatrix() const override { return nullptr; } |
| 29 | 29 |
| 30 CSSFunctionValue* toCSSValue() const override; | 30 CSSFunctionValue* toCSSValue() const override; |
| 31 | 31 |
| 32 DEFINE_INLINE_VIRTUAL_TRACE() | 32 DEFINE_INLINE_VIRTUAL_TRACE() |
| 33 { | 33 { |
| 34 visitor->trace(m_length); | 34 visitor->trace(m_length); |
| 35 TransformComponent::trace(visitor); | 35 TransformComponent::trace(visitor); |
| 36 } | 36 } |
| 37 | 37 |
| 38 private: | 38 private: |
| 39 CSSPerspective(const CSSLengthValue* length) : m_length(length) {} | 39 CSSPerspective(const CSSLengthValue* length) : m_length(length) {} |
| 40 | 40 |
| 41 Member<const CSSLengthValue> m_length; | 41 Member<const CSSLengthValue> m_length; |
| 42 }; | 42 }; |
| 43 | 43 |
| 44 } // namespace blink | 44 } // namespace blink |
| 45 | 45 |
| 46 #endif | 46 #endif |
| OLD | NEW |