[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:39:30 UTC 2010


The following commit has been merged in the webkit-1.2 branch:
commit 9127a3607ee65ad6e32f666c7339620ea0e3b186
Author: jhoneycutt at apple.com <jhoneycutt at apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Thu Dec 17 05:58:00 2009 +0000

    2009-12-16  Jon Honeycutt  <jhoneycutt at apple.com>
    
            MSAA: Accessibility role of text nodes is wrong
    
            https://bugs.webkit.org/show_bug.cgi?id=32631
            <rdar://problem/7369084>
    
            Reviewed by Alice Liu.
    
            Test: platform/win/accessibility/text-role.html
    
            WebCore/:
            * accessibility/AccessibilityObject.h:
            (WebCore::):
            Add a new role to the enum.
            (WebCore::AccessibilityObject::roleValueForMSAA):
            Declare a function to return the accessibility role for MSAA; the base
            implementation returns the old role value.
    
            * accessibility/AccessibilityRenderObject.cpp:
            (WebCore::AccessibilityRenderObject::AccessibilityRenderObject):
            Initialize m_roleForMSAA.
            (WebCore::AccessibilityRenderObject::roleValueForMSAA):
            If m_roleForMSAA has been set, return it. If the renderer is a
            RenderText, set the role to EditableTextRole to match IE and Firefox.
            Otherwise, set the role for MSAA to the old role value.
    
            * accessibility/AccessibilityRenderObject.h:
            Add a member to hold the role for MSAA, and declare an override of
            roleValueForMSAA().
    
            WebKit/win/:
            * AccessibleBase.cpp:
            (MSAARole):
            If the role is WebCore::EditableTextRole, return ROLE_SYSTEM_TEXT.
            (AccessibleBase::role):
            Call roleValueForMSAA().
    
            LayoutTests/:
            * platform/win/accessibility/text-role-expected.txt: Added.
            * platform/win/accessibility/text-role.html: Added.
            Check that the role of the text node that is the first child of the
            <a> tag has the "editable text" role.
    
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@52233 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog
index 321f624..b74fd6b 100644
--- a/LayoutTests/ChangeLog
+++ b/LayoutTests/ChangeLog
@@ -1,3 +1,17 @@
+2009-12-16  Jon Honeycutt  <jhoneycutt at apple.com>
+
+        MSAA: Accessibility role of text nodes is wrong
+
+        https://bugs.webkit.org/show_bug.cgi?id=32631
+        <rdar://problem/7369084>
+
+        Reviewed by Alice Liu.
+
+        * platform/win/accessibility/text-role-expected.txt: Added.
+        * platform/win/accessibility/text-role.html: Added.
+        Check that the role of the text node that is the first child of the
+        <a> tag has the "editable text" role.
+
 2009-12-16  Fumitoshi Ukai  <ukai at chromium.org>
 
         Reviewed by Darin Adler.
diff --git a/LayoutTests/platform/win/accessibility/text-role-expected.txt b/LayoutTests/platform/win/accessibility/text-role-expected.txt
new file mode 100755
index 0000000..7fae23e
--- /dev/null
+++ b/LayoutTests/platform/win/accessibility/text-role-expected.txt
@@ -0,0 +1,6 @@
+This test verifies that, on Windows, text nodes return "editable text" for their role value. 
+
+Bug 32631 - MSAA: Accessibility role of text nodes is wrong
+
+PASS e.role is "editable text"
+
diff --git a/LayoutTests/platform/win/accessibility/text-role.html b/LayoutTests/platform/win/accessibility/text-role.html
new file mode 100755
index 0000000..5738052
--- /dev/null
+++ b/LayoutTests/platform/win/accessibility/text-role.html
@@ -0,0 +1,31 @@
+<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, text nodes return "editable
+            text" for their role value.
+            <br><br>
+            <a id="link" href="https://bugs.webkit.org/show_bug.cgi?id=32631">Bug 32631 -
+            MSAA: Accessibility role of text nodes is wrong</a>
+        </p>
+
+        <p id="console"></p>
+
+        <script>
+            if (window.accessibilityController) {
+                document.getElementById("link").focus();
+
+                var e = accessibilityController.focusedElement.childAtIndex(0);
+                shouldBe('e.role', '"editable text"');
+            }
+        </script>
+    </body>
+</html>
diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index 71e6a4a..b068c87 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,33 @@
+2009-12-16  Jon Honeycutt  <jhoneycutt at apple.com>
+
+        MSAA: Accessibility role of text nodes is wrong
+
+        https://bugs.webkit.org/show_bug.cgi?id=32631
+        <rdar://problem/7369084>
+
+        Reviewed by Alice Liu.
+
+        Test: platform/win/accessibility/text-role.html
+
+        * accessibility/AccessibilityObject.h:
+        (WebCore::):
+        Add a new role to the enum.
+        (WebCore::AccessibilityObject::roleValueForMSAA):
+        Declare a function to return the accessibility role for MSAA; the base
+        implementation returns the old role value.
+
+        * accessibility/AccessibilityRenderObject.cpp:
+        (WebCore::AccessibilityRenderObject::AccessibilityRenderObject):
+        Initialize m_roleForMSAA.
+        (WebCore::AccessibilityRenderObject::roleValueForMSAA):
+        If m_roleForMSAA has been set, return it. If the renderer is a
+        RenderText, set the role to EditableTextRole to match IE and Firefox.
+        Otherwise, set the role for MSAA to the old role value.
+
+        * accessibility/AccessibilityRenderObject.h:
+        Add a member to hold the role for MSAA, and declare an override of
+        roleValueForMSAA().
+
 2009-12-16  Eric Seidel  <eric at webkit.org>
 
         No review, rolling out r52206.
diff --git a/WebCore/accessibility/AccessibilityObject.h b/WebCore/accessibility/AccessibilityObject.h
index 79bb5c3..a7e8777 100644
--- a/WebCore/accessibility/AccessibilityObject.h
+++ b/WebCore/accessibility/AccessibilityObject.h
@@ -168,6 +168,7 @@ enum AccessibilityRole {
     TreeGridRole,
     TreeItemRole,
     DirectoryRole,
+    EditableTextRole,
     
     // ARIA Grouping roles
     LandmarkApplicationRole,
@@ -489,7 +490,8 @@ public:
     virtual String stringRoleForMSAA() const { return String(); }
     virtual String nameForMSAA() const { return String(); }
     virtual String descriptionForMSAA() const { return String(); }
-    
+    virtual AccessibilityRole roleValueForMSAA() const { return m_role; }
+
     // Used by an ARIA tree to get all its rows.
     void ariaTreeRows(AccessibilityChildrenVector&);
     // Used by an ARIA tree item to get all of its direct rows that it can disclose.
diff --git a/WebCore/accessibility/AccessibilityRenderObject.cpp b/WebCore/accessibility/AccessibilityRenderObject.cpp
index ce5761c..26a7894 100644
--- a/WebCore/accessibility/AccessibilityRenderObject.cpp
+++ b/WebCore/accessibility/AccessibilityRenderObject.cpp
@@ -85,6 +85,7 @@ AccessibilityRenderObject::AccessibilityRenderObject(RenderObject* renderer)
     , m_renderer(renderer)
     , m_ariaRole(UnknownRole)
     , m_childrenDirty(false)
+    , m_roleForMSAA(UnknownRole)
 {
     updateAccessibilityRole();
 #ifndef NDEBUG
@@ -3113,4 +3114,17 @@ String AccessibilityRenderObject::descriptionForMSAA() const
     return String();
 }
 
+AccessibilityRole AccessibilityRenderObject::roleValueForMSAA() const
+{
+    if (m_roleForMSAA != UnknownRole)
+        return m_roleForMSAA;
+
+    if (m_renderer && m_renderer->isText())
+        m_roleForMSAA = EditableTextRole;
+    else
+        m_roleForMSAA = m_role;
+
+    return m_roleForMSAA;
+}
+
 } // namespace WebCore
diff --git a/WebCore/accessibility/AccessibilityRenderObject.h b/WebCore/accessibility/AccessibilityRenderObject.h
index 85592d7..8e59999 100644
--- a/WebCore/accessibility/AccessibilityRenderObject.h
+++ b/WebCore/accessibility/AccessibilityRenderObject.h
@@ -248,6 +248,7 @@ public:
     virtual String stringRoleForMSAA() const;
     virtual String nameForMSAA() const;
     virtual String descriptionForMSAA() const;
+    virtual AccessibilityRole roleValueForMSAA() const;
 
 protected:
     RenderObject* m_renderer;
@@ -289,6 +290,8 @@ private:
     void elementsFromAttribute(Vector<Element*>& elements, const QualifiedName& name) const;
     
     void markChildrenDirty() const { m_childrenDirty = true; }
+
+    mutable AccessibilityRole m_roleForMSAA;
 };
     
 } // namespace WebCore
