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

Unified Diff: third_party/WebKit/Source/core/page/DragController.cpp

Issue 1463823003: Return a enumeration of the state of handling of InputEvents. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 5 years 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/page/DragController.cpp
diff --git a/third_party/WebKit/Source/core/page/DragController.cpp b/third_party/WebKit/Source/core/page/DragController.cpp
index 169ca9765a2a29834281a3ad7c7d66cc08661330..47cc5b8fa1ffd19df63cb44eb16c2553f75bd5c0 100644
--- a/third_party/WebKit/Source/core/page/DragController.cpp
+++ b/third_party/WebKit/Source/core/page/DragController.cpp
@@ -243,7 +243,7 @@ bool DragController::performDrag(DragData* dragData)
// Sending an event can result in the destruction of the view and part.
DataTransfer* dataTransfer = createDraggingDataTransfer(DataTransferReadable, dragData);
dataTransfer->setSourceOperation(dragData->draggingSourceOperationMask());
- preventedDefault = mainFrame->eventHandler().performDragAndDrop(createMouseEvent(dragData), dataTransfer);
+ preventedDefault = mainFrame->eventHandler().performDragAndDrop(createMouseEvent(dragData), dataTransfer) != WebInputEventResult::NotHandled;
dataTransfer->setAccessPolicy(DataTransferNumb); // Invalidate clipboard here for security
}
if (preventedDefault) {
@@ -602,7 +602,7 @@ bool DragController::tryDHTMLDrag(DragData* dragData, DragOperation& operation)
dataTransfer->setSourceOperation(srcOpMask);
PlatformMouseEvent event = createMouseEvent(dragData);
- if (!mainFrame->eventHandler().updateDragAndDrop(event, dataTransfer)) {
+ if (mainFrame->eventHandler().updateDragAndDrop(event, dataTransfer) == WebInputEventResult::NotHandled) {
dataTransfer->setAccessPolicy(DataTransferNumb); // invalidate clipboard here for security
return false;
}

Powered by Google App Engine
This is Rietveld 408576698