| Index: third_party/WebKit/Source/core/dom/DOMMatrix.cpp | 
| diff --git a/third_party/WebKit/Source/core/dom/DOMMatrix.cpp b/third_party/WebKit/Source/core/dom/DOMMatrix.cpp | 
| index a76c25e6d41b6c2feb80e4c458a53bc8b4dcc44a..9b6378a8549f4cc706cc50aa52458c83d0ed9079 100644 | 
| --- a/third_party/WebKit/Source/core/dom/DOMMatrix.cpp | 
| +++ b/third_party/WebKit/Source/core/dom/DOMMatrix.cpp | 
| @@ -22,6 +22,29 @@ DOMMatrix* DOMMatrix::create(const SkMatrix44& matrix) | 
| return new DOMMatrix(transformationMatrix, transformationMatrix.isAffine()); | 
| } | 
|  | 
| +DOMMatrix* DOMMatrix::fromFloat32Array(DOMFloat32Array* float32Array, ExceptionState& exceptionState) | 
| +{ | 
| +    if (float32Array->length() != 6 && float32Array->length() != 16) { | 
| +        exceptionState.throwTypeError("An invalid number sequence is specified. The sequence must contain 6 elements for 2D matrix and 16 elements for 3D matrix."); | 
| +        return nullptr; | 
| +    } | 
| +    return new DOMMatrix(float32Array->data(), float32Array->length()); | 
| +} | 
| + | 
| +DOMMatrix* DOMMatrix::fromFloat64Array(DOMFloat64Array* float64Array, ExceptionState& exceptionState) | 
| +{ | 
| +    if (float64Array->length() != 6 && float64Array->length() != 16) { | 
| +        exceptionState.throwTypeError("An invalid number sequence is specified. The sequence must contain 6 elements for 2D matrix and 16 elements for 3D matrix."); | 
| +        return nullptr; | 
| +    } | 
| +    return new DOMMatrix(float64Array->data(), float64Array->length()); | 
| +} | 
| + | 
| +template <typename T> | 
| +DOMMatrix::DOMMatrix(T sequence, int size) : DOMMatrixReadOnly(sequence, size) | 
| +{ | 
| +} | 
| + | 
| DOMMatrix::DOMMatrix(const TransformationMatrix& matrix, bool is2D) | 
| { | 
| m_matrix = TransformationMatrix::create(matrix); | 
|  |