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

Unified Diff: third_party/WebKit/Source/core/css/cssom/ScaleTransformComponent.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/ScaleTransformComponent.h
diff --git a/third_party/WebKit/Source/core/css/cssom/ScaleTransformComponent.h b/third_party/WebKit/Source/core/css/cssom/ScaleTransformComponent.h
index 35e5d7e1a4b01bdcd40384dbe8d5a41c503d453f..9cbd456559d100cf1414aa86da30a4318772d752 100644
--- a/third_party/WebKit/Source/core/css/cssom/ScaleTransformComponent.h
+++ b/third_party/WebKit/Source/core/css/cssom/ScaleTransformComponent.h
@@ -5,6 +5,7 @@
#ifndef ScaleTransformComponent_h
#define ScaleTransformComponent_h
+#include "core/css/cssom/MatrixTransformComponent.h"
#include "core/css/cssom/TransformComponent.h"
namespace blink {
@@ -29,6 +30,12 @@ public:
TransformComponentType type() const override { return m_is2D ? ScaleType : Scale3DType; }
+ MatrixTransformComponent* asMatrix() const override
+ {
+ return m_is2D ? MatrixTransformComponent::scale(m_x, m_y)
+ : MatrixTransformComponent::scale3d(m_x, m_y, m_z);
+ }
+
PassRefPtrWillBeRawPtr<CSSFunctionValue> toCSSValue() const override;
private:

Powered by Google App Engine
This is Rietveld 408576698