summaryrefslogtreecommitdiffstats
path: root/chrome/browser/autocomplete/autocomplete_popup_view_mac.mm
diff options
context:
space:
mode:
authorshess@chromium.org <shess@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-10-15 23:05:07 +0000
committershess@chromium.org <shess@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-10-15 23:05:07 +0000
commite9ccfe39326c10720e3b284c16e8c0bf96c965b5 (patch)
tree7438f7e470a0400417554b83681217bb04b17467 /chrome/browser/autocomplete/autocomplete_popup_view_mac.mm
parent9c1981c591996af8fdbce5dcb0d2d473e7383e5e (diff)
downloadchromium_src-e9ccfe39326c10720e3b284c16e8c0bf96c965b5.zip
chromium_src-e9ccfe39326c10720e3b284c16e8c0bf96c965b5.tar.gz
chromium_src-e9ccfe39326c10720e3b284c16e8c0bf96c965b5.tar.bz2
[Mac] Trim Omnibox hints as field shrinks.
When user text doesn't fit with the full hint: "Type to search" hint goes away "Tab to search" condenses to "Tab" "Search Engine:" is truncated http://crbug.com/20285 TEST=Type a sentence. Resize window to see if type-hint goes away. TEST=Type "google". Resize window to see if tab-hint goes away. TEST=Type "google" then TAB, then sentence. Resize window to see if "Search Google:" is truncated. TEST=In all cases, text should not scroll before truncation (though it might move as part of truncation). Review URL: http://codereview.chromium.org/262034 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@29202 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/autocomplete/autocomplete_popup_view_mac.mm')
-rw-r--r--chrome/browser/autocomplete/autocomplete_popup_view_mac.mm25
1 files changed, 0 insertions, 25 deletions
diff --git a/chrome/browser/autocomplete/autocomplete_popup_view_mac.mm b/chrome/browser/autocomplete/autocomplete_popup_view_mac.mm
index 0a553a5..97670b8 100644
--- a/chrome/browser/autocomplete/autocomplete_popup_view_mac.mm
+++ b/chrome/browser/autocomplete/autocomplete_popup_view_mac.mm
@@ -302,9 +302,6 @@ NSAttributedString* AutocompletePopupViewMac::MatchText(
// Call |popup_view_| OnMiddleClick().
- (void)middleSelect:(id)sender;
-// Resize the popup when the field's window resizes.
-- (void)windowDidResize:(NSNotification*)notification;
-
@end
AutocompletePopupViewMac::AutocompletePopupViewMac(
@@ -363,13 +360,6 @@ void AutocompletePopupViewMac::CreatePopupIfNeeded() {
[matrix setAction:@selector(select:)];
[matrix setMiddleClickAction:@selector(middleSelect:)];
[popup_ setContentView:matrix];
-
- // We need the popup to follow window resize.
- NSNotificationCenter *nc = [NSNotificationCenter defaultCenter];
- [nc addObserver:matrix_target_
- selector:@selector(windowDidResize:)
- name:NSWindowDidResizeNotification
- object:[field_ window]];
}
}
@@ -383,11 +373,6 @@ void AutocompletePopupViewMac::UpdatePopupAppearance() {
NSMatrix* matrix = [popup_ contentView];
[matrix setTarget:nil];
- NSNotificationCenter *nc = [NSNotificationCenter defaultCenter];
- [nc removeObserver:matrix_target_
- name:NSWindowDidResizeNotification
- object:[field_ window]];
-
popup_.reset(nil);
return;
@@ -736,14 +721,4 @@ void AutocompletePopupViewMac::OnMiddleClick() {
popup_view_->OnMiddleClick();
}
-- (void)windowDidResize:(NSNotification*)notification {
- DCHECK(popup_view_);
-
- // TODO(shess): UpdatePopupAppearance() is called frequently, so it
- // should be really cheap, but in this case we could probably make
- // things even cheaper by refactoring between the popup-placement
- // code and the matrix-population code.
- popup_view_->UpdatePopupAppearance();
-}
-
@end