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 1037 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1048 | '>' maybe_space { $$ = CSSSelector::Child; } | 1048 | '>' maybe_space { $$ = CSSSelector::Child; } |
1049 // FIXME: implement named combinator and replace the following /shadow/, /sh
adow-child/ and | 1049 // FIXME: implement named combinator and replace the following /shadow/, /sh
adow-child/ and |
1050 // /shadow-deep/ with named combinator's implementation. | 1050 // /shadow-deep/ with named combinator's implementation. |
1051 | '/' IDENT '/' maybe_space { | 1051 | '/' IDENT '/' maybe_space { |
1052 if (!RuntimeEnabledFeatures::shadowDOMEnabled()) | 1052 if (!RuntimeEnabledFeatures::shadowDOMEnabled()) |
1053 YYERROR; | 1053 YYERROR; |
1054 if ($2.equalIgnoringCase("shadow")) | 1054 if ($2.equalIgnoringCase("shadow")) |
1055 $$ = CSSSelector::Shadow; | 1055 $$ = CSSSelector::Shadow; |
1056 else if ($2.equalIgnoringCase("shadow-deep")) | 1056 else if ($2.equalIgnoringCase("shadow-deep")) |
1057 $$ = CSSSelector::ShadowDeep; | 1057 $$ = CSSSelector::ShadowDeep; |
1058 else if ($2.equalIgnoringCase("content")) | |
1059 $$ = CSSSelector::ShadowContent; | |
1060 else | 1058 else |
1061 YYERROR; | 1059 YYERROR; |
1062 } | 1060 } |
1063 ; | 1061 ; |
1064 | 1062 |
1065 maybe_unary_operator: | 1063 maybe_unary_operator: |
1066 unary_operator | 1064 unary_operator |
1067 | /* empty */ { $$ = 1; } | 1065 | /* empty */ { $$ = 1; } |
1068 ; | 1066 ; |
1069 | 1067 |
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1134 selector: | 1132 selector: |
1135 simple_selector | 1133 simple_selector |
1136 | selector WHITESPACE | 1134 | selector WHITESPACE |
1137 | selector WHITESPACE simple_selector | 1135 | selector WHITESPACE simple_selector |
1138 { | 1136 { |
1139 $$ = $3; | 1137 $$ = $3; |
1140 CSSParserSelector* end = $$; | 1138 CSSParserSelector* end = $$; |
1141 while (end->tagHistory()) | 1139 while (end->tagHistory()) |
1142 end = end->tagHistory(); | 1140 end = end->tagHistory(); |
1143 end->setRelation(CSSSelector::Descendant); | 1141 end->setRelation(CSSSelector::Descendant); |
| 1142 if ($1->isContentPseudoElement()) |
| 1143 end->setRelationIsAffectedByPseudoContent(); |
1144 end->setTagHistory(parser->sinkFloatingSelector($1)); | 1144 end->setTagHistory(parser->sinkFloatingSelector($1)); |
1145 } | 1145 } |
1146 | selector combinator simple_selector { | 1146 | selector combinator simple_selector { |
1147 $$ = $3; | 1147 $$ = $3; |
1148 CSSParserSelector* end = $$; | 1148 CSSParserSelector* end = $$; |
1149 while (end->tagHistory()) | 1149 while (end->tagHistory()) |
1150 end = end->tagHistory(); | 1150 end = end->tagHistory(); |
1151 end->setRelation($2); | 1151 end->setRelation($2); |
| 1152 if ($1->isContentPseudoElement()) |
| 1153 end->setRelationIsAffectedByPseudoContent(); |
1152 end->setTagHistory(parser->sinkFloatingSelector($1)); | 1154 end->setTagHistory(parser->sinkFloatingSelector($1)); |
1153 } | 1155 } |
1154 ; | 1156 ; |
1155 | 1157 |
1156 namespace_selector: | 1158 namespace_selector: |
1157 /* empty */ '|' { $$.clear(); } | 1159 /* empty */ '|' { $$.clear(); } |
1158 | '*' '|' { static const LChar star = '*'; $$.init(&star, 1); } | 1160 | '*' '|' { static const LChar star = '*'; $$.init(&star, 1); } |
1159 | IDENT '|' | 1161 | IDENT '|' |
1160 ; | 1162 ; |
1161 | 1163 |
(...skipping 735 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1897 | 1899 |
1898 rule_error_recovery: | 1900 rule_error_recovery: |
1899 /* empty */ | 1901 /* empty */ |
1900 | rule_error_recovery error | 1902 | rule_error_recovery error |
1901 | rule_error_recovery invalid_square_brackets_block | 1903 | rule_error_recovery invalid_square_brackets_block |
1902 | rule_error_recovery invalid_parentheses_block | 1904 | rule_error_recovery invalid_parentheses_block |
1903 ; | 1905 ; |
1904 | 1906 |
1905 %% | 1907 %% |
1906 | 1908 |
OLD | NEW |