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

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

Issue 2482743002: [GeometryInterface] add toJson() function in DOMMatrixReadOnly. (Closed)
Patch Set: add test for DOMMatrix 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"
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
78 DOMMatrix* skewY(double sy); 78 DOMMatrix* skewY(double sy);
79 DOMMatrix* flipX(); 79 DOMMatrix* flipX();
80 DOMMatrix* flipY(); 80 DOMMatrix* flipY();
81 DOMMatrix* inverse(); 81 DOMMatrix* inverse();
82 82
83 DOMFloat32Array* toFloat32Array() const; 83 DOMFloat32Array* toFloat32Array() const;
84 DOMFloat64Array* toFloat64Array() const; 84 DOMFloat64Array* toFloat64Array() const;
85 85
86 const String toString() const; 86 const String toString() const;
87 87
88 ScriptValue toJSONForBinding(ScriptState*) const;
89
88 const TransformationMatrix& matrix() const { return *m_matrix; } 90 const TransformationMatrix& matrix() const { return *m_matrix; }
89 91
90 DEFINE_INLINE_TRACE() {} 92 DEFINE_INLINE_TRACE() {}
91 93
92 protected: 94 protected:
93 DOMMatrixReadOnly() {} 95 DOMMatrixReadOnly() {}
94 96
95 template <typename T> 97 template <typename T>
96 DOMMatrixReadOnly(T sequence, int size) { 98 DOMMatrixReadOnly(T sequence, int size) {
97 if (size == 6) { 99 if (size == 6) {
(...skipping 18 matching lines...) Expand all
116 // supports 16-byte alignment but Oilpan doesn't. So we use an std::unique_ptr 118 // supports 16-byte alignment but Oilpan doesn't. So we use an std::unique_ptr
117 // to allocate TransformationMatrix on PartitionAlloc. 119 // to allocate TransformationMatrix on PartitionAlloc.
118 // TODO(oilpan): Oilpan should support 16-byte aligned allocations. 120 // TODO(oilpan): Oilpan should support 16-byte aligned allocations.
119 std::unique_ptr<TransformationMatrix> m_matrix; 121 std::unique_ptr<TransformationMatrix> m_matrix;
120 bool m_is2D; 122 bool m_is2D;
121 }; 123 };
122 124
123 } // namespace blink 125 } // namespace blink
124 126
125 #endif 127 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698