[SCM] WebKit Debian packaging branch, webkit-1.2, updated. upstream/1.1.90-6072-g9a69373

eric at webkit.org eric at webkit.org
Wed Apr 7 23:54:04 UTC 2010


The following commit has been merged in the webkit-1.2 branch:
commit 7cc35fcace2af582400a1e7f36b21dd5971314cd
Author: eric at webkit.org <eric at webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Mon Nov 23 06:21:59 2009 +0000

    2009-11-22  Chris Fleizach  <cfleizach at apple.com>
    
            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  <cfleizach at apple.com>
    
            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  <cfleizach at apple.com>
    
            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):
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@51304 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog
index b728666..c91fb2b 100644
--- a/LayoutTests/ChangeLog
+++ b/LayoutTests/ChangeLog
@@ -1,3 +1,13 @@
+2009-11-22  Chris Fleizach  <cfleizach at apple.com>
+
+        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  Dirk Schulze  <krit at webkit.org>
 
         Reviewed by Nikolas Zimmermann.
diff --git a/LayoutTests/platform/mac/accessibility/aria-flowto-expected.txt b/LayoutTests/platform/mac/accessibility/aria-flowto-expected.txt
new file mode 100644
index 0000000..770258d
--- /dev/null
+++ b/LayoutTests/platform/mac/accessibility/aria-flowto-expected.txt
@@ -0,0 +1,18 @@
+Item 1
+Item 2
+Item 3
+BUTTON
+RADIO BUTTON
+This tests that aria-flowto correctly identifies the right elements.
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+PASS item.ariaFlowToElementAtIndex(0).role is 'AXRole: AXButton'
+PASS item.ariaFlowToElementAtIndex(0).title is 'AXTitle: BUTTON'
+PASS item.ariaFlowToElementAtIndex(1).role is 'AXRole: AXRadioButton'
+PASS item.ariaFlowToElementAtIndex(1).title is 'AXTitle: RADIO BUTTON'
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
diff --git a/LayoutTests/platform/mac/accessibility/aria-flowto.html b/LayoutTests/platform/mac/accessibility/aria-flowto.html
new file mode 100644
index 0000000..b525043
--- /dev/null
+++ b/LayoutTests/platform/mac/accessibility/aria-flowto.html
@@ -0,0 +1,42 @@
+<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
+<html>
+<head>
+<link rel="stylesheet" href="../../../fast/js/resources/js-test-style.css">
+<script>
+var successfullyParsed = false;
+</script>
+<script src="../../../fast/js/resources/js-test-pre.js"></script>
+</head>
+<body id="body">
+
+<div tabindex=0 id="item1" role="img" aria-flowto="extra extra2">Item 1</div>
+<div>Item 2</div>
+<div>Item 3</div>
+
+<div id="extra" role="button">BUTTON</div>
+<div id="extra2" role="radio">RADIO BUTTON</div>
+
+<p id="description"></p>
+<div id="console"></div>
+
+<script>
+
+    description("This tests that aria-flowto correctly identifies the right elements.");
+
+    if (window.accessibilityController) {
+
+          var item = document.getElementById("item1");
+          item.focus();
+          item = accessibilityController.focusedElement;
+          shouldBe("item.ariaFlowToElementAtIndex(0).role", "'AXRole: AXButton'");
+          shouldBe("item.ariaFlowToElementAtIndex(0).title", "'AXTitle: BUTTON'");
+          shouldBe("item.ariaFlowToElementAtIndex(1).role", "'AXRole: AXRadioButton'");
+          shouldBe("item.ariaFlowToElementAtIndex(1).title", "'AXTitle: RADIO BUTTON'");
+    }
+
+    successfullyParsed = true;
+</script>
+
+<script src="../../../fast/js/resources/js-test-post.js"></script>
+</body>
+</html>
diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index 33230d9..9acaadf 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,23 @@
+2009-11-22  Chris Fleizach  <cfleizach at apple.com>
+
+        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  Nikolas Zimmermann  <nzimmermann at rim.com>
 
         Not reviewed. Build fix for WML enabled builds.
diff --git a/WebCore/accessibility/AccessibilityObject.h b/WebCore/accessibility/AccessibilityObject.h
index 1613c1e..d456d37 100644
--- a/WebCore/accessibility/AccessibilityObject.h
+++ b/WebCore/accessibility/AccessibilityObject.h
@@ -327,7 +327,9 @@ public:
     static bool isARIAControl(AccessibilityRole);
     static bool isARIAInput(AccessibilityRole);
     virtual bool supportsARIAOwns() const { return false; }
