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

Issue 2469863003: Delegate dragend to the correct frame's EventHandler. (Closed)

Created:
4 years, 1 month ago by pwnall
Modified:
4 years, 1 month ago
Reviewers:
dcheng
CC:
chromium-reviews, blink-reviews, dcheng
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Delegate dragend to the correct frame's EventHandler. Currently, most drag-and-drop events are correctly delegated to the EventHandler of the frame that contains the events' target elements, in EventHandler::updateDragAndDrop. However, EventHandler::dragSourceEndedAt does not implement this delegation. The issue is visible to the Web in a subtle way -- the frame of the EventHandler is used to populate the DragEvent's view, which is used to compute the clientX and clientY attributes, which are user-visible. This CL implements the delegation used by MouseEventManager::dispatchDragSrcEvent, into MouseEventManager::dispatchDragSrcEvent. BUG=618770 Committed: https://crrev.com/32e50971f32bcd21be8540758efe9aac0ffafcd9 Cr-Commit-Position: refs/heads/master@{#429669}

Patch Set 1 : Tentative fix. #

Patch Set 2 : Remove a hopefully redundant hit test. #

Patch Set 3 : Make tests pass again. #

Total comments: 1

Patch Set 4 : Applied dcheng's advice. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+218 lines, -6 lines) Patch
A third_party/WebKit/LayoutTests/fast/dnd/event-mouse-coordinates.html View 1 chunk +32 lines, -0 lines 0 comments Download
A third_party/WebKit/LayoutTests/fast/dnd/event-mouse-coordinates-iframe.html View 1 chunk +63 lines, -0 lines 0 comments Download
A third_party/WebKit/LayoutTests/fast/dnd/resources/event-mouse-coordinates.css View 1 chunk +24 lines, -0 lines 0 comments Download
A third_party/WebKit/LayoutTests/fast/dnd/resources/event-mouse-coordinates.js View 1 chunk +86 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/input/EventHandler.cpp View 1 2 3 1 chunk +13 lines, -1 line 0 comments Download
M third_party/WebKit/Source/core/input/MouseEventManager.cpp View 1 3 1 chunk +0 lines, -5 lines 0 comments Download

Messages

Total messages: 35 (25 generated)
pwnall
PTAL?
4 years, 1 month ago (2016-11-02 21:15:44 UTC) #12
dcheng
Apparently you need to check if targetFrame is non-null after calling targetIsFrame()? Very odd.
4 years, 1 month ago (2016-11-03 03:05:34 UTC) #20
dcheng
https://codereview.chromium.org/2469863003/diff/100001/third_party/WebKit/Source/core/input/EventHandler.cpp File third_party/WebKit/Source/core/input/EventHandler.cpp (right): https://codereview.chromium.org/2469863003/diff/100001/third_party/WebKit/Source/core/input/EventHandler.cpp#newcode1976 third_party/WebKit/Source/core/input/EventHandler.cpp:1976: targetFrame->eventHandler().dragSourceEndedAt(event, operation); Specifically, null-checking targetFrame here fixes both failing ...
4 years, 1 month ago (2016-11-03 03:09:59 UTC) #21
pwnall
On 2016/11/03 03:09:59, dcheng wrote: > https://codereview.chromium.org/2469863003/diff/100001/third_party/WebKit/Source/core/input/EventHandler.cpp > File third_party/WebKit/Source/core/input/EventHandler.cpp (right): > > https://codereview.chromium.org/2469863003/diff/100001/third_party/WebKit/Source/core/input/EventHandler.cpp#newcode1976 > ...
4 years, 1 month ago (2016-11-03 09:09:14 UTC) #26
dcheng
lgtm
4 years, 1 month ago (2016-11-03 19:05:16 UTC) #27
pwnall
On 2016/11/03 19:05:16, dcheng wrote: > lgtm Thank you very much for your guidance!
4 years, 1 month ago (2016-11-03 19:15:32 UTC) #29
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2469863003/120001
4 years, 1 month ago (2016-11-03 19:16:03 UTC) #30
commit-bot: I haz the power
Committed patchset #4 (id:120001)
4 years, 1 month ago (2016-11-03 19:22:59 UTC) #32
commit-bot: I haz the power
Patchset 4 (id:??) landed as https://crrev.com/32e50971f32bcd21be8540758efe9aac0ffafcd9 Cr-Commit-Position: refs/heads/master@{#429669}
4 years, 1 month ago (2016-11-03 19:46:54 UTC) #34
tapted
4 years, 1 month ago (2016-11-04 05:12:50 UTC) #35
Message was sent while issue was closed.
A revert of this CL (patchset #4 id:120001) has been created in
https://codereview.chromium.org/2472323002/ by tapted@chromium.org.

The reason for reverting is: Suspected for
drag-over-iframe-invalid-source-crash.html  failure on WebKit Linux Precise Leak
Starts
https://uberchromegw.corp.google.com/i/chromium.webkit/builders/WebKit%20Linu...
Error like
({"numberOfLiveActiveDOMObjects":[2,3],"numberOfLiveDocuments":[1,2],"numberOfLiveNodes":[4,23],"numberOfLiveResources":[0,1]}).

Powered by Google App Engine
This is Rietveld 408576698