summaryrefslogtreecommitdiffstats
path: root/chrome/browser/autocomplete
diff options
context:
space:
mode:
authorshess@chromium.org <shess@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-07-13 16:37:15 +0000
committershess@chromium.org <shess@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-07-13 16:37:15 +0000
commitad98be36946d16a296d86b80f3f59e7eabc917c2 (patch)
tree90f11b4724d4a92a98e3b34a10e41e8e82d92bea /chrome/browser/autocomplete
parent1d5980af2fbdc5820784d7eb01755940838d0e10 (diff)
downloadchromium_src-ad98be36946d16a296d86b80f3f59e7eabc917c2.zip
chromium_src-ad98be36946d16a296d86b80f3f59e7eabc917c2.tar.gz
chromium_src-ad98be36946d16a296d86b80f3f59e7eabc917c2.tar.bz2
[Mac] Remove guard on FocusLocation() in autocomplete field.
I went auditing around, and AFAICT all remaining callers should be fine with selecting everything. http://crbug.com/12246 TEST=Type some stuff in address bar. With cursor in bar, Command-l should select all. Review URL: http://codereview.chromium.org/149492 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@20493 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/autocomplete')
-rw-r--r--chrome/browser/autocomplete/autocomplete_edit_view_mac.h2
-rw-r--r--chrome/browser/autocomplete/autocomplete_edit_view_mac.mm9
2 files changed, 3 insertions, 8 deletions
diff --git a/chrome/browser/autocomplete/autocomplete_edit_view_mac.h b/chrome/browser/autocomplete/autocomplete_edit_view_mac.h
index 6c7ccfb..9b22412 100644
--- a/chrome/browser/autocomplete/autocomplete_edit_view_mac.h
+++ b/chrome/browser/autocomplete/autocomplete_edit_view_mac.h
@@ -100,7 +100,7 @@ class AutocompleteEditViewMac : public AutocompleteEditView {
void AcceptInput(WindowOpenDisposition disposition, bool for_drop);
- // Helper for LocationBarBridge.
+ // Helper for LocationBarViewMac. Selects all in |field_|.
void FocusLocation();
private:
diff --git a/chrome/browser/autocomplete/autocomplete_edit_view_mac.mm b/chrome/browser/autocomplete/autocomplete_edit_view_mac.mm
index df8eb53..6cb0f84 100644
--- a/chrome/browser/autocomplete/autocomplete_edit_view_mac.mm
+++ b/chrome/browser/autocomplete/autocomplete_edit_view_mac.mm
@@ -561,13 +561,8 @@ void AutocompleteEditViewMac::AcceptInput(
}
void AutocompleteEditViewMac::FocusLocation() {
- // -makeFirstResponder: will select the entire field_. If we're
- // already firstResponder, it's likely that we want to retain the
- // current selection.
- if (![field_ currentEditor]) {
- [[field_ window] makeFirstResponder:field_];
- DCHECK_EQ([field_ currentEditor], [[field_ window] firstResponder]);
- }
+ [[field_ window] makeFirstResponder:field_];
+ DCHECK_EQ([field_ currentEditor], [[field_ window] firstResponder]);
}
@implementation AutocompleteFieldDelegate