| Index: chrome/browser/ui/views/location_bar/selected_keyword_view.cc
|
| diff --git a/chrome/browser/ui/views/location_bar/selected_keyword_view.cc b/chrome/browser/ui/views/location_bar/selected_keyword_view.cc
|
| index 53c7ccadc2bcf319ebc710c1494847990cb843a3..b932f0be7f4ab600137cc1eac5552c4223672456 100644
|
| --- a/chrome/browser/ui/views/location_bar/selected_keyword_view.cc
|
| +++ b/chrome/browser/ui/views/location_bar/selected_keyword_view.cc
|
| @@ -23,6 +23,7 @@
|
| SelectedKeywordView::SelectedKeywordView(const gfx::FontList& font_list,
|
| Profile* profile)
|
| : IconLabelBubbleView(font_list, false), profile_(profile) {
|
| + set_can_process_events_within_subtree(false);
|
| full_label_.SetFontList(font_list);
|
| full_label_.SetVisible(false);
|
| partial_label_.SetFontList(font_list);
|
| @@ -51,7 +52,7 @@ gfx::Size SelectedKeywordView::GetPreferredSize() const {
|
|
|
| gfx::Size SelectedKeywordView::GetMinimumSize() const {
|
| // Height will be ignored by the LocationBarView.
|
| - return GetSizeForLabelWidth(partial_label_.GetMinimumSize().width());
|
| + return GetSizeForLabelWidth(partial_label_.GetPreferredSize().width());
|
| }
|
|
|
| void SelectedKeywordView::Layout() {
|
| @@ -79,14 +80,7 @@ void SelectedKeywordView::SetKeyword(const base::string16& keyword) {
|
| : l10n_util::GetStringFUTF16(IDS_OMNIBOX_KEYWORD_TEXT_MD, short_name);
|
| full_label_.SetText(full_name);
|
|
|
| - const base::string16 min_string(
|
| - location_bar_util::CalculateMinString(short_name));
|
| - const base::string16 partial_name =
|
| - is_extension_keyword
|
| - ? min_string
|
| - : l10n_util::GetStringFUTF16(IDS_OMNIBOX_KEYWORD_TEXT_MD, min_string);
|
| - partial_label_.SetText(min_string.empty() ?
|
| - full_label_.text() : partial_name);
|
| + partial_label_.SetText(location_bar_util::CalculateMinString(short_name));
|
|
|
| // Update the label now so ShouldShowLabel() works correctly when the parent
|
| // class is calculating the preferred size. It will be updated again in
|
|
|