Show keyboard when the focused editable field is touched inside the web content area.
When an editable fieled is touched and the focus is moved to the element, NOTIFICATION_FOCUS_CHANGED_IN_PAGE is sent. However, if the field is already focused, no notification is sent. But keyboard should be shown in such a case.
This CL
- Adds NOTIFICATION_FOCUSED_EDITABLE_NODE_TOUCHED notification, which is sent when the focused editable field is touched,
- Adds ChromeViewHostMsg_FocusedEditableNodeTouched IPC message, which is sent from renderer to browser when a touch released on the focused editable field,
- Changes RenderWidget to handle touch events in OnHandleInputEvent, and
- Handles NOTIFICATION_FOCUSED_EDITABLE_NODE_TOUCHED in KeyboardWidget to show keyboard.
BUG=none
TEST=Manual
Review URL: http://codereview.chromium.org/7923005
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@103694 0039d316-1c4b-4281-b951-d872f2087c98
diff --git a/content/renderer/render_widget.cc b/content/renderer/render_widget.cc
index 2f0dfc2..b57c11ce 100644
--- a/content/renderer/render_widget.cc
+++ b/content/renderer/render_widget.cc
@@ -58,6 +58,7 @@
using WebKit::WebScreenInfo;
using WebKit::WebSize;
using WebKit::WebTextDirection;
+using WebKit::WebTouchEvent;
using WebKit::WebVector;
using WebKit::WebWidget;
@@ -493,6 +494,8 @@
DidHandleKeyEvent();
if (WebInputEvent::isMouseEventType(input_event->type))
DidHandleMouseEvent(*(static_cast<const WebMouseEvent*>(input_event)));
+ if (WebInputEvent::isTouchEventType(input_event->type))
+ DidHandleTouchEvent(*(static_cast<const WebTouchEvent*>(input_event)));
}
}