diff options
author | finnur@chromium.org <finnur@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-06-04 22:26:01 +0000 |
---|---|---|
committer | finnur@chromium.org <finnur@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-06-04 22:26:01 +0000 |
commit | d6e8d33d3cac179789c985c1c4f03c0885dd8bba (patch) | |
tree | ad1db35e7a603e955f4e69367c0495414f16adae /chrome/browser/find_bar_controller.cc | |
parent | e43cf994ac0b0840c6712346d8a8788c4a71574a (diff) | |
download | chromium_src-d6e8d33d3cac179789c985c1c4f03c0885dd8bba.zip chromium_src-d6e8d33d3cac179789c985c1c4f03c0885dd8bba.tar.gz chromium_src-d6e8d33d3cac179789c985c1c4f03c0885dd8bba.tar.bz2 |
Fix: Clearing search 'foo', closing and reopening Find
should not prepopulate with 'foo'.
We need to reset the remembered values when the user
clears the search term from the Find box to prevent
them from showing up on close+Reopen and on close+F3.
Added test to cover these cases.
This change also makes sure we don't clear the Find
string when we don't need to, which was happening on
close of the Find box and on new tab, causing the
fix not to work.
BUG=42639
TEST=Covered by new automated test.
Review URL: http://codereview.chromium.org/2322006
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@48984 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/find_bar_controller.cc')
-rw-r--r-- | chrome/browser/find_bar_controller.cc | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/chrome/browser/find_bar_controller.cc b/chrome/browser/find_bar_controller.cc index 954cab9..8443cf6 100644 --- a/chrome/browser/find_bar_controller.cc +++ b/chrome/browser/find_bar_controller.cc @@ -47,7 +47,9 @@ void FindBarController::EndFindSession(SelectionAction action) { // for now, so that we can abort the scoping effort and clear all the // tickmarks and highlighting. tab_contents_->StopFinding(action); - find_bar_->ClearResults(tab_contents_->find_result()); + + if (action != kKeepSelection) + find_bar_->ClearResults(tab_contents_->find_result()); // When we get dismissed we restore the focus to where it belongs. find_bar_->RestoreSavedFocus(); |