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 CSSParserToken_h | 5 #ifndef CSSParserToken_h |
6 #define CSSParserToken_h | 6 #define CSSParserToken_h |
7 | 7 |
8 #include "core/CoreExport.h" | 8 #include "core/CoreExport.h" |
9 #include "core/css/CSSPrimitiveValue.h" | 9 #include "core/css/CSSPrimitiveValue.h" |
10 #include "core/css/parser/CSSParserString.h" | 10 #include "core/css/parser/CSSParserString.h" |
| 11 #include "wtf/Allocator.h" |
11 | 12 |
12 namespace blink { | 13 namespace blink { |
13 | 14 |
14 enum CSSParserTokenType { | 15 enum CSSParserTokenType { |
15 IdentToken = 0, | 16 IdentToken = 0, |
16 FunctionToken, | 17 FunctionToken, |
17 AtKeywordToken, | 18 AtKeywordToken, |
18 HashToken, | 19 HashToken, |
19 UrlToken, | 20 UrlToken, |
20 BadUrlToken, | 21 BadUrlToken, |
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
57 IntegerValueType, | 58 IntegerValueType, |
58 NumberValueType, | 59 NumberValueType, |
59 }; | 60 }; |
60 | 61 |
61 enum HashTokenType { | 62 enum HashTokenType { |
62 HashTokenId, | 63 HashTokenId, |
63 HashTokenUnrestricted, | 64 HashTokenUnrestricted, |
64 }; | 65 }; |
65 | 66 |
66 class CORE_EXPORT CSSParserToken { | 67 class CORE_EXPORT CSSParserToken { |
| 68 WTF_MAKE_FAST_ALLOCATED(CSSParserToken); |
67 public: | 69 public: |
68 enum BlockType { | 70 enum BlockType { |
69 NotBlock, | 71 NotBlock, |
70 BlockStart, | 72 BlockStart, |
71 BlockEnd, | 73 BlockEnd, |
72 }; | 74 }; |
73 | 75 |
74 CSSParserToken(CSSParserTokenType, BlockType = NotBlock); | 76 CSSParserToken(CSSParserTokenType, BlockType = NotBlock); |
75 CSSParserToken(CSSParserTokenType, CSSParserString, BlockType = NotBlock); | 77 CSSParserToken(CSSParserTokenType, CSSParserString, BlockType = NotBlock); |
76 | 78 |
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
138 UChar32 end; | 140 UChar32 end; |
139 } m_unicodeRange; | 141 } m_unicodeRange; |
140 }; | 142 }; |
141 }; | 143 }; |
142 | 144 |
143 } // namespace blink | 145 } // namespace blink |
144 | 146 |
145 namespace WTF { | 147 namespace WTF { |
146 template <> | 148 template <> |
147 struct IsTriviallyMoveAssignable<blink::CSSParserToken> { | 149 struct IsTriviallyMoveAssignable<blink::CSSParserToken> { |
| 150 STATIC_ONLY(IsTriviallyMoveAssignable); |
148 static const bool value = true; | 151 static const bool value = true; |
149 }; | 152 }; |
150 } | 153 } |
151 | 154 |
152 #endif // CSSSParserToken_h | 155 #endif // CSSSParserToken_h |
OLD | NEW |