OLD | NEW |
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 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
79 } | 79 } |
80 | 80 |
81 static inline bool featureWithPositiveInteger(const AtomicString& mediaFeature,
const CSSParserValue* value) | 81 static inline bool featureWithPositiveInteger(const AtomicString& mediaFeature,
const CSSParserValue* value) |
82 { | 82 { |
83 if (!value->isInt || value->fValue < 0) | 83 if (!value->isInt || value->fValue < 0) |
84 return false; | 84 return false; |
85 | 85 |
86 return mediaFeature == MediaFeatureNames::colorMediaFeature | 86 return mediaFeature == MediaFeatureNames::colorMediaFeature |
87 || mediaFeature == MediaFeatureNames::max_colorMediaFeature | 87 || mediaFeature == MediaFeatureNames::max_colorMediaFeature |
88 || mediaFeature == MediaFeatureNames::min_colorMediaFeature | 88 || mediaFeature == MediaFeatureNames::min_colorMediaFeature |
| 89 || mediaFeature == MediaFeatureNames::monochromeMediaFeature |
89 || mediaFeature == MediaFeatureNames::min_monochromeMediaFeature | 90 || mediaFeature == MediaFeatureNames::min_monochromeMediaFeature |
90 || mediaFeature == MediaFeatureNames::max_monochromeMediaFeature; | 91 || mediaFeature == MediaFeatureNames::max_monochromeMediaFeature; |
91 } | 92 } |
92 | 93 |
93 static inline bool featureWithPositiveNumber(const AtomicString& mediaFeature, c
onst CSSParserValue* value) | 94 static inline bool featureWithPositiveNumber(const AtomicString& mediaFeature, c
onst CSSParserValue* value) |
94 { | 95 { |
95 if (value->unit != CSSPrimitiveValue::CSS_NUMBER || value->fValue < 0) | 96 if (value->unit != CSSPrimitiveValue::CSS_NUMBER || value->fValue < 0) |
96 return false; | 97 return false; |
97 | 98 |
98 return mediaFeature == MediaFeatureNames::transform_2dMediaFeature | 99 return mediaFeature == MediaFeatureNames::transform_2dMediaFeature |
(...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
244 | 245 |
245 void MediaQueryExp::reportMemoryUsage(MemoryObjectInfo* memoryObjectInfo) const | 246 void MediaQueryExp::reportMemoryUsage(MemoryObjectInfo* memoryObjectInfo) const |
246 { | 247 { |
247 MemoryClassInfo info(memoryObjectInfo, this, WebCoreMemoryTypes::CSS); | 248 MemoryClassInfo info(memoryObjectInfo, this, WebCoreMemoryTypes::CSS); |
248 info.addMember(m_mediaFeature, "mediaFeature"); | 249 info.addMember(m_mediaFeature, "mediaFeature"); |
249 info.addMember(m_serializationCache, "serializationCache"); | 250 info.addMember(m_serializationCache, "serializationCache"); |
250 info.addMember(m_value, "value"); | 251 info.addMember(m_value, "value"); |
251 } | 252 } |
252 | 253 |
253 } // namespace | 254 } // namespace |
OLD | NEW |