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 "config.h" | 5 #include "config.h" |
| 6 #include "core/dom/DOMMatrix.h" | 6 #include "core/dom/DOMMatrix.h" |
| 7 | 7 |
| 8 namespace blink { | 8 namespace blink { |
| 9 | 9 |
| 10 DOMMatrix* DOMMatrix::create() | 10 DOMMatrix* DOMMatrix::create() |
| (...skipping 16 matching lines...) Expand all Loading... | |
| 27 { | 27 { |
| 28 if (m_is2D) | 28 if (m_is2D) |
| 29 m_is2D = value; | 29 m_is2D = value; |
| 30 } | 30 } |
| 31 | 31 |
| 32 DOMMatrix* DOMMatrix::multiplySelf(DOMMatrix* other) | 32 DOMMatrix* DOMMatrix::multiplySelf(DOMMatrix* other) |
| 33 { | 33 { |
| 34 if (!other->is2D()) | 34 if (!other->is2D()) |
| 35 m_is2D = false; | 35 m_is2D = false; |
| 36 | 36 |
| 37 m_matrix = m_matrix * other->matrix(); | 37 m_matrix.multiply(other->matrix()); |
|
zino
2014/09/04 14:18:52
I think this sentence is reasonable but it makes a
| |
| 38 | 38 |
| 39 return this; | 39 return this; |
| 40 } | 40 } |
| 41 | 41 |
| 42 DOMMatrix* DOMMatrix::preMultiplySelf(DOMMatrix* other) | 42 DOMMatrix* DOMMatrix::preMultiplySelf(DOMMatrix* other) |
| 43 { | 43 { |
| 44 if (!other->is2D()) | 44 if (!other->is2D()) |
| 45 m_is2D = false; | 45 m_is2D = false; |
| 46 | 46 |
| 47 m_matrix = other->matrix() * m_matrix; | 47 m_matrix = other->matrix() * m_matrix; |
| (...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 94 else | 94 else |
| 95 m_matrix.scale3d(sx, sy, sz); | 95 m_matrix.scale3d(sx, sy, sz); |
| 96 | 96 |
| 97 if (hasTranslation) | 97 if (hasTranslation) |
| 98 translateSelf(-ox, -oy, -oz); | 98 translateSelf(-ox, -oy, -oz); |
| 99 | 99 |
| 100 return this; | 100 return this; |
| 101 } | 101 } |
| 102 | 102 |
| 103 } // namespace blink | 103 } // namespace blink |
| OLD | NEW |