New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 896146 link

Starred by 4 users

Issue metadata

Status: Fixed
Owner:
Closed: Oct 31
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux
Pri: 2
Type: Bug



Sign in to add a comment

PWA with black theme colour has unreadable titlebar when GTK theme is enabled

Project Member Reported by alancutter@chromium.org, Oct 17

Issue description

Chrome version: 70
OS: Linux

What steps will reproduce the problem?
(1) Enabled GTK theme in Chrome settings.
(2) Visit: soft-puppy.glitch.me
(3) Menu > Install Soft Puppy

What is the expected result?

The title bar should have readable text.

What happens instead?

The text is white on light grey.

 
gtk-theme-white-text.png
24.9 KB View Download
When the gtk theme enabled Chromium doesn't respect manifest.json colors.

In the screenshot:
- Instagram: #FFFFFF White bg color -> White titlebar text
- Maps: #FFFFFF White bg color -> White titlebar text
- Twitter: - No bg color -> Default gtk titlebar text
- Web Flap: #4EC0CA Cyan bg color -> Cyan titlebar text.
- NASA code: #212121 Dark grey bg color -> White titlebar text

As described #896584 -> #c15
pwa.png
1.0 MB View Download
Not adopting the manifest.json colours is by design as the user has requested a more native OS style titlebar.
The title text should be the same (readable) colour for all those instances.
WIP CL screenshots.
before.png
24.9 KB View Download
after.png
26.0 KB View Download
Status: Fixed (was: Assigned)
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/ef3fa57316656238bf3620b61b140272fa5375ae

commit ef3fa57316656238bf3620b61b140272fa5375ae
Author: Alan Cutter <alancutter@chromium.org>
Date: Wed Oct 31 13:00:64 2018

Fix unreadable title text colour for PWA windows when GTK theme is used

This CL makes OpaqueBrowserFrameView test for whether the user is using
the system theme for the browser before using the hosted app theme
color algorithm.

This CL also updates the foreground color algorithm to always use the
actual frame color to avoid readability bugs like this in general.

