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

jhoneycutt at apple.com jhoneycutt at apple.com
Thu Apr 8 00:43:05 UTC 2010


The following commit has been merged in the webkit-1.2 branch:
commit f24b886694e1afa461a37b9ec4d29302926e4c2a
Author: jhoneycutt at apple.com <jhoneycutt at apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Sat Dec 19 00:05:38 2009 +0000

    MSAA: Accessibility role of list items is wrong
    
    https://bugs.webkit.org/show_bug.cgi?id=32688
    
    Reviewed by Adam Roben.
    
    WebCore:
    
    Test: platform/win/accessibility/list-item-role.html
    
    * accessibility/AccessibilityObject.h:
    (WebCore::):
    Add a ListItemRole to the enum.
    
    * accessibility/AccessibilityRenderObject.cpp:
    (WebCore::msaaRoleForRenderer):
    Return the role for the RenderObject, or UnknownRole if unknown.
    (WebCore::AccessibilityRenderObject::roleValueForMSAA):
    Call msaaRoleForRenderer() to get the role. If it is UnknownRole, fall
    back to m_role.
    
    WebKit/win:
    
    * AccessibleBase.cpp:
    (MSAARole):
    Make the WebCore list item role map to the MSAA list item role.
    
    LayoutTests:
    
    * platform/win/accessibility/list-item-role-expected.txt: Added.
    * platform/win/accessibility/list-item-role.html: Added.
    Verify that the list item role is "list item".
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@52351 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog
index a312d81..56e7cde 100644
--- a/LayoutTests/ChangeLog
+++ b/LayoutTests/ChangeLog
@@ -1,5 +1,17 @@
 2009-12-17  Jon Honeycutt  <jhoneycutt at apple.com>
 
+        MSAA: Accessibility role of list items is wrong
+
+        https://bugs.webkit.org/show_bug.cgi?id=32688
+
+        Reviewed by Adam Roben.
+
+        * platform/win/accessibility/list-item-role-expected.txt: Added.
+        * platform/win/accessibility/list-item-role.html: Added.
+        Verify that the list item role is "list item".
+
+2009-12-17  Jon Honeycutt  <jhoneycutt at apple.com>
+
         MSAA: Accessibility role of list markers is wrong
 
         https://bugs.webkit.org/show_bug.cgi?id=32687
diff --git a/LayoutTests/platform/win/accessibility/list-item-role-expected.txt b/LayoutTests/platform/win/accessibility/list-item-role-expected.txt
new file mode 100644
index 0000000..226ee3f
--- /dev/null
+++ b/LayoutTests/platform/win/accessibility/list-item-role-expected.txt
@@ -0,0 +1,7 @@
+This test verifies that, on Windows, list items return the "list item" role. 
+
+Bug 32688 - MSAA: Accessibility role of list items is wrong
+
+list item
+PASS listItem.role is "list item"
+
diff --git a/LayoutTests/platform/win/accessibility/list-item-role.html b/LayoutTests/platform/win/accessibility/list-item-role.html
new file mode 100644
index 0000000..265c977
--- /dev/null
+++ b/LayoutTests/platform/win/accessibility/list-item-role.html
@@ -0,0 +1,34 @@
+<html>
+    <head>
+        <link rel="stylesheet" href="../../../fast/js/resources/js-test-style.css">
+        <script src="../../../fast/js/resources/js-test-pre.js"></script>
+
+        <script>
+            if (window.layoutTestController)
+                layoutTestController.dumpAsText();
+        </script>
+    </head>
+    <body id="body">
+        <p>
+            This test verifies that, on Windows, list items return the
+            "list item" role.
+            <br><br>
+            <a href="https://bugs.webkit.org/show_bug.cgi?id=32688">Bug 32688 - MSAA: Accessibility role of list items is wrong</a>
+        </p>
+
+        <ul>
+            <li id="listItem" tabindex="1">list item</li>
+        </ul>
+
+        <p id="console"></p>
+
+        <script>
+            if (window.accessibilityController) {
+                document.getElementById("listItem").focus();
+
+                var listItem = accessibilityController.focusedElement;
+                shouldBe('listItem.role', '"list item"');
+            }
+        </script>
+    </body>
+</html>
diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index d66439a..75eb379 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,24 @@
+2009-12-17  Jon Honeycutt  <jhoneycutt at apple.com>
+
+        MSAA: Accessibility role of list items is wrong
+
+        https://bugs.webkit.org/show_bug.cgi?id=32688
+
+        Reviewed by Adam Roben.
+
+        Test: platform/win/accessibility/list-item-role.html
+
+        * accessibility/AccessibilityObject.h:
+        (WebCore::):
+        Add a ListItemRole to the enum.
+
+        * accessibility/AccessibilityRenderObject.cpp:
+        (WebCore::msaaRoleForRenderer):
+        Return the role for the RenderObject, or UnknownRole if unknown.
+        (WebCore::AccessibilityRenderObject::roleValueForMSAA):
+        Call msaaRoleForRenderer() to get the role. If it is UnknownRole, fall
+        back to m_role.
+
 2009-12-18  Simon Fraser  <simon.fraser at apple.com>
 
         Reviewed by Mark Rowe.
