Re: intent to ship: drawFocusIfNeeded

2014-05-06 Thread Ian Hickson
On Tue, 6 May 2014, Robert O'Callahan wrote:
 On Tue, May 6, 2014 at 5:57 PM, Ian Hickson i...@hixie.ch wrote:
 
  Just so we're clear, I really don't care what the name is, nor do I 
  have any objection to people having private conversations or whatnot. 
  My point is just that there has not been a conversation in the WHATWG 
  list about this which has resulted in the name being changed.
 
 So you're saying that discussions on any forum other than the WHATWG 
 list are ignored for the purposes of you making changes to WHATWG specs?

They're not ignored, but I am unlikely to hear about them, and if I don't 
hear about them, or if they aren't convincing, then they're not likely to 
result in changes to the spec.

-- 
Ian Hickson   U+1047E)\._.,--,'``.fL
http://ln.hixie.ch/   U+263A/,   _.. \   _\  ;`._ ,.
Things that are impossible just take longer.   `._.-(,_..'--(,_..'`-.;.'
___
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform


Re: intent to ship: drawFocusIfNeeded

2014-05-05 Thread Ian Hickson
On Mon, 5 May 2014, Robert O'Callahan wrote:
 
 drawSystemFocusRing is a rather bad name since most calls to it will 
 draw nothing. drawCustomFocusRing is an even worse name since it will 
 draw nothing approximately always.
 
 drawFocusIfNeeded replaces drawSystemFocusRing, which is the method we 
 expect people to need much more than drawCustomFocusRing. 
 drawCustomFocusRing should change, but I'm not sure what to since its 
 name needs to indicate both that it doesn't usually draw anything and 
 its return value must be checked and properly used. I think it makes 
 sense to use the short name for the method that is both simpler and the 
 API most authors should be using.

drawFocusIfNeeded() isn't a particularly good name either, since you're 
not drawing the focus, you're drawing the focus ring.

I suppose if drawFocusIfNeeded() is the best we can come up with for 
drawSystemFocusRing(), then drawCustomFocusRing() could maybe become 
shouldDrawFocus().

In any case, the right place for these discussions would be a public 
standards list, like the WHATWG list, so that all the interested parties 
(in particular, authors) could have visibility into the discussion.

-- 
Ian Hickson   U+1047E)\._.,--,'``.fL
http://ln.hixie.ch/   U+263A/,   _.. \   _\  ;`._ ,.
Things that are impossible just take longer.   `._.-(,_..'--(,_..'`-.;.'
___
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform


Re: intent to ship: drawFocusIfNeeded

2014-05-05 Thread Robert O'Callahan
On Tue, May 6, 2014 at 8:13 AM, Ian Hickson i...@hixie.ch wrote:

 drawFocusIfNeeded() isn't a particularly good name either, since you're
 not drawing the focus, you're drawing the focus ring.


In the old email thread, Jatinder Mann objected to using the term ring
since the focus drawn might not look like a ring.

We could probably come up with a slightly better name, but only very
slightly better, so at this point I would rather not reopen the discussion.
If someone else wants to, that's up to them.

In any case, the right place for these discussions would be a public
 standards list, like the WHATWG list, so that all the interested parties
 (in particular, authors) could have visibility into the discussion.


I agree. Sorry.

Rob
-- 
Jtehsauts  tshaei dS,o n Wohfy  Mdaon  yhoaus  eanuttehrotraiitny  eovni
le atrhtohu gthot sf oirng iyvoeu rs ihnesa.rt sS?o  Whhei csha iids  teoa
stiheer :p atroa lsyazye,d  'mYaonu,r  sGients  uapr,e  tfaokreg iyvoeunr,
'm aotr  atnod  sgaoy ,h o'mGee.t  uTph eann dt hwea lmka'n?  gBoutt  uIp
waanndt  wyeonut  thoo mken.o w
___
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform


Re: intent to ship: drawFocusIfNeeded

2014-05-05 Thread Robert O'Callahan
On Tue, May 6, 2014 at 4:13 PM, Ian Hickson i...@hixie.ch wrote:

 On Tue, 6 May 2014, Robert O'Callahan wrote:

  We could probably come up with a slightly better name, but only very
  slightly better, so at this point I would rather not reopen the
  discussion. If someone else wants to, that's up to them.

 There hasn't been a discussion at all, so far.


Please don't be too pedantic. There has been a discussion between vendors,
it just wasn't public. For which I have already apologized.

Right now the spec says it's drawSystemFocusRing() and
 drawCustomFocusRing(), because there hasn't been a request to change it.


The WHATWG spec says that. The W3C spec was changed in January as a result
of the aforementioned discussion. It's sad that we need to qualify which
spec we're talking about, but we do.

