Re: [csswg-drafts] [css-contain] content-visibility: auto and SVG-as-image (#10347)

> I mean, at least Gecko shares SVG-as-images.

Chrome does this as well. We need to pass in some context-specific data when drawing the image, such as when two `<img>`s reference the same svg but have different sizes ([code](https://source.chromium.org/chromium/chromium/src/+/main:third_party/blink/renderer/core/svg/graphics/svg_image_for_container.h;drc=c0265133106c7647e90f9aaa4377d28190b1a6a9;l=38)). It would be technically possible to include top-level viewport intersection in this context-specific data.

There are are some spec'd differences between svgs in iframes vs svg images, such as how svg image do not allow interaction or script ([secure animated mode](https://svgwg.org/svg2-draft/single-page.html#conform-secure-animated-mode)). Because of the restrictions of svg images, there is _almost_ no observable difference if we just consider them as always relevant to the user vs actually calculating top-level-viewport intersection.

-- 
GitHub Notification of comment by progers
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/10347#issuecomment-2125116415 using your GitHub account


-- 
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config

Received on Wednesday, 22 May 2024 15:41:44 UTC