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

Issue 1137003003: [Contextual Search] Pinch zoom might cause a crash. (Closed)

Created:
5 years, 7 months ago by pedro (no code reviews)
Modified:
5 years, 7 months ago
CC:
chromium-reviews
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

[Contextual Search] Pinch zoom might cause a crash. ContextualSearchEventFilter has a complex logic to detect where to propagate events to, whether the Search Panel or the Search Content View. Besides that, a single stream of events (a single gesture) might be forwarded to different targets depending on a number of factors (whether the Panel was maximized, whether the gesture was horizontal or vertical, whether the Search Content View is scrolled at the top, and so on). Things can get much more complicated when multiple pointers are involved, like in gestures with multiple fingers. If we mess with the order of the events, or don't properly forward events from all pointers to the Search Content View it will crash. This CL fixes the problem by: 1) Forwarding all pointer events when multiple finger gestures are used. 2) Ignoring multitouch events when forwarding horizontal gestures to the expanded Panel. In this particular case, we must ignore multitouch events because the presence of a second pointer will cause the Search Page to scroll, which is not supposed to happen in this case. So, now we are properly ignoring ACTION_POINTER_DOWN and ACTION_POINTER_UP events, while at the same time, creating MotionEvents with a single pointer in order to implement the intended "lock horizontally" behavior. BUG=485008 BUG=486901 BUG=486902 Committed: https://crrev.com/ffea7a5b91079deae044398bc7b01e22275d868e Cr-Commit-Position: refs/heads/master@{#329275}

Patch Set 1 #

Total comments: 2

Patch Set 2 : Addressing David's comment #

Unified diffs Side-by-side diffs Delta from patch set Stats (+50 lines, -34 lines) Patch
M chrome/android/java/src/org/chromium/chrome/browser/compositor/layouts/eventfilter/ContextualSearchEventFilter.java View 1 7 chunks +50 lines, -34 lines 0 comments Download

Messages

Total messages: 9 (3 generated)
pedro (no code reviews)
Hey guys. Please take a look at this change.
5 years, 7 months ago (2015-05-11 21:29:57 UTC) #2
David Trainor- moved to gerrit
lgtm https://codereview.chromium.org/1137003003/diff/1/chrome/android/java/src/org/chromium/chrome/browser/compositor/layouts/eventfilter/ContextualSearchEventFilter.java File chrome/android/java/src/org/chromium/chrome/browser/compositor/layouts/eventfilter/ContextualSearchEventFilter.java (right): https://codereview.chromium.org/1137003003/diff/1/chrome/android/java/src/org/chromium/chrome/browser/compositor/layouts/eventfilter/ContextualSearchEventFilter.java#newcode399 chrome/android/java/src/org/chromium/chrome/browser/compositor/layouts/eventfilter/ContextualSearchEventFilter.java:399: private MotionEvent lockEventHorizontallty(MotionEvent e, float y) { Horizontallty ...
5 years, 7 months ago (2015-05-11 22:05:35 UTC) #3
pedro (no code reviews)
Thanks David! https://codereview.chromium.org/1137003003/diff/1/chrome/android/java/src/org/chromium/chrome/browser/compositor/layouts/eventfilter/ContextualSearchEventFilter.java File chrome/android/java/src/org/chromium/chrome/browser/compositor/layouts/eventfilter/ContextualSearchEventFilter.java (right): https://codereview.chromium.org/1137003003/diff/1/chrome/android/java/src/org/chromium/chrome/browser/compositor/layouts/eventfilter/ContextualSearchEventFilter.java#newcode399 chrome/android/java/src/org/chromium/chrome/browser/compositor/layouts/eventfilter/ContextualSearchEventFilter.java:399: private MotionEvent lockEventHorizontallty(MotionEvent e, float y) { ...
5 years, 7 months ago (2015-05-11 22:55:03 UTC) #4
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1137003003/20001
5 years, 7 months ago (2015-05-11 22:59:45 UTC) #7
commit-bot: I haz the power
Committed patchset #2 (id:20001)
5 years, 7 months ago (2015-05-11 23:45:04 UTC) #8
commit-bot: I haz the power
5 years, 7 months ago (2015-05-11 23:46:42 UTC) #9
Message was sent while issue was closed.
Patchset 2 (id:??) landed as
https://crrev.com/ffea7a5b91079deae044398bc7b01e22275d868e
Cr-Commit-Position: refs/heads/master@{#329275}

Powered by Google App Engine
This is Rietveld 408576698