| Index: content/browser/renderer_host/render_widget_host_impl.cc
|
| diff --git a/content/browser/renderer_host/render_widget_host_impl.cc b/content/browser/renderer_host/render_widget_host_impl.cc
|
| index ea327016baa84a793aad9b7723328e1707c905a8..ef37e66b240997b71f749a4012f43c8ce5b25e68 100644
|
| --- a/content/browser/renderer_host/render_widget_host_impl.cc
|
| +++ b/content/browser/renderer_host/render_widget_host_impl.cc
|
| @@ -1179,6 +1179,12 @@ void RenderWidgetHostImpl::ForwardTouchEventWithLatencyInfo(
|
|
|
| void RenderWidgetHostImpl::ForwardKeyboardEvent(
|
| const NativeWebKeyboardEvent& key_event) {
|
| + ForwardKeyboardEventWithCommands(key_event, nullptr);
|
| +}
|
| +
|
| +void RenderWidgetHostImpl::ForwardKeyboardEventWithCommands(
|
| + const NativeWebKeyboardEvent& key_event,
|
| + const std::vector<EditCommand>* commands) {
|
| TRACE_EVENT0("input", "RenderWidgetHostImpl::ForwardKeyboardEvent");
|
| if (owner_delegate_ &&
|
| !owner_delegate_->MayRenderWidgetForwardKeyboardEvent(key_event)) {
|
| @@ -1245,6 +1251,15 @@ void RenderWidgetHostImpl::ForwardKeyboardEvent(
|
| latency_info);
|
| key_event_with_latency.event.isBrowserShortcut = is_shortcut;
|
| DispatchInputEventWithLatencyInfo(key_event, &key_event_with_latency.latency);
|
| + // TODO(foolip): |InputRouter::SendKeyboardEvent()| may filter events, in
|
| + // which the commands will be treated as belonging to the next key event.
|
| + // InputMsg_SetEditCommandsForNextKeyEvent should only be sent if
|
| + // InputMsg_HandleInputEvent is, but has to be sent first.
|
| + // https://crbug.com/684298
|
| + if (commands && !commands->empty()) {
|
| + Send(
|
| + new InputMsg_SetEditCommandsForNextKeyEvent(GetRoutingID(), *commands));
|
| + }
|
| input_router_->SendKeyboardEvent(key_event_with_latency);
|
| }
|
|
|
|
|