commit | 9a69785f81c63534ca6526e4a3fb2b162d9763cb | [log] [tgz] |
---|---|---|
author | Rune Lillesveen <futhark@chromium.org> | Wed Oct 06 10:33:42 2021 |
committer | Chromium LUCI CQ <chromium-scoped@luci-project-accounts.iam.gserviceaccount.com> | Wed Oct 06 10:33:42 2021 |
tree | dc09cdd8911855a33156081193bea057a0038780 | |
parent | 273bdf36b5098fda0e75b86496a51c2bbf06c9f5 [diff] |
Implement color-scheme override per spec For elements with color-scheme 'light', the color-scheme will be forced to dark, and forced darkening will be performed on colors and images as necessary. For elements with color-scheme 'dark', no forced darkening will be applied. For elements with 'only light', the color-scheme will stay light, and no force darkening will be applied. This behavior is behind a runtime flag. With that runtime flag disabled, 'only light' will behave as 'light'. There are two main changes that will affect the forced darkening in WebView/WebLayer, and align it with the browser behavior: 1. The preferred color-scheme is now what is passed in via web preferences. We previously forced the preferred color-scheme to light in StyleEngine even for PREFER_MEDIA_QUERY_OVER_FORCE_DARK, which was a bug. 2. The color-scheme property will be forced to dark for all elements except those with 'only light'. That means we will render forms using dark UA styling instead of forcing light form controls to dark via GraphicsContext. Also, system colors will resolve to their dark version for forced darkening and not use the light versions and then invert them. Bug: 1224806, 1228057 Change-Id: I0695f1bc1df6fd0de721e6bd73681dbbd479c77e Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3137693 Commit-Queue: Rune Lillesveen <futhark@chromium.org> Reviewed-by: Michael Bai <michaelbai@chromium.org> Reviewed-by: Peter Beverloo <peter@chromium.org> Reviewed-by: Philip Rogers <pdr@chromium.org> Cr-Commit-Position: refs/heads/main@{#928615}
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.