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

Unified Diff: content/browser/web_contents/web_contents_impl.cc

Issue 255843004: Update trackpad pinch-zoom code for corrected scale semantics (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 8 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 | « no previous file | content/browser/web_contents/web_contents_impl_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/web_contents/web_contents_impl.cc
diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc
index bddc8de7b9cea9a3582fc124fc4cb921a73d0f2d..791f19f40a0bd9826959efdf3efdd8f5151e401d 100644
--- a/content/browser/web_contents/web_contents_impl.cc
+++ b/content/browser/web_contents/web_contents_impl.cc
@@ -1263,7 +1263,7 @@ bool WebContentsImpl::HandleGestureEvent(
float zoomOutThreshold = (currentPinchZoomStepDelta_ <= 0) ? -nextStep
: backStep;
- totalPinchGestureAmount_ += event.data.pinchUpdate.scale;
+ totalPinchGestureAmount_ += (event.data.pinchUpdate.scale - 1.0);
if (totalPinchGestureAmount_ > zoomInThreshold) {
currentPinchZoomStepDelta_++;
if (delegate_)
« no previous file with comments | « no previous file | content/browser/web_contents/web_contents_impl_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698