Skip to content

Commit

Permalink
[omnibox] Hide keyword hint if suggestion button row is enabled
Browse files Browse the repository at this point in the history
Bug: 1046523
Change-Id: Ie25435820d7ebbb67b884638fd4add05a7011c3e
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2341840
Reviewed-by: Tommy Li <tommycli@chromium.org>
Reviewed-by: Orin Jaworski <orinj@chromium.org>
Commit-Queue: Angela Yoeurng <yoangela@chromium.org>
Cr-Commit-Position: refs/heads/master@{#796072}
  • Loading branch information
Angela Yoeurng authored and Commit Bot committed Aug 7, 2020
1 parent fc9217e commit a36ae47
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions chrome/browser/ui/views/location_bar/location_bar_view.cc
Original file line number Diff line number Diff line change
Expand Up @@ -576,8 +576,10 @@ 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 (HasFocus() && !keyword.empty() &&
omnibox_view_->model()->is_keyword_hint() &&
// The keyword hint is also not shown when the Button Row is enabled since
// it's now redundant with the keyword button and is no longer accurate.
if (!OmniboxFieldTrial::IsSuggestionButtonRowEnabled() && HasFocus() &&
!keyword.empty() && omnibox_view_->model()->is_keyword_hint() &&
!omnibox_view_->IsImeComposing()) {
trailing_decorations.AddDecoration(vertical_padding, location_height, true,
0, edge_padding, keyword_hint_view_);
Expand Down

0 comments on commit a36ae47

Please sign in to comment.