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

Unified Diff: third_party/WebKit/Source/core/css/MediaQueryExp.cpp

Issue 2652313004: Implement color-gamut media query (Closed)
Patch Set: fix windows build Created 3 years, 11 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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/core/css/MediaQueryExp.cpp
diff --git a/third_party/WebKit/Source/core/css/MediaQueryExp.cpp b/third_party/WebKit/Source/core/css/MediaQueryExp.cpp
index d41baa58fed0724983230ce849f2045e675d1764..ada04787593ec528568be1cd998181f447844d8d 100644
--- a/third_party/WebKit/Source/core/css/MediaQueryExp.cpp
+++ b/third_party/WebKit/Source/core/css/MediaQueryExp.cpp
@@ -65,6 +65,12 @@ static inline bool featureWithValidIdent(const String& mediaFeature,
if (mediaFeature == shapeMediaFeature)
return ident == CSSValueRect || ident == CSSValueRound;
}
+
+ if (mediaFeature == colorGamutMediaFeature) {
+ return ident == CSSValueSRGB || ident == CSSValueP3 ||
+ ident == CSSValueRec2020;
+ }
+
return false;
}
@@ -168,7 +174,9 @@ static inline bool featureWithoutValue(const String& mediaFeature) {
mediaFeature == devicePixelRatioMediaFeature ||
mediaFeature == resolutionMediaFeature ||
mediaFeature == displayModeMediaFeature ||
- mediaFeature == scanMediaFeature || mediaFeature == shapeMediaFeature;
+ mediaFeature == scanMediaFeature ||
+ mediaFeature == shapeMediaFeature ||
+ mediaFeature == colorGamutMediaFeature;
}
bool MediaQueryExp::isViewportDependent() const {

Powered by Google App Engine
This is Rietveld 408576698