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

Unified Diff: third_party/WebKit/Source/core/editing/EditingUtilities.cpp

Issue 2258663003: [InputEvent] Support |deleteByCut|&|insertFromPaste| with |dataTransfer| field (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: yosin's review2, fix nits Created 4 years, 4 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/editing/EditingUtilities.cpp
diff --git a/third_party/WebKit/Source/core/editing/EditingUtilities.cpp b/third_party/WebKit/Source/core/editing/EditingUtilities.cpp
index e6ae084a701f5fe8e2bf77af8ecd364357fc0b4b..89c8fd5ea9dce1af5bf5a9611648c253199e9969 100644
--- a/third_party/WebKit/Source/core/editing/EditingUtilities.cpp
+++ b/third_party/WebKit/Source/core/editing/EditingUtilities.cpp
@@ -1891,6 +1891,16 @@ DispatchEventResult dispatchBeforeInputEditorCommand(EventTarget* target, InputE
return target->dispatchEvent(beforeInputEvent);
}
+DispatchEventResult dispatchBeforeInputDataTransfer(EventTarget* target, InputEvent::InputType inputType, DataTransfer* dataTransfer, const RangeVector* ranges)
+{
+ if (!RuntimeEnabledFeatures::inputEventEnabled())
+ return DispatchEventResult::NotCanceled;
+ if (!target)
+ return DispatchEventResult::NotCanceled;
+ InputEvent* beforeInputEvent = InputEvent::createBeforeInput(inputType, dataTransfer, InputEvent::EventCancelable::IsCancelable, InputEvent::EventIsComposing::NotComposing, ranges);
+ return target->dispatchEvent(beforeInputEvent);
+}
+
InputEvent::InputType deletionInputTypeFromTextGranularity(DeleteDirection direction, TextGranularity granularity)
{
using InputType = InputEvent::InputType;
« no previous file with comments | « third_party/WebKit/Source/core/editing/EditingUtilities.h ('k') | third_party/WebKit/Source/core/editing/Editor.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698