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

Side by Side Diff: third_party/WebKit/Source/core/input/MouseEventManager.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 unified diff | Download patch
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "core/input/MouseEventManager.h" 5 #include "core/input/MouseEventManager.h"
6 6
7 #include "core/clipboard/DataObject.h" 7 #include "core/clipboard/DataObject.h"
8 #include "core/clipboard/DataTransfer.h" 8 #include "core/clipboard/DataTransfer.h"
9 #include "core/dom/Element.h" 9 #include "core/dom/Element.h"
10 #include "core/dom/ElementTraversal.h" 10 #include "core/dom/ElementTraversal.h"
(...skipping 890 matching lines...) Expand 10 before | Expand all | Expand 10 after
901 void MouseEventManager::clearDragDataTransfer() { 901 void MouseEventManager::clearDragDataTransfer() {
902 if (dragState().m_dragDataTransfer) { 902 if (dragState().m_dragDataTransfer) {
903 dragState().m_dragDataTransfer->clearDragImage(); 903 dragState().m_dragDataTransfer->clearDragImage();
904 dragState().m_dragDataTransfer->setAccessPolicy(DataTransferNumb); 904 dragState().m_dragDataTransfer->setAccessPolicy(DataTransferNumb);
905 } 905 }
906 } 906 }
907 907
908 void MouseEventManager::dragSourceEndedAt(const PlatformMouseEvent& event, 908 void MouseEventManager::dragSourceEndedAt(const PlatformMouseEvent& event,
909 DragOperation operation) { 909 DragOperation operation) {
910 // Send a hit test request so that Layer gets a chance to update the :hover 910 // Send a hit test request so that Layer gets a chance to update the :hover
911 // and :active pseudoclasses.. 911 // and :active pseudoclasses.
912 // TODO(crbug.com/661842): This should be redundant with the hit test in
913 // EventHandler::dragSourceEndedAt, but isn't. Figure out why, then remove the
914 // test here.
912 HitTestRequest request(HitTestRequest::Release); 915 HitTestRequest request(HitTestRequest::Release);
913 EventHandlingUtil::performMouseEventHitTest(m_frame, request, event); 916 EventHandlingUtil::performMouseEventHitTest(m_frame, request, event);
914 917
915 if (dragState().m_dragSrc) { 918 if (dragState().m_dragSrc) {
916 dragState().m_dragDataTransfer->setDestinationOperation(operation); 919 dragState().m_dragDataTransfer->setDestinationOperation(operation);
917 // For now we don't care if event handler cancels default behavior, since 920 // For now we don't care if event handler cancels default behavior, since
918 // there is none. 921 // there is none.
919 dispatchDragSrcEvent(EventTypeNames::dragend, event); 922 dispatchDragSrcEvent(EventTypeNames::dragend, event);
920 } 923 }
921 clearDragDataTransfer(); 924 clearDragDataTransfer();
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
999 1002
1000 void MouseEventManager::setClickCount(int clickCount) { 1003 void MouseEventManager::setClickCount(int clickCount) {
1001 m_clickCount = clickCount; 1004 m_clickCount = clickCount;
1002 } 1005 }
1003 1006
1004 bool MouseEventManager::mouseDownMayStartDrag() { 1007 bool MouseEventManager::mouseDownMayStartDrag() {
1005 return m_mouseDownMayStartDrag; 1008 return m_mouseDownMayStartDrag;
1006 } 1009 }
1007 1010
1008 } // namespace blink 1011 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698