Open bzbarsky opened 7 years ago
For what it's worth, in Gecko the corresponding check on the document is:
bool ShouldLoadImages() const
{
// We check IsBeingUsedAsImage() so that SVG documents loaded as
// images can themselves have data: URL image references.
return IsCurrentActiveDocument() || IsBeingUsedAsImage();
}
Is there a processing model yet for SVG as image? I think this is why Fetch has https://fetch.spec.whatwg.org/#local-urls-only-flag in part, but I'm pretty sure I added that speculatively and "IsBeingUsedAsImage()" has no standards equivalent.
Is there a processing model yet for SVG as image?
I don't know. Maybe @dholbert does?
The processing model that we use for SVG-as-an-image is specced here, under heading "Secure animated mode": https://svgwg.org/specs/integration/#secure-animated-mode
Thanks, I filed https://github.com/w3c/svgwg/issues/358 since I cannot really use as a primitive.
Consider something like this:
where foo.svg has an
<html:img src="data:....">
inside. Per https://html.spec.whatwg.org/multipage/images.html#update-the-image-data step 1, this should never load, because there is no browsing context involved in that SVG, so the node document of the html:img is not "the active document", etc. But I would think UAs actually do that image load.// cc @annevk @domenic