New issue
Advanced search Search tips

Issue 876794 link

Starred by 3 users

Issue metadata

Status: Fixed
Owner:
Closed: Aug 28
Cc:
Components:
EstimatedDays: 1
NextAction: 2018-08-28
OS: Linux , Windows , Chrome , Mac
Pri: 1
Type: Bug



Sign in to add a comment

Text in multiselected tabs hard to read on dark frame

Project Member Reported by pkasting@chromium.org, Aug 22

Issue description

We don't guarantee the text on selected non-active tabs hits contrast minimums, and we need to.

See attached screenshot.

Allen, if you don't think you can get to this immediately, I might be able to take it.
 
contrast.png
4.2 KB View Download
Labels: Target-69
Project Member

Comment 2 by bugdroid1@chromium.org, Aug 24

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

commit 633a77ea42c1d12705d06c28c321865110645c31
Author: Allen Bauer <kylixrd@chromium.org>
Date: Fri Aug 24 21:28:05 2018

Take the selected state of the tab into account for the text color.

Apply the tab selected state color into account in order to calculate the
proper contrast for the tab's text and icons.

Bug:  876794 
Change-Id: Ie0db7e6eb5cd93c7b7d34098c88e9f06ff355d4d
Reviewed-on: https://chromium-review.googlesource.com/1188434
Commit-Queue: Peter Kasting <pkasting@chromium.org>
Reviewed-by: Peter Kasting <pkasting@chromium.org>
Cr-Commit-Position: refs/heads/master@{#585996}
[modify] https://crrev.com/633a77ea42c1d12705d06c28c321865110645c31/chrome/browser/ui/views/tabs/tab.cc
[modify] https://crrev.com/633a77ea42c1d12705d06c28c321865110645c31/chrome/browser/ui/views/tabs/tab.h
[modify] https://crrev.com/633a77ea42c1d12705d06c28c321865110645c31/chrome/browser/ui/views/tabs/tab_strip.cc

Labels: Merge-Request-69
This is, I hope, the last 69 merge request from my subteam :)

Justification for this is that tab text is unreadable in selected tabs for some frame colors (see comment 0 screenshot).  Obviously we'll want to wait until the Canary build with this to verify it before merging.
Project Member

Comment 4 by sheriffbot@chromium.org, Aug 24

Labels: -Merge-Request-69 Merge-Review-69 Hotlist-Merge-Review
This bug requires manual review: We are only 10 days from stable.
Please contact the milestone owner if you have questions.
Owners: amineer@(Android), kariahda@(iOS), cindyb@(ChromeOS), govind@(Desktop)

For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
NextAction: 2018-08-27
Pls update bug with canary result on Monday morning.
Project Member

Comment 6 by bugdroid1@chromium.org, Aug 25

Labels: merge-merged-3532
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/9dbbdadf3bb9cf09b1aea8544e06007e43751143

commit 9dbbdadf3bb9cf09b1aea8544e06007e43751143
Author: Allen Bauer <kylixrd@chromium.org>
Date: Sat Aug 25 16:39:13 2018

Take the selected state of the tab into account for the text color.

Apply the tab selected state color into account in order to calculate the
proper contrast for the tab's text and icons.

