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

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

Issue 1689723004: CSS Typed OM: Implement TransformValue::asMatrix (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@computeLengthValue
Patch Set: 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/MatrixTransformComponent.h
diff --git a/third_party/WebKit/Source/core/css/cssom/MatrixTransformComponent.h b/third_party/WebKit/Source/core/css/cssom/MatrixTransformComponent.h
index 78686821255f9293f4d7f95b872138f7246610c4..89b15653c34745f6352f208bbe58f73bc2ec9807 100644
--- a/third_party/WebKit/Source/core/css/cssom/MatrixTransformComponent.h
+++ b/third_party/WebKit/Source/core/css/cssom/MatrixTransformComponent.h
@@ -75,6 +75,17 @@ public:
static MatrixTransformComponent* translate(double x, double y);
static MatrixTransformComponent* translate3d(double x, double y, double z);
+ const TransformationMatrix& matrix() const { return *m_matrix; }
+
+ // TODO: implement multiply with case statement with TransformComponent::type()
+ MatrixTransformComponent* multiplySelf(const MatrixTransformComponent* other);
+
+ MatrixTransformComponent()
+ : TransformComponent()
+ , m_matrix(TransformationMatrix::create())
+ , m_is2D(true)
+ { }
+
private:
MatrixTransformComponent(double a, double b, double c, double d, double e, double f)
: TransformComponent()
@@ -91,7 +102,7 @@ private:
, m_is2D(false)
{ }
- MatrixTransformComponent(PassOwnPtr<const TransformationMatrix> matrix, TransformComponentType fromType)
+ MatrixTransformComponent(PassOwnPtr<TransformationMatrix> matrix, TransformComponentType fromType)
: TransformComponent()
, m_matrix(matrix)
, m_is2D(is2DComponentType(fromType))
@@ -101,7 +112,7 @@ private:
// supports 16-byte alignment but Oilpan doesn't. So we use an OwnPtr
// to allocate TransformationMatrix on PartitionAlloc.
// TODO(oilpan): Oilpan should support 16-byte aligned allocations.
- OwnPtr<const TransformationMatrix> m_matrix;
+ OwnPtr<TransformationMatrix> m_matrix;
bool m_is2D;
};

Powered by Google App Engine
This is Rietveld 408576698