| 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 CSSTranslation_h | 5 #ifndef CSSTranslation_h |
| 6 #define CSSTranslation_h | 6 #define CSSTranslation_h |
| 7 | 7 |
| 8 #include "core/css/cssom/CSSTransformComponent.h" | 8 #include "core/css/cssom/CSSTransformComponent.h" |
| 9 | 9 |
| 10 namespace blink { | 10 namespace blink { |
| 11 | 11 |
| 12 class CSSNumericValue; | 12 class CSSNumericValue; |
| 13 class DOMMatrix; | 13 class DOMMatrix; |
| 14 class ExceptionState; | 14 class ExceptionState; |
| 15 | 15 |
| 16 // Represents a translation value in a CSSTransformValue used for properties | 16 // Represents a translation value in a CSSTransformValue used for properties |
| 17 // like "transform". | 17 // like "transform". |
| 18 // See CSSTranslation.idl for more information about this class. | 18 // See CSSTranslation.idl for more information about this class. |
| 19 class CORE_EXPORT CSSTranslation final : public CSSTransformComponent { | 19 class CORE_EXPORT CSSTranslation final : public CSSTransformComponent { |
| 20 WTF_MAKE_NONCOPYABLE(CSSTranslation); | 20 WTF_MAKE_NONCOPYABLE(CSSTranslation); |
| 21 DEFINE_WRAPPERTYPEINFO(); | 21 DEFINE_WRAPPERTYPEINFO(); |
| 22 | 22 |
| 23 public: | 23 public: |
| 24 // Constructors defined in the IDL. | 24 // Constructors defined in the IDL. |
| 25 static CSSTranslation* Create(CSSNumericValue* x, | 25 static CSSTranslation* Create(CSSNumericValue* x, |
| 26 CSSNumericValue* y, | 26 CSSNumericValue* y, |
| 27 ExceptionState&) { | 27 CSSNumericValue* z, |
| 28 return new CSSTranslation(x, y, nullptr); | 28 ExceptionState&); |
| 29 } | |
| 30 static CSSTranslation* Create(CSSNumericValue* x, | 29 static CSSTranslation* Create(CSSNumericValue* x, |
| 31 CSSNumericValue* y, | 30 CSSNumericValue* y, |
| 32 CSSNumericValue* z, | 31 ExceptionState& exception_state) { |
| 33 ExceptionState&); | 32 return Create(x, y, nullptr, exception_state); |
| 33 } |
| 34 | 34 |
| 35 // Blink-internal ways of creating CSSTranslations. | 35 // Blink-internal ways of creating CSSTranslations. |
| 36 static CSSTranslation* FromCSSValue(const CSSFunctionValue& value) { | 36 static CSSTranslation* FromCSSValue(const CSSFunctionValue& value) { |
| 37 return nullptr; | 37 return nullptr; |
| 38 } | 38 } |
| 39 | 39 |
| 40 // Getters and setters for attributes defined in the IDL. | 40 // Getters and setters for attributes defined in the IDL. |
| 41 CSSNumericValue* x() const { return x_; } | 41 CSSNumericValue* x() const { return x_; } |
| 42 CSSNumericValue* y() const { return y_; } | 42 CSSNumericValue* y() const { return y_; } |
| 43 CSSNumericValue* z() const { return z_; } | 43 CSSNumericValue* z() const { return z_; } |
| (...skipping 20 matching lines...) Expand all Loading... |
| 64 bool Is2D() const { return !z_; } | 64 bool Is2D() const { return !z_; } |
| 65 | 65 |
| 66 Member<CSSNumericValue> x_; | 66 Member<CSSNumericValue> x_; |
| 67 Member<CSSNumericValue> y_; | 67 Member<CSSNumericValue> y_; |
| 68 Member<CSSNumericValue> z_; | 68 Member<CSSNumericValue> z_; |
| 69 }; | 69 }; |
| 70 | 70 |
| 71 } // namespace blink | 71 } // namespace blink |
| 72 | 72 |
| 73 #endif | 73 #endif |
| OLD | NEW |