W3C home > Mailing lists > Public > public-canvas-api@w3.org > July to September 2013

Re: drawSystemFocusRing implementation details

From: Dominic Mazzoni <dmazzoni@google.com>
Date: Fri, 16 Aug 2013 17:13:16 -0700
Message-ID: <CAFz-FYyjTiYDkRjGpphhG1F_gqwwhEjVpmVOQbWZQ7BaNcM31g@mail.gmail.com>
To: Charles Pritchard <chuck@jumis.com>
Cc: Rik Cabanier <cabanier@gmail.com>, "public-canvas-api@w3.org" <public-canvas-api@w3.org>
On Fri, Aug 16, 2013 at 4:40 PM, Charles Pritchard <chuck@jumis.com> wrote:

> A temporary bitmap would be created and the browser would draw on it,
> above the current bitmap. Basically, the same thing that happens with
> HTML/SVG elements (the focus ring is rendered above their backing bitmap).

That's not a correct description of what happens with HTML/SVG elements, at
least in WebKit or Blink. Most elements don't have their own backing bitmap
(though some do). When an element is focused, it triggers a repaint of the
rectangle enclosing the bounds of the focus ring. During repainting, the
focus ring is drawn after the focused element, making it appear on top.
Adding a separate bitmap layer would be quite a bit more expensive and
inefficient, and there's no need for that.

Either way, whether or not a separate bitmap is used is an implementation
detail, not something that belongs in the spec.

It sounds like what you want is for the focus ring to be drawn on the page,
on top of the canvas (rather than into the canvas bitmap) - and you want it
to disappear when the element loses focus, whether the canvas is redrawn or

I'm not convinced that's better than the current spec - but I think that'd
be the right way to word what you're asking for.

- Dominic
Received on Saturday, 17 August 2013 00:13:43 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 20:31:55 UTC