Title: [223394] releases/WebKitGTK/webkit-2.18
Revision
223394
Author
[email protected]
Date
2017-10-16 05:53:30 -0700 (Mon, 16 Oct 2017)

Log Message

Merge r222276 - [ATK] atk_table_get_n_rows() and atk_table_get_n_columns() should return values of aria-rowcount and aria-colcount, if present
https://bugs.webkit.org/show_bug.cgi?id=171172

Reviewed by Chris Fleizach.

Source/WebCore:

Modify webKitAccessibleTableGetNColumns() and webkitAccessibleTableGetNRows()
to prefer the ARIA value over the DOM-based value.

No new tests needed: We already have coverage through aria-table-attributes.html.
Platform expectations for this test were updated.

* accessibility/atk/WebKitAccessibleInterfaceTable.cpp:
(webkitAccessibleTableGetNColumns):
(webkitAccessibleTableGetNRows):

LayoutTests:

Generated platform-specific expectations to reflect the new behavior.

* accessibility/aria-table-attributes.html: Modified to handle platform differences.
* platform/gtk/accessibility/aria-table-attributes-expected.txt: Added.

Modified Paths

Added Paths

Diff

Modified: releases/WebKitGTK/webkit-2.18/LayoutTests/ChangeLog (223393 => 223394)


--- releases/WebKitGTK/webkit-2.18/LayoutTests/ChangeLog	2017-10-16 12:19:26 UTC (rev 223393)
+++ releases/WebKitGTK/webkit-2.18/LayoutTests/ChangeLog	2017-10-16 12:53:30 UTC (rev 223394)
@@ -1,3 +1,15 @@
+2017-09-20  Joanmarie Diggs  <[email protected]>
+
+        [ATK] atk_table_get_n_rows() and atk_table_get_n_columns() should return values of aria-rowcount and aria-colcount, if present
+        https://bugs.webkit.org/show_bug.cgi?id=171172
+
+        Reviewed by Chris Fleizach.
+
+        Generated platform-specific expectations to reflect the new behavior.
+
+        * accessibility/aria-table-attributes.html: Modified to handle platform differences.
+        * platform/gtk/accessibility/aria-table-attributes-expected.txt: Added.
+
 2017-09-19  Zalan Bujtas  <[email protected]>
 
         Add missing text after r222226.

Modified: releases/WebKitGTK/webkit-2.18/LayoutTests/accessibility/aria-table-attributes.html (223393 => 223394)


--- releases/WebKitGTK/webkit-2.18/LayoutTests/accessibility/aria-table-attributes.html	2017-10-16 12:19:26 UTC (rev 223393)
+++ releases/WebKitGTK/webkit-2.18/LayoutTests/accessibility/aria-table-attributes.html	2017-10-16 12:53:30 UTC (rev 223394)
@@ -81,8 +81,13 @@
           // aria-colcount and aria-rowcount
           shouldBe("grid.numberAttributeValue('AXARIAColumnCount')", "16");
           shouldBe("grid.numberAttributeValue('AXARIARowCount')", "30");
-          shouldBe("grid.rowCount", "4");
-          shouldBe("grid.columnCount", "4");
+          if (accessibilityController.platformName == "atk") {
+              shouldBe("grid.rowCount", "30");
+              shouldBe("grid.columnCount", "16");
+          } else {
+              shouldBe("grid.rowCount", "4");
+              shouldBe("grid.columnCount", "4");
+          }
           
           // aria-colindex and aria-rowindex
           shouldBe("cell1.numberAttributeValue('AXARIAColumnIndex')", "2");

Added: releases/WebKitGTK/webkit-2.18/LayoutTests/platform/gtk/accessibility/aria-table-attributes-expected.txt (0 => 223394)


