| commit | 8ed8262db6300d50ce6a33dc8aa0932b973949dc | [log] [tgz] |
|---|---|---|
| author | Nick Burris <nburris@chromium.org> | Tue Feb 21 17:23:59 2023 |
| committer | Chromium LUCI CQ <chromium-scoped@luci-project-accounts.iam.gserviceaccount.com> | Tue Feb 21 17:23:59 2023 |
| tree | 0748ee420243f224e89efd9192341171c71107b2 | |
| parent | f29b8f317309374a9f5cc24b073ef5d9200b6c37 [diff] |
[PaymentHandler] Fix dark mode colors The payment handler web flow view currently sets colors based on the Chrome theme. This causes issues when the payment handler web view sets a theme color, which overrides the payment handler header color, e.g. the Chrome theme may be dark mode but the payment handler sets a light theme. This patch sets the header colors based on the background (theme) color, as close as possible to their default theme colors based on whether the background is light or dark, while also ensuring minimum contrast for readability and visibility where applicable. The title text was previously being set to contrast the actual background, but using GetColorWithMaxContrast which returns full-white or a dark black which are unnecessarily high contrast. The other header elements were just set colored using the chrome theme and therefore did not correctly contrast with a custom header color. This change is entirely gated by PaymentHandlerMinimalHeaderUX because it is a related and somewhat complex UI change, and the logic would be more complex to fix this across both header implementations. Bug: 1152182 Change-Id: I5b01dbe79d7e5b32702b21eed579718275787130 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4258325 Reviewed-by: Stephen McGruer <smcgruer@chromium.org> Commit-Queue: Nick Burris <nburris@chromium.org> Cr-Commit-Position: refs/heads/main@{#1107800}
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.