[GTK] accessibility/placeholder.html is failing
https://bugs.webkit.org/show_bug.cgi?id=98373
Patch by Joanmarie Diggs <jdiggs@igalia.com> on 2012-12-09
Reviewed by Martin Robinson.
The test was failing because the placeholder text was not supported and
AccessibilityUIElement::stringAttributeValue() was not implemented.
Source/WebCore:
No new tests; instead the failing test was unskipped.
* accessibility/atk/WebKitAccessibleWrapperAtk.cpp:
(webkitAccessibleGetAttributes): Add the placeholder text as an AtkAttribute
of the AtkObject, as is done in Gtk+ 3.
Tools:
* DumpRenderTree/gtk/AccessibilityUIElementGtk.cpp:
(coreAttributeToAtkAttribute): New convenience method to convert WebCore attribute
names into AtkObject attribute names
(AccessibilityUIElement::stringAttributeValue): implemented
LayoutTests:
* platform/gtk/TestExpectations: Unskip the failing test
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@137099 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/Source/WebCore/accessibility/atk/WebKitAccessibleWrapperAtk.cpp b/Source/WebCore/accessibility/atk/WebKitAccessibleWrapperAtk.cpp
index defd9c5..613a9a2 100644
--- a/Source/WebCore/accessibility/atk/WebKitAccessibleWrapperAtk.cpp
+++ b/Source/WebCore/accessibility/atk/WebKitAccessibleWrapperAtk.cpp
@@ -455,6 +455,10 @@
if (coreObject->isAccessibilityTable() && !coreObject->isDataTable())
attributeSet = addToAtkAttributeSet(attributeSet, "layout-guess", "true");
+ String placeholder = coreObject->placeholderValue();
+ if (!placeholder.isEmpty())
+ attributeSet = addToAtkAttributeSet(attributeSet, "placeholder-text", placeholder.utf8().data());
+
return attributeSet;
}