--- releases/WebKitGTK/webkit-2.18/LayoutTests/platform/gtk/accessibility/aria-table-attributes-expected.txt	                        (rev 0)
+++ releases/WebKitGTK/webkit-2.18/LayoutTests/platform/gtk/accessibility/aria-table-attributes-expected.txt	2017-10-16 12:53:30 UTC (rev 223394)
@@ -0,0 +1,31 @@
+This tests that attributes related to aria table/grid are working correctly.
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+PASS grid.numberAttributeValue('AXARIAColumnCount') is 16
+PASS grid.numberAttributeValue('AXARIARowCount') is 30
+PASS grid.rowCount is 30
+PASS grid.columnCount is 16
+PASS cell1.numberAttributeValue('AXARIAColumnIndex') is 2
+PASS cell1.numberAttributeValue('AXARIARowIndex') is 7
+PASS cell2.numberAttributeValue('AXARIAColumnIndex') is 4
+PASS cell2.numberAttributeValue('AXARIARowIndex') is 8
+PASS cell4.numberAttributeValue('AXARIAColumnIndex') is 3
+PASS cell2.rowIndexRange() is '{1, 2}'
+PASS cell5.columnIndexRange() is '{2, 3}'
+PASS cell3.rowIndexRange() is '{1, 2}'
+PASS cell6.rowIndexRange() is '{0, 2}'
+PASS cell7.rowIndexRange() is '{0, 2}'
+PASS successfullyParsed is true
+
+TEST COMPLETE
+First Name Last Name Company Address
+Fred Jackson Acme, Inc. 123 Broad St.
+Sara James
+Footer 1 Footer 2 Footer 3
+Name Company Address
+Cell Span Cell
+Cell
+January	$100
+February

Modified: releases/WebKitGTK/webkit-2.18/Source/WebCore/ChangeLog (223393 => 223394)


--- releases/WebKitGTK/webkit-2.18/Source/WebCore/ChangeLog	2017-10-16 12:19:26 UTC (rev 223393)
+++ releases/WebKitGTK/webkit-2.18/Source/WebCore/ChangeLog	2017-10-16 12:53:30 UTC (rev 223394)
@@ -1,3 +1,20 @@
+2017-09-20  Joanmarie Diggs  <[email protected]>
+
+        [ATK] atk_table_get_n_rows() and atk_table_get_n_columns() should return values of aria-rowcount and aria-colcount, if present
+        https://bugs.webkit.org/show_bug.cgi?id=171172
+
+        Reviewed by Chris Fleizach.
+
+        Modify webKitAccessibleTableGetNColumns() and webkitAccessibleTableGetNRows()
+        to prefer the ARIA value over the DOM-based value.
+
+        No new tests needed: We already have coverage through aria-table-attributes.html.
+        Platform expectations for this test were updated.
+
+        * accessibility/atk/WebKitAccessibleInterfaceTable.cpp:
+        (webkitAccessibleTableGetNColumns):
+        (webkitAccessibleTableGetNRows):
+
 2017-09-20  Miguel Gomez  <[email protected]>
 
         [GTK] Completely garbled display in GMail

Modified: releases/WebKitGTK/webkit-2.18/Source/WebCore/accessibility/atk/WebKitAccessibleInterfaceTable.cpp (223393 => 223394)


--- releases/WebKitGTK/webkit-2.18/Source/WebCore/accessibility/atk/WebKitAccessibleInterfaceTable.cpp	2017-10-16 12:19:26 UTC (rev 223393)
+++ releases/WebKitGTK/webkit-2.18/Source/WebCore/accessibility/atk/WebKitAccessibleInterfaceTable.cpp	2017-10-16 12:53:30 UTC (rev 223394)
@@ -149,9 +149,13 @@
     returnValIfWebKitAccessibleIsInvalid(WEBKIT_ACCESSIBLE(table), 0);
 
     AccessibilityObject* accTable = core(table);
-    if (is<AccessibilityTable>(*accTable))
-        return downcast<AccessibilityTable>(*accTable).columnCount();
-    return 0;
+    if (!is<AccessibilityTable>(*accTable))
+        return 0;
+
+    if (int columnCount = downcast<AccessibilityTable>(*accTable).ariaColumnCount())
+        return columnCount;
+
+    return downcast<AccessibilityTable>(*accTable).columnCount();
 }
 
 static gint webkitAccessibleTableGetNRows(AtkTable* table)
@@ -160,9 +164,13 @@
     returnValIfWebKitAccessibleIsInvalid(WEBKIT_ACCESSIBLE(table), 0);
 
     AccessibilityObject* accTable = core(table);
-    if (is<AccessibilityTable>(*accTable))
-        return downcast<AccessibilityTable>(*accTable).rowCount();
-    return 0;
+    if (!is<AccessibilityTable>(*accTable))
+        return 0;
+
+    if (int rowCount = downcast<AccessibilityTable>(*accTable).ariaRowCount())
+        return rowCount;
+
+    return downcast<AccessibilityTable>(*accTable).rowCount();
 }
 
 static gint webkitAccessibleTableGetColumnExtentAt(AtkTable* table, gint row, gint column)
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to