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

Side by Side Diff: third_party/WebKit/Source/core/css/MediaQueryExp.cpp

Issue 2392343005: Reflow comments in core/css (Closed)
Patch Set: Revert clang-format Created 4 years, 2 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 /* 1 /*
2 * CSS Media Query 2 * CSS Media Query
3 * 3 *
4 * Copyright (C) 2006 Kimmo Kinnunen <kimmo.t.kinnunen@nokia.com>. 4 * Copyright (C) 2006 Kimmo Kinnunen <kimmo.t.kinnunen@nokia.com>.
5 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). 5 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
6 * Copyright (C) 2013 Apple Inc. All rights reserved. 6 * Copyright (C) 2013 Apple Inc. All rights reserved.
7 * 7 *
8 * Redistribution and use in source and binary forms, with or without 8 * Redistribution and use in source and binary forms, with or without
9 * modification, are permitted provided that the following conditions 9 * modification, are permitted provided that the following conditions
10 * are met: 10 * are met:
(...skipping 207 matching lines...) Expand 10 before | Expand all | Expand 10 after
218 CSSParserToken token = tokenList.first(); 218 CSSParserToken token = tokenList.first();
219 219
220 if (token.type() == IdentToken) { 220 if (token.type() == IdentToken) {
221 CSSValueID ident = token.id(); 221 CSSValueID ident = token.id();
222 if (!featureWithValidIdent(lowerMediaFeature, ident)) 222 if (!featureWithValidIdent(lowerMediaFeature, ident))
223 return nullptr; 223 return nullptr;
224 expValue.id = ident; 224 expValue.id = ident;
225 expValue.isID = true; 225 expValue.isID = true;
226 } else if (token.type() == NumberToken || token.type() == PercentageToken || 226 } else if (token.type() == NumberToken || token.type() == PercentageToken ||
227 token.type() == DimensionToken) { 227 token.type() == DimensionToken) {
228 // Check for numeric token types since it is only safe for these types to call numericValue. 228 // Check for numeric token types since it is only safe for these types to
229 // call numericValue.
229 if (featureWithValidDensity(lowerMediaFeature, token) || 230 if (featureWithValidDensity(lowerMediaFeature, token) ||
230 featureWithValidPositiveLength(lowerMediaFeature, token)) { 231 featureWithValidPositiveLength(lowerMediaFeature, token)) {
231 // Media features that must have non-negative <density>, ie. dppx, dpi o r dpcm, 232 // Media features that must have non-negative <density>, ie. dppx, dpi
232 // or Media features that must have non-negative <length> or number valu e. 233 // or dpcm, or Media features that must have non-negative <length> or
234 // number value.
233 expValue.value = token.numericValue(); 235 expValue.value = token.numericValue();
234 expValue.unit = token.unitType(); 236 expValue.unit = token.unitType();
235 expValue.isValue = true; 237 expValue.isValue = true;
236 } else if (featureWithPositiveInteger(lowerMediaFeature, token) || 238 } else if (featureWithPositiveInteger(lowerMediaFeature, token) ||
237 featureWithPositiveNumber(lowerMediaFeature, token) || 239 featureWithPositiveNumber(lowerMediaFeature, token) ||
238 featureWithZeroOrOne(lowerMediaFeature, token)) { 240 featureWithZeroOrOne(lowerMediaFeature, token)) {
239 // Media features that must have non-negative integer value, 241 // Media features that must have non-negative integer value,
240 // or media features that must have non-negative number value, 242 // or media features that must have non-negative number value,
241 // or media features that must have (0|1) value. 243 // or media features that must have (0|1) value.
242 expValue.value = token.numericValue(); 244 expValue.value = token.numericValue();
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
310 output.append('/'); 312 output.append('/');
311 output.append(printNumber(denominator)); 313 output.append(printNumber(denominator));
312 } else if (isID) { 314 } else if (isID) {
313 output.append(getValueName(id)); 315 output.append(getValueName(id));
314 } 316 }
315 317
316 return output.toString(); 318 return output.toString();
317 } 319 }
318 320
319 } // namespace blink 321 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/css/MediaQueryEvaluator.cpp ('k') | third_party/WebKit/Source/core/css/MediaQueryList.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698