- From: Jeremie Patonnier <jeremie.patonnier@gmail.com>
- Date: Mon, 8 Jul 2019 15:21:49 +0200
- To: public-svgcg@w3.org
- Message-ID: <CAEi838kJYLvjj1-wz8ViewU0V=013yb6B7i+m_DFOodiCgc1Ww@mail.gmail.com>
Hi! Everybody I recently complain on Twitter <https://twitter.com/JeremiePat/status/1144265809017147392> about issues regarding the <use> element and the call to remote paint servers (from the same origin, no cross-origin madness here). It took me a while to test it out but I think I got it (see: https://jeremiepat.github.io/svg-extend/svg-known-issues#remote-ressources and https://jeremiepat.github.io/svg-extend/tests/use-and-paint/) I'm not sure if this group is the right place to discuss this, so let me know if you know a better place for that. My findings can be summarized as such: - Blink/WebKit based browsers does not support remote paint servers (or anything that can be remotely called through a CSS url() function). It appears that it's a long standing bug, both for Chrome <https://bugs.chromium.org/p/chromium/issues/detail?id=109212> and Safari <https://bugs.webkit.org/show_bug.cgi?id=65344>, If anyone as any idea on how to lobby for those bugs, I'm all hears. - The SVG2 spec is somewhat unclear about how styles targeting a duplicate element from a remote file applies. It is stated that: "[…] all style rules that apply in the scope of the referenced element also apply in the scope of the cloned shadow tree <https://svgwg.org/svg2-draft/struct.html#UseElement>". I think it make sens that this statement is valid for elements living in the same file but it seams obnoxious to think it will work for a remote element. The current implementation of all browser is consistent to not apply styles to duplicated remote elements which make total sens IMO. Maybe a slight rewording of the spec could be a good idea to avoid any misinterpretation. - The SVG2 spec as changed the definition of the <use> element to express it in term of Shadow DOM. It's great and it is nicely implemented toward Chrome, Firefox and Safari. However, the spec state that "<style> elements embedded within the <use> Shadow tree should apply to elements within that Shadow tree. <https://svgwg.org/svg2-draft/struct.html#UseStyleInheritance>" This is pretty okay with the Shadow DOM spec and Chrome, Safari and Firefox add <style> elements within the shadow tree when its relevant. Unfortunately they do not apply the styles to the elements within the shadow tree! At that point I'm not sure if it's an implementation bug or if it's a subtle Shadow DOM spec corner case that requires some author magic to work. Any thought on this is welcome. (funny enough, and related to the first point, Chrome and Safari does NOT duplicate any paint server definition from a remote source within the shadow tree) Last but not least, I haven't found any definition on the spec on how the rendering should be done if a paint server cannot apply or fail to render. Does that worth a bug spec or is it just me me who hasn't been able to find the information? I'll be glad to here your thought on this topic :) Best, -- Jeremie ............................. Web : http://jeremie.patonnier.net Twitter : @JeremiePat <http://twitter.com/JeremiePat>
Received on Monday, 8 July 2019 13:22:49 UTC