| Index: chrome/renderer/render_view.cc
|
| ===================================================================
|
| --- chrome/renderer/render_view.cc (revision 41087)
|
| +++ chrome/renderer/render_view.cc (working copy)
|
| @@ -146,6 +146,7 @@
|
| using WebKit::WebData;
|
| using WebKit::WebDataSource;
|
| using WebKit::WebDevToolsAgent;
|
| +using WebKit::WebDocument;
|
| using WebKit::WebDragData;
|
| using WebKit::WebDragOperation;
|
| using WebKit::WebDragOperationsMask;
|
| @@ -980,11 +981,13 @@
|
| devtools_client_.reset(new DevToolsClient(this));
|
| }
|
|
|
| -void RenderView::OnStopFinding(bool clear_selection) {
|
| +void RenderView::OnStopFinding(const ViewMsg_StopFinding_Params& params) {
|
| WebView* view = webview();
|
| if (!view)
|
| return;
|
|
|
| + bool clear_selection =
|
| + params.action == ViewMsg_StopFinding_Params::kClearSelection;
|
| if (clear_selection)
|
| view->focusedFrame()->executeCommand(WebString::fromUTF8("Unselect"));
|
|
|
| @@ -993,6 +996,18 @@
|
| frame->stopFinding(clear_selection);
|
| frame = frame->traverseNext(false);
|
| }
|
| +
|
| + if (params.action == ViewMsg_StopFinding_Params::kActivateSelection) {
|
| + WebFrame* focused_frame = view->focusedFrame();
|
| + if (focused_frame) {
|
| + WebDocument doc = focused_frame->document();
|
| + if (!doc.isNull()) {
|
| + WebNode node = doc.focusedNode();
|
| + if (!node.isNull())
|
| + node.simulateClick();
|
| + }
|
| + }
|
| + }
|
| }
|
|
|
| void RenderView::OnFindReplyAck() {
|
|
|