Don't reset touch action when there is a active touch sequence
Right now when the browser receives the OnHasTouchEventHandlers IPC message, it resets the |scrolling_touch_action_| as long as both of these are true: 1. it is not in the middle of a gesture sequence. 2. the IPC message indicates that there is a touch event handler. Consider the following case: we have received the touch start ACK from the renderer, which assgins a value to |allowed_touch_action_|, then before GestureTapDown comes, JS removes the touch event listener and re-added it. In this case, it is not in the middle of a gesture sequence beause GestureTapDown has not arrived yet, so our code resets both the |allowed_touch_action_| and the |scrolling_touch_action_|. Later on when GestureScrollBegin comes, the browser crashes. This CL fixes the issue by adding a |active_touch_in_progress_| member variable. It is true when we receive a touch sequence started, and false at touch end. When we receive the OnHasTouchEventHandler(true), we should reset the touch actions only when there is no active touch and no gesture sequence. TBR=dtapuska@chromium.org Bug: 851644 Change-Id: I269d77dff0ae0e577a55734550cc639363267e50 Reviewed-on: https://chromium-review.googlesource.com/1195146 Commit-Queue: Xida Chen <xidachen@chromium.org> Reviewed-by:Navid Zolghadr <nzolghadr@chromium.org> Cr-Commit-Position: refs/heads/master@{#587262}
Showing
Please register or sign in to comment