Index: third_party/WebKit/Source/core/css/cssom/MatrixTransformComponent.cpp |
diff --git a/third_party/WebKit/Source/core/css/cssom/MatrixTransformComponent.cpp b/third_party/WebKit/Source/core/css/cssom/MatrixTransformComponent.cpp |
deleted file mode 100644 |
index 5519d9cc413ad3d75f9f9b8587fc8ab7dc66581a..0000000000000000000000000000000000000000 |
--- a/third_party/WebKit/Source/core/css/cssom/MatrixTransformComponent.cpp |
+++ /dev/null |
@@ -1,101 +0,0 @@ |
-// Copyright 2016 The Chromium Authors. All rights reserved. |
-// Use of this source code is governed by a BSD-style license that can be |
-// found in the LICENSE file. |
- |
-#include "core/css/cssom/MatrixTransformComponent.h" |
- |
-#include "core/css/CSSPrimitiveValue.h" |
-#include "core/css/CSSValuePool.h" |
-#include "wtf/MathExtras.h" |
-#include <cmath> |
- |
-namespace blink { |
- |
-CSSFunctionValue* MatrixTransformComponent::toCSSValue() const |
-{ |
- CSSFunctionValue* result = CSSFunctionValue::create(m_is2D ? CSSValueMatrix : CSSValueMatrix3d); |
- |
- if (m_is2D) { |
- double values[6] = {a(), b(), c(), d(), e(), f()}; |
- for (double value : values) { |
- result->append(cssValuePool().createValue(value, CSSPrimitiveValue::UnitType::Number)); |
- } |
- } else { |
- double values[16] = {m11(), m12(), m13(), m14(), m21(), m22(), m23(), m24(), |
- m31(), m32(), m33(), m34(), m41(), m42(), m43(), m44()}; |
- for (double value : values) { |
- result->append(cssValuePool().createValue(value, CSSPrimitiveValue::UnitType::Number)); |
- } |
- } |
- |
- return result; |
-} |
- |
-MatrixTransformComponent* MatrixTransformComponent::perspective(double length) |
-{ |
- OwnPtr<TransformationMatrix> matrix = TransformationMatrix::create(); |
- if (length != 0) |
- matrix->setM34(-1 / length); |
- return new MatrixTransformComponent(std::move(matrix), PerspectiveType); |
-} |
- |
-MatrixTransformComponent* MatrixTransformComponent::rotate(double angle) |
-{ |
- OwnPtr<TransformationMatrix> matrix = TransformationMatrix::create(); |
- matrix->rotate(angle); |
- return new MatrixTransformComponent(std::move(matrix), RotationType); |
-} |
- |
-MatrixTransformComponent* MatrixTransformComponent::rotate3d(double angle, double x, double y, double z) |
-{ |
- OwnPtr<TransformationMatrix> matrix = TransformationMatrix::create(); |
- matrix->rotate3d(x, y, z, angle); |
- return new MatrixTransformComponent(std::move(matrix), Rotation3DType); |
-} |
- |
-MatrixTransformComponent* MatrixTransformComponent::scale(double x, double y) |
-{ |
- OwnPtr<TransformationMatrix> matrix = TransformationMatrix::create(); |
- matrix->setM11(x); |
- matrix->setM22(y); |
- return new MatrixTransformComponent(std::move(matrix), ScaleType); |
-} |
- |
-MatrixTransformComponent* MatrixTransformComponent::scale3d(double x, double y, double z) |
-{ |
- OwnPtr<TransformationMatrix> matrix = TransformationMatrix::create(); |
- matrix->setM11(x); |
- matrix->setM22(y); |
- matrix->setM33(z); |
- return new MatrixTransformComponent(std::move(matrix), Scale3DType); |
-} |
- |
-MatrixTransformComponent* MatrixTransformComponent::skew(double ax, double ay) |
-{ |
- double tanAx = std::tan(deg2rad(ax)); |
- double tanAy = std::tan(deg2rad(ay)); |
- |
- OwnPtr<TransformationMatrix> matrix = TransformationMatrix::create(); |
- matrix->setM12(tanAy); |
- matrix->setM21(tanAx); |
- return new MatrixTransformComponent(std::move(matrix), SkewType); |
-} |
- |
-MatrixTransformComponent* MatrixTransformComponent::translate(double x, double y) |
-{ |
- OwnPtr<TransformationMatrix> matrix = TransformationMatrix::create(); |
- matrix->setM41(x); |
- matrix->setM42(y); |
- return new MatrixTransformComponent(std::move(matrix), TranslationType); |
-} |
- |
-MatrixTransformComponent* MatrixTransformComponent::translate3d(double x, double y, double z) |
-{ |
- OwnPtr<TransformationMatrix> matrix = TransformationMatrix::create(); |
- matrix->setM41(x); |
- matrix->setM42(y); |
- matrix->setM43(z); |
- return new MatrixTransformComponent(std::move(matrix), Translation3DType); |
-} |
- |
-} // namespace blink |