[webkit-reviews] review requested: [Bug 71854] Access key should work on all elements : [Attachment 115776] Updated Patch

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Fri Nov 18 03:12:43 PST 2011


Vineet Chaudhary (vineetc) <rgf748 at motorola.com> has asked  for review:
Bug 71854: Access key should work on all elements
https://bugs.webkit.org/show_bug.cgi?id=71854

Attachment 115776: Updated Patch
https://bugs.webkit.org/attachment.cgi?id=115776&action=review

------- Additional Comments from Vineet Chaudhary (vineetc)
<rgf748 at motorola.com>
(In reply to comment #40)
> (From update of attachment 115586 [details])
> View in context:
https://bugs.webkit.org/attachment.cgi?id=115586&action=review
> 
> > Source/WebCore/html/HTMLElement.cpp:777
> >  void HTMLElement::accessKeyAction(bool sendToAnyElement)
> 
> Per IRC discussion, we should rename this argument to sendMouseEvents or
sendMouseDownAndMouseUp. r- because we definitely don't want to land the patch
as is.

Done!

> > LayoutTests/fast/forms/access-key-for-all-elements.html:31
> > +	 testElement.onclick = function () { debug(testElement.tagName + '
element was clicked.') };
> > +	 testElement.onfocus = function () { debug(testElement.tagName + '
element was focused.') };
> 
> Instead of using debug here. You can do something like:
> 
> var clicked = false;
> testElement.onclick = function () { clicked = true; }
> var focused = false;
> testElement.onclick = function () { focused = true; }
> 
> shouldBe("pressKey(testElement.accessKey);[clicked, focused]",
expected_value);
> 
> where expected_value is specific to each tagName.

Done!

As per the specification
http://www.whatwg.org/specs/web-apps/current-work/multipage/commands.html#using
-the-accesskey-attribute-on-a-label-element-to-define-a-command input, button,
select.. have different behavior than other elements. eg. input element only
gets focused on accessKey pressed.
To test the behavior of such elements we already have test case
access-key.html. Added select and textArea to the same.


More information about the webkit-reviews mailing list