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

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

Issue 14203017: [CSSMQ] Allow integer values for monochrome media feature. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Rebased patch Created 7 years, 7 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 | « LayoutTests/fast/media/media-feature-monochrome-expected.html ('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 /* 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 71 matching lines...) Expand 10 before | Expand all | Expand 10 after
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::maxColorMediaFeature 87 || mediaFeature == MediaFeatureNames::maxColorMediaFeature
88 || mediaFeature == MediaFeatureNames::minColorMediaFeature 88 || mediaFeature == MediaFeatureNames::minColorMediaFeature
89 || mediaFeature == MediaFeatureNames::colorIndexMediaFeature 89 || mediaFeature == MediaFeatureNames::colorIndexMediaFeature
90 || mediaFeature == MediaFeatureNames::maxColorIndexMediaFeature 90 || mediaFeature == MediaFeatureNames::maxColorIndexMediaFeature
91 || mediaFeature == MediaFeatureNames::minColorIndexMediaFeature 91 || mediaFeature == MediaFeatureNames::minColorIndexMediaFeature
92 || mediaFeature == MediaFeatureNames::monochromeMediaFeature
92 || mediaFeature == MediaFeatureNames::minMonochromeMediaFeature 93 || mediaFeature == MediaFeatureNames::minMonochromeMediaFeature
93 || mediaFeature == MediaFeatureNames::maxMonochromeMediaFeature; 94 || mediaFeature == MediaFeatureNames::maxMonochromeMediaFeature;
94 } 95 }
95 96
96 static inline bool featureWithPositiveNumber(const AtomicString& mediaFeature, c onst CSSParserValue* value) 97 static inline bool featureWithPositiveNumber(const AtomicString& mediaFeature, c onst CSSParserValue* value)
97 { 98 {
98 if (value->unit != CSSPrimitiveValue::CSS_NUMBER || value->fValue < 0) 99 if (value->unit != CSSPrimitiveValue::CSS_NUMBER || value->fValue < 0)
99 return false; 100 return false;
100 101
101 return mediaFeature == MediaFeatureNames::transform2dMediaFeature 102 return mediaFeature == MediaFeatureNames::transform2dMediaFeature
(...skipping 160 matching lines...) Expand 10 before | Expand all | Expand 10 after
262 263
263 void MediaQueryExp::reportMemoryUsage(MemoryObjectInfo* memoryObjectInfo) const 264 void MediaQueryExp::reportMemoryUsage(MemoryObjectInfo* memoryObjectInfo) const
264 { 265 {
265 MemoryClassInfo info(memoryObjectInfo, this, WebCoreMemoryTypes::CSS); 266 MemoryClassInfo info(memoryObjectInfo, this, WebCoreMemoryTypes::CSS);
266 info.addMember(m_mediaFeature, "mediaFeature"); 267 info.addMember(m_mediaFeature, "mediaFeature");
267 info.addMember(m_serializationCache, "serializationCache"); 268 info.addMember(m_serializationCache, "serializationCache");
268 info.addMember(m_value, "value"); 269 info.addMember(m_value, "value");
269 } 270 }
270 271
271 } // namespace 272 } // namespace
OLDNEW
« no previous file with comments | « LayoutTests/fast/media/media-feature-monochrome-expected.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698