| Index: content/renderer/render_frame_impl.cc
|
| diff --git a/content/renderer/render_frame_impl.cc b/content/renderer/render_frame_impl.cc
|
| index f6990c9423a5cfc00eba249c022d6da6348aa73e..c59615ef7366dcb1f240e795dbe047a9418a4d3d 100644
|
| --- a/content/renderer/render_frame_impl.cc
|
| +++ b/content/renderer/render_frame_impl.cc
|
| @@ -1384,6 +1384,7 @@ bool RenderFrameImpl::OnMessageReceived(const IPC::Message& msg) {
|
| IPC_MESSAGE_HANDLER(FrameMsg_ContextMenuClosed, OnContextMenuClosed)
|
| IPC_MESSAGE_HANDLER(FrameMsg_CustomContextMenuAction,
|
| OnCustomContextMenuAction)
|
| + IPC_MESSAGE_HANDLER(FrameMsg_ClickOnFocusedElement, OnClickFocusedElement)
|
| IPC_MESSAGE_HANDLER(InputMsg_Undo, OnUndo)
|
| IPC_MESSAGE_HANDLER(InputMsg_Redo, OnRedo)
|
| IPC_MESSAGE_HANDLER(InputMsg_Cut, OnCut)
|
| @@ -1666,6 +1667,19 @@ void RenderFrameImpl::OnCustomContextMenuAction(
|
| }
|
| }
|
|
|
| +void RenderFrameImpl::OnClickFocusedElement() {
|
| + WebView* view = render_view_->webview();
|
| + WebFrame* focused_frame = view->focusedFrame();
|
| + if (focused_frame) {
|
| + WebDocument doc = focused_frame->document();
|
| + if (!doc.isNull()) {
|
| + WebElement element = doc.focusedElement();
|
| + if (!element.isNull())
|
| + element.simulateClick();
|
| + }
|
| + }
|
| +}
|
| +
|
| void RenderFrameImpl::OnUndo() {
|
| frame_->executeCommand(WebString::fromUTF8("Undo"), GetFocusedElement());
|
| }
|
|
|