Chromium Code Reviews| Index: content/browser/renderer_host/render_widget_host_view_android.cc |
| diff --git a/content/browser/renderer_host/render_widget_host_view_android.cc b/content/browser/renderer_host/render_widget_host_view_android.cc |
| index 339fec9359479b8e4d1c9ffaf578260748595c82..3786b4220e1b3d19782510baad4e208d2f132c09 100644 |
| --- a/content/browser/renderer_host/render_widget_host_view_android.cc |
| +++ b/content/browser/renderer_host/render_widget_host_view_android.cc |
| @@ -1744,6 +1744,11 @@ void RenderWidgetHostViewAndroid::RunAckCallbacks() { |
| void RenderWidgetHostViewAndroid::OnGestureEvent( |
| const ui::GestureEventData& gesture) { |
| + // Confirm existing composition text on TAP gesture, to make sure the input |
| + // caret won't be moved with an ongoing composition text. |
| + if (gesture.type() == ui::ET_GESTURE_TAP) |
| + FinishImeCompositionSession(); |
|
jdduke (slow)
2015/03/16 15:11:31
+aurimas.
Why is this behavior Android-specific?
Miyoung Shin
2015/03/17 00:40:35
I tried to have the consistent behavior with aura
|
| + |
| blink::WebGestureEvent web_gesture = |
| CreateWebGestureEventFromGestureEventData(gesture); |
| // TODO(jdduke): Remove this workaround after Android fixes UiAutomator to |
| @@ -1928,6 +1933,14 @@ void RenderWidgetHostViewAndroid::OnStylusSelectTap(base::TimeTicks time, |
| SendGestureEvent(long_press); |
| } |
| +void RenderWidgetHostViewAndroid::FinishImeCompositionSession() { |
| + if (host_) { |
|
jdduke (slow)
2015/03/17 18:47:21
So, the different with RWHVAura is that hey actual
Miyoung Shin
2015/03/18 16:44:27
I've uploaded the patch to add hasComposition meth
|
| + host_->ImeConfirmComposition(base::string16(), gfx::Range::InvalidRange(), |
| + false); |
| + } |
| + ImeCancelComposition(); |
| +} |
| + |
| // static |
| void RenderWidgetHostViewBase::GetDefaultScreenInfo( |
| blink::WebScreenInfo* results) { |