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 TranslationTransformComponent_h | 5 #ifndef TranslationTransformComponent_h |
6 #define TranslationTransformComponent_h | 6 #define TranslationTransformComponent_h |
7 | 7 |
8 #include "core/css/cssom/LengthValue.h" | 8 #include "core/css/cssom/LengthValue.h" |
9 #include "core/css/cssom/TransformComponent.h" | 9 #include "core/css/cssom/TransformComponent.h" |
10 | 10 |
(...skipping 13 matching lines...) Expand all Loading... |
24 | 24 |
25 LengthValue* x() const { return m_x; } | 25 LengthValue* x() const { return m_x; } |
26 LengthValue* y() const { return m_y; } | 26 LengthValue* y() const { return m_y; } |
27 LengthValue* z() const { return m_z; } | 27 LengthValue* z() const { return m_z; } |
28 | 28 |
29 TransformComponentType type() const override { return is2D() ? TranslationTy
pe : Translation3DType; } | 29 TransformComponentType type() const override { return is2D() ? TranslationTy
pe : Translation3DType; } |
30 | 30 |
31 // TODO: Implement asMatrix for TranslationTransformComponent. | 31 // TODO: Implement asMatrix for TranslationTransformComponent. |
32 MatrixTransformComponent* asMatrix() const override { return nullptr; } | 32 MatrixTransformComponent* asMatrix() const override { return nullptr; } |
33 | 33 |
34 RawPtr<CSSFunctionValue> toCSSValue() const override; | 34 CSSFunctionValue* toCSSValue() const override; |
35 | 35 |
36 DEFINE_INLINE_VIRTUAL_TRACE() | 36 DEFINE_INLINE_VIRTUAL_TRACE() |
37 { | 37 { |
38 visitor->trace(m_x); | 38 visitor->trace(m_x); |
39 visitor->trace(m_y); | 39 visitor->trace(m_y); |
40 visitor->trace(m_z); | 40 visitor->trace(m_z); |
41 TransformComponent::trace(visitor); | 41 TransformComponent::trace(visitor); |
42 } | 42 } |
43 | 43 |
44 private: | 44 private: |
45 TranslationTransformComponent(LengthValue* x, LengthValue* y, LengthValue* z
) | 45 TranslationTransformComponent(LengthValue* x, LengthValue* y, LengthValue* z
) |
46 : TransformComponent() | 46 : TransformComponent() |
47 , m_x(x) | 47 , m_x(x) |
48 , m_y(y) | 48 , m_y(y) |
49 , m_z(z) | 49 , m_z(z) |
50 { } | 50 { } |
51 | 51 |
52 bool is2D() const { return !m_z; } | 52 bool is2D() const { return !m_z; } |
53 | 53 |
54 Member<LengthValue> m_x; | 54 Member<LengthValue> m_x; |
55 Member<LengthValue> m_y; | 55 Member<LengthValue> m_y; |
56 Member<LengthValue> m_z; | 56 Member<LengthValue> m_z; |
57 }; | 57 }; |
58 | 58 |
59 } // namespace blink | 59 } // namespace blink |
60 | 60 |
61 #endif | 61 #endif |
OLD | NEW |