W3C home > Mailing lists > Public > www-style@w3.org > November 2012

Re: [css-masking] 'mask' with resource and image references (was: [css4-images] support for SVG Paint Servers without element())

From: Dirk Schulze <dschulze@adobe.com>
Date: Wed, 7 Nov 2012 17:24:24 -0800
To: "Tab Atkins Jr." <jackalmage@gmail.com>
CC: "robert@ocallahan.org" <robert@ocallahan.org>, "www-style@w3.org list" <www-style@w3.org>
Message-ID: <4FFE5963-291E-4FD2-8CAC-42C1231A532C@adobe.com>

On Nov 7, 2012, at 4:40 PM, Tab Atkins Jr. <jackalmage@gmail.com> wrote:

> On Wed, Nov 7, 2012 at 4:26 PM, Dirk Schulze <dschulze@adobe.com> wrote:
>> Well, even if I am saying the same like above again. The WebKit CSS parser does not check for fragments and definitely does not follow a different processing path depending on the fragment. And even with the support for Media fragments (which would just preserve the fragments that WebKit ignores right now), this won't change. The linked file is interpreted as CSS image and not as SVG resource. The WebKit parser can not differ between different file resource at this parsing stage at the moment. The model is still compatible with the simplified proposal so far. WebKit just can't differ between SVG resource and CSS Image on the same property. It needs to be one of both. And for 'mask-image' it would be a CSS Image.
> 
> You keep citing WebKit's current implementation as if it can never
> change.  

Like you noted, I am citing WebKits current behavior. No one knows if the code base changes in the future. That is why I explicitly don't state it as a general issue, but as the current behavior. Other browser vendors do that as well and this is totally valid.

> Why?  Is there some technical difficulty, or do you think
> there is a compat problem?

Partly both. I think that the compat problem is not a big deal. WebKit currently treats url(image.svg#frag) as CSSImageValue, which, in theory, could break content if it should be treated as resource in the future. Again, this seems less likely the case.

>From the technical point of view WebKit always treats the input of 'mask-image' as a CSSImage, which is hard to change with WebKits current code base. This is because 'mask-image' uses the same logic as 'background-image'. And creates a CSSImageValue object during parsing.

> 
> The ENTIRE POINT of this whole discussion was to find a behavior we
> could settle on that would let us discriminate between resources and
> images at parse time.  You didn't object to this at any point, and
> explicitly supported the latest proposal.  Why are you objecting to
> this now?  Why didn't you object earlier?  What, precisely, is the
> problem, and why didn't you think it was a problem earlier?

You are just constantly misinterpreting my statements and I am not sure if there is anything I can do about it.

The proposal that we have is consistent with what we can implement in WebKit at the moment. And as you stated before, the switch between resource and image depends on the property. 'background-image' would switch to image, 'fill' would switch to SVG resource. Since 'mask-image' is so close to 'mask-image' it makes more sense to switch to image. That is exactly what WebKit does. But is obviously not compatible with switching to SVG resource in the future.

> 
> You're confusing the hell out of me.  ^_^

Sorry for that. Not sure if I can be more explicit and clear :-/.

Greetings,
Dirk

> 
> ~TJ
Received on Thursday, 8 November 2012 01:24:56 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 17:21:02 GMT