Access key should work on all elements.
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 18 Nov 2011 21:19:14 +0000 (21:19 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 18 Nov 2011 21:19:14 +0000 (21:19 +0000)
commit4ebf55d263e5983832d2d18cd81f1ddab0530835
treed59685b66b2e2b7378f8e6293343756f04b18fa5
parent96b678ac7d9b1d87c018690b5375e7de541d2f3f
Access key should work on all elements.
https://bugs.webkit.org/show_bug.cgi?id=71854

Patch by Vineet Chaudhary <vineet.chaudhary@motorola.com> on 2011-11-18
Reviewed by Ryosuke Niwa.

Source/WebCore:

All HTML elements can have the accesskey content attribute set.
Specification http://dev.w3.org/html5/spec/Overview.html#the-accesskey-attribute
Adding "accessKey" attribute to HTMLElement.idl file as [Reflect].

Test: fast/forms/access-key-for-all-elements.html

* bindings/objc/PublicDOMInterfaces.h: Moved properties form subclass to base class.
* html/BaseButtonInputType.cpp:
(WebCore::BaseButtonInputType::accessKeyAction): Renamed variable sendToAnyElement to sendMouseEvents.
* html/BaseButtonInputType.h: Ditto
* html/BaseCheckableInputType.cpp:
(WebCore::BaseCheckableInputType::accessKeyAction): Ditto
* html/BaseCheckableInputType.h: Ditto
* html/HTMLAnchorElement.cpp:
(WebCore::HTMLAnchorElement::accessKeyAction): Ditto
* html/HTMLAnchorElement.h: Ditto
* html/HTMLAnchorElement.idl: Removed redundant IDL attribute entries.
* html/HTMLAreaElement.idl: Removed redundant IDL attribute entries.
* html/HTMLButtonElement.cpp:
(WebCore::HTMLButtonElement::accessKeyAction): Renamed variable sendToAnyElement to sendMouseEvents.
* html/HTMLButtonElement.h: Ditto
* html/HTMLButtonElement.idl: Removed redundant IDL attribute entries.
* html/HTMLElement.cpp:
(WebCore::HTMLElement::accessKeyAction): Renamed variable sendToAnyElement to sendMouseEvents.
If the element does not have a defined activation behavior, fire a click event at the element.
* html/HTMLElement.h: Ditto
* html/HTMLElement.idl: Added accessKey IDL attribute.
* html/HTMLInputElement.cpp:
(WebCore::HTMLInputElement::accessKeyAction): Renamed variable sendToAnyElement to sendMouseEvents.
* html/HTMLInputElement.h: Ditto
* html/HTMLInputElement.idl: Removed redundant IDL attribute entries.
* html/HTMLLabelElement.cpp:
(WebCore::HTMLLabelElement::accessKeyAction): Renamed variable sendToAnyElement to sendMouseEvents.
* html/HTMLLabelElement.h: Ditto
* html/HTMLLabelElement.idl: Removed redundant IDL attribute entries.
* html/HTMLLegendElement.cpp:
(WebCore::HTMLLegendElement::accessKeyAction): Renamed variable sendToAnyElement to sendMouseEvents.
* html/HTMLLegendElement.h: Ditto
* html/HTMLLegendElement.idl: Removed redundant IDL attribute entries.
* html/HTMLOptGroupElement.h: Renamed variable sendToAnyElement to sendMouseEvents.
* html/HTMLSelectElement.cpp:
(WebCore::HTMLSelectElement::accessKeyAction): Ditto
* html/HTMLSelectElement.h: Ditto
* html/HTMLTextAreaElement.h: Ditto
* html/HTMLTextAreaElement.idl: Removed redundant IDL attribute entries.
* html/HiddenInputType.h: Renamed variable sendToAnyElement to sendMouseEvents.
* html/InputType.h: Ditto
* html/RangeInputType.cpp:
(WebCore::RangeInputType::accessKeyAction): Ditto
* html/RangeInputType.h: Ditto

LayoutTests:

Added test case to check whether all elements can also have accessKey attribute.

* fast/forms/access-key-expected.txt:
* fast/forms/access-key-for-all-elements-expected.txt: Added.
* fast/forms/access-key-for-all-elements.html: Added.
* fast/forms/access-key.html: Added more test coverage for select and textarea elements.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@100805 268f45cc-cd09-0410-ab3c-d52691b4dbfc
39 files changed:
LayoutTests/ChangeLog
LayoutTests/fast/forms/access-key-expected.txt
LayoutTests/fast/forms/access-key-for-all-elements-expected.txt [new file with mode: 0644]
LayoutTests/fast/forms/access-key-for-all-elements.html [new file with mode: 0644]
LayoutTests/fast/forms/access-key.html
Source/WebCore/ChangeLog
Source/WebCore/bindings/objc/PublicDOMInterfaces.h
Source/WebCore/html/BaseButtonInputType.cpp
Source/WebCore/html/BaseButtonInputType.h
Source/WebCore/html/BaseCheckableInputType.cpp
Source/WebCore/html/BaseCheckableInputType.h
Source/WebCore/html/HTMLAnchorElement.cpp
Source/WebCore/html/HTMLAnchorElement.h
Source/WebCore/html/HTMLAnchorElement.idl
Source/WebCore/html/HTMLAreaElement.idl
Source/WebCore/html/HTMLButtonElement.cpp
Source/WebCore/html/HTMLButtonElement.h
Source/WebCore/html/HTMLButtonElement.idl
Source/WebCore/html/HTMLElement.cpp
Source/WebCore/html/HTMLElement.h
Source/WebCore/html/HTMLElement.idl
Source/WebCore/html/HTMLInputElement.cpp
Source/WebCore/html/HTMLInputElement.h
Source/WebCore/html/HTMLInputElement.idl
Source/WebCore/html/HTMLLabelElement.cpp
Source/WebCore/html/HTMLLabelElement.h
Source/WebCore/html/HTMLLabelElement.idl
Source/WebCore/html/HTMLLegendElement.cpp
Source/WebCore/html/HTMLLegendElement.h
Source/WebCore/html/HTMLLegendElement.idl
Source/WebCore/html/HTMLOptGroupElement.h
Source/WebCore/html/HTMLSelectElement.cpp
Source/WebCore/html/HTMLSelectElement.h
Source/WebCore/html/HTMLTextAreaElement.h
Source/WebCore/html/HTMLTextAreaElement.idl
Source/WebCore/html/HiddenInputType.h
Source/WebCore/html/InputType.h
Source/WebCore/html/RangeInputType.cpp
Source/WebCore/html/RangeInputType.h