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

Side by Side Diff: sky/engine/core/css/MediaQueryExp.cpp

Issue 689853003: Remove CSS Grid Layout and grid media queries. (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 6 years, 1 month 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 137 matching lines...) Expand 10 before | Expand all | Expand 10 after
148 || mediaFeature == devicePixelRatioMediaFeature 148 || mediaFeature == devicePixelRatioMediaFeature
149 || mediaFeature == maxDevicePixelRatioMediaFeature 149 || mediaFeature == maxDevicePixelRatioMediaFeature
150 || mediaFeature == minDevicePixelRatioMediaFeature; 150 || mediaFeature == minDevicePixelRatioMediaFeature;
151 } 151 }
152 152
153 static inline bool featureWithZeroOrOne(const String& mediaFeature, const CSSPar serValue* value) 153 static inline bool featureWithZeroOrOne(const String& mediaFeature, const CSSPar serValue* value)
154 { 154 {
155 if (!value->isInt || !(value->fValue == 1 || !value->fValue)) 155 if (!value->isInt || !(value->fValue == 1 || !value->fValue))
156 return false; 156 return false;
157 157
158 return mediaFeature == gridMediaFeature 158 return mediaFeature == hoverMediaFeature && !RuntimeEnabledFeatures::hoverMe diaQueryKeywordsEnabled();
159 || (mediaFeature == hoverMediaFeature && !RuntimeEnabledFeatures::hoverM ediaQueryKeywordsEnabled());
160 } 159 }
161 160
162 static inline bool featureWithAspectRatio(const String& mediaFeature) 161 static inline bool featureWithAspectRatio(const String& mediaFeature)
163 { 162 {
164 return mediaFeature == aspectRatioMediaFeature 163 return mediaFeature == aspectRatioMediaFeature
165 || mediaFeature == deviceAspectRatioMediaFeature 164 || mediaFeature == deviceAspectRatioMediaFeature
166 || mediaFeature == minAspectRatioMediaFeature 165 || mediaFeature == minAspectRatioMediaFeature
167 || mediaFeature == maxAspectRatioMediaFeature 166 || mediaFeature == maxAspectRatioMediaFeature
168 || mediaFeature == minDeviceAspectRatioMediaFeature 167 || mediaFeature == minDeviceAspectRatioMediaFeature
169 || mediaFeature == maxDeviceAspectRatioMediaFeature; 168 || mediaFeature == maxDeviceAspectRatioMediaFeature;
170 } 169 }
171 170
172 static inline bool featureWithoutValue(const String& mediaFeature) 171 static inline bool featureWithoutValue(const String& mediaFeature)
173 { 172 {
174 // Media features that are prefixed by min/max cannot be used without a valu e. 173 // Media features that are prefixed by min/max cannot be used without a valu e.
175 return mediaFeature == monochromeMediaFeature 174 return mediaFeature == monochromeMediaFeature
176 || mediaFeature == colorMediaFeature 175 || mediaFeature == colorMediaFeature
177 || mediaFeature == colorIndexMediaFeature 176 || mediaFeature == colorIndexMediaFeature
178 || mediaFeature == gridMediaFeature
179 || mediaFeature == heightMediaFeature 177 || mediaFeature == heightMediaFeature
180 || mediaFeature == widthMediaFeature 178 || mediaFeature == widthMediaFeature
181 || mediaFeature == deviceHeightMediaFeature 179 || mediaFeature == deviceHeightMediaFeature
182 || mediaFeature == deviceWidthMediaFeature 180 || mediaFeature == deviceWidthMediaFeature
183 || mediaFeature == orientationMediaFeature 181 || mediaFeature == orientationMediaFeature
184 || mediaFeature == aspectRatioMediaFeature 182 || mediaFeature == aspectRatioMediaFeature
185 || mediaFeature == deviceAspectRatioMediaFeature 183 || mediaFeature == deviceAspectRatioMediaFeature
186 || mediaFeature == hoverMediaFeature 184 || mediaFeature == hoverMediaFeature
187 || mediaFeature == anyHoverMediaFeature 185 || mediaFeature == anyHoverMediaFeature
188 || mediaFeature == transform3dMediaFeature 186 || mediaFeature == transform3dMediaFeature
(...skipping 151 matching lines...) Expand 10 before | Expand all | Expand 10 after
340 output.append('/'); 338 output.append('/');
341 output.append(printNumber(denominator)); 339 output.append(printNumber(denominator));
342 } else if (isID) { 340 } else if (isID) {
343 output.append(getValueName(id)); 341 output.append(getValueName(id));
344 } 342 }
345 343
346 return output.toString(); 344 return output.toString();
347 } 345 }
348 346
349 } // namespace 347 } // namespace
OLDNEW
« no previous file with comments | « sky/engine/core/css/MediaQueryEvaluatorTest.cpp ('k') | sky/engine/core/css/MediaQuerySetTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698