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

Unified Diff: third_party/WebKit/Source/core/css/CSSMatrix.cpp

Issue 1673093003: blink::TransformationMatrix implement create methods (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Remove TransfromationMatrix::create(const AffineTransform&) 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
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/css/cssom/MatrixTransformComponent.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/css/CSSMatrix.cpp
diff --git a/third_party/WebKit/Source/core/css/CSSMatrix.cpp b/third_party/WebKit/Source/core/css/CSSMatrix.cpp
index 4b9c1969accd86af80d2be41f18c53e64abab246..3c4d5a3ccbb36f8a6263f4d08a215ee347c50127 100644
--- a/third_party/WebKit/Source/core/css/CSSMatrix.cpp
+++ b/third_party/WebKit/Source/core/css/CSSMatrix.cpp
@@ -47,12 +47,12 @@ PassRefPtrWillBeRawPtr<CSSMatrix> CSSMatrix::create(ExecutionContext* executionC
}
CSSMatrix::CSSMatrix(const TransformationMatrix& m)
- : m_matrix(adoptPtr(new TransformationMatrix(m)))
+ : m_matrix(TransformationMatrix::create(m))
{
}
CSSMatrix::CSSMatrix(const String& s, ExceptionState& exceptionState)
- : m_matrix(adoptPtr(new TransformationMatrix))
+ : m_matrix(TransformationMatrix::create())
{
setMatrixValue(s, exceptionState);
}
@@ -82,7 +82,7 @@ void CSSMatrix::setMatrixValue(const String& string, ExceptionState& exceptionSt
// if a param has a percentage ('%')
if (operations.dependsOnBoxSize())
exceptionState.throwDOMException(SyntaxError, "The transformation depends on the box size, which is not supported.");
- m_matrix = adoptPtr(new TransformationMatrix);
+ m_matrix = TransformationMatrix::create();
operations.apply(FloatSize(0, 0), *m_matrix);
} else { // There is something there but parsing failed.
exceptionState.throwDOMException(SyntaxError, "Failed to parse '" + string + "'.");
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/css/cssom/MatrixTransformComponent.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698