2011-04-11 Mario Sanchez Prada <msanchez@igalia.com>
authormario@webkit.org <mario@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 11 Apr 2011 18:54:47 +0000 (18:54 +0000)
committermario@webkit.org <mario@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 11 Apr 2011 18:54:47 +0000 (18:54 +0000)
        Reviewed by Chris Fleizach.

        [GTK] Implement AccessibilityUIElement::cellForColumnAndRow in DRT
        https://bugs.webkit.org/show_bug.cgi?id=57826

        Skipped aria-tables.html and table-cells.html layout tests.

        Some changes were also made inside the aria-tables.html layout
        test, in order to allow unskipping it in GTK while still keeping
        it working in other platforms, without needing platform specific
        tests, just different expected files.

        * accessibility/aria-tables.html: Changed the layout test so it
        just prints role names instead of comparing their actual values
        with the expected ones in one specific platform (Mac)

        * platform/gtk/Skipped: Unskipped aria-tables.html and table-cells.html.
        * platform/gtk/accessibility/aria-tables-expected.txt: Added new
        expectations for the GTK port.
        * platform/gtk/accessibility/table-cells-expected.txt: Ditto.

        * platform/mac-leopard/Skipped: Skipping aria-tables.html in
        mac-leopard, as I don't know what the expected output would be in
        this case, and since the expected file was invalid anyway.

        * platform/mac/accessibility/aria-tables-expected.txt: Updated to
        check role names, after the changes done in the layout test.
2011-04-11  Mario Sanchez Prada  <msanchez@igalia.com>

        Reviewed by Chris Fleizach.

        [GTK] Implement AccessibilityUIElement::cellForColumnAndRow in DRT
        https://bugs.webkit.org/show_bug.cgi?id=57826

        Implement missing feature in GTK's DRT.

        * DumpRenderTree/gtk/AccessibilityUIElementGtk.cpp:
        (AccessibilityUIElement::cellForColumnAndRow): Implemented, by
        relying on the analogous function from the AtkTable interface.

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

LayoutTests/ChangeLog
LayoutTests/accessibility/aria-tables.html
LayoutTests/platform/gtk/Skipped
LayoutTests/platform/gtk/accessibility/aria-tables-expected.txt [new file with mode: 0644]
LayoutTests/platform/gtk/accessibility/table-cells-expected.txt [new file with mode: 0644]
LayoutTests/platform/mac-leopard/Skipped
LayoutTests/platform/mac/accessibility/aria-tables-expected.txt
Tools/ChangeLog
Tools/DumpRenderTree/gtk/AccessibilityUIElementGtk.cpp

index 57e5331..6b8f507 100644 (file)
@@ -1,3 +1,33 @@
+2011-04-11  Mario Sanchez Prada  <msanchez@igalia.com>
+
+        Reviewed by Chris Fleizach.
+
+        [GTK] Implement AccessibilityUIElement::cellForColumnAndRow in DRT
+        https://bugs.webkit.org/show_bug.cgi?id=57826
+
+        Skipped aria-tables.html and table-cells.html layout tests.
+
+        Some changes were also made inside the aria-tables.html layout
+        test, in order to allow unskipping it in GTK while still keeping
+        it working in other platforms, without needing platform specific
+        tests, just different expected files.
+
+        * accessibility/aria-tables.html: Changed the layout test so it
+        just prints role names instead of comparing their actual values
+        with the expected ones in one specific platform (Mac)
+
+        * platform/gtk/Skipped: Unskipped aria-tables.html and table-cells.html.
+        * platform/gtk/accessibility/aria-tables-expected.txt: Added new
+        expectations for the GTK port.
+        * platform/gtk/accessibility/table-cells-expected.txt: Ditto.
+
+        * platform/mac-leopard/Skipped: Skipping aria-tables.html in
+        mac-leopard, as I don't know what the expected output would be in
+        this case, and since the expected file was invalid anyway.
+
+        * platform/mac/accessibility/aria-tables-expected.txt: Updated to
+        check role names, after the changes done in the layout test.
+
 2011-04-11  Jian Li  <jianli@chromium.org>
 
         Unreviewed, Updated chromium test expectations.
index f696a08..61b903b 100644 (file)
 
             var failed = 0;
             <!-- make sure they are tables -->
-            if (table1.allAttributes().indexOf("AXRole: AXTable") == -1) {
-                failed = 1;
-            }
-            if (table2.allAttributes().indexOf("AXRole: AXTable") == -1) {
-                failed = 1;
-            }
+            result.innerText += table1.role + "\n";
+            result.innerText += table2.role + "\n";
 
             <!-- Make sure we can use cell for column and row and it works -->
-            if (table1.cellForColumnAndRow(0,0).allAttributes().indexOf("AXRole: AXCell") == -1) {
-               failed = 1;
-            }
-            if (table2.cellForColumnAndRow(0,0).allAttributes().indexOf("AXRole: AXCell") == -1) {
-               failed = 1;
-            }
-
-            if (table1.cellForColumnAndRow(2,2).allAttributes().indexOf("AXRole: AXCell") == -1) {
-               failed = 1;
-            }
-            if (table2.cellForColumnAndRow(1,1).allAttributes().indexOf("AXRole: AXCell") == -1) {
-               failed = 1;
-            }
+            result.innerText += table1.cellForColumnAndRow(0,0).role + "\n";
+            result.innerText += table2.cellForColumnAndRow(0,0).role + "\n";
+            result.innerText += table1.cellForColumnAndRow(2,2).role + "\n";
+            result.innerText += table2.cellForColumnAndRow(1,1).role + "\n";
 
             <!-- now make sure we can call all the relevant methods without crashing -->
             table1.attributesOfColumnHeaders();
 
             table1.attributesOfHeader();
             table2.attributesOfHeader();
