commit | cc7b6422a2c82f2e742af34c9519fee21ed38b51 | [log] [tgz] |
---|---|---|
author | Ernest Nguyen Hung <ernn@google.com> | Wed Jun 04 15:38:43 2025 |
committer | Chromium LUCI CQ <chromium-scoped@luci-project-accounts.iam.gserviceaccount.com> | Wed Jun 04 15:38:43 2025 |
tree | d000ccc94a500f9884904b993eaab18364863fd2 | |
parent | 5ba2dcdd9d34df9b9a06e6b00f7711e79163f358 [diff] |
[Profiles] Fix layout insets calculation for avatar toolbar button `ToolbarButton::SetHighlight` may NOT clear the text immediately (it is delayed until the size is changed, see https://source.chromium.org/chromium/chromium/src/+/main:ui/views/controls/button/label_button.cc;l=332;drc=5318c4f11b274b13e333d54086ec1bfccdaea197). On the other hand, `AvatarToolbarButton::IsLabelPresentAndVisible` checks whether the text is empty. Calling it right after `ToolbarButton::SetHighlight` might lead to subtle bugs and incorrect layout insets as in the bug demonstrated below (recordings are internal only): Before: https://screencast.googleplex.com/cast/NjIxNzI2NjE1MTU1NTA3MnxjZTk4NWEzNi1hMQ After: https://screencast.googleplex.com/cast/NjA4NzU3MTA5MTIyNjYyNHwyOGNjOTE3Zi0zOA This started occurring after crrev.com/c/6607244 (because passing no text and no background triggers the delay logic, see https://source.chromium.org/chromium/chromium/src/+/main:chrome/browser/ui/views/toolbar/toolbar_button.cc;l=134;drc=7bb2f459f122ae9c3c3d46a443f85e67ca9f6754. Bug: 422384304 Change-Id: Id4b99dc962451e8b0f254b1012addc0b941aed0e Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6621062 Reviewed-by: David Roger <droger@chromium.org> Commit-Queue: Ernest Nguyen Hung <ernn@google.com> Cr-Commit-Position: refs/heads/main@{#1469313}
Chromium is an open-source browser project that aims to build a safer, faster, and more stable way for all users to experience the web.
The project's web site is https://www.chromium.org.
To check out the source code locally, don't use git clone
! Instead, follow the instructions on how to get the code.
Documentation in the source is rooted in docs/README.md.
Learn how to Get Around the Chromium Source Code Directory Structure.
For historical reasons, there are some small top level directories. Now the guidance is that new top level directories are for product (e.g. Chrome, Android WebView, Ash). Even if these products have multiple executables, the code should be in subdirectories of the product.
If you found a bug, please file it at https://crbug.com/new.