Closed Bug 1818227 Opened 1 year ago Closed 1 year ago

Text background must stay transparent in HCM

Categories

(Core :: Layout: Text and Fonts, defect, P3)

Unspecified
Windows 11
defect

Tracking

()

RESOLVED FIXED
113 Branch
Tracking Status
firefox113 --- fixed

People

(Reporter: calixte, Assigned: fchasen)

References

Details

(Whiteboard: [fidefe-quality-foundation] )

Attachments

(4 files)

Attached file bg_hcm.html

STR:

  • switch to HCM;
  • load the attachment;

Both background and foreground colors are set to transparent and it's respected but not for the text background itself.
For the context, in the pdf viewer we've a transparent div containing the transparent text on top of a canvas (where the pdf is drawn) and in HCM having this opaque color is a bit paintful. It'd help us to fix some bugs if it could be transparent.

Backplating is a feature, not a bug. That said, Fred recently implemented forced-color-adjust: none which seems like it should probably also prevent backplating.

Seems like a check around here should do.

Fred, do you have the cycles to take this?

Severity: -- → S3
Flags: needinfo?(fchasen)
Priority: -- → P3

err, wrong bug, sorry for the spam

No longer blocks: masonry

Thanks, yep I'll take a look. I think this is the same issue I was seeing in https://bugzilla.mozilla.org/show_bug.cgi?id=1811140, where absolutely positioned content always received a backplate despite being set as transparent. PDF viewer already has none set for forced color adjust so should be fixed once this issue is.

Flags: needinfo?(fchasen)
Assignee: nobody → fchasen
Blocks: 1818819
Whiteboard: [fidefe-quality-foundation]

Prevents backplates from being drawn for any text that has forced-color-adjust: none set by checking the value of StyleText()->mForcedColorAdjust.

Pushed by fchasen@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/0dc8af92d56c
Prevent drawing backplate when forced-color-adjust is none r=emilio
Status: NEW → RESOLVED
Closed: 1 year ago
Resolution: --- → FIXED
Target Milestone: --- → 113 Branch
Flags: qe-verify+
Attached image HCM ON.png

I've reproduced this issue using Firefox 112.0b1 on Windows 10 x64 following the STR from Comment 0.
The issue can still be reproduced in the latest Nightly 114.0a1 and Firefox 113.0b9 versions with High Contrast Black ON under same configuration.
In Google Chrome the text Hello World!! is rendered on a black background.
Is there a pref that we should flip in order to verify this issue?
Please see the attachment.

Attached image Chrome 112.0.png

The test-case is missing a forced-color-adjust: none.

You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: