summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoraelias@chromium.org <aelias@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-01-12 19:04:28 +0000
committeraelias@chromium.org <aelias@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-01-12 19:04:28 +0000
commitf49dece2e1d36dc9c7fedf32ae7fbb787379c5bc (patch)
tree918b721480f43bb4b26932433e0eaffbe6d0e977
parentbade1649a31b774532d486448aab062ac85d0ed9 (diff)
downloadchromium_src-f49dece2e1d36dc9c7fedf32ae7fbb787379c5bc.zip
chromium_src-f49dece2e1d36dc9c7fedf32ae7fbb787379c5bc.tar.gz
chromium_src-f49dece2e1d36dc9c7fedf32ae7fbb787379c5bc.tar.bz2
Make --enable-css-transform-pinch work as expected.
This flag is supposed to enable Android-style pinch logic, but it was having no effect on desktop. BUG=167777 Review URL: https://chromiumcodereview.appspot.com/11876004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@176567 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--content/browser/renderer_host/render_process_host_impl.cc1
-rw-r--r--content/browser/web_contents/web_contents_impl.cc6
-rw-r--r--content/renderer/render_view_impl.cc3
3 files changed, 9 insertions, 1 deletions
diff --git a/content/browser/renderer_host/render_process_host_impl.cc b/content/browser/renderer_host/render_process_host_impl.cc
index 68afc6b2..de389a6 100644
--- a/content/browser/renderer_host/render_process_host_impl.cc
+++ b/content/browser/renderer_host/render_process_host_impl.cc
@@ -768,6 +768,7 @@ void RenderProcessHostImpl::PropagateBrowserCommandLineToRenderer(
switches::kEnableAccessibilityLogging,
switches::kEnableBrowserPluginCompositing,
switches::kEnableBrowserPluginForAllViewTypes,
+ switches::kEnableCssTransformPinch,
switches::kEnableDCHECK,
switches::kEnableDataChannels,
switches::kEnableEncryptedMedia,
diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc
index b7b43b4..02600f3 100644
--- a/content/browser/web_contents/web_contents_impl.cc
+++ b/content/browser/web_contents/web_contents_impl.cc
@@ -639,6 +639,12 @@ WebPreferences WebContentsImpl::GetWebkitPrefs(RenderViewHost* rvh,
prefs.apply_page_scale_factor_in_compositor =
command_line.HasSwitch(switches::kEnablePinch);
+
+ if (command_line.HasSwitch(switches::kEnableCssTransformPinch)) {
+ prefs.apply_default_device_scale_factor_in_compositor = false;
+ prefs.apply_page_scale_factor_in_compositor = false;
+ }
+
prefs.per_tile_painting_enabled =
command_line.HasSwitch(cc::switches::kEnablePerTilePainting);
prefs.accelerated_animation_enabled =
diff --git a/content/renderer/render_view_impl.cc b/content/renderer/render_view_impl.cc
index 6ab5709..8d75551 100644
--- a/content/renderer/render_view_impl.cc
+++ b/content/renderer/render_view_impl.cc
@@ -3309,7 +3309,8 @@ void RenderViewImpl::ProcessAcceleratedPinchZoomFlags(
return;
bool enable_viewport = command_line.HasSwitch(switches::kEnableViewport);
- bool enable_pinch = command_line.HasSwitch(switches::kEnablePinch);
+ bool enable_pinch = command_line.HasSwitch(switches::kEnablePinch)
+ || command_line.HasSwitch(switches::kEnableCssTransformPinch);
if (enable_viewport)
return;