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 CSSTransformComponent_h | 5 #ifndef CSSTransformComponent_h |
6 #define CSSTransformComponent_h | 6 #define CSSTransformComponent_h |
7 | 7 |
8 #include "core/CoreExport.h" | 8 #include "core/CoreExport.h" |
9 #include "core/css/CSSFunctionValue.h" | 9 #include "core/css/CSSFunctionValue.h" |
10 #include "platform/bindings/ScriptWrappable.h" | 10 #include "platform/bindings/ScriptWrappable.h" |
11 #include "platform/wtf/text/WTFString.h" | 11 #include "platform/wtf/text/WTFString.h" |
12 | 12 |
13 namespace blink { | 13 namespace blink { |
14 | 14 |
15 class CSSMatrixComponent; | 15 class DOMMatrix; |
16 | 16 |
17 class CORE_EXPORT CSSTransformComponent | 17 class CORE_EXPORT CSSTransformComponent |
18 : public GarbageCollectedFinalized<CSSTransformComponent>, | 18 : public GarbageCollectedFinalized<CSSTransformComponent>, |
19 public ScriptWrappable { | 19 public ScriptWrappable { |
20 WTF_MAKE_NONCOPYABLE(CSSTransformComponent); | 20 WTF_MAKE_NONCOPYABLE(CSSTransformComponent); |
21 DEFINE_WRAPPERTYPEINFO(); | 21 DEFINE_WRAPPERTYPEINFO(); |
22 | 22 |
23 public: | 23 public: |
24 enum TransformComponentType { | 24 enum TransformComponentType { |
25 kMatrixType, | 25 kMatrixType, |
(...skipping 25 matching lines...) Expand all Loading... |
51 bool is2D() const { return Is2DComponentType(GetType()); } | 51 bool is2D() const { return Is2DComponentType(GetType()); } |
52 | 52 |
53 virtual String toString() const { | 53 virtual String toString() const { |
54 const CSSValue* result = ToCSSValue(); | 54 const CSSValue* result = ToCSSValue(); |
55 // TODO(meade): Remove this once all the number and length types are | 55 // TODO(meade): Remove this once all the number and length types are |
56 // rewritten. | 56 // rewritten. |
57 return result ? result->CssText() : ""; | 57 return result ? result->CssText() : ""; |
58 } | 58 } |
59 | 59 |
60 virtual CSSFunctionValue* ToCSSValue() const = 0; | 60 virtual CSSFunctionValue* ToCSSValue() const = 0; |
61 virtual CSSMatrixComponent* asMatrix() const = 0; | 61 virtual DOMMatrix* AsMatrix() const = 0; |
62 | 62 |
63 DEFINE_INLINE_VIRTUAL_TRACE() {} | 63 DEFINE_INLINE_VIRTUAL_TRACE() {} |
64 | 64 |
65 protected: | 65 protected: |
66 CSSTransformComponent() = default; | 66 CSSTransformComponent() = default; |
67 }; | 67 }; |
68 | 68 |
69 } // namespace blink | 69 } // namespace blink |
70 | 70 |
71 #endif | 71 #endif |
OLD | NEW |