Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 /* | 1 /* |
| 2 * Copyright (C) 2002-2003 Lars Knoll (knoll@kde.org) | 2 * Copyright (C) 2002-2003 Lars Knoll (knoll@kde.org) |
| 3 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 App le Inc. All rights reserved. | 3 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 App le Inc. All rights reserved. |
| 4 * Copyright (C) 2006 Alexey Proskuryakov (ap@nypop.com) | 4 * Copyright (C) 2006 Alexey Proskuryakov (ap@nypop.com) |
| 5 * Copyright (C) 2008 Eric Seidel <eric@webkit.org> | 5 * Copyright (C) 2008 Eric Seidel <eric@webkit.org> |
| 6 * Copyright (C) 2012 Intel Corporation. All rights reserved. | 6 * Copyright (C) 2012 Intel Corporation. All rights reserved. |
| 7 * | 7 * |
| 8 * This library is free software; you can redistribute it and/or | 8 * This library is free software; you can redistribute it and/or |
| 9 * modify it under the terms of the GNU Lesser General Public | 9 * modify it under the terms of the GNU Lesser General Public |
| 10 * License as published by the Free Software Foundation; either | 10 * License as published by the Free Software Foundation; either |
| (...skipping 250 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 261 | 261 |
| 262 %type <mediaList> media_list | 262 %type <mediaList> media_list |
| 263 %type <mediaList> maybe_media_list | 263 %type <mediaList> maybe_media_list |
| 264 %type <mediaList> mq_list | 264 %type <mediaList> mq_list |
| 265 %type <mediaQuery> media_query | 265 %type <mediaQuery> media_query |
| 266 %type <mediaQuery> valid_media_query | 266 %type <mediaQuery> valid_media_query |
| 267 %type <mediaQueryRestrictor> maybe_media_restrictor | 267 %type <mediaQueryRestrictor> maybe_media_restrictor |
| 268 %type <valueList> maybe_media_value | 268 %type <valueList> maybe_media_value |
| 269 %type <mediaQueryExp> media_query_exp | 269 %type <mediaQueryExp> media_query_exp |
| 270 %type <mediaQueryExpList> media_query_exp_list | 270 %type <mediaQueryExpList> media_query_exp_list |
| 271 %type <mediaQueryExpList> media_query_exp_list_space | |
| 272 %type <mediaQueryExpList> media_query_exp_list_no_space | |
| 271 %type <mediaQueryExpList> maybe_and_media_query_exp_list | 273 %type <mediaQueryExpList> maybe_and_media_query_exp_list |
| 272 | 274 |
| 273 %type <boolean> supports_condition | 275 %type <boolean> supports_condition |
| 274 %type <boolean> supports_condition_in_parens | 276 %type <boolean> supports_condition_in_parens |
| 275 %type <boolean> supports_negation | 277 %type <boolean> supports_negation |
| 276 %type <boolean> supports_conjunction | 278 %type <boolean> supports_conjunction |
| 277 %type <boolean> supports_disjunction | 279 %type <boolean> supports_disjunction |
| 278 %type <boolean> supports_declaration_condition | 280 %type <boolean> supports_declaration_condition |
| 279 | 281 |
| 280 %type <string> keyframe_name | 282 %type <string> keyframe_name |
| (...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 390 parser->m_selectorListForParseSelector->adoptSelectorVector(*$3); | 392 parser->m_selectorListForParseSelector->adoptSelectorVector(*$3); |
| 391 } | 393 } |
| 392 ; | 394 ; |
| 393 | 395 |
| 394 internal_supports_condition: | 396 internal_supports_condition: |
| 395 INTERNAL_SUPPORTS_CONDITION_SYM maybe_space supports_condition TOKEN_EOF { | 397 INTERNAL_SUPPORTS_CONDITION_SYM maybe_space supports_condition TOKEN_EOF { |
| 396 parser->m_supportsCondition = $3; | 398 parser->m_supportsCondition = $3; |
| 397 } | 399 } |
| 398 ; | 400 ; |
| 399 | 401 |
| 402 spaces: | |
|
SeRya
2013/09/23 09:12:43
It should be 'space' for consistency with 'maybe_s
rune
2013/10/01 12:04:48
Done.
| |
| 403 WHITESPACE | |
| 404 | spaces WHITESPACE | |
| 405 ; | |
| 406 | |
| 400 maybe_space: | 407 maybe_space: |
| 401 /* empty */ %prec UNIMPORTANT_TOK | 408 /* empty */ %prec UNIMPORTANT_TOK |
| 402 | maybe_space WHITESPACE | 409 | maybe_space WHITESPACE |
| 403 ; | 410 ; |
| 404 | 411 |
| 405 maybe_sgml: | 412 maybe_sgml: |
| 406 /* empty */ | 413 /* empty */ |
| 407 | maybe_sgml SGML_CD | 414 | maybe_sgml SGML_CD |
| 408 | maybe_sgml WHITESPACE | 415 | maybe_sgml WHITESPACE |
| 409 ; | 416 ; |
| (...skipping 181 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 591 maybe_media_value: | 598 maybe_media_value: |
| 592 /*empty*/ { | 599 /*empty*/ { |
| 593 $$ = 0; | 600 $$ = 0; |
| 594 } | 601 } |
| 595 | ':' maybe_space expr { | 602 | ':' maybe_space expr { |
| 596 $$ = $3; | 603 $$ = $3; |
| 597 } | 604 } |
| 598 ; | 605 ; |
| 599 | 606 |
| 600 media_query_exp: | 607 media_query_exp: |
| 601 '(' maybe_space IDENT maybe_space maybe_media_value closing_parenthesis mayb e_space { | 608 '(' maybe_space IDENT maybe_space maybe_media_value closing_parenthesis { |
| 602 parser->tokenToLowerCase($3); | 609 parser->tokenToLowerCase($3); |
| 603 $$ = parser->createFloatingMediaQueryExp($3, $5); | 610 $$ = parser->createFloatingMediaQueryExp($3, $5); |
| 604 if (!$$) | 611 if (!$$) |
| 605 YYERROR; | 612 YYERROR; |
| 606 } | 613 } |
| 607 | '(' error error_recovery closing_parenthesis { | 614 | '(' error error_recovery closing_parenthesis { |
| 608 YYERROR; | 615 YYERROR; |
| 609 } | 616 } |
| 610 ; | 617 ; |
| 611 | 618 |
| 612 media_query_exp_list: | 619 media_query_exp_list_no_space: |
| 613 media_query_exp { | 620 media_query_exp { |
| 614 $$ = parser->createFloatingMediaQueryExpList(); | 621 $$ = parser->createFloatingMediaQueryExpList(); |
| 615 $$->append(parser->sinkFloatingMediaQueryExp($1)); | 622 $$->append(parser->sinkFloatingMediaQueryExp($1)); |
| 616 } | 623 } |
| 617 | media_query_exp_list MEDIA_AND maybe_space media_query_exp { | 624 | media_query_exp_list_space MEDIA_AND spaces media_query_exp { |
| 618 $$ = $1; | 625 $$ = $1; |
| 619 $$->append(parser->sinkFloatingMediaQueryExp($4)); | 626 $$->append(parser->sinkFloatingMediaQueryExp($4)); |
| 620 } | 627 } |
| 621 ; | 628 ; |
| 622 | 629 |
| 630 media_query_exp_list_space: | |
|
SeRya
2013/09/23 09:12:43
Can "media_query_exp_list_space" be replaced by "m
rune
2013/10/01 12:04:48
Done. I've removed the _no_space part since there'
| |
| 631 media_query_exp_list_no_space spaces | |
| 632 ; | |
| 633 | |
| 634 media_query_exp_list: | |
| 635 media_query_exp_list_no_space | |
| 636 | media_query_exp_list_space | |
| 637 ; | |
| 638 | |
| 623 maybe_and_media_query_exp_list: | 639 maybe_and_media_query_exp_list: |
| 624 /*empty*/ { | 640 /*empty*/ { |
| 625 $$ = parser->createFloatingMediaQueryExpList(); | 641 $$ = parser->createFloatingMediaQueryExpList(); |
| 626 } | 642 } |
| 627 | MEDIA_AND maybe_space media_query_exp_list { | 643 | spaces { |
|
SeRya
2013/09/23 09:12:43
maybe_space {
....
}
To avoid conflicts redef
rune
2013/10/01 12:04:48
Done.
| |
| 628 $$ = $3; | 644 $$ = parser->createFloatingMediaQueryExpList(); |
| 645 } | |
| 646 | spaces MEDIA_AND spaces media_query_exp_list { | |
| 647 $$ = $4; | |
| 629 } | 648 } |
| 630 ; | 649 ; |
| 631 | 650 |
| 632 maybe_media_restrictor: | 651 maybe_media_restrictor: |
| 633 /*empty*/ { | 652 /*empty*/ { |
| 634 $$ = MediaQuery::None; | 653 $$ = MediaQuery::None; |
| 635 } | 654 } |
| 636 | MEDIA_ONLY maybe_space { | 655 | MEDIA_ONLY spaces { |
| 637 $$ = MediaQuery::Only; | 656 $$ = MediaQuery::Only; |
| 638 } | 657 } |
| 639 | MEDIA_NOT maybe_space { | 658 | MEDIA_NOT spaces { |
| 640 $$ = MediaQuery::Not; | 659 $$ = MediaQuery::Not; |
| 641 } | 660 } |
| 642 ; | 661 ; |
| 643 | 662 |
| 644 valid_media_query: | 663 valid_media_query: |
| 645 media_query_exp_list { | 664 media_query_exp_list { |
| 646 $$ = parser->createFloatingMediaQuery(parser->sinkFloatingMediaQueryExpL ist($1)); | 665 $$ = parser->createFloatingMediaQuery(parser->sinkFloatingMediaQueryExpL ist($1)); |
| 647 } | 666 } |
| 648 | maybe_media_restrictor medium maybe_and_media_query_exp_list { | 667 | maybe_media_restrictor medium maybe_and_media_query_exp_list { |
| 649 parser->tokenToLowerCase($2); | 668 parser->tokenToLowerCase($2); |
| (...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 725 $$ = 0; | 744 $$ = 0; |
| 726 parser->endRuleBody(true); | 745 parser->endRuleBody(true); |
| 727 } | 746 } |
| 728 | before_media_rule MEDIA_SYM at_rule_recovery { | 747 | before_media_rule MEDIA_SYM at_rule_recovery { |
| 729 $$ = 0; | 748 $$ = 0; |
| 730 parser->endRuleBody(true); | 749 parser->endRuleBody(true); |
| 731 } | 750 } |
| 732 ; | 751 ; |
| 733 | 752 |
| 734 medium: | 753 medium: |
| 735 IDENT maybe_space | 754 IDENT |
| 736 ; | 755 ; |
| 737 | 756 |
| 738 supports: | 757 supports: |
| 739 before_supports_rule SUPPORTS_SYM maybe_space supports_condition at_supports _rule_header_end '{' at_rule_body_start maybe_space block_rule_body closing_brac e { | 758 before_supports_rule SUPPORTS_SYM maybe_space supports_condition at_supports _rule_header_end '{' at_rule_body_start maybe_space block_rule_body closing_brac e { |
| 740 $$ = parser->createSupportsRule($4, $9); | 759 $$ = parser->createSupportsRule($4, $9); |
| 741 } | 760 } |
| 742 | before_supports_rule SUPPORTS_SYM error error_location rule_error_recovery at_rule_end { | 761 | before_supports_rule SUPPORTS_SYM error error_location rule_error_recovery at_rule_end { |
| 743 $$ = 0; | 762 $$ = 0; |
| 744 parser->reportError($4, CSSParser::InvalidSupportsConditionError); | 763 parser->reportError($4, CSSParser::InvalidSupportsConditionError); |
| 745 parser->endRuleBody(true); | 764 parser->endRuleBody(true); |
| (...skipping 1176 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1922 | 1941 |
| 1923 rule_error_recovery: | 1942 rule_error_recovery: |
| 1924 /* empty */ | 1943 /* empty */ |
| 1925 | rule_error_recovery error | 1944 | rule_error_recovery error |
| 1926 | rule_error_recovery invalid_square_brackets_block | 1945 | rule_error_recovery invalid_square_brackets_block |
| 1927 | rule_error_recovery invalid_parentheses_block | 1946 | rule_error_recovery invalid_parentheses_block |
| 1928 ; | 1947 ; |
| 1929 | 1948 |
| 1930 %% | 1949 %% |
| 1931 | 1950 |
| OLD | NEW |