⚠ Archived content — this site is no longer maintained.   Current WebKit documentation is at docs.webkit.org.

Changeset 155448 in webkit


Ignore:
Timestamp:
Sep 10, 2013, 9:20:01 AM (13 years ago)
Author:
commit-queue@webkit.org
Message:

[GTK] Missing DRT AccessibilityController::addNotificationListener implementation
https://bugs.webkit.org/show_bug.cgi?id=70606

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

Implemented the global notification listener for
AccessibilityController. The signal is generated by
AXObjectCache::postPlatformNotification() and received by
axObjectEventListener(). axObjectEventListener will then invoke
JSObjectCallAsFunction() with the respective callback function.

There is no additional test for this patch since its implementation will
be tested by a11y layout tests that are currently skipped (e.g. bug
98370).

  • DumpRenderTree/AccessibilityController.h: Added a global notification

handler for GTK+.

  • DumpRenderTree/atk/AccessibilityControllerAtk.cpp:

(AccessibilityController::AccessibilityController): Initializes the
global handler with 0.
(AccessibilityController::addNotificationListener): Creates the
notification handler and sets the notification function callback.
(AccessibilityController::removeNotificationListener): Removes the
global handler.

Location:
trunk/Tools
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/Tools/ChangeLog

    r155444 r155448  
     12013-09-10  Denis Nomiyama  <d.nomiyama@samsung.com>
     2
     3        [GTK] Missing DRT AccessibilityController::addNotificationListener implementation
     4        https://bugs.webkit.org/show_bug.cgi?id=70606
     5
     6        Reviewed by Mario Sanchez Prada.
     7
     8        Implemented the global notification listener for
     9        AccessibilityController. The signal is generated by
     10        AXObjectCache::postPlatformNotification() and received by
     11        axObjectEventListener(). axObjectEventListener will then invoke
     12        JSObjectCallAsFunction() with the respective callback function.
     13
     14        There is no additional test for this patch since its implementation will
     15        be tested by a11y layout tests that are currently skipped (e.g. bug
     16        98370).
     17
     18        * DumpRenderTree/AccessibilityController.h: Added a global notification
     19        handler for GTK+.
     20        * DumpRenderTree/atk/AccessibilityControllerAtk.cpp:
     21        (AccessibilityController::AccessibilityController): Initializes the
     22        global handler with 0.
     23        (AccessibilityController::addNotificationListener): Creates the
     24        notification handler and sets the notification function callback.
     25        (AccessibilityController::removeNotificationListener): Removes the
     26        global handler.
     27
    1282013-09-10  Krzysztof Czech  <k.czech@samsung.com>
    229
  • trunk/Tools/DumpRenderTree/AccessibilityController.h

    r145014 r155448  
    3636#endif
    3737#if HAVE(ACCESSIBILITY) && (PLATFORM(GTK) || PLATFORM(EFL))
     38#include "AccessibilityNotificationHandlerAtk.h"
    3839#include <atk/atk.h>
    3940#endif
     
    8990    RetainPtr<NotificationHandler> m_globalNotificationHandler;
    9091#endif
     92
     93#if PLATFORM(GTK) || PLATFORM(EFL)
     94    RefPtr<AccessibilityNotificationHandler> m_globalNotificationHandler;
     95#endif
    9196};
    9297
  • trunk/Tools/DumpRenderTree/atk/AccessibilityControllerAtk.cpp

    r154697 r155448  
    3939
    4040AccessibilityController::AccessibilityController()
     41    : m_globalNotificationHandler(0)
    4142{
    4243}
     
    8081}
    8182
    82 bool AccessibilityController::addNotificationListener(JSObjectRef)
     83bool AccessibilityController::addNotificationListener(JSObjectRef functionCallback)
    8384{
    84     return false;
     85    if (!functionCallback)
     86        return false;
     87
     88    // Only one global notification listener.
     89    if (m_globalNotificationHandler)
     90        return false;
     91
     92    m_globalNotificationHandler = AccessibilityNotificationHandler::create();
     93    m_globalNotificationHandler->setNotificationFunctionCallback(functionCallback);
     94
     95    return true;
    8596}
    8697
    8798void AccessibilityController::removeNotificationListener()
    8899{
     100    // Programmers should not be trying to remove a listener that's already removed.
     101    ASSERT(m_globalNotificationHandler);
     102
     103    m_globalNotificationHandler = 0;
    89104}
    90105
Note: See TracChangeset for help on using the changeset viewer.