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

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

Issue 191553003: [CSS Shapes] CSS parser accepts trailing position arguments (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Upload first version Created 6 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 | « LayoutTests/fast/shapes/parsing/parsing-test-utils.js ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/css/parser/CSSPropertyParser.cpp
diff --git a/Source/core/css/parser/CSSPropertyParser.cpp b/Source/core/css/parser/CSSPropertyParser.cpp
index cf75d7284b82dce2516b8dbddb16531749ef39e3..a4782c538baf9ebfadae4b0af69c1fbcc67d1397 100644
--- a/Source/core/css/parser/CSSPropertyParser.cpp
+++ b/Source/core/css/parser/CSSPropertyParser.cpp
@@ -4178,7 +4178,7 @@ PassRefPtrWillBeRawPtr<CSSBasicShape> CSSPropertyParser::parseBasicShapeCircle(C
RefPtrWillBeRawPtr<CSSValue> centerY;
args->next(); // set list to start of position center
parseFillPosition(args, centerX, centerY);
- if (centerX && centerY) {
+ if (centerX && centerY && !args->current()) {
ASSERT(centerX->isPrimitiveValue());
ASSERT(centerY->isPrimitiveValue());
shape->setCenterX(toCSSPrimitiveValue(centerX.get()));
@@ -4281,7 +4281,7 @@ PassRefPtrWillBeRawPtr<CSSBasicShape> CSSPropertyParser::parseBasicShapeEllipse(
RefPtrWillBeRawPtr<CSSValue> centerY;
args->next(); // set list to start of position center
parseFillPosition(args, centerX, centerY);
- if (!centerX || !centerY)
+ if (!centerX || !centerY || args->current())
return nullptr;
ASSERT(centerX->isPrimitiveValue());
@@ -4519,6 +4519,7 @@ PassRefPtrWillBeRawPtr<CSSPrimitiveValue> CSSPropertyParser::parseBasicShape()
return nullptr;
m_valueList->next();
+
Bear Travis 2014/03/11 00:15:26 Small nit: extra newline added.
return cssValuePool().createValue(shape.release());
}
« no previous file with comments | « LayoutTests/fast/shapes/parsing/parsing-test-utils.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698