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..32a8ac8cb9e6ae37d41b2dcee20368123b120aa1 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. |
|
Peter Kasting
2017/03/07 04:11:23
Nit: Use the same comment here as you changed to b
|
| + if (model()->is_keyword_hint()) |
| + location_bar_view_->Layout(); |
| } |
| void OmniboxViewViews::OnBlur() { |
| @@ -799,6 +803,10 @@ void OmniboxViewViews::OnBlur() { |
| // Make sure the beginning of the text is visible. |
| SelectRange(gfx::Range(0)); |
| + // Focus changes can affect the visibility of any keyword hint. |
| + if (model()->is_keyword_hint()) |
| + location_bar_view_->Layout(); |
| + |
| // The location bar needs to repaint without a focus ring. |
| location_bar_view_->SchedulePaint(); |
| } |