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

Unified Diff: third_party/WebKit/Source/core/dom/DOMMatrixReadOnly.cpp

Issue 2504543003: [GeometryInterface] Add Constructor() at DOMMatrixReadOnly. (Closed)
Patch Set: rebase Created 4 years, 1 month 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/dom/DOMMatrixReadOnly.cpp
diff --git a/third_party/WebKit/Source/core/dom/DOMMatrixReadOnly.cpp b/third_party/WebKit/Source/core/dom/DOMMatrixReadOnly.cpp
index 0b34d8bf78ff3d29f3704b555fc54322095281db..7c7f2ede94b480e8a5869fa9af2897653f5a6e82 100644
--- a/third_party/WebKit/Source/core/dom/DOMMatrixReadOnly.cpp
+++ b/third_party/WebKit/Source/core/dom/DOMMatrixReadOnly.cpp
@@ -85,6 +85,10 @@ bool DOMMatrixReadOnly::validateAndFixup(DOMMatrixInit& other,
return true;
}
+DOMMatrixReadOnly* DOMMatrixReadOnly::create(ExceptionState& exceptionState) {
+ return new DOMMatrixReadOnly(TransformationMatrix());
+}
+
DOMMatrixReadOnly* DOMMatrixReadOnly::create(Vector<double> sequence,
ExceptionState& exceptionState) {
if (sequence.size() != 6 && sequence.size() != 16) {
@@ -249,6 +253,12 @@ DOMPoint* DOMMatrixReadOnly::transformPoint(const DOMPointInit& point) {
return DOMPoint::create(x, y, z, w);
}
+DOMMatrixReadOnly::DOMMatrixReadOnly(const TransformationMatrix& matrix,
+ bool is2D) {
+ m_matrix = TransformationMatrix::create(matrix);
+ m_is2D = is2D;
+}
+
DOMFloat32Array* DOMMatrixReadOnly::toFloat32Array() const {
float array[] = {
static_cast<float>(m_matrix->m11()), static_cast<float>(m_matrix->m12()),
« no previous file with comments | « third_party/WebKit/Source/core/dom/DOMMatrixReadOnly.h ('k') | third_party/WebKit/Source/core/dom/DOMMatrixReadOnly.idl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698