Re-evaluate pinch events at GesturePinchBegin
Right now pinch events are evaluated at GestureScrollBegin, if a gesture is allowed at GSB, then the entire gesture is allowed. This cause a problem in the following scenario. We have a div with pan-y, user starts with scrolling along the y-direction, and then the second finger touches the screen and generates a pinch zoom gesture. In this case, the pinch zoom gesture is allowed because the user starts with scrolling along the y-axis which is allowed. This CL fixes the problem by re-evaluating the gesture event at GesturePinchBegin. There are few cases to consider 1. The above described case. We will allow scrolling on the y-axis but disallow the pinch zoom when the second finger is touched. 2. It should work with certain embedded map case such as the demo here: http://mustaqahmed.github.io/web/image-panning.html If a user starts with two finger panning the embedded map, then the gesture will be evaluated at GestureScrollBegin and will be disallowed, which means the page will handle the pointer events and manipulate the map. 3. It should work with double-tap-drag-zoom case. In this case, there is no GSB, and when GesturePinchBegin arrives, we evaluate that. Bug: 771330 Change-Id: Ibeaeace11bc017384317f61aabc0f23008ad2b5f Reviewed-on: https://chromium-review.googlesource.com/c/1297070Reviewed-by:Dave Tapuska <dtapuska@chromium.org> Reviewed-by:
Mustaq Ahmed <mustaq@chromium.org> Reviewed-by:
David Bokan <bokan@chromium.org> Commit-Queue: Xida Chen <xidachen@chromium.org> Cr-Commit-Position: refs/heads/master@{#603795}
Showing
This diff is collapsed.
Please register or sign in to comment