diff --git a/WebKit/win/AccessibleBase.cpp b/WebKit/win/AccessibleBase.cpp
index 47b8369..42b3b11 100644
--- a/WebKit/win/AccessibleBase.cpp
+++ b/WebKit/win/AccessibleBase.cpp
@@ -543,6 +543,7 @@ static long MSAARole(AccessibilityRole role)
         case WebCore::TextFieldRole:
         case WebCore::TextAreaRole:
         case WebCore::ListMarkerRole:
+        case WebCore::EditableTextRole:
             return ROLE_SYSTEM_TEXT;
         case WebCore::StaticTextRole:
             return ROLE_SYSTEM_STATICTEXT;
@@ -572,7 +573,7 @@ static long MSAARole(AccessibilityRole role)
 
 long AccessibleBase::role() const
 {
-    return MSAARole(m_object->roleValue());
+    return MSAARole(m_object->roleValueForMSAA());
 }
 
 HRESULT AccessibleBase::getAccessibilityObjectForChild(VARIANT vChild, AccessibilityObject*& childObj) const
diff --git a/WebKit/win/ChangeLog b/WebKit/win/ChangeLog
index f426ad3..78759fd 100644
--- a/WebKit/win/ChangeLog
+++ b/WebKit/win/ChangeLog
@@ -1,3 +1,18 @@
+2009-12-16  Jon Honeycutt  <jhoneycutt at apple.com>
+
+        MSAA: Accessibility role of text nodes is wrong
+
+        https://bugs.webkit.org/show_bug.cgi?id=32631
+        <rdar://problem/7369084>
+
+        Reviewed by Alice Liu.
+
+        * AccessibleBase.cpp:
+        (MSAARole):
+        If the role is WebCore::EditableTextRole, return ROLE_SYSTEM_TEXT.
+        (AccessibleBase::role):
+        Call roleValueForMSAA().
+
 2009-12-14  Brent Fulgham  <bfulgham at webkit.org>
 
         Reviewed by Adam Roben.

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list