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

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

Issue 2709763004: Make WebKitCSSMatrix an alias of DOMMatrix (Closed)
Patch Set: WIP : Fixing test. Created 3 years, 9 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/dom/DOMMatrixReadOnly.cpp
diff --git a/third_party/WebKit/Source/core/dom/DOMMatrixReadOnly.cpp b/third_party/WebKit/Source/core/dom/DOMMatrixReadOnly.cpp
index e4c1ed95915423ee26b242a647d136df8fafd511..acd9bff3e1562b60bb72ebdd0f6cab4bba46ae33 100644
--- a/third_party/WebKit/Source/core/dom/DOMMatrixReadOnly.cpp
+++ b/third_party/WebKit/Source/core/dom/DOMMatrixReadOnly.cpp
@@ -300,20 +300,16 @@ DOMFloat64Array* DOMMatrixReadOnly::toFloat64Array() const {
}
const String DOMMatrixReadOnly::toString() const {
- std::stringstream stream;
if (is2D()) {
- stream << "matrix(" << a() << ", " << b() << ", " << c() << ", " << d()
- << ", " << e() << ", " << f();
+ return String::format("matrix(%f, %f, %f, %f, %f, %f)", a(), b(), c(), d(),
foolip 2017/03/21 08:47:30 Is this a drive-by change, or does it affect the o
Byoungkwon Ko 2017/04/26 01:31:35 yes, when we were using steam, we should fix decim
foolip 2017/04/26 07:29:19 Hmm, this is actually related to https://github.co
+ e(), f());
} else {
- stream << "matrix3d(" << m11() << ", " << m12() << ", " << m13() << ", "
- << m14() << ", " << m21() << ", " << m22() << ", " << m23() << ", "
- << m24() << ", " << m31() << ", " << m32() << ", " << m33() << ", "
- << m34() << ", " << m41() << ", " << m42() << ", " << m43() << ", "
- << m44();
+ return String::format(
+ "matrix3d(%f, %f, %f, %f, %f, %f, %f, %f, %f, %f, %f, %f, %f, %f, %f, "
+ "%f)",
+ m11(), m12(), m13(), m14(), m21(), m22(), m23(), m24(), m31(), m32(),
+ m33(), m34(), m41(), m42(), m43(), m44());
}
- stream << ")";
-
- return String(stream.str().c_str());
}
ScriptValue DOMMatrixReadOnly::toJSONForBinding(

Powered by Google App Engine
This is Rietveld 408576698