[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 Review URL: https://codereview.chromium.org/1137003003 Cr-Commit-Position: refs/heads/master@{#329275}
Showing
Please register or sign in to comment