Chromium Code Reviews| Index: content/renderer/render_widget.cc |
| diff --git a/content/renderer/render_widget.cc b/content/renderer/render_widget.cc |
| index 637ad27559b658c23c9a6c38d8edf55d9d4391b8..02f85052e2be752a2f390b9e8d29699389c03fc3 100644 |
| --- a/content/renderer/render_widget.cc |
| +++ b/content/renderer/render_widget.cc |
| @@ -2080,6 +2080,8 @@ void RenderWidget::GetCompositionRange(gfx::Range* range) { |
| bool RenderWidget::ShouldUpdateCompositionInfo( |
| const gfx::Range& range, |
| const std::vector<gfx::Rect>& bounds) { |
| + if (!range.IsValid()) |
| + return false; |
| if (composition_range_ != range) |
| return true; |
| if (bounds.size() != composition_character_bounds_.size()) |
| @@ -2135,17 +2137,8 @@ blink::WebScreenInfo RenderWidget::screenInfo() { |
| void RenderWidget::resetInputMethod() { |
| ImeEventGuard guard(this); |
| - // If the last text input type is not None, then we should finish any |
| - // ongoing composition regardless of the new text input type. |
| - if (text_input_type_ != ui::TEXT_INPUT_TYPE_NONE) { |
| - // If a composition text exists, then we need to let the browser process |
| - // to cancel the input method's ongoing composition session. |
| - blink::WebInputMethodController* controller = GetInputMethodController(); |
| - if (controller && |
| - controller->finishComposingText( |
| - WebInputMethodController::DoNotKeepSelection)) |
| - Send(new InputHostMsg_ImeCancelComposition(routing_id())); |
| - } |
| + if (text_input_type_ != ui::TEXT_INPUT_TYPE_NONE) |
|
yosin_UTC9
2016/12/07 09:46:00
Q: What is happened when we call ImeCancelComposit
Changwan Ryu
2016/12/08 01:16:29
The browser process may ignore it. If it does not
Changwan Ryu
2016/12/08 09:56:07
Removed this check.
|
| + Send(new InputHostMsg_ImeCancelComposition(routing_id())); |
| UpdateCompositionInfo(false /* not an immediate request */); |
| } |