Changeset 55680 in webkit


Ignore:
Timestamp:
Mar 8, 2010 1:06:08 PM (14 years ago)
Author:
eric@webkit.org
Message:

2010-03-08 Joanmarie Diggs <joanmarie.diggs@gmail.com>

Reviewed by Xan Lopez.

https://bugs.webkit.org/show_bug.cgi?id=30895
[Gtk] The accessible hierarchy of tables is significantly incorrect for Atk

  • platform/gtk/accessibility/table-hierarchy.html:
  • platform/gtk/accessibility/table-hierarchy-expected.txt:

2010-03-08 Joanmarie Diggs <joanmarie.diggs@gmail.com>

Reviewed by Xan Lopez.

https://bugs.webkit.org/show_bug.cgi?id=30895
[Gtk] The accessible hierarchy of tables is significantly incorrect for Atk

Gives platforms the ability to exclude parts of an AccessibilityTable
from the accessible hierarchy.

  • accessibility/gtk/AccessibilityObjectAtk.cpp: (AccessibilityObject::accessibilityPlatformIncludesObject):
  • accessibility/AccessibilityRenderObject.cpp: (AccessibilityRenderObject::determineAccessibilityRole):
  • accessibility/AccessibilityTable.cpp: (AccessibilityTable::addChildren):
  • accessibility/AccessibilityTableColumn.h: (accessibilityIsIgnored):
  • accessibility/AccessibilityTableHeaderContainer.h: (accessibilityIsIgnored):
  • accessibility/AccessibilityTableRow.cpp: (accessibilityIsIgnored):
