-
mario@webkit.org authored
https://bugs.webkit.org/show_bug.cgi?id=93621 Reviewed by Chris Fleizach. Source/WebCore: Fix broken implementation of AtkText and AtkEditableText interfaces in the GTK port for password input fields. * accessibility/AccessibilityRenderObject.cpp: (WebCore::AccessibilityRenderObject::stringValue): Call the new function passwordFieldValue() for password input fields. (WebCore::AccessibilityRenderObject::text): Ditto. (WebCore::AccessibilityRenderObject::textLength): Return the actual length of the password in the field for GTK, return -1 otherwise (not to break current behavior in other platforms). (WebCore::AccessibilityRenderObject::doAXStringForRange): Don't early return for password fields in GTK (will rely on text()). (WebCore::AccessibilityRenderObject::passwordFieldValue): New, it returns the text being actually rendered for a password input field (normally a masked string) in GTK. It returns String() in the rest of platforms, to ensure we don't break anything there. (WebCore): * accessibility/AccessibilityRenderObject.h: (AccessibilityRenderObject): * accessibility/AccessibilityObject.h: (WebCore::AccessibilityObject::passwordFieldValue): Default implementation of this new method, returning an empty string. (AccessibilityObject): Ensure the 'text-insert' and 'text-remove' signals for the AtkText interface are properly emitted for password input fields. * accessibility/gtk/AXObjectCacheAtk.cpp: (WebCore::AXObjectCache::nodeTextChangePlatformNotification): Make sure we never emit the password value for an input field in plain text when inserting or removing text. Emit the masked text instead. Source/WebKit/gtk: Update unit test to ensure that password input fields behave as expected when inserting and removing characters in them. * tests/testatk.c: (testWebkitAtkTextChangedNotifications): Updated unit test to cover the special case of password input fields. git-svn-id: http://svn.webkit.org/repository/webkit/trunk@125321 268f45cc-cd09-0410-ab3c-d52691b4dbfc
17af9163