Graphite text highlighting does not have enough contrast on light background

VERIFIED FIXED in Firefox 65

Status

()

defect
VERIFIED FIXED
8 months ago
8 months ago

People

(Reporter: lizzard, Assigned: ntim)

Tracking

({qawanted, regression})

66 Branch
mozilla66
Unspecified
macOS
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(firefox-esr60 unaffected, firefox64 unaffected, firefox65+ verified, firefox66+ verified)

Details

Attachments

(4 attachments)

With the 66 update, when you highlight or select text in a page, in a text field, or in the addressbar, the highlighting is barely visible.
OS: Unspecified → Mac OS X
Version: 65 Branch → 66 Branch
Not sure if this is limited to Mojave or whether it goes across other macOS versions.
Keywords: qawanted
Summary: macOS Mojave dark theme highlighting contrast is not visible enough → In 66 on macOS Mojave, highlighting contrast is not visible enough
Blocks: 1486204
Component: Themes → Widget: Cocoa
Keywords: regression
Product: Toolkit → Core
Could you please provide a screenshot ?
Flags: needinfo?(lhenry)
Flags: needinfo?(lhenry)
only the bug number is highlighted here
In 64 I could see visual feedback of what is highlighted.
Thanks! Sounds like what I mentioned in bug 1486204 comment 59. I guess I can special case colors with 0% saturation and do some extra processing there, since multiplying up 0% saturation [0] won't do anything.

[0]: https://searchfox.org/mozilla-central/rev/3160ddc1f0ab55d230c595366662c62950e5c785/widget/cocoa/nsLookAndFeel.mm#157
Yeah that sounds reasonable.
Flags: needinfo?(ntim.bugs)
Summary: In 66 on macOS Mojave, highlighting contrast is not visible enough → Graphite text highlighting does not have enough contrast on light background
Assignee: nobody → ntim.bugs
Flags: needinfo?(ntim.bugs)
Pushed by ntim.bugs@gmail.com:
https://hg.mozilla.org/integration/autoland/rev/2c2d55d510a7
Increase contrast of unsaturated selection colors in nsLookAndFeel.mm. r=mstange
Comment on attachment 9031462 [details]
Bug 1513401 - Increase contrast of unsaturated selection colors in nsLookAndFeel.mm. r=mstange

[Beta/Release Uplift Approval Request]

Feature/Bug causing the regression: Bug 1486204

User impact if declined: Graphite selection color is faded out on light themes

Is this code covered by automated tests?: No

Has the fix been verified in Nightly?: No

Needs manual test from QE?: Yes

If yes, steps to reproduce: See previous comments

List of other uplifts needed: None

Risk to taking this patch: Low

Why is the change risky/not risky? (and alternatives if risky): Self contained widget/cocoa change

String changes made/needed:
Attachment #9031462 - Flags: approval-mozilla-beta?
https://hg.mozilla.org/mozilla-central/rev/2c2d55d510a7
Status: NEW → RESOLVED
Closed: 8 months ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla66
> +    value = 255 - (255 - value) * factor;

I realized a problem in the math: if value is less that 128, this will be 255 - [something larger than 255], which will be negative and then wraparound into a large uint16_t value when assigned to "value". So I think the "(255 - value) * factor" part should be wrapped in a mozilla::clamped(..., 0, 255).

This is not that urgent to fix because macOS does not, as far as I know, have gray highlighting colors that are darker than 128. But it should still be fixed.
Depends on: 1514464
(In reply to Markus Stange [:mstange] from comment #12)
> > +    value = 255 - (255 - value) * factor;
> 
> I realized a problem in the math: if value is less that 128, this will be
> 255 - [something larger than 255], which will be negative and then
> wraparound into a large uint16_t value when assigned to "value". So I think
> the "(255 - value) * factor" part should be wrapped in a
> mozilla::clamped(..., 0, 255).
> 
> This is not that urgent to fix because macOS does not, as far as I know,
> have gray highlighting colors that are darker than 128. But it should still
> be fixed.

Filed bug 1514464, thanks!
Comment on attachment 9031462 [details]
Bug 1513401 - Increase contrast of unsaturated selection colors in nsLookAndFeel.mm. r=mstange

[Triage Comment]
Fixes faded selection color when using a light theme on macOS. Approved for 65.0b5.
Attachment #9031462 - Flags: approval-mozilla-beta? → approval-mozilla-beta+
Flags: qe-verify+
Hello all,

This issue is verified fixed using Firefox 65.0b5 and the latest Nightly 66.0a1 (2018-12-17)on macOS 10.14(Mojave).
Status: RESOLVED → VERIFIED
Flags: qe-verify+
You need to log in before you can comment on or make changes to this bug.