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 1324 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1335 | 1335 |
1336 pseudo: | 1336 pseudo: |
1337 ':' error_location IDENT { | 1337 ':' error_location IDENT { |
1338 if ($3.isFunction()) | 1338 if ($3.isFunction()) |
1339 YYERROR; | 1339 YYERROR; |
1340 $$ = parser->createFloatingSelector(); | 1340 $$ = parser->createFloatingSelector(); |
1341 $$->setMatch(CSSSelector::PseudoClass); | 1341 $$->setMatch(CSSSelector::PseudoClass); |
1342 parser->tokenToLowerCase($3); | 1342 parser->tokenToLowerCase($3); |
1343 $$->setValue($3); | 1343 $$->setValue($3); |
1344 CSSSelector::PseudoType type = $$->pseudoType(); | 1344 CSSSelector::PseudoType type = $$->pseudoType(); |
1345 if (type == CSSSelector::PseudoUnknown) { | 1345 if (type == CSSSelector::PseudoUnknown || |
| 1346 !parser->isSelectorAllowedInParsingMode(type)) { |
1346 parser->reportError($2, InvalidSelectorPseudoCSSError); | 1347 parser->reportError($2, InvalidSelectorPseudoCSSError); |
1347 YYERROR; | 1348 YYERROR; |
1348 } | 1349 } |
1349 } | 1350 } |
1350 | ':' ':' error_location IDENT { | 1351 | ':' ':' error_location IDENT { |
1351 if ($4.isFunction()) | 1352 if ($4.isFunction()) |
1352 YYERROR; | 1353 YYERROR; |
1353 $$ = parser->createFloatingSelector(); | 1354 $$ = parser->createFloatingSelector(); |
1354 $$->setMatch(CSSSelector::PseudoElement); | 1355 $$->setMatch(CSSSelector::PseudoElement); |
1355 parser->tokenToLowerCase($4); | 1356 parser->tokenToLowerCase($4); |
1356 $$->setValue($4); | 1357 $$->setValue($4); |
1357 // FIXME: This call is needed to force selector to compute the pseudoTyp
e early enough. | 1358 // FIXME: This call is needed to force selector to compute the pseudoTyp
e early enough. |
1358 CSSSelector::PseudoType type = $$->pseudoType(); | 1359 CSSSelector::PseudoType type = $$->pseudoType(); |
1359 if (type == CSSSelector::PseudoUnknown) { | 1360 if (type == CSSSelector::PseudoUnknown || |
| 1361 !parser->isSelectorAllowedInParsingMode(type)) { |
1360 parser->reportError($3, InvalidSelectorPseudoCSSError); | 1362 parser->reportError($3, InvalidSelectorPseudoCSSError); |
1361 YYERROR; | 1363 YYERROR; |
1362 } | 1364 } |
1363 } | 1365 } |
1364 // used by ::cue(:past/:future) | 1366 // used by ::cue(:past/:future) |
1365 | ':' ':' CUEFUNCTION maybe_space simple_selector_list maybe_space closing_p
arenthesis { | 1367 | ':' ':' CUEFUNCTION maybe_space simple_selector_list maybe_space closing_p
arenthesis { |
1366 $$ = parser->createFloatingSelector(); | 1368 $$ = parser->createFloatingSelector(); |
1367 $$->setMatch(CSSSelector::PseudoElement); | 1369 $$->setMatch(CSSSelector::PseudoElement); |
1368 $$->adoptSelectorVector(*parser->sinkFloatingSelectorVector($5)); | 1370 $$->adoptSelectorVector(*parser->sinkFloatingSelectorVector($5)); |
1369 $$->setValue($3); | 1371 $$->setValue($3); |
(...skipping 476 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1846 ; | 1848 ; |
1847 | 1849 |
1848 rule_error_recovery: | 1850 rule_error_recovery: |
1849 /* empty */ | 1851 /* empty */ |
1850 | rule_error_recovery error | 1852 | rule_error_recovery error |
1851 | rule_error_recovery invalid_square_brackets_block | 1853 | rule_error_recovery invalid_square_brackets_block |
1852 | rule_error_recovery invalid_parentheses_block | 1854 | rule_error_recovery invalid_parentheses_block |
1853 ; | 1855 ; |
1854 | 1856 |
1855 %% | 1857 %% |
OLD | NEW |