Create initial Mac NativeTheme color mappings for color pipeline
This creates the initial set and additionally partially fixes an issue where the NativeThemeRedirectedEquivalenceTest.NativeUiGetSystemColor tests weren't doing the correct thing around the Mac system overrides. On light mode, anything overridden wasn't actually getting to the color pipeline code because of the other returns. In dark mode, the check intended for checking if you were in an incognito window was passing and pushing the code through NativeTheme::GetSystem color without getting the overrides in either mode. This is only a partial fix because there is a broader issue with how the Mac handles light/dark with the NSAppearance. This gets applied at the app or window level so anything that gets a named NSColor actually is still getting a color based on that NSAppearance, not the passed in ColorScheme. This is a bigger architectural question on how/if it can be resolved which will need to be done in a later change. This also moves NSSystemColorToSkColor to skia_utils_mac so it can be used by both the old and new color systems without code duplication. Bug: 1003612 Change-Id: Ifb5166166dafda83f0a97fbb1c2a3b407927b68d Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2147925 Commit-Queue: John Smith <johnsm@microsoft.com> Reviewed-by:Peter Kasting <pkasting@chromium.org> Reviewed-by:
Florin Malita <fmalita@chromium.org> Cr-Commit-Position: refs/heads/master@{#761148}
Showing
This diff is collapsed.
Please register or sign in to comment