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

Unified Diff: third_party/WebKit/Source/core/css/cssom/CSSMatrixTransformComponent.cpp

Issue 2050123002: Remove OwnPtr from Blink. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: First attempt to land. Created 4 years, 6 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/css/cssom/CSSMatrixTransformComponent.cpp
diff --git a/third_party/WebKit/Source/core/css/cssom/CSSMatrixTransformComponent.cpp b/third_party/WebKit/Source/core/css/cssom/CSSMatrixTransformComponent.cpp
index 4de332a528998468f3e4c0c4586c5c8decfe3e8a..ac63595a18dff3b19034733015d608f7f8aa2003 100644
--- a/third_party/WebKit/Source/core/css/cssom/CSSMatrixTransformComponent.cpp
+++ b/third_party/WebKit/Source/core/css/cssom/CSSMatrixTransformComponent.cpp
@@ -7,6 +7,7 @@
#include "core/css/CSSPrimitiveValue.h"
#include "wtf/MathExtras.h"
#include <cmath>
+#include <memory>
namespace blink {
@@ -32,7 +33,7 @@ CSSFunctionValue* CSSMatrixTransformComponent::toCSSValue() const
CSSMatrixTransformComponent* CSSMatrixTransformComponent::perspective(double length)
{
- OwnPtr<TransformationMatrix> matrix = TransformationMatrix::create();
+ std::unique_ptr<TransformationMatrix> matrix = TransformationMatrix::create();
if (length != 0)
matrix->setM34(-1 / length);
return new CSSMatrixTransformComponent(std::move(matrix), PerspectiveType);
@@ -40,21 +41,21 @@ CSSMatrixTransformComponent* CSSMatrixTransformComponent::perspective(double len
CSSMatrixTransformComponent* CSSMatrixTransformComponent::rotate(double angle)
{
- OwnPtr<TransformationMatrix> matrix = TransformationMatrix::create();
+ std::unique_ptr<TransformationMatrix> matrix = TransformationMatrix::create();
matrix->rotate(angle);
return new CSSMatrixTransformComponent(std::move(matrix), RotationType);
}
CSSMatrixTransformComponent* CSSMatrixTransformComponent::rotate3d(double angle, double x, double y, double z)
{
- OwnPtr<TransformationMatrix> matrix = TransformationMatrix::create();
+ std::unique_ptr<TransformationMatrix> matrix = TransformationMatrix::create();
matrix->rotate3d(x, y, z, angle);
return new CSSMatrixTransformComponent(std::move(matrix), Rotation3DType);
}
CSSMatrixTransformComponent* CSSMatrixTransformComponent::scale(double x, double y)
{
- OwnPtr<TransformationMatrix> matrix = TransformationMatrix::create();
+ std::unique_ptr<TransformationMatrix> matrix = TransformationMatrix::create();
matrix->setM11(x);
matrix->setM22(y);
return new CSSMatrixTransformComponent(std::move(matrix), ScaleType);
@@ -62,7 +63,7 @@ CSSMatrixTransformComponent* CSSMatrixTransformComponent::scale(double x, double
CSSMatrixTransformComponent* CSSMatrixTransformComponent::scale3d(double x, double y, double z)
{
- OwnPtr<TransformationMatrix> matrix = TransformationMatrix::create();
+ std::unique_ptr<TransformationMatrix> matrix = TransformationMatrix::create();
matrix->setM11(x);
matrix->setM22(y);
matrix->setM33(z);
@@ -74,7 +75,7 @@ CSSMatrixTransformComponent* CSSMatrixTransformComponent::skew(double ax, double
double tanAx = std::tan(deg2rad(ax));
double tanAy = std::tan(deg2rad(ay));
- OwnPtr<TransformationMatrix> matrix = TransformationMatrix::create();
+ std::unique_ptr<TransformationMatrix> matrix = TransformationMatrix::create();
matrix->setM12(tanAy);
matrix->setM21(tanAx);
return new CSSMatrixTransformComponent(std::move(matrix), SkewType);
@@ -82,7 +83,7 @@ CSSMatrixTransformComponent* CSSMatrixTransformComponent::skew(double ax, double
CSSMatrixTransformComponent* CSSMatrixTransformComponent::translate(double x, double y)
{
- OwnPtr<TransformationMatrix> matrix = TransformationMatrix::create();
+ std::unique_ptr<TransformationMatrix> matrix = TransformationMatrix::create();
matrix->setM41(x);
matrix->setM42(y);
return new CSSMatrixTransformComponent(std::move(matrix), TranslationType);
@@ -90,7 +91,7 @@ CSSMatrixTransformComponent* CSSMatrixTransformComponent::translate(double x, do
CSSMatrixTransformComponent* CSSMatrixTransformComponent::translate3d(double x, double y, double z)
{
- OwnPtr<TransformationMatrix> matrix = TransformationMatrix::create();
+ std::unique_ptr<TransformationMatrix> matrix = TransformationMatrix::create();
matrix->setM41(x);
matrix->setM42(y);
matrix->setM43(z);

Powered by Google App Engine
This is Rietveld 408576698