No longer possible to draw SVG image into canvas element when content visibility is auto
Categories
(Core :: SVG, defect, P3)
Tracking
()
Tracking | Status | |
---|---|---|
firefox130 | --- | fixed |
People
(Reporter: ctumolosus, Assigned: jfkthame)
References
(Blocks 1 open bug)
Details
Attachments
(3 files)
Steps to reproduce:
Code sandbox reproducing the issue:
https://codesandbox.io/p/sandbox/ecstatic-water-forked-j77ht7?file=%2Fsrc%2Findex.mjs%3A42%2C3
Actual results:
SVG images that make use of <foreignObject> to rasterize HTML content no longer render nested HTML elements whose styles are set to "content-visibility: auto" after upgrading to Firefox 125.
Expected results:
Ideally, it should continue to rasterize elements styled with "content-visibility: auto" as it has been prior to this release.
Comment 1•7 months ago
|
||
The Bugbug bot thinks this bug should belong to the 'Core::SVG' component, and is moving the bug to that component. Please correct in case you think the bot is wrong.
Updated•7 months ago
|
Comment 3•7 months ago
|
||
Regression window w/ layout.css.content-visibility.enabled=true:
https://hg.mozilla.org/integration/autoland/pushloghtml?fromchange=1a33f2261018de20748b0f4ab09b8ddb4189ce86&tochange=daff4675a8d555acf048a4fa8d8861538bca3a47
Triggered by: c1e64e8e466506d1d9a36d747df25527bd545b10 Martin Robinson — Bug 1791759 - Add support for content-visibility: auto
r=emilio
Comment 4•7 months ago
|
||
content-visibility
was not released prior to Firefox 125. After it was released (or implemented in nightly in bug 1791759) elements with content-visibility: auto
are not visible until they become relevant to the user. When these elements are wrapped in a SVG document that is rendered inline in the current HTML document, then proximity to the viewport explains why such elements are visible or not. But when the SVG is loaded from a <img>
element and drawn in a canvas, it's less clear to me what makes relevant to the user. It seems Chromium renders the content-visibility: auto
that way but Firefox and dev version of WebKit don't do that.
Comment 5•6 months ago
|
||
The severity field is not set for this bug.
:emilio, could you have a look please?
For more information, please visit BugBot documentation.
Comment 6•6 months ago
|
||
Comment 7•6 months ago
|
||
Yeah, off-hand this seems invalid, I don't see what in the spec would make an invisible image like that "relevant to the user". I guess we could say that an SVG-as-image docs make stuff always "relevant to the user"? But that seems wrong.
I filed https://github.com/w3c/csswg-drafts/issues/10347 about this.
Assignee | ||
Comment 8•4 months ago
|
||
Updated•4 months ago
|
Comment 11•4 months ago
|
||
bugherder |
Description
•