summaryrefslogtreecommitdiffstats
path: root/content
diff options
context:
space:
mode:
authoriyengar@google.com <iyengar@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2011-11-03 18:24:34 +0000
committeriyengar@google.com <iyengar@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2011-11-03 18:24:34 +0000
commit7a5563a86fcde4d8d68f9e9d133287da8011a6f2 (patch)
tree4f4dede5995c14069ee5c3e469fc1e88621a46dd /content
parentc05380b256e78f3b4884817e59bae32e33e4f230 (diff)
downloadchromium_src-7a5563a86fcde4d8d68f9e9d133287da8011a6f2.zip
chromium_src-7a5563a86fcde4d8d68f9e9d133287da8011a6f2.tar.gz
chromium_src-7a5563a86fcde4d8d68f9e9d133287da8011a6f2.tar.bz2
The touch based zoom handling on Windows should ignore gestures where the current location is the same as the previous location. This
is to prevent abnormal zooming. BUG=none TEST=touch based zoom in Windows should work better. Review URL: http://codereview.chromium.org/8437073 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@108503 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'content')
-rw-r--r--content/browser/renderer_host/render_widget_host_view_win.cc3
1 files changed, 3 insertions, 0 deletions
diff --git a/content/browser/renderer_host/render_widget_host_view_win.cc b/content/browser/renderer_host/render_widget_host_view_win.cc
index 6acee2c..6b81a7c 100644
--- a/content/browser/renderer_host/render_widget_host_view_win.cc
+++ b/content/browser/renderer_host/render_widget_host_view_win.cc
@@ -225,6 +225,9 @@ bool DecodeZoomGesture(HWND hwnd, const GESTUREINFO& gi,
zoom_second.y = gi.ptsLocation.y;
ScreenToClient(hwnd, &zoom_second);
+ if (zoom_first.x == zoom_second.x && zoom_first.y == zoom_second.y)
+ return false;
+
zoom_center->x = (zoom_first.x + zoom_second.x) / 2;
zoom_center->y = (zoom_first.y + zoom_second.y) / 2;