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

Unified Diff: Source/core/css/MediaValues.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/MediaValues.h ('k') | Source/core/css/MediaValuesCached.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/css/MediaValues.cpp
diff --git a/Source/core/css/MediaValues.cpp b/Source/core/css/MediaValues.cpp
index 18bb3e41b8c4d809715e2a5fbc58e64b8fd0f8a2..2776089bf747ab02695d003aa18c7beb7956bdcc 100644
--- a/Source/core/css/MediaValues.cpp
+++ b/Source/core/css/MediaValues.cpp
@@ -105,6 +105,17 @@ const String MediaValues::calculateMediaType(LocalFrame* frame) const
return frame->view()->mediaType();
}
+DisplayMode MediaValues::calculateDisplayMode(LocalFrame* frame) const
+{
+ ASSERT(frame);
+ DisplayMode mode = frame->host()->settings().displayModeOverride();
+
+ if (mode != DisplayModeUndefined)
+ return mode;
+
+ return DisplayModeBrowser;
+}
+
bool MediaValues::calculateThreeDEnabled(LocalFrame* frame) const
{
ASSERT(frame && frame->contentRenderer() && frame->contentRenderer()->compositor());
« no previous file with comments | « Source/core/css/MediaValues.h ('k') | Source/core/css/MediaValuesCached.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698