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 c9cf7111b946dbc0c44ac718eed6eca6bb15480c..194d915cccbc04cf70ee057924b2f9cfc530ecc9 100644 |
| --- a/chrome/browser/ui/views/omnibox/omnibox_view_views.cc |
| +++ b/chrome/browser/ui/views/omnibox/omnibox_view_views.cc |
| @@ -128,7 +128,7 @@ OmniboxViewViews::OmniboxViewViews(OmniboxEditController* controller, |
| ime_candidate_window_open_(false), |
| select_all_on_mouse_release_(false), |
| select_all_on_gesture_tap_(false), |
| - weak_ptr_factory_(this) { |
| + weak_ptr_factory_(this){ |
|
Peter Kasting
2016/09/30 22:47:26
Do not remove space
|
| SetBorder(views::Border::NullBorder()); |
| set_id(VIEW_ID_OMNIBOX); |
| SetFontList(font_list); |
| @@ -766,6 +766,10 @@ void OmniboxViewViews::OnFocus() { |
| SelectRange(saved_selection_for_focus_change_); |
| saved_selection_for_focus_change_ = gfx::Range::InvalidRange(); |
| } |
| + |
| + // Re-focusing, hint is visible |
| + if (model()->is_keyword_hint()) |
| + location_bar_view_->Layout(); |
|
Peter Kasting
2016/09/30 22:47:26
Why make these calls here and not in the LocationB
|
| } |
| void OmniboxViewViews::OnBlur() { |
| @@ -794,6 +798,10 @@ void OmniboxViewViews::OnBlur() { |
| // The location bar needs to repaint without a focus ring. |
| if (ui::MaterialDesignController::IsModeMaterial()) |
| location_bar_view_->SchedulePaint(); |
| + |
| + // Hint is being visible. If losing focus, hint is invisible. |
| + if (model()->is_keyword_hint()) |
| + location_bar_view_->Layout(); |
| } |
| bool OmniboxViewViews::IsCommandIdEnabled(int command_id) const { |