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

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 b87df838606e3c2599dc4e4769fcdb35e2ca82b0..ab32f65f2b23e8e33a774c7c40cf5fdb543cdffa 100644
--- a/third_party/WebKit/Source/core/geometry/DOMMatrix.cpp
+++ b/third_party/WebKit/Source/core/geometry/DOMMatrix.cpp
@@ -83,10 +83,14 @@ DOMMatrix* DOMMatrix::fromMatrix(DOMMatrixInit& other,
DCHECK(exception_state.HadException());
return nullptr;
}
+ return fromMatrixForSerialization(other);
+}
+
+DOMMatrix* DOMMatrix::fromMatrixForSerialization(DOMMatrixInit& other) {
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