⚠ Archived content — this site is no longer maintained.   Current WebKit documentation is at docs.webkit.org.

Changeset 89074 in webkit


Ignore:
Timestamp:
Jun 16, 2011, 3:10:58 PM (15 years ago)
Author:
Lucas Forschler
Message:

Merge r88830.

Location:
branches/safari-534-branch
Files:
4 edited
2 copied

Legend:

Unmodified
Added
Removed
  • branches/safari-534-branch/LayoutTests/ChangeLog

    r88878 r89074  
     12011-06-16  Lucas Forschler  <lforschler@apple.com>
     2
     3    Merged 88830.
     4
     5    2011-06-14  Chris Fleizach  <cfleizach@apple.com>
     6
     7        Reviewed by David Kilzer.
     8
     9        VoiceOver cannot navigate the itunes album view table
     10        https://bugs.webkit.org/show_bug.cgi?id=62335
     11
     12        * platform/mac/accessibility/aria-grid-with-strange-hierarchy-expected.txt: Added.
     13        * platform/mac/accessibility/aria-grid-with-strange-hierarchy.html: Added.
     14
    1152011-06-14  Lucas Forschler  <lforschler@apple.com>
    216
  • branches/safari-534-branch/Source/WebCore/ChangeLog

    r88884 r89074  
     12011-06-16  Lucas Forschler  <lforschler@apple.com>
     2
     3    Merged 88830.
     4
     5    2011-06-14  Chris Fleizach  <cfleizach@apple.com>
     6
     7        Reviewed by David Kilzer.
     8
     9        VoiceOver cannot navigate the iTunes album view table
     10        https://bugs.webkit.org/show_bug.cgi?id=62335
     11
     12        This is a regression from https://bugs.webkit.org/show_bug.cgi?id=57463.
     13        Part of that patch made a change so that an ARIA table will only look at it's children and grandchildren
     14        for possible rows. That however, doesn't allow arbitrary hierarchies to work with ARIA, like in iTunes album view.
     15
     16        Test: platform/mac/accessibility/aria-grid-with-strange-hierarchy.html
     17
     18        * accessibility/AccessibilityARIAGrid.cpp:
     19        (WebCore::AccessibilityARIAGrid::addChild):
     20        (WebCore::AccessibilityARIAGrid::addChildren):
     21        * accessibility/AccessibilityARIAGrid.h:
     22
    1232011-06-14  Lucas Forschler  <lforschler@apple.com>
    224
  • branches/safari-534-branch/Source/WebCore/accessibility/AccessibilityARIAGrid.cpp

    r83450 r89074  
    6060}
    6161
    62 void AccessibilityARIAGrid::addChild(AccessibilityObject* child, HashSet<AccessibilityObject*>& appendedRows, unsigned& columnCount)
     62bool AccessibilityARIAGrid::addChild(AccessibilityObject* child, HashSet<AccessibilityObject*>& appendedRows, unsigned& columnCount)
    6363{
    6464    if (!child || !child->isTableRow() || child->ariaRoleAttribute() != RowRole)
    65         return;
     65        return false;
    6666       
    6767    AccessibilityTableRow* row = static_cast<AccessibilityTableRow*>(child);
    6868    if (appendedRows.contains(row))
    69         return;
     69        return false;
    7070       
    7171    // store the maximum number of columns
     
    8585
    8686    appendedRows.add(row);
     87    return true;
    8788}
    8889   
     
    107108    for (RefPtr<AccessibilityObject> child = firstChild(); child; child = child->nextSibling()) {
    108109
    109         if (child->isTableRow() || child->ariaRoleAttribute() == RowRole)
    110             addChild(child.get(), appendedRows, columnCount);
    111         else {
     110        if (!addChild(child.get(), appendedRows, columnCount)) {
     111           
    112112            // in case the render tree doesn't match the expected ARIA hierarchy, look at the children
    113113            if (!child->hasChildren())
    114114                child->addChildren();
    115115
    116             // Do not navigate children through the Accessibility
    117             // children vector to let addChild() check the result
    118             // of accessibilityIsIgnored() and make the proper
    119             // decision (add the objects or their children).
    120             AccessibilityObject* grandChild = 0;
    121             for (grandChild = child->firstChild(); grandChild; grandChild = grandChild->nextSibling())
    122                 addChild(grandChild, appendedRows, columnCount);
     116            // The children of this non-row will contain all non-ignored elements (recursing to find them).
     117            // This allows the table to dive arbitrarily deep to find the rows.
     118            AccessibilityChildrenVector children = child->children();
     119            size_t length = children.size();
     120            for (size_t i = 0; i < length; ++i)
     121                addChild(children[i].get(), appendedRows, columnCount);
    123122        }
    124123    }
  • branches/safari-534-branch/Source/WebCore/accessibility/AccessibilityARIAGrid.h

    r82698 r89074  
    5656    virtual bool supportsSelectedRows() { return true; }   
    5757
    58     void addChild(AccessibilityObject*, HashSet<AccessibilityObject*>& appendedRows, unsigned& columnCount);
     58    bool addChild(AccessibilityObject*, HashSet<AccessibilityObject*>& appendedRows, unsigned& columnCount);
    5959};
    6060
Note: See TracChangeset for help on using the changeset viewer.