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

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

Issue 778003003: List marker pseudo elements. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years 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/parser/CSSGrammar.y
diff --git a/Source/core/css/parser/CSSGrammar.y b/Source/core/css/parser/CSSGrammar.y
index b968c717c242d3a803fc64c17103380b27320063..82a920e42e40360547cab4c48713f4f37da626a3 100644
--- a/Source/core/css/parser/CSSGrammar.y
+++ b/Source/core/css/parser/CSSGrammar.y
@@ -1342,7 +1342,8 @@ pseudo:
parser->tokenToLowerCase($3);
$$->setValue($3);
CSSSelector::PseudoType type = $$->pseudoType();
- if (type == CSSSelector::PseudoUnknown) {
+ if (type == CSSSelector::PseudoUnknown ||
+ !parser->isSelectorAllowedInParsingMode(type)) {
parser->reportError($2, InvalidSelectorPseudoCSSError);
YYERROR;
}
@@ -1356,7 +1357,8 @@ pseudo:
$$->setValue($4);
// FIXME: This call is needed to force selector to compute the pseudoType early enough.
CSSSelector::PseudoType type = $$->pseudoType();
- if (type == CSSSelector::PseudoUnknown) {
+ if (type == CSSSelector::PseudoUnknown ||
+ !parser->isSelectorAllowedInParsingMode(type)) {
parser->reportError($3, InvalidSelectorPseudoCSSError);
YYERROR;
}

Powered by Google App Engine
This is Rietveld 408576698