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

Issue 1987343002: Drag and drop cleans up touch sequences from the source window. (Closed)

Created:
4 years, 7 months ago by tdresser
Modified:
4 years, 7 months ago
Reviewers:
CC:
chromium-reviews
Base URL:
https://chromium.googlesource.com/chromium/src.git@2704
Target Ref:
refs/pending/branch-heads/2704
Project:
chromium
Visibility:
Public.

Description

Drag and drop cleans up touch sequences from the source window. Previously we would just leave the source window thinking it had a pointer touching it the whole time, and then when a new pointer came down, we'd ignore that event. This behavior is required for tab drag, but not for drag and drop. This caused problems for OOPIF/webview event targetting. This patch sends cancel events correctly in the drag and drop case. This is a bit tricky, because during drag and drop, we move a gesture recognizer from the source window to the destination window, leaving the source window with no gesture recognition state. To deal with this, we send press events to the gesture recognizer without sending them to the associated window, to get the gesture recognizer state for the source window back in sync with the pointers that are active on it, and then we dispatch cancel events to the source window. Ideally we'd just clone the GR state and then send the cancel events, but cloning the GR state would be painful. The tab drag case is left untouched - when dragging a tab, the source window continues to think that a pointer is down throughout the tab drag, until the finger is raised. BUG=604454 TEST=GestureProviderAuraTest.IgnoresExtraPressEvents, GestureRecognizerTest.PressDoesNotCrash Review-Url: https://codereview.chromium.org/1907323003 Cr-Commit-Position: refs/heads/master@{#393568} (cherry picked from commit 4ab3ab417ec9ddaa3672219ea3dba4e8b35f1518) Committed: https://chromium.googlesource.com/chromium/src/+/bbe2f039113871b17b7ce6a3ab243eb9432d4720

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+139 lines, -88 lines) Patch
M ash/drag_drop/drag_drop_controller.cc View 1 chunk +3 lines, -2 lines 0 comments Download
M ash/shelf/shelf_tooltip_manager_unittest.cc View 2 chunks +2 lines, -0 lines 0 comments Download
M chrome/browser/ui/views/tabs/tab_drag_controller.cc View 2 chunks +4 lines, -2 lines 0 comments Download
M ui/aura/gestures/gesture_recognizer_unittest.cc View 1 chunk +3 lines, -6 lines 0 comments Download
M ui/aura/window_event_dispatcher.h View 1 chunk +1 line, -2 lines 0 comments Download
M ui/aura/window_event_dispatcher.cc View 1 chunk +3 lines, -4 lines 0 comments Download
M ui/events/gesture_detection/gesture_provider.cc View 1 chunk +0 lines, -1 line 0 comments Download
M ui/events/gestures/gesture_provider_aura.h View 1 chunk +1 line, -0 lines 0 comments Download
M ui/events/gestures/gesture_provider_aura.cc View 2 chunks +13 lines, -0 lines 0 comments Download
M ui/events/gestures/gesture_provider_aura_unittest.cc View 1 chunk +1 line, -5 lines 0 comments Download
M ui/events/gestures/gesture_recognizer.h View 1 chunk +8 lines, -6 lines 0 comments Download
M ui/events/gestures/gesture_recognizer_impl.h View 1 chunk +8 lines, -1 line 0 comments Download
M ui/events/gestures/gesture_recognizer_impl.cc View 3 chunks +79 lines, -35 lines 0 comments Download
M ui/events/gestures/gesture_recognizer_impl_mac.cc View 1 chunk +2 lines, -1 line 0 comments Download
M ui/events/gestures/gesture_types.h View 1 chunk +1 line, -2 lines 0 comments Download
M ui/events/gestures/motion_event_aura.cc View 1 chunk +5 lines, -16 lines 0 comments Download
M ui/events/gestures/motion_event_aura_unittest.cc View 4 chunks +5 lines, -5 lines 0 comments Download

Messages

Total messages: 2 (1 generated)
tdresser
4 years, 7 months ago (2016-05-18 18:45:28 UTC) #2
Message was sent while issue was closed.
Committed patchset #1 (id:1) manually as
bbe2f039113871b17b7ce6a3ab243eb9432d4720.

Powered by Google App Engine
This is Rietveld 408576698