Chromium Code Reviews| Index: third_party/WebKit/Source/core/css/cssom/CSSMatrixComponent.cpp |
| diff --git a/third_party/WebKit/Source/core/css/cssom/CSSMatrixTransformComponent.cpp b/third_party/WebKit/Source/core/css/cssom/CSSMatrixComponent.cpp |
| similarity index 51% |
| rename from third_party/WebKit/Source/core/css/cssom/CSSMatrixTransformComponent.cpp |
| rename to third_party/WebKit/Source/core/css/cssom/CSSMatrixComponent.cpp |
| index 33b44a5eefb4d7b51f26247fb46b68c0cb3e3346..75c53daab43922066988c56971aba75dcc32b0a8 100644 |
| --- a/third_party/WebKit/Source/core/css/cssom/CSSMatrixTransformComponent.cpp |
| +++ b/third_party/WebKit/Source/core/css/cssom/CSSMatrixComponent.cpp |
| @@ -2,16 +2,16 @@ |
| // Use of this source code is governed by a BSD-style license that can be |
| // found in the LICENSE file. |
| -#include "core/css/cssom/CSSMatrixTransformComponent.h" |
| +#include "core/css/cssom/CSSMatrixComponent.h" |
| -#include "core/css/CSSPrimitiveValue.h" |
| -#include "wtf/MathExtras.h" |
| #include <cmath> |
| #include <memory> |
| +#include "core/css/CSSPrimitiveValue.h" |
|
nainar
2017/02/21 23:08:18
git cl format did this one. :/
|
| +#include "wtf/MathExtras.h" |
| namespace blink { |
| -CSSFunctionValue* CSSMatrixTransformComponent::toCSSValue() const { |
| +CSSFunctionValue* CSSMatrixComponent::toCSSValue() const { |
| CSSFunctionValue* result = |
| CSSFunctionValue::create(m_is2D ? CSSValueMatrix : CSSValueMatrix3d); |
| @@ -34,73 +34,68 @@ CSSFunctionValue* CSSMatrixTransformComponent::toCSSValue() const { |
| return result; |
| } |
| -CSSMatrixTransformComponent* CSSMatrixTransformComponent::perspective( |
| - double length) { |
| +CSSMatrixComponent* CSSMatrixComponent::perspective(double length) { |
| std::unique_ptr<TransformationMatrix> matrix = TransformationMatrix::create(); |
| if (length != 0) |
| matrix->setM34(-1 / length); |
| - return new CSSMatrixTransformComponent(std::move(matrix), PerspectiveType); |
| + return new CSSMatrixComponent(std::move(matrix), PerspectiveType); |
| } |
| -CSSMatrixTransformComponent* CSSMatrixTransformComponent::rotate(double angle) { |
| +CSSMatrixComponent* CSSMatrixComponent::rotate(double angle) { |
| std::unique_ptr<TransformationMatrix> matrix = TransformationMatrix::create(); |
| matrix->rotate(angle); |
| - return new CSSMatrixTransformComponent(std::move(matrix), RotationType); |
| + return new CSSMatrixComponent(std::move(matrix), RotationType); |
| } |
| -CSSMatrixTransformComponent* CSSMatrixTransformComponent::rotate3d(double angle, |
| - double x, |
| - double y, |
| - double z) { |
| +CSSMatrixComponent* CSSMatrixComponent::rotate3d(double angle, |
| + double x, |
| + double y, |
| + double z) { |
| std::unique_ptr<TransformationMatrix> matrix = TransformationMatrix::create(); |
| matrix->rotate3d(x, y, z, angle); |
| - return new CSSMatrixTransformComponent(std::move(matrix), Rotation3DType); |
| + return new CSSMatrixComponent(std::move(matrix), Rotation3DType); |
| } |
| -CSSMatrixTransformComponent* CSSMatrixTransformComponent::scale(double x, |
| - double y) { |
| +CSSMatrixComponent* CSSMatrixComponent::scale(double x, double y) { |
| std::unique_ptr<TransformationMatrix> matrix = TransformationMatrix::create(); |
| matrix->setM11(x); |
| matrix->setM22(y); |
| - return new CSSMatrixTransformComponent(std::move(matrix), ScaleType); |
| + return new CSSMatrixComponent(std::move(matrix), ScaleType); |
| } |
| -CSSMatrixTransformComponent* CSSMatrixTransformComponent::scale3d(double x, |
| - double y, |
| - double z) { |
| +CSSMatrixComponent* CSSMatrixComponent::scale3d(double x, double y, double z) { |
| std::unique_ptr<TransformationMatrix> matrix = TransformationMatrix::create(); |
| matrix->setM11(x); |
| matrix->setM22(y); |
| matrix->setM33(z); |
| - return new CSSMatrixTransformComponent(std::move(matrix), Scale3DType); |
| + return new CSSMatrixComponent(std::move(matrix), Scale3DType); |
| } |
| -CSSMatrixTransformComponent* CSSMatrixTransformComponent::skew(double ax, |
| - double ay) { |
| +CSSMatrixComponent* CSSMatrixComponent::skew(double ax, double ay) { |
| double tanAx = std::tan(deg2rad(ax)); |
| double tanAy = std::tan(deg2rad(ay)); |
| std::unique_ptr<TransformationMatrix> matrix = TransformationMatrix::create(); |
| matrix->setM12(tanAy); |
| matrix->setM21(tanAx); |
| - return new CSSMatrixTransformComponent(std::move(matrix), SkewType); |
| + return new CSSMatrixComponent(std::move(matrix), SkewType); |
| } |
| -CSSMatrixTransformComponent* CSSMatrixTransformComponent::translate(double x, |
| - double y) { |
| +CSSMatrixComponent* CSSMatrixComponent::translate(double x, double y) { |
| std::unique_ptr<TransformationMatrix> matrix = TransformationMatrix::create(); |
| matrix->setM41(x); |
| matrix->setM42(y); |
| - return new CSSMatrixTransformComponent(std::move(matrix), TranslationType); |
| + return new CSSMatrixComponent(std::move(matrix), TranslationType); |
| } |
| -CSSMatrixTransformComponent* |
| -CSSMatrixTransformComponent::translate3d(double x, double y, double z) { |
| +CSSMatrixComponent* CSSMatrixComponent::translate3d(double x, |
| + double y, |
| + double z) { |
| std::unique_ptr<TransformationMatrix> matrix = TransformationMatrix::create(); |
| matrix->setM41(x); |
| matrix->setM42(y); |
| matrix->setM43(z); |
| - return new CSSMatrixTransformComponent(std::move(matrix), Translation3DType); |
| + return new CSSMatrixComponent(std::move(matrix), Translation3DType); |
| } |
| } // namespace blink |