| OLD | NEW |
| 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 286 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 297 } | 297 } |
| 298 | 298 |
| 299 void MediaList::reportMemoryUsage(MemoryObjectInfo* memoryObjectInfo) const | 299 void MediaList::reportMemoryUsage(MemoryObjectInfo* memoryObjectInfo) const |
| 300 { | 300 { |
| 301 MemoryClassInfo info(memoryObjectInfo, this, WebCoreMemoryTypes::CSS); | 301 MemoryClassInfo info(memoryObjectInfo, this, WebCoreMemoryTypes::CSS); |
| 302 info.addMember(m_mediaQueries, "mediaQueries"); | 302 info.addMember(m_mediaQueries, "mediaQueries"); |
| 303 info.addMember(m_parentStyleSheet, "parentStyleSheet"); | 303 info.addMember(m_parentStyleSheet, "parentStyleSheet"); |
| 304 info.addMember(m_parentRule, "parentRule"); | 304 info.addMember(m_parentRule, "parentRule"); |
| 305 } | 305 } |
| 306 | 306 |
| 307 #if ENABLE(RESOLUTION_MEDIA_QUERY) | |
| 308 static void addResolutionWarningMessageToConsole(Document* document, const Strin
g& serializedExpression, const CSSPrimitiveValue* value) | 307 static void addResolutionWarningMessageToConsole(Document* document, const Strin
g& serializedExpression, const CSSPrimitiveValue* value) |
| 309 { | 308 { |
| 310 ASSERT(document); | 309 ASSERT(document); |
| 311 ASSERT(value); | 310 ASSERT(value); |
| 312 | 311 |
| 313 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: "))); | 312 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: "))); |
| 314 DEFINE_STATIC_LOCAL(String, mediaValueDPI, (ASCIILiteral("dpi"))); | 313 DEFINE_STATIC_LOCAL(String, mediaValueDPI, (ASCIILiteral("dpi"))); |
| 315 DEFINE_STATIC_LOCAL(String, mediaValueDPCM, (ASCIILiteral("dpcm"))); | 314 DEFINE_STATIC_LOCAL(String, mediaValueDPCM, (ASCIILiteral("dpcm"))); |
| 316 DEFINE_STATIC_LOCAL(String, lengthUnitInch, (ASCIILiteral("inch"))); | 315 DEFINE_STATIC_LOCAL(String, lengthUnitInch, (ASCIILiteral("inch"))); |
| 317 DEFINE_STATIC_LOCAL(String, lengthUnitCentimeter, (ASCIILiteral("centimeter"
))); | 316 DEFINE_STATIC_LOCAL(String, lengthUnitCentimeter, (ASCIILiteral("centimeter"
))); |
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 352 if (cssValue && cssValue->isPrimitiveValue()) { | 351 if (cssValue && cssValue->isPrimitiveValue()) { |
| 353 CSSPrimitiveValue* primitiveValue = static_cast<CSSPrimi
tiveValue*>(cssValue); | 352 CSSPrimitiveValue* primitiveValue = static_cast<CSSPrimi
tiveValue*>(cssValue); |
| 354 if (primitiveValue->isDotsPerInch() || primitiveValue->i
sDotsPerCentimeter()) | 353 if (primitiveValue->isDotsPerInch() || primitiveValue->i
sDotsPerCentimeter()) |
| 355 addResolutionWarningMessageToConsole(document, media
QuerySet->mediaText(), primitiveValue); | 354 addResolutionWarningMessageToConsole(document, media
QuerySet->mediaText(), primitiveValue); |
| 356 } | 355 } |
| 357 } | 356 } |
| 358 } | 357 } |
| 359 } | 358 } |
| 360 } | 359 } |
| 361 } | 360 } |
| 362 #endif | |
| 363 | 361 |
| 364 } | 362 } |
| OLD | NEW |