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

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: revamp Created 8 years, 7 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 2bb8d1665f1af8ae27ed9c8d325b397f516647d6..84f90d03afb138faf9fefa340ba349a509674be8 100644
--- a/content/renderer/render_view_impl.cc
+++ b/content/renderer/render_view_impl.cc
@@ -2771,9 +2771,13 @@ 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);
danakj 2012/05/24 22:40:18 Currently you would only need to do this when kEna
sadrul 2012/05/24 22:51:37 I think that involves moving applyDefaultDeviceSca
danakj 2012/05/24 22:55:38 Can't you use WebPreferences instead?
sadrul 2012/05/24 22:59:58 Wha. We totally can! Done. Thanks!
webview()->enableFixedLayoutMode(enable_fixed_layout || enable_viewport);
webview()->settings()->setFixedElementsLayoutRelativeToFrame(true);
+ if (enable_pinch)
+ 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