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

Unified Diff: third_party/WebKit/Source/core/input/EventHandler.cpp

Issue 2469863003: Delegate dragend to the correct frame's EventHandler. (Closed)
Patch Set: Make tests pass again. Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/core/input/EventHandler.cpp
diff --git a/third_party/WebKit/Source/core/input/EventHandler.cpp b/third_party/WebKit/Source/core/input/EventHandler.cpp
index a40a5bc065dff8cd721b95a119fcf4bc36e0dad3..cf568d1e27b0cbd584a6060df42f4b5156fc528b 100644
--- a/third_party/WebKit/Source/core/input/EventHandler.cpp
+++ b/third_party/WebKit/Source/core/input/EventHandler.cpp
@@ -1967,7 +1967,15 @@ void EventHandler::defaultKeyboardEventHandler(KeyboardEvent* event) {
void EventHandler::dragSourceEndedAt(const PlatformMouseEvent& event,
DragOperation operation) {
- m_mouseEventManager->dragSourceEndedAt(event, operation);
+ HitTestRequest request(HitTestRequest::ReadOnly);
+ MouseEventWithHitTestResults mev =
+ EventHandlingUtil::performMouseEventHitTest(m_frame, request, event);
+
+ LocalFrame* targetFrame;
+ if (targetIsFrame(mev.innerNode(), targetFrame))
+ targetFrame->eventHandler().dragSourceEndedAt(event, operation);
dcheng 2016/11/03 03:09:59 Specifically, null-checking targetFrame here fixes
+ else
+ m_mouseEventManager->dragSourceEndedAt(event, operation);
}
void EventHandler::updateDragStateAfterEditDragIfNeeded(

Powered by Google App Engine
This is Rietveld 408576698