commit | dbc75481cc094c4daf7337b0dc3d88ab198b57a2 | [log] [tgz] |
---|---|---|
author | Gastón Rodríguez <gastonr@microsoft.com> | Thu May 09 19:55:00 2024 |
committer | Chromium LUCI CQ <chromium-scoped@luci-project-accounts.iam.gserviceaccount.com> | Thu May 09 19:55:00 2024 |
tree | bfd88c492b2d001fe654f5f288b7db10c7fd7624 | |
parent | 70ca2528502759d229c1593ef907131fe58a11be [diff] |
Make browser_preferred_color_scheme light when custom theme is on. Issue: When chrome has a browser theme on that changes the browser's color and the user preferences are set to dark mode, UsedColorSchemeRootScrollbars makes root scrollbars be dark in pages where no color scheme is specified. This becomes an issue when the browser's theme is a light color, which contrasts too starkly with the dark scrollbars. To repro this issue, please see the attached bug. The `browser_preferred_color_scheme` flag is used to send the preferred color scheme from the browser process to blink in the renderer process to help with the selection of a color scheme for scrollbars. Fix: - This CL changes the `browser_preferred_color_scheme` browser setting to be set to the default value (kLight color scheme) when a custom theme is detected in the browser. With this change, UsedColorSchemeRootScrollbars doesn't override the root scrollbar by changing it to dark mode. - The `browser_preferred_color_scheme` setting is also being renamed to better represent what it pertains to, and is now called `preferred_root_scrollbar_color_scheme`. All the relevant references and functions have been renamed to reflect this. Bug: 337904215 Change-Id: I2517747f2a4cef061187daf4191c0fc8660d7fcd Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5502831 Reviewed-by: Yaroslav Shalivskyy <yshalivskyy@microsoft.com> Reviewed-by: Philip Rogers <pdr@chromium.org> Commit-Queue: Gaston Rodriguez <gastonr@microsoft.com> Reviewed-by: danakj <danakj@chromium.org> Cr-Commit-Position: refs/heads/main@{#1298816}
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.