-              
-            if (failed) {
-                result.innerText += "Test failed\n";
-            }
-            else {
-                 result.innerText += "Test passed\n";
-            }
+
+            result.innerText += "Test passed\n";
         }
     </script>
 </body>
index 5421403..7df2143 100644 (file)
@@ -327,7 +327,6 @@ accessibility/aria-option-role.html
 accessibility/aria-presentational-role.html
 accessibility/aria-readonly.html
 accessibility/aria-scrollbar-role.html
-accessibility/aria-tables.html
 accessibility/aria-tab-roles.html
 accessibility/aria-text-role.html
 accessibility/aria-used-on-image-maps.html
@@ -356,7 +355,6 @@ accessibility/radio-button-title-label.html
 accessibility/secure-textfield-title-ui.html
 accessibility/selection-states.html
 accessibility/table-attributes.html
-accessibility/table-cells.html
 accessibility/table-cell-spans.html
 accessibility/table-detection.html
 accessibility/table-one-cell.html
diff --git a/LayoutTests/platform/gtk/accessibility/aria-tables-expected.txt b/LayoutTests/platform/gtk/accessibility/aria-tables-expected.txt
new file mode 100644 (file)
index 0000000..ba9bda3
--- /dev/null
@@ -0,0 +1,20 @@
+header 1
+header 2
+header 3
+cell
+cell
+cell
+cell
+cell
+cell
+header 1       header 2        header 2
+cell   cell    cell
+cell
+AXRole: table
+AXRole: table
+AXRole: table cell
+AXRole: table cell
+AXRole: table cell
+AXRole: table cell
+Test passed
+
diff --git a/LayoutTests/platform/gtk/accessibility/table-cells-expected.txt b/LayoutTests/platform/gtk/accessibility/table-cells-expected.txt
new file mode 100644 (file)
index 0000000..ecbc7a7
--- /dev/null
@@ -0,0 +1,32 @@
+Example #1: Nested Stubs
+Ruritanian
+Population 
+Survey All
+Genders        By Gender
+Males  Females
+All Regions    North   3333    1111    2222
+South  3333    1111    2222
+South  3333    1111    2222
+South  3333    1111    2222
+------------------------
+[0,0]
+toolkit:WebKitGtk
+------------------------
+[3,1]
+toolkit:WebKitGtk
+------------------------
+[1,1]
+toolkit:WebKitGtk
+------------------------
+[2,2]
+toolkit:WebKitGtk
+------------------------
+[3,5]
+toolkit:WebKitGtk
+------------------------
+[100,0]
+
+------------------------
+[0,100]
+
+
index d7081a9..af8beae 100644 (file)
@@ -26,6 +26,7 @@ media/media-fullscreen-not-in-document.html
 # Tests of accessibility functionality not supported on Leopard
 accessibility/aria-list-and-listitem.html
 accessibility/aria-hidden-with-elements.html
+accessibility/aria-tables.html
 platform/mac/accessibility/aria-treegrid.html
 platform/mac/accessibility/inherited-presentational-lists.html
 platform/mac/accessibility/stale-table-rows.html
index 48c4164..067c011 100644 (file)
@@ -10,5 +10,11 @@ cell
 header 1       header 2        header 2
 cell   cell    cell
 cell
+AXRole: AXTable
+AXRole: AXTable
+AXRole: AXCell
+AXRole: AXCell
+AXRole: AXCell
+AXRole: AXCell
 Test passed
 
index 8119a45..ba7ff3e 100644 (file)
@@ -1,3 +1,16 @@
+2011-04-11  Mario Sanchez Prada  <msanchez@igalia.com>
+
+        Reviewed by Chris Fleizach.
+
+        [GTK] Implement AccessibilityUIElement::cellForColumnAndRow in DRT
+        https://bugs.webkit.org/show_bug.cgi?id=57826
+
+        Implement missing feature in GTK's DRT.
+
+        * DumpRenderTree/gtk/AccessibilityUIElementGtk.cpp:
+        (AccessibilityUIElement::cellForColumnAndRow): Implemented, by
+        relying on the analogous function from the AtkTable interface.
+
 2011-04-05  Timothy Hatcher  <timothy@apple.com>
 
         Fix the extract-localizable-strings script errors that started after
index cdaa155..798e935 100644 (file)
@@ -531,8 +531,13 @@ bool AccessibilityUIElement::attributedStringRangeIsMisspelled(unsigned location
 
 AccessibilityUIElement AccessibilityUIElement::cellForColumnAndRow(unsigned column, unsigned row)
 {
-    // FIXME: implement
-    return 0;
+    if (!m_element)
+        return 0;
+
+    ASSERT(ATK_IS_TABLE(m_element));
+
+    AtkObject* foundCell = atk_table_ref_at(ATK_TABLE(m_element), row, column);
+    return foundCell ? AccessibilityUIElement(foundCell) : 0;
 }
 
 JSStringRef AccessibilityUIElement::selectedTextRange()