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

Side by Side Diff: Source/core/css/parser/CSSParserToken.cpp

Issue 1176393005: Remove usage of CSSParserValue in MediaQueryParser (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Add comment Created 5 years, 6 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 #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];
Timothy Loh 2015/06/16 00:05:36 IIRC we're 20B on 32-bit and 24B on 64-bit.
rwlbuis 2015/06/16 02:34:15 Done.
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
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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698