Re: [css-masking] when to interpret 'mask-image' as SVG mask vs. image?

On Wed, Dec 9, 2015 at 1:52 PM, Tab Atkins Jr. <> wrote:

> Okay, found the thread. It starts in Oct 2012 at
> <>.
> 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 <>.
> 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 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).

lbir ye,ea yer.tnietoehr  rdn rdsme,anea lurpr  edna e hnysnenh hhe uresyf
selthor  stor  edna  siewaoeodm  or v sstvr  esBa  kbvted,t
o l euetiuruewFa  kbn e hnystoivateweh uresyf tulsa rehr  rdm  or rnea
.a war hsrer holsa rodvted,t  nenh hneireseoouot.tniesiewaoeivatewt sstvr

Received on Saturday, 9 January 2016 10:21:58 UTC