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

Unified Diff: cc/layer_tree_host_impl.cc

Issue 11299083: Fixes for nonmodal pinch zoom. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Whitelist findbugs and fix cc_unittests Created 8 years, 1 month 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 | « build/android/findbugs_filter/findbugs_known_bugs.txt ('k') | cc/layer_tree_host_impl_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/layer_tree_host_impl.cc
diff --git a/cc/layer_tree_host_impl.cc b/cc/layer_tree_host_impl.cc
index 8c2df3c2052a7f927423534bf3c84204da99f5fc..8ea79c2975c1f8ae9477094c60f31672fbd7e5d6 100644
--- a/cc/layer_tree_host_impl.cc
+++ b/cc/layer_tree_host_impl.cc
@@ -1241,13 +1241,10 @@ void LayerTreeHostImpl::pinchGestureUpdate(float magnifyDelta, gfx::Point anchor
if (!m_rootScrollLayerImpl)
return;
- if (m_previousPinchAnchor == gfx::Point())
- m_previousPinchAnchor = anchor;
-
// Keep the center-of-pinch anchor specified by (x, y) in a stable
// position over the course of the magnify.
float pageScaleDelta = m_pinchZoomViewport.pageScaleDelta();
- gfx::PointF previousScaleAnchor = gfx::ScalePoint(m_previousPinchAnchor, 1 / pageScaleDelta);
+ gfx::PointF previousScaleAnchor = gfx::ScalePoint(anchor, 1 / pageScaleDelta);
setPageScaleDelta(pageScaleDelta * magnifyDelta);
pageScaleDelta = m_pinchZoomViewport.pageScaleDelta();
gfx::PointF newScaleAnchor = gfx::ScalePoint(anchor, 1 / pageScaleDelta);
« no previous file with comments | « build/android/findbugs_filter/findbugs_known_bugs.txt ('k') | cc/layer_tree_host_impl_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698