summaryrefslogtreecommitdiffstats
path: root/chrome/browser/ui/views/find_bar_host.cc
diff options
context:
space:
mode:
authorpkotwicz@chromium.org <pkotwicz@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-03-16 00:01:17 +0000
committerpkotwicz@chromium.org <pkotwicz@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-03-16 00:01:17 +0000
commit27e7a0550418ae72e0eea96ddca65d43f559103a (patch)
tree657431ef8613aae33a083d838c0d585476c414ee /chrome/browser/ui/views/find_bar_host.cc
parent5e9ca8a510914662f4795ac43fa0b35ef5e449d3 (diff)
downloadchromium_src-27e7a0550418ae72e0eea96ddca65d43f559103a.zip
chromium_src-27e7a0550418ae72e0eea96ddca65d43f559103a.tar.gz
chromium_src-27e7a0550418ae72e0eea96ddca65d43f559103a.tar.bz2
The find bar can move off of its location at the right hand corner of the screen if it is obscuring text that it has found.
However, you can get the find bar to be empty and in the middle of the screen if you press the correct key combinations. In the case of the 'Settings' page 1) Type a 2) Type backspace This patch makes the find bar return to its home location at the right hand corner of the screen when it has no text. The find bar should also go back to its home location if there are no matches. For instance: Note, the find bar will stay in the center of the screen if 1) It has moved to the center of the screen to reveal selected text 2) More text is entered such that there is no 'found text' eg type 'ae' on settings page. BUG=116286 TEST=FindInPageControllerTest.FindMovesWhenObscuring Review URL: https://chromiumcodereview.appspot.com/9564044 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@127037 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/ui/views/find_bar_host.cc')
-rw-r--r--chrome/browser/ui/views/find_bar_host.cc3
1 files changed, 1 insertions, 2 deletions
diff --git a/chrome/browser/ui/views/find_bar_host.cc b/chrome/browser/ui/views/find_bar_host.cc
index 2705e24..c3e7018 100644
--- a/chrome/browser/ui/views/find_bar_host.cc
+++ b/chrome/browser/ui/views/find_bar_host.cc
@@ -142,8 +142,7 @@ void FindBarHost::UpdateUIForFindResult(const FindNotificationDetails& result,
find_bar_view()->UpdateForResult(result, find_text);
// We now need to check if the window is obscuring the search results.
- if (!result.selection_rect().IsEmpty())
- MoveWindowIfNecessary(result.selection_rect(), false);
+ MoveWindowIfNecessary(result.selection_rect(), false);
// Once we find a match we no longer want to keep track of what had
// focus. EndFindSession will then set the focus to the page content.