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

Issue 743173 link

Starred by 1 user

Issue metadata

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


Participants' hotlists:
Payments-Maintenance
Payment-Conversion


Sign in to add a comment

Payment Request API window shows light grey text on white: impossible to read

Reported by stuart.l...@gmail.com, Jul 14 2017

Issue description

UserAgent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Ubuntu Chromium/59.0.3071.109 Chrome/59.0.3071.109 Safari/537.36

Steps to reproduce the problem:
1. Open the test case pr.html
2. Click the button

What is the expected behavior?
I can read the writing.

What went wrong?
I can't read the writing.

It's possible that the details filled in are meant to look "disabled" or "greyed out" in some way -- it is a test card number -- but I don't think that's the case (the window _works_, it's just not readable) and even if that is the case then it doesn't currently look disabled, it just looks wrong and impossible to read.

Did this work before? N/A 

Does this work in other browsers? N/A

Chrome version: 60.0.3112.50 (Official Build) beta (64-bit)  Channel: beta
OS Version: Ubuntu 16.04
Flash Version:
 
Screenshot from 2017-07-14 21-32-38.png
40.4 KB View Download
pr.html
399 bytes View Download
Components: -Blink>Payments UI>Browser>Payments
Owner: anthonyvd@chromium.org
Status: Untriaged (was: Unconfirmed)
Which theme are you using?
Er... Settings, search for "theme" says "GTK+"; is that the name of the theme? (I don't think I've consciously installed a theme in Chrome; I use Chromium almost always, not Chrome proper.)

If the question is which Gtk theme am I using, it's Adwaita with the Global Dark Theme option turned on.
It's also possible to install themes from https://chrome.google.com/webstore/category/themes. These would be visible in chrome://extensions. Do you have that?
As far as I can tell, I have no themes installed -- there are extensions listed in chrome://extensions, but no themes.
You are still experiencing this issue?
I am still experiencing it, in Version 61.0.3163.79 (Official Build) beta (64-bit).
Screenshot from 2017-09-14 22-44-37.png
34.1 KB View Download
Does this happen in other GTK+ themes?
It does not! Running "GTK_THEME=Adwaita google-chrome-beta" does not have the problem, and other themes also don't. "GTK_THEME=Adwaita:dark google-chrome-beta" does show the problem, however. So I suspect that the issue is that Chrome isn't quite respecting the dark theme variants properly.
Cc: anthonyvd@chromium.org
Owner: rouslan@chromium.org
Status: Assigned (was: Untriaged)
I was able to reproduce, thank you. Will look into this.
Cc: thomasanderson@chromium.org
Tom: GetNativeTheme()->GetSystemColor(ui::NativeTheme::kColorId_WindowBackground) seems to always return white. Is this expected?
c#10: It's not supposed to always return white.  Are you testing using dark Adwaita?  On that theme, windows and dialogs are supposed to be charcoal colored (see the attached image).  On my system, I'm sure it's not returning white because windows and dialogs are dark.
Screenshot from 2017-09-14 15-48-51.png
287 KB View Download
c#11: I'm testing with dark adwaita and also see all dialogs except PaymentRequest having dark background. Granted, chrome/browser/ui/views/payments/
 has a few instances of SK_ColorWHITE, but I've replaced those with GetNativeTheme()->GetSystemColor(ui::NativeTheme::kColorId_WindowBackground) and still see white background. Any ideas?
If you're only setting the background color during initialization, you're probably not getting the right NativeTheme.  Try overriding OnNativeThemeChanged() (be sure to call the superclass's OnNativeThemeChanged) in your view, and update the colors from the passed NativeTheme.
c#13: That was it, thank you!

Zach, Mathieu, Anthony: Here's the UX when we follow the theme on Linux. (Compare to what we do now in bug description). OK to make this change?
ambiance-ubuntu-default.png
52.0 KB View Download
adwaita-white.png
52.0 KB View Download
adwaita-dark.png
51.8 KB View Download
high-contrast.png
48.1 KB View Download
radiance.png
52.7 KB View Download
Cc: ma...@chromium.org zkoch@chromium.org

Comment 16 by ma...@chromium.org, Sep 15 2017

They look good except for high contrast, do you know what's causing the background difference?

I'm fine landing this as a strict improvement BTW
Not quite sure which view is painting the off-color background. in "high-contrast.png". Anthony, do you know?
PaymentRequest does not use DialogClientView, I believe.
😲

will take a closer look
2 more things in addition to what mathp@ said.
* The separator color on dark Adwaita is too bright.  We have kColorId_MenuSeparatorColor that you can use.
* The black "chromium" text in dark Adwaita isn't readable on the dark background.  Maybe try setting SetAutoColorReadabilityEnabled(true) on it?  And if it already is true, then try setting the background color of the label to window background color.
Cc: tmartino@chromium.org
Tommy: do you know which view is drawing the off-color UI surface in high-contrast.png  above?
My gut is that the off-color surface is the background of the content area behind all the rows--PaymentRequestSheetController creates the header, a scrollable content area that its subclasses can populate, and a footer area. The header and footer seem to be OK, as do the rows (children) that we add. I'd look into the content area (which in reality looks to be as many as three containers to achieve the scrolling effect). 

https://cs.chromium.org/chromium/src/chrome/browser/ui/views/payments/payment_request_sheet_controller.cc?l=250&rcl=ddb3b868e596bf4f7f3e64ab570b647f7d26b3f7

Would be a place to start, though you may have already replaced this since you mentioned you searched for SK_ColorWHITE
Project Member

Comment 26 by bugdroid1@chromium.org, Jan 30 2018

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

commit b424a5928cba52e245774dd481c39ff36ebaefae
Author: Rouslan Solomakhin <rouslan@chromium.org>
Date: Tue Jan 30 18:29:40 2018

[Payments] Use themed background color.

Bug:  743173 
Change-Id: Ie31e92bff4fda5907d45b931dd79caeac79b36ff
Reviewed-on: https://chromium-review.googlesource.com/669319
Reviewed-by: anthonyvd <anthonyvd@chromium.org>
Commit-Queue: Rouslan Solomakhin <rouslan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#532956}
[modify] https://crrev.com/b424a5928cba52e245774dd481c39ff36ebaefae/chrome/browser/ui/views/payments/payment_request_dialog_view.cc
[modify] https://crrev.com/b424a5928cba52e245774dd481c39ff36ebaefae/chrome/browser/ui/views/payments/payment_request_sheet_controller.cc

Status: Fixed (was: Assigned)
Labels: TE-Verified-M66 TE-Verified-66.0.3335.0
Verified the fix on Ubuntu 14.04 using Chrome version #66.0.3335.0 as per the comment #0.
Attaching screen shot for reference.
Observed that the text is not greyed and is clearly readable.
Hence, the fix is working as expected. 
Adding the verified labels.

Thanks...!!
743173 CL Verified.png
128 KB View Download

Sign in to add a comment