-    virtual void ariaOwnsElements(AccessibilityChildrenVector&) const { };
+    virtual void ariaOwnsElements(AccessibilityChildrenVector&) const { }
+    virtual bool supportsARIAFlowTo() const { return false; }
+    virtual void ariaFlowToElements(AccessibilityChildrenVector&) const { }
     
     virtual AccessibilityObject* doAccessibilityHitTest(const IntPoint&) const { return 0; }
     virtual AccessibilityObject* focusedUIElement() const { return 0; }
diff --git a/WebCore/accessibility/AccessibilityRenderObject.cpp b/WebCore/accessibility/AccessibilityRenderObject.cpp
index e12a132..41f155f 100644
--- a/WebCore/accessibility/AccessibilityRenderObject.cpp
+++ b/WebCore/accessibility/AccessibilityRenderObject.cpp
@@ -1263,6 +1263,8 @@ void AccessibilityRenderObject::addRadioButtonGroupMembers(AccessibilityChildren
 // or an internal anchor connection
 void AccessibilityRenderObject::linkedUIElements(AccessibilityChildrenVector& linkedUIElements) const
 {
+    ariaFlowToElements(linkedUIElements);
+
     if (isAnchor()) {
         AccessibilityObject* linkedAXElement = internalLinkElement();
         if (linkedAXElement)
@@ -1283,6 +1285,27 @@ bool AccessibilityRenderObject::hasTextAlternative() const
     return false;   
 }
     
+bool AccessibilityRenderObject::supportsARIAFlowTo() const
+{
+    return !getAttribute(aria_flowtoAttr).string().isEmpty();
+}
+    
+void AccessibilityRenderObject::ariaFlowToElements(AccessibilityChildrenVector& flowTo) const
+{
+    Vector<Element*> elements;
+    elementsFromAttribute(elements, aria_flowtoAttr);
+    
+    AXObjectCache* cache = axObjectCache();
+    unsigned count = elements.size();
+    for (unsigned k = 0; k < count; ++k) {
+        Element* element = elements[k];
+        AccessibilityObject* flowToElement = cache->getOrCreate(element->renderer());
+        if (flowToElement)
+            flowTo.append(flowToElement);
+    }
+        
+}
+    
 bool AccessibilityRenderObject::exposesTitleUIElement() const
 {
     if (!isControl())
diff --git a/WebCore/accessibility/AccessibilityRenderObject.h b/WebCore/accessibility/AccessibilityRenderObject.h
index ff28865..859aee1 100644
--- a/WebCore/accessibility/AccessibilityRenderObject.h
+++ b/WebCore/accessibility/AccessibilityRenderObject.h
@@ -219,7 +219,9 @@ public:
     virtual VisiblePositionRange visiblePositionRangeForLine(unsigned) const;
     virtual IntRect boundsForVisiblePositionRange(const VisiblePositionRange&) const;
     virtual void setSelectedVisiblePositionRange(const VisiblePositionRange&) const;
-    
+    virtual bool supportsARIAFlowTo() const;
+    virtual void ariaFlowToElements(AccessibilityChildrenVector&) const;
+
     virtual VisiblePosition visiblePositionForPoint(const IntPoint&) const;
     virtual VisiblePosition visiblePositionForIndex(unsigned indexValue, bool lastIndexOK) const;    
     virtual int index(const VisiblePosition&) const;
diff --git a/WebCore/html/HTMLAttributeNames.in b/WebCore/html/HTMLAttributeNames.in
index 569532c..77164a5 100644
--- a/WebCore/html/HTMLAttributeNames.in
+++ b/WebCore/html/HTMLAttributeNames.in
@@ -18,6 +18,7 @@ aria-controls
 aria-describedby
 aria-disabled
 aria-expanded
+aria-flowto
 aria-hidden
 aria-label
 aria-labeledby
diff --git a/WebKitTools/ChangeLog b/WebKitTools/ChangeLog
index cea4188..3215fe7 100644
--- a/WebKitTools/ChangeLog
+++ b/WebKitTools/ChangeLog
@@ -1,3 +1,21 @@
+2009-11-22  Chris Fleizach  <cfleizach at apple.com>
+
+        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):
+
 2009-11-22  Antonio Gomes  <tonikitoo at webkit.org>
 
         Reviewed by Kenneth Christiansen.
diff --git a/WebKitTools/DumpRenderTree/AccessibilityUIElement.cpp b/WebKitTools/DumpRenderTree/AccessibilityUIElement.cpp
index 1556fe0..89889b4 100644
--- a/WebKitTools/DumpRenderTree/AccessibilityUIElement.cpp
+++ b/WebKitTools/DumpRenderTree/AccessibilityUIElement.cpp
@@ -179,6 +179,15 @@ static JSValueRef ariaOwnsElementAtIndexCallback(JSContextRef context, JSObjectR
     return AccessibilityUIElement::makeJSAccessibilityUIElement(context, toAXElement(thisObject)->ariaOwnsElementAtIndex(indexNumber));
 }
 
+static JSValueRef ariaFlowToElementAtIndexCallback(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception)
+{
+    int indexNumber = 0;
+    if (argumentCount == 1)
+        indexNumber = JSValueToNumber(context, arguments[0], exception);
+    
+    return AccessibilityUIElement::makeJSAccessibilityUIElement(context, toAXElement(thisObject)->ariaFlowToElementAtIndex(indexNumber));
+}
+
 static JSValueRef selectedRowAtIndexCallback(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception)
 {
     int indexNumber = 0;
@@ -542,6 +551,7 @@ JSClassRef AccessibilityUIElement::getJSClass()
         { "showMenu", showMenuCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
         { "disclosedRowAtIndex", disclosedRowAtIndexCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
         { "ariaOwnsElementAtIndex", ariaOwnsElementAtIndexCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
+        { "ariaFlowToElementAtIndex", ariaFlowToElementAtIndexCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
         { "selectedRowAtIndex", selectedRowAtIndexCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
         { "isEqual", isEqualCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
         { 0, 0, 0 }
diff --git a/WebKitTools/DumpRenderTree/AccessibilityUIElement.h b/WebKitTools/DumpRenderTree/AccessibilityUIElement.h
index 827baf5..9a7cf13 100644
--- a/WebKitTools/DumpRenderTree/AccessibilityUIElement.h
+++ b/WebKitTools/DumpRenderTree/AccessibilityUIElement.h
@@ -133,6 +133,7 @@ public:
 
     // ARIA specific
     AccessibilityUIElement ariaOwnsElementAtIndex(unsigned);
+    AccessibilityUIElement ariaFlowToElementAtIndex(unsigned);
 
     // Parameterized attributes
     int lineForIndex(int);
diff --git a/WebKitTools/DumpRenderTree/gtk/AccessibilityUIElementGtk.cpp b/WebKitTools/DumpRenderTree/gtk/AccessibilityUIElementGtk.cpp
index 171fe07..3923d15 100644
--- a/WebKitTools/DumpRenderTree/gtk/AccessibilityUIElementGtk.cpp
+++ b/WebKitTools/DumpRenderTree/gtk/AccessibilityUIElementGtk.cpp
@@ -466,6 +466,11 @@ AccessibilityUIElement AccessibilityUIElement::ariaOwnsElementAtIndex(unsigned i
     return 0;
 }
 
+AccessibilityUIElement AccessibilityUIElement::ariaFlowToElementAtIndex(unsigned index)
+{
+    return 0;
+}
+
 AccessibilityUIElement AccessibilityUIElement::selectedRowAtIndex(unsigned index)
 {
     return 0;
diff --git a/WebKitTools/DumpRenderTree/mac/AccessibilityUIElementMac.mm b/WebKitTools/DumpRenderTree/mac/AccessibilityUIElementMac.mm
index 29f164f..7de9ced 100644
--- a/WebKitTools/DumpRenderTree/mac/AccessibilityUIElementMac.mm
+++ b/WebKitTools/DumpRenderTree/mac/AccessibilityUIElementMac.mm
@@ -248,6 +248,15 @@ AccessibilityUIElement AccessibilityUIElement::ariaOwnsElementAtIndex(unsigned i
     return 0;
 }
 
+AccessibilityUIElement AccessibilityUIElement::ariaFlowToElementAtIndex(unsigned index)
+{
+    NSArray* objects = [m_element accessibilityAttributeValue:NSAccessibilityLinkedUIElementsAttribute];
+    if (index < [objects count])
+        return [objects objectAtIndex:index];
+    
+    return 0;
+}
+
 AccessibilityUIElement AccessibilityUIElement::disclosedRowAtIndex(unsigned index)
 {
     NSArray* rows = [m_element accessibilityAttributeValue:NSAccessibilityDisclosedRowsAttribute];
diff --git a/WebKitTools/DumpRenderTree/win/AccessibilityUIElementWin.cpp b/WebKitTools/DumpRenderTree/win/AccessibilityUIElementWin.cpp
index 7abe68d..675b87b 100644
--- a/WebKitTools/DumpRenderTree/win/AccessibilityUIElementWin.cpp
+++ b/WebKitTools/DumpRenderTree/win/AccessibilityUIElementWin.cpp
@@ -415,6 +415,11 @@ AccessibilityUIElement AccessibilityUIElement::ariaOwnsElementAtIndex(unsigned i
     return 0;
 }
 
+AccessibilityUIElement AccessibilityUIElement::ariaFlowToElementAtIndex(unsigned index)
+{
+    return 0;
+}
+
 AccessibilityUIElement AccessibilityUIElement::selectedRowAtIndex(unsigned index)
 {
     return 0;

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list