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
not.
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