| Index: third_party/WebKit/Source/core/css/cssom/CSSTransformValue.cpp
|
| diff --git a/third_party/WebKit/Source/core/css/cssom/CSSTransformValue.cpp b/third_party/WebKit/Source/core/css/cssom/CSSTransformValue.cpp
|
| index 8fa84ef432d644124b31e16b87e0d27662ff7456..4c9c44a90a8533cb60f83261292649f642a5e0bc 100644
|
| --- a/third_party/WebKit/Source/core/css/cssom/CSSTransformValue.cpp
|
| +++ b/third_party/WebKit/Source/core/css/cssom/CSSTransformValue.cpp
|
| @@ -5,7 +5,9 @@
|
| #include "core/css/cssom/CSSTransformValue.h"
|
|
|
| #include "core/css/CSSValueList.h"
|
| +#include "core/css/cssom/CSSMatrixComponent.h"
|
| #include "core/css/cssom/CSSTransformComponent.h"
|
| +#include "core/geometry/DOMMatrix.h"
|
|
|
| namespace blink {
|
|
|
| @@ -34,6 +36,17 @@ bool CSSTransformValue::is2D() const {
|
| return true;
|
| }
|
|
|
| +DOMMatrix* CSSTransformValue::toMatrix() const {
|
| + DOMMatrix* matrix = DOMMatrix::Create();
|
| + for (size_t i = 0; i < transform_components_.size(); i++) {
|
| + CSSMatrixComponent* matrixComponent = transform_components_[i]->asMatrix();
|
| + if (matrixComponent) {
|
| + matrix->multiplySelf(matrixComponent->matrix());
|
| + }
|
| + }
|
| + return matrix;
|
| +}
|
| +
|
| const CSSValue* CSSTransformValue::ToCSSValue() const {
|
| CSSValueList* transform_css_value = CSSValueList::CreateSpaceSeparated();
|
| for (size_t i = 0; i < transform_components_.size(); i++) {
|
|
|