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

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

Issue 2240513002: Implement DOMMatrixReadOnly multiple and constructor functions Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 4 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/dom/DOMMatrixReadOnly.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 890990b545ff0eb4fb2c30cdf3a1ed6754b40fdf..6ed44c0fe19347edf4b213302d47509a93e0699c 100644
--- a/third_party/WebKit/Source/core/dom/DOMMatrixReadOnly.h
+++ b/third_party/WebKit/Source/core/dom/DOMMatrixReadOnly.h
@@ -9,6 +9,7 @@
#include "core/dom/DOMTypedArray.h"
#include "platform/heap/Handle.h"
#include "platform/transforms/TransformationMatrix.h"
+#include "wtf/Vector.h"
#include <memory>
namespace blink {
@@ -19,6 +20,8 @@ class DOMMatrixReadOnly : public GarbageCollectedFinalized<DOMMatrixReadOnly>, p
DEFINE_WRAPPERTYPEINFO();
public:
virtual ~DOMMatrixReadOnly();
+ static DOMMatrixReadOnly* create(Vector<double>);
+ static DOMMatrixReadOnly* create(DOMMatrixReadOnly* other);
double a() const { return m_matrix->m11(); }
double b() const { return m_matrix->m12(); }
@@ -47,7 +50,7 @@ public:
bool is2D() const;
bool isIdentity() const;
- DOMMatrix* multiply(DOMMatrix*);
+ DOMMatrixReadOnly* multiply(DOMMatrixReadOnly*);
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);
@@ -62,12 +65,17 @@ public:
DEFINE_INLINE_TRACE() { }
protected:
+ DOMMatrixReadOnly() {}
// 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;
bool m_is2D;
+
+private:
+ DOMMatrixReadOnly(const TransformationMatrix&, bool is2D);
+ DOMMatrixReadOnly(Vector<double> sequence);
};
} // namespace blink
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/dom/DOMMatrixReadOnly.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698