Title: [127586] releases/WebKitGTK/webkit-1.10
- Revision
- 127586
- Author
- carlo...@webkit.org
- Date
- 2012-09-05 06:59:19 -0700 (Wed, 05 Sep 2012)
Log Message
Merge r126941 - Implement AccessibilityUIElement::titleUIElement() and AccessibilityUIElement::stringValue()
https://bugs.webkit.org/show_bug.cgi?id=95185
Patch by Joanmarie Diggs <jdi...@igalia.com> on 2012-08-28
Reviewed by Chris Fleizach.
Tools:
* DumpRenderTree/gtk/AccessibilityUIElementGtk.cpp:
(AccessibilityUIElement::titleUIElement): Implemented
Gets the ATK_RELATION_LABELLED_BY target.
(AccessibilityUIElement::stringValue): Implemented for all roles but ATK_ROLE_PANEL.
Gets the string from atk_text_get_text(). Will implement for ATK_ROLE_PANEL after
bug 95180 is fixed.
LayoutTests:
Updated layout test expected results. In all three cases below:
1) Remove objects from the tree representation which did not belong,
but were included as a side effect of AccessibilityUIElement::stringValue()
not having been implemented.
2) Add the stringValue() return value to the tree representation.
Note that the implementation of AccessibilityUIElement::titleUIElement()
will be tested by the existing legend.html layout text. See bug 84137.
* platform/gtk/accessibility/adjacent-continuations-cause-assertion-failure-expected.txt: Updated.
* platform/gtk/accessibility/deleting-iframe-destroys-axcache-expected.txt: Updated.
* platform/gtk/accessibility/div-within-anchors-causes-crash-expected.txt: Updated.
Modified Paths
Diff
Modified: releases/WebKitGTK/webkit-1.10/LayoutTests/ChangeLog (127585 => 127586)
--- releases/WebKitGTK/webkit-1.10/LayoutTests/ChangeLog 2012-09-05 13:47:09 UTC (rev 127585)
+++ releases/WebKitGTK/webkit-1.10/LayoutTests/ChangeLog 2012-09-05 13:59:19 UTC (rev 127586)
@@ -1,3 +1,22 @@
+2012-08-28 Joanmarie Diggs <jdi...@igalia.com>
+
+ Implement AccessibilityUIElement::titleUIElement() and AccessibilityUIElement::stringValue()
+ https://bugs.webkit.org/show_bug.cgi?id=95185
+
+ Reviewed by Chris Fleizach.
+
+ Updated layout test expected results. In all three cases below:
+ 1) Remove objects from the tree representation which did not belong,
+ but were included as a side effect of AccessibilityUIElement::stringValue()
+ not having been implemented.
+ 2) Add the stringValue() return value to the tree representation.
+ Note that the implementation of AccessibilityUIElement::titleUIElement()
+ will be tested by the existing legend.html layout text. See bug 84137.
+
+ * platform/gtk/accessibility/adjacent-continuations-cause-assertion-failure-expected.txt: Updated.
+ * platform/gtk/accessibility/deleting-iframe-destroys-axcache-expected.txt: Updated.
+ * platform/gtk/accessibility/div-within-anchors-causes-crash-expected.txt: Updated.
+
2012-08-29 José Dapena Paz <jdap...@igalia.com>
[Gtk] Process Gtk 3.4 smooth scroll events properly.
Modified: releases/WebKitGTK/webkit-1.10/LayoutTests/platform/gtk/accessibility/adjacent-continuations-cause-assertion-failure-expected.txt (127585 => 127586)
--- releases/WebKitGTK/webkit-1.10/LayoutTests/platform/gtk/accessibility/adjacent-continuations-cause-assertion-failure-expected.txt 2012-09-05 13:47:09 UTC (rev 127585)
+++ releases/WebKitGTK/webkit-1.10/LayoutTests/platform/gtk/accessibility/adjacent-continuations-cause-assertion-failure-expected.txt 2012-09-05 13:59:19 UTC (rev 127586)
@@ -8,10 +8,8 @@
AXRole: document frame
- AXRole: section
- AXRole: section
- AXRole: paragraph
- AXRole: paragraph
+ AXRole: section AXValue: y
+ AXRole: section AXValue: End of test
PASS successfullyParsed is true
TEST COMPLETE
Modified: releases/WebKitGTK/webkit-1.10/LayoutTests/platform/gtk/accessibility/deleting-iframe-destroys-axcache-expected.txt (127585 => 127586)
--- releases/WebKitGTK/webkit-1.10/LayoutTests/platform/gtk/accessibility/deleting-iframe-destroys-axcache-expected.txt 2012-09-05 13:47:09 UTC (rev 127585)
+++ releases/WebKitGTK/webkit-1.10/LayoutTests/platform/gtk/accessibility/deleting-iframe-destroys-axcache-expected.txt 2012-09-05 13:59:19 UTC (rev 127586)
@@ -13,28 +13,22 @@
Before:
AXRole: scroll pane
AXRole: document frame
- AXRole: paragraph
+ AXRole: paragraph AXValue: Before
AXRole: panel
AXRole: scroll pane
AXRole: document frame
AXRole: panel
AXRole: push button
- AXRole: paragraph
- AXRole: paragraph
- AXRole: paragraph
- AXRole: paragraph
- AXRole: section
+ AXRole: paragraph AXValue: After
+ AXRole: paragraph AXValue: End of test
After:
AXRole: scroll pane
AXRole: document frame
- AXRole: paragraph
+ AXRole: paragraph AXValue: Before
AXRole: panel
- AXRole: paragraph
- AXRole: paragraph
- AXRole: paragraph
- AXRole: paragraph
- AXRole: section
+ AXRole: paragraph AXValue: After
+ AXRole: paragraph AXValue: End of test
PASS frameBodyRole == frameBody.role is false
PASS frameGroupRole == frameGroup.role is false
Modified: releases/WebKitGTK/webkit-1.10/LayoutTests/platform/gtk/accessibility/div-within-anchors-causes-crash-expected.txt (127585 => 127586)
--- releases/WebKitGTK/webkit-1.10/LayoutTests/platform/gtk/accessibility/div-within-anchors-causes-crash-expected.txt 2012-09-05 13:47:09 UTC (rev 127585)
+++ releases/WebKitGTK/webkit-1.10/LayoutTests/platform/gtk/accessibility/div-within-anchors-causes-crash-expected.txt 2012-09-05 13:59:19 UTC (rev 127586)
@@ -1,17 +1,11 @@
End of test
Before:
AXRole: document frame
- AXRole: link
- AXRole: section
- AXRole: panel
- AXRole: paragraph
- AXRole: paragraph
+ AXRole: link AXValue:
+ AXRole: section AXValue: End of test
After:
AXRole: document frame
- AXRole: section
- AXRole: panel
- AXRole: paragraph
- AXRole: paragraph
+ AXRole: section AXValue: End of test
This can cause a crash.
On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
Modified: releases/WebKitGTK/webkit-1.10/Tools/ChangeLog (127585 => 127586)
--- releases/WebKitGTK/webkit-1.10/Tools/ChangeLog 2012-09-05 13:47:09 UTC (rev 127585)
+++ releases/WebKitGTK/webkit-1.10/Tools/ChangeLog 2012-09-05 13:59:19 UTC (rev 127586)
@@ -1,3 +1,17 @@
+2012-08-28 Joanmarie Diggs <jdi...@igalia.com>
+
+ Implement AccessibilityUIElement::titleUIElement() and AccessibilityUIElement::stringValue()
+ https://bugs.webkit.org/show_bug.cgi?id=95185
+
+ Reviewed by Chris Fleizach.
+
+ * DumpRenderTree/gtk/AccessibilityUIElementGtk.cpp:
+ (AccessibilityUIElement::titleUIElement): Implemented
+ Gets the ATK_RELATION_LABELLED_BY target.
+ (AccessibilityUIElement::stringValue): Implemented for all roles but ATK_ROLE_PANEL.
+ Gets the string from atk_text_get_text(). Will implement for ATK_ROLE_PANEL after
+ bug 95180 is fixed.
+
2012-08-29 José Dapena Paz <jdap...@igalia.com>
[Gtk] Process Gtk 3.4 smooth scroll events properly
Modified: releases/WebKitGTK/webkit-1.10/Tools/DumpRenderTree/gtk/AccessibilityUIElementGtk.cpp (127585 => 127586)
--- releases/WebKitGTK/webkit-1.10/Tools/DumpRenderTree/gtk/AccessibilityUIElementGtk.cpp 2012-09-05 13:47:09 UTC (rev 127585)
+++ releases/WebKitGTK/webkit-1.10/Tools/DumpRenderTree/gtk/AccessibilityUIElementGtk.cpp 2012-09-05 13:59:19 UTC (rev 127586)
@@ -176,8 +176,27 @@
AccessibilityUIElement AccessibilityUIElement::titleUIElement()
{
- // FIXME: implement
- return 0;
+
+ if (!m_element)
+ return 0;
+
+ AtkRelationSet* set = atk_object_ref_relation_set(ATK_OBJECT(m_element));
+ if (!set)
+ return 0;
+
+ AtkObject* target = 0;
+ int count = atk_relation_set_get_n_relations(set);
+ for (int i = 0; i < count; i++) {
+ AtkRelation* relation = atk_relation_set_get_relation(set, i);
+ if (atk_relation_get_relation_type(relation) == ATK_RELATION_LABELLED_BY) {
+ GPtrArray* targetList = atk_relation_get_target(relation);
+ if (targetList->len)
+ target = static_cast<AtkObject*>(g_ptr_array_index(targetList, 0));
+ }
+ g_object_unref(set);
+ }
+
+ return target ? AccessibilityUIElement(target) : 0;
}
AccessibilityUIElement AccessibilityUIElement::parentElement()
@@ -252,8 +271,21 @@
JSStringRef AccessibilityUIElement::stringValue()
{
- // FIXME: implement
- return JSStringCreateWithCharacters(0, 0);
+ if (!m_element || !ATK_IS_TEXT(m_element))
+ return JSStringCreateWithCharacters(0, 0);
+
+ // FIXME: implement properly for ATK_ROLE_PANEL. Prior to doing so, we need
+ // to fix bug 95180 as well as determine which panels we wish to keep in the
+ // accessible hierarchy. See, for instance, bug 72811.
+ AtkRole role = atk_object_get_role(ATK_OBJECT(m_element));
+ if (role == ATK_ROLE_PANEL)
+ return JSStringCreateWithCharacters(0, 0);
+
+ gchar* text = atk_text_get_text(ATK_TEXT(m_element), 0, -1);
+ GOwnPtr<gchar> axValue(g_strdup_printf("AXValue: %s", text));
+ g_free(text);
+
+ return JSStringCreateWithUTF8CString(axValue.get());
}
JSStringRef AccessibilityUIElement::language()
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
http://lists.webkit.org/mailman/listinfo/webkit-changes