diff --git a/WebCore/accessibility/AccessibilityObject.h b/WebCore/accessibility/AccessibilityObject.h
index a7e8777..15a46d9 100644
--- a/WebCore/accessibility/AccessibilityObject.h
+++ b/WebCore/accessibility/AccessibilityObject.h
@@ -169,7 +169,8 @@ enum AccessibilityRole {
     TreeItemRole,
     DirectoryRole,
     EditableTextRole,
-    
+    ListItemRole,
+
     // ARIA Grouping roles
     LandmarkApplicationRole,
     LandmarkBannerRole,
diff --git a/WebCore/accessibility/AccessibilityRenderObject.cpp b/WebCore/accessibility/AccessibilityRenderObject.cpp
index 26a7894..bc9606c 100644
--- a/WebCore/accessibility/AccessibilityRenderObject.cpp
+++ b/WebCore/accessibility/AccessibilityRenderObject.cpp
@@ -3114,14 +3114,28 @@ String AccessibilityRenderObject::descriptionForMSAA() const
     return String();
 }
 
+static AccessibilityRole msaaRoleForRenderer(const RenderObject* renderer)
+{
+    if (!renderer)
+        return UnknownRole;
+
+    if (renderer->isText())
+        return EditableTextRole;
+
+    if (renderer->isListItem())
+        return ListItemRole;
+
+    return UnknownRole;
+}
+
 AccessibilityRole AccessibilityRenderObject::roleValueForMSAA() const
 {
     if (m_roleForMSAA != UnknownRole)
         return m_roleForMSAA;
 
-    if (m_renderer && m_renderer->isText())
-        m_roleForMSAA = EditableTextRole;
-    else
+    m_roleForMSAA = msaaRoleForRenderer(m_renderer);
+
+    if (m_roleForMSAA == UnknownRole)
         m_roleForMSAA = m_role;
 
     return m_roleForMSAA;
diff --git a/WebKit/win/AccessibleBase.cpp b/WebKit/win/AccessibleBase.cpp
index f87bb99..0b42ae3 100644
--- a/WebKit/win/AccessibleBase.cpp
+++ b/WebKit/win/AccessibleBase.cpp
@@ -565,6 +565,8 @@ static long MSAARole(AccessibilityRole role)
         case WebCore::ImageMapRole:
         case WebCore::ImageRole:
             return ROLE_SYSTEM_GRAPHIC;
+        case WebCore::ListItemRole:
+            return ROLE_SYSTEM_LISTITEM;
         default:
             // This is the default role for MSAA.
             return ROLE_SYSTEM_CLIENT;
diff --git a/WebKit/win/ChangeLog b/WebKit/win/ChangeLog
index fb6f2ae..11464fb 100644
--- a/WebKit/win/ChangeLog
+++ b/WebKit/win/ChangeLog
@@ -1,5 +1,17 @@
 2009-12-17  Jon Honeycutt  <jhoneycutt at apple.com>
 
+        MSAA: Accessibility role of list items is wrong
+
+        https://bugs.webkit.org/show_bug.cgi?id=32688
+
+        Reviewed by Adam Roben.
+
+        * AccessibleBase.cpp:
+        (MSAARole):
+        Make the WebCore list item role map to the MSAA list item role.
+
+2009-12-17  Jon Honeycutt  <jhoneycutt at apple.com>
+
         MSAA: Accessibility role of list markers is wrong
 
         https://bugs.webkit.org/show_bug.cgi?id=32687

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list