Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(155)

Unified Diff: third_party/WebKit/Source/core/css/cssom/TransformComponent.h

Issue 1648853002: Typed CSS OM: implement TransformComponent::asMatrix (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@asMatrixTransformMethod
Patch Set: Use TransformationMatrix::create Created 4 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/core/css/cssom/TransformComponent.h
diff --git a/third_party/WebKit/Source/core/css/cssom/TransformComponent.h b/third_party/WebKit/Source/core/css/cssom/TransformComponent.h
index 8cd9db6c21600dc43f24c868e62909d9490180f9..e5b169cd0f0892e32e0a5c712c31f7c9c264a0dc 100644
--- a/third_party/WebKit/Source/core/css/cssom/TransformComponent.h
+++ b/third_party/WebKit/Source/core/css/cssom/TransformComponent.h
@@ -11,6 +11,8 @@
namespace blink {
+class MatrixTransformComponent;
+
class CORE_EXPORT TransformComponent : public GarbageCollectedFinalized<TransformComponent>, public ScriptWrappable {
WTF_MAKE_NONCOPYABLE(TransformComponent);
DEFINE_WRAPPERTYPEINFO();
@@ -24,9 +26,10 @@ public:
virtual TransformComponentType type() const = 0;
- bool is2DComponent() const
+ bool is2DComponent() const { return is2DComponentType(type()); }
+
+ static bool is2DComponentType(TransformComponentType transformType)
{
- TransformComponentType transformType = type();
return transformType != Matrix3DType
&& transformType != PerspectiveType
&& transformType != Rotation3DType
@@ -41,6 +44,7 @@ public:
}
virtual PassRefPtrWillBeRawPtr<CSSFunctionValue> toCSSValue() const = 0;
+ virtual MatrixTransformComponent* asMatrix() const = 0;
DEFINE_INLINE_VIRTUAL_TRACE() { }

Powered by Google App Engine
This is Rietveld 408576698