Commit d9755fd2 authored by Tommy Li's avatar Tommy Li Committed by Commit Bot

[omnibox] Headers: Fix click through header to bookmark bar on MacOS

We previously added a top inset to section headers to pad it from the
results with no headers.

We didn't consider that the section header could be in the top position.

This leads to some extra margin for no reason, and also leads to being
able to click through the popup onto the bookmark bar on MacOS.

This CL fixes that. We should merge this to M86 as it's a trivial fix.

Bug: 1130812
Change-Id: Ife0e81c343465e6c8624eeecbea7672e9028be93
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2422887
Auto-Submit: Tommy Li <tommycli@chromium.org>
Commit-Queue: Orin Jaworski <orinj@chromium.org>
Reviewed-by: default avatarOrin Jaworski <orinj@chromium.org>
Cr-Commit-Position: refs/heads/master@{#809147}
parent 16bed352
......@@ -303,7 +303,7 @@ views::View* OmniboxRowView::GetActiveAuxiliaryButtonForAccessibility() const {
gfx::Insets OmniboxRowView::GetInsets() const {
// A visible header means this is the start of a new section. Give the section
// that just ended an extra 4dp of padding. https://crbug.com/1076646
if (header_view_ && header_view_->GetVisible())
if (line_ != 0 && header_view_ && header_view_->GetVisible())
return gfx::Insets(4, 0, 0, 0);
return gfx::Insets();
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment