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

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

Issue 1583913003: Introduce deviceDependentMediaQueries (similar to viewportDependent). (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: review fixes Created 4 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 | « third_party/WebKit/Source/core/css/MediaQueryExp.h ('k') | third_party/WebKit/Source/core/css/RuleSet.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 181b09657620cf8e24cb09ab735ca46666f07d1f..aa53cc705b91ce325666ff220815cec479db4e4b 100644
--- a/third_party/WebKit/Source/core/css/MediaQueryExp.cpp
+++ b/third_party/WebKit/Source/core/css/MediaQueryExp.cpp
@@ -176,6 +176,19 @@ bool MediaQueryExp::isViewportDependent() const
|| m_mediaFeature == maxAspectRatioMediaFeature;
}
+bool MediaQueryExp::isDeviceDependent() const
+{
+ return m_mediaFeature == deviceAspectRatioMediaFeature
+ || m_mediaFeature == deviceWidthMediaFeature
+ || m_mediaFeature == deviceHeightMediaFeature
+ || m_mediaFeature == minDeviceAspectRatioMediaFeature
+ || m_mediaFeature == minDeviceWidthMediaFeature
+ || m_mediaFeature == minDeviceHeightMediaFeature
+ || m_mediaFeature == maxDeviceAspectRatioMediaFeature
+ || m_mediaFeature == maxDeviceWidthMediaFeature
+ || m_mediaFeature == maxDeviceHeightMediaFeature;
+}
+
MediaQueryExp::MediaQueryExp(const MediaQueryExp& other)
: m_mediaFeature(other.mediaFeature())
, m_expValue(other.expValue())
« no previous file with comments | « third_party/WebKit/Source/core/css/MediaQueryExp.h ('k') | third_party/WebKit/Source/core/css/RuleSet.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698