Index: third_party/WebKit/Source/core/css/cssom/TransformValue.cpp |
diff --git a/third_party/WebKit/Source/core/css/cssom/TransformValue.cpp b/third_party/WebKit/Source/core/css/cssom/TransformValue.cpp |
index 4efb5692eb49f18913a41b28c8cced02895bff96..72524f313b77beca4d7c33c6e36efb035cb5d4f1 100644 |
--- a/third_party/WebKit/Source/core/css/cssom/TransformValue.cpp |
+++ b/third_party/WebKit/Source/core/css/cssom/TransformValue.cpp |
@@ -4,7 +4,9 @@ |
#include "core/css/cssom/TransformValue.h" |
+#include "bindings/core/v8/ExceptionState.h" |
#include "core/css/CSSValueList.h" |
+#include "core/css/cssom/MatrixTransformComponent.h" |
#include "core/css/cssom/TransformComponent.h" |
namespace blink { |
@@ -60,7 +62,20 @@ PassRefPtrWillBeRawPtr<CSSValue> TransformValue::toCSSValue() const |
for (size_t i = 0; i < m_transformComponents.size(); i++) { |
transformCSSValue->append(m_transformComponents[i]->toCSSValue()); |
} |
- return transformCSSValue; |
+ return transformCSSValue.release(); |
+} |
+ |
+MatrixTransformComponent* TransformValue::asMatrix(ExceptionState& exceptionState) const |
+{ |
+ MatrixTransformComponent* result = new MatrixTransformComponent(); |
+ for (TransformComponent* component : m_transformComponents) { |
+ MatrixTransformComponent* componentAsMatrix = component->asMatrix(exceptionState); |
+ if (exceptionState.hadException()) { |
+ return nullptr; |
+ } |
+ result->multiplySelf(componentAsMatrix); |
+ } |
+ return result; |
} |
} // namespace blink |