- From: Robert O'Callahan <robert@ocallahan.org>
- Date: Sat, 9 Jan 2016 23:21:29 +1300
- To: "Tab Atkins Jr." <jackalmage@gmail.com>
- Cc: "L. David Baron" <dbaron@dbaron.org>, "public-fx@w3.org" <public-fx@w3.org>
- Message-ID: <CAOp6jLZMk7Ufhvm77w6NuqSjZzi0WdwrYWbcNZMbNM4H4tO81Q@mail.gmail.com>
On Wed, Dec 9, 2015 at 1:52 PM, Tab Atkins Jr. <jackalmage@gmail.com> wrote: > Okay, found the thread. It starts in Oct 2012 at > <https://lists.w3.org/Archives/Public/www-style/2012Oct/0766.html>. > The decision there was: > > 1. If the url() function does not have a hash, load it as an image. > 2. If the url() function has a hash, and is an SVG document, load it > as a resource. > 3. The image() function *always* loads its url as an image. (You have > to use this to get Media Fragments to work on SVG images.) > > That said, this never made it into a spec (mostly my fault, I think). > Implementations are mixed: > > * Firefox always interprets it as an image > * Blink currently always treats it as an image *and ignores the hash > entirely*, but *just* got a patch in (check recent Canary) that honors > the hash when treating it as an image. > * Can't easily check, but I suspect WebKit is the same as our old > implementation - always treat it as an image, ignore the hash > entirely. > * Edge always interprets it as an image. > > You can test at <http://www.xanthir.com/etc/bugs/svg-target/>. > > So, if we take current implementations as gospel, this means we > probably need to do the alternate proposal from that thread, which is: > > 1. If the url() function does not have a hash, load it as an image. > 2. If the url() function has a hash, load it as an image or a resource > depending on the property. (Small list of SVG properties that treat it > as a resource, everything else treats it as an image.) > 3. The image() function *always* loads it as an image. > 4. The element() function *always* loads it as a resource. > My understanding is that since the discussion in https://lists.w3.org/Archives/Public/public-fx/2013AprJun/0185.html the plan is to always load url(...)s as images, except when it's url(#hash) in which case it refers to an element in the current document. "Load it as a resource" isn't really a thing anymore. *After* the load, if the image is an SVG image, and the referenced element is an SVG <mask> element, and the image is same-origin, then mask-image would use the <mask> element as the mask (instead of using the whole image as if it was an SVG Stack). Rob -- lbir ye,ea yer.tnietoehr rdn rdsme,anea lurpr edna e hnysnenh hhe uresyf toD selthor stor edna siewaoeodm or v sstvr esBa kbvted,t rdsme,aoreseoouoto o l euetiuruewFa kbn e hnystoivateweh uresyf tulsa rehr rdm or rnea lurpr .a war hsrer holsa rodvted,t nenh hneireseoouot.tniesiewaoeivatewt sstvr esn
Received on Saturday, 9 January 2016 10:21:58 UTC