Title: [176556] trunk
Revision
176556
Author
[email protected]
Date
2014-11-28 01:00:54 -0800 (Fri, 28 Nov 2014)

Log Message

[ATK] Allowing the use of AccessibilityUIElement::columnHeaders method for table.
https://bugs.webkit.org/show_bug.cgi?id=139044

Patch by Andrzej Badowski <[email protected]> on 2014-11-28
Reviewed by Chris Fleizach.

ATK method AccessibilityUIElement::columnHeaders currently focused only on the object table cell.
The proposed solution will enable the use of this method for the object table.
Existing test shows the result.

Tools:

* WebKitTestRunner/InjectedBundle/atk/AccessibilityUIElementAtk.cpp:
(WTR::AccessibilityUIElement::columnHeaders):

LayoutTests:

* accessibility/table-column-headers-with-captions.html: Updated for ATK platform.
* platform/efl/accessibility/table-column-headers-with-captions-expected.txt: Added.
* platform/gtk/TestExpectations: Updated for GTK.
* platform/gtk/accessibility/table-column-headers-with-captions-expected.txt: Added.

Modified Paths

Added Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (176555 => 176556)


--- trunk/LayoutTests/ChangeLog	2014-11-28 07:04:09 UTC (rev 176555)
+++ trunk/LayoutTests/ChangeLog	2014-11-28 09:00:54 UTC (rev 176556)
@@ -1,3 +1,19 @@
+2014-11-28  Andrzej Badowski  <[email protected]>
+
+        [ATK] Allowing the use of AccessibilityUIElement::columnHeaders method for table.
+        https://bugs.webkit.org/show_bug.cgi?id=139044
+
+        Reviewed by Chris Fleizach.
+
+        ATK method AccessibilityUIElement::columnHeaders currently focused only on the object table cell.
+        The proposed solution will enable the use of this method for the object table.
+        Existing test shows the result.
+
+        * accessibility/table-column-headers-with-captions.html: Updated for ATK platform.
+        * platform/efl/accessibility/table-column-headers-with-captions-expected.txt: Added.
+        * platform/gtk/TestExpectations: Updated for GTK.
+        * platform/gtk/accessibility/table-column-headers-with-captions-expected.txt: Added.
+
 2014-11-27  Joanmarie Diggs  <[email protected]>
 
         AX: [ATK] Meter and Option elements do not expose their id attribute

Modified: trunk/LayoutTests/accessibility/table-column-headers-with-captions.html (176555 => 176556)


--- trunk/LayoutTests/accessibility/table-column-headers-with-captions.html	2014-11-28 07:04:09 UTC (rev 176555)
+++ trunk/LayoutTests/accessibility/table-column-headers-with-captions.html	2014-11-28 09:00:54 UTC (rev 176556)
@@ -26,9 +26,13 @@
 
         var table = accessibilityController.accessibleElementById("table");
         var colHeaders = table.columnHeaders();
-
-        shouldBeTrue("colHeaders[0].isEqual(table.rowAtIndex(0).childAtIndex(0))");
-        shouldBeTrue("colHeaders[1].isEqual(table.rowAtIndex(0).childAtIndex(1))");
+        if (accessibilityController.platformName == "atk") {
+            shouldBeTrue("colHeaders[0].isEqual(table.cellForColumnAndRow(0,0))");
+            shouldBeTrue("colHeaders[1].isEqual(table.cellForColumnAndRow(1,0))");
+        } else {
+            shouldBeTrue("colHeaders[0].isEqual(table.rowAtIndex(0).childAtIndex(0))");
+            shouldBeTrue("colHeaders[1].isEqual(table.rowAtIndex(0).childAtIndex(1))");
+        }
     }
 
 </script>

Added: trunk/LayoutTests/platform/efl/accessibility/table-column-headers-with-captions-expected.txt (0 => 176556)


--- trunk/LayoutTests/platform/efl/accessibility/table-column-headers-with-captions-expected.txt	                        (rev 0)
+++ trunk/LayoutTests/platform/efl/accessibility/table-column-headers-with-captions-expected.txt	2014-11-28 09:00:54 UTC (rev 176556)
@@ -0,0 +1,14 @@
+caption
+header1	header2
+a	b
+This tests that a table with a caption and an empty colgroup will still correctly report its headers.
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+PASS colHeaders[0].isEqual(table.cellForColumnAndRow(0,0)) is true
+PASS colHeaders[1].isEqual(table.cellForColumnAndRow(1,0)) is true
+PASS successfullyParsed is true
+
+TEST COMPLETE
+

Modified: trunk/LayoutTests/platform/gtk/TestExpectations (176555 => 176556)


