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

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

Issue 2907973002: [css-typed-om] add toMatrix() method in CSSTransformValue.idl (Closed)
Patch Set: add toMatrix() Created 3 years, 6 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/geometry/DOMMatrix.h" 5 #include "core/geometry/DOMMatrix.h"
6 6
7 namespace blink { 7 namespace blink {
8 8
9 DOMMatrix* DOMMatrix::Create(ExecutionContext* execution_context, 9 DOMMatrix* DOMMatrix::Create(ExecutionContext* execution_context,
10 ExceptionState& exception_state) { 10 ExceptionState& exception_state) {
(...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after
128 matrix_->SetM44(NAN); 128 matrix_->SetM44(NAN);
129 } 129 }
130 130
131 DOMMatrix* DOMMatrix::multiplySelf(DOMMatrixInit& other, 131 DOMMatrix* DOMMatrix::multiplySelf(DOMMatrixInit& other,
132 ExceptionState& exception_state) { 132 ExceptionState& exception_state) {
133 DOMMatrix* other_matrix = DOMMatrix::fromMatrix(other, exception_state); 133 DOMMatrix* other_matrix = DOMMatrix::fromMatrix(other, exception_state);
134 if (!other_matrix) { 134 if (!other_matrix) {
135 DCHECK(exception_state.HadException()); 135 DCHECK(exception_state.HadException());
136 return nullptr; 136 return nullptr;
137 } 137 }
138 return multiplySelf(other_matrix);
139 }
140
141 DOMMatrix* DOMMatrix::multiplySelf(DOMMatrix* other_matrix) {
138 if (!other_matrix->is2D()) 142 if (!other_matrix->is2D())
139 is2d_ = false; 143 is2d_ = false;
140 144
141 *matrix_ *= other_matrix->Matrix(); 145 *matrix_ *= other_matrix->Matrix();
142 146
143 return this; 147 return this;
144 } 148 }
145 149
146 DOMMatrix* DOMMatrix::preMultiplySelf(DOMMatrixInit& other, 150 DOMMatrix* DOMMatrix::preMultiplySelf(DOMMatrixInit& other,
147 ExceptionState& exception_state) { 151 ExceptionState& exception_state) {
(...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after
275 return this; 279 return this;
276 } 280 }
277 281
278 DOMMatrix* DOMMatrix::setMatrixValue(const String& input_string, 282 DOMMatrix* DOMMatrix::setMatrixValue(const String& input_string,
279 ExceptionState& exception_state) { 283 ExceptionState& exception_state) {
280 SetMatrixValueFromString(input_string, exception_state); 284 SetMatrixValueFromString(input_string, exception_state);
281 return this; 285 return this;
282 } 286 }
283 287
284 } // namespace blink 288 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698