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 175 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
186 %token INTERNAL_DECLS_SYM | 186 %token INTERNAL_DECLS_SYM |
187 %token INTERNAL_MEDIALIST_SYM | 187 %token INTERNAL_MEDIALIST_SYM |
188 %token INTERNAL_RULE_SYM | 188 %token INTERNAL_RULE_SYM |
189 %token INTERNAL_SELECTOR_SYM | 189 %token INTERNAL_SELECTOR_SYM |
190 %token INTERNAL_VALUE_SYM | 190 %token INTERNAL_VALUE_SYM |
191 %token INTERNAL_KEYFRAME_RULE_SYM | 191 %token INTERNAL_KEYFRAME_RULE_SYM |
192 %token INTERNAL_KEYFRAME_KEY_LIST_SYM | 192 %token INTERNAL_KEYFRAME_KEY_LIST_SYM |
193 %token INTERNAL_SUPPORTS_CONDITION_SYM | 193 %token INTERNAL_SUPPORTS_CONDITION_SYM |
194 %token KEYFRAMES_SYM | 194 %token KEYFRAMES_SYM |
195 %token WEBKIT_KEYFRAMES_SYM | 195 %token WEBKIT_KEYFRAMES_SYM |
196 %token WEBKIT_REGION_RULE_SYM | |
197 %token <marginBox> TOPLEFTCORNER_SYM | 196 %token <marginBox> TOPLEFTCORNER_SYM |
198 %token <marginBox> TOPLEFT_SYM | 197 %token <marginBox> TOPLEFT_SYM |
199 %token <marginBox> TOPCENTER_SYM | 198 %token <marginBox> TOPCENTER_SYM |
200 %token <marginBox> TOPRIGHT_SYM | 199 %token <marginBox> TOPRIGHT_SYM |
201 %token <marginBox> TOPRIGHTCORNER_SYM | 200 %token <marginBox> TOPRIGHTCORNER_SYM |
202 %token <marginBox> BOTTOMLEFTCORNER_SYM | 201 %token <marginBox> BOTTOMLEFTCORNER_SYM |
203 %token <marginBox> BOTTOMLEFT_SYM | 202 %token <marginBox> BOTTOMLEFT_SYM |
204 %token <marginBox> BOTTOMCENTER_SYM | 203 %token <marginBox> BOTTOMCENTER_SYM |
205 %token <marginBox> BOTTOMRIGHT_SYM | 204 %token <marginBox> BOTTOMRIGHT_SYM |
206 %token <marginBox> BOTTOMRIGHTCORNER_SYM | 205 %token <marginBox> BOTTOMRIGHTCORNER_SYM |
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
277 %type <rule> import | 276 %type <rule> import |
278 %type <rule> namespace | 277 %type <rule> namespace |
279 %type <rule> page | 278 %type <rule> page |
280 %type <rule> margin_box | 279 %type <rule> margin_box |
281 %type <rule> font_face | 280 %type <rule> font_face |
282 %type <rule> keyframes | 281 %type <rule> keyframes |
283 %type <rule> rule | 282 %type <rule> rule |
284 %type <rule> valid_rule | 283 %type <rule> valid_rule |
285 %type <ruleList> block_rule_body | 284 %type <ruleList> block_rule_body |
286 %type <ruleList> block_rule_list | 285 %type <ruleList> block_rule_list |
287 %type <ruleList> region_block_rule_body | |
288 %type <ruleList> region_block_rule_list | |
289 %type <rule> block_rule | 286 %type <rule> block_rule |
290 %type <rule> block_valid_rule | 287 %type <rule> block_valid_rule |
291 %type <rule> region_block_rule | |
292 %type <rule> region_block_valid_rule | |
293 %type <rule> region | |
294 %type <rule> supports | 288 %type <rule> supports |
295 %type <rule> viewport | 289 %type <rule> viewport |
296 %type <boolean> keyframes_rule_start | 290 %type <boolean> keyframes_rule_start |
297 | 291 |
298 %type <string> maybe_ns_prefix | 292 %type <string> maybe_ns_prefix |
299 | 293 |
300 %type <string> namespace_selector | 294 %type <string> namespace_selector |
301 | 295 |
302 %type <string> string_or_uri | 296 %type <string> string_or_uri |
303 %type <string> ident_or_string | 297 %type <string> ident_or_string |
(...skipping 27 matching lines...) Expand all Loading... |
331 | 325 |
332 %type <id> property | 326 %type <id> property |
333 | 327 |
334 %type <selector> specifier | 328 %type <selector> specifier |
335 %type <selector> specifier_list | 329 %type <selector> specifier_list |
336 %type <selector> simple_selector | 330 %type <selector> simple_selector |
337 %type <selector> selector | 331 %type <selector> selector |
338 %type <selector> relative_selector | 332 %type <selector> relative_selector |
339 %type <selectorList> selector_list | 333 %type <selectorList> selector_list |
340 %type <selectorList> simple_selector_list | 334 %type <selectorList> simple_selector_list |
341 %type <selectorList> region_selector | |
342 %type <selector> class | 335 %type <selector> class |
343 %type <selector> attrib | 336 %type <selector> attrib |
344 %type <selector> pseudo | 337 %type <selector> pseudo |
345 %type <selector> pseudo_page | 338 %type <selector> pseudo_page |
346 %type <selector> page_selector | 339 %type <selector> page_selector |
347 | 340 |
348 %type <boolean> declaration_list | 341 %type <boolean> declaration_list |
349 %type <boolean> decl_list | 342 %type <boolean> decl_list |
350 %type <boolean> declaration | 343 %type <boolean> declaration |
351 %type <boolean> declarations_and_margins | 344 %type <boolean> declarations_and_margins |
(...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
500 ; | 493 ; |
501 | 494 |
502 valid_rule: | 495 valid_rule: |
503 ruleset | 496 ruleset |
504 | media | 497 | media |
505 | page | 498 | page |
506 | font_face | 499 | font_face |
507 | keyframes | 500 | keyframes |
508 | namespace | 501 | namespace |
509 | import | 502 | import |
510 | region | |
511 | supports | 503 | supports |
512 | viewport | 504 | viewport |
513 ; | 505 ; |
514 | 506 |
515 before_rule: | 507 before_rule: |
516 /* empty */ { | 508 /* empty */ { |
517 parser->startRule(); | 509 parser->startRule(); |
518 } | 510 } |
519 ; | 511 ; |
520 | 512 |
(...skipping 14 matching lines...) Expand all Loading... |
535 | block_rule_list block_rule_recovery | 527 | block_rule_list block_rule_recovery |
536 ; | 528 ; |
537 | 529 |
538 block_rule_list: | 530 block_rule_list: |
539 /* empty */ { $$ = 0; } | 531 /* empty */ { $$ = 0; } |
540 | block_rule_list block_rule maybe_sgml { | 532 | block_rule_list block_rule maybe_sgml { |
541 $$ = parser->appendRule($1, $2); | 533 $$ = parser->appendRule($1, $2); |
542 } | 534 } |
543 ; | 535 ; |
544 | 536 |
545 region_block_rule_body: | |
546 region_block_rule_list | |
547 | region_block_rule_list block_rule_recovery | |
548 ; | |
549 | |
550 region_block_rule_list: | |
551 /* empty */ { $$ = 0; } | |
552 | region_block_rule_list region_block_rule maybe_sgml { | |
553 $$ = parser->appendRule($1, $2); | |
554 } | |
555 ; | |
556 | |
557 region_block_rule: | |
558 before_rule region_block_valid_rule { | |
559 $$ = $2; | |
560 parser->endRule(!!$$); | |
561 } | |
562 | before_rule invalid_rule { | |
563 $$ = 0; | |
564 parser->endRule(false); | |
565 } | |
566 ; | |
567 | |
568 block_rule_recovery: | 537 block_rule_recovery: |
569 before_rule invalid_rule_header { | 538 before_rule invalid_rule_header { |
570 parser->endRule(false); | 539 parser->endRule(false); |
571 } | 540 } |
572 ; | 541 ; |
573 | 542 |
574 region_block_valid_rule: | |
575 ruleset | |
576 | page | |
577 | font_face | |
578 | media | |
579 | keyframes | |
580 | supports | |
581 | viewport | |
582 ; | |
583 | |
584 block_valid_rule: | 543 block_valid_rule: |
585 ruleset | 544 ruleset |
586 | page | 545 | page |
587 | font_face | 546 | font_face |
588 | media | 547 | media |
589 | keyframes | 548 | keyframes |
590 | supports | 549 | supports |
591 | viewport | 550 | viewport |
592 | namespace | 551 | namespace |
593 | region | |
594 ; | 552 ; |
595 | 553 |
596 block_rule: | 554 block_rule: |
597 before_rule block_valid_rule { | 555 before_rule block_valid_rule { |
598 $$ = $2; | 556 $$ = $2; |
599 parser->endRule(!!$$); | 557 parser->endRule(!!$$); |
600 } | 558 } |
601 | before_rule invalid_rule { | 559 | before_rule invalid_rule { |
602 $$ = 0; | 560 $$ = 0; |
603 parser->endRule(false); | 561 parser->endRule(false); |
(...skipping 471 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1075 ; | 1033 ; |
1076 | 1034 |
1077 viewport: | 1035 viewport: |
1078 before_viewport_rule VIEWPORT_RULE_SYM at_rule_header_end_maybe_space | 1036 before_viewport_rule VIEWPORT_RULE_SYM at_rule_header_end_maybe_space |
1079 '{' at_rule_body_start maybe_space_before_declaration declaration_list closi
ng_brace { | 1037 '{' at_rule_body_start maybe_space_before_declaration declaration_list closi
ng_brace { |
1080 $$ = parser->createViewportRule(); | 1038 $$ = parser->createViewportRule(); |
1081 parser->markViewportRuleBodyEnd(); | 1039 parser->markViewportRuleBodyEnd(); |
1082 } | 1040 } |
1083 ; | 1041 ; |
1084 | 1042 |
1085 region_selector: | |
1086 selector_list { | |
1087 parser->setReusableRegionSelectorVector($1); | |
1088 $$ = parser->reusableRegionSelectorVector(); | |
1089 } | |
1090 ; | |
1091 | |
1092 before_region_rule: | |
1093 /* empty */ { | |
1094 parser->startRuleHeader(CSSRuleSourceData::REGION_RULE); | |
1095 } | |
1096 ; | |
1097 | |
1098 region: | |
1099 before_region_rule WEBKIT_REGION_RULE_SYM maybe_space region_selector at_rul
e_header_end '{' at_rule_body_start maybe_space region_block_rule_body closing_b
race { | |
1100 $$ = parser->createRegionRule($4, $9); | |
1101 } | |
1102 ; | |
1103 | |
1104 combinator: | 1043 combinator: |
1105 '+' maybe_space { $$ = CSSSelector::DirectAdjacent; } | 1044 '+' maybe_space { $$ = CSSSelector::DirectAdjacent; } |
1106 | '~' maybe_space { $$ = CSSSelector::IndirectAdjacent; } | 1045 | '~' maybe_space { $$ = CSSSelector::IndirectAdjacent; } |
1107 | '>' maybe_space { $$ = CSSSelector::Child; } | 1046 | '>' maybe_space { $$ = CSSSelector::Child; } |
1108 | '^' maybe_space { | 1047 | '^' maybe_space { |
1109 if (!RuntimeEnabledFeatures::shadowDOMEnabled()) | 1048 if (!RuntimeEnabledFeatures::shadowDOMEnabled()) |
1110 YYERROR; | 1049 YYERROR; |
1111 $$ = CSSSelector::ChildTree; | 1050 $$ = CSSSelector::ChildTree; |
1112 } | 1051 } |
1113 | '^' '^' maybe_space { | 1052 | '^' '^' maybe_space { |
(...skipping 769 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1883 | before_font_face_rule FONT_FACE_SYM at_rule_header_recovery | 1822 | before_font_face_rule FONT_FACE_SYM at_rule_header_recovery |
1884 | before_supports_rule SUPPORTS_SYM error error_location rule_error_recovery { | 1823 | before_supports_rule SUPPORTS_SYM error error_location rule_error_recovery { |
1885 parser->reportError($4, InvalidSupportsConditionCSSError); | 1824 parser->reportError($4, InvalidSupportsConditionCSSError); |
1886 parser->popSupportsRuleData(); | 1825 parser->popSupportsRuleData(); |
1887 } | 1826 } |
1888 | before_viewport_rule VIEWPORT_RULE_SYM at_rule_header_recovery { | 1827 | before_viewport_rule VIEWPORT_RULE_SYM at_rule_header_recovery { |
1889 parser->markViewportRuleBodyEnd(); | 1828 parser->markViewportRuleBodyEnd(); |
1890 } | 1829 } |
1891 | import_rule_start at_rule_header_recovery | 1830 | import_rule_start at_rule_header_recovery |
1892 | NAMESPACE_SYM at_rule_header_recovery | 1831 | NAMESPACE_SYM at_rule_header_recovery |
1893 | before_region_rule WEBKIT_REGION_RULE_SYM at_rule_header_recovery | |
1894 | error_location invalid_at at_rule_header_recovery { | 1832 | error_location invalid_at at_rule_header_recovery { |
1895 parser->resumeErrorLogging(); | 1833 parser->resumeErrorLogging(); |
1896 parser->reportError($1, InvalidRuleCSSError); | 1834 parser->reportError($1, InvalidRuleCSSError); |
1897 } | 1835 } |
1898 ; | 1836 ; |
1899 | 1837 |
1900 invalid_rule: | 1838 invalid_rule: |
1901 error error_location rule_error_recovery at_invalid_rule_header_end invalid_
block { | 1839 error error_location rule_error_recovery at_invalid_rule_header_end invalid_
block { |
1902 parser->reportError($2, InvalidRuleCSSError); | 1840 parser->reportError($2, InvalidRuleCSSError); |
1903 } | 1841 } |
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1957 | 1895 |
1958 rule_error_recovery: | 1896 rule_error_recovery: |
1959 /* empty */ | 1897 /* empty */ |
1960 | rule_error_recovery error | 1898 | rule_error_recovery error |
1961 | rule_error_recovery invalid_square_brackets_block | 1899 | rule_error_recovery invalid_square_brackets_block |
1962 | rule_error_recovery invalid_parentheses_block | 1900 | rule_error_recovery invalid_parentheses_block |
1963 ; | 1901 ; |
1964 | 1902 |
1965 %% | 1903 %% |
1966 | 1904 |
OLD | NEW |