Rob
-- 
Jtehsauts  tshaei dS,o n Wohfy  Mdaon  yhoaus  eanuttehrotraiitny  eovni
le atrhtohu gthot sf oirng iyvoeu rs ihnesa.rt sS?o  Whhei csha iids  teoa
stiheer :p atroa lsyazye,d  'mYaonu,r  sGients  uapr,e  tfaokreg iyvoeunr,
'm aotr  atnod  sgaoy ,h o'mGee.t  uTph eann dt hwea lmka'n?  gBoutt  uIp
waanndt  wyeonut  thoo mken.o w
___
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform


Re: intent to ship: drawFocusIfNeeded

2014-05-05 Thread Rik Cabanier
On Mon, May 5, 2014 at 9:28 PM, Robert O'Callahan rob...@ocallahan.orgwrote:

 On Tue, May 6, 2014 at 4:13 PM, Ian Hickson i...@hixie.ch wrote:

 On Tue, 6 May 2014, Robert O'Callahan wrote:

  We could probably come up with a slightly better name, but only very
  slightly better, so at this point I would rather not reopen the
  discussion. If someone else wants to, that's up to them.

 There hasn't been a discussion at all, so far.


 Please don't be too pedantic. There has been a discussion between vendors,
 it just wasn't public.


FWIW the discussion was public.
See
http://lists.w3.org/Archives/Public/public-canvas-api/2014JanMar/0003.html


 For which I have already apologized.

 Right now the spec says it's drawSystemFocusRing() and
 drawCustomFocusRing(), because there hasn't been a request to change it.


 The WHATWG spec says that. The W3C spec was changed in January as a result
 of the aforementioned discussion. It's sad that we need to qualify which
 spec we're talking about, but we do.


Dominic brought up that the name was confusing on WHATWG:
http://lists.whatwg.org/htdig.cgi/whatwg-whatwg.org/2013-September/252545.html

I like the new name better because it describes what the API is doing.
'drawSystemFocusRing' doesn't always draw and 'drawCustomFocusRing' returns
true if the author should draw (unless it draws itself!)
___
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform


Re: intent to ship: drawFocusIfNeeded

2014-05-05 Thread Robert O'Callahan
On Tue, May 6, 2014 at 4:44 PM, Rik Cabanier caban...@gmail.com wrote:

 FWIW the discussion was public.
 See
 http://lists.w3.org/Archives/Public/public-canvas-api/2014JanMar/0003.html


Haha, OK, apology withdrawn :-).

Thanks,
Rob
-- 
Jtehsauts  tshaei dS,o n Wohfy  Mdaon  yhoaus  eanuttehrotraiitny  eovni
le atrhtohu gthot sf oirng iyvoeu rs ihnesa.rt sS?o  Whhei csha iids  teoa
stiheer :p atroa lsyazye,d  'mYaonu,r  sGients  uapr,e  tfaokreg iyvoeunr,
'm aotr  atnod  sgaoy ,h o'mGee.t  uTph eann dt hwea lmka'n?  gBoutt  uIp
waanndt  wyeonut  thoo mken.o w
___
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform


Re: intent to ship: drawFocusIfNeeded

2014-05-02 Thread Ehsan Akhgari
On Thu, May 1, 2014 at 4:10 PM, Rik Cabanier caban...@gmail.com wrote:




 On Thu, May 1, 2014 at 11:58 AM, Ehsan Akhgari ehsan.akhg...@gmail.comwrote:

 On 2014-05-01, 2:22 PM, Rik Cabanier wrote:




 On Thu, May 1, 2014 at 10:49 AM, Ehsan Akhgari ehsan.akhg...@gmail.com
 mailto:ehsan.akhg...@gmail.com wrote:

 Hi Rik,

 How extensive is our testing of this feature?  I'm very surprised
 that bug 1004499 was not caught by a test when you landed this.


 I wrote a number of mochi tests. In addition Dominc (from Google) wrote
 a more real world example [1] and I checked that the blink test files
 also work in Firefox.
 There are also a number of W3C tests that check that the implementation
 follows the spec. [2]


 Sounds good!  If you think the existing mochitests don't give us enough
 coverage, we should try to add more tests.


  Can you give me an example where 1004499 would be triggered? I will
 update that bug with an extra test.


 We only draw the focus ring if something is focused by the keyboard.  In
 order to simulate that in a mochitest, you can give your DOM element a
 @tabindex attribute, and then use syntehsizeKey to generate VK_TAB events
 to focus that DOM element.  In order to test the opposite case, you can use
 synthesizeMouse to simulate setting the focus using the mouse.


 Is that always the case?


I think so, for content at least.


 In our tests, we can also use elements that can get the focus by default
 (such as input and a) and we can focus them by calling 'focus()' on the
 element.


Please check with Neil Deakin, he really knows this stuff the best.  I just
wanted to make sure we have good test coverage here.

Thanks!

