AX: [ATK] Do not return ATK_ROLE_UNKNOWN for null or otherwise invalid accessible...
authorjdiggs@igalia.com <jdiggs@igalia.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 13 Nov 2014 22:11:41 +0000 (22:11 +0000)
committerjdiggs@igalia.com <jdiggs@igalia.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 13 Nov 2014 22:11:41 +0000 (22:11 +0000)
commit7f127513ade246e907dc56048728ffdc1ae354ce
tree354f2cd57bc3ed0c960c6f15e7ed62e0ff1c1e0a
parent517e8ceaf63fbacacf5b666de0e8620334b801a0
AX: [ATK] Do not return ATK_ROLE_UNKNOWN for null or otherwise invalid accessible objects
https://bugs.webkit.org/show_bug.cgi?id=137867

Reviewed by Chris Fleizach.

Source/WebCore:

Return ATK_ROLE_INVALID for null or otherwise invalid accessible objects.

Test: platform/gtk/accessibility/detached-object-role.html

* accessibility/atk/WebKitAccessibleWrapperAtk.cpp:
(webkitAccessibleGetRole):

Tools:

Add ATK_ROLE_INVALID to roleToString. Remove the null AtkRole check in
AccessibilityUIElement::role: ATK_ROLE_INVALID = 0, and we need to be
able to test for the presence of ATK_ROLE_INVALID.

* WebKitTestRunner/InjectedBundle/atk/AccessibilityUIElementAtk.cpp:
(WTR::AccessibilityUIElement::role):

LayoutTests:

* platform/gtk/accessibility/detached-object-role-expected.txt: Added.
* platform/gtk/accessibility/detached-object-role.html: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@176091 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/ChangeLog
LayoutTests/platform/gtk/accessibility/detached-object-role-expected.txt [new file with mode: 0644]
LayoutTests/platform/gtk/accessibility/detached-object-role.html [new file with mode: 0644]
Source/WebCore/ChangeLog
Source/WebCore/accessibility/atk/WebKitAccessibleWrapperAtk.cpp
Tools/ChangeLog
Tools/WebKitTestRunner/InjectedBundle/atk/AccessibilityUIElementAtk.cpp