Index: third_party/WebKit/Source/core/dom/DOMMatrix.cpp |
diff --git a/third_party/WebKit/Source/core/dom/DOMMatrix.cpp b/third_party/WebKit/Source/core/dom/DOMMatrix.cpp |
index 0e77259c9af33e0ffc0c6bc1bd47d0ce23edab1a..966810654a5eed9950886b24b46a341f051a327b 100644 |
--- a/third_party/WebKit/Source/core/dom/DOMMatrix.cpp |
+++ b/third_party/WebKit/Source/core/dom/DOMMatrix.cpp |
@@ -183,6 +183,36 @@ DOMMatrix* DOMMatrix::scale3dSelf(double scale, |
return scaleSelf(scale, scale, scale, ox, oy, oz); |
} |
+DOMMatrix* DOMMatrix::rotateSelf(double rotX) { |
+ return rotateSelf(0, 0, rotX); |
+} |
+ |
+DOMMatrix* DOMMatrix::rotateSelf(double rotX, double rotY) { |
+ return rotateSelf(rotX, rotY, 0); |
+} |
+ |
+DOMMatrix* DOMMatrix::rotateSelf(double rotX, double rotY, double rotZ) { |
+ if (rotZ) |
+ m_matrix->rotate3d(0, 0, 1, rotZ); |
+ |
+ if (rotY) { |
+ m_matrix->rotate3d(0, 1, 0, rotY); |
+ m_is2D = false; |
+ } |
+ |
+ if (rotX) { |
+ m_matrix->rotate3d(1, 0, 0, rotX); |
+ m_is2D = false; |
+ } |
+ |
+ return this; |
+} |
+ |
+DOMMatrix* DOMMatrix::rotateFromVectorSelf(double x, double y) { |
+ m_matrix->rotate(rad2deg(atan2(y, x))); |
+ return this; |
+} |
+ |
DOMMatrix* DOMMatrix::rotateAxisAngleSelf(double x, |
double y, |
double z, |