Changeset 83466 in webkit


Ignore:
Timestamp:
Apr 11, 2011 11:57:35 AM (13 years ago)
Author:
mario@webkit.org
Message:

2011-04-11 Mario Sanchez Prada <msanchez@igalia.com>

Reviewed by Xan Lopez.

[GTK] Implement AccessibilityUIElement::{row|column}IndexRange in DRT
https://bugs.webkit.org/show_bug.cgi?id=57854

Unskipped table-cell-spans.html and updated GTK expectations.

  • platform/gtk/Skipped: Unskipped test.
  • platform/gtk/accessibility/table-cell-spans-expected.txt: Added.

2011-04-11 Mario Sanchez Prada <msanchez@igalia.com>

Reviewed by Xan Lopez.

[GTK] Implement AccessibilityUIElement::{row|column}IndexRange in DRT
https://bugs.webkit.org/show_bug.cgi?id=57854

Implement missing features in GTK's DRT.

  • DumpRenderTree/gtk/AccessibilityUIElementGtk.cpp: (indexRangeInTable): New helper function to get the range string for the current cell inside the parent table, either from the point of view of rows or columns. (AccessibilityUIElement::rowIndexRange): Implemented by relying on the new helper function indexRangeInTable(). (AccessibilityUIElement::columnIndexRange): Ditto.
Location:
trunk
Files:
1 added
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r83465 r83466  
     12011-04-11  Mario Sanchez Prada  <msanchez@igalia.com>
     2
     3        Reviewed by Xan Lopez.
     4
     5        [GTK] Implement AccessibilityUIElement::{row|column}IndexRange in DRT
     6        https://bugs.webkit.org/show_bug.cgi?id=57854
     7
     8        Unskipped table-cell-spans.html and updated GTK expectations.
     9
     10        * platform/gtk/Skipped: Unskipped test.
     11        * platform/gtk/accessibility/table-cell-spans-expected.txt: Added.
     12
    1132011-04-11  Mario Sanchez Prada  <msanchez@igalia.com>
    214
  • trunk/LayoutTests/platform/gtk/Skipped

    r83465 r83466  
    356356accessibility/selection-states.html
    357357accessibility/table-attributes.html
    358 accessibility/table-cell-spans.html
    359358accessibility/table-detection.html
    360359accessibility/table-one-cell.html
  • trunk/Tools/ChangeLog

    r83465 r83466  
     12011-04-11  Mario Sanchez Prada  <msanchez@igalia.com>
     2
     3        Reviewed by Xan Lopez.
     4
     5        [GTK] Implement AccessibilityUIElement::{row|column}IndexRange in DRT
     6        https://bugs.webkit.org/show_bug.cgi?id=57854
     7
     8        Implement missing features in GTK's DRT.
     9
     10        * DumpRenderTree/gtk/AccessibilityUIElementGtk.cpp:
     11        (indexRangeInTable): New helper function to get the range string
     12        for the current cell inside the parent table, either from the
     13        point of view of rows or columns.
     14        (AccessibilityUIElement::rowIndexRange): Implemented by relying on
     15        the new helper function indexRangeInTable().
     16        (AccessibilityUIElement::columnIndexRange): Ditto.
     17
    1182011-04-11  Mario Sanchez Prada  <msanchez@igalia.com>
    219
  • trunk/Tools/DumpRenderTree/gtk/AccessibilityUIElementGtk.cpp

    r83465 r83466  
    488488}
    489489
     490static JSStringRef indexRangeInTable(PlatformUIElement element, bool isRowRange)
     491{
     492    GOwnPtr<gchar> rangeString(g_strdup("{0, 0}"));
     493
     494    if (!element)
     495        return JSStringCreateWithUTF8CString(rangeString.get());
     496
     497    ASSERT(ATK_IS_OBJECT(element));
     498
     499    AtkObject* axTable = atk_object_get_parent(ATK_OBJECT(element));
     500    if (!axTable || !ATK_IS_TABLE(axTable))
     501        return JSStringCreateWithUTF8CString(rangeString.get());
     502
     503    // Look for the cell in the table.
     504    gint indexInParent = atk_object_get_index_in_parent(ATK_OBJECT(element));
     505    if (indexInParent == -1)
     506        return JSStringCreateWithUTF8CString(rangeString.get());
     507
     508    int row = -1;
     509    int column = -1;
     510    row = atk_table_get_row_at_index(ATK_TABLE(axTable), indexInParent);
     511    column = atk_table_get_column_at_index(ATK_TABLE(axTable), indexInParent);
     512
     513    // Get the actual values, if row and columns are valid values.
     514    if (row != -1 && column != -1) {
     515        int base = 0;
     516        int length = 0;
     517        if (isRowRange) {
     518            base = row;
     519            length = atk_table_get_row_extent_at(ATK_TABLE(axTable), row, column);
     520        } else {
     521            base = column;
     522            length = atk_table_get_column_extent_at(ATK_TABLE(axTable), row, column);
     523        }
     524        rangeString.set(g_strdup_printf("{%d, %d}", base, length));
     525    }
     526
     527    return JSStringCreateWithUTF8CString(rangeString.get());
     528}
     529
    490530JSStringRef AccessibilityUIElement::rowIndexRange()
    491531{
    492     // FIXME: implement
    493     return JSStringCreateWithCharacters(0, 0);
     532    // Range in table for rows.
     533    return indexRangeInTable(m_element, true);
    494534}
    495535
    496536JSStringRef AccessibilityUIElement::columnIndexRange()
    497537{
    498     // FIXME: implement
    499     return JSStringCreateWithCharacters(0, 0);
     538    // Range in table for columns.
     539    return indexRangeInTable(m_element, false);
    500540}
    501541
Note: See TracChangeset for help on using the changeset viewer.