Index: Source/core/css/CSSGrammar.y.in |
diff --git a/Source/core/css/CSSGrammar.y.in b/Source/core/css/CSSGrammar.y.in |
index da016a2f6ee9af87d96a26d1fa685259f29dea91..bc988cb47d5cc526758a7db02653fb1911416065 100644 |
--- a/Source/core/css/CSSGrammar.y.in |
+++ b/Source/core/css/CSSGrammar.y.in |
@@ -397,9 +397,14 @@ internal_supports_condition: |
} |
; |
+space: |
+ WHITESPACE |
+ | space WHITESPACE |
+ ; |
+ |
maybe_space: |
/* empty */ %prec UNIMPORTANT_TOK |
- | maybe_space WHITESPACE |
+ | space |
; |
maybe_sgml: |
@@ -598,7 +603,7 @@ maybe_media_value: |
; |
media_query_exp: |
- '(' maybe_space IDENT maybe_space maybe_media_value closing_parenthesis maybe_space { |
+ '(' maybe_space IDENT maybe_space maybe_media_value closing_parenthesis { |
parser->tokenToLowerCase($3); |
$$ = parser->createFloatingMediaQueryExp($3, $5); |
if (!$$) |
@@ -614,18 +619,18 @@ media_query_exp_list: |
$$ = parser->createFloatingMediaQueryExpList(); |
$$->append(parser->sinkFloatingMediaQueryExp($1)); |
} |
- | media_query_exp_list MEDIA_AND maybe_space media_query_exp { |
+ | media_query_exp_list space MEDIA_AND space media_query_exp { |
$$ = $1; |
- $$->append(parser->sinkFloatingMediaQueryExp($4)); |
+ $$->append(parser->sinkFloatingMediaQueryExp($5)); |
} |
; |
maybe_and_media_query_exp_list: |
- /*empty*/ { |
+ maybe_space { |
$$ = parser->createFloatingMediaQueryExpList(); |
} |
- | MEDIA_AND maybe_space media_query_exp_list { |
- $$ = $3; |
+ | space MEDIA_AND space media_query_exp_list maybe_space { |
+ $$ = $4; |
} |
; |
@@ -633,16 +638,16 @@ maybe_media_restrictor: |
/*empty*/ { |
$$ = MediaQuery::None; |
} |
- | MEDIA_ONLY maybe_space { |
+ | MEDIA_ONLY space { |
$$ = MediaQuery::Only; |
} |
- | MEDIA_NOT maybe_space { |
+ | MEDIA_NOT space { |
$$ = MediaQuery::Not; |
} |
; |
valid_media_query: |
- media_query_exp_list { |
+ media_query_exp_list maybe_space { |
$$ = parser->createFloatingMediaQuery(parser->sinkFloatingMediaQueryExpList($1)); |
} |
| maybe_media_restrictor medium maybe_and_media_query_exp_list { |
@@ -732,7 +737,7 @@ media: |
; |
medium: |
- IDENT maybe_space |
+ IDENT |
; |
supports: |