--
Ehsan
http://ehsanakhgari.org/





  1: http://www.w3.org/2013/09/accessible_canvas_clock.html
 2:
 https://github.com/w3c/web-platform-tests/tree/master/
 2dcontext/drawing-paths-to-the-canvas


 On 2014-04-30, 8:44 PM, Rik Cabanier wrote:

 Primary eng emails
 caban...@adobe.com mailto:caban...@adobe.com

 *Spec*
 http://www.w3.org/html/wg/__drafts/2dcontext/html5_canvas_
 __CR/#dom-context-2d-__drawfocusifneeded

 http://www.w3.org/html/wg/drafts/2dcontext/html5_canvas_
 CR/#dom-context-2d-drawfocusifneeded

 *Summary*

 The drawFocusIfNeeded API is a method on the canvas context that
 allows a
 user to draw a focus ring when a fallback element is focused.
 See
 http://www.w3c-test.org/__2dcontext/drawing-paths-to-__
 the-canvas/drawFocusIfNeeded___001.html

 http://www.w3c-test.org/2dcontext/drawing-paths-to-
 the-canvas/drawFocusIfNeeded_001.html
 for
 an example.

 *Blink:*

 This is currently behind a runtime flag but engineers from
 Samsung is going
 to send an intent to ship to the blink mailing list.
 _
 dev-platform mailing list
 dev-platform@lists.mozilla.org
 mailto:dev-platform@lists.mozilla.org
 https://lists.mozilla.org/__listinfo/dev-platform
 https://lists.mozilla.org/listinfo/dev-platform






___
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform


Re: intent to ship: drawFocusIfNeeded

2014-05-01 Thread Anne van Kesteren
On Thu, May 1, 2014 at 1:44 AM, Rik Cabanier caban...@gmail.com wrote:
 [...]

Pointer to the bug?

Reason it's not in the WHATWG specification?


-- 
http://annevankesteren.nl/
___
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform


Re: intent to ship: drawFocusIfNeeded

2014-05-01 Thread Ehsan Akhgari

Hi Rik,

How extensive is our testing of this feature?  I'm very surprised that 
bug 1004499 was not caught by a test when you landed this.


Cheers,
Ehsan

On 2014-04-30, 8:44 PM, Rik Cabanier wrote:

Primary eng emails
caban...@adobe.com

*Spec*
http://www.w3.org/html/wg/drafts/2dcontext/html5_canvas_CR/#dom-context-2d-drawfocusifneeded

*Summary*
The drawFocusIfNeeded API is a method on the canvas context that allows a
user to draw a focus ring when a fallback element is focused.
See
http://www.w3c-test.org/2dcontext/drawing-paths-to-the-canvas/drawFocusIfNeeded_001.html
for
an example.

*Blink:*
This is currently behind a runtime flag but engineers from Samsung is going
to send an intent to ship to the blink mailing list.
___
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform



___
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform


Re: intent to ship: drawFocusIfNeeded

2014-05-01 Thread Ehsan Akhgari
Another question: Trevor had some concerns over this API in bug 958241. 
 Were those concerns sufficiently addressed?


Thanks!
Ehsan

On 2014-04-30, 8:44 PM, Rik Cabanier wrote:

Primary eng emails
caban...@adobe.com

*Spec*
http://www.w3.org/html/wg/drafts/2dcontext/html5_canvas_CR/#dom-context-2d-drawfocusifneeded

*Summary*
The drawFocusIfNeeded API is a method on the canvas context that allows a
user to draw a focus ring when a fallback element is focused.
See
http://www.w3c-test.org/2dcontext/drawing-paths-to-the-canvas/drawFocusIfNeeded_001.html
for
an example.

*Blink:*
This is currently behind a runtime flag but engineers from Samsung is going
to send an intent to ship to the blink mailing list.
___
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform



___
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform


Re: intent to ship: drawFocusIfNeeded

2014-05-01 Thread Ian Hickson
On Thu, 1 May 2014, Rik Cabanier wrote:
 
 No particular reason. The spec text is identical; just the name of the 
 method changed. Roc suggested the new name and people liked it better. I 
 believe Ian stated that he would update the WHATWG version when there 
 are 2 implementations.

There's two methods in the HTML spec, drawSystemFocusRing(element) and 
drawCustomFocusRing(element). It's not clear to me that the name 
drawFocusIfNeeded() is an improvement on either. In particular, I can't 
tell which it's replacing, nor what the other would be called if we 
followed the same naming scheme.

The WHATWG spec is going to follow browsers, but that doesn't mean that 
the new name is necessarily better. If it was, I would have updated the 
spec already instead of waiting for multiple UAs to do something else.

-- 
Ian Hickson   U+1047E)\._.,--,'``.fL
http://ln.hixie.ch/   U+263A/,   _.. \   _\  ;`._ ,.
Things that are impossible just take longer.   `._.-(,_..'--(,_..'`-.;.'
___
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform


