Re: [csswg-drafts] [css-mediaqueries] Should prefers-color-scheme in SVG images be context-dependent? (#7213)

The CSS Working Group just discussed `[css-mediaqueries] Should prefers-color-scheme in SVG images be context-dependent?`, and agreed to the following:

* `RESOLVED: prefers-color-scheme in SVG rendered in secure animated mode is context-dependent`

<details><summary>The full IRC log of that discussion</summary>
&lt;fantasai> Topic: [css-mediaqueries] Should prefers-color-scheme in SVG images be context-dependent?<br>
&lt;fantasai> github: https://github.com/w3c/csswg-drafts/issues/7213<br>
&lt;fantasai> emilio: I did check with the security folks at MOzilla, and they weren't concerned about making this apply even more generally to iframes<br>
&lt;fantasai> emilio: Only attack is if a page is in an iframe and a top-level frame, can determine ???<br>
&lt;fantasai> emilio: But no problem for SVG images<br>
&lt;fantasai> emilio: I think it'd be nice to do it for iframes as well<br>
&lt;fantasai> emilio: My discussion with them was that it's not a big concern, idk if other folks have an opinion<br>
&lt;fantasai> smfr: On the WebKit side would be much more reluctant to do on iframes, but OK for SVG images<br>
&lt;fantasai> smfr: Was having trouble finding text in HTML spec that SVG couldn't run script or load external images<br>
&lt;fantasai> smfr: so part of this issue needs to clarify when SVG can load external resources or run script<br>
&lt;chris> q+<br>
&lt;fantasai> emilio: Why reluctant to make it work on iframes?<br>
&lt;fantasai> emilio: We already communicate info about backgrounds<br>
&lt;fantasai> smfr: I'd have to go back and ask the security ppl<br>
&lt;astearns> ack chris<br>
&lt;fantasai> chris: SVG images in &lt;img> tag don't run scripts or fetch resources<br>
&lt;dholbert> smfr: RE where it's defined that SVG Images don't run scripts, that's defined in https://svgwg.org/specs/integration/<br>
&lt;fantasai> chris: if they are in &lt;object> they can fetch and run script<br>
&lt;fantasai> chris: It's not a function of SVG, but function of SVG's integration in external environment and what it allows them to do<br>
&lt;dholbert> see https://svgwg.org/specs/integration/#secure-animated-mode<br>
&lt;fantasai> astearns: When in &lt;object> ...<br>
&lt;dholbert> "Secure animated mode"<br>
&lt;fantasai> chris: They can do everything<br>
&lt;fantasai> astearns: Are they SVG images?<br>
&lt;fantasai> chris: Yes, just not using an &lt;img> tags<br>
&lt;smfr> dholbert: but HTML doesn’t reference that everywhere it needs to<br>
&lt;fantasai> emilio: From implementation point of view, they are iframes<br>
&lt;TabAtkins> (as far as I recall) Chrome is fine with passing into any SVG that can't fetch or run script (aka &lt;img> tags), and same-origin iframes.<br>
&lt;fantasai> chris: Also if displayed standalone, same thing<br>
&lt;fantasai> chris: they can run scripts, fetch resources, etc.<br>
&lt;TabAtkins> We just don't want to open up new cross-origin communication bits.<br>
&lt;fantasai> emilio: Seems there would be no objection to doing on SVG images<br>
&lt;fantasai> emilio: and maybe file an issue about iframes<br>
&lt;fantasai> smfr: Sounds good<br>
&lt;astearns> ack TabAtkins<br>
&lt;fantasai> TabAtkins: from what I recall, Chrome is fine with this so long as it doesn't open up new cross-origin communication bits<br>
&lt;fantasai> TabAtkins: So SVG as img should be fine<br>
&lt;fantasai> TabAtkins: and same-origin iframe should be fine<br>
&lt;fantasai> smfr: That matches WebKit's preference, too<br>
&lt;fantasai> emilio: OK, then we can discuss iframes separately<br>
&lt;fantasai> emilio: I'm more interested in this SVG case<br>
&lt;fantasai> emilio: It's not easy for the iframe to tell where the preference comes from<br>
&lt;fantasai> emilio: we can discuss another time<br>
&lt;astearns> ack fantasai<br>
&lt;Zakim> fantasai, you wanted to propose resolution<br>
&lt;fantasai> fantasai: Seems we have consensus on SVG as &lt;img> and also same-origin iframe<br>
&lt;fantasai> ???: what about SVG's that are rendered through CSS?<br>
&lt;fantasai> fantasai: There's an embedding mode for SVG that does this, so anything in that embedding mode<br>
&lt;fantasai> astearns: Maybe let's take a resolution on SVG first<br>
&lt;fantasai> emilio: draw background in iframes, that doesn't care about same vs cross-origin, so unsure how to do that<br>
&lt;fantasai> astearns: proposed that prefers-color-scheme in SVG-images is context-dependent<br>
&lt;fantasai> smfr: "SVG rendered in secure animated mode"<br>
&lt;smfr> https://svgwg.org/specs/integration/#secure-animated-mode<br>
&lt;fantasai> astearns: objections?<br>
&lt;fantasai> RESOLVED: prefers-color-scheme in SVG rendered in secure animated mode is context-dependent<br>
&lt;fantasai> Meeting closed.<br>
&lt;astearns> zakim, end meeting<br>
&lt;Zakim> As of this point the attendees have been flackr, bramus, emilio, dholbert, rachelandrew, argyle, dbaron, alisonmaher, TabAtkins, plinss, jfkthame, chrishtr, jensimmons, GameMaker,<br>
&lt;Zakim> ... oriol, faceless, fantasai, bkardell_, dandclark, lea, bradk, tantek, hober<br>
&lt;Zakim> RRSAgent, please draft minutes v2<br>
&lt;RRSAgent> I have made the request to generate https://www.w3.org/2022/07/13-css-minutes.html Zakim<br>
&lt;Zakim> I am happy to have been of service, astearns; please remember to excuse RRSAgent.  Goodbye<br>
</details>


-- 
GitHub Notification of comment by css-meeting-bot
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/7213#issuecomment-1183468735 using your GitHub account


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

Received on Wednesday, 13 July 2022 17:02:24 UTC