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

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: sed -i s/DispatchEventResult/WebInputEventResult/g 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 47cc5b8fa1ffd19df63cb44eb16c2553f75bd5c0..8deb0be2e78761b0fa867adf0d1c6b5d0f0c880e 100644
--- a/third_party/WebKit/Source/core/page/DragController.cpp
+++ b/third_party/WebKit/Source/core/page/DragController.cpp
@@ -436,7 +436,7 @@ static bool setSelectionToDragCaret(LocalFrame* frame, VisibleSelection& dragCar
return !frame->selection().isNone() && frame->selection().isContentEditable();
}
-bool DragController::dispatchTextInputEventFor(LocalFrame* innerFrame, DragData* dragData)
+WebInputEventResult DragController::dispatchTextInputEventFor(LocalFrame* innerFrame, DragData* dragData)
{
ASSERT(m_page->dragCaretController().hasCaret());
String text = m_page->dragCaretController().isContentRichlyEditable() ? "" : dragData->asPlainText();
@@ -464,7 +464,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) != WebInputEventResult::NotHandled)
return true;
if (dragData->containsFiles() && fileInput) {

Powered by Google App Engine
This is Rietveld 408576698