Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(543)

Issue 658033002: MacViews: Handle System colors that have no alpha channel (Closed)

Created:
6 years, 2 months ago by tapted
Modified:
6 years, 2 months ago
Reviewers:
Avi (use Gerrit)
CC:
chromium-reviews, chrome-apps-syd-reviews_chromium.org, mac-views-reviews_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@task
Project:
chromium
Visibility:
Public.

Description

MacViews: 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 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+6 lines, -4 lines) Patch
M ui/native_theme/native_theme_mac.mm View 1 2 1 chunk +6 lines, -4 lines 0 comments Download

Messages

Total messages: 8 (2 generated)
tapted
Hi Avi, please take a look. (I think this is needed regardless, but I might ...
6 years, 2 months ago (2014-10-16 11:07:28 UTC) #2
Avi (use Gerrit)
lgtm https://codereview.chromium.org/658033002/diff/20001/ui/native_theme/native_theme_mac.mm File ui/native_theme/native_theme_mac.mm (right): https://codereview.chromium.org/658033002/diff/20001/ui/native_theme/native_theme_mac.mm#newcode107 ui/native_theme/native_theme_mac.mm:107: // is easy (RGB to grayscale is less ...
6 years, 2 months ago (2014-10-16 15:13:40 UTC) #3
tapted
Thanks Avi! https://codereview.chromium.org/658033002/diff/20001/ui/native_theme/native_theme_mac.mm File ui/native_theme/native_theme_mac.mm (right): https://codereview.chromium.org/658033002/diff/20001/ui/native_theme/native_theme_mac.mm#newcode107 ui/native_theme/native_theme_mac.mm:107: // is easy (RGB to grayscale is ...
6 years, 2 months ago (2014-10-17 04:18:52 UTC) #4
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/658033002/40001
6 years, 2 months ago (2014-10-17 04:19:40 UTC) #6
commit-bot: I haz the power
Committed patchset #3 (id:40001)
6 years, 2 months ago (2014-10-17 04:59:06 UTC) #7
commit-bot: I haz the power
6 years, 2 months ago (2014-10-17 05:00:47 UTC) #8
Message was sent while issue was closed.
Patchset 3 (id:??) landed as
https://crrev.com/d339eed0928759ab8082dd9944541699bea97512
Cr-Commit-Position: refs/heads/master@{#300066}

Powered by Google App Engine
This is Rietveld 408576698