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

Side by Side Diff: third_party/WebKit/Source/core/dom/DOMMatrixReadOnly.h

Issue 2423753002: [GeometryInterface] add transformPoint(point) function. (Closed)
Patch Set: update test msg. Created 4 years, 1 month 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 unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef DOMMatrixReadOnly_h 5 #ifndef DOMMatrixReadOnly_h
6 #define DOMMatrixReadOnly_h 6 #define DOMMatrixReadOnly_h
7 7
8 #include "bindings/core/v8/ExceptionState.h" 8 #include "bindings/core/v8/ExceptionState.h"
9 #include "bindings/core/v8/ScriptWrappable.h" 9 #include "bindings/core/v8/ScriptWrappable.h"
10 #include "core/dom/DOMTypedArray.h" 10 #include "core/dom/DOMTypedArray.h"
11 #include "platform/heap/Handle.h" 11 #include "platform/heap/Handle.h"
12 #include "platform/transforms/TransformationMatrix.h" 12 #include "platform/transforms/TransformationMatrix.h"
13 #include <memory> 13 #include <memory>
14 14
15 namespace blink { 15 namespace blink {
16 16
17 class DOMMatrix; 17 class DOMMatrix;
18 class DOMMatrixInit; 18 class DOMMatrixInit;
19 class DOMPoint;
20 class DOMPointInit;
19 21
20 class CORE_EXPORT DOMMatrixReadOnly 22 class CORE_EXPORT DOMMatrixReadOnly
21 : public GarbageCollectedFinalized<DOMMatrixReadOnly>, 23 : public GarbageCollectedFinalized<DOMMatrixReadOnly>,
22 public ScriptWrappable { 24 public ScriptWrappable {
23 DEFINE_WRAPPERTYPEINFO(); 25 DEFINE_WRAPPERTYPEINFO();
24 26
25 public: 27 public:
26 static DOMMatrixReadOnly* create(Vector<double>, ExceptionState&); 28 static DOMMatrixReadOnly* create(Vector<double>, ExceptionState&);
27 static DOMMatrixReadOnly* fromFloat32Array(DOMFloat32Array*, ExceptionState&); 29 static DOMMatrixReadOnly* fromFloat32Array(DOMFloat32Array*, ExceptionState&);
28 static DOMMatrixReadOnly* fromFloat64Array(DOMFloat64Array*, ExceptionState&); 30 static DOMMatrixReadOnly* fromFloat64Array(DOMFloat64Array*, ExceptionState&);
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
76 DOMMatrix* rotateAxisAngle(double x = 0, 78 DOMMatrix* rotateAxisAngle(double x = 0,
77 double y = 0, 79 double y = 0,
78 double z = 0, 80 double z = 0,
79 double angle = 0); 81 double angle = 0);
80 DOMMatrix* skewX(double sx); 82 DOMMatrix* skewX(double sx);
81 DOMMatrix* skewY(double sy); 83 DOMMatrix* skewY(double sy);
82 DOMMatrix* flipX(); 84 DOMMatrix* flipX();
83 DOMMatrix* flipY(); 85 DOMMatrix* flipY();
84 DOMMatrix* inverse(); 86 DOMMatrix* inverse();
85 87
88 DOMPoint* transformPoint(const DOMPointInit&);
89
86 DOMFloat32Array* toFloat32Array() const; 90 DOMFloat32Array* toFloat32Array() const;
87 DOMFloat64Array* toFloat64Array() const; 91 DOMFloat64Array* toFloat64Array() const;
88 92
89 const String toString() const; 93 const String toString() const;
90 94
91 ScriptValue toJSONForBinding(ScriptState*) const; 95 ScriptValue toJSONForBinding(ScriptState*) const;
92 96
93 const TransformationMatrix& matrix() const { return *m_matrix; } 97 const TransformationMatrix& matrix() const { return *m_matrix; }
94 98
95 DEFINE_INLINE_TRACE() {} 99 DEFINE_INLINE_TRACE() {}
(...skipping 25 matching lines...) Expand all
121 // supports 16-byte alignment but Oilpan doesn't. So we use an std::unique_ptr 125 // supports 16-byte alignment but Oilpan doesn't. So we use an std::unique_ptr
122 // to allocate TransformationMatrix on PartitionAlloc. 126 // to allocate TransformationMatrix on PartitionAlloc.
123 // TODO(oilpan): Oilpan should support 16-byte aligned allocations. 127 // TODO(oilpan): Oilpan should support 16-byte aligned allocations.
124 std::unique_ptr<TransformationMatrix> m_matrix; 128 std::unique_ptr<TransformationMatrix> m_matrix;
125 bool m_is2D; 129 bool m_is2D;
126 }; 130 };
127 131
128 } // namespace blink 132 } // namespace blink
129 133
130 #endif 134 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698