AX: AOM: Dispatch accessibleclick event
authorn_wang@apple.com <n_wang@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 20 Feb 2018 19:02:25 +0000 (19:02 +0000)
committern_wang@apple.com <n_wang@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 20 Feb 2018 19:02:25 +0000 (19:02 +0000)
commitb3e2da6d7c32c848631ede675463b04d5785e660
treef66a1324ec58eb861bb26433389df83b49cb0fa2
parentabb7d8c77b25838c6b7723b681b4b3fe52b478c5
AX: AOM: Dispatch accessibleclick event
https://bugs.webkit.org/show_bug.cgi?id=180898
<rdar://problem/36086710>

Reviewed by Ryosuke Niwa.

Source/WebCore:

Accessibility events.
Spec: https://wicg.github.io/aom/spec/phase2.html

This patch allows developers to register event handlers on Elements
for custom accessibility events.

Accessibility events go through a capturing and bubbling phase just
like DOM events, but in the accessibility tree.

Implemented "accessibleclick" event.

Test: accessibility/mac/AOM-events.html

* accessibility/AccessibilityObject.cpp:
(WebCore::AccessibilityObject::press):
(WebCore::AccessibilityObject::dispatchAccessibilityEvent):
* accessibility/AccessibilityObject.h:
* accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
(-[WebAccessibilityObjectWrapper accessibilityPerformAction:]):
* dom/Element.idl:
* dom/EventDispatcher.cpp:
(WebCore::dispatchEventWithType):
(WebCore::EventDispatcher::dispatchEvent):
* dom/EventDispatcher.h:
* dom/EventNames.h:
* dom/EventPath.cpp:
(WebCore::EventPath::EventPath):
* dom/EventPath.h:

Tools:

* WebKitTestRunner/InjectedBundle/AccessibilityUIElement.h:
(WTR::AccessibilityUIElement::syncPress):
* WebKitTestRunner/InjectedBundle/Bindings/AccessibilityUIElement.idl:
* WebKitTestRunner/InjectedBundle/mac/AccessibilityUIElementMac.mm:
(WTR::AccessibilityUIElement::syncPress):

LayoutTests:

* accessibility/mac/AOM-events-expected.txt: Added.
* accessibility/mac/AOM-events.html: Added.
* js/dom/dom-static-property-for-in-iteration-expected.txt:
* platform/mac-wk1/TestExpectations:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@228827 268f45cc-cd09-0410-ab3c-d52691b4dbfc
19 files changed:
LayoutTests/ChangeLog
LayoutTests/accessibility/mac/AOM-events-expected.txt [new file with mode: 0644]
LayoutTests/accessibility/mac/AOM-events.html [new file with mode: 0644]
LayoutTests/js/dom/dom-static-property-for-in-iteration-expected.txt
LayoutTests/platform/mac-wk1/TestExpectations
Source/WebCore/ChangeLog
Source/WebCore/accessibility/AccessibilityObject.cpp
Source/WebCore/accessibility/AccessibilityObject.h
Source/WebCore/accessibility/mac/WebAccessibilityObjectWrapperMac.mm
Source/WebCore/dom/Element.idl
Source/WebCore/dom/EventDispatcher.cpp
Source/WebCore/dom/EventDispatcher.h
Source/WebCore/dom/EventNames.h
Source/WebCore/dom/EventPath.cpp
Source/WebCore/dom/EventPath.h
Tools/ChangeLog
Tools/WebKitTestRunner/InjectedBundle/AccessibilityUIElement.h
Tools/WebKitTestRunner/InjectedBundle/Bindings/AccessibilityUIElement.idl
Tools/WebKitTestRunner/InjectedBundle/mac/AccessibilityUIElementMac.mm