[ATK] GridCellRole should implement AtkTableCell (regression?)
authorjdiggs@igalia.com <jdiggs@igalia.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 28 Apr 2017 16:28:32 +0000 (16:28 +0000)
committerjdiggs@igalia.com <jdiggs@igalia.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 28 Apr 2017 16:28:32 +0000 (16:28 +0000)
https://bugs.webkit.org/show_bug.cgi?id=171179

Reviewed by Chris Fleizach.

Source/WebCore:

Add GridCellRole to the group of roles which should implement AtkTableCell.

Test: accessibility/gtk/interface-table-cell.html

* accessibility/atk/WebKitAccessibleWrapperAtk.cpp:
(getInterfaceMaskFromObject):

Tools:

Add new "AXInterfaceTableCell" attribute so that we can test whether or
not there is an implementation of AtkTableCell (i.e. without risking false
negatives from bugs in the interface's implementation).

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

LayoutTests:

* accessibility/gtk/interface-table-cell-expected.txt: Added.
* accessibility/gtk/interface-table-cell.html: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@215926 268f45cc-cd09-0410-ab3c-d52691b4dbfc

LayoutTests/ChangeLog
LayoutTests/accessibility/gtk/interface-table-cell-expected.txt [new file with mode: 0644]
LayoutTests/accessibility/gtk/interface-table-cell.html [new file with mode: 0644]
Source/WebCore/ChangeLog
Source/WebCore/accessibility/atk/WebKitAccessibleWrapperAtk.cpp
Tools/ChangeLog
Tools/WebKitTestRunner/InjectedBundle/atk/AccessibilityUIElementAtk.cpp

index c61026d..4df0701 100644 (file)
@@ -1,3 +1,13 @@
+2017-04-28  Joanmarie Diggs  <jdiggs@igalia.com>
+
+        [ATK] GridCellRole should implement AtkTableCell (regression?)
+        https://bugs.webkit.org/show_bug.cgi?id=171179
+
+        Reviewed by Chris Fleizach.
+
+        * accessibility/gtk/interface-table-cell-expected.txt: Added.
+        * accessibility/gtk/interface-table-cell.html: Added.
+
 2017-04-28  Miguel Gomez  <magomez@igalia.com>
 
         REGRESSION(r215211): [GTK] Several webgl related tests are failing
diff --git a/LayoutTests/accessibility/gtk/interface-table-cell-expected.txt b/LayoutTests/accessibility/gtk/interface-table-cell-expected.txt
new file mode 100644 (file)
index 0000000..ab5fa68
--- /dev/null
@@ -0,0 +1,37 @@
+This tests whether or not table-related elements implement the table cell interface.
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+test1 AXRole: AXTable false
+test2 AXRole: AXRow false
+test3 AXRole: AXColumnHeader true
+test4 AXRole: AXColumnHeader true
+test5 AXRole: AXRow false
+test6 AXRole: AXRowHeader true
+test7 AXRole: AXCell true
+test8 AXRole: AXTable false
+test9 AXRole: AXRow false
+test10 AXRole: AXColumnHeader true
+test11 AXRole: AXColumnHeader true
+test12 AXRole: AXRow false
+test13 AXRole: AXRowHeader true
+test14 AXRole: AXCell true
+test15 AXRole: AXTable false
+test16 AXRole: AXRow false
+test17 AXRole: AXColumnHeader true
+test18 AXRole: AXColumnHeader true
+test19 AXRole: AXRow false
+test20 AXRole: AXRowHeader true
+test21 AXRole: AXCell true
+test22 AXRole: AXTable false
+test23 AXRole: AXRow false
+test24 AXRole: AXColumnHeader true
+test25 AXRole: AXColumnHeader true
+test26 AXRole: AXRow false
+test27 AXRole: AXRowHeader true
+test28 AXRole: AXCell true
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
diff --git a/LayoutTests/accessibility/gtk/interface-table-cell.html b/LayoutTests/accessibility/gtk/interface-table-cell.html
new file mode 100644 (file)
index 0000000..e0ff219
--- /dev/null
@@ -0,0 +1,66 @@
+<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
+<html>
+<head>
+<script src="../../resources/js-test-pre.js"></script>
+</head>
+<body id="body">
+<div id="content">
+  <div id="test1" role="table">
+    <div id="test2" role="row">
+      <div id="test3" role="columnheader">X</div>
+      <div id="test4" role="columnheader">X</div>
+    </div>
+    <div id="test5" role="row">
+      <div id="test6" role="rowheader">X</div>
+      <div id="test7" role="cell">X</div>
+    </div>
+  </div>
+  <div id="test8" role="grid">
+    <div id="test9" role="row">
+      <div id="test10" id="test4" role="columnheader">X</div>
+      <div id="test11" role="columnheader">X</div>
+    </div>
+    <div id="test12" role="row">
+      <div id="test13" role="rowheader">X</div>
+      <div id="test14" role="gridcell">X</div>
+    </div>
+  </div>
+  <div id="test15" role="treegrid">
+    <div id="test16" role="row">
+      <div id="test17" role="columnheader">X</div>
+      <div id="test18" role="columnheader">X</div>
+    </div>
+    <div id="test19" role="row">
+      <div id="test20" role="rowheader">X</div>
+      <div id="test21" role="gridcell">X</div>
+    </div>
+  </div>
+  <table id="test22">
+    <tr id="test23">
+      <th id="test24">X</th>
+      <th id="test25">X</th>
+    </tr>
+    <tr id="test26">
+      <th id="test27">X</th>
+      <td id="test28">X</td>
+    </tr>
+  </table>
+</div>
+<p id="description"></p>
+<div id="console"></div>
+<script>
+    description("This tests whether or not table-related elements implement the table cell interface.");
+    if (window.accessibilityController) {
+        for (var i = 1; i <= 28; i++) {
+            var axElement = accessibilityController.accessibleElementById("test" + i);
+            var result = !axElement ? "(null)" : axElement.role + " " + axElement.boolAttributeValue("AXInterfaceTableCell");
+            debug("test" + i + " " + result);
+        }
+
+        document.getElementById("content").style.visibility = "hidden";
+    }
+</script>
+<script src="../../resources/js-test-post.js"></script>
+</body>
+</html>
+
index 103cecf..0a29aef 100644 (file)
@@ -1,3 +1,17 @@
+2017-04-28  Joanmarie Diggs  <jdiggs@igalia.com>
+
+        [ATK] GridCellRole should implement AtkTableCell (regression?)
+        https://bugs.webkit.org/show_bug.cgi?id=171179
+
+        Reviewed by Chris Fleizach.
+
+        Add GridCellRole to the group of roles which should implement AtkTableCell.
+
+        Test: accessibility/gtk/interface-table-cell.html
+
+        * accessibility/atk/WebKitAccessibleWrapperAtk.cpp:
+        (getInterfaceMaskFromObject):
+
 2017-04-28  Miguel Gomez  <magomez@igalia.com>
 
         REGRESSION(r215211): [GTK] Several webgl related tests are failing
index c901b56..b5ff543 100644 (file)
@@ -1145,7 +1145,7 @@ static guint16 getInterfaceMaskFromObject(AccessibilityObject* coreObject)
         interfaceMask |= 1 << WAITable;
 
 #if ATK_CHECK_VERSION(2,11,90)
-    if (role == CellRole || role == ColumnHeaderRole || role == RowHeaderRole)
+    if (role == CellRole || role == GridCellRole || role == ColumnHeaderRole || role == RowHeaderRole)
         interfaceMask |= 1 << WAITableCell;
 #endif
 
index 764fed6..7bf5d55 100644 (file)
@@ -1,3 +1,17 @@
+2017-04-28  Joanmarie Diggs  <jdiggs@igalia.com>
+
+        [ATK] GridCellRole should implement AtkTableCell (regression?)
+        https://bugs.webkit.org/show_bug.cgi?id=171179
+
+        Reviewed by Chris Fleizach.
+
+        Add new "AXInterfaceTableCell" attribute so that we can test whether or
+        not there is an implementation of AtkTableCell (i.e. without risking false
+        negatives from bugs in the interface's implementation).
+
+        * WebKitTestRunner/InjectedBundle/atk/AccessibilityUIElementAtk.cpp:
+        (WTR::AccessibilityUIElement::boolAttributeValue):
+
 2017-04-27  Carlos Garcia Campos  <cgarcia@igalia.com>
 
         Move UUID from WebCore/platform to WTF
index df4efba..c3f0d1d 100644 (file)
@@ -1113,6 +1113,9 @@ bool AccessibilityUIElement::boolAttributeValue(JSStringRef attribute)
     if (attributeString == "AXVisited")
         return checkElementState(m_element.get(), ATK_STATE_VISITED);
 
+    if (attributeString == "AXInterfaceTableCell")
+        return ATK_IS_TABLE_CELL(m_element.get());
+
     return false;
 }