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

Unified Diff: third_party/WebKit/Source/core/geometry/DOMMatrix.cpp

Issue 2874203003: Implement serialization/deserialization of geometry interfaces (Closed)
Patch Set: x Created 3 years, 7 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/geometry/DOMMatrix.cpp
diff --git a/third_party/WebKit/Source/core/geometry/DOMMatrix.cpp b/third_party/WebKit/Source/core/geometry/DOMMatrix.cpp
index 13a2e3c85056338869b3ae6eabd5b11a513c0618..3a34c5319d880bbea3331f99f0b98c03ad1b2846 100644
--- a/third_party/WebKit/Source/core/geometry/DOMMatrix.cpp
+++ b/third_party/WebKit/Source/core/geometry/DOMMatrix.cpp
@@ -52,6 +52,10 @@ DOMMatrix* DOMMatrix::Create(const SkMatrix44& matrix,
return new DOMMatrix(transformation_matrix, transformation_matrix.IsAffine());
}
+DOMMatrix* DOMMatrix::CreateForSerialization(double sequence[], int size) {
+ return new DOMMatrix(sequence, size);
+}
+
DOMMatrix* DOMMatrix::fromFloat32Array(NotShared<DOMFloat32Array> float32_array,
ExceptionState& exception_state) {
if (float32_array.View()->length() != 6 &&
@@ -92,9 +96,9 @@ DOMMatrix* DOMMatrix::fromMatrix(DOMMatrixInit& other,
return nullptr;
}
if (other.is2D()) {
- return new DOMMatrix({other.m11(), other.m12(), other.m21(), other.m22(),
- other.m41(), other.m42()},
- other.is2D());
+ return new DOMMatrix(
+ {other.a(), other.b(), other.c(), other.d(), other.e(), other.f()},
+ other.is2D());
}
return new DOMMatrix({other.m11(), other.m12(), other.m13(), other.m14(),

Powered by Google App Engine
This is Rietveld 408576698