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

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

Issue 853483003: Add support for 'display-mode' MQ defined in Manifest spec (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebased Created 5 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
« no previous file with comments | « Source/core/css/MediaQueryEvaluatorTest.cpp ('k') | Source/core/css/MediaValues.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/css/MediaQueryExp.cpp
diff --git a/Source/core/css/MediaQueryExp.cpp b/Source/core/css/MediaQueryExp.cpp
index 88e683c205230aecf092b28500c0e24529b4f88b..d8a6cbc31e2195632c71c251a2ed4887c5b25a01 100644
--- a/Source/core/css/MediaQueryExp.cpp
+++ b/Source/core/css/MediaQueryExp.cpp
@@ -47,7 +47,8 @@ static inline bool featureWithCSSValueID(const String& mediaFeature, const CSSPa
if (!value->id)
return false;
- return mediaFeature == orientationMediaFeature
+ return mediaFeature == displayModeMediaFeature
+ || mediaFeature == orientationMediaFeature
|| mediaFeature == pointerMediaFeature
|| mediaFeature == anyPointerMediaFeature
|| mediaFeature == hoverMediaFeature
@@ -57,6 +58,9 @@ static inline bool featureWithCSSValueID(const String& mediaFeature, const CSSPa
static inline bool featureWithValidIdent(const String& mediaFeature, CSSValueID ident)
{
+ if (mediaFeature == displayModeMediaFeature)
+ return ident == CSSValueFullscreen || ident == CSSValueStandalone || ident == CSSValueMinimalUi || ident == CSSValueBrowser;
+
if (mediaFeature == orientationMediaFeature)
return ident == CSSValuePortrait || ident == CSSValueLandscape;
« no previous file with comments | « Source/core/css/MediaQueryEvaluatorTest.cpp ('k') | Source/core/css/MediaValues.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698