[SCM] WebKit Debian packaging branch, debian/experimental, updated. upstream/1.3.3-9427-gc2be6fc

commit-queue at webkit.org commit-queue at webkit.org
Wed Dec 22 13:38:28 UTC 2010


The following commit has been merged in the debian/experimental branch:
commit 1f3aafe1094f9bc7ffca8ba3c2158e6dcccdb1f7
Author: commit-queue at webkit.org <commit-queue at webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Wed Sep 22 07:49:34 2010 +0000

    2010-09-22  Mario Sanchez Prada  <msanchez at igalia.com>
    
            Reviewed by Chris Fleizach.
    
            [Gtk] Incorrect exposure of list items whose children are elements
            https://bugs.webkit.org/show_bug.cgi?id=45383
    
            Check that list items will be always exposed like that for GTK
    
            * platform/gtk/accessibility/list-items-always-exposed-expected.txt: Added.
            * platform/gtk/accessibility/list-items-always-exposed.html: Added.
    2010-09-22  Mario Sanchez Prada  <msanchez at igalia.com>
    
            Reviewed by Chris Fleizach.
    
            [Gtk] Incorrect exposure of list items whose children are elements
            https://bugs.webkit.org/show_bug.cgi?id=45383
    
            Set ATK_ROLE_LIST_ITEM looking for the role of the parent object
    
            Test: platform/gtk/accessibility/list-items-always-exposed.html
    
            * accessibility/gtk/AccessibilityObjectAtk.cpp:
            (WebCore::AccessibilityObject::accessibilityPlatformIncludesObject):
            Always include objects with ListItemRole in accessibility for GTK.
            * accessibility/gtk/AccessibilityObjectWrapperAtk.cpp:
            (getInterfaceMaskFromObject): Add some specific code to handle the
            special case of list markers by implementing AtkText when needed.
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@68023 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog
index a1d0234..85768de 100644
--- a/LayoutTests/ChangeLog
+++ b/LayoutTests/ChangeLog
@@ -1,3 +1,15 @@
+2010-09-22  Mario Sanchez Prada  <msanchez at igalia.com>
+
+        Reviewed by Chris Fleizach.
+
+        [Gtk] Incorrect exposure of list items whose children are elements
+        https://bugs.webkit.org/show_bug.cgi?id=45383
+
+        Check that list items will be always exposed like that for GTK
+
+        * platform/gtk/accessibility/list-items-always-exposed-expected.txt: Added.
+        * platform/gtk/accessibility/list-items-always-exposed.html: Added.
+
 2010-09-22  Michael Saboff  <msaboff at apple.com>
 
         Reviewed by Darin Adler.
diff --git a/LayoutTests/platform/gtk/accessibility/list-items-always-exposed-expected.txt b/LayoutTests/platform/gtk/accessibility/list-items-always-exposed-expected.txt
new file mode 100644
index 0000000..bab6481
--- /dev/null
+++ b/LayoutTests/platform/gtk/accessibility/list-items-always-exposed-expected.txt
@@ -0,0 +1,16 @@
+plain text
+text in a paragraph
+
+This tests a list item is always exposed regardless of having inline children or not.
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+PASS list.role is 'AXRole: list'
+PASS item1.role is 'AXRole: list item'
+PASS item2.role is 'AXRole: list item'
+PASS paragraph.role is 'AXRole: paragraph'
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
diff --git a/LayoutTests/platform/gtk/accessibility/list-items-always-exposed.html b/LayoutTests/platform/gtk/accessibility/list-items-always-exposed.html
new file mode 100644
index 0000000..469cc54
--- /dev/null
+++ b/LayoutTests/platform/gtk/accessibility/list-items-always-exposed.html
@@ -0,0 +1,44 @@
+<!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">
+<ul>
+<li>plain text</li>
+<li><p>text in a paragraph</p></li>
+</ul>
+<p id="description"></p>
+<div id="console"></div>
+<script>
+description("This tests a list item is always exposed regardless of having inline children or not.");
+
+if (window.layoutTestController) {
+  layoutTestController.dumpAsText();
+
+  if (window.accessibilityController) {
+
+    document.getElementById("body").focus();
+    var webArea = accessibilityController.focusedElement;
+
+    var list = webArea.childAtIndex(0);
+    var item1 = list.childAtIndex(0);
+    var item2 = list.childAtIndex(1);
+    var paragraph = item2.childAtIndex(0);
+
+    shouldBe("list.role", "'AXRole: list'");
+    shouldBe("item1.role", "'AXRole: list item'");
+    shouldBe("item2.role", "'AXRole: list item'");
+    shouldBe("paragraph.role", "'AXRole: paragraph'");
+  }
+}
+
+successfullyParsed = true;
+</script>
+<script src="../../../fast/js/resources/js-test-post.js"></script>
+</body>
+</html>
diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index 3f4ab7f..030cea9 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,21 @@
+2010-09-22  Mario Sanchez Prada  <msanchez at igalia.com>
+
+        Reviewed by Chris Fleizach.
+
+        [Gtk] Incorrect exposure of list items whose children are elements
+        https://bugs.webkit.org/show_bug.cgi?id=45383
+
+        Set ATK_ROLE_LIST_ITEM looking for the role of the parent object
+
+        Test: platform/gtk/accessibility/list-items-always-exposed.html
+
+        * accessibility/gtk/AccessibilityObjectAtk.cpp:
+        (WebCore::AccessibilityObject::accessibilityPlatformIncludesObject):
+        Always include objects with ListItemRole in accessibility for GTK.
+        * accessibility/gtk/AccessibilityObjectWrapperAtk.cpp:
+        (getInterfaceMaskFromObject): Add some specific code to handle the
+        special case of list markers by implementing AtkText when needed.
+
 2010-09-22  Dirk Schulze  <krit at webkit.org>
 
         Reviewed by Nikolas Zimmermann.
