CSS GrayText computes to black on macOS 10.14
Categories
(Core :: Widget: Cocoa, defect, P1)
Tracking
()
People
(Reporter: gregorydkraus, Assigned: spohl)
References
(Blocks 1 open bug)
Details
Attachments
(2 files)
459 bytes,
text/html
|
Details | |
1.67 KB,
patch
|
mstange
:
review+
RyanVM
:
approval-mozilla-beta+
|
Details | Diff | Splinter Review |
User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.14; rv:63.0) Gecko/20100101 Firefox/63.0 Steps to reproduce: Open the attached file graytext_2cases.html. The expanded select list has the first item disabled, but it is still black, not gray. Actual results: The first option, which is disabled, is black, not gray in the expanded select list Expected results: The disabled item should have been gray in the expanded list. Chrome has the same problem, but Safari does not. It only appears to impact OS X, and maybe only 10.14. Windows browsers are not impacted.
Comment 1•5 years ago
|
||
Neil, do you know if this is working like that on OSX only by design?
Comment 2•5 years ago
|
||
I don't see any issue in 10.13 -- the disabled option looks grey. Perhaps this is a native theme issue in 10.14 only?
Comment 3•5 years ago
|
||
This isn't restricted to text list. The following also reproduces the issue: data:text/html,<p style="color: GrayText;">This text should be grey</p> Curious that it works in the combobox. Maybe that's because the combobox dropdown renders in the parent process?
Comment 4•5 years ago
|
||
That color comes from: https://searchfox.org/mozilla-central/rev/fc229ed2c78648e402a9bbd50d99b69d0e227844/widget/cocoa/nsLookAndFeel.mm#783
Assignee | ||
Updated•5 years ago
|
Assignee | ||
Comment 5•5 years ago
|
||
This turns out to be due to a change in the way this system color is specified by the OS:
On 10.13, this appears to be: { R:0.5 G:0.5 B:0.5 A:1 }
On 10.14, this appears to be: { R:0 G:0 B:0 A:0.247... }
In other words, 10.14 uses the alpha channel to create a grey that is lighter than what we have on 10.13. I have confirmed that by using an nscolor that takes the alpha channel into account, we exactly match the color in Safari on 10.14.
Comment 6•5 years ago
|
||
Comment on attachment 9036375 [details] [diff] [review] Patch Review of attachment 9036375 [details] [diff] [review]: ----------------------------------------------------------------- Thanks! If we add more callers of this type, it might make sense to have two functions, GetRGBColorFromNSColor and GetRGBAColorFromNSColor, but for now it doesn't seem needed.
Assignee | ||
Comment 7•5 years ago
|
||
https://hg.mozilla.org/integration/mozilla-inbound/rev/62f90a1062e5d87c38c5431c17af6fbdd8c7b059 Bug 1511878: Start respecting the alpha channel for disabled control text color on macOS to accommodate the way this system color is declared by the OS on macOS 10.14+. r=mstange
Comment 8•5 years ago
|
||
bugherder |
Comment 9•5 years ago
|
||
This affects the Firefox UI in various places. Can we get this uplifted?
Assignee | ||
Comment 10•5 years ago
|
||
Comment on attachment 9036375 [details] [diff] [review]
Patch
[Beta/Release Uplift Approval Request]
Feature/Bug causing the regression: macOS 10.14+
User impact if declined: Various instances of text that is supposed to appear grey will appear black on 10.14. This affects the Firefox UI as well as web content.
Is this code covered by automated tests?: No
Has the fix been verified in Nightly?: Yes
Needs manual test from QE?: No
If yes, steps to reproduce:
List of other uplifts needed: none
Risk to taking this patch: Low
Why is the change risky/not risky? (and alternatives if risky): This is a tiny change to the way we generate the color for disabled text by newly respecting the alpha channel along with the existing RGB values.
String changes made/needed: none
Comment 11•5 years ago
|
||
Comment on attachment 9036375 [details] [diff] [review]
Patch
[Triage Comment]
Fixes a bug causing grey text to appear black instead on macOS 10.14. Approved for 65.0b12.
Comment 12•5 years ago
|
||
bugherder uplift |
Updated•5 years ago
|
Comment 13•5 years ago
|
||
Hello all,
Manage to reproduce the issue on FF Nightly 65.a1(BuildID:20181203214946) on macOS 10.14 (Mojave)
Confirming this issue as verified fixed on the latest FF Nightly 66.0a1(BuildID:20190117215514) and 65.0b12(BuildID:20190117232427) on macOS 10.14 (Mojave).
Description
•