Index: Source/core/css/CSSParser.cpp |
diff --git a/Source/core/css/CSSParser.cpp b/Source/core/css/CSSParser.cpp |
index 37a59d9168dbc016b2405181334e317a86ff00e3..d1c443a447fb6394e95fac96b8ee3529fdfb26d6 100644 |
--- a/Source/core/css/CSSParser.cpp |
+++ b/Source/core/css/CSSParser.cpp |
@@ -1422,8 +1422,8 @@ PassOwnPtr<MediaQuery> CSSParser::parseMediaQuery(const String& string) |
ASSERT(!m_mediaQuery); |
// can't use { because tokenizer state switches from mediaquery to initial state when it sees { token. |
- // instead insert one " " (which is WHITESPACE in CSSGrammar.y) |
- setupParser("@-webkit-mediaquery ", string, "} "); |
+ // instead insert one " " (which is caught by maybe_space in CSSGrammar.y) |
+ setupParser("@-webkit-mediaquery ", string, ""); |
cssyyparse(this); |
return m_mediaQuery.release(); |
@@ -10345,22 +10345,11 @@ restartAfterComment: |
} |
m_token = FUNCTION; |
- bool shouldSkipParenthesis = true; |
- if (!hasEscape) { |
- bool detected = detectFunctionTypeToken<SrcCharacterType>(result - tokenStart<SrcCharacterType>()); |
- if (!detected && m_parsingMode == MediaQueryMode) { |
- // ... and(max-width: 480px) ... looks like a function, but in fact it is not, |
- // so run more detection code in the MediaQueryMode. |
- detectMediaQueryToken<SrcCharacterType>(result - tokenStart<SrcCharacterType>()); |
- shouldSkipParenthesis = false; |
- } |
- } |
- |
- if (LIKELY(shouldSkipParenthesis)) { |
- ++currentCharacter<SrcCharacterType>(); |
- ++result; |
- ++yylval->string.m_length; |
- } |
+ if (!hasEscape) |
+ detectFunctionTypeToken<SrcCharacterType>(result - tokenStart<SrcCharacterType>()); |
+ ++currentCharacter<SrcCharacterType>(); |
+ ++result; |
+ ++yylval->string.m_length; |
if (token() == URI) { |
m_token = FUNCTION; |