Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 { | 10 { |
| (...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 117 m_is2D = false; | 117 m_is2D = false; |
| 118 | 118 |
| 119 if (m_is2D) | 119 if (m_is2D) |
| 120 m_matrix->translate(tx, ty); | 120 m_matrix->translate(tx, ty); |
| 121 else | 121 else |
| 122 m_matrix->translate3d(tx, ty, tz); | 122 m_matrix->translate3d(tx, ty, tz); |
| 123 | 123 |
| 124 return this; | 124 return this; |
| 125 } | 125 } |
| 126 | 126 |
| 127 DOMMatrix* DOMMatrix::scaleSelf(double scale, double ox, double oy) | 127 DOMMatrix* DOMMatrix::scaleSelf(double sx) |
| 128 { | 128 { |
| 129 return scaleNonUniformSelf(scale, scale, 1, ox, oy); | 129 return scaleSelf(sx, sx); |
| 130 } | |
| 131 | |
| 132 DOMMatrix* DOMMatrix::scaleSelf(double sx, double sy, double sz, | |
| 133 double ox, double oy, double oz) | |
| 134 { | |
| 135 return scaleNonUniformSelf(sx, sy, sz, ox, oy, oz); | |
|
zino
2016/10/04 14:24:09
Why did you leave this sacleNonUniformSelf functio
Hwanseung Lee
2016/10/04 22:21:53
scale*, scale3d* method can use scaleNonUniformSe
| |
| 130 } | 136 } |
| 131 | 137 |
| 132 DOMMatrix* DOMMatrix::scale3dSelf(double scale, double ox, double oy, double oz) | 138 DOMMatrix* DOMMatrix::scale3dSelf(double scale, double ox, double oy, double oz) |
| 133 { | 139 { |
| 134 return scaleNonUniformSelf(scale, scale, scale, ox, oy, oz); | 140 return scaleNonUniformSelf(scale, scale, scale, ox, oy, oz); |
| 135 } | 141 } |
| 136 | 142 |
| 137 DOMMatrix* DOMMatrix::scaleNonUniformSelf(double sx, double sy, double sz, | 143 DOMMatrix* DOMMatrix::scaleNonUniformSelf(double sx, double sy, double sz, |
| 138 double ox, double oy, double oz) | 144 double ox, double oy, double oz) |
| 139 { | 145 { |
| (...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 191 setM41(NAN); | 197 setM41(NAN); |
| 192 setM42(NAN); | 198 setM42(NAN); |
| 193 setM43(NAN); | 199 setM43(NAN); |
| 194 setM44(NAN); | 200 setM44(NAN); |
| 195 setIs2D(false); | 201 setIs2D(false); |
| 196 } | 202 } |
| 197 return this; | 203 return this; |
| 198 } | 204 } |
| 199 | 205 |
| 200 } // namespace blink | 206 } // namespace blink |
| OLD | NEW |