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

Side by Side Diff: Source/core/css/parser/MediaQueryTokenizer.h

Issue 217423005: Get Media Query parser to handle parens, brackets and braces blocks correctly (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Fixed algorithm and more tests Created 6 years, 8 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
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef MediaQueryTokenizer_h 5 #ifndef MediaQueryTokenizer_h
6 #define MediaQueryTokenizer_h 6 #define MediaQueryTokenizer_h
7 7
8 #include "core/css/parser/MediaQueryToken.h" 8 #include "core/css/parser/MediaQueryToken.h"
9 #include "core/html/parser/InputStreamPreprocessor.h" 9 #include "core/html/parser/InputStreamPreprocessor.h"
10 #include "wtf/text/WTFString.h" 10 #include "wtf/text/WTFString.h"
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
44 bool nextCharsAreNumber(); 44 bool nextCharsAreNumber();
45 bool nextCharsAreIdentifier(); 45 bool nextCharsAreIdentifier();
46 46
47 typedef MediaQueryToken (MediaQueryTokenizer::*CodePoint)(UChar); 47 typedef MediaQueryToken (MediaQueryTokenizer::*CodePoint)(UChar);
48 48
49 static const CodePoint codePoints[]; 49 static const CodePoint codePoints[];
50 50
51 MediaQueryToken whiteSpace(UChar); 51 MediaQueryToken whiteSpace(UChar);
52 MediaQueryToken leftParenthesis(UChar); 52 MediaQueryToken leftParenthesis(UChar);
53 MediaQueryToken rightParenthesis(UChar); 53 MediaQueryToken rightParenthesis(UChar);
54 MediaQueryToken leftBracket(UChar);
55 MediaQueryToken rightBracket(UChar);
56 MediaQueryToken leftBrace(UChar);
57 MediaQueryToken rightBrace(UChar);
54 MediaQueryToken plusOrFullStop(UChar); 58 MediaQueryToken plusOrFullStop(UChar);
55 MediaQueryToken comma(UChar); 59 MediaQueryToken comma(UChar);
56 MediaQueryToken hyphenMinus(UChar); 60 MediaQueryToken hyphenMinus(UChar);
57 MediaQueryToken solidus(UChar); 61 MediaQueryToken solidus(UChar);
58 MediaQueryToken colon(UChar); 62 MediaQueryToken colon(UChar);
59 MediaQueryToken semiColon(UChar); 63 MediaQueryToken semiColon(UChar);
60 MediaQueryToken reverseSolidus(UChar); 64 MediaQueryToken reverseSolidus(UChar);
61 MediaQueryToken asciiDigit(UChar); 65 MediaQueryToken asciiDigit(UChar);
62 MediaQueryToken nameStart(UChar); 66 MediaQueryToken nameStart(UChar);
63 MediaQueryToken endOfFile(UChar); 67 MediaQueryToken endOfFile(UChar);
64 68
65 MediaQueryInputStream& m_input; 69 MediaQueryInputStream& m_input;
66 }; 70 };
67 71
68 72
69 73
70 } // namespace WebCore 74 } // namespace WebCore
71 75
72 #endif // MediaQueryTokenizer_h 76 #endif // MediaQueryTokenizer_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698