commit | 0d7ebfdf51a4c76d023b5171172f7a4d6966d3e5 | [log] [tgz] |
---|---|---|
author | Peter Kasting <pkasting@chromium.org> | Wed Jan 16 16:17:39 2019 |
committer | Commit Bot <commit-bot@chromium.org> | Wed Jan 16 16:17:39 2019 |
tree | d64372b2d55ca671299c319e3b06755c7912b96c | |
parent | 200d78d850f5f04322c02bd399e204c3b98b8c2d [diff] |
Remove GetThemedAssetColor(). This method was first added in http://crrev.com/550045 to fix bug 814121 by matching Clank behavior. It was then generalized in http://crrev.com/592661 to apply to more cases. Unfortunately, the Clank behavior does not guarantee sufficient contrast to meet WCAG AA standards. It guarantees contrast 3 against darker colors, when the minimum for text is 4.5; and it uses 64% black otherwise, which with the 3 threshold only guarantees a contrast ratio of ~4. This patch removes the special "themed" path and uses the normal path for caption colors, and restores auto color readability to labels. The net result of this is that: * On opaque frame (Linux, Win 7 non-Aero, some themes), title and caption buttons will use the color that contrasts most with the background, between white and GG900 (the Material Refresh "darkest color"). * On glass frame (Win 7 Aero, Win 10), the behavior is very similar, but uses black instead of GG900 and a "luma midpoint" instead of luminance midpoint check. These better match native. * On Ash, caption buttons use GG200 or GG700, but will push the contrast up until it reaches at least 3. Window titles, which use auto color readability, will further push the contrast of this color to try and reach 4.5. Effectively, bug 883177, which was originally fixed by moving Linux and Win 7 toward CrOS, is largely WontFixed, but hopefully the caption button colors and title text are now more consistent; and bug 814121, which was fixed by matching Clank, is instead fixed by enforcing minimum contrast ratios. As a nice bonus, this is noticeably simpler. Bug: 883177 Change-Id: I0803617c9dfd7e2a27ef399c89ba64d1eec98867 Reviewed-on: https://chromium-review.googlesource.com/c/1407264 Commit-Queue: Peter Kasting <pkasting@chromium.org> Reviewed-by: Alan Cutter <alancutter@chromium.org> Reviewed-by: Scott Violet <sky@chromium.org> Cr-Commit-Position: refs/heads/master@{#623253}
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.
Documentation in the source is rooted in docs/README.md.
Learn how to Get Around the Chromium Source Code Directory Structure .