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

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

Issue 225293006: Moved MQ parsing block tracking to tokenizer (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Removed unused member var 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 26 matching lines...) Expand all
37 void consumeUntilNonWhitespace(); 37 void consumeUntilNonWhitespace();
38 bool consumeUntilCommentEndFound(); 38 bool consumeUntilCommentEndFound();
39 39
40 bool consumeIfNext(UChar); 40 bool consumeIfNext(UChar);
41 String consumeName(); 41 String consumeName();
42 UChar consumeEscape(); 42 UChar consumeEscape();
43 43
44 bool nextTwoCharsAreValidEscape(unsigned offset); 44 bool nextTwoCharsAreValidEscape(unsigned offset);
45 bool nextCharsAreNumber(); 45 bool nextCharsAreNumber();
46 bool nextCharsAreIdentifier(); 46 bool nextCharsAreIdentifier();
47 MediaQueryToken blockStart(MediaQueryTokenType);
48 MediaQueryToken blockStart(MediaQueryTokenType blockType, MediaQueryTokenTyp e, String);
49 MediaQueryToken blockEnd(MediaQueryTokenType, MediaQueryTokenType startType) ;
47 50
48 typedef MediaQueryToken (MediaQueryTokenizer::*CodePoint)(UChar); 51 typedef MediaQueryToken (MediaQueryTokenizer::*CodePoint)(UChar);
49 52
50 static const CodePoint codePoints[]; 53 static const CodePoint codePoints[];
54 Vector<MediaQueryTokenType> m_blockStack;
51 55
52 MediaQueryToken whiteSpace(UChar); 56 MediaQueryToken whiteSpace(UChar);
53 MediaQueryToken leftParenthesis(UChar); 57 MediaQueryToken leftParenthesis(UChar);
54 MediaQueryToken rightParenthesis(UChar); 58 MediaQueryToken rightParenthesis(UChar);
55 MediaQueryToken leftBracket(UChar); 59 MediaQueryToken leftBracket(UChar);
56 MediaQueryToken rightBracket(UChar); 60 MediaQueryToken rightBracket(UChar);
57 MediaQueryToken leftBrace(UChar); 61 MediaQueryToken leftBrace(UChar);
58 MediaQueryToken rightBrace(UChar); 62 MediaQueryToken rightBrace(UChar);
59 MediaQueryToken plusOrFullStop(UChar); 63 MediaQueryToken plusOrFullStop(UChar);
60 MediaQueryToken comma(UChar); 64 MediaQueryToken comma(UChar);
61 MediaQueryToken hyphenMinus(UChar); 65 MediaQueryToken hyphenMinus(UChar);
62 MediaQueryToken solidus(UChar); 66 MediaQueryToken solidus(UChar);
63 MediaQueryToken colon(UChar); 67 MediaQueryToken colon(UChar);
64 MediaQueryToken semiColon(UChar); 68 MediaQueryToken semiColon(UChar);
65 MediaQueryToken reverseSolidus(UChar); 69 MediaQueryToken reverseSolidus(UChar);
66 MediaQueryToken asciiDigit(UChar); 70 MediaQueryToken asciiDigit(UChar);
67 MediaQueryToken nameStart(UChar); 71 MediaQueryToken nameStart(UChar);
68 MediaQueryToken stringStart(UChar); 72 MediaQueryToken stringStart(UChar);
69 MediaQueryToken endOfFile(UChar); 73 MediaQueryToken endOfFile(UChar);
70 74
71 MediaQueryInputStream& m_input; 75 MediaQueryInputStream& m_input;
72 }; 76 };
73 77
74 78
75 79
76 } // namespace WebCore 80 } // namespace WebCore
77 81
78 #endif // MediaQueryTokenizer_h 82 #endif // MediaQueryTokenizer_h
OLDNEW
« no previous file with comments | « Source/core/css/parser/MediaQueryToken.cpp ('k') | Source/core/css/parser/MediaQueryTokenizer.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698