| Index: chrome/browser/ui/views/location_bar/location_bar_view.cc
|
| diff --git a/chrome/browser/ui/views/location_bar/location_bar_view.cc b/chrome/browser/ui/views/location_bar/location_bar_view.cc
|
| index 9a8d6fbfe8435ec6654feeb046fcc35748558421..c24b5149303e8740457b69056e35b9c120f4bc2e 100644
|
| --- a/chrome/browser/ui/views/location_bar/location_bar_view.cc
|
| +++ b/chrome/browser/ui/views/location_bar/location_bar_view.cc
|
| @@ -178,8 +178,7 @@ void LocationBarView::Init() {
|
| }
|
|
|
| // If this makes the font too big, try to make it smaller so it will fit.
|
| - const int height =
|
| - std::max(GetPreferredSize().height() - (kVerticalEdgeThickness * 2), 0);
|
| + const int height = GetHeight();
|
| while ((font_.GetHeight() > height) && (font_.GetFontSize() > 1))
|
| font_ = font_.DeriveFont(-1);
|
|
|
| @@ -1276,6 +1275,11 @@ void LocationBarView::Observe(int type,
|
| }
|
| }
|
|
|
| +int LocationBarView::GetHeight() {
|
| + return std::max(
|
| + GetPreferredSize().height() - (kVerticalEdgeThickness * 2), 0);
|
| +}
|
| +
|
| #if defined(OS_WIN) || defined(USE_AURA)
|
| bool LocationBarView::HasValidSuggestText() const {
|
| return suggested_text_view_ && !suggested_text_view_->size().IsEmpty() &&
|
|
|