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

Unified Diff: content/renderer/render_view_impl.cc

Issue 10454019: Unset the page-scale-factor limits if enable-pinch flag is turned on. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 8 years, 6 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 | « content/browser/renderer_host/render_process_host_impl.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/renderer/render_view_impl.cc
diff --git a/content/renderer/render_view_impl.cc b/content/renderer/render_view_impl.cc
index 74195bd9fe0c1fe898837c1f7648188778bbd9ff..1beab029193f469ab113a1a2b7b6a1fcb5d7ec4a 100644
--- a/content/renderer/render_view_impl.cc
+++ b/content/renderer/render_view_impl.cc
@@ -2834,9 +2834,18 @@ void RenderViewImpl::ProcessViewLayoutFlags(const CommandLine& command_line) {
command_line.HasSwitch(switches::kEnableViewport);
bool enable_fixed_layout =
command_line.HasSwitch(switches::kEnableFixedLayout);
+ bool enable_pinch = enable_viewport ||
+ command_line.HasSwitch(switches::kEnablePinch);
webview()->enableFixedLayoutMode(enable_fixed_layout || enable_viewport);
webview()->settings()->setFixedElementsLayoutRelativeToFrame(true);
+ if (!enable_pinch &&
+ webkit_preferences_.apply_default_device_scale_factor_in_compositor &&
+ webkit_preferences_.default_device_scale_factor != 1) {
+ // Page scaling is disabled by default when applying a scale factor in the
+ // compositor since they are currently incompatible.
+ webview()->setPageScaleFactorLimits(1, 1);
+ }
if (enable_viewport) {
webview()->settings()->setViewportEnabled(true);
« no previous file with comments | « content/browser/renderer_host/render_process_host_impl.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698