[ATK] Missing WTR AccessibilityUIElement::addNotificationListener implementation
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 20 Sep 2013 15:15:22 +0000 (15:15 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 20 Sep 2013 15:15:22 +0000 (15:15 +0000)
commit94d1e8e762917c5f9b330d51a417cd261c973e97
tree41f0f6703cd02ddddf1dc5b79921babbdb407202
parent010e8c6d0c0b7795e73064c894ecb54a38d8e88e
[ATK] Missing WTR AccessibilityUIElement::addNotificationListener implementation
https://bugs.webkit.org/show_bug.cgi?id=120421

Patch by Denis Nomiyama <d.nomiyama@samsung.com> on 2013-09-20
Reviewed by Mario Sanchez Prada.

Implemented the notification listener for AccessibilityUIElement for
WebKitTestRunner. The signal is generated by
AXObjectCache::postPlatformNotification() and received by
axObjectEventListener(). axObjectEventListener() will then invoke
JSObjectCallAsFunction() with the respective callback function. The
notification handlers are stored in HashMap in
AccessibilityNotificationHandlerAtk.cpp.

Moved ATK signal handling (printAccessibilityEvent and
axObjectEventListener) to AccessibilityNotificationHandlerAtk.cpp.

* WebKitTestRunner/CMakeLists.txt: Added InjectedBundle/atk to the
include path.
* WebKitTestRunner/GNUmakefile.am:
Added AccessibilityNotificationHandlerAtk.cpp/h.
* WebKitTestRunner/InjectedBundle/AccessibilityController.cpp: Moved
listener IDs to AccessibilityNotificationHandlerAtk.cpp.
* WebKitTestRunner/InjectedBundle/AccessibilityController.h: Moved
listener IDs to AccessibilityNotificationHandlerAtk.cpp.
* WebKitTestRunner/InjectedBundle/AccessibilityUIElement.h: Added a
notification handler for GTK+ and EFL.
* WebKitTestRunner/InjectedBundle/atk/AccessibilityControllerAtk.cpp:
Moved printAccessibilityEvent and axObjectEventListener to
AccessibilityNotificationHandlerAtk.cpp.
(WTR::AccessibilityController::logAccessibilityEvents): Moved listener
IDs to AccessibilityNotificationHandlerAtk.cpp.
(WTR::AccessibilityController::resetToConsistentState): Moved listener
IDs to AccessibilityNotificationHandlerAtk.cpp.
* WebKitTestRunner/InjectedBundle/atk/AccessibilityNotificationHandlerAtk.cpp: Added.
(WTR::printAccessibilityEvent): Prints accessibility events. This
function was moved from AccessibilityControllerAtk.cpp.
(WTR::axObjectEventListener): Callback for signals. This function was
moved from AccessibilityControllerAtk.cpp.
(WTR::AccessibilityNotificationHandler::AccessibilityNotificationHandler):
Initialize element and function callback.
(WTR::AccessibilityNotificationHandler::~AccessibilityNotificationHandler):
Removes handler from HashMap and disconnects callbacks if necessary.
(WTR::AccessibilityNotificationHandler::logAccessibilityEvents): Sets
logging mode and connects callbacks.
(WTR::AccessibilityNotificationHandler::setNotificationFunctionCallback):
Sets the notification callback and connects callback to signals.
(WTR::AccessibilityNotificationHandler::removeAccessibilityNotificationHandler):
Removes the notification callback from HashMap.
(WTR::AccessibilityNotificationHandler::connectAccessibilityCallbacks):
Connects axObjectEventListener to ATK signals.
(WTR::AccessibilityNotificationHandler::disconnectAccessibilityCallbacks):
Disconnects callback.
* WebKitTestRunner/InjectedBundle/atk/AccessibilityNotificationHandlerAtk.h: Added.
(WTR::AccessibilityNotificationHandler::create): Creates a new instance
of AccessibilityNotificationHandler.
(WTR::AccessibilityNotificationHandler::setPlatformElement): Sets the
element.
(WTR::AccessibilityNotificationHandler::platformElement): Gets the
element.
(WTR::AccessibilityNotificationHandler::notificationFunctionCallback):
Gets the notification callback.
* WebKitTestRunner/InjectedBundle/atk/AccessibilityUIElementAtk.cpp:
(WTR::AccessibilityUIElement::addNotificationListener): Creates
notification handler, set the platform element and the notification
callback.
(WTR::AccessibilityUIElement::removeNotificationListener): Deletes the
notification handler.
* WebKitTestRunner/PlatformEfl.cmake:
Added AccessibilityNotificationHandlerAtk.cpp.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@156164 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Tools/ChangeLog
Tools/WebKitTestRunner/CMakeLists.txt
Tools/WebKitTestRunner/GNUmakefile.am
Tools/WebKitTestRunner/InjectedBundle/AccessibilityController.cpp
Tools/WebKitTestRunner/InjectedBundle/AccessibilityController.h
Tools/WebKitTestRunner/InjectedBundle/AccessibilityUIElement.h
Tools/WebKitTestRunner/InjectedBundle/atk/AccessibilityControllerAtk.cpp
Tools/WebKitTestRunner/InjectedBundle/atk/AccessibilityNotificationHandlerAtk.cpp [new file with mode: 0644]
Tools/WebKitTestRunner/InjectedBundle/atk/AccessibilityNotificationHandlerAtk.h [new file with mode: 0644]
Tools/WebKitTestRunner/InjectedBundle/atk/AccessibilityUIElementAtk.cpp
Tools/WebKitTestRunner/PlatformEfl.cmake