diff options
author | shess@chromium.org <shess@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-10-15 23:05:07 +0000 |
---|---|---|
committer | shess@chromium.org <shess@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-10-15 23:05:07 +0000 |
commit | e9ccfe39326c10720e3b284c16e8c0bf96c965b5 (patch) | |
tree | 7438f7e470a0400417554b83681217bb04b17467 /chrome/browser/autocomplete/autocomplete_edit_view_mac.mm | |
parent | 9c1981c591996af8fdbce5dcb0d2d473e7383e5e (diff) | |
download | chromium_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_edit_view_mac.mm')
-rw-r--r-- | chrome/browser/autocomplete/autocomplete_edit_view_mac.mm | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/chrome/browser/autocomplete/autocomplete_edit_view_mac.mm b/chrome/browser/autocomplete/autocomplete_edit_view_mac.mm index c736c8f..79e9369 100644 --- a/chrome/browser/autocomplete/autocomplete_edit_view_mac.mm +++ b/chrome/browser/autocomplete/autocomplete_edit_view_mac.mm @@ -658,6 +658,17 @@ void AutocompleteEditViewMac::OnPasteAndGo() { model_->PasteAndGo(); } +void AutocompleteEditViewMac::OnFrameChanged() { + // 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(); + + // Give controller a chance to rearrange decorations. + controller_->OnChanged(); +} + bool AutocompleteEditViewMac::OnTabPressed() { if (model_->is_keyword_hint() && !model_->keyword().empty()) { model_->AcceptKeyword(); |