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

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: Address review comments 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
« no previous file with comments | « Source/core/css/MediaQueryExp.cpp ('k') | Source/core/css/parser/MediaQueryParser.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 unsigned flags : 18;
18 bool valueIs8Bit : 1;
19 unsigned length;
20 const void* raw;
21 double dbl;
22 };
23 static_assert(sizeof(CSSParserToken) == sizeof(SameSizeAsCSSParserToken), "CSSPa rserToken should stay small");
Timothy Loh 2015/06/16 06:20:36 Actually, can we do: #if CPU(32BIT) static_assert
24
16 CSSParserToken::CSSParserToken(CSSParserTokenType type, BlockType blockType) 25 CSSParserToken::CSSParserToken(CSSParserTokenType type, BlockType blockType)
17 : m_type(type) 26 : m_type(type)
18 , m_blockType(blockType) 27 , m_blockType(blockType)
19 { 28 {
20 } 29 }
21 30
22 // Just a helper used for Delimiter tokens. 31 // Just a helper used for Delimiter tokens.
23 CSSParserToken::CSSParserToken(CSSParserTokenType type, UChar c) 32 CSSParserToken::CSSParserToken(CSSParserTokenType type, UChar c)
24 : m_type(type) 33 : m_type(type)
25 , m_blockType(NotBlock) 34 , m_blockType(NotBlock)
(...skipping 167 matching lines...) Expand 10 before | Expand all | Expand 10 after
193 return builder.append('}'); 202 return builder.append('}');
194 203
195 case EOFToken: 204 case EOFToken:
196 case CommentToken: 205 case CommentToken:
197 ASSERT_NOT_REACHED(); 206 ASSERT_NOT_REACHED();
198 return; 207 return;
199 } 208 }
200 } 209 }
201 210
202 } // namespace blink 211 } // namespace blink
OLDNEW
« no previous file with comments | « Source/core/css/MediaQueryExp.cpp ('k') | Source/core/css/parser/MediaQueryParser.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698