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

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

Issue 1965543002: [InputEvent] Support |sequence<Range> getRanges()| in 'beforeinput' (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Don't use |std::unique_ptr<>| with |HeapVector| Created 4 years, 7 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 0edfc242c3b68c9fd5c55eebd9b7bc16ca7322e5..73d97ae5ffe869bfb81965a58f8870bad63f8c13 100644
--- a/third_party/WebKit/Source/core/editing/EditingUtilities.cpp
+++ b/third_party/WebKit/Source/core/editing/EditingUtilities.cpp
@@ -1742,7 +1742,7 @@ DispatchEventResult dispatchBeforeInputInsertText(EventTarget* target, const Str
return DispatchEventResult::NotCanceled;
if (!target)
return DispatchEventResult::NotCanceled;
- InputEvent* beforeInputEvent = InputEvent::createBeforeInput(InputEvent::InputType::InsertText, data, InputEvent::EventCancelable::IsCancelable, InputEvent::EventIsComposing::NotComposing);
+ InputEvent* beforeInputEvent = InputEvent::createBeforeInput(InputEvent::InputType::InsertText, data, InputEvent::EventCancelable::IsCancelable, InputEvent::EventIsComposing::NotComposing, nullptr);
ojan 2016/05/31 17:47:29 Should this have a TODO to pass in the range?
chongz 2016/05/31 18:32:26 Added TODOs, current spec has not defined |getRang
return target->dispatchEvent(beforeInputEvent);
}
@@ -1752,17 +1752,17 @@ DispatchEventResult dispatchBeforeInputFromComposition(EventTarget* target, Inpu
return DispatchEventResult::NotCanceled;
if (!target)
return DispatchEventResult::NotCanceled;
- InputEvent* beforeInputEvent = InputEvent::createBeforeInput(inputType, data, cancelable, InputEvent::EventIsComposing::IsComposing);
+ InputEvent* beforeInputEvent = InputEvent::createBeforeInput(inputType, data, cancelable, InputEvent::EventIsComposing::IsComposing, nullptr);
ojan 2016/05/31 17:47:29 Should this have a TODO to pass in the range?
chongz 2016/05/31 18:32:26 Done.
return target->dispatchEvent(beforeInputEvent);
}
-DispatchEventResult dispatchBeforeInputEditorCommand(EventTarget* target, InputEvent::InputType inputType, const String& data)
+DispatchEventResult dispatchBeforeInputEditorCommand(EventTarget* target, InputEvent::InputType inputType, const String& data, const RangeVector* ranges)
{
if (!RuntimeEnabledFeatures::inputEventEnabled())
return DispatchEventResult::NotCanceled;
if (!target)
return DispatchEventResult::NotCanceled;
- InputEvent* beforeInputEvent = InputEvent::createBeforeInput(inputType, data, InputEvent::EventCancelable::IsCancelable, InputEvent::EventIsComposing::NotComposing);
+ InputEvent* beforeInputEvent = InputEvent::createBeforeInput(inputType, data, InputEvent::EventCancelable::IsCancelable, InputEvent::EventIsComposing::NotComposing, ranges);
return target->dispatchEvent(beforeInputEvent);
}

Powered by Google App Engine
This is Rietveld 408576698