Changeset 51304 in webkit


Ignore:
Timestamp:
Nov 22, 2009 10:21:59 PM (14 years ago)
Author:
eric@webkit.org
Message:

2009-11-22 Chris Fleizach <Chris Fleizach>

Reviewed by Oliver Hunt.

ARIA: support aria-flowto
https://bugs.webkit.org/show_bug.cgi?id=31762

  • platform/mac/accessibility/aria-flowto-expected.txt: Added.
  • platform/mac/accessibility/aria-flowto.html: Added.

2009-11-22 Chris Fleizach <Chris Fleizach>

Reviewed by Oliver Hunt.

ARIA: support aria-flowto
https://bugs.webkit.org/show_bug.cgi?id=31762

Test: platform/mac/accessibility/aria-flowto.html

  • accessibility/AccessibilityObject.h: (WebCore::AccessibilityObject::ariaOwnsElements): (WebCore::AccessibilityObject::supportsARIAFlowTo): (WebCore::AccessibilityObject::ariaFlowToElements):
  • accessibility/AccessibilityRenderObject.cpp: (WebCore::AccessibilityRenderObject::linkedUIElements): (WebCore::AccessibilityRenderObject::supportsARIAFlowTo): (WebCore::AccessibilityRenderObject::ariaFlowToElements):
  • accessibility/AccessibilityRenderObject.h:
  • html/HTMLAttributeNames.in:

2009-11-22 Chris Fleizach <Chris Fleizach>

Reviewed by Oliver Hunt.

ARIA: support aria-flowto
https://bugs.webkit.org/show_bug.cgi?id=31762

  • DumpRenderTree/AccessibilityUIElement.cpp: (ariaFlowToElementAtIndexCallback): (AccessibilityUIElement::getJSClass):
  • DumpRenderTree/AccessibilityUIElement.h:
  • DumpRenderTree/gtk/AccessibilityUIElementGtk.cpp: (AccessibilityUIElement::ariaFlowToElementAtIndex):
  • DumpRenderTree/mac/AccessibilityUIElementMac.mm: (AccessibilityUIElement::ariaFlowToElementAtIndex):
  • DumpRenderTree/win/AccessibilityUIElementWin.cpp: (AccessibilityUIElement::ariaFlowToElementAtIndex):
