summaryrefslogtreecommitdiffstats
path: root/WebKitTools/DumpRenderTree/gtk/AccessibilityUIElementGtk.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'WebKitTools/DumpRenderTree/gtk/AccessibilityUIElementGtk.cpp')
-rw-r--r--WebKitTools/DumpRenderTree/gtk/AccessibilityUIElementGtk.cpp15
1 files changed, 14 insertions, 1 deletions
diff --git a/WebKitTools/DumpRenderTree/gtk/AccessibilityUIElementGtk.cpp b/WebKitTools/DumpRenderTree/gtk/AccessibilityUIElementGtk.cpp
index 8493f1a..c4f39be 100644
--- a/WebKitTools/DumpRenderTree/gtk/AccessibilityUIElementGtk.cpp
+++ b/WebKitTools/DumpRenderTree/gtk/AccessibilityUIElementGtk.cpp
@@ -151,6 +151,10 @@ gchar* attributeSetToString(AtkAttributeSet* attributeSet)
JSStringRef AccessibilityUIElement::allAttributes()
{
+ if (!m_element)
+ return JSStringCreateWithCharacters(0, 0);
+
+ ASSERT(ATK_IS_OBJECT(m_element));
return JSStringCreateWithUTF8CString(attributeSetToString(atk_object_get_attributes(ATK_OBJECT(m_element))));
}
@@ -566,7 +570,16 @@ void AccessibilityUIElement::decrement()
void AccessibilityUIElement::press()
{
- // FIXME: implement
+ if (!m_element)
+ return;
+
+ ASSERT(ATK_IS_OBJECT(m_element));
+
+ if (!ATK_IS_ACTION(m_element))
+ return;
+
+ // Only one action per object is supported so far.
+ atk_action_do_action(ATK_ACTION(m_element), 0);
}
void AccessibilityUIElement::showMenu()