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 #include "config.h" | 5 #include "config.h" |
6 #include "core/css/parser/CSSParserToken.h" | 6 #include "core/css/parser/CSSParserToken.h" |
7 | 7 |
8 #include "core/css/CSSMarkup.h" | 8 #include "core/css/CSSMarkup.h" |
9 #include "core/css/parser/CSSPropertyParser.h" | 9 #include "core/css/parser/CSSPropertyParser.h" |
10 #include "wtf/HashMap.h" | 10 #include "wtf/HashMap.h" |
11 #include "wtf/text/StringBuilder.h" | 11 #include "wtf/text/StringBuilder.h" |
12 #include <limits.h> | 12 #include <limits.h> |
13 | 13 |
14 namespace blink { | 14 namespace blink { |
15 | 15 |
| 16 struct SameSizeAsCSSParserToken { |
| 17 void* fields[3]; |
| 18 }; |
| 19 static_assert(sizeof(CSSParserToken) == sizeof(SameSizeAsCSSParserToken), "CSSPa
rserToken should stay small"); |
| 20 |
16 CSSParserToken::CSSParserToken(CSSParserTokenType type, BlockType blockType) | 21 CSSParserToken::CSSParserToken(CSSParserTokenType type, BlockType blockType) |
17 : m_type(type) | 22 : m_type(type) |
18 , m_blockType(blockType) | 23 , m_blockType(blockType) |
19 { | 24 { |
20 } | 25 } |
21 | 26 |
22 // Just a helper used for Delimiter tokens. | 27 // Just a helper used for Delimiter tokens. |
23 CSSParserToken::CSSParserToken(CSSParserTokenType type, UChar c) | 28 CSSParserToken::CSSParserToken(CSSParserTokenType type, UChar c) |
24 : m_type(type) | 29 : m_type(type) |
25 , m_blockType(NotBlock) | 30 , m_blockType(NotBlock) |
(...skipping 167 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
193 return builder.append('}'); | 198 return builder.append('}'); |
194 | 199 |
195 case EOFToken: | 200 case EOFToken: |
196 case CommentToken: | 201 case CommentToken: |
197 ASSERT_NOT_REACHED(); | 202 ASSERT_NOT_REACHED(); |
198 return; | 203 return; |
199 } | 204 } |
200 } | 205 } |
201 | 206 |
202 } // namespace blink | 207 } // namespace blink |
OLD | NEW |