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

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

Issue 2738953003: [InputEvent] Support 'insertFromYank' for macOS (Closed)
Patch Set: yosin's review: Only implement yank 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 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 c4fd9c04fa9072c1e1cc67fcd884951b81944d23..9d0e7d04be6fa8565ab301f2e768c131b997b522 100644
--- a/third_party/WebKit/Source/core/editing/EditingUtilities.cpp
+++ b/third_party/WebKit/Source/core/editing/EditingUtilities.cpp
@@ -2099,8 +2099,10 @@ const StaticRangeVector* targetRangesForInputEvent(const Node& node) {
return new StaticRangeVector(1, StaticRange::create(range));
}
-DispatchEventResult dispatchBeforeInputInsertText(Node* target,
- const String& data) {
+DispatchEventResult dispatchBeforeInputInsertText(
+ Node* target,
+ const String& data,
+ InputEvent::InputType inputType) {
if (!RuntimeEnabledFeatures::inputEventEnabled())
return DispatchEventResult::NotCanceled;
if (!target)
@@ -2108,8 +2110,7 @@ DispatchEventResult dispatchBeforeInputInsertText(Node* target,
// TODO(chongz): Pass appropriate |ranges| after it's defined on spec.
// http://w3c.github.io/editing/input-events.html#dom-inputevent-inputtype
InputEvent* beforeInputEvent = InputEvent::createBeforeInput(
- InputEvent::InputType::InsertText, data,
- inputTypeIsCancelable(InputEvent::InputType::InsertText),
+ inputType, data, inputTypeIsCancelable(inputType),
InputEvent::EventIsComposing::NotComposing,
targetRangesForInputEvent(*target));
return target->dispatchEvent(beforeInputEvent);
« 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