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

Side by Side Diff: sky/engine/core/css/parser/CSSGrammar.y

Issue 654693004: Remove meta viewport and @viewport CSS rules. (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 6 years, 1 month 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
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 159 matching lines...) Expand 10 before | Expand all | Expand 10 after
170 %nonassoc '.' 170 %nonassoc '.'
171 %nonassoc '[' 171 %nonassoc '['
172 %nonassoc <string> '*' 172 %nonassoc <string> '*'
173 %nonassoc error 173 %nonassoc error
174 %left '|' 174 %left '|'
175 175
176 %token MEDIA_SYM 176 %token MEDIA_SYM
177 %token SUPPORTS_SYM 177 %token SUPPORTS_SYM
178 %token FONT_FACE_SYM 178 %token FONT_FACE_SYM
179 %token CHARSET_SYM 179 %token CHARSET_SYM
180 %token VIEWPORT_RULE_SYM
181 %token INTERNAL_DECLS_SYM 180 %token INTERNAL_DECLS_SYM
182 %token INTERNAL_MEDIALIST_SYM 181 %token INTERNAL_MEDIALIST_SYM
183 %token INTERNAL_RULE_SYM 182 %token INTERNAL_RULE_SYM
184 %token INTERNAL_SELECTOR_SYM 183 %token INTERNAL_SELECTOR_SYM
185 %token INTERNAL_VALUE_SYM 184 %token INTERNAL_VALUE_SYM
186 %token INTERNAL_KEYFRAME_RULE_SYM 185 %token INTERNAL_KEYFRAME_RULE_SYM
187 %token INTERNAL_KEYFRAME_KEY_LIST_SYM 186 %token INTERNAL_KEYFRAME_KEY_LIST_SYM
188 %token INTERNAL_SUPPORTS_CONDITION_SYM 187 %token INTERNAL_SUPPORTS_CONDITION_SYM
189 %token KEYFRAMES_SYM 188 %token KEYFRAMES_SYM
190 %token WEBKIT_KEYFRAMES_SYM 189 %token WEBKIT_KEYFRAMES_SYM
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
245 %type <rule> media 244 %type <rule> media
246 %type <rule> font_face 245 %type <rule> font_face
247 %type <rule> keyframes 246 %type <rule> keyframes
248 %type <rule> rule 247 %type <rule> rule
249 %type <rule> valid_rule 248 %type <rule> valid_rule
250 %type <ruleList> block_rule_body 249 %type <ruleList> block_rule_body
251 %type <ruleList> block_rule_list 250 %type <ruleList> block_rule_list
252 %type <rule> block_rule 251 %type <rule> block_rule
253 %type <rule> block_valid_rule 252 %type <rule> block_valid_rule
254 %type <rule> supports 253 %type <rule> supports
255 %type <rule> viewport
256 %type <boolean> keyframes_rule_start 254 %type <boolean> keyframes_rule_start
257 255
258 %type <string> ident_or_string 256 %type <string> ident_or_string
259 %type <string> medium 257 %type <string> medium
260 258
261 %type <mediaList> media_list 259 %type <mediaList> media_list
262 %type <mediaList> maybe_media_list 260 %type <mediaList> maybe_media_list
263 %type <mediaList> mq_list 261 %type <mediaList> mq_list
264 %type <mediaQuery> media_query 262 %type <mediaQuery> media_query
265 %type <mediaQuery> valid_media_query 263 %type <mediaQuery> valid_media_query
(...skipping 180 matching lines...) Expand 10 before | Expand all | Expand 10 after
446 parser->m_styleSheet->parserAppendRule($2); 444 parser->m_styleSheet->parserAppendRule($2);
447 } 445 }
448 ; 446 ;
449 447
450 valid_rule: 448 valid_rule:
451 ruleset 449 ruleset
452 | media 450 | media
453 | font_face 451 | font_face
454 | keyframes 452 | keyframes
455 | supports 453 | supports
456 | viewport
457 ; 454 ;
458 455
459 before_rule: 456 before_rule:
460 /* empty */ { 457 /* empty */ {
461 parser->startRule(); 458 parser->startRule();
462 } 459 }
463 ; 460 ;
464 461
465 rule: 462 rule:
466 before_rule valid_rule { 463 before_rule valid_rule {
(...skipping 24 matching lines...) Expand all
491 parser->endRule(false); 488 parser->endRule(false);
492 } 489 }
493 ; 490 ;
494 491
495 block_valid_rule: 492 block_valid_rule:
496 ruleset 493 ruleset
497 | font_face 494 | font_face
498 | media 495 | media
499 | keyframes 496 | keyframes
500 | supports 497 | supports
501 | viewport
502 ; 498 ;
503 499
504 block_rule: 500 block_rule:
505 before_rule block_valid_rule { 501 before_rule block_valid_rule {
506 $$ = $2; 502 $$ = $2;
507 parser->endRule(!!$$); 503 parser->endRule(!!$$);
508 } 504 }
509 | before_rule invalid_rule { 505 | before_rule invalid_rule {
510 $$ = 0; 506 $$ = 0;
511 parser->endRule(false); 507 parser->endRule(false);
(...skipping 313 matching lines...) Expand 10 before | Expand all | Expand 10 after
825 } 821 }
826 ; 822 ;
827 823
828 font_face: 824 font_face:
829 before_font_face_rule FONT_FACE_SYM at_rule_header_end_maybe_space 825 before_font_face_rule FONT_FACE_SYM at_rule_header_end_maybe_space
830 '{' at_rule_body_start maybe_space_before_declaration declaration_list closi ng_brace { 826 '{' at_rule_body_start maybe_space_before_declaration declaration_list closi ng_brace {
831 $$ = parser->createFontFaceRule(); 827 $$ = parser->createFontFaceRule();
832 } 828 }
833 ; 829 ;
834 830
835 before_viewport_rule:
836 /* empty */ {
837 parser->markViewportRuleBodyStart();
838 parser->startRuleHeader(CSSRuleSourceData::VIEWPORT_RULE);
839 }
840 ;
841
842 viewport:
843 before_viewport_rule VIEWPORT_RULE_SYM at_rule_header_end_maybe_space
844 '{' at_rule_body_start maybe_space_before_declaration declaration_list closi ng_brace {
845 $$ = parser->createViewportRule();
846 parser->markViewportRuleBodyEnd();
847 }
848 ;
849
850 maybe_unary_operator: 831 maybe_unary_operator:
851 unary_operator 832 unary_operator
852 | /* empty */ { $$ = 1; } 833 | /* empty */ { $$ = 1; }
853 ; 834 ;
854 835
855 unary_operator: 836 unary_operator:
856 '-' { $$ = -1; } 837 '-' { $$ = -1; }
857 | '+' { $$ = 1; } 838 | '+' { $$ = 1; }
858 ; 839 ;
859 840
(...skipping 577 matching lines...) Expand 10 before | Expand all | Expand 10 after
1437 | at_invalid_rule_header_end invalid_block 1418 | at_invalid_rule_header_end invalid_block
1438 ; 1419 ;
1439 1420
1440 regular_invalid_at_rule_header: 1421 regular_invalid_at_rule_header:
1441 keyframes_rule_start at_rule_header_recovery 1422 keyframes_rule_start at_rule_header_recovery
1442 | before_font_face_rule FONT_FACE_SYM at_rule_header_recovery 1423 | before_font_face_rule FONT_FACE_SYM at_rule_header_recovery
1443 | before_supports_rule SUPPORTS_SYM error error_location rule_error_recovery { 1424 | before_supports_rule SUPPORTS_SYM error error_location rule_error_recovery {
1444 parser->reportError($4, InvalidSupportsConditionCSSError); 1425 parser->reportError($4, InvalidSupportsConditionCSSError);
1445 parser->popSupportsRuleData(); 1426 parser->popSupportsRuleData();
1446 } 1427 }
1447 | before_viewport_rule VIEWPORT_RULE_SYM at_rule_header_recovery {
1448 parser->markViewportRuleBodyEnd();
1449 }
1450 | error_location invalid_at at_rule_header_recovery { 1428 | error_location invalid_at at_rule_header_recovery {
1451 parser->resumeErrorLogging(); 1429 parser->resumeErrorLogging();
1452 parser->reportError($1, InvalidRuleCSSError); 1430 parser->reportError($1, InvalidRuleCSSError);
1453 } 1431 }
1454 ; 1432 ;
1455 1433
1456 invalid_rule: 1434 invalid_rule:
1457 error error_location rule_error_recovery at_invalid_rule_header_end invalid_ block { 1435 error error_location rule_error_recovery at_invalid_rule_header_end invalid_ block {
1458 parser->reportError($2, InvalidRuleCSSError); 1436 parser->reportError($2, InvalidRuleCSSError);
1459 } 1437 }
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
1512 ; 1490 ;
1513 1491
1514 rule_error_recovery: 1492 rule_error_recovery:
1515 /* empty */ 1493 /* empty */
1516 | rule_error_recovery error 1494 | rule_error_recovery error
1517 | rule_error_recovery invalid_square_brackets_block 1495 | rule_error_recovery invalid_square_brackets_block
1518 | rule_error_recovery invalid_parentheses_block 1496 | rule_error_recovery invalid_parentheses_block
1519 ; 1497 ;
1520 1498
1521 %% 1499 %%
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698