Bug:  876794 
Change-Id: Ie0db7e6eb5cd93c7b7d34098c88e9f06ff355d4d
Reviewed-on: https://chromium-review.googlesource.com/1188434
Commit-Queue: Peter Kasting <pkasting@chromium.org>
Reviewed-by: Peter Kasting <pkasting@chromium.org>
Cr-Original-Commit-Position: refs/heads/master@{#585996}(cherry picked from commit 633a77ea42c1d12705d06c28c321865110645c31)
Reviewed-on: https://chromium-review.googlesource.com/1188833
Reviewed-by: Krishna Govind <govind@chromium.org>
Cr-Commit-Position: refs/branch-heads/3532@{#7}
Cr-Branched-From: cae5f8710a9652a6f1716812fbedfdd59fced679-refs/heads/master@{#585632}
[modify] https://crrev.com/9dbbdadf3bb9cf09b1aea8544e06007e43751143/chrome/browser/ui/views/tabs/tab.cc
[modify] https://crrev.com/9dbbdadf3bb9cf09b1aea8544e06007e43751143/chrome/browser/ui/views/tabs/tab.h
[modify] https://crrev.com/9dbbdadf3bb9cf09b1aea8544e06007e43751143/chrome/browser/ui/views/tabs/tab_strip.cc

Last night canary failed to trigger, pls see bug 876964 for details.

I merged the change to canary branch 3532 at #6 and triggering new canary so we can have canary coverage over the weekend.
Canary version 70.0.3532.5 currently building.
The NextAction date has arrived: 2018-08-27
Labels: Needs-Feedback
Tried to reproduce the issue on Windows 10 and Mac OS 10.13.3 on the build without fix 70.0.3521.0 and unable to reproduce the issue by following the below steps.

1. Launched Chrome and navigated to chrome webstore.
2. Added few dark themes, selected multiple tabs and could read the text on the tab strip without any issues.
	
kylixrd@ Request you to provide the theme where this issue can be reproduced and help us in verifying the fix on the latest M-70 build.

Thanks..
This isn't fixed.  Testing at home gives the screenshot attached, where the text is white on #d8ded8.

Looking at the patch, this line seems wrong:

GetBlendValueWithMinimumContrast(
        tab_bg_color, title_color, tab_inactive_bg_color,
        kMinimumInactiveContrastRatio);

Here |tab_bg_color| is the selected background, #d8ded8.  |title_color| is the nominal foreground color, #ffffff.  |tab_inactive_bg_color| is the unselected tab background color, #647c64.  So we're asking to blend #d8ded8 towards #ffffff until it contrasts sufficiently with #647c64.  That isn't right.  Clearly I didn't think about this code while reviewing it, just glanced at it.  :P

Instead we want to be blending #ffffff towards the opposite luma of #d8ded8 until it contrasts sufficiently with #d8ded8.  I think "sufficiently" can be different for title and close X -- for titles we could just use GetColorWithMinimumContrast() to get to 4.5, for close X we should use the custom ratios in the function.  So the calculation of |tab_bg_color| is correct, but then the tab title color should be GetColorWithMinimumContrast(title_color, tab_bg_color), and the close button color would be based on that.

This code needs tests :P
Untitled.png
19.3 KB View Download
Labels: -Merge-Review-69 Merge-Rejected-69
Rejecting merge to M69 based on comment #11. Pls re-request a merge when change is safe to merge. Thank you.
I'd actually thought about this issue over the weekend. One of those, "Oh wait! I think that was wrong." moments.

Will reopen and investigate.
Labels: ReleaseBlock-Stable
Tentatively tagging as "RBS" as per  kylixrd@, this is important for M69.
Ok, here's what it looks like with the suggested changes. First image is the current Canary. The second is from a local build with the patch.

This looks much better... IMO
PrePatchCanarySelectedTabTextContrast.png
5.2 KB View Download
PatchSelectedTabTextContrast.png
2.9 KB View Download
Project Member

Comment 16 by bugdroid1@chromium.org, Aug 27

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

commit 5003a6a5a2f790a12d878e84b59e90fd8b8d7050
Author: Allen Bauer <kylixrd@chromium.org>
Date: Mon Aug 27 19:09:03 2018

Use GetColorWithMinimumContrast instead of manually calculating a contrasting color.

The previous patch attempting to fix this, https://crrev.com/c/1188434, didn't blend
in the right direction. It got the background color calculation correct, but the
title color calculation wasn't right.

This change just uses GetColorWithMinimumContrast directly so that the text (and the
close button icon) has sufficient contrast on a selected inactive tab.

Bug:  876794 
Change-Id: I8ee0a8f2a38aac60c14d104fbf75c3ef85304720
Reviewed-on: https://chromium-review.googlesource.com/1191189
Reviewed-by: Scott Violet <sky@chromium.org>
Commit-Queue: Allen Bauer <kylixrd@chromium.org>
Cr-Commit-Position: refs/heads/master@{#586359}
[modify] https://crrev.com/5003a6a5a2f790a12d878e84b59e90fd8b8d7050/chrome/browser/ui/views/tabs/tab.cc
[modify] https://crrev.com/5003a6a5a2f790a12d878e84b59e90fd8b8d7050/chrome/browser/ui/views/tabs/tab.h

NextAction: 2018-08-28
Pls update bug with canary result tomorrow morning.
Labels: -Merge-Rejected-69 -merge-merged-3532 Merge-Request-69
Project Member

Comment 19 by sheriffbot@chromium.org, Aug 27

Labels: -Merge-Request-69 Merge-Review-69
This bug requires manual review: We are only 7 days from stable.
Please contact the milestone owner if you have questions.
Owners: amineer@(Android), kariahda@(iOS), cindyb@(ChromeOS), govind@(Desktop)

For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
Pls merge the change listed at #16 to canary branch #3534. So we can trigger new canary from same branch.
Project Member

Comment 22 by bugdroid1@chromium.org, Aug 27

Labels: merge-merged-3534
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/bbfaa73569a1a7491bcefbdc84749f2148830132

commit bbfaa73569a1a7491bcefbdc84749f2148830132
Author: Allen Bauer <kylixrd@chromium.org>
Date: Mon Aug 27 22:35:38 2018

Use GetColorWithMinimumContrast instead of manually calculating a contrasting color.

The previous patch attempting to fix this, https://crrev.com/c/1188434, didn't blend
in the right direction. It got the background color calculation correct, but the
title color calculation wasn't right.

This change just uses GetColorWithMinimumContrast directly so that the text (and the
close button icon) has sufficient contrast on a selected inactive tab.

Bug:  876794 
Change-Id: I8ee0a8f2a38aac60c14d104fbf75c3ef85304720
Reviewed-on: https://chromium-review.googlesource.com/1191189
Reviewed-by: Scott Violet <sky@chromium.org>
Commit-Queue: Allen Bauer <kylixrd@chromium.org>
Cr-Original-Commit-Position: refs/heads/master@{#586359}(cherry picked from commit 5003a6a5a2f790a12d878e84b59e90fd8b8d7050)
Reviewed-on: https://chromium-review.googlesource.com/1192108
Reviewed-by: Krishna Govind <govind@chromium.org>
Cr-Commit-Position: refs/branch-heads/3534@{#7}
Cr-Branched-From: 5c1309f3276665c501e62f79a3bfb9244b3dca26-refs/heads/master@{#586175}
[modify] https://crrev.com/bbfaa73569a1a7491bcefbdc84749f2148830132/chrome/browser/ui/views/tabs/tab.cc
[modify] https://crrev.com/bbfaa73569a1a7491bcefbdc84749f2148830132/chrome/browser/ui/views/tabs/tab.h

The NextAction date has arrived: 2018-08-28
Labels: TE-Verified-M70 TE-Verified-70.0.3534.4
Able to reproduce this issue on Windows 10, Mac OS 10.13.3 and Ubuntu 17.10 on the build without fix 70.0.3521.0 and the issue is fixed on the latest M-70 build 70.0.3534.4 by following the below steps.

1. Launched Chrome and on Windows changed the Windows color to dark frame in Settings -> Colors.
2. Selected multiple tabs and could read the text on the tab strip without any issues.
On Mac OS and Ubuntu 17.10, added the theme "Isle of Skye Scotland", selected multiple tabs and could read the text on the tab strip without any issues.
Attached are the screen shots for reference.

Hence adding TE verified labels as the fix is working as intended.

Thanks..
876794-Mac-M70.png
107 KB View Download
876794-M70-Linux.png
384 KB View Download
876794-M70-Windows.PNG
29.5 KB View Download
Status: Fixed (was: Assigned)
Labels: -Merge-Review-69 Merge-Approved-69
Approving  merge to M69 branch 3497 based on comment #24. Please merge ASAP. Thank you.
Labels: Merge-Request-69
Labels: -Merge-Request-69
M69 merge is approved at #26.
Project Member

Comment 29 by bugdroid1@chromium.org, Aug 28

Labels: -merge-approved-69 merge-merged-3497
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/7f932b8a626da06fc538acf147675fc5c95124f9

commit 7f932b8a626da06fc538acf147675fc5c95124f9
Author: Allen Bauer <kylixrd@chromium.org>
Date: Tue Aug 28 17:44:30 2018

Take the selected state of the tab into account for the text color.

Apply the tab selected state color into account in order to calculate the
proper contrast for the tab's text and icons.

Bug:  876794 
Change-Id: Ie0db7e6eb5cd93c7b7d34098c88e9f06ff355d4d
Reviewed-on: https://chromium-review.googlesource.com/1188434
Commit-Queue: Peter Kasting <pkasting@chromium.org>
Reviewed-by: Peter Kasting <pkasting@chromium.org>
Cr-Original-Commit-Position: refs/heads/master@{#585996}(cherry picked from commit 633a77ea42c1d12705d06c28c321865110645c31)
Reviewed-on: https://chromium-review.googlesource.com/1194290
Reviewed-by: Allen Bauer <kylixrd@chromium.org>
Cr-Commit-Position: refs/branch-heads/3497@{#828}
Cr-Branched-From: 271eaf50594eb818c9295dc78d364aea18c82ea8-refs/heads/master@{#576753}
[modify] https://crrev.com/7f932b8a626da06fc538acf147675fc5c95124f9/chrome/browser/ui/views/tabs/tab.cc
[modify] https://crrev.com/7f932b8a626da06fc538acf147675fc5c95124f9/chrome/browser/ui/views/tabs/tab.h
[modify] https://crrev.com/7f932b8a626da06fc538acf147675fc5c95124f9/chrome/browser/ui/views/tabs/tab_strip.cc

Project Member

Comment 30 by bugdroid1@chromium.org, Aug 28

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

commit b7b3b3b508f714f1af75ee8f563a6c90a565e867
Author: Allen Bauer <kylixrd@chromium.org>
Date: Tue Aug 28 17:45:10 2018

Use GetColorWithMinimumContrast instead of manually calculating a contrasting color.

The previous patch attempting to fix this, https://crrev.com/c/1188434, didn't blend
in the right direction. It got the background color calculation correct, but the
title color calculation wasn't right.

This change just uses GetColorWithMinimumContrast directly so that the text (and the
close button icon) has sufficient contrast on a selected inactive tab.

Bug:  876794 
Change-Id: I8ee0a8f2a38aac60c14d104fbf75c3ef85304720
Reviewed-on: https://chromium-review.googlesource.com/1191189
Reviewed-by: Scott Violet <sky@chromium.org>
Commit-Queue: Allen Bauer <kylixrd@chromium.org>
Cr-Original-Commit-Position: refs/heads/master@{#586359}(cherry picked from commit 5003a6a5a2f790a12d878e84b59e90fd8b8d7050)
Reviewed-on: https://chromium-review.googlesource.com/1194291
Reviewed-by: Allen Bauer <kylixrd@chromium.org>
Cr-Commit-Position: refs/branch-heads/3497@{#829}
Cr-Branched-From: 271eaf50594eb818c9295dc78d364aea18c82ea8-refs/heads/master@{#576753}
[modify] https://crrev.com/b7b3b3b508f714f1af75ee8f563a6c90a565e867/chrome/browser/ui/views/tabs/tab.cc
[modify] https://crrev.com/b7b3b3b508f714f1af75ee8f563a6c90a565e867/chrome/browser/ui/views/tabs/tab.h

Labels: TE-Verified-M69 TE-Verified-69.0.3497.72
Able to reproduce this issue on Windows 10, Mac OS 10.13.3 and Ubuntu 17.10 on the build without fix 70.0.3521.0 and the issue is fixed on the latest M-69 build 69.0.3497.72 by following the below steps.

1. Launched Chrome and on Windows changed the Windows color to dark frame in Settings -> Colors.
2. Selected multiple tabs and could read the text on the tab strip without any issues.
On Mac OS and Ubuntu 17.10, added the theme "Isle of Skye Scotland", selected multiple tabs and could read the text on the tab strip without any issues.
Attached are the screen shots for reference.

Hence adding TE verified labels as the fix is working as intended.

Thanks..
876794-Windows-M69.PNG
31.7 KB View Download

Sign in to add a comment