commit | c2c6adf51aa1290608d23bca6c94dd5018e2e6b3 | [log] [tgz] |
---|---|---|
author | Sam Davis Omekara <samomekarajr@microsoft.com> | Fri Feb 09 19:08:33 2024 |
committer | Chromium LUCI CQ <chromium-scoped@luci-project-accounts.iam.gserviceaccount.com> | Fri Feb 09 19:08:33 2024 |
tree | a2f7db5d7d74ec8b2ff354e9dd6741f8475e1b6e | |
parent | de9d7a737d6065f0eafda567f32d766b2eeb1a9a [diff] |
Resolve internal forced colors properties before used value time This CL moves the re-resolution of internal forced colors properties (specifically 'internal-forced-color', 'internal-forced-visited-color' and 'internal-forced-background-color') to occur before used value time. This is necessary because work is being done to remove system colors from being stored in the NativeTheme to being accessed from color providers that are associated with the Page(see CL:4898493). To access the color providers, we need to pass them from the document to the LayoutTheme::SystemColor method. However, this is problematic in StyleColor::Resolve, where we currently pass a boolean flag(`is_forced_colors`) to resolve the initial values for these forced color properties at used value time(see: CL:2529950). This was done because the initial values for these properties are defined as system colors in css_properties.json5 (e.g. StyleColor(CSSValueID::kCanvas)). These values are only computed once, so we need to recompute them to ensure they pick up the correct color on theme change. We want to remove this flag to avoid resolving any system colors at used value time, which will allow us to pass nullptr instead of a color provider when resolving colors in StyleColor::Resolve, since we do not have an easy way to access the provider at this point in the rendering pipeline. To solve this, we re-resolve the initial values of these properties in the StyleAdjuster class to avoid the need for re-resolution at used value time. Also, we propagate the `internal-forced-background-color` from the root to the viewport when forced colors is enabled. Bug: 1430181 Change-Id: I5c12bff59c8ae7d760ffc34dd6d4d2d050bf0019 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5181788 Reviewed-by: Anders Hartvoll Ruud <andruud@chromium.org> Reviewed-by: Alison Maher <almaher@microsoft.com> Commit-Queue: Sam Davis Omekara <samomekarajr@microsoft.com> Cr-Commit-Position: refs/heads/main@{#1258657}
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.