X-Git-Url: https://git.webkit.org/?p=WebKit-https.git;a=blobdiff_plain;f=Tools%2FWebKitTestRunner%2FInjectedBundle%2Fatk%2FAccessibilityUIElementAtk.cpp;h=4bcfcebdfbd5d44e46297e493258d17a6c0e6410;hp=3e70fe46bb5444290e733f7a59dda6c24c6456c5;hb=94d1e8e762917c5f9b330d51a417cd261c973e97;hpb=010e8c6d0c0b7795e73064c894ecb54a38d8e88e;ds=sidebyside diff --git a/Tools/WebKitTestRunner/InjectedBundle/atk/AccessibilityUIElementAtk.cpp b/Tools/WebKitTestRunner/InjectedBundle/atk/AccessibilityUIElementAtk.cpp index 3e70fe46bb54..4bcfcebdfbd5 100644 --- a/Tools/WebKitTestRunner/InjectedBundle/atk/AccessibilityUIElementAtk.cpp +++ b/Tools/WebKitTestRunner/InjectedBundle/atk/AccessibilityUIElementAtk.cpp @@ -1119,13 +1119,26 @@ JSRetainPtr AccessibilityUIElement::url() bool AccessibilityUIElement::addNotificationListener(JSValueRef functionCallback) { - // FIXME: implement + if (!functionCallback) + return false; + + // Only one notification listener per element. + if (m_notificationHandler) + return false; + + m_notificationHandler = AccessibilityNotificationHandler::create(); + m_notificationHandler->setPlatformElement(platformUIElement()); + m_notificationHandler->setNotificationFunctionCallback(functionCallback); + return true; } bool AccessibilityUIElement::removeNotificationListener() { - // FIXME: implement + // Programmers should not be trying to remove a listener that's already removed. + ASSERT(m_notificationHandler); + m_notificationHandler = 0; + return true; }