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 e8754b5909bb2feddc4af1033649637bc021f4cb..0f2a27e8daf32396dc31d3ee3ce99e903e94e1f1 100644 |
--- a/chrome/browser/ui/views/location_bar/location_bar_view.cc |
+++ b/chrome/browser/ui/views/location_bar/location_bar_view.cc |
@@ -637,14 +637,15 @@ void LocationBarView::Layout() { |
} |
// Because IMEs may eat the tab key, we don't show "press tab to search" while |
// IME composition is in progress. |
- if (!keyword.empty() && omnibox_view_->model()->is_keyword_hint() && |
- !omnibox_view_->IsImeComposing()) { |
- trailing_decorations.AddDecoration(vertical_padding, location_height, true, |
- 0, item_padding, item_padding, |
- keyword_hint_view_); |
- if (keyword_hint_view_->keyword() != keyword) |
- keyword_hint_view_->SetKeyword(keyword); |
+ if (HasFocus() && !keyword.empty() && omnibox_view_->model()->is_keyword_hint() && |
Peter Kasting
2016/09/30 22:47:26
80 columns
|
+ !omnibox_view_->IsImeComposing()) { |
Peter Kasting
2016/09/30 22:47:26
Spaces, not tabs
|
+ trailing_decorations.AddDecoration(vertical_padding, location_height, true, |
+ 0, item_padding, item_padding, |
+ keyword_hint_view_); |
+ if (keyword_hint_view_->keyword() != keyword) |
Peter Kasting
2016/09/30 22:47:26
Do not add trailing space
|
+ keyword_hint_view_->SetKeyword(keyword); |
} |
+ |
Peter Kasting
2016/09/30 22:47:26
Do not add second blank line
|
// Perform layout. |
int full_width = width() - (2 * edge_thickness); |