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

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

Issue 1479923002: Enumerate the return value of dispatchEvent so it is clear. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master_passive_uma_add
Patch Set: Fix typo Created 4 years, 10 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 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 32e14804af4f94fbf83a698ef05efed060f2af83..5288d403f90a8345ba44440160c2bb1194f2044f 100644
--- a/third_party/WebKit/Source/core/page/DragController.cpp
+++ b/third_party/WebKit/Source/core/page/DragController.cpp
@@ -432,7 +432,7 @@ static bool setSelectionToDragCaret(LocalFrame* frame, VisibleSelection& dragCar
return !frame->selection().isNone() && frame->selection().isContentEditable();
}
-bool DragController::dispatchTextInputEventFor(LocalFrame* innerFrame, DragData* dragData)
+DispatchEventResult DragController::dispatchTextInputEventFor(LocalFrame* innerFrame, DragData* dragData)
{
ASSERT(m_page->dragCaretController().hasCaret());
String text = m_page->dragCaretController().isContentRichlyEditable() ? "" : dragData->asPlainText();
@@ -460,7 +460,7 @@ bool DragController::concludeEditDrag(DragData* dragData)
RefPtrWillBeRawPtr<LocalFrame> innerFrame = element->ownerDocument()->frame();
ASSERT(innerFrame);
- if (m_page->dragCaretController().hasCaret() && !dispatchTextInputEventFor(innerFrame.get(), dragData))
+ if (m_page->dragCaretController().hasCaret() && dispatchTextInputEventFor(innerFrame.get(), dragData) != DispatchEventResult::NotCanceled)
return true;
if (dragData->containsFiles() && fileInput) {
« no previous file with comments | « third_party/WebKit/Source/core/page/DragController.h ('k') | third_party/WebKit/Source/core/workers/WorkerMessagingProxy.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698