Index: Source/core/css/CSSGrammar.y.in |
diff --git a/Source/core/css/CSSGrammar.y.in b/Source/core/css/CSSGrammar.y.in |
index d437fb6d2cb4ff2522e62b038183b6f312daad29..da016a2f6ee9af87d96a26d1fa685259f29dea91 100644 |
--- a/Source/core/css/CSSGrammar.y.in |
+++ b/Source/core/css/CSSGrammar.y.in |
@@ -1382,6 +1382,8 @@ ident_or_string: |
pseudo_page: |
':' IDENT { |
+ if ($2.isFunction()) |
+ YYERROR; |
$$ = parser->createFloatingSelector(); |
$$->setMatch(CSSSelector::PagePseudoClass); |
parser->tokenToLowerCase($2); |
@@ -1393,6 +1395,8 @@ pseudo_page: |
pseudo: |
':' error_location IDENT { |
+ if ($3.isFunction()) |
+ YYERROR; |
$$ = parser->createFloatingSelector(); |
$$->setMatch(CSSSelector::PseudoClass); |
parser->tokenToLowerCase($3); |
@@ -1404,6 +1408,8 @@ pseudo: |
} |
} |
| ':' ':' error_location IDENT { |
+ if ($4.isFunction()) |
+ YYERROR; |
$$ = parser->createFloatingSelector(); |
$$->setMatch(CSSSelector::PseudoElement); |
parser->tokenToLowerCase($4); |