From 1ecd2febf22fb0972fdfaf4d1fd22ad0496371bc Mon Sep 17 00:00:00 2001 From: "commit-queue@webkit.org" Date: Fri, 28 Nov 2014 09:00:54 +0000 Subject: [PATCH] [ATK] Allowing the use of AccessibilityUIElement::columnHeaders method for table. https://bugs.webkit.org/show_bug.cgi?id=139044 Patch by Andrzej Badowski 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. git-svn-id: https://svn.webkit.org/repository/webkit/trunk@176556 268f45cc-cd09-0410-ab3c-d52691b4dbfc --- LayoutTests/ChangeLog | 16 ++++++++++++++++ .../table-column-headers-with-captions.html | 10 +++++++--- .../table-column-headers-with-captions-expected.txt | 14 ++++++++++++++ LayoutTests/platform/gtk/TestExpectations | 1 - .../table-column-headers-with-captions-expected.txt | 14 ++++++++++++++ Tools/ChangeLog | 14 ++++++++++++++ .../InjectedBundle/atk/AccessibilityUIElementAtk.cpp | 14 +++++++++----- 7 files changed, 74 insertions(+), 9 deletions(-) create mode 100644 LayoutTests/platform/efl/accessibility/table-column-headers-with-captions-expected.txt create mode 100644 LayoutTests/platform/gtk/accessibility/table-column-headers-with-captions-expected.txt diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog index c1566dd..d40a83c 100644 --- a/LayoutTests/ChangeLog +++ b/LayoutTests/ChangeLog @@ -1,3 +1,19 @@ +2014-11-28 Andrzej Badowski + + [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 AX: [ATK] Meter and Option elements do not expose their id attribute diff --git a/LayoutTests/accessibility/table-column-headers-with-captions.html b/LayoutTests/accessibility/table-column-headers-with-captions.html index 7bf7cf9..5064ffc 100644 --- a/LayoutTests/accessibility/table-column-headers-with-captions.html +++ b/LayoutTests/accessibility/table-column-headers-with-captions.html @@ -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))"); + } } diff --git a/LayoutTests/platform/efl/accessibility/table-column-headers-with-captions-expected.txt b/LayoutTests/platform/efl/accessibility/table-column-headers-with-captions-expected.txt new file mode 100644 index 0000000..54d167c --- /dev/null +++ b/LayoutTests/platform/efl/accessibility/table-column-headers-with-captions-expected.txt @@ -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 + diff --git a/LayoutTests/platform/gtk/TestExpectations b/LayoutTests/platform/gtk/TestExpectations index 0f15b5d..de16043 100644 --- a/LayoutTests/platform/gtk/TestExpectations +++ b/LayoutTests/platform/gtk/TestExpectations @@ -2231,7 +2231,6 @@ webkit.org/b/136673 fast/text/empty-shadow.html [ ImageOnlyFailure ] 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 ] diff --git a/LayoutTests/platform/gtk/accessibility/table-column-headers-with-captions-expected.txt b/LayoutTests/platform/gtk/accessibility/table-column-headers-with-captions-expected.txt new file mode 100644 index 0000000..54d167c --- /dev/null +++ b/LayoutTests/platform/gtk/accessibility/table-column-headers-with-captions-expected.txt @@ -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 + diff --git a/Tools/ChangeLog b/Tools/ChangeLog index 08108f5..8251f40 100644 --- a/Tools/ChangeLog +++ b/Tools/ChangeLog @@ -1,3 +1,17 @@ +2014-11-28 Andrzej Badowski + + [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 [EFL] Remove E_Dbus dependency diff --git a/Tools/WebKitTestRunner/InjectedBundle/atk/AccessibilityUIElementAtk.cpp b/Tools/WebKitTestRunner/InjectedBundle/atk/AccessibilityUIElementAtk.cpp index 7ce0d61..03c5bd3 100644 --- a/Tools/WebKitTestRunner/InjectedBundle/atk/AccessibilityUIElementAtk.cpp +++ b/Tools/WebKitTestRunner/InjectedBundle/atk/AccessibilityUIElementAtk.cpp @@ -955,14 +955,18 @@ JSValueRef AccessibilityUIElement::rowHeaders() const 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 array = adoptGRef(atk_table_cell_get_column_header_cells(ATK_TABLE_CELL(m_element.get()))); - if (!array) - return nullptr; + Vector> columns; + if (ATK_IS_TABLE_CELL(m_element.get())) { + GRefPtr array = adoptGRef(atk_table_cell_get_column_header_cells(ATK_TABLE_CELL(m_element.get()))); + if (!array) + return nullptr; - Vector> columns = convertGPtrArrayToVector(array.get()); + columns = convertGPtrArrayToVector(array.get()); + } else + columns = getColumnHeaders(ATK_TABLE(m_element.get())); return convertToJSObjectArray(columns); #else return nullptr; -- 1.8.3.1