Emoji do not respect 0% opacity when combined with drop shadow

RESOLVED FIXED in Firefox 69

Status

()

defect
P3
normal
RESOLVED FIXED
20 days ago
2 days ago

People

(Reporter: github.com, Assigned: violet.bugreport)

Tracking

(Regression, {parity-chrome, regression})

67 Branch
mozilla69
Points:
---
Bug Flags:
in-testsuite -

Firefox Tracking Flags

(firefox-esr60 wontfix, firefox67 wontfix, firefox67.0.5 wontfix, firefox68 wontfix, firefox69 fixed)

Details

Attachments

(3 attachments)

Reporter

Description

20 days ago

User Agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:67.0) Gecko/20100101 Firefox/67.0

Steps to reproduce:

This pink unicorn should be invisible.

<span style="font-size:3em;color: rgba(255, 105, 180, 0.0); text-shadow: .2em .2em .2em #000;
">🦄 Unicorn</span>

Actual results:

The Unicorn has 100% opacity, but the text has 0% opacity.

Expected results:

The unicorn should also be invisible.

The only way on Firefox, to get a completely invisible pink unicorn plus a drop shadow is to use: color: rgba(255, 105, 180, 0.002); text-shadow: .2em .2em .2em #000;

If you use: rgba(255, 105, 180, 0.001); the Unicorn becomes visible again.

This only appears to be a problem on FF for Linux. It works on FF for Android.

Updated

20 days ago
Status: UNCONFIRMED → NEW
Has Regression Range: --- → yes
Has STR: --- → yes
Component: Untriaged → Layout: Text and Fonts
Ever confirmed: true
Product: Firefox → Core
Regressed by: 1248708

The priority flag is not set for this bug.
:dholbert, could you have a look please?

For more information, please visit auto_nag documentation.

Flags: needinfo?(dholbert)
Assignee

Updated

5 days ago
Assignee: nobody → violet.bugreport
Status: NEW → ASSIGNED
Assignee

Comment 3

5 days ago

The difference between 0.002 and 0.001 is simply a rounding problem, because 256 * 0.002 > 0.5 rounded to 1, while 256 * 0.001 < 0.5 thus rounded to 0.

Assignee

Comment 4

5 days ago

The regressor Bug 1248708 inadvertently changed the behavior for opacity 0 text
when implementing -webkit-text-stroke. It treats all opacity 0 text as drawing stroke
even if the stroke property isn't used in the first place.

We should check aParams.textStrokeWidth is actually set before changing draw mode.

Thanks for jumping on this, Violet!

Flags: needinfo?(dholbert)
Priority: -- → P3

Comment 6

4 days ago
Pushed by violet.bugreport@gmail.com:
https://hg.mozilla.org/integration/autoland/rev/362cff551a01
Should not treat 0 opacity text without stroke width as drawing stroke r=jfkthame

Comment 7

3 days ago
bugherder
Status: ASSIGNED → RESOLVED
Closed: 3 days ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla69

This seems edge-case enough that it can ride the trains. Can we add a test for it, though?

Flags: needinfo?(violet.bugreport)
Flags: in-testsuite?
Assignee

Comment 9

2 days ago

A testcase is difficult for this bug, see discussion https://phabricator.services.mozilla.com/D34663#1029466

Flags: needinfo?(violet.bugreport)
Flags: in-testsuite? → in-testsuite-
You need to log in before you can comment on or make changes to this bug.