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 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
76 // The content of the three below HeapVectors are guaranteed to be kept aliv
e by | 76 // The content of the three below HeapVectors are guaranteed to be kept aliv
e by |
77 // the corresponding m_parsedRules, m_floatingMediaQueryExpList, and m_parse
dKeyFrames | 77 // the corresponding m_parsedRules, m_floatingMediaQueryExpList, and m_parse
dKeyFrames |
78 // lists in BisonCSSParser.h. | 78 // lists in BisonCSSParser.h. |
79 WillBeHeapVector<RefPtrWillBeMember<StyleRuleBase> >* ruleList; | 79 WillBeHeapVector<RefPtrWillBeMember<StyleRuleBase> >* ruleList; |
80 WillBeHeapVector<OwnPtrWillBeMember<MediaQueryExp> >* mediaQueryExpList; | 80 WillBeHeapVector<OwnPtrWillBeMember<MediaQueryExp> >* mediaQueryExpList; |
81 WillBeHeapVector<RefPtrWillBeMember<StyleKeyframe> >* keyframeRuleList; | 81 WillBeHeapVector<RefPtrWillBeMember<StyleKeyframe> >* keyframeRuleList; |
82 CSSParserSelector* selector; | 82 CSSParserSelector* selector; |
83 Vector<OwnPtr<CSSParserSelector> >* selectorList; | 83 Vector<OwnPtr<CSSParserSelector> >* selectorList; |
84 CSSSelector::MarginBoxType marginBox; | 84 CSSSelector::MarginBoxType marginBox; |
85 CSSSelector::Relation relation; | 85 CSSSelector::Relation relation; |
| 86 CSSSelector::AttributeMatchType attributeMatchType; |
86 MediaQuerySet* mediaList; | 87 MediaQuerySet* mediaList; |
87 MediaQuery* mediaQuery; | 88 MediaQuery* mediaQuery; |
88 MediaQuery::Restrictor mediaQueryRestrictor; | 89 MediaQuery::Restrictor mediaQueryRestrictor; |
89 MediaQueryExp* mediaQueryExp; | 90 MediaQueryExp* mediaQueryExp; |
90 CSSParserValue value; | 91 CSSParserValue value; |
91 CSSParserValueList* valueList; | 92 CSSParserValueList* valueList; |
92 StyleKeyframe* keyframe; | 93 StyleKeyframe* keyframe; |
93 float val; | 94 float val; |
94 CSSPropertyID id; | 95 CSSPropertyID id; |
95 CSSParserLocation location; | 96 CSSParserLocation location; |
(...skipping 260 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
356 %type <value> function | 357 %type <value> function |
357 %type <value> calc_func_term | 358 %type <value> calc_func_term |
358 %type <character> calc_func_operator | 359 %type <character> calc_func_operator |
359 %type <valueList> calc_func_expr | 360 %type <valueList> calc_func_expr |
360 %type <valueList> calc_func_paren_expr | 361 %type <valueList> calc_func_paren_expr |
361 %type <value> calc_function | 362 %type <value> calc_function |
362 | 363 |
363 %type <string> element_name | 364 %type <string> element_name |
364 %type <string> attr_name | 365 %type <string> attr_name |
365 | 366 |
| 367 %type <attributeMatchType> attr_match_type |
| 368 %type <attributeMatchType> maybe_attr_match_type |
| 369 |
366 %type <location> error_location | 370 %type <location> error_location |
367 | 371 |
368 %type <valueList> ident_list | 372 %type <valueList> ident_list |
369 %type <value> track_names_list | 373 %type <value> track_names_list |
370 | 374 |
371 %% | 375 %% |
372 | 376 |
373 stylesheet: | 377 stylesheet: |
374 maybe_charset maybe_sgml rule_list | 378 maybe_charset maybe_sgml rule_list |
375 | internal_decls | 379 | internal_decls |
(...skipping 859 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1235 ; | 1239 ; |
1236 | 1240 |
1237 attr_name: | 1241 attr_name: |
1238 IDENT maybe_space { | 1242 IDENT maybe_space { |
1239 if (parser->m_context.isHTMLDocument()) | 1243 if (parser->m_context.isHTMLDocument()) |
1240 parser->tokenToLowerCase($1); | 1244 parser->tokenToLowerCase($1); |
1241 $$ = $1; | 1245 $$ = $1; |
1242 } | 1246 } |
1243 ; | 1247 ; |
1244 | 1248 |
| 1249 attr_match_type: |
| 1250 IDENT maybe_space { |
| 1251 CSSSelector::AttributeMatchType attrMatchType = CSSSelector::CaseSensiti
ve; |
| 1252 if (!parser->parseAttributeMatchType(attrMatchType, $1)) |
| 1253 YYERROR; |
| 1254 $$ = attrMatchType; |
| 1255 } |
| 1256 ; |
| 1257 |
| 1258 maybe_attr_match_type: |
| 1259 attr_match_type |
| 1260 | /* empty */ { $$ = CSSSelector::CaseSensitive; } |
| 1261 ; |
| 1262 |
1245 attrib: | 1263 attrib: |
1246 '[' maybe_space attr_name closing_square_bracket { | 1264 '[' maybe_space attr_name closing_square_bracket { |
1247 $$ = parser->createFloatingSelector(); | 1265 $$ = parser->createFloatingSelector(); |
1248 $$->setAttribute(QualifiedName(nullAtom, $3, nullAtom)); | 1266 $$->setAttribute(QualifiedName(nullAtom, $3, nullAtom), CSSSelector::Cas
eSensitive); |
1249 $$->setMatch(CSSSelector::Set); | 1267 $$->setMatch(CSSSelector::Set); |
1250 } | 1268 } |
1251 | '[' maybe_space attr_name match maybe_space ident_or_string maybe_space cl
osing_square_bracket { | 1269 | '[' maybe_space attr_name match maybe_space ident_or_string maybe_space ma
ybe_attr_match_type closing_square_bracket { |
1252 $$ = parser->createFloatingSelector(); | 1270 $$ = parser->createFloatingSelector(); |
1253 $$->setAttribute(QualifiedName(nullAtom, $3, nullAtom)); | 1271 $$->setAttribute(QualifiedName(nullAtom, $3, nullAtom), $8); |
1254 $$->setMatch((CSSSelector::Match)$4); | 1272 $$->setMatch((CSSSelector::Match)$4); |
1255 $$->setValue($6); | 1273 $$->setValue($6); |
1256 } | 1274 } |
1257 | '[' maybe_space namespace_selector attr_name closing_square_bracket { | 1275 | '[' maybe_space namespace_selector attr_name closing_square_bracket { |
1258 $$ = parser->createFloatingSelector(); | 1276 $$ = parser->createFloatingSelector(); |
1259 $$->setAttribute(parser->determineNameInNamespace($3, $4)); | 1277 $$->setAttribute(parser->determineNameInNamespace($3, $4), CSSSelector::
CaseSensitive); |
1260 $$->setMatch(CSSSelector::Set); | 1278 $$->setMatch(CSSSelector::Set); |
1261 } | 1279 } |
1262 | '[' maybe_space namespace_selector attr_name match maybe_space ident_or_st
ring maybe_space closing_square_bracket { | 1280 | '[' maybe_space namespace_selector attr_name match maybe_space ident_or_st
ring maybe_space maybe_attr_match_type closing_square_bracket { |
1263 $$ = parser->createFloatingSelector(); | 1281 $$ = parser->createFloatingSelector(); |
1264 $$->setAttribute(parser->determineNameInNamespace($3, $4)); | 1282 $$->setAttribute(parser->determineNameInNamespace($3, $4), $9); |
1265 $$->setMatch((CSSSelector::Match)$5); | 1283 $$->setMatch((CSSSelector::Match)$5); |
1266 $$->setValue($7); | 1284 $$->setValue($7); |
1267 } | 1285 } |
1268 | '[' selector_recovery closing_square_bracket { | 1286 | '[' selector_recovery closing_square_bracket { |
1269 YYERROR; | 1287 YYERROR; |
1270 } | 1288 } |
1271 ; | 1289 ; |
1272 | 1290 |
1273 match: | 1291 match: |
1274 '=' { | 1292 '=' { |
(...skipping 548 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1823 ; | 1841 ; |
1824 | 1842 |
1825 rule_error_recovery: | 1843 rule_error_recovery: |
1826 /* empty */ | 1844 /* empty */ |
1827 | rule_error_recovery error | 1845 | rule_error_recovery error |
1828 | rule_error_recovery invalid_square_brackets_block | 1846 | rule_error_recovery invalid_square_brackets_block |
1829 | rule_error_recovery invalid_parentheses_block | 1847 | rule_error_recovery invalid_parentheses_block |
1830 ; | 1848 ; |
1831 | 1849 |
1832 %% | 1850 %% |
OLD | NEW |