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

Side by Side Diff: third_party/WebKit/Source/core/input/MouseEventManager.cpp

Issue 2759143002: Revert of Check detached status before attempting to clear drag transfer state. (Closed)
Patch Set: Created 3 years, 9 months 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
« no previous file with comments | « third_party/WebKit/LayoutTests/fast/events/resources/iframe-drag-dragend-detaches.html ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 918 matching lines...) Expand 10 before | Expand all | Expand 10 after
929 MouseEvent::webInputEventModifiersToButtons(event.modifiers()), nullptr, 929 MouseEvent::webInputEventModifiersToButtons(event.modifiers()), nullptr,
930 TimeTicks::FromSeconds(event.timeStampSeconds()), dataTransfer, 930 TimeTicks::FromSeconds(event.timeStampSeconds()), dataTransfer,
931 event.fromTouch() ? MouseEvent::FromTouch 931 event.fromTouch() ? MouseEvent::FromTouch
932 : MouseEvent::RealOrIndistinguishable); 932 : MouseEvent::RealOrIndistinguishable);
933 933
934 return EventHandlingUtil::toWebInputEventResult( 934 return EventHandlingUtil::toWebInputEventResult(
935 dragTarget->dispatchEvent(me)); 935 dragTarget->dispatchEvent(me));
936 } 936 }
937 937
938 void MouseEventManager::clearDragDataTransfer() { 938 void MouseEventManager::clearDragDataTransfer() {
939 if (!m_frame->page())
940 return;
941 if (dragState().m_dragDataTransfer) { 939 if (dragState().m_dragDataTransfer) {
942 dragState().m_dragDataTransfer->clearDragImage(); 940 dragState().m_dragDataTransfer->clearDragImage();
943 dragState().m_dragDataTransfer->setAccessPolicy(DataTransferNumb); 941 dragState().m_dragDataTransfer->setAccessPolicy(DataTransferNumb);
944 } 942 }
945 } 943 }
946 944
947 void MouseEventManager::dragSourceEndedAt(const WebMouseEvent& event, 945 void MouseEventManager::dragSourceEndedAt(const WebMouseEvent& event,
948 DragOperation operation) { 946 DragOperation operation) {
949 if (dragState().m_dragSrc) { 947 if (dragState().m_dragSrc) {
950 dragState().m_dragDataTransfer->setDestinationOperation(operation); 948 dragState().m_dragDataTransfer->setDestinationOperation(operation);
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after
1039 1037
1040 void MouseEventManager::setClickCount(int clickCount) { 1038 void MouseEventManager::setClickCount(int clickCount) {
1041 m_clickCount = clickCount; 1039 m_clickCount = clickCount;
1042 } 1040 }
1043 1041
1044 bool MouseEventManager::mouseDownMayStartDrag() { 1042 bool MouseEventManager::mouseDownMayStartDrag() {
1045 return m_mouseDownMayStartDrag; 1043 return m_mouseDownMayStartDrag;
1046 } 1044 }
1047 1045
1048 } // namespace blink 1046 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/LayoutTests/fast/events/resources/iframe-drag-dragend-detaches.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698