Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1665)

Unified Diff: chrome/renderer/render_view.cc

Issue 164565: Remove WebFrame::selectAll and WebFrame::clearSelection in favor of executeCommand (Closed) Base URL: http://src.chromium.org/svn/trunk/src/
Patch Set: '' Created 11 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | webkit/api/public/WebFrame.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/renderer/render_view.cc
===================================================================
--- chrome/renderer/render_view.cc (revision 23431)
+++ chrome/renderer/render_view.cc (working copy)
@@ -771,7 +771,7 @@
return;
if (clear_selection)
- view->GetFocusedFrame()->clearSelection();
+ view->GetFocusedFrame()->executeCommand(WebString::fromUTF8("Unselect"));
WebFrame* frame = view->GetMainFrame();
while (frame) {
@@ -867,7 +867,9 @@
if (!webview())
return;
- webview()->GetFocusedFrame()->selectAll();
+ webview()->GetFocusedFrame()->executeCommand(
+ WebString::fromUTF8("SelectAll"));
+ UserMetricsRecordAction(L"SelectAll");
}
void RenderView::OnSetInitialFocus(bool reverse) {
@@ -2279,7 +2281,7 @@
if (!result) {
// don't leave text selected as you move to the next frame.
- search_frame->clearSelection();
+ search_frame->executeCommand(WebString::fromUTF8("Unselect"));
// Find the next frame, but skip the invisible ones.
do {
@@ -2292,7 +2294,7 @@
search_frame != focused_frame);
// Make sure selection doesn't affect the search operation in new frame.
- search_frame->clearSelection();
+ search_frame->executeCommand(WebString::fromUTF8("Unselect"));
// If we have multiple frames and we have wrapped back around to the
// focused frame, we need to search it once more allowing wrap within
« no previous file with comments | « no previous file | webkit/api/public/WebFrame.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698