[webkit-dev] What's left to ship -webkit-filter unprefixed?

Dirk Schulze krit at webkit.org
Thu Sep 18 11:27:06 PDT 2014

On Sep 18, 2014, at 8:11 PM, Max Vujovic <mvujovic at adobe.com> wrote:

> Hi folks,
> I’m wondering what work is left to ship -webkit-filter unprefixed?
> I’m asking because Firefox is gearing up to ship filter unprefixed [1], and it’d be great to see WebKit do it, too.

We ship both properties, prefixed filter and unprefixed filter. Both with two different functionalities.

* filter are just supported on SVG and just one reference to a <filter> element
* -webkit-filter work just on HTML elements. It has support for the shorthand properties (even though not following the spec by word yet) and allows references to multiple <filter> elements. However, the <filter> references are still buggy and especially filter regions are not handled correctly. There might be other potential performance regressions for SVG when it comes to references of local <filter> elements in the same document.

> Some things that come to mind are:
> - Supporting the filter shorthand functions on SVG content.
> - Making sure the filter region and primitive subregion clipping calculations match the spec.

Filters on SVG have an entirely different backend which is not compatible to the backend used for HTML elements. It basically is not designed for multiple filter instances. We would need to reimplement filters for SVG again, which doesn’t seem to be efficient. At the same time we need to make sure that SVG Filters are as reliable as they are today on SVG content since they are used a lot.

IMO the way forward is to correct the implementation of -webkit-filter where possible. Some parsing quirks might just be fixed for the unprefixed filter property. In a second step, -webkit-filter must be independent of the logic used by HTML as much as possible. We are already going these steps with using RenderElement and so on. In a last step we either set up -webkit-filters in another place then RenderLayer where we still mostly do it today, or transform SVG to use RenderLayer as well.

To answer you’re question: There is still some work left.


PS: I saw that you sent the same message to blink-dev. Even thought a lot changed in the filter backend (HW accelerated SVG Filters and so on), most of the design principles still apply to Blink the same way as they do to WebKit.

> Thanks,
> Max
> [1]: https://groups.google.com/d/msg/mozilla.dev.platform/ujWvBvtugGY/aS0oA44HuoUJ
> _______________________________________________
> webkit-dev mailing list
> webkit-dev at lists.webkit.org
> https://lists.webkit.org/mailman/listinfo/webkit-dev

More information about the webkit-dev mailing list