backdrop-filter: url(#svg-filter) causes the element to not render
Categories
(Core :: Graphics: WebRender, defect)
Tracking
()
People
(Reporter: kyza, Assigned: emilio)
References
(Regression)
Details
(Keywords: regression)
Attachments
(3 files, 1 obsolete file)
Steps to reproduce:
- Create an SVG filter.
- Apply the SVG filter to the
backdrop-filter
of an element outside of the SVG.
User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:104.0) Gecko/20100101 Firefox/104.0
Issue Example: https://codepen.io/Kyza/pen/WNzqjML
Actual results:
The element does not render. Similar to opacity: 0
.
Expected results:
The element renders with the appropriate filter from the SVG.
Comment 1•2 years ago
|
||
The Bugbug bot thinks this bug should belong to the 'Core::Graphics: WebRender' component, and is moving the bug to that component. Please correct in case you think the bot is wrong.
Comment 2•2 years ago
•
|
||
With WebRender and backdrop-filter force-enabled, I got this range with mozregression. Suspects include bug 1578777, bug 1581307. Botond, Sotaro, what do you think?
Updated•2 years ago
|
Comment 3•2 years ago
|
||
It's possible that we hit a path where we don't support that SVG filter on a backdrop-filter, and we should just drop the filter but render the rest of the content for now, at least. Any ideas if something like that might be happening Emilio?
Updated•2 years ago
|
Comment 4•2 years ago
|
||
(In reply to Gregory Pappas from comment #2)
With WebRender and backdrop-filter force-enabled, I got this range with mozregression. Suspects include bug 1578777, bug 1581307. Botond, Sotaro, what do you think?
bug 1581307 does not change a behavior. It seems not related to this problem.
Assignee | ||
Comment 5•2 years ago
|
||
Assignee | ||
Comment 6•2 years ago
|
||
So, that's already what's happening for some unsupported backdrop-filters:
However in this case we hit the !initialized
code-path below:
Because we hit this code-path in SVGFilterInstance
:
Same happens if we replace backdrop-filter
with just filter
.
So there are two issues:
- Invalid filters should probably not paint nothing, that's also true of masks, see bug 1483225. That's what Chrome does in the test-case if you use
filter
rather thanbackdrop-filter
. - Not sure how we should treat the
BackgroundImage
/BackgroundAlpha
filter input, maybe we should treat it asSourceImage
/SourceAlpha
when usingbackdrop-filter
? Markus seems familiar with this code, do you know (when you have the time / are back from PTO)?
Comment 7•2 years ago
•
|
||
(In reply to Gregory Pappas from comment #2)
With WebRender and backdrop-filter force-enabled, I got this range with mozregression. Suspects include bug 1578777, bug 1581307. Botond, Sotaro, what do you think?
This does seem to be a regression from bug 1578777.
The culprit appears to be https://phabricator.services.mozilla.com/D46060, which was intended to be just a refactoring, but accidentally introduced a functional change: it factored out a helper function to be shared by nsDisplayFilters::CanCreateWebRenderCommands
and nsDisplayBackdropFilters::CanCreateWebRenderCommands
, without realizing that the first was looking at StyleEffects()->mFilters
and the second was looking at StyleEffects()->mBackdropFilters
. The helper function looked at StyleEffects()->mFilters
, thereby giving an incorrect answer when called from nsDisplayBackdropFilters::CanCreateWebRenderCommands
.
The effect of this function was to gate the creation of an nsDisplayBackdropFilters
display item.
That condition was removed in bug 1423746, whose commit message includes:
Remove the BackdropFilters::CanCreateWebrenderCommands call because it
was testing for StyleSVGEffects::mFilters rather than mBackdropFilters,
so it was doing nothing.
I suspect that the correct implementation returned false at the time, thereby inhibiting the creation of an nsDisplayBackdropFilters
display item, and resulting in rendering the element without the backdrop filter.
Comment 8•2 years ago
|
||
Set release status flags based on info from the regressing bug 1578777
Updated•2 years ago
|
Comment 9•2 years ago
|
||
This fixes a regression introduced inadvertently in
https://phabricator.services.mozilla.com/D46060.
Assignee | ||
Comment 10•2 years ago
|
||
Updated•2 years ago
|
Updated•2 years ago
|
Updated•2 years ago
|
Updated•2 years ago
|
Comment 11•2 years ago
|
||
Updated•2 years ago
|
Comment 13•2 years ago
|
||
Backed out changeset b134d587690d (Bug 1787623) for causing reftest failures on filter-basic-01.svg.
Backout link
Push with failures <--> Rs7
Failure Log
Updated•2 years ago
|
Assignee | ||
Updated•2 years ago
|
Comment 15•2 years ago
|
||
Comment 16•2 years ago
|
||
Backed out for causing mochitest failures on test_filter_crossorigin.html . CLOSED TREE
Backout link
Push with failures
Backfill range
Link to failure log
Failure line : TEST-UNEXPECTED-FAIL | layout/svg/tests/test_filter_crossorigin.html | reftest comparison: == Testcase loaded from mochi.test Reference: black/yellow
Comment 19•2 years ago
|
||
Comment 20•2 years ago
|
||
bugherder |
Comment 22•2 years ago
|
||
The patch landed in nightly and beta is affected.
:emilio, is this bug important enough to require an uplift?
- If yes, please nominate the patch for beta approval.
- If no, please set
status-firefox105
towontfix
.
For more information, please visit auto_nag documentation.
Assignee | ||
Comment 23•2 years ago
|
||
It's non-trivial and not a regression so probably not, but please feel free to request uplift if you disagree.
Updated•2 years ago
|
Description
•