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

Unified Diff: third_party/WebKit/Source/core/css/CSSMatrix.h

Issue 2688533002: Test code
Patch Set: Storing InspectorRevalidateDOMTask object whenever binding/unbinding node. Created 3 years, 10 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
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/css/CSSMatrix.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/css/CSSMatrix.h
diff --git a/third_party/WebKit/Source/core/css/CSSMatrix.h b/third_party/WebKit/Source/core/css/CSSMatrix.h
index e9f5eabf4d24d03291b537753515e96ffacfa8ac..b6cf7cfd27ee6aa9dac9ffa0f9c3ac5848be5f5b 100644
--- a/third_party/WebKit/Source/core/css/CSSMatrix.h
+++ b/third_party/WebKit/Source/core/css/CSSMatrix.h
@@ -26,18 +26,16 @@
#ifndef CSSMatrix_h
#define CSSMatrix_h
-#include "bindings/core/v8/ScriptWrappable.h"
-#include "platform/transforms/TransformationMatrix.h"
-#include "wtf/text/WTFString.h"
#include <memory>
+#include "core/dom/DOMMatrix.h"
+#include "wtf/text/WTFString.h"
namespace blink {
class ExceptionState;
class ExecutionContext;
-class CSSMatrix final : public GarbageCollectedFinalized<CSSMatrix>,
- public ScriptWrappable {
+class CSSMatrix final : public DOMMatrix {
DEFINE_WRAPPERTYPEINFO();
public:
@@ -46,54 +44,6 @@ class CSSMatrix final : public GarbageCollectedFinalized<CSSMatrix>,
}
static CSSMatrix* create(ExecutionContext*, const String&, ExceptionState&);
- double a() const { return m_matrix->a(); }
- double b() const { return m_matrix->b(); }
- double c() const { return m_matrix->c(); }
- double d() const { return m_matrix->d(); }
- double e() const { return m_matrix->e(); }
- double f() const { return m_matrix->f(); }
-
- void setA(double f) { m_matrix->setA(f); }
- void setB(double f) { m_matrix->setB(f); }
- void setC(double f) { m_matrix->setC(f); }
- void setD(double f) { m_matrix->setD(f); }
- void setE(double f) { m_matrix->setE(f); }
- void setF(double f) { m_matrix->setF(f); }
-
- double m11() const { return m_matrix->m11(); }
- double m12() const { return m_matrix->m12(); }
- double m13() const { return m_matrix->m13(); }
- double m14() const { return m_matrix->m14(); }
- double m21() const { return m_matrix->m21(); }
- double m22() const { return m_matrix->m22(); }
- double m23() const { return m_matrix->m23(); }
- double m24() const { return m_matrix->m24(); }
- double m31() const { return m_matrix->m31(); }
- double m32() const { return m_matrix->m32(); }
- double m33() const { return m_matrix->m33(); }
- double m34() const { return m_matrix->m34(); }
- double m41() const { return m_matrix->m41(); }
- double m42() const { return m_matrix->m42(); }
- double m43() const { return m_matrix->m43(); }
- double m44() const { return m_matrix->m44(); }
-
- void setM11(double f) { m_matrix->setM11(f); }
- void setM12(double f) { m_matrix->setM12(f); }
- void setM13(double f) { m_matrix->setM13(f); }
- void setM14(double f) { m_matrix->setM14(f); }
- void setM21(double f) { m_matrix->setM21(f); }
- void setM22(double f) { m_matrix->setM22(f); }
- void setM23(double f) { m_matrix->setM23(f); }
- void setM24(double f) { m_matrix->setM24(f); }
- void setM31(double f) { m_matrix->setM31(f); }
- void setM32(double f) { m_matrix->setM32(f); }
- void setM33(double f) { m_matrix->setM33(f); }
- void setM34(double f) { m_matrix->setM34(f); }
- void setM41(double f) { m_matrix->setM41(f); }
- void setM42(double f) { m_matrix->setM42(f); }
- void setM43(double f) { m_matrix->setM43(f); }
- void setM44(double f) { m_matrix->setM44(f); }
-
void setMatrixValue(const String&, ExceptionState&);
// The following math function return a new matrix with the
@@ -101,11 +51,11 @@ class CSSMatrix final : public GarbageCollectedFinalized<CSSMatrix>,
// Multiply this matrix by secondMatrix, on the right
// (result = this * secondMatrix)
- CSSMatrix* multiply(CSSMatrix* secondMatrix) const;
+ CSSMatrix* multiply(CSSMatrix* secondMatrix, ExceptionState&);
// Return the inverse of this matrix. Throw an exception if the matrix is not
// invertible.
- CSSMatrix* inverse(ExceptionState&) const;
+ CSSMatrix* inverse(ExceptionState&);
// Return this matrix translated by the passed values.
// Passing a NaN will use a value of 0. This allows the 3D form to used for 2D
@@ -113,7 +63,7 @@ class CSSMatrix final : public GarbageCollectedFinalized<CSSMatrix>,
// Operation is performed as though the this matrix is multiplied by a matrix
// with the translation values on the left
// (result = translation(x,y,z) * this)
- CSSMatrix* translate(double x, double y, double z) const;
+ CSSMatrix* translate(double x, double y, double z);
// Returns this matrix scaled by the passed values.
// Passing scaleX or scaleZ as NaN uses a value of 1, but passing scaleY of
@@ -121,49 +71,39 @@ class CSSMatrix final : public GarbageCollectedFinalized<CSSMatrix>,
// operations Operation is performed as though the this matrix is multiplied
// by a matrix with the scale values on the left
// (result = scale(x,y,z) * this)
- CSSMatrix* scale(double scaleX, double scaleY, double scaleZ) const;
+ CSSMatrix* scale(double scaleX, double scaleY, double scaleZ);
// Returns this matrix rotated by the passed values.
// If rotY and rotZ are NaN, rotate about Z (rotX=0, rotateY=0, rotateZ=rotX).
// Otherwise use a rotation value of 0 for any passed NaN.
// Operation is performed as though the this matrix is multiplied by a matrix
// with the rotation values on the left (result = rotation(x,y,z) * this)
- CSSMatrix* rotate(double rotX, double rotY, double rotZ) const;
+ CSSMatrix* rotate(double rotX, double rotY, double rotZ);
// Returns this matrix rotated about the passed axis by the passed angle.
// Passing a NaN will use a value of 0. If the axis is (0,0,0) use a value
// Operation is performed as though the this matrix is multiplied by a matrix
// with the rotation values on the left
// (result = rotation(x,y,z,angle) * this)
- CSSMatrix* rotateAxisAngle(double x, double y, double z, double angle) const;
+ CSSMatrix* rotateAxisAngle(double x, double y, double z, double angle);
// Return this matrix skewed along the X axis by the passed values.
// Passing a NaN will use a value of 0.
// Operation is performed as though the this matrix is multiplied by a matrix
// with the skew values on the left (result = skewX(angle) * this)
- CSSMatrix* skewX(double angle) const;
+ CSSMatrix* skewX(double angle);
// Return this matrix skewed along the Y axis by the passed values.
// Passing a NaN will use a value of 0.
// Operation is performed as though the this matrix is multiplied by a matrix
// with the skew values on the left (result = skewY(angle) * this)
- CSSMatrix* skewY(double angle) const;
+ CSSMatrix* skewY(double angle);
- const TransformationMatrix& transform() const { return *m_matrix; }
-
- String toString() const;
-
- DEFINE_INLINE_TRACE() {}
+ String toString();
protected:
CSSMatrix(const TransformationMatrix&);
CSSMatrix(const String&, ExceptionState&);
-
- // TransformationMatrix needs to be 16-byte aligned. PartitionAlloc
- // supports 16-byte alignment but Oilpan doesn't. So we use an std::unique_ptr
- // to allocate TransformationMatrix on PartitionAlloc.
- // TODO(oilpan): Oilpan should support 16-byte aligned allocations.
- std::unique_ptr<TransformationMatrix> m_matrix;
};
} // namespace blink
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/css/CSSMatrix.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698