| 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/CSSTransformComponent.h" | 10 #include "core/css/cssom/CSSTransformComponent.h" |
| (...skipping 11 matching lines...) Expand all Loading... |
| 22 static CSSPerspective* fromCSSValue(const CSSFunctionValue&); | 22 static CSSPerspective* fromCSSValue(const CSSFunctionValue&); |
| 23 | 23 |
| 24 // Bindings require a non const return value. | 24 // Bindings require a non const return value. |
| 25 CSSLengthValue* length() const { | 25 CSSLengthValue* length() const { |
| 26 return const_cast<CSSLengthValue*>(m_length.get()); | 26 return const_cast<CSSLengthValue*>(m_length.get()); |
| 27 } | 27 } |
| 28 | 28 |
| 29 TransformComponentType type() const override { return PerspectiveType; } | 29 TransformComponentType type() const override { return PerspectiveType; } |
| 30 | 30 |
| 31 // TODO: Implement asMatrix for CSSPerspective. | 31 // TODO: Implement asMatrix for CSSPerspective. |
| 32 CSSMatrixTransformComponent* asMatrix() const override { return nullptr; } | 32 CSSMatrixComponent* asMatrix() const override { return nullptr; } |
| 33 | 33 |
| 34 CSSFunctionValue* toCSSValue() const override; | 34 CSSFunctionValue* toCSSValue() const override; |
| 35 | 35 |
| 36 DEFINE_INLINE_VIRTUAL_TRACE() { | 36 DEFINE_INLINE_VIRTUAL_TRACE() { |
| 37 visitor->trace(m_length); | 37 visitor->trace(m_length); |
| 38 CSSTransformComponent::trace(visitor); | 38 CSSTransformComponent::trace(visitor); |
| 39 } | 39 } |
| 40 | 40 |
| 41 private: | 41 private: |
| 42 CSSPerspective(const CSSLengthValue* length) : m_length(length) {} | 42 CSSPerspective(const CSSLengthValue* length) : m_length(length) {} |
| 43 | 43 |
| 44 Member<const CSSLengthValue> m_length; | 44 Member<const CSSLengthValue> m_length; |
| 45 }; | 45 }; |
| 46 | 46 |
| 47 } // namespace blink | 47 } // namespace blink |
| 48 | 48 |
| 49 #endif | 49 #endif |
| OLD | NEW |