New issue
Advanced search Search tips

Issue 860295 link

Starred by 2 users

Issue metadata

Status: Fixed
Owner:
Closed: Jul 18
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Chrome
Pri: 1
Type: Bug



Sign in to add a comment

Omnibox padding inconsistent in Touchable Refresh

Project Member Reported by pkasting@chromium.org, Jul 4

Issue description

In Touchable Refresh, the padding around the location bar icon is inconsistent, so the text jumps around while typing and isn't always aligned with the dropdown.  This doesn't happen in Refresh mode.
 
Cc: tommycli@chromium.org
Owner: manukh@chromium.org
Labels: Group-Omnibox
Status: Started (was: Assigned)
caused by certain omnibox icons (e.g. the globe when you type in a url) being larger than other icons (e.g. the G when your default search provider is Google and you type in a search query.

Not sure if we would prefer to enlarge the icons (or use alternate larger icons), or retain the current icon sizes but add padding to compensate.
I think if you size the location bar's icon view based on the largest size (which is presumably the size of the built-in icons and not the favicons?), everything might Just Work, since that view probably centers the actual image within the provided space.
I'll give that a try. Assuming both options work (increasing location bar icon view size & scaling the icon itself), which would be preferable? Perhaps scaling the icon is preferable for consistent and larger icon sizing.
It probably depends on whether the issue is tied to the scale factor, or just to being in touchable mode.  Scaling icons is rarely the right thing to do, but sometimes it is.  So I can't answer for you without spending a lot of time to think through the problem.
Project Member

Comment 8 by bugdroid1@chromium.org, Jul 17

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/56aa59358de9dafb974c28f7b26f96878a16fa6b

commit 56aa59358de9dafb974c28f7b26f96878a16fa6b
Author: manuk <manukh@chromium.org>
Date: Tue Jul 17 16:45:49 2018

Avoid jumping omnibox text in touch layouts caused by varying location bar icon sizes.

In the touch layouts, LOCATION_BAR_ICON_SIZE is 20, but kFaviconSize is 16, leading to different location bar icon image sizes depending on what icon is displayed and causing the omnibox text to jump when the icon size changes. For example, when typing a url, the 20px globe icon is displayed; wheras when typing a search url, the default search provider's favicon is displayed if available, which for Google is the 16px G icon. To avoid this, we set the location bar icon's size as LOCATION_BAR_ICON_SIZE, which is large enough to contain all icons. This is not an issue in other layouts, where both constants are 16.

Bug:  860295 
Cq-Include-Trybots: luci.chromium.try:ios-simulator-full-configs;master.tryserver.chromium.mac:ios-simulator-cronet
Change-Id: Ie9bc7a1b0b6b5a1f3dc6f4d2239d8fc2305c5063
Reviewed-on: https://chromium-review.googlesource.com/1135700
Commit-Queue: manuk hovanesian <manukh@chromium.org>
Reviewed-by: Justin Donnelly <jdonnelly@chromium.org>
Cr-Commit-Position: refs/heads/master@{#575675}
[modify] https://crrev.com/56aa59358de9dafb974c28f7b26f96878a16fa6b/chrome/browser/ui/omnibox/chrome_omnibox_client.cc
[modify] https://crrev.com/56aa59358de9dafb974c28f7b26f96878a16fa6b/chrome/browser/ui/omnibox/chrome_omnibox_client.h
[modify] https://crrev.com/56aa59358de9dafb974c28f7b26f96878a16fa6b/chrome/browser/ui/views/omnibox/omnibox_popup_contents_view.cc
[modify] https://crrev.com/56aa59358de9dafb974c28f7b26f96878a16fa6b/components/omnibox/browser/omnibox_client.cc
[modify] https://crrev.com/56aa59358de9dafb974c28f7b26f96878a16fa6b/components/omnibox/browser/omnibox_client.h
[modify] https://crrev.com/56aa59358de9dafb974c28f7b26f96878a16fa6b/components/omnibox/browser/omnibox_popup_model.cc
[modify] https://crrev.com/56aa59358de9dafb974c28f7b26f96878a16fa6b/components/omnibox/browser/omnibox_view.cc

Status: Fixed (was: Started)
Fixed and verified in today's Windows Canary (69.0.3495.0).

Sign in to add a comment