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

Unified Diff: third_party/WebKit/Source/core/dom/DOMMatrixReadOnly.h

Issue 2283363003: GeometryInterface: Add DOMMatrixInit and fromMatrix(). (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 4 years, 3 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/dom/DOMMatrixReadOnly.h
diff --git a/third_party/WebKit/Source/core/dom/DOMMatrixReadOnly.h b/third_party/WebKit/Source/core/dom/DOMMatrixReadOnly.h
index 10c274be353f2078afa3ef7973055b98f1fbb628..03512f0ca140443739c26b909cc1ad5fa7f181c0 100644
--- a/third_party/WebKit/Source/core/dom/DOMMatrixReadOnly.h
+++ b/third_party/WebKit/Source/core/dom/DOMMatrixReadOnly.h
@@ -15,14 +15,15 @@
namespace blink {
class DOMMatrix;
+class DOMMatrixInit;
-class DOMMatrixReadOnly : public GarbageCollectedFinalized<DOMMatrixReadOnly>, public ScriptWrappable {
+class CORE_EXPORT DOMMatrixReadOnly : public GarbageCollectedFinalized<DOMMatrixReadOnly>, public ScriptWrappable {
DEFINE_WRAPPERTYPEINFO();
public:
static DOMMatrixReadOnly* create(Vector<double>, ExceptionState&);
static DOMMatrixReadOnly* fromFloat32Array(DOMFloat32Array*, ExceptionState&);
static DOMMatrixReadOnly* fromFloat64Array(DOMFloat64Array*, ExceptionState&);
-
+ static DOMMatrixReadOnly* fromMatrix(DOMMatrixInit&, ExceptionState&);
virtual ~DOMMatrixReadOnly();
double a() const { return m_matrix->m11(); }
@@ -52,7 +53,7 @@ public:
bool is2D() const;
bool isIdentity() const;
- DOMMatrix* multiply(DOMMatrix*);
+ DOMMatrix* multiply(DOMMatrixInit&, ExceptionState&);
DOMMatrix* translate(double tx, double ty, double tz = 0);
DOMMatrix* scale(double scale, double ox = 0, double oy = 0);
DOMMatrix* scale3d(double scale, double ox = 0, double oy = 0, double oz = 0);
@@ -96,6 +97,7 @@ protected:
}
}
+ static bool validateAndFixup(DOMMatrixInit&, 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.

Powered by Google App Engine
This is Rietveld 408576698