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

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

Issue 340503002: Initialize all CSSParserValue's variables (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Another CSSParserValue uninit var Created 6 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/CSSParserValues.h ('k') | no next file » | 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/MediaQueryParser.h" 6 #include "core/css/parser/MediaQueryParser.h"
7 7
8 #include "core/MediaTypeNames.h" 8 #include "core/MediaTypeNames.h"
9 #include "core/css/parser/CSSPropertyParser.h" 9 #include "core/css/parser/CSSPropertyParser.h"
10 #include "core/css/parser/MediaQueryTokenizer.h" 10 #include "core/css/parser/MediaQueryTokenizer.h"
(...skipping 225 matching lines...) Expand 10 before | Expand all | Expand 10 after
236 236
237 void MediaQueryData::addParserValue(MediaQueryTokenType type, const MediaQueryTo ken& token) 237 void MediaQueryData::addParserValue(MediaQueryTokenType type, const MediaQueryTo ken& token)
238 { 238 {
239 CSSParserValue value; 239 CSSParserValue value;
240 if (type == NumberToken || type == PercentageToken || type == DimensionToken ) { 240 if (type == NumberToken || type == PercentageToken || type == DimensionToken ) {
241 value.setFromNumber(token.numericValue(), token.unitType()); 241 value.setFromNumber(token.numericValue(), token.unitType());
242 value.isInt = (token.numericValueType() == IntegerValueType); 242 value.isInt = (token.numericValueType() == IntegerValueType);
243 } else if (type == DelimiterToken) { 243 } else if (type == DelimiterToken) {
244 value.unit = CSSParserValue::Operator; 244 value.unit = CSSParserValue::Operator;
245 value.iValue = token.delimiter(); 245 value.iValue = token.delimiter();
246 value.id = CSSValueInvalid;
247 value.isInt = false;
246 } else { 248 } else {
247 CSSParserFunction* function = new CSSParserFunction; 249 CSSParserFunction* function = new CSSParserFunction;
248 function->name.init(token.value()); 250 function->name.init(token.value());
249 value.setFromFunction(function); 251 value.setFromFunction(function);
250 CSSParserString tokenValue; 252 CSSParserString tokenValue;
251 tokenValue.init(token.value()); 253 tokenValue.init(token.value());
252 value.id = cssValueKeywordID(tokenValue); 254 value.id = cssValueKeywordID(tokenValue);
253 } 255 }
254 m_valueList.addValue(value); 256 m_valueList.addValue(value);
255 } 257 }
256 258
257 void MediaQueryData::setMediaType(const String& mediaType) 259 void MediaQueryData::setMediaType(const String& mediaType)
258 { 260 {
259 m_mediaType = mediaType; 261 m_mediaType = mediaType;
260 m_mediaTypeSet = true; 262 m_mediaTypeSet = true;
261 } 263 }
262 264
263 } // namespace WebCore 265 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/core/css/CSSParserValues.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698