--- trunk/LayoutTests/platform/gtk/TestExpectations	2014-11-28 07:04:09 UTC (rev 176555)
+++ trunk/LayoutTests/platform/gtk/TestExpectations	2014-11-28 09:00:54 UTC (rev 176556)
@@ -2231,7 +2231,6 @@
 webkit.org/b/136754 css3/flexbox/csswg/flexbox_direction-row-reverse.html [ ImageOnlyFailure ]
 
 webkit.org/b/137109 accessibility/legend-children-are-visible.html [ Failure ]
-webkit.org/b/138069 accessibility/table-column-headers-with-captions.html [ Failure ]
 
 webkit.org/b/137695 media/video-controls-audiotracks-trackmenu.html [ Failure ]
 webkit.org/b/138074 media/video-volume-slider-drag.html [ Failure ]

Added: trunk/LayoutTests/platform/gtk/accessibility/table-column-headers-with-captions-expected.txt (0 => 176556)


--- trunk/LayoutTests/platform/gtk/accessibility/table-column-headers-with-captions-expected.txt	                        (rev 0)
+++ trunk/LayoutTests/platform/gtk/accessibility/table-column-headers-with-captions-expected.txt	2014-11-28 09:00:54 UTC (rev 176556)
@@ -0,0 +1,14 @@
+caption
+header1	header2
+a	b
+This tests that a table with a caption and an empty colgroup will still correctly report its headers.
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+PASS colHeaders[0].isEqual(table.cellForColumnAndRow(0,0)) is true
+PASS colHeaders[1].isEqual(table.cellForColumnAndRow(1,0)) is true
+PASS successfullyParsed is true
+
+TEST COMPLETE
+

Modified: trunk/Tools/ChangeLog (176555 => 176556)


--- trunk/Tools/ChangeLog	2014-11-28 07:04:09 UTC (rev 176555)
+++ trunk/Tools/ChangeLog	2014-11-28 09:00:54 UTC (rev 176556)
@@ -1,3 +1,17 @@
+2014-11-28  Andrzej Badowski  <[email protected]>
+
+        [ATK] Allowing the use of AccessibilityUIElement::columnHeaders method for table.
+        https://bugs.webkit.org/show_bug.cgi?id=139044
+
+        Reviewed by Chris Fleizach.
+
+        ATK method AccessibilityUIElement::columnHeaders currently focused only on the object table cell.
+        The proposed solution will enable the use of this method for the object table.
+        Existing test shows the result.
+
+        * WebKitTestRunner/InjectedBundle/atk/AccessibilityUIElementAtk.cpp:
+        (WTR::AccessibilityUIElement::columnHeaders):
+
 2014-11-27  Ryuan Choi  <[email protected]>
 
         [EFL] Remove E_Dbus dependency

Modified: trunk/Tools/WebKitTestRunner/InjectedBundle/atk/AccessibilityUIElementAtk.cpp (176555 => 176556)


--- trunk/Tools/WebKitTestRunner/InjectedBundle/atk/AccessibilityUIElementAtk.cpp	2014-11-28 07:04:09 UTC (rev 176555)
+++ trunk/Tools/WebKitTestRunner/InjectedBundle/atk/AccessibilityUIElementAtk.cpp	2014-11-28 09:00:54 UTC (rev 176556)
@@ -955,14 +955,18 @@
 JSValueRef AccessibilityUIElement::columnHeaders() const
 {
 #if ATK_CHECK_VERSION(2,11,90)
-    if (!ATK_IS_TABLE_CELL(m_element.get()))
+    if (!ATK_IS_TABLE_CELL(m_element.get()) && !ATK_IS_TABLE(m_element.get()))
         return nullptr;
 
-    GRefPtr<GPtrArray> array = adoptGRef(atk_table_cell_get_column_header_cells(ATK_TABLE_CELL(m_element.get())));
-    if (!array)
-        return nullptr;
+    Vector<RefPtr<AccessibilityUIElement>> columns;
+    if (ATK_IS_TABLE_CELL(m_element.get())) {
+        GRefPtr<GPtrArray> array = adoptGRef(atk_table_cell_get_column_header_cells(ATK_TABLE_CELL(m_element.get())));
+        if (!array)
+            return nullptr;
 
-    Vector<RefPtr<AccessibilityUIElement>> columns = convertGPtrArrayToVector(array.get());
+        columns = convertGPtrArrayToVector(array.get());
+    } else
+        columns = getColumnHeaders(ATK_TABLE(m_element.get()));
     return convertToJSObjectArray(columns);
 #else
     return nullptr;
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to