| 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..94a0291ade1a0200ef81a5582772c21ce29327a6 100644
|
| --- a/third_party/WebKit/Source/core/editing/EditingUtilities.cpp
|
| +++ b/third_party/WebKit/Source/core/editing/EditingUtilities.cpp
|
| @@ -1742,7 +1742,9 @@ 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);
|
| + // TODO(chongz): Pass appreciate |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, InputEvent::EventCancelable::IsCancelable, InputEvent::EventIsComposing::NotComposing, nullptr);
|
| return target->dispatchEvent(beforeInputEvent);
|
| }
|
|
|
| @@ -1752,17 +1754,19 @@ DispatchEventResult dispatchBeforeInputFromComposition(EventTarget* target, Inpu
|
| return DispatchEventResult::NotCanceled;
|
| if (!target)
|
| return DispatchEventResult::NotCanceled;
|
| - InputEvent* beforeInputEvent = InputEvent::createBeforeInput(inputType, data, cancelable, InputEvent::EventIsComposing::IsComposing);
|
| + // TODO(chongz): Pass appreciate |ranges| after it's defined on spec.
|
| + // http://w3c.github.io/editing/input-events.html#dom-inputevent-inputtype
|
| + InputEvent* beforeInputEvent = InputEvent::createBeforeInput(inputType, data, cancelable, InputEvent::EventIsComposing::IsComposing, nullptr);
|
| 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);
|
| }
|
|
|
|
|