OLD | NEW |
---|---|
1 %{ | 1 %{ |
2 | 2 |
3 /* | 3 /* |
4 * Copyright (C) 2002-2003 Lars Knoll (knoll@kde.org) | 4 * Copyright (C) 2002-2003 Lars Knoll (knoll@kde.org) |
5 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 App le Inc. All rights reserved. | 5 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 App le Inc. All rights reserved. |
6 * Copyright (C) 2006 Alexey Proskuryakov (ap@nypop.com) | 6 * Copyright (C) 2006 Alexey Proskuryakov (ap@nypop.com) |
7 * Copyright (C) 2008 Eric Seidel <eric@webkit.org> | 7 * Copyright (C) 2008 Eric Seidel <eric@webkit.org> |
8 * Copyright (C) 2012 Intel Corporation. All rights reserved. | 8 * Copyright (C) 2012 Intel Corporation. All rights reserved. |
9 * | 9 * |
10 * This library is free software; you can redistribute it and/or | 10 * This library is free software; you can redistribute it and/or |
(...skipping 1325 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1336 | 1336 |
1337 pseudo: | 1337 pseudo: |
1338 ':' error_location IDENT { | 1338 ':' error_location IDENT { |
1339 if ($3.isFunction()) | 1339 if ($3.isFunction()) |
1340 YYERROR; | 1340 YYERROR; |
1341 $$ = parser->createFloatingSelector(); | 1341 $$ = parser->createFloatingSelector(); |
1342 $$->setMatch(CSSSelector::PseudoClass); | 1342 $$->setMatch(CSSSelector::PseudoClass); |
1343 parser->tokenToLowerCase($3); | 1343 parser->tokenToLowerCase($3); |
1344 $$->setValue($3); | 1344 $$->setValue($3); |
1345 CSSSelector::PseudoType type = $$->pseudoType(); | 1345 CSSSelector::PseudoType type = $$->pseudoType(); |
1346 if (type == CSSSelector::PseudoUnknown) { | 1346 if (type == CSSSelector::PseudoUnknown || |
1347 !parser->isSelectorAllowedInParsingMode(type)) { | |
1347 parser->reportError($2, InvalidSelectorPseudoCSSError); | 1348 parser->reportError($2, InvalidSelectorPseudoCSSError); |
1348 YYERROR; | 1349 YYERROR; |
1349 } | 1350 } |
1350 } | 1351 } |
1351 | ':' ':' error_location IDENT { | 1352 | ':' ':' error_location IDENT { |
1352 if ($4.isFunction()) | 1353 if ($4.isFunction()) |
1353 YYERROR; | 1354 YYERROR; |
1354 $$ = parser->createFloatingSelector(); | 1355 $$ = parser->createFloatingSelector(); |
1355 $$->setMatch(CSSSelector::PseudoElement); | 1356 $$->setMatch(CSSSelector::PseudoElement); |
1356 parser->tokenToLowerCase($4); | 1357 parser->tokenToLowerCase($4); |
1357 $$->setValue($4); | 1358 $$->setValue($4); |
1358 // FIXME: This call is needed to force selector to compute the pseudoTyp e early enough. | 1359 // FIXME: This call is needed to force selector to compute the pseudoTyp e early enough. |
1359 CSSSelector::PseudoType type = $$->pseudoType(); | 1360 CSSSelector::PseudoType type = $$->pseudoType(); |
1360 if (type == CSSSelector::PseudoUnknown) { | 1361 if (type == CSSSelector::PseudoUnknown || |
1362 !parser->isSelectorAllowedInParsingMode(type)) { | |
Julien - ping for review
2015/02/04 01:56:33
Doh'!?
dsinclair
2015/02/04 04:41:32
? Are you saying this is incorrect, or you don't l
| |
1361 parser->reportError($3, InvalidSelectorPseudoCSSError); | 1363 parser->reportError($3, InvalidSelectorPseudoCSSError); |
1362 YYERROR; | 1364 YYERROR; |
1363 } | 1365 } |
1364 } | 1366 } |
1365 // used by ::cue(:past/:future) | 1367 // used by ::cue(:past/:future) |
1366 | ':' ':' CUEFUNCTION maybe_space simple_selector_list maybe_space closing_p arenthesis { | 1368 | ':' ':' CUEFUNCTION maybe_space simple_selector_list maybe_space closing_p arenthesis { |
1367 $$ = parser->createFloatingSelector(); | 1369 $$ = parser->createFloatingSelector(); |
1368 $$->setMatch(CSSSelector::PseudoElement); | 1370 $$->setMatch(CSSSelector::PseudoElement); |
1369 $$->adoptSelectorVector(*parser->sinkFloatingSelectorVector($5)); | 1371 $$->adoptSelectorVector(*parser->sinkFloatingSelectorVector($5)); |
1370 $$->setValue($3); | 1372 $$->setValue($3); |
(...skipping 486 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1857 ; | 1859 ; |
1858 | 1860 |
1859 rule_error_recovery: | 1861 rule_error_recovery: |
1860 /* empty */ | 1862 /* empty */ |
1861 | rule_error_recovery error | 1863 | rule_error_recovery error |
1862 | rule_error_recovery invalid_square_brackets_block | 1864 | rule_error_recovery invalid_square_brackets_block |
1863 | rule_error_recovery invalid_parentheses_block | 1865 | rule_error_recovery invalid_parentheses_block |
1864 ; | 1866 ; |
1865 | 1867 |
1866 %% | 1868 %% |
OLD | NEW |