Fix for rapidly clicking on composited scrollbar.
A "mouse click" is comprised of a mousedown and a mouseup. During a mousedown on a scrollbar arrow, a GSB and a GSU are queued up in the CompositorThreadEventQueue. On mouseup, a GSE gets added to the queue. These gesture events are VSync aligned. However, if the user is rapidly clicking on the arrow, we will get another mousedown before the queued up GSE (from the first mouse click) has had a chance to be processed. This new mousedown now ends up calling InputHandlerScrollEnd and that in turn sets handling_gesture_on_impl_thread_ to false. When the queued up GSE from the first mouse click finally gets dispatched, it notices that handling_gesture_on_impl_thread_ is false and hence, leads to DCHECK(!currently_active_gesture_device_.has_value()) failing. This CL fixes the bug by clearing currently_active_gesture_device_ when the ongoing scroll ends. Bug: 1068062 Change-Id: Ie953c1336c2b74895dd0853da7c229928e137fdd Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2191198 Commit-Queue: Rahul Arakeri <arakeri@microsoft.com> Reviewed-by:David Bokan <bokan@chromium.org> Cr-Commit-Position: refs/heads/master@{#770838}
Showing
Please register or sign in to comment