Re: drawSystemFocusRing and drawCustomFocusRing names are confusing.

On 1/13/2014 2:48 PM, Richard Schwerdtfeger wrote:
> <to>
>
> "Sets the location, based on the _current default path,_ 
> <http://www.w3.org/TR/2012/CR-2dcontext-20121217/#current-default-path> for 
> the associated fallback element and if the given element is focused, 
> draws a ring along the same path using the style the browser uses for 
> drawing its standard focus ring."
> </to>
>

Apologies if this has already been covered: did the group settle on the 
issue of what "drawing" means in this context?

When I was participating on this topic, let's say a few years ago, I 
thought draw just meant "show".

As in, show focus using the style the browser would use for the 
particular element in focus.
In the early Chrome implementation however, the implementer (hi Dominic) 
chose to draw directly onto the canvas bitmap.

On this bikeshedding issue, I believe we had considered using a simple flag.

// HTML+early canvas:
<style>a{ -webkit-focus: outline: none|<outline>;}</style>
<canvas></canvas><a href="#" style="position: absolute">text</a>

// HTML with live descendents:
<canvas><a onfocus="this.parent.getContext('2d').showFocus(this, 
{transparent: true|false})" href="#">text</a></canvas>


I've not had much luck with code snippets on these discussions, but I 
hope that shows where things were and where I thought they were going.
Now we'd just used a boolean instead of an object, and a different name, 
but it was intended (at least on my part), to be about "showFocus".

The boolean was there for the same reason -webkit-focus exists. Note 
that in these, the author only needs to call showFocus, they do not need 
to repaint the bitmap.

-Charles

Received on Tuesday, 14 January 2014 00:59:12 UTC