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 "bindings/core/v8/ScriptWrappable.h" | 8 #include "bindings/core/v8/ScriptWrappable.h" |
9 #include "core/CoreExport.h" | 9 #include "core/CoreExport.h" |
10 #include "core/css/CSSFunctionValue.h" | 10 #include "core/css/CSSFunctionValue.h" |
(...skipping 19 matching lines...) Expand all Loading... |
30 && transformType != PerspectiveType | 30 && transformType != PerspectiveType |
31 && transformType != Rotation3DType | 31 && transformType != Rotation3DType |
32 && transformType != Scale3DType | 32 && transformType != Scale3DType |
33 && transformType != Translation3DType; | 33 && transformType != Translation3DType; |
34 } | 34 } |
35 | 35 |
36 virtual ~CSSTransformComponent() { } | 36 virtual ~CSSTransformComponent() { } |
37 | 37 |
38 virtual TransformComponentType type() const = 0; | 38 virtual TransformComponentType type() const = 0; |
39 | 39 |
40 bool is2DComponent() const { return is2DComponentType(type()); } | 40 bool is2D() const { return is2DComponentType(type()); } |
41 | 41 |
42 String cssText() const | 42 String cssText() const |
43 { | 43 { |
44 return toCSSValue()->cssText(); | 44 return toCSSValue()->cssText(); |
45 } | 45 } |
46 | 46 |
47 virtual CSSFunctionValue* toCSSValue() const = 0; | 47 virtual CSSFunctionValue* toCSSValue() const = 0; |
48 virtual CSSMatrixTransformComponent* asMatrix() const = 0; | 48 virtual CSSMatrixTransformComponent* asMatrix() const = 0; |
49 | 49 |
50 DEFINE_INLINE_VIRTUAL_TRACE() { } | 50 DEFINE_INLINE_VIRTUAL_TRACE() { } |
51 | 51 |
52 protected: | 52 protected: |
53 CSSTransformComponent() = default; | 53 CSSTransformComponent() = default; |
54 }; | 54 }; |
55 | 55 |
56 } // namespace blink | 56 } // namespace blink |
57 | 57 |
58 #endif | 58 #endif |
OLD | NEW |