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

Issue 6356004: If the user selects text in the current tab, and types CTRL-F,... (Closed)

Created:
9 years, 11 months ago by simonmorris
Modified:
9 years, 4 months ago
CC:
chromium-reviews, darin-cc_chromium.org, brettw-cc_chromium.org
Visibility:
Public.

Description

If the user selects text in the current tab, and types CTRL-F, then the find box contains the selected text. BUG=876 TEST=Select text in a page, type CTRL-F, and check that the find box contains the selected text. TEST=Type CTRL-F, select some text in a page, type CTRL-F again, and check that the find box is updated with the selected text.

Patch Set 1 #

Patch Set 2 : '' #

Patch Set 3 : '' #

Patch Set 4 : '' #

Patch Set 5 : '' #

Patch Set 6 : '' #

Unified diffs Side-by-side diffs Delta from patch set Stats (+47 lines, -6 lines) Patch
M chrome/browser/renderer_host/render_view_host.h View 2 chunks +6 lines, -0 lines 0 comments Download
M chrome/browser/renderer_host/render_view_host.cc View 2 chunks +5 lines, -0 lines 0 comments Download
M chrome/browser/ui/find_bar/find_bar_controller.h View 2 chunks +9 lines, -0 lines 0 comments Download
M chrome/browser/ui/find_bar/find_bar_controller.cc View 1 2 3 4 5 4 chunks +27 lines, -4 lines 0 comments Download
M chrome/renderer/render_view.cc View 2 chunks +0 lines, -2 lines 0 comments Download

Messages

Total messages: 4 (0 generated)
simonmorris
9 years, 11 months ago (2011-01-19 15:44:47 UTC) #1
brettw
I had a chat with Ben and we're not sure we want this feature. The ...
9 years, 11 months ago (2011-01-19 16:34:19 UTC) #2
Peter Kasting
On 2011/01/19 16:34:19, brettw wrote: > Please feel free to discuss with the UI leads ...
9 years, 11 months ago (2011-01-26 06:07:30 UTC) #3
Peter Kasting
9 years, 4 months ago (2011-07-28 20:20:34 UTC) #4
This patch doesn't apply as-is, so I rewrote it to work with trunk.

There are still numerous issues.  For example, the selected text may contain
line breaks and other characters that can't be printed in the find box.  So we'd
need to run the text through a sanitization algorithm for display.  But then we
probably couldn't successfully re-find it in the page if it had changed.  This
seems like a major problem, although testing Firefox it doesn't look like they
bother to solve it.

Another issue, though a solvable one, is that the interaction between "find" and
"find next" stops working well because the find bar state doesn't seem to get
updated correctly (the "last prepopulate text" is not updated so you wind up
searching for something other than what's selected when you hit ctrl-g).  This
is also somewhat an issue in Firefox in that if the find bar is open there and
you hit ctrl-f, the text is replaced with your selection, but hitting ctrl-g
does not replace things.  This seems unintuitive.

Besides these issues, this behavior just doesn't feel terribly compelling when
testing it.  Perhaps I'm too used to the existing Chrome behavior, but while I
expect prepopulation based on previous search strings in this or other tabs, I
don't really expect selecting text to change my search string, and it doesn't
feel terribly hard to sandwich the ctrl-f in a ctrl-c/ctrl-v pair to be
explicit, given that I've just selected what I want to search for.

Since Ben already voted against this and the above testing doesn't give me
strong counterarguments, I'm going ahead and closing.

Powered by Google App Engine
This is Rietveld 408576698