| Index: third_party/WebKit/Source/core/css/cssom/CSSTransformComponent.h
|
| diff --git a/third_party/WebKit/Source/core/css/cssom/CSSTransformComponent.h b/third_party/WebKit/Source/core/css/cssom/CSSTransformComponent.h
|
| index f607337dc58b7d0058ace3c5a961f50242e701a0..ebc67eaf34e896ba93533a60800622de75ee3913 100644
|
| --- a/third_party/WebKit/Source/core/css/cssom/CSSTransformComponent.h
|
| +++ b/third_party/WebKit/Source/core/css/cssom/CSSTransformComponent.h
|
| @@ -14,6 +14,10 @@ namespace blink {
|
|
|
| class DOMMatrix;
|
|
|
| +// CSSTransformComponent is the base class used for the representations of
|
| +// the individual CSS transforms. They are combined in a CSSTransformValue
|
| +// before they can be used as a value for properties like "transform".
|
| +// See CSSTransformComponent.idl for more information about this class.
|
| class CORE_EXPORT CSSTransformComponent
|
| : public GarbageCollectedFinalized<CSSTransformComponent>,
|
| public ScriptWrappable {
|
| @@ -34,22 +38,13 @@ class CORE_EXPORT CSSTransformComponent
|
| kTranslation3DType
|
| };
|
|
|
| - static CSSTransformComponent* FromCSSValue(const CSSValue&);
|
| -
|
| - static bool Is2DComponentType(TransformComponentType transform_type) {
|
| - return transform_type != kMatrix3DType &&
|
| - transform_type != kPerspectiveType &&
|
| - transform_type != kRotation3DType &&
|
| - transform_type != kScale3DType &&
|
| - transform_type != kTranslation3DType;
|
| - }
|
| -
|
| virtual ~CSSTransformComponent() {}
|
|
|
| - virtual TransformComponentType GetType() const = 0;
|
| + // Blink-internal ways of creating CSSTransformComponents.
|
| + static CSSTransformComponent* FromCSSValue(const CSSValue&);
|
|
|
| + // Getters and setters for attributes defined in the IDL.
|
| bool is2D() const { return Is2DComponentType(GetType()); }
|
| -
|
| virtual String toString() const {
|
| const CSSValue* result = ToCSSValue();
|
| // TODO(meade): Remove this once all the number and length types are
|
| @@ -57,12 +52,22 @@ class CORE_EXPORT CSSTransformComponent
|
| return result ? result->CssText() : "";
|
| }
|
|
|
| + // Internal methods.
|
| + virtual TransformComponentType GetType() const = 0;
|
| virtual CSSFunctionValue* ToCSSValue() const = 0;
|
| virtual DOMMatrix* AsMatrix() const = 0;
|
|
|
| DEFINE_INLINE_VIRTUAL_TRACE() {}
|
|
|
| protected:
|
| + static bool Is2DComponentType(TransformComponentType transform_type) {
|
| + return transform_type != kMatrix3DType &&
|
| + transform_type != kPerspectiveType &&
|
| + transform_type != kRotation3DType &&
|
| + transform_type != kScale3DType &&
|
| + transform_type != kTranslation3DType;
|
| + }
|
| +
|
| CSSTransformComponent() = default;
|
| };
|
|
|
|
|