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

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

Issue 2313523002: Add check that the CSSValue is a valid type in CSSTransformComponent before casting (Closed)
Patch Set: Add a test Created 4 years, 3 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
« no previous file with comments | « third_party/WebKit/LayoutTests/typedcssom/inlinestyle/transform.html ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/css/cssom/CSSTransformComponent.cpp
diff --git a/third_party/WebKit/Source/core/css/cssom/CSSTransformComponent.cpp b/third_party/WebKit/Source/core/css/cssom/CSSTransformComponent.cpp
index 5466fc8acc12deb4178a9cc542b9bd0e5de415ff..4345d0a870bd2f9db7653853234fa3ea11e357fc 100644
--- a/third_party/WebKit/Source/core/css/cssom/CSSTransformComponent.cpp
+++ b/third_party/WebKit/Source/core/css/cssom/CSSTransformComponent.cpp
@@ -15,6 +15,9 @@ namespace blink {
CSSTransformComponent* CSSTransformComponent::fromCSSValue(const CSSValue& value)
{
+ if (!value.isFunctionValue())
+ return nullptr;
+
const CSSFunctionValue& functionValue = toCSSFunctionValue(value);
switch (functionValue.functionType()) {
case CSSValueMatrix:
« no previous file with comments | « third_party/WebKit/LayoutTests/typedcssom/inlinestyle/transform.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698