Closed Bug 1554753 Opened 7 years ago Closed 7 years ago

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

Categories

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

67 Branch
defect

Tracking

()

RESOLVED FIXED
mozilla69
Tracking Status
firefox-esr60 --- wontfix
firefox67 --- wontfix
firefox67.0.1 --- wontfix
firefox68 --- wontfix
firefox69 --- fixed

People

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

References

(Regression)

Details

(Keywords: parity-chrome, regression, Whiteboard: [qa-69b-p2])

Attachments

(3 files)

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.

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: nobody → violet.bugreport
Status: NEW → ASSIGNED

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.

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
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
Status: ASSIGNED → RESOLVED
Closed: 7 years 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?

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-
Whiteboard: [qa-69b-p2]
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: