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

Unified Diff: Source/core/css/CSSParser.cpp

Issue 15878013: Tokenize "and(" as a FUNCTION in media queries. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « LayoutTests/fast/media/media-query-list-syntax.html ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/css/CSSParser.cpp
diff --git a/Source/core/css/CSSParser.cpp b/Source/core/css/CSSParser.cpp
index 44e7d48d2ad3c74fd6c6131aa4149bec4aa311e4..d7f5d3c2644e66a2655f6a232611afa68920e45e 100644
--- a/Source/core/css/CSSParser.cpp
+++ b/Source/core/css/CSSParser.cpp
@@ -10315,23 +10315,13 @@ 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>());
- if (m_token == MEDIA_AND)
- shouldSkipParenthesis = false;
- }
- }
+ if (!hasEscape)
+ detectFunctionTypeToken<SrcCharacterType>(result - tokenStart<SrcCharacterType>());
- if (LIKELY(shouldSkipParenthesis)) {
- ++currentCharacter<SrcCharacterType>();
- ++result;
- ++yylval->string.m_length;
- }
+ // Skip parenthesis
+ ++currentCharacter<SrcCharacterType>();
+ ++result;
+ ++yylval->string.m_length;
if (token() == URI) {
m_token = FUNCTION;
« no previous file with comments | « LayoutTests/fast/media/media-query-list-syntax.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698