Background image larger than 4096px ignore CSS opacity
Categories
(Core :: Graphics: WebRender, defect, P3)
Tracking
()
People
(Reporter: romuald, Assigned: bradwerth)
References
(Blocks 1 open bug, Regression)
Details
(Keywords: regression)
Attachments
(3 files, 2 obsolete files)
Description
When a CSS element have an image whose background-image
is an image larger than 4096 pixels (in height at least), the opacity
CSS attribute is somehow ignored.
Any value more than 0.0 will be displayed with an actual opacity of 1.0
- when using a CSS definition with an image of 4096px height and 0.3 opacity, the opacity correctly displayed
- when using a CSS definition with an image of 4097px height and 0.3 opacity, the opacity is set to 1.0
I've attached an HTML page showing the issue
Additional information
This is a regression, as this works fine in Firefox 78 (ESR)
This seems to affect all platforms
For some reason, adding a visible text (not space for example) inside the element will circumvent the issue and take the opacity into account
(Actual use case is CSS sprites image whose width / height can be very large)
Reporter | ||
Comment 1•3 years ago
|
||
Included the actual images as data-url as the original ones obviously weren't included >_<
Reporter | ||
Comment 2•3 years ago
|
||
The example can also be found at https://chivil.com/bugs/firefox-background-opacity/
Reporter | ||
Updated•3 years ago
|
Mozregression says that it's regression from bug 1669840.
Updated•3 years ago
|
Updated•3 years ago
|
Assignee | ||
Comment 4•3 years ago
|
||
I'll figure out what we can do here. Likely we're hitting some texture limit in WebRender that puts us on a fallback path that handles opacity differently.
Comment 5•3 years ago
|
||
I would suspect something to do with image tiling?
Updated•3 years ago
|
Updated•3 years ago
|
Updated•3 years ago
|
Comment 6•3 years ago
|
||
Hi Brad, any chance to look at this one (and perhaps also triage)?
Thank you!
Assignee | ||
Comment 7•3 years ago
|
||
Sorry for the lack of action on this. I'll stay on it; just need to complete some other things first.
Updated•3 years ago
|
Updated•3 years ago
|
Updated•3 years ago
|
Comment 8•3 years ago
|
||
:bradwerth is this still a priority?
Assignee | ||
Comment 9•3 years ago
|
||
(In reply to Lougenia Bailey from comment #8)
:bradwerth is this still a priority?
P3 is still appropriate. I have higher-priority bugs assigned to me.
Updated•3 years ago
|
Updated•3 years ago
|
Updated•3 years ago
|
Comment 11•3 years ago
|
||
Hi Brad, any chance we can revisit the priority of this bug? It appears to have picked up a dupe recently and is hitting in the wild.
Assignee | ||
Comment 12•3 years ago
|
||
Comment on attachment 9234227 [details]
HTML example reproducing the issue
The other reproduction case is self-contained.
Assignee | ||
Comment 13•3 years ago
|
||
This prevents opacity from being set on large images sent to WebRender.
Instead, opacity will be handled in the parent layer, which is less efficient,
but correct for these large images.
This can be a temporary fix until WR supports opacity on arbitrarily large
images.
Assignee | ||
Comment 14•3 years ago
|
||
Still need to add a test, and a dependent Bug for a better fix within WebRender.
Updated•3 years ago
|
Assignee | ||
Comment 15•3 years ago
|
||
Depends on D137360
Comment 17•3 years ago
|
||
Comment 18•3 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/01e61a4cc0af
https://hg.mozilla.org/mozilla-central/rev/086ba0886b3f
Assignee | ||
Comment 19•3 years ago
|
||
Post-landing comments on https://phabricator.services.mozilla.com/D137360 revealed a flaw that needs patching.
Assignee | ||
Comment 20•3 years ago
|
||
WebRender doesn't care about CSS scale, so calculate its limits in terms of
the scale it does care about.
Updated•3 years ago
|
Assignee | ||
Updated•3 years ago
|
Updated•3 years ago
|
Updated•3 years ago
|
Description
•