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

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

Issue 870933002: Make it possible to set the display mode from the WebView API (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Using enum now 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 2776089bf747ab02695d003aa18c7beb7956bdcc..1a305239f26e6cc5b48767948d7716a606f8f6db 100644
--- a/Source/core/css/MediaValues.cpp
+++ b/Source/core/css/MediaValues.cpp
@@ -105,15 +105,18 @@ const String MediaValues::calculateMediaType(LocalFrame* frame) const
return frame->view()->mediaType();
}
-DisplayMode MediaValues::calculateDisplayMode(LocalFrame* frame) const
+WebDisplayMode MediaValues::calculateDisplayMode(LocalFrame* frame) const
{
ASSERT(frame);
- DisplayMode mode = frame->host()->settings().displayModeOverride();
+ WebDisplayMode mode = frame->host()->settings().displayModeOverride();
- if (mode != DisplayModeUndefined)
+ if (mode != WebDisplayModeUndefined)
return mode;
- return DisplayModeBrowser;
+ if (!frame->view())
+ return WebDisplayModeBrowser;
+
+ return frame->view()->displayMode();
}
bool MediaValues::calculateThreeDEnabled(LocalFrame* frame) const
« 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