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

Side by Side Diff: Source/core/css/CSSGrammar.y

Issue 212383002: Drop empty list :host() and :host-context(). (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 9 months 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 unified diff | Download patch
« no previous file with comments | « LayoutTests/fast/dom/shadow/host-pseudo-class-css-text-expected.txt ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 1450 matching lines...) Expand 10 before | Expand all | Expand 10 after
1461 | ':' HOSTFUNCTION maybe_space simple_selector_list maybe_space closing_pare nthesis { 1461 | ':' HOSTFUNCTION maybe_space simple_selector_list maybe_space closing_pare nthesis {
1462 $$ = parser->createFloatingSelector(); 1462 $$ = parser->createFloatingSelector();
1463 $$->setMatch(CSSSelector::PseudoClass); 1463 $$->setMatch(CSSSelector::PseudoClass);
1464 $$->adoptSelectorVector(*parser->sinkFloatingSelectorVector($4)); 1464 $$->adoptSelectorVector(*parser->sinkFloatingSelectorVector($4));
1465 parser->tokenToLowerCase($2); 1465 parser->tokenToLowerCase($2);
1466 $$->setValue($2); 1466 $$->setValue($2);
1467 CSSSelector::PseudoType type = $$->pseudoType(); 1467 CSSSelector::PseudoType type = $$->pseudoType();
1468 if (type != CSSSelector::PseudoHost) 1468 if (type != CSSSelector::PseudoHost)
1469 YYERROR; 1469 YYERROR;
1470 } 1470 }
1471 // used by :host()
1472 | ':' HOSTFUNCTION maybe_space closing_parenthesis {
1473 $$ = parser->createFloatingSelector();
1474 $$->setMatch(CSSSelector::PseudoClass);
1475 parser->tokenToLowerCase($2);
1476 $$->setValue($2.atomicSubstring(0, $2.length() - 1));
1477 CSSSelector::PseudoType type = $$->pseudoType();
1478 if (type != CSSSelector::PseudoHost)
1479 YYERROR;
1480 }
1481 | ':' HOSTFUNCTION selector_recovery closing_parenthesis { 1471 | ':' HOSTFUNCTION selector_recovery closing_parenthesis {
1482 YYERROR; 1472 YYERROR;
1483 } 1473 }
1484 // used by :host-context() 1474 // used by :host-context()
1485 | ':' HOSTCONTEXTFUNCTION maybe_space simple_selector_list maybe_space closi ng_parenthesis { 1475 | ':' HOSTCONTEXTFUNCTION maybe_space simple_selector_list maybe_space closi ng_parenthesis {
1486 $$ = parser->createFloatingSelector(); 1476 $$ = parser->createFloatingSelector();
1487 $$->setMatch(CSSSelector::PseudoClass); 1477 $$->setMatch(CSSSelector::PseudoClass);
1488 $$->adoptSelectorVector(*parser->sinkFloatingSelectorVector($4)); 1478 $$->adoptSelectorVector(*parser->sinkFloatingSelectorVector($4));
1489 parser->tokenToLowerCase($2); 1479 parser->tokenToLowerCase($2);
1490 $$->setValue($2); 1480 $$->setValue($2);
1491 CSSSelector::PseudoType type = $$->pseudoType(); 1481 CSSSelector::PseudoType type = $$->pseudoType();
1492 if (type != CSSSelector::PseudoHostContext) 1482 if (type != CSSSelector::PseudoHostContext)
1493 YYERROR; 1483 YYERROR;
1494 } 1484 }
1495 | ':' HOSTCONTEXTFUNCTION maybe_space closing_parenthesis {
1496 $$ = parser->createFloatingSelector();
1497 $$->setMatch(CSSSelector::PseudoClass);
1498 parser->tokenToLowerCase($2);
1499 $$->setValue($2.atomicSubstring(0, $2.length() - 1));
1500 CSSSelector::PseudoType type = $$->pseudoType();
1501 if (type != CSSSelector::PseudoHostContext)
1502 YYERROR;
1503 }
1504 | ':' HOSTCONTEXTFUNCTION selector_recovery closing_parenthesis { 1485 | ':' HOSTCONTEXTFUNCTION selector_recovery closing_parenthesis {
1505 YYERROR; 1486 YYERROR;
1506 } 1487 }
1507 ; 1488 ;
1508 1489
1509 selector_recovery: 1490 selector_recovery:
1510 error error_location error_recovery; 1491 error error_location error_recovery;
1511 1492
1512 declaration_list: 1493 declaration_list:
1513 /* empty */ { $$ = false; } 1494 /* empty */ { $$ = false; }
(...skipping 382 matching lines...) Expand 10 before | Expand all | Expand 10 after
1896 ; 1877 ;
1897 1878
1898 rule_error_recovery: 1879 rule_error_recovery:
1899 /* empty */ 1880 /* empty */
1900 | rule_error_recovery error 1881 | rule_error_recovery error
1901 | rule_error_recovery invalid_square_brackets_block 1882 | rule_error_recovery invalid_square_brackets_block
1902 | rule_error_recovery invalid_parentheses_block 1883 | rule_error_recovery invalid_parentheses_block
1903 ; 1884 ;
1904 1885
1905 %% 1886 %%
OLDNEW
« no previous file with comments | « LayoutTests/fast/dom/shadow/host-pseudo-class-css-text-expected.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698