Chromium Code Reviews| Index: Source/core/css/CSSParser.cpp |
| diff --git a/Source/core/css/CSSParser.cpp b/Source/core/css/CSSParser.cpp |
| index c7e2639e9aa200313e1fb8ec56027c89a84a3e36..3f2063454a9451dd074f1607ed2952e762141005 100644 |
| --- a/Source/core/css/CSSParser.cpp |
| +++ b/Source/core/css/CSSParser.cpp |
| @@ -1363,7 +1363,7 @@ 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) |
| + // instead insert one " " (which is caught by maybe_space in CSSGrammar.y) |
| setupParser("@-webkit-mediaquery ", string, "} "); |
| cssyyparse(this); |
| @@ -10309,22 +10309,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) |
|
SeRya
2013/06/01 06:28:03
It seems MediaQueryMode isn't used any longer and
rune
2013/06/03 09:08:11
It's still used for detectMediaQueryToken below.
|
| + detectFunctionTypeToken<SrcCharacterType>(result - tokenStart<SrcCharacterType>()); |
| + ++currentCharacter<SrcCharacterType>(); |
| + ++result; |
| + ++yylval->string.m_length; |
| if (token() == URI) { |
| m_token = FUNCTION; |
| @@ -10788,6 +10777,11 @@ MediaQuery* CSSParser::createFloatingMediaQuery(PassOwnPtr<Vector<OwnPtr<MediaQu |
| return createFloatingMediaQuery(MediaQuery::None, "all", expressions); |
| } |
| +MediaQuery* CSSParser::createFloatingNotAllQuery() |
| +{ |
| + return createFloatingMediaQuery(MediaQuery::Not, "all", sinkFloatingMediaQueryExpList(createFloatingMediaQueryExpList())); |
| +} |
| + |
| PassOwnPtr<MediaQuery> CSSParser::sinkFloatingMediaQuery(MediaQuery* query) |
| { |
| ASSERT_UNUSED(query, query == m_floatingMediaQuery); |