Location:
trunk
Files:
10 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r55674 r55680  
     12010-03-08  Joanmarie Diggs  <joanmarie.diggs@gmail.com>
     2
     3        Reviewed by Xan Lopez.
     4
     5        https://bugs.webkit.org/show_bug.cgi?id=30895
     6        [Gtk] The accessible hierarchy of tables is significantly incorrect for Atk
     7
     8        * platform/gtk/accessibility/table-hierarchy.html:
     9        * platform/gtk/accessibility/table-hierarchy-expected.txt:
     10
    1112010-03-08  Adam Barth  <abarth@webkit.org>
    212
  • trunk/LayoutTests/platform/gtk/accessibility/table-hierarchy-expected.txt

    r55623 r55680  
    443       4
    55hello   world
     6Odd     Even
     71
     8
     92
     10
     113
     12
     134
     14
    615This tests the Atk table hierarhy.
    716
     
    1221PASS table2.role is 'table'
    1322PASS table3.role is 'table'
     23PASS table4.role is 'table'
    1424PASS children is 2
    1525PASS table1.childAtIndex(i).role is 'table cell'
     
    2535PASS table3.childAtIndex(i).role is 'table cell'
    2636PASS table3.childAtIndex(i).role is 'table cell'
     37PASS children is 6
     38PASS table4.childAtIndex(i).role is 'table cell'
     39PASS table4.childAtIndex(i).role is 'table cell'
     40PASS table4.childAtIndex(i).role is 'table cell'
     41PASS table4.childAtIndex(i).role is 'table cell'
     42PASS table4.childAtIndex(i).role is 'table cell'
     43PASS table4.childAtIndex(i).role is 'table cell'
    2744PASS successfullyParsed is true
    2845
  • trunk/LayoutTests/platform/gtk/accessibility/table-hierarchy.html

    r55623 r55680  
    2222</tbody>
    2323</table>
     24<table border=1>
     25<tr><th>Odd</th><th>Even</th></tr>
     26<tr><td><p>1</p></td><td><p>2</p></td></tr>
     27<tr><td><p>3</p></td><td><p>4</p></td></tr>
     28</table>
    2429<p id="description"></p>
    2530<div id="console"></div>
     
    3742        var table3 = webArea.childAtIndex(2);
    3843        shouldBe("table3.role", "'table'");
     44        var table4 = webArea.childAtIndex(3);
     45        shouldBe("table4.role", "'table'");
    3946
    4047        var children = table1.childrenCount;
     
    5360            shouldBe("table3.childAtIndex(i).role", "'table cell'");
    5461        }
     62        children = table4.childrenCount;
     63        shouldBe("children", "6");
     64        for (i = 0; i < children; ++i) {
     65            shouldBe("table4.childAtIndex(i).role", "'table cell'");
     66        }
    5567    }
    5668    successfullyParsed = true;
  • trunk/WebCore/ChangeLog

    r55676 r55680  
     12010-03-08  Joanmarie Diggs  <joanmarie.diggs@gmail.com>
     2
     3        Reviewed by Xan Lopez.
     4
     5        https://bugs.webkit.org/show_bug.cgi?id=30895
     6        [Gtk] The accessible hierarchy of tables is significantly incorrect for Atk
     7
     8        Gives platforms the ability to exclude parts of an AccessibilityTable
     9        from the accessible hierarchy.
     10
     11        * accessibility/gtk/AccessibilityObjectAtk.cpp:
     12        (AccessibilityObject::accessibilityPlatformIncludesObject):
     13        * accessibility/AccessibilityRenderObject.cpp:
     14        (AccessibilityRenderObject::determineAccessibilityRole):
     15        * accessibility/AccessibilityTable.cpp:
     16        (AccessibilityTable::addChildren):
     17        * accessibility/AccessibilityTableColumn.h:
     18        (accessibilityIsIgnored):
     19        * accessibility/AccessibilityTableHeaderContainer.h:
     20        (accessibilityIsIgnored):
     21        * accessibility/AccessibilityTableRow.cpp:
     22        (accessibilityIsIgnored):
     23
    1242010-03-08  Jian Li  <jianli@chromium.org>
    225
  • trunk/WebCore/accessibility/AccessibilityRenderObject.cpp

    r55623 r55680  
    27392739        return CellRole;
    27402740
     2741    if (node && node->hasTagName(trTag))
     2742        return RowRole;
     2743
    27412744    if (node && node->hasTagName(tableTag))
    27422745        return TableRole;
  • trunk/WebCore/accessibility/AccessibilityTable.cpp

    r55390 r55680  
    251251                row->setRowIndex((int)m_rows.size());       
    252252                m_rows.append(row);
    253                 m_children.append(row);
     253                if (!row->accessibilityIsIgnored())
     254                    m_children.append(row);
     255#if PLATFORM(GTK)
     256                else
     257                    m_children.append(row->children());
     258#endif
    254259                appendedRows.add(row);
    255260            }
     
    266271        column->setParentTable(this);
    267272        m_columns.append(column);
    268         m_children.append(column);
     273        if (!column->accessibilityIsIgnored())
     274            m_children.append(column);
    269275    }
    270276   
    271277    AccessibilityObject* headerContainerObject = headerContainer();
    272     if (headerContainerObject)
     278    if (headerContainerObject && !headerContainerObject->accessibilityIsIgnored())
    273279        m_children.append(headerContainerObject);
    274280}
  • trunk/WebCore/accessibility/AccessibilityTableColumn.h

    r43833 r55680  
    5151       
    5252    virtual AccessibilityRole roleValue() const { return ColumnRole; }
     53#if PLATFORM(GTK)
     54    virtual bool accessibilityIsIgnored() const { return true; }
     55#else
    5356    virtual bool accessibilityIsIgnored() const { return false; }
     57#endif
    5458    virtual bool isTableColumn() const { return true; }
    5559   
  • trunk/WebCore/accessibility/AccessibilityTableHeaderContainer.h

    r43833 r55680  
    4949    virtual AccessibilityObject* parentObject() const { return m_parentTable; }
    5050   
     51#if PLATFORM(GTK)
     52    virtual bool accessibilityIsIgnored() const { return true; }
     53#else
    5154    virtual bool accessibilityIsIgnored() const { return false; }
     55#endif
    5256   
    5357    virtual const AccessibilityChildrenVector& children();
  • trunk/WebCore/accessibility/AccessibilityTableRow.cpp

    r50444 r55680  
    7777bool AccessibilityTableRow::accessibilityIsIgnored() const
    7878{   
     79#if PLATFORM(GTK)
     80    if (true)
     81#else
    7982    if (!isTableRow())
     83#endif
    8084        return AccessibilityRenderObject::accessibilityIsIgnored();
    8185
  • trunk/WebCore/accessibility/gtk/AccessibilityObjectAtk.cpp

    r55623 r55680  
    6464        return IncludeObject;
    6565
     66    // We at some point might have a need to expose a table row; but it's not standard Gtk+.
     67    if (role == RowRole)
     68        return IgnoreObject;
     69
    6670    // The object containing the text should implement AtkText itself.
    6771    if (role == StaticTextRole)
Note: See TracChangeset for help on using the changeset viewer.