[webkit-dev] Proposal: Add support for focus rings in Canvas 2d

Rik Cabanier cabanier at gmail.com
Mon Oct 14 16:19:54 PDT 2013


On Mon, Oct 14, 2013 at 4:13 PM, Timothy Hatcher <timothy at apple.com> wrote:

> On Oct 14, 2013, at 3:44 PM, Rik Cabanier <cabanier at gmail.com> wrote:
>
> Isn't focus ring drawn on the canvas?  If so, it's important that the
>>>>> focus ring fits within the canvas. e.g. consider focusing an element of
>>>>> 100px by 100px inside a canvas of the same size.  If the focus ring were to
>>>>> be drawn around the element that currently has focus, then the entire focus
>>>>> ring would be drawn outside of the visible region.
>>>>>
>>>>
>>> True. That sounds like bad design though.
>>>
>>
>> Why? It doesn't seem particularly strange to have an element occupy the
>> entire canvas momentarily.
>>
>
> No, but I wouldn't never make the focus ring as large as the canvas.
>
>
> Even if you don't make it full size, if the focus ring is drawn into the
> canvas buffer, you don't know how much room you need to account for. (If
> the focused control is near the edge of the canvas.)
>

The spec says:

draw a focus ring of the appropriate style along the intended path,
following platform conventions.


In one of the email threads I have asked what "along the path" meant but
there hasn't been an answer...
I think it's assumed that you leave enough space so the ring fits. There
isn't even anything in the spec that says that the path should fall in the
canvas region.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-dev/attachments/20131014/4303e0ed/attachment.html>


More information about the webkit-dev mailing list