Location:
trunk
Files:
2 added
12 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r51301 r51304  
     12009-11-22  Chris Fleizach  <cfleizach@apple.com>
     2
     3        Reviewed by Oliver Hunt.
     4
     5        ARIA: support aria-flowto
     6        https://bugs.webkit.org/show_bug.cgi?id=31762
     7
     8        * platform/mac/accessibility/aria-flowto-expected.txt: Added.
     9        * platform/mac/accessibility/aria-flowto.html: Added.
     10
    1112009-11-22  Dirk Schulze  <krit@webkit.org>
    212
  • trunk/WebCore/ChangeLog

    r51300 r51304  
     12009-11-22  Chris Fleizach  <cfleizach@apple.com>
     2
     3        Reviewed by Oliver Hunt.
     4
     5        ARIA: support aria-flowto
     6        https://bugs.webkit.org/show_bug.cgi?id=31762
     7
     8        Test: platform/mac/accessibility/aria-flowto.html
     9
     10        * accessibility/AccessibilityObject.h:
     11        (WebCore::AccessibilityObject::ariaOwnsElements):
     12        (WebCore::AccessibilityObject::supportsARIAFlowTo):
     13        (WebCore::AccessibilityObject::ariaFlowToElements):
     14        * accessibility/AccessibilityRenderObject.cpp:
     15        (WebCore::AccessibilityRenderObject::linkedUIElements):
     16        (WebCore::AccessibilityRenderObject::supportsARIAFlowTo):
     17        (WebCore::AccessibilityRenderObject::ariaFlowToElements):
     18        * accessibility/AccessibilityRenderObject.h:
     19        * html/HTMLAttributeNames.in:
     20
    1212009-11-22  Nikolas Zimmermann  <nzimmermann@rim.com>
    222
  • trunk/WebCore/accessibility/AccessibilityObject.h

    r51276 r51304  
    328328    static bool isARIAInput(AccessibilityRole);
    329329    virtual bool supportsARIAOwns() const { return false; }
    330     virtual void ariaOwnsElements(AccessibilityChildrenVector&) const { };
     330    virtual void ariaOwnsElements(AccessibilityChildrenVector&) const { }
     331    virtual bool supportsARIAFlowTo() const { return false; }
     332    virtual void ariaFlowToElements(AccessibilityChildrenVector&) const { }
    331333   
    332334    virtual AccessibilityObject* doAccessibilityHitTest(const IntPoint&) const { return 0; }
  • trunk/WebCore/accessibility/AccessibilityRenderObject.cpp

    r51276 r51304  
    12641264void AccessibilityRenderObject::linkedUIElements(AccessibilityChildrenVector& linkedUIElements) const
    12651265{
     1266    ariaFlowToElements(linkedUIElements);
     1267
    12661268    if (isAnchor()) {
    12671269        AccessibilityObject* linkedAXElement = internalLinkElement();
     
    12821284       
    12831285    return false;   
     1286}
     1287   
     1288bool AccessibilityRenderObject::supportsARIAFlowTo() const
     1289{
     1290    return !getAttribute(aria_flowtoAttr).string().isEmpty();
     1291}
     1292   
     1293void AccessibilityRenderObject::ariaFlowToElements(AccessibilityChildrenVector& flowTo) const
     1294{
     1295    Vector<Element*> elements;
     1296    elementsFromAttribute(elements, aria_flowtoAttr);
     1297   
     1298    AXObjectCache* cache = axObjectCache();
     1299    unsigned count = elements.size();
     1300    for (unsigned k = 0; k < count; ++k) {
     1301        Element* element = elements[k];
     1302        AccessibilityObject* flowToElement = cache->getOrCreate(element->renderer());
     1303        if (flowToElement)
     1304            flowTo.append(flowToElement);
     1305    }
     1306       
    12841307}
    12851308   
  • trunk/WebCore/accessibility/AccessibilityRenderObject.h

    r51276 r51304  
    220220    virtual IntRect boundsForVisiblePositionRange(const VisiblePositionRange&) const;
    221221    virtual void setSelectedVisiblePositionRange(const VisiblePositionRange&) const;
    222    
     222    virtual bool supportsARIAFlowTo() const;
     223    virtual void ariaFlowToElements(AccessibilityChildrenVector&) const;
     224
    223225    virtual VisiblePosition visiblePositionForPoint(const IntPoint&) const;
    224226    virtual VisiblePosition visiblePositionForIndex(unsigned indexValue, bool lastIndexOK) const;   
  • trunk/WebCore/html/HTMLAttributeNames.in

    r51276 r51304  
    1919aria-disabled
    2020aria-expanded
     21aria-flowto
    2122aria-hidden
    2223aria-label
  • trunk/WebKitTools/ChangeLog

    r51299 r51304  
     12009-11-22  Chris Fleizach  <cfleizach@apple.com>
     2
     3        Reviewed by Oliver Hunt.
     4
     5        ARIA: support aria-flowto
     6        https://bugs.webkit.org/show_bug.cgi?id=31762
     7
     8        * DumpRenderTree/AccessibilityUIElement.cpp:
     9        (ariaFlowToElementAtIndexCallback):
     10        (AccessibilityUIElement::getJSClass):
     11        * DumpRenderTree/AccessibilityUIElement.h:
     12        * DumpRenderTree/gtk/AccessibilityUIElementGtk.cpp:
     13        (AccessibilityUIElement::ariaFlowToElementAtIndex):
     14        * DumpRenderTree/mac/AccessibilityUIElementMac.mm:
     15        (AccessibilityUIElement::ariaFlowToElementAtIndex):
     16        * DumpRenderTree/win/AccessibilityUIElementWin.cpp:
     17        (AccessibilityUIElement::ariaFlowToElementAtIndex):
     18
    1192009-11-22  Antonio Gomes  <tonikitoo@webkit.org>
    220
  • trunk/WebKitTools/DumpRenderTree/AccessibilityUIElement.cpp

    r51276 r51304  
    178178   
    179179    return AccessibilityUIElement::makeJSAccessibilityUIElement(context, toAXElement(thisObject)->ariaOwnsElementAtIndex(indexNumber));
     180}
     181
     182static JSValueRef ariaFlowToElementAtIndexCallback(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception)
     183{
     184    int indexNumber = 0;
     185    if (argumentCount == 1)
     186        indexNumber = JSValueToNumber(context, arguments[0], exception);
     187   
     188    return AccessibilityUIElement::makeJSAccessibilityUIElement(context, toAXElement(thisObject)->ariaFlowToElementAtIndex(indexNumber));
    180189}
    181190
     
    543552        { "disclosedRowAtIndex", disclosedRowAtIndexCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
    544553        { "ariaOwnsElementAtIndex", ariaOwnsElementAtIndexCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
     554        { "ariaFlowToElementAtIndex", ariaFlowToElementAtIndexCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
    545555        { "selectedRowAtIndex", selectedRowAtIndexCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
    546556        { "isEqual", isEqualCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
  • trunk/WebKitTools/DumpRenderTree/AccessibilityUIElement.h

    r51276 r51304  
    134134    // ARIA specific
    135135    AccessibilityUIElement ariaOwnsElementAtIndex(unsigned);
     136    AccessibilityUIElement ariaFlowToElementAtIndex(unsigned);
    136137
    137138    // Parameterized attributes
  • trunk/WebKitTools/DumpRenderTree/gtk/AccessibilityUIElementGtk.cpp

    r51276 r51304  
    467467}
    468468
     469AccessibilityUIElement AccessibilityUIElement::ariaFlowToElementAtIndex(unsigned index)
     470{
     471    return 0;
     472}
     473
    469474AccessibilityUIElement AccessibilityUIElement::selectedRowAtIndex(unsigned index)
    470475{
  • trunk/WebKitTools/DumpRenderTree/mac/AccessibilityUIElementMac.mm

    r51276 r51304  
    249249}
    250250
     251AccessibilityUIElement AccessibilityUIElement::ariaFlowToElementAtIndex(unsigned index)
     252{
     253    NSArray* objects = [m_element accessibilityAttributeValue:NSAccessibilityLinkedUIElementsAttribute];
     254    if (index < [objects count])
     255        return [objects objectAtIndex:index];
     256   
     257    return 0;
     258}
     259
    251260AccessibilityUIElement AccessibilityUIElement::disclosedRowAtIndex(unsigned index)
    252261{
  • trunk/WebKitTools/DumpRenderTree/win/AccessibilityUIElementWin.cpp

    r51276 r51304  
    416416}
    417417
     418AccessibilityUIElement AccessibilityUIElement::ariaFlowToElementAtIndex(unsigned index)
     419{
     420    return 0;
     421}
     422
    418423AccessibilityUIElement AccessibilityUIElement::selectedRowAtIndex(unsigned index)
    419424{
Note: See TracChangeset for help on using the changeset viewer.