Re: intent to ship: drawFocusIfNeeded

2014-05-01 Thread Ehsan Akhgari

On 2014-05-01, 3:12 PM, Ian Hickson wrote:

On Thu, 1 May 2014, Rik Cabanier wrote:


No particular reason. The spec text is identical; just the name of the
method changed. Roc suggested the new name and people liked it better. I
believe Ian stated that he would update the WHATWG version when there
are 2 implementations.


There's two methods in the HTML spec, drawSystemFocusRing(element) and
drawCustomFocusRing(element). It's not clear to me that the name
drawFocusIfNeeded() is an improvement on either. In particular, I can't
tell which it's replacing, nor what the other would be called if we
followed the same naming scheme.

The WHATWG spec is going to follow browsers, but that doesn't mean that
the new name is necessarily better. If it was, I would have updated the
spec already instead of waiting for multiple UAs to do something else.


So, which other UAs have so far agreed on which names?  I don't think we 
should ship the API unless there is a name for it that everyone agrees on.


Cheers,
Ehsan

___
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform


Re: intent to ship: drawFocusIfNeeded

2014-05-01 Thread Rik Cabanier
On Thu, May 1, 2014 at 11:58 AM, Ehsan Akhgari ehsan.akhg...@gmail.comwrote:

 On 2014-05-01, 2:22 PM, Rik Cabanier wrote:




 On Thu, May 1, 2014 at 10:49 AM, Ehsan Akhgari ehsan.akhg...@gmail.com
 mailto:ehsan.akhg...@gmail.com wrote:

 Hi Rik,

 How extensive is our testing of this feature?  I'm very surprised
 that bug 1004499 was not caught by a test when you landed this.


 I wrote a number of mochi tests. In addition Dominc (from Google) wrote
 a more real world example [1] and I checked that the blink test files
 also work in Firefox.
 There are also a number of W3C tests that check that the implementation
 follows the spec. [2]


 Sounds good!  If you think the existing mochitests don't give us enough
 coverage, we should try to add more tests.


  Can you give me an example where 1004499 would be triggered? I will
 update that bug with an extra test.


 We only draw the focus ring if something is focused by the keyboard.  In
 order to simulate that in a mochitest, you can give your DOM element a
 @tabindex attribute, and then use syntehsizeKey to generate VK_TAB events
 to focus that DOM element.  In order to test the opposite case, you can use
 synthesizeMouse to simulate setting the focus using the mouse.


Is that always the case?
In our tests, we can also use elements that can get the focus by default
(such as input and a) and we can focus them by calling 'focus()' on the
element.



  1: http://www.w3.org/2013/09/accessible_canvas_clock.html
 2:
 https://github.com/w3c/web-platform-tests/tree/master/
 2dcontext/drawing-paths-to-the-canvas


 On 2014-04-30, 8:44 PM, Rik Cabanier wrote:

 Primary eng emails
 caban...@adobe.com mailto:caban...@adobe.com

 *Spec*
 http://www.w3.org/html/wg/__drafts/2dcontext/html5_canvas_
 __CR/#dom-context-2d-__drawfocusifneeded

 http://www.w3.org/html/wg/drafts/2dcontext/html5_canvas_
 CR/#dom-context-2d-drawfocusifneeded

 *Summary*

 The drawFocusIfNeeded API is a method on the canvas context that
 allows a
 user to draw a focus ring when a fallback element is focused.
 See
 http://www.w3c-test.org/__2dcontext/drawing-paths-to-__
 the-canvas/drawFocusIfNeeded___001.html

 http://www.w3c-test.org/2dcontext/drawing-paths-to-
 the-canvas/drawFocusIfNeeded_001.html
 for
 an example.

 *Blink:*

 This is currently behind a runtime flag but engineers from
 Samsung is going
 to send an intent to ship to the blink mailing list.
 _
 dev-platform mailing list
 dev-platform@lists.mozilla.org
 mailto:dev-platform@lists.mozilla.org
 https://lists.mozilla.org/__listinfo/dev-platform
 https://lists.mozilla.org/listinfo/dev-platform





___
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform


intent to ship: drawFocusIfNeeded

2014-04-30 Thread Rik Cabanier
Primary eng emails
caban...@adobe.com

*Spec*
http://www.w3.org/html/wg/drafts/2dcontext/html5_canvas_CR/#dom-context-2d-drawfocusifneeded

*Summary*
The drawFocusIfNeeded API is a method on the canvas context that allows a
user to draw a focus ring when a fallback element is focused.
See
http://www.w3c-test.org/2dcontext/drawing-paths-to-the-canvas/drawFocusIfNeeded_001.html
for
an example.

*Blink:*
This is currently behind a runtime flag but engineers from Samsung is going
to send an intent to ship to the blink mailing list.
___
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform