| OLD | NEW |
| 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" |
| (...skipping 17 matching lines...) Expand all Loading... |
| 28 DISALLOW_NEW(); | 28 DISALLOW_NEW(); |
| 29 public: | 29 public: |
| 30 Scope(const String&); | 30 Scope(const String&); |
| 31 Scope(const String&, CSSParserObserverWrapper&); // For the inspector | 31 Scope(const String&, CSSParserObserverWrapper&); // For the inspector |
| 32 | 32 |
| 33 CSSParserTokenRange tokenRange(); | 33 CSSParserTokenRange tokenRange(); |
| 34 unsigned tokenCount(); | 34 unsigned tokenCount(); |
| 35 | 35 |
| 36 private: | 36 private: |
| 37 void storeString(const String& string) { m_stringPool.append(string); } | 37 void storeString(const String& string) { m_stringPool.append(string); } |
| 38 Vector<CSSParserToken> m_tokens; | 38 Vector<CSSParserToken, 32> m_tokens; |
| 39 // We only allocate strings when escapes are used. | 39 // We only allocate strings when escapes are used. |
| 40 Vector<String> m_stringPool; | 40 Vector<String> m_stringPool; |
| 41 String m_string; | 41 String m_string; |
| 42 | 42 |
| 43 friend class CSSTokenizer; | 43 friend class CSSTokenizer; |
| 44 }; | 44 }; |
| 45 | 45 |
| 46 private: | 46 private: |
| 47 CSSTokenizer(CSSTokenizerInputStream&, Scope&); | 47 CSSTokenizer(CSSTokenizerInputStream&, Scope&); |
| 48 | 48 |
| (...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 114 | 114 |
| 115 CSSTokenizerInputStream& m_input; | 115 CSSTokenizerInputStream& m_input; |
| 116 Scope& m_scope; | 116 Scope& m_scope; |
| 117 }; | 117 }; |
| 118 | 118 |
| 119 | 119 |
| 120 | 120 |
| 121 } // namespace blink | 121 } // namespace blink |
| 122 | 122 |
| 123 #endif // CSSTokenizer_h | 123 #endif // CSSTokenizer_h |
| OLD | NEW |