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

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

Issue 2933473003: Remove asMatrix as a JS-exposed method in CSSTransformComponents. (Closed)
Patch Set: update skew expectation for missing "s" Created 3 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/CSSMatrixComponent.cpp
diff --git a/third_party/WebKit/Source/core/css/cssom/CSSMatrixComponent.cpp b/third_party/WebKit/Source/core/css/cssom/CSSMatrixComponent.cpp
index 2fb9e7dd4ce180491474862c53cb286fc9d0f9c9..3ad9133c7d98c592987354d119b05d3299458ed5 100644
--- a/third_party/WebKit/Source/core/css/cssom/CSSMatrixComponent.cpp
+++ b/third_party/WebKit/Source/core/css/cssom/CSSMatrixComponent.cpp
@@ -4,8 +4,6 @@
#include "core/css/cssom/CSSMatrixComponent.h"
-#include <cmath>
-#include <memory>
#include "core/css/CSSPrimitiveValue.h"
#include "platform/wtf/MathExtras.h"
@@ -41,89 +39,10 @@ CSSFunctionValue* CSSMatrixComponent::ToCSSValue() const {
return result;
}
-CSSMatrixComponent* CSSMatrixComponent::Perspective(double length) {
- DOMMatrix* matrix = DOMMatrix::Create();
-
- if (length != 0)
- matrix->setM34(-1 / length);
- return new CSSMatrixComponent(matrix, kPerspectiveType);
-}
-
-CSSMatrixComponent* CSSMatrixComponent::Rotate(double angle) {
- DOMMatrix* matrix = DOMMatrix::Create();
-
- matrix->rotateSelf(angle);
- return new CSSMatrixComponent(matrix, kRotationType);
-}
-
-CSSMatrixComponent* CSSMatrixComponent::Rotate3d(double angle,
- double x,
- double y,
- double z) {
- DOMMatrix* matrix = DOMMatrix::Create();
-
- matrix->rotateAxisAngleSelf(x, y, z, angle);
- return new CSSMatrixComponent(matrix, kRotation3DType);
-}
-
-CSSMatrixComponent* CSSMatrixComponent::Scale(double x, double y) {
- DOMMatrix* matrix = DOMMatrix::Create();
-
- matrix->setM11(x);
- matrix->setM22(y);
- return new CSSMatrixComponent(matrix, kScaleType);
-}
-
-CSSMatrixComponent* CSSMatrixComponent::Scale3d(double x, double y, double z) {
- DOMMatrix* matrix = DOMMatrix::Create();
-
- matrix->setM11(x);
- matrix->setM22(y);
- matrix->setM33(z);
- return new CSSMatrixComponent(matrix, kScale3DType);
-}
-
-CSSMatrixComponent* CSSMatrixComponent::Skew(double ax, double ay) {
- double tan_ax = std::tan(deg2rad(ax));
- double tan_ay = std::tan(deg2rad(ay));
-
- DOMMatrix* matrix = DOMMatrix::Create();
-
- matrix->setM12(tan_ay);
- matrix->setM21(tan_ax);
- return new CSSMatrixComponent(matrix, kSkewType);
-}
-
-CSSMatrixComponent* CSSMatrixComponent::Translate(double x, double y) {
- DOMMatrix* matrix = DOMMatrix::Create();
-
- matrix->setM41(x);
- matrix->setM42(y);
- return new CSSMatrixComponent(matrix, kTranslationType);
-}
-
-CSSMatrixComponent* CSSMatrixComponent::Translate3d(double x,
- double y,
- double z) {
- DOMMatrix* matrix = DOMMatrix::Create();
-
- matrix->setM41(x);
- matrix->setM42(y);
- matrix->setM43(z);
- return new CSSMatrixComponent(matrix, kTranslation3DType);
-}
-
CSSMatrixComponent::CSSMatrixComponent(DOMMatrixReadOnly* matrix)
: CSSTransformComponent() {
matrix_ = DOMMatrix::Create(matrix);
is2d_ = matrix->is2D();
}
-CSSMatrixComponent::CSSMatrixComponent(DOMMatrixReadOnly* matrix,
- TransformComponentType from_type)
- : CSSTransformComponent() {
- matrix_ = DOMMatrix::Create(matrix);
- is2d_ = Is2DComponentType(from_type);
-}
-
} // namespace blink

Powered by Google App Engine
This is Rietveld 408576698