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

Unified Diff: third_party/WebKit/Source/core/css/parser/CSSPropertyParser.cpp

Issue 1811953002: Make parsing of <transform> more strict (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: V2 Created 4 years, 9 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/transforms/transform-parsing-expected.txt ('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/parser/CSSPropertyParser.cpp
diff --git a/third_party/WebKit/Source/core/css/parser/CSSPropertyParser.cpp b/third_party/WebKit/Source/core/css/parser/CSSPropertyParser.cpp
index dc0d3dfa091f986b3cec68434e57e4107398e819..e5d18cfdb9ccafdc965c3ef30064288bdd2ee8b6 100644
--- a/third_party/WebKit/Source/core/css/parser/CSSPropertyParser.cpp
+++ b/third_party/WebKit/Source/core/css/parser/CSSPropertyParser.cpp
@@ -1807,6 +1807,8 @@ static PassRefPtrWillBeRawPtr<CSSValue> consumeTransformValue(CSSParserTokenRang
if (functionId == CSSValueSkew && consumeCommaIncludingWhitespace(args)) {
transformValue->append(parsedValue);
parsedValue = consumeAngle(args);
+ if (!parsedValue)
+ return nullptr;
}
break;
case CSSValueScaleX:
@@ -1819,6 +1821,8 @@ static PassRefPtrWillBeRawPtr<CSSValue> consumeTransformValue(CSSParserTokenRang
if (functionId == CSSValueScale && consumeCommaIncludingWhitespace(args)) {
transformValue->append(parsedValue);
parsedValue = consumeNumber(args, ValueRangeAll);
+ if (!parsedValue)
+ return nullptr;
}
break;
case CSSValuePerspective:
@@ -1834,6 +1838,8 @@ static PassRefPtrWillBeRawPtr<CSSValue> consumeTransformValue(CSSParserTokenRang
if (functionId == CSSValueTranslate && consumeCommaIncludingWhitespace(args)) {
transformValue->append(parsedValue);
parsedValue = consumeLengthOrPercent(args, cssParserMode, ValueRangeAll);
+ if (!parsedValue)
+ return nullptr;
}
break;
case CSSValueTranslateZ:
@@ -1852,6 +1858,8 @@ static PassRefPtrWillBeRawPtr<CSSValue> consumeTransformValue(CSSParserTokenRang
if (!consumeNumbers(args, transformValue, 3) || !consumeCommaIncludingWhitespace(args))
return nullptr;
parsedValue = consumeAngle(args);
+ if (!parsedValue)
+ return nullptr;
break;
case CSSValueTranslate3d:
if (!consumeTranslate3d(args, cssParserMode, transformValue))
« no previous file with comments | « third_party/WebKit/LayoutTests/transforms/transform-parsing-expected.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698