New issue
Advanced search Search tips

Issue 848480 link

Starred by 4 users

Issue metadata

Status: Fixed
Owner:
Closed: Jun 2018
Cc:
Components:
EstimatedDays: 1
NextAction: ----
OS: Windows
Pri: 3
Type: Bug

Blocking:
issue 822037
issue 848482



Sign in to add a comment

Fixes for Windows10CaptionButton::GetBaseColor()

Project Member Reported by pkasting@chromium.org, May 31 2018

Issue description

There are two changes that should be made to Windows10CaptionButton::GetBaseColor():

* Call SkColorSetA(SK_AlphaOPAQUE) on |bg_color| before sending it to AlphaBlend(), or its alpha channel will be taken into account twice

* Use BlendTowardOppositeLuma(blend_color, SK_AlphaOPAQUE) instead of checking IsDark(), so that when  bug 841271  is fixed, we'll get GG900 instead of black
 
Blocking: 848482
Status: Available (was: Untriaged)
Cc: bsep@chromium.org pkasting@chromium.org
Owner: kylixrd@chromium.org
Status: Assigned (was: Available)
While I'm digging into getting the tab color and text contrast/color correct, I might as well tackle this one as well. It's a rather simple change.

Comment 4 by bsep@chromium.org, Jun 7 2018

Do we actually want Grey900 for the Windows caption buttons? The native versions are always black.
Good question, and I'm not sure of the answer.  I was thinking we should have them match the new tab button glyph (which should definitely use GG900), but the more I think about it in light of what you said the less certain I feel.
Either way, the SkSetColorA change should still be done.
After more thought, I weakly lean toward's Bret's proposal (explicitly use black, not GG900, for the base color of caption buttons), as long as we add comments in the code as to why we're doing this.

Also, be careful of  bug 659451  and  bug 841271  interacting with this -- if we are choosing between white and black, we need to make sure the function which decides which to use isn't midpointing based on GG900.
Status: Started (was: Assigned)
Project Member

Comment 9 by bugdroid1@chromium.org, Jun 12 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/48f714fb00f11006c89fba24f27f862b3ecbe13e

commit 48f714fb00f11006c89fba24f27f862b3ecbe13e
Author: Allen Bauer <kylixrd@chromium.org>
Date: Tue Jun 12 19:05:41 2018

Paint the tab text and separator using colors derived from frame colors.

Bug:  848482 
Bug:  848474 
Bug:  848480 
Change-Id: Iea9528748e81529e4673a3b69f22d50135a9324d
Reviewed-on: https://chromium-review.googlesource.com/1089723
Commit-Queue: Allen Bauer <kylixrd@chromium.org>
Reviewed-by: Scott Violet <sky@chromium.org>
Reviewed-by: Bret Sepulveda <bsep@chromium.org>
Cr-Commit-Position: refs/heads/master@{#566522}
[modify] https://crrev.com/48f714fb00f11006c89fba24f27f862b3ecbe13e/chrome/browser/ui/views/frame/browser_non_client_frame_view.cc
[modify] https://crrev.com/48f714fb00f11006c89fba24f27f862b3ecbe13e/chrome/browser/ui/views/frame/browser_non_client_frame_view.h
[modify] https://crrev.com/48f714fb00f11006c89fba24f27f862b3ecbe13e/chrome/browser/ui/views/frame/windows_10_caption_button.cc
[modify] https://crrev.com/48f714fb00f11006c89fba24f27f862b3ecbe13e/chrome/browser/ui/views/tabs/browser_tab_strip_controller.cc
[modify] https://crrev.com/48f714fb00f11006c89fba24f27f862b3ecbe13e/chrome/browser/ui/views/tabs/browser_tab_strip_controller.h
[modify] https://crrev.com/48f714fb00f11006c89fba24f27f862b3ecbe13e/chrome/browser/ui/views/tabs/fake_base_tab_strip_controller.cc
[modify] https://crrev.com/48f714fb00f11006c89fba24f27f862b3ecbe13e/chrome/browser/ui/views/tabs/fake_base_tab_strip_controller.h
[modify] https://crrev.com/48f714fb00f11006c89fba24f27f862b3ecbe13e/chrome/browser/ui/views/tabs/tab.cc
[modify] https://crrev.com/48f714fb00f11006c89fba24f27f862b3ecbe13e/chrome/browser/ui/views/tabs/tab.h
[modify] https://crrev.com/48f714fb00f11006c89fba24f27f862b3ecbe13e/chrome/browser/ui/views/tabs/tab_close_button.cc
[modify] https://crrev.com/48f714fb00f11006c89fba24f27f862b3ecbe13e/chrome/browser/ui/views/tabs/tab_controller.h
[modify] https://crrev.com/48f714fb00f11006c89fba24f27f862b3ecbe13e/chrome/browser/ui/views/tabs/tab_strip.cc
[modify] https://crrev.com/48f714fb00f11006c89fba24f27f862b3ecbe13e/chrome/browser/ui/views/tabs/tab_strip.h
[modify] https://crrev.com/48f714fb00f11006c89fba24f27f862b3ecbe13e/chrome/browser/ui/views/tabs/tab_strip_controller.h
[modify] https://crrev.com/48f714fb00f11006c89fba24f27f862b3ecbe13e/chrome/browser/ui/views/tabs/tab_strip_types.h
[modify] https://crrev.com/48f714fb00f11006c89fba24f27f862b3ecbe13e/chrome/browser/ui/views/tabs/tab_unittest.cc
[modify] https://crrev.com/48f714fb00f11006c89fba24f27f862b3ecbe13e/ui/gfx/color_palette.h

Status: Fixed (was: Started)

Sign in to add a comment