commit | 2eec314f52989e78e862da1675b0d095e9629197 | [log] [tgz] |
---|---|---|
author | Xida Chen <xidachen@chromium.org> | Thu Jun 07 11:42:42 2018 |
committer | Commit Bot <commit-bot@chromium.org> | Thu Jun 07 11:42:42 2018 |
tree | 73c42dea079b186d936b71744dc1f1be6233f62a | |
parent | 4acf0b580ea8cb8a4763d97dc8a77a4da959e0cb [diff] |
Reland of: Make TouchActionFilter::allowed_touch_action_ optional The original CL was reverted because of multiple failures, this CL fixes them one by one and lists them here. The first patch set is exactly the same as the one that was reverted, so that it is easier to review. 1. crbug.com/845012 The original CL caused 3 tests to fail on multiple bots because of a illegal downcast from MockInputRouter to InputRouter. PS#3 should have that fixed. 2. crbug.com/845063, crbug.com/844858, crbug.com/845150 The problem is due to calling ResetTouchAction at GSE in cases that it should not. In a typical fling sequence, we have GSB, then a bunch of GSU, then a FlingStart, then another bunch of GSU, and then a GSE. If we have a in-flight fling and we start a second fling sequence before GSE of the first fling, then OnSetTouchAction is called for the second gesture sequence and that sets the |allowed_touch_action_|. After that, GSE of the first fling comes which resets the |allowed_touch_action_|. Then when the GSB of the second fling comes it doesn't have a valid touch action to start with which results in the crash. This is now fixed by using another member |scrolling_touch_action_|, which takes over the value in the |allowed_touch_action_| when there is a touch sequence end. So we reset the |allowed_touch_action_| at each touch sequence end, and if that is not the gesture sequence end, we will keep using the |scrolling_touch_action_| until the next TapDown. 3. crbug.com/845153 Tested this locally. The problem is JS injecting a touch event handler in the middle of gesture sequence. In my original CL, when we saw a touch event handler, we call ResetTouchAction(). If that happens in the middle of a gesture sequence, then allowed_touch_action_ has no value when subsequence gesture events comes which results in the crash. This is also solved by using the |scrolling_touch_action_| which will not be reset when JS inject a touch event handler. TBR=pdr@chromium.org, piman@chromium.org Bug: 845012, 845063, 844858, 845153, 845150 Change-Id: I4f1e1deff71db4587fb42c38f87ccb1cb7311cdc Reviewed-on: https://chromium-review.googlesource.com/1068204 Commit-Queue: Xida Chen <xidachen@chromium.org> Reviewed-by: Robert Flack <flackr@chromium.org> Reviewed-by: Dave Tapuska <dtapuska@chromium.org> Cr-Commit-Position: refs/heads/master@{#565233}
Chromium is an open-source browser project that aims to build a safer, faster, and more stable way for all users to experience the web.
The project's web site is https://www.chromium.org.
Documentation in the source is rooted in docs/README.md.
Learn how to Get Around the Chromium Source Code Directory Structure .