Chromium Code Reviews| 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; |
| } |
| ; |