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

Side by Side Diff: third_party/WebKit/Source/core/dom/DOMMatrix.cpp

Issue 2747383003: WIP: Brand-check on DOMMatrixReadOnly multiply.
Patch Set: Created 3 years, 9 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 #include "core/dom/DOMMatrix.h" 5 #include "core/dom/DOMMatrix.h"
6 6
7 namespace blink { 7 namespace blink {
8 8
9 DOMMatrix* DOMMatrix::create(ExceptionState& exceptionState) { 9 DOMMatrix* DOMMatrix::create(ExceptionState& exceptionState) {
10 return new DOMMatrix(TransformationMatrix()); 10 return new DOMMatrix(TransformationMatrix());
11 } 11 }
12 12
13 DOMMatrix* DOMMatrix::create(DOMMatrixReadOnly* other, 13 DOMMatrix* DOMMatrix::create(DOMMatrixReadOnly* other,
14 ExceptionState& exceptionState) { 14 ExceptionState& exceptionState) {
15 return new DOMMatrix(other->matrix(), other->is2D()); 15 return new DOMMatrix(other->matrix(), other->is2D());
16 } 16 }
17 17
18 DOMMatrix* DOMMatrix::create(const TransformationMatrix& matrix) {
19 return new DOMMatrix(matrix, matrix.isAffine());
20 }
21
18 DOMMatrix* DOMMatrix::create(const SkMatrix44& matrix, 22 DOMMatrix* DOMMatrix::create(const SkMatrix44& matrix,
19 ExceptionState& exceptionState) { 23 ExceptionState& exceptionState) {
20 TransformationMatrix transformationMatrix(matrix); 24 TransformationMatrix transformationMatrix(matrix);
21 return new DOMMatrix(transformationMatrix, transformationMatrix.isAffine()); 25 return new DOMMatrix(transformationMatrix, transformationMatrix.isAffine());
22 } 26 }
23 27
24 DOMMatrix* DOMMatrix::create(const String& transformList, 28 DOMMatrix* DOMMatrix::create(const String& transformList,
25 ExceptionState& exceptionState) { 29 ExceptionState& exceptionState) {
26 DOMMatrix* matrix = new DOMMatrix(TransformationMatrix()); 30 DOMMatrix* matrix = new DOMMatrix(TransformationMatrix());
27 matrix->setMatrixValueFromString(transformList, exceptionState); 31 matrix->setMatrixValueFromString(transformList, exceptionState);
(...skipping 230 matching lines...) Expand 10 before | Expand all | Expand 10 after
258 return this; 262 return this;
259 } 263 }
260 264
261 DOMMatrix* DOMMatrix::setMatrixValue(const String& inputString, 265 DOMMatrix* DOMMatrix::setMatrixValue(const String& inputString,
262 ExceptionState& exceptionState) { 266 ExceptionState& exceptionState) {
263 setMatrixValueFromString(inputString, exceptionState); 267 setMatrixValueFromString(inputString, exceptionState);
264 return this; 268 return this;
265 } 269 }
266 270
267 } // namespace blink 271 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/dom/DOMMatrix.h ('k') | third_party/WebKit/Source/core/dom/DOMMatrixReadOnly.idl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698