This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 26734 - <style> needs to be applied in SVG fetched through <img>
Summary: <style> needs to be applied in SVG fetched through <img>
Status: RESOLVED MOVED
Alias: None
Product: WHATWG
Classification: Unclassified
Component: HTML (show other bugs)
Version: unspecified
Hardware: PC All
: P2 normal
Target Milestone: Unsorted
Assignee: Ian 'Hixie' Hickson
QA Contact: contributor
URL:
Whiteboard: blocked awaiting response from Dirk t...
Keywords:
Depends on:
Blocks: 24055
  Show dependency treegraph
 
Reported: 2014-09-05 08:38 UTC by Anne
Modified: 2019-03-29 21:10 UTC (History)
6 users (show)

See Also:


Attachments

Description Anne 2014-09-05 08:38:27 UTC
Follow up from bug 26144.

In SVG as image context (<img src=svg>) we want to create a style sheet, but we want to set some kind of parameter that the style sheet only fetches resources with the "local fetches only flag" (see bug 26114) set.
Comment 1 Tab Atkins Jr. 2014-09-05 19:23:31 UTC
Hmm. Unsure if this should be specified in CSSOM, or somewhere else.
Comment 2 Anne 2014-09-05 19:40:01 UTC
This will have to be part of CSS' fetching model. Which I guess is still not really defined. But e.g. it also affects the definition of <style> in HTML.
Comment 3 Ian 'Hixie' Hickson 2014-09-19 17:53:26 UTC
Can you elaborate? I'm not sure I really understand what this bug is about.
Comment 4 Anne 2014-09-20 09:07:09 UTC
The idea is that when you fetch <img src=svg>, you get back a resource that you parse into a document without a browsing context or settings object. You still want to apply style sheets from that Document to create some kind of rendering output (SVG hasn't really defined all this yet unfortunately, so I've no idea what terms we want). However, we do not want that document or its style sheets to fetch any external resources, so they need some additional processing flags for that (that they can then pass on to underlying systems such as Fetch, so that blob and data URLs still work).
Comment 5 Anne 2014-09-20 09:08:22 UTC
To be fair, the apply a style sheet (with some parameters) to a document and get some rendering output, is probably a missing concept in CSS, not SVG. But SVG misses the concept of having documents with browsing contexts and without.
Comment 6 Ian 'Hixie' Hickson 2014-09-22 16:33:11 UTC
Ok but what precisely do you want on the HTML side? It's not clear that anything you're describing affects HTML. DOM, CSS, SVG, Fetch: sure. But why HTML? HTML already doesn't create a browsing context here, so the SVG spec can just describe how to render itself or fetch further resources when it is being presented in the absence of a browsing context, right?
Comment 7 Anne 2014-09-22 16:41:43 UTC
I thought we updated HTML to only do style resolution (or whatever it's called) if there's a browsing context. But e.g. <html:style> would still work in such an SVG-as-image resource.
Comment 8 Ian 'Hixie' Hickson 2014-09-23 18:05:26 UTC
Ah, well, if you want certain things in HTML to work in certain cases where they don't work currently, please list what those should be and under what conditions they should work, and I'll be happy to update the spec.
Comment 9 Anne 2014-09-24 09:24:35 UTC
Dirk, could you get the SVG WG to do that? SVG-as-image is the only case where this would apply.
Comment 10 Domenic Denicola 2019-03-29 21:10:36 UTC
https://github.com/whatwg/html/issues/702