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

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

Issue 1395543005: matchMedia('(display-mode: <notValid>)').matches should not evaluate true (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 2 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/MediaQueryEvaluator.cpp
diff --git a/third_party/WebKit/Source/core/css/MediaQueryEvaluator.cpp b/third_party/WebKit/Source/core/css/MediaQueryEvaluator.cpp
index b845244f5ca3f925222dc2e54b354052935fe612..03539869e74ae53ce2fd18dc771d5cee08a94b0a 100644
--- a/third_party/WebKit/Source/core/css/MediaQueryEvaluator.cpp
+++ b/third_party/WebKit/Source/core/css/MediaQueryEvaluator.cpp
@@ -221,9 +221,12 @@ static bool monochromeMediaFeatureEval(const MediaQueryExpValue& value, MediaFea
static bool displayModeMediaFeatureEval(const MediaQueryExpValue& value, MediaFeaturePrefix, const MediaValues& mediaValues)
{
- if (!value.isID)
+ if (!value.isValid())
Mikhail 2015/10/13 14:01:16 would be nice to have a short comment here explain
return true;
+ if (!value.isID)
+ return false;
+
WebDisplayMode mode = mediaValues.displayMode();
switch (value.id) {
case CSSValueFullscreen:

Powered by Google App Engine
This is Rietveld 408576698