2009-05-20 Jan Michael Alonzo <jmalonzo@webkit.org>
Reviewed by Xan Lopez.
[GTK] Expose password field with role of PASSWORD_TEXT
https://bugs.webkit.org/show_bug.cgi?id=25682
Check if input type is a password field and return
ATK_ROLE_PASSWORD_TEXT if it is.
* accessibility/gtk/AccessibilityObjectWrapperAtk.cpp:
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@43899 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/WebCore/accessibility/gtk/AccessibilityObjectWrapperAtk.cpp b/WebCore/accessibility/gtk/AccessibilityObjectWrapperAtk.cpp
index 1c00785..6e8c58d 100644
--- a/WebCore/accessibility/gtk/AccessibilityObjectWrapperAtk.cpp
+++ b/WebCore/accessibility/gtk/AccessibilityObjectWrapperAtk.cpp
@@ -265,7 +265,16 @@
static AtkRole webkit_accessible_get_role(AtkObject* object)
{
- return atkRole(core(object)->roleValue());
+ AccessibilityObject* AXObject = core(object);
+
+ if (!AXObject)
+ return ATK_ROLE_UNKNOWN;
+
+ // Note: Why doesn't WebCore have a password field for this
+ if (AXObject->isPasswordField())
+ return ATK_ROLE_PASSWORD_TEXT;
+
+ return atkRole(AXObject->roleValue());
}
static void setAtkStateSetFromCoreObject(AccessibilityObject* coreObject, AtkStateSet* stateSet)