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

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: addressed comments 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 cd19086fb95f05e087478c3ee094075bfa73a5c1..182f3ecc17d93342987663da766861c87c31d574 100644
--- a/third_party/WebKit/Source/core/dom/DOMMatrixReadOnly.h
+++ b/third_party/WebKit/Source/core/dom/DOMMatrixReadOnly.h
@@ -15,11 +15,13 @@
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* fromMatrix(DOMMatrixInit&, ExceptionState&);
virtual ~DOMMatrixReadOnly();
double a() const { return m_matrix->m11(); }
@@ -49,7 +51,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);
@@ -72,6 +74,7 @@ public:
protected:
DOMMatrixReadOnly() {}
+ 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