Chromium Code Reviews| Index: chrome/browser/ui/views/omnibox/omnibox_view_views.cc |
| diff --git a/chrome/browser/ui/views/omnibox/omnibox_view_views.cc b/chrome/browser/ui/views/omnibox/omnibox_view_views.cc |
| index 0f22b6ee6e9593c66759e2e7ab82f406c59e5b0f..c59c552599b666186a26238a7008e7060286eb8b 100644 |
| --- a/chrome/browser/ui/views/omnibox/omnibox_view_views.cc |
| +++ b/chrome/browser/ui/views/omnibox/omnibox_view_views.cc |
| @@ -774,6 +774,10 @@ void OmniboxViewViews::OnFocus() { |
| SelectRange(saved_selection_for_focus_change_); |
| saved_selection_for_focus_change_ = gfx::Range::InvalidRange(); |
| } |
| + |
| + // Re-focusing, keyword hint is visible. |
| + if (model()->is_keyword_hint()) |
| + location_bar_view_->Layout(); |
| } |
| void OmniboxViewViews::OnBlur() { |
| @@ -801,6 +805,10 @@ void OmniboxViewViews::OnBlur() { |
| // The location bar needs to repaint without a focus ring. |
| location_bar_view_->SchedulePaint(); |
| + |
| + // Hint is being visible. If losing focus, Keyword hint is invisible. |
|
Peter Kasting
2017/02/25 05:23:09
Nit: I would say "Focus changes can affect the vis
|
| + if (model()->is_keyword_hint()) |
| + location_bar_view_->Layout(); |
|
Peter Kasting
2017/02/25 05:23:09
This block should go above the SchedulePaint() cal
|
| } |
| bool OmniboxViewViews::IsCommandIdEnabled(int command_id) const { |