Before: https://bugs.chromium.org/p/chromium/issues/attachment?aid=365224&signed_aid=05pRAK75RpeItQNbJQ32zA==&inline=1
After: https://bugs.chromium.org/p/chromium/issues/attachment?aid=365225&signed_aid=5PQmY9poCGVOGL8cIt7X3g==&inline=1
Change-Id: Id428054a636b408f59f88c49a0911f6a5052ccc5
Reviewed-on: https://chromium-review.googlesource.com/c/1307032
Reviewed-by: Bret Sepulveda <bsep@chromium.org>
Commit-Queue: Alan Cutter <alancutter@chromium.org>
Cr-Commit-Position: refs/heads/master@{#604110}
[modify] https://crrev.com/ef3fa57316656238bf3620b61b140272fa5375ae/chrome/browser/ui/views/frame/opaque_browser_frame_view.cc
[modify] https://crrev.com/ef3fa57316656238bf3620b61b140272fa5375ae/chrome/browser/ui/views/frame/opaque_browser_frame_view_browsertest.cc
Project Member

Comment 5 by bugdroid1@chromium.org, Nov 8

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

commit 3e2b2d9aad3913c2f92218bf12ebfd9c3b4f3c0e
Author: Alan Cutter <alancutter@chromium.org>
Date: Thu Nov 08 02:38:32 2018

Fix broken HostedAppOpaqueBrowserFrameViewTest tests

When https://chromium-review.googlesource.com/c/chromium/src/+/1307032
landed these tests started failing on developer machines because the
default was to use the GTK theme. This was not caught because on trybots
the default is not to use the GTK theme (see
GtkUi::GetDefaultUsesSystemTheme()).

This CL fixes the tests by explicitly enabling/disabling GTK as appropriate.

Bug:  896146 
Change-Id: I75fe33105f0478dcd9d06164041b7b4f2b6e4de0
Reviewed-on: https://chromium-review.googlesource.com/c/1314017
Commit-Queue: Alan Cutter <alancutter@chromium.org>
Reviewed-by: Bret Sepulveda <bsep@chromium.org>
Cr-Commit-Position: refs/heads/master@{#606296}
[modify] https://crrev.com/3e2b2d9aad3913c2f92218bf12ebfd9c3b4f3c0e/chrome/browser/ui/views/frame/opaque_browser_frame_view_browsertest.cc

Issue 903519 has been merged into this issue.
Labels: Merge-Request-71
It might be a bit late to merge this into stable but we should probably at least merge this to beta given it affects the readability of the entire titlebar on Linux GTK for some site and the fix is low risk to merge.

Request to merge https://crrev.com/ef3fa57316656238bf3620b61b140272fa5375ae to M71.
Project Member

Comment 8 by sheriffbot@chromium.org, Nov 9

Labels: -Merge-Request-71 Hotlist-Merge-Review Merge-Review-71
This bug requires manual review: M71 has already been promoted to the beta branch, so this requires manual review
Please contact the milestone owner if you have questions.
Owners: benmason@(Android), kariahda@(iOS), kbleicher@(ChromeOS), govind@(Desktop)

For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
Labels: -Merge-Review-71 Merge-Approved-71
Approving merge for https://crrev.com/ef3fa57316656238bf3620b61b140272fa5375ae to M71 branch 3578 based on comment #7. Pls merge ASAP.

Is CL listed at #5 also need a merge to M71?
Thanks!

> Is CL listed at #5 also need a merge to M71?
No, https://crrev.com/3e2b2d9aad3913c2f92218bf12ebfd9c3b4f3c0e is just to fix browser tests for Linux developer machines.
Project Member

Comment 11 by bugdroid1@chromium.org, Nov 9

Labels: -merge-approved-71 merge-merged-3578
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/fa59776dabdcda1f3507c744a2fe5c76350b8dbc

commit fa59776dabdcda1f3507c744a2fe5c76350b8dbc
Author: Alan Cutter <alancutter@chromium.org>
Date: Fri Nov 09 05:09:47 2018

Fix unreadable title text colour for PWA windows when GTK theme is used

This CL makes OpaqueBrowserFrameView test for whether the user is using
the system theme for the browser before using the hosted app theme
color algorithm.

This CL also updates the foreground color algorithm to always use the
actual frame color to avoid readability bugs like this in general.

Before: https://bugs.chromium.org/p/chromium/issues/attachment?aid=365224&signed_aid=05pRAK75RpeItQNbJQ32zA==&inline=1
After: https://bugs.chromium.org/p/chromium/issues/attachment?aid=365225&signed_aid=5PQmY9poCGVOGL8cIt7X3g==&inline=1

TBR=alancutter@chromium.org

(cherry picked from commit ef3fa57316656238bf3620b61b140272fa5375ae)

Bug:  896146 
Change-Id: Id428054a636b408f59f88c49a0911f6a5052ccc5
Reviewed-on: https://chromium-review.googlesource.com/c/1307032
Reviewed-by: Bret Sepulveda <bsep@chromium.org>
Commit-Queue: Alan Cutter <alancutter@chromium.org>
Cr-Original-Commit-Position: refs/heads/master@{#604110}
Reviewed-on: https://chromium-review.googlesource.com/c/1328621
Reviewed-by: Alan Cutter <alancutter@chromium.org>
Cr-Commit-Position: refs/branch-heads/3578@{#603}
Cr-Branched-From: 4226ddf99103e493d7afb23a4c7902ee496108b6-refs/heads/master@{#599034}
[modify] https://crrev.com/fa59776dabdcda1f3507c744a2fe5c76350b8dbc/chrome/browser/ui/views/frame/opaque_browser_frame_view.cc

Labels: Merge-Merged-71-3578
The following revision refers to this bug: 
https://chromium.googlesource.com/chromium/src.git/+/fa59776dabdcda1f3507c744a2fe5c76350b8dbc

Commit: fa59776dabdcda1f3507c744a2fe5c76350b8dbc
Author: alancutter@chromium.org
Commiter: alancutter@chromium.org
Date: 2018-11-09 05:09:47 +0000 UTC

Fix unreadable title text colour for PWA windows when GTK theme is used

This CL makes OpaqueBrowserFrameView test for whether the user is using
the system theme for the browser before using the hosted app theme
color algorithm.

This CL also updates the foreground color algorithm to always use the
actual frame color to avoid readability bugs like this in general.

Before: https://bugs.chromium.org/p/chromium/issues/attachment?aid=365224&signed_aid=05pRAK75RpeItQNbJQ32zA==&inline=1
After: https://bugs.chromium.org/p/chromium/issues/attachment?aid=365225&signed_aid=5PQmY9poCGVOGL8cIt7X3g==&inline=1

TBR=alancutter@chromium.org

(cherry picked from commit ef3fa57316656238bf3620b61b140272fa5375ae)

Bug:  896146 
Change-Id: Id428054a636b408f59f88c49a0911f6a5052ccc5
Reviewed-on: https://chromium-review.googlesource.com/c/1307032
Reviewed-by: Bret Sepulveda <bsep@chromium.org>
Commit-Queue: Alan Cutter <alancutter@chromium.org>
Cr-Original-Commit-Position: refs/heads/master@{#604110}
Reviewed-on: https://chromium-review.googlesource.com/c/1328621
Reviewed-by: Alan Cutter <alancutter@chromium.org>
Cr-Commit-Position: refs/branch-heads/3578@{#603}
Cr-Branched-From: 4226ddf99103e493d7afb23a4c7902ee496108b6-refs/heads/master@{#599034}
Labels: TE-Verified-M71 TE-Verified-71.0.3578.53
Able to reproduce the issue on ubuntu 17.10 using chrome build without fix.

Verified the fix on Ubuntu 17.10 using Chrome version #71.0.3578.53 as per the comment #0. Attaching screen cast for reference.
Observed that the title bar have readable text as expected.
Hence, the fix is working as expected. 
Adding the verified labels.

Thanks...!!
Nov 14 2018 5_28 PM.webm
2.6 MB View Download

Sign in to add a comment