Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(248)

Unified Diff: third_party/WebKit/Source/core/css/cssom/PerspectiveTransformComponent.cpp

Issue 1689573002: CSS Typed OM: asMatrix for TransformComponent with LengthValue types (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@asMatrixMethod
Patch Set: Created 4 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/core/css/cssom/PerspectiveTransformComponent.cpp
diff --git a/third_party/WebKit/Source/core/css/cssom/PerspectiveTransformComponent.cpp b/third_party/WebKit/Source/core/css/cssom/PerspectiveTransformComponent.cpp
index 56e633860af5d54c461eea46d1cb7d5239065dba..8c522e2603f86f5aaf1920df8f57080809e45956 100644
--- a/third_party/WebKit/Source/core/css/cssom/PerspectiveTransformComponent.cpp
+++ b/third_party/WebKit/Source/core/css/cssom/PerspectiveTransformComponent.cpp
@@ -2,8 +2,10 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
+
meade_UTC10 2016/02/11 00:56:30 Remove extra newline
tridgell 2016/02/12 04:22:28 Done.
#include "core/css/cssom/PerspectiveTransformComponent.h"
+#include "MatrixTransformComponent.h"
#include "bindings/core/v8/ExceptionState.h"
namespace blink {
@@ -17,6 +19,11 @@ PerspectiveTransformComponent* PerspectiveTransformComponent::create(const Lengt
return new PerspectiveTransformComponent(length);
}
+MatrixTransformComponent* PerspectiveTransformComponent::asMatrix(ExceptionState& exceptionState) const
+{
+ return MatrixTransformComponent::perspective(m_length->computeLengthPx(exceptionState));
meade_UTC10 2016/02/11 00:56:30 Perhaps this should check for exceptionState.hadEx
tridgell 2016/02/12 04:22:28 Done. Also similarly implemented for TranslationT
+}
+
PassRefPtrWillBeRawPtr<CSSFunctionValue> PerspectiveTransformComponent::toCSSValue() const
{
RefPtrWillBeRawPtr<CSSFunctionValue> result = CSSFunctionValue::create(CSSValuePerspective);

Powered by Google App Engine
This is Rietveld 408576698