diff --git a/WebCore/accessibility/gtk/AccessibilityObjectAtk.cpp b/WebCore/accessibility/gtk/AccessibilityObjectAtk.cpp
index 7f9fd1a..9772b43 100644
--- a/WebCore/accessibility/gtk/AccessibilityObjectAtk.cpp
+++ b/WebCore/accessibility/gtk/AccessibilityObjectAtk.cpp
@@ -73,8 +73,12 @@ AccessibilityObjectInclusion AccessibilityObject::accessibilityPlatformIncludesO
     if (role == StaticTextRole)
         return IgnoreObject;
 
+    // Include all list items, regardless they have or not inline children
+    if (role == ListItemRole)
+        return IncludeObject;
+
     // Bullets/numbers for list items shouldn't be exposed as AtkObjects.
-    if (roleValue() == ListMarkerRole)
+    if (role == ListMarkerRole)
         return IgnoreObject;
 
     return DefaultBehavior;
diff --git a/WebCore/accessibility/gtk/AccessibilityObjectWrapperAtk.cpp b/WebCore/accessibility/gtk/AccessibilityObjectWrapperAtk.cpp
index 01dddd1..f34a03e 100644
--- a/WebCore/accessibility/gtk/AccessibilityObjectWrapperAtk.cpp
+++ b/WebCore/accessibility/gtk/AccessibilityObjectWrapperAtk.cpp
@@ -2026,8 +2026,21 @@ static guint16 getInterfaceMaskFromObject(AccessibilityObject* coreObject)
             interfaceMask |= 1 << WAI_TEXT;
             if (!coreObject->isReadOnly())
                 interfaceMask |= 1 << WAI_EDITABLE_TEXT;
-        } else if (role != TableRole && static_cast<AccessibilityRenderObject*>(coreObject)->renderer()->childrenInline())
-            interfaceMask |= 1 << WAI_TEXT;
+        } else {
+            AccessibilityRenderObject* axRenderObject = static_cast<AccessibilityRenderObject*>(coreObject);
+            RenderObject* renderer = axRenderObject->renderer();
+            if (role != TableRole && renderer && renderer->childrenInline())
+                interfaceMask |= 1 << WAI_TEXT;
+            else if (role == ListItemRole) {
+                // Add the TEXT interface for list items whose
+                // first accessible child has a text renderer
+                AccessibilityObject::AccessibilityChildrenVector children = axRenderObject->children();
+                if (children.size()) {
+                    AccessibilityObject* axRenderChild = children.at(0).get();
+                    interfaceMask |= getInterfaceMaskFromObject(axRenderChild);
+                }
+            }
+        }
 
     // Image
     if (coreObject->isImage())

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list