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

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

Issue 2707243006: [SharedArrayBuffer] Prevent SharedArrayBuffer being used in Web APIs (Closed)
Patch Set: update comment, add TODO Created 3 years, 8 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 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 <memory> 8 #include <memory>
9 #include "bindings/core/v8/ExceptionState.h" 9 #include "bindings/core/v8/ExceptionState.h"
10 #include "bindings/core/v8/ScriptWrappable.h" 10 #include "bindings/core/v8/ScriptWrappable.h"
11 #include "core/dom/DOMTypedArray.h" 11 #include "core/dom/DOMTypedArray.h"
12 #include "core/dom/NotShared.h"
12 #include "platform/heap/Handle.h" 13 #include "platform/heap/Handle.h"
13 #include "platform/transforms/TransformationMatrix.h" 14 #include "platform/transforms/TransformationMatrix.h"
14 15
15 namespace blink { 16 namespace blink {
16 17
17 class DOMMatrix; 18 class DOMMatrix;
18 class DOMMatrixInit; 19 class DOMMatrixInit;
19 class DOMPoint; 20 class DOMPoint;
20 class DOMPointInit; 21 class DOMPointInit;
21 22
22 class CORE_EXPORT DOMMatrixReadOnly 23 class CORE_EXPORT DOMMatrixReadOnly
23 : public GarbageCollectedFinalized<DOMMatrixReadOnly>, 24 : public GarbageCollectedFinalized<DOMMatrixReadOnly>,
24 public ScriptWrappable { 25 public ScriptWrappable {
25 DEFINE_WRAPPERTYPEINFO(); 26 DEFINE_WRAPPERTYPEINFO();
26 27
27 public: 28 public:
28 static DOMMatrixReadOnly* Create(ExceptionState&); 29 static DOMMatrixReadOnly* Create(ExceptionState&);
29 static DOMMatrixReadOnly* Create(const String&, ExceptionState&); 30 static DOMMatrixReadOnly* Create(const String&, ExceptionState&);
30 static DOMMatrixReadOnly* Create(Vector<double>, ExceptionState&); 31 static DOMMatrixReadOnly* Create(Vector<double>, ExceptionState&);
31 static DOMMatrixReadOnly* fromFloat32Array(DOMFloat32Array*, ExceptionState&); 32 static DOMMatrixReadOnly* fromFloat32Array(NotShared<DOMFloat32Array>,
32 static DOMMatrixReadOnly* fromFloat64Array(DOMFloat64Array*, ExceptionState&); 33 ExceptionState&);
34 static DOMMatrixReadOnly* fromFloat64Array(NotShared<DOMFloat64Array>,
35 ExceptionState&);
33 static DOMMatrixReadOnly* fromMatrix(DOMMatrixInit&, ExceptionState&); 36 static DOMMatrixReadOnly* fromMatrix(DOMMatrixInit&, ExceptionState&);
34 virtual ~DOMMatrixReadOnly(); 37 virtual ~DOMMatrixReadOnly();
35 38
36 double a() const { return matrix_->M11(); } 39 double a() const { return matrix_->M11(); }
37 double b() const { return matrix_->M12(); } 40 double b() const { return matrix_->M12(); }
38 double c() const { return matrix_->M21(); } 41 double c() const { return matrix_->M21(); }
39 double d() const { return matrix_->M22(); } 42 double d() const { return matrix_->M22(); }
40 double e() const { return matrix_->M41(); } 43 double e() const { return matrix_->M41(); }
41 double f() const { return matrix_->M42(); } 44 double f() const { return matrix_->M42(); }
42 45
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
82 double z = 0, 85 double z = 0,
83 double angle = 0); 86 double angle = 0);
84 DOMMatrix* skewX(double sx); 87 DOMMatrix* skewX(double sx);
85 DOMMatrix* skewY(double sy); 88 DOMMatrix* skewY(double sy);
86 DOMMatrix* flipX(); 89 DOMMatrix* flipX();
87 DOMMatrix* flipY(); 90 DOMMatrix* flipY();
88 DOMMatrix* inverse(); 91 DOMMatrix* inverse();
89 92
90 DOMPoint* transformPoint(const DOMPointInit&); 93 DOMPoint* transformPoint(const DOMPointInit&);
91 94
92 DOMFloat32Array* toFloat32Array() const; 95 NotShared<DOMFloat32Array> toFloat32Array() const;
93 DOMFloat64Array* toFloat64Array() const; 96 NotShared<DOMFloat64Array> toFloat64Array() const;
94 97
95 const String toString() const; 98 const String toString() const;
96 99
97 ScriptValue toJSONForBinding(ScriptState*) const; 100 ScriptValue toJSONForBinding(ScriptState*) const;
98 101
99 const TransformationMatrix& Matrix() const { return *matrix_; } 102 const TransformationMatrix& Matrix() const { return *matrix_; }
100 103
101 DEFINE_INLINE_TRACE() {} 104 DEFINE_INLINE_TRACE() {}
102 105
103 protected: 106 protected:
(...skipping 27 matching lines...) Expand all
131 // supports 16-byte alignment but Oilpan doesn't. So we use an std::unique_ptr 134 // supports 16-byte alignment but Oilpan doesn't. So we use an std::unique_ptr
132 // to allocate TransformationMatrix on PartitionAlloc. 135 // to allocate TransformationMatrix on PartitionAlloc.
133 // TODO(oilpan): Oilpan should support 16-byte aligned allocations. 136 // TODO(oilpan): Oilpan should support 16-byte aligned allocations.
134 std::unique_ptr<TransformationMatrix> matrix_; 137 std::unique_ptr<TransformationMatrix> matrix_;
135 bool is2d_; 138 bool is2d_;
136 }; 139 };
137 140
138 } // namespace blink 141 } // namespace blink
139 142
140 #endif 143 #endif
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/geometry/DOMMatrix.cpp ('k') | third_party/WebKit/Source/core/geometry/DOMMatrixReadOnly.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698