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

Side by Side Diff: Source/core/css/MediaList.cpp

Issue 22572005: Remove all uses of the ASCIILiteral class. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: rm it from wtf Created 7 years, 4 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 | Annotate | Revision Log
« no previous file with comments | « Source/core/css/CSSPropertySourceData.cpp ('k') | Source/core/css/StyleSheetContents.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * (C) 1999-2003 Lars Knoll (knoll@kde.org) 2 * (C) 1999-2003 Lars Knoll (knoll@kde.org)
3 * Copyright (C) 2004, 2006, 2010, 2012 Apple Inc. All rights reserved. 3 * Copyright (C) 2004, 2006, 2010, 2012 Apple Inc. All rights reserved.
4 * 4 *
5 * This library is free software; you can redistribute it and/or 5 * This library is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU Library General Public 6 * modify it under the terms of the GNU Library General Public
7 * License as published by the Free Software Foundation; either 7 * License as published by the Free Software Foundation; either
8 * version 2 of the License, or (at your option) any later version. 8 * version 2 of the License, or (at your option) any later version.
9 * 9 *
10 * This library is distributed in the hope that it will be useful, 10 * This library is distributed in the hope that it will be useful,
(...skipping 216 matching lines...) Expand 10 before | Expand all | Expand 10 after
227 { 227 {
228 ASSERT(mediaQueries); 228 ASSERT(mediaQueries);
229 m_mediaQueries = mediaQueries; 229 m_mediaQueries = mediaQueries;
230 } 230 }
231 231
232 static void addResolutionWarningMessageToConsole(Document* document, const Strin g& serializedExpression, const CSSPrimitiveValue* value) 232 static void addResolutionWarningMessageToConsole(Document* document, const Strin g& serializedExpression, const CSSPrimitiveValue* value)
233 { 233 {
234 ASSERT(document); 234 ASSERT(document);
235 ASSERT(value); 235 ASSERT(value);
236 236
237 DEFINE_STATIC_LOCAL(String, mediaQueryMessage, (ASCIILiteral("Consider using 'dppx' units instead of '%replacementUnits%', as in CSS '%replacementUnits%' me ans dots-per-CSS-%lengthUnit%, not dots-per-physical-%lengthUnit%, so does not c orrespond to the actual '%replacementUnits%' of a screen. In media query express ion: "))); 237 DEFINE_STATIC_LOCAL(String, mediaQueryMessage, ("Consider using 'dppx' units instead of '%replacementUnits%', as in CSS '%replacementUnits%' means dots-per- CSS-%lengthUnit%, not dots-per-physical-%lengthUnit%, so does not correspond to the actual '%replacementUnits%' of a screen. In media query expression: "));
238 DEFINE_STATIC_LOCAL(String, mediaValueDPI, (ASCIILiteral("dpi"))); 238 DEFINE_STATIC_LOCAL(String, mediaValueDPI, ("dpi"));
239 DEFINE_STATIC_LOCAL(String, mediaValueDPCM, (ASCIILiteral("dpcm"))); 239 DEFINE_STATIC_LOCAL(String, mediaValueDPCM, ("dpcm"));
240 DEFINE_STATIC_LOCAL(String, lengthUnitInch, (ASCIILiteral("inch"))); 240 DEFINE_STATIC_LOCAL(String, lengthUnitInch, ("inch"));
241 DEFINE_STATIC_LOCAL(String, lengthUnitCentimeter, (ASCIILiteral("centimeter" ))); 241 DEFINE_STATIC_LOCAL(String, lengthUnitCentimeter, ("centimeter"));
242 242
243 String message; 243 String message;
244 if (value->isDotsPerInch()) 244 if (value->isDotsPerInch())
245 message = String(mediaQueryMessage).replace("%replacementUnits%", mediaV alueDPI).replace("%lengthUnit%", lengthUnitInch); 245 message = String(mediaQueryMessage).replace("%replacementUnits%", mediaV alueDPI).replace("%lengthUnit%", lengthUnitInch);
246 else if (value->isDotsPerCentimeter()) 246 else if (value->isDotsPerCentimeter())
247 message = String(mediaQueryMessage).replace("%replacementUnits%", mediaV alueDPCM).replace("%lengthUnit%", lengthUnitCentimeter); 247 message = String(mediaQueryMessage).replace("%replacementUnits%", mediaV alueDPCM).replace("%lengthUnit%", lengthUnitCentimeter);
248 else 248 else
249 ASSERT_NOT_REACHED(); 249 ASSERT_NOT_REACHED();
250 250
251 message.append(serializedExpression); 251 message.append(serializedExpression);
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
285 CSSPrimitiveValue* primitiveValue = toCSSPrimitiveValue(cssV alue); 285 CSSPrimitiveValue* primitiveValue = toCSSPrimitiveValue(cssV alue);
286 if (primitiveValue->isDotsPerInch() || primitiveValue->isDot sPerCentimeter()) 286 if (primitiveValue->isDotsPerInch() || primitiveValue->isDot sPerCentimeter())
287 addResolutionWarningMessageToConsole(document, mediaQuer ySet->mediaText(), primitiveValue); 287 addResolutionWarningMessageToConsole(document, mediaQuer ySet->mediaText(), primitiveValue);
288 } 288 }
289 } 289 }
290 } 290 }
291 } 291 }
292 } 292 }
293 293
294 } 294 }
OLDNEW
« no previous file with comments | « Source/core/css/CSSPropertySourceData.cpp ('k') | Source/core/css/StyleSheetContents.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698