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

Unified Diff: Source/core/css/CSSGrammar.y.in

Issue 15660004: Reporing invalid CSS selectors. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 7 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: Source/core/css/CSSGrammar.y.in
diff --git a/Source/core/css/CSSGrammar.y.in b/Source/core/css/CSSGrammar.y.in
index e651d858f071a7c26d9fc6dd2b02a5cbfbe3d86a..e165f72504bcca7c2eab785130e0a7b1c0faa5c9 100644
--- a/Source/core/css/CSSGrammar.y.in
+++ b/Source/core/css/CSSGrammar.y.in
@@ -1549,7 +1549,9 @@ declaration:
$$ = parser->parseValue(static_cast<CSSPropertyID>($1), $6);
if (!$$) {
parser->rollbackLastProperties(parser->m_parsedProperties.size() - oldParsedProperties);
- parser->reportError(parser->getSource($4, parser->currentLocation()).trimTrailingWhitespace(), CSSParser::InvalidPropertyValueError);
+ CSSParserLocation exprSourceLocation = parser->getSource($4, parser->currentLocation());
+ exprSourceLocation.content.trimTrailingWhitespace();
apavlov 2013/05/23 10:47:07 Can we perform the trimming in parser->reportError
SeRya 2013/05/23 15:02:37 Done.
+ parser->reportError(exprSourceLocation, CSSParser::InvalidPropertyValueError);
} else
isPropertyParsed = true;
parser->m_valueList = nullptr;
@@ -1911,7 +1913,8 @@ at_rule_recovery:
;
invalid_rule:
- error rule_error_recovery invalid_block {
+ error rule_error_recovery { parser->endInvalidRuleHeader(); } invalid_block {
apavlov 2013/05/23 10:47:07 We prefer to avoid actions in the middle - can you
SeRya 2013/05/23 15:02:37 Done.
+ parser->resumeErrorLogging();
$$ = 0;
}
;

Powered by Google App Engine
This is Rietveld 408576698