W3C home > Mailing lists > Public > public-houdini@w3.org > May 2015

Re: Properties of Custom Paint

From: Shane Stephens <shans@google.com>
Date: Thu, 21 May 2015 19:38:49 +0000
Message-ID: <CAGTfzwSuqTvf-daZj28gYq59kqL4oe2YNOprEaXZp4DJmYzYgw@mail.gmail.com>
To: Dean Jackson <dino@apple.com>, Ian Kilpatrick <ikilpatrick@chromium.org>
Cc: "public-houdini@w3.org" <public-houdini@w3.org>, "Robert O'Callahan" <robert@ocallahan.org>
> As I've said to Shane and Ian offline, I think that a variant on the
> element() feature can address many of the requirements for custom paint
> with a few API modifications (allowing it to be used in more places, in
> addition to default rendering, responding to layout updates, etc). We've
> found -webkit-canvas to be especially useful in this manner (we use it for
> the custom rendering of our scrubber bar in media controls).

One concern I have with this is that if you register the same canvas to
multiple elements, you're stuck with a single canvas size. So you can't
really build a custom painter that e.g. paints a fancy border for any given
size input - instead, you'd need to create a new <canvas> element that
shadows every fancy border instance, so that each could be responsive
independently to layout.

In fact, I'd like to propose an extra "Required Property" for Ian's list:
Custom Paint functions can be shared across multiple elements

One potential solution is to either allow element() to reference paint
functions directly (rather than just out-of-dom canvases), or to add a new
CSS function for this purpose (e.g. paint()).

Received on Thursday, 21 May 2015 19:39:27 UTC

This archive was generated by hypermail 2.3.1 : Thursday, 21 May 2015 19:39:28 UTC