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

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

Issue 1304623002: Make blink classes and structures in core/css fast-allocated (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Patch for landing (Fixed windows compile error) Created 5 years, 4 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 CSSTokenizer_h 5 #ifndef CSSTokenizer_h
6 #define CSSTokenizer_h 6 #define CSSTokenizer_h
7 7
8 #include "core/CoreExport.h" 8 #include "core/CoreExport.h"
9 #include "core/css/parser/CSSParserToken.h" 9 #include "core/css/parser/CSSParserToken.h"
10 #include "core/html/parser/InputStreamPreprocessor.h" 10 #include "core/html/parser/InputStreamPreprocessor.h"
11 #include "wtf/Allocator.h"
11 #include "wtf/text/WTFString.h" 12 #include "wtf/text/WTFString.h"
12 13
13 #include <climits> 14 #include <climits>
14 15
15 namespace blink { 16 namespace blink {
16 17
17 class CSSTokenizerInputStream; 18 class CSSTokenizerInputStream;
18 class CSSParserObserverWrapper; 19 class CSSParserObserverWrapper;
19 struct CSSParserString; 20 struct CSSParserString;
20 class CSSParserTokenRange; 21 class CSSParserTokenRange;
21 22
22 class CORE_EXPORT CSSTokenizer { 23 class CORE_EXPORT CSSTokenizer {
23 WTF_MAKE_NONCOPYABLE(CSSTokenizer); 24 WTF_MAKE_NONCOPYABLE(CSSTokenizer);
24 WTF_MAKE_FAST_ALLOCATED(CSSTokenizer); 25 WTF_MAKE_FAST_ALLOCATED(CSSTokenizer);
25 public: 26 public:
26 class CORE_EXPORT Scope { 27 class CORE_EXPORT Scope {
28 DISALLOW_ALLOCATION();
27 public: 29 public:
28 Scope(const String&); 30 Scope(const String&);
29 Scope(const String&, CSSParserObserverWrapper&); // For the inspector 31 Scope(const String&, CSSParserObserverWrapper&); // For the inspector
30 32
31 CSSParserTokenRange tokenRange(); 33 CSSParserTokenRange tokenRange();
32 unsigned tokenCount(); 34 unsigned tokenCount();
33 35
34 private: 36 private:
35 void storeString(const String& string) { m_stringPool.append(string); } 37 void storeString(const String& string) { m_stringPool.append(string); }
36 Vector<CSSParserToken> m_tokens; 38 Vector<CSSParserToken> m_tokens;
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
112 114
113 CSSTokenizerInputStream& m_input; 115 CSSTokenizerInputStream& m_input;
114 Scope& m_scope; 116 Scope& m_scope;
115 }; 117 };
116 118
117 119
118 120
119 } // namespace blink 121 } // namespace blink
120 122
121 #endif // CSSTokenizer_h 123 #endif // CSSTokenizer_h
OLDNEW
« no previous file with comments | « Source/core/css/parser/CSSParserValues.h ('k') | Source/core/css/parser/MediaQueryBlockWatcher.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698