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

Side by Side Diff: Source/core/css/CSSGrammar.y.in

Issue 15679021: Parse media attributes and CSSOM media text as media_query_list. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Fixed review issues. Created 7 years, 6 months 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
« no previous file with comments | « LayoutTests/fast/media/mq-parsing-expected.txt ('k') | Source/core/css/CSSParser.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 107 matching lines...) Expand 10 before | Expand all | Expand 10 after
118 %token IMPORT_SYM 118 %token IMPORT_SYM
119 %token PAGE_SYM 119 %token PAGE_SYM
120 %token MEDIA_SYM 120 %token MEDIA_SYM
121 %token SUPPORTS_SYM 121 %token SUPPORTS_SYM
122 %token FONT_FACE_SYM 122 %token FONT_FACE_SYM
123 %token HOST_SYM 123 %token HOST_SYM
124 %token CHARSET_SYM 124 %token CHARSET_SYM
125 %token NAMESPACE_SYM 125 %token NAMESPACE_SYM
126 %token VARFUNCTION 126 %token VARFUNCTION
127 %token INTERNAL_DECLS_SYM 127 %token INTERNAL_DECLS_SYM
128 %token INTERNAL_MEDIALIST_SYM
128 %token INTERNAL_RULE_SYM 129 %token INTERNAL_RULE_SYM
129 %token INTERNAL_SELECTOR_SYM 130 %token INTERNAL_SELECTOR_SYM
130 %token INTERNAL_VALUE_SYM 131 %token INTERNAL_VALUE_SYM
131 %token WEBKIT_KEYFRAME_RULE_SYM 132 %token WEBKIT_KEYFRAME_RULE_SYM
132 %token WEBKIT_KEYFRAMES_SYM 133 %token WEBKIT_KEYFRAMES_SYM
133 %token WEBKIT_MEDIAQUERY_SYM
134 %token WEBKIT_REGION_RULE_SYM 134 %token WEBKIT_REGION_RULE_SYM
135 %token WEBKIT_VIEWPORT_RULE_SYM 135 %token WEBKIT_VIEWPORT_RULE_SYM
136 %token WEBKIT_SUPPORTS_CONDITION_SYM 136 %token WEBKIT_SUPPORTS_CONDITION_SYM
137 %token WEBKIT_FILTER_RULE_SYM 137 %token WEBKIT_FILTER_RULE_SYM
138 %token <marginBox> TOPLEFTCORNER_SYM 138 %token <marginBox> TOPLEFTCORNER_SYM
139 %token <marginBox> TOPLEFT_SYM 139 %token <marginBox> TOPLEFT_SYM
140 %token <marginBox> TOPCENTER_SYM 140 %token <marginBox> TOPCENTER_SYM
141 %token <marginBox> TOPRIGHT_SYM 141 %token <marginBox> TOPRIGHT_SYM
142 %token <marginBox> TOPRIGHTCORNER_SYM 142 %token <marginBox> TOPRIGHTCORNER_SYM
143 %token <marginBox> BOTTOMLEFTCORNER_SYM 143 %token <marginBox> BOTTOMLEFTCORNER_SYM
(...skipping 176 matching lines...) Expand 10 before | Expand all | Expand 10 after
320 %type <location> error_location 320 %type <location> error_location
321 321
322 %% 322 %%
323 323
324 stylesheet: 324 stylesheet:
325 maybe_charset maybe_sgml rule_list 325 maybe_charset maybe_sgml rule_list
326 | internal_decls maybe_space 326 | internal_decls maybe_space
327 | internal_rule maybe_space 327 | internal_rule maybe_space
328 | internal_selector maybe_space 328 | internal_selector maybe_space
329 | internal_value maybe_space 329 | internal_value maybe_space
330 | webkit_mediaquery maybe_space 330 | internal_medialist
331 | webkit_keyframe_rule maybe_space 331 | webkit_keyframe_rule maybe_space
332 | webkit_supports_condition maybe_space 332 | webkit_supports_condition maybe_space
333 ; 333 ;
334 334
335 internal_rule: 335 internal_rule:
336 INTERNAL_RULE_SYM '{' maybe_space valid_rule maybe_space '}' { 336 INTERNAL_RULE_SYM '{' maybe_space valid_rule maybe_space '}' {
337 parser->m_rule = $4; 337 parser->m_rule = $4;
338 } 338 }
339 ; 339 ;
340 340
(...skipping 14 matching lines...) Expand all
355 if ($4) { 355 if ($4) {
356 parser->m_valueList = parser->sinkFloatingValueList($4); 356 parser->m_valueList = parser->sinkFloatingValueList($4);
357 int oldParsedProperties = parser->m_parsedProperties.size(); 357 int oldParsedProperties = parser->m_parsedProperties.size();
358 if (!parser->parseValue(parser->m_id, parser->m_important)) 358 if (!parser->parseValue(parser->m_id, parser->m_important))
359 parser->rollbackLastProperties(parser->m_parsedProperties.size() - oldParsedProperties); 359 parser->rollbackLastProperties(parser->m_parsedProperties.size() - oldParsedProperties);
360 parser->m_valueList = nullptr; 360 parser->m_valueList = nullptr;
361 } 361 }
362 } 362 }
363 ; 363 ;
364 364
365 webkit_mediaquery: 365 internal_medialist:
366 WEBKIT_MEDIAQUERY_SYM maybe_space valid_media_query '}' { 366 INTERNAL_MEDIALIST_SYM maybe_space maybe_media_list TOKEN_EOF {
367 parser->m_mediaQuery = parser->sinkFloatingMediaQuery($3); 367 parser->m_mediaList = $3;
368 } 368 }
369 ; 369 ;
370 370
371 internal_selector: 371 internal_selector:
372 INTERNAL_SELECTOR_SYM '{' maybe_space selector_list '}' { 372 INTERNAL_SELECTOR_SYM '{' maybe_space selector_list '}' {
373 if ($4) { 373 if ($4) {
374 if (parser->m_selectorListForParseSelector) 374 if (parser->m_selectorListForParseSelector)
375 parser->m_selectorListForParseSelector->adoptSelectorVector(*$4) ; 375 parser->m_selectorListForParseSelector->adoptSelectorVector(*$4) ;
376 } 376 }
377 } 377 }
378 ; 378 ;
(...skipping 1610 matching lines...) Expand 10 before | Expand all | Expand 10 after
1989 1989
1990 rule_error_recovery: 1990 rule_error_recovery:
1991 /* empty */ 1991 /* empty */
1992 | rule_error_recovery error 1992 | rule_error_recovery error
1993 | rule_error_recovery invalid_square_brackets_block 1993 | rule_error_recovery invalid_square_brackets_block
1994 | rule_error_recovery invalid_parentheses_block 1994 | rule_error_recovery invalid_parentheses_block
1995 ; 1995 ;
1996 1996
1997 %% 1997 %%
1998 1998
OLDNEW
« no previous file with comments | « LayoutTests/fast/media/mq-parsing-expected.txt ('k') | Source/core/css/CSSParser.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698