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: Mon, 5 Nov 2012 16:52:49 -0800
To: "robert@ocallahan.org" <robert@ocallahan.org>, "www-style@w3.org list" <www-style@w3.org>
Message-ID: <5C4E98FA-536E-40D5-AE04-EA8A76C303E6@adobe.com>

On Oct 26, 2012, at 6:14 PM, Dirk Schulze <dschulze@adobe.com> wrote:

> Hi Robert,
> On Oct 23, 2012, at 2:17 PM, Robert O'Callahan <robert@ocallahan.org> wrote:
>> The code paths to load an SVG document as an image and an SVG document to provide an external resource such as a paint server are quite different, in Gecko at least. We need to know when we start loading the document which situation we're in. With your syntax, we can't know until the document is loaded. We use the presence of element() to signal that we're in the external resource situation.
> As discussed in the previous thread, the 'mask' property[1] does reference the mask resource as well as images, which would lead into the same problem for Gecko.
> I can't say if WebKit will run into the same situation as well. Maybe. The 'mask' property with image processing is prefixed on WebKit. So WebKit will continue to support -webkit-mask as it does right now. But the unprefixed property may do something different.
> A solution can be that we split the 'mask' property again. The 'mask' property will use resource referencing and another property, with a different name, will be the shorthand for the 'mask-image' properties. I am unsure how this property could be named.
> I added an issue to the spec for now and am open for suggestions.

We seem to have a consensus when we treat a SVG fragment as SVG resource (reference to e.g <mask>) and when as an image. This consensus still needs discussion on the WGs.

However, this consensus might not fully solve the problem on CSS Masking:

mask: url(#image.svg#resource);

According to the compromise, the SVG fragment is interpreted as SVG resource. This does not necessarily help the CSS parser to decide if the 'mask' property is interpreted as 'mask-image', or as SVG mask - at least on WebKit. The '-webkit-mask' property gets parsed the same way as the 'background' property. I am not sure if WebKit can identify the resource as SVG file that early in the parsing process. I need to verify that on WebKit but would like to hear feedback from other browser vendors.

At the end, the easiest way still seems to add a new short hand property for 'mask-image' and separate the 'mask' property for "CSS masking" introduced by WebKit from SVG masking.


> Greetings,
> Dirk
> [1] http://dvcs.w3.org/hg/FXTF/raw-file/tip/masking/index.html#mask-property
Received on Tuesday, 6 November 2012 00:53:19 UTC

This archive was generated by hypermail 2.4.0 : Friday, 25 March 2022 10:08:23 UTC