DescriptionMacViews: Handle System colors that have no alpha channel
Sometimes, [NSColor controlColor] returns "white". With no alpha. This
causes a failed CHECK().
This should be covered by NativeThemeMacTest.SystemColorsExist, but
AppKit doesn't cooperate there. In native_theme_unittests,
native_theme->GetSystemColor(kColorId_UnfocusedBorderColor) always gives
0xffe8e8e8. However, in the same Chrome process [NSColor controlColor]
can return both 0x??ffffff and 0xffe8e8e8 when opening up the
toolkit-views task manager.
This is probably an AppKit bug, but we shouldn't trust AppKit to give us
alpha channels anyway. So, this CL adds handling for single-component
system colors.
BUG=424040, 379086
Committed: https://crrev.com/d339eed0928759ab8082dd9944541699bea97512
Cr-Commit-Position: refs/heads/master@{#300066}
Patch Set 1 #Patch Set 2 : Make sure it is not 0 either #
Total comments: 2
Patch Set 3 : update comment #Messages
Total messages: 8 (2 generated)
|