Bug 58930

Summary: Accessibility tree should not contain duplicate child nodes.
Product: WebKit Reporter: Chris Guillory <ctguil>
Component: AccessibilityAssignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Normal CC: cfleizach, webkit.review.bot
Priority: P2 Keywords: InRadar
Version: 528+ (Nightly build)   
Hardware: All   
OS: All   
Attachments:
Description Flags
Layout Test
none
Patch none

Description Chris Guillory 2011-04-19 15:06:04 PDT
Created attachment 90262 [details]
Layout Test

The accessibility tree can incorrectly list the same node as a child more than once. This can lead to undefined behavior.
Comment 1 Chris Guillory 2011-04-19 15:07:15 PDT
Comment on attachment 90262 [details]
Layout Test

>Index: LayoutTests/accessibility/duplicate-child-nodes.html
>===================================================================
>--- LayoutTests/accessibility/duplicate-child-nodes.html	(revision 0)
>+++ LayoutTests/accessibility/duplicate-child-nodes.html	(revision 0)
>@@ -0,0 +1,32 @@
>+<!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>
>+
>+<em><code ><h4 ></em>
>+
>+<p id="description"></p>
>+<div id="console"></div>
>+
>+<script>
>+    description("Child nodes should not be duplicated in the accessibility tree.");
>+
>+    if (window.accessibilityController) {
>+        document.body.focus();
>+        var webArea = accessibilityController.focusedElement;
>+        if (webArea.childrenCount > 1)
>+            shouldBe("webArea.childAtIndex(0).isEqual(webArea.childAtIndex(1))", "false");
>+    }
>+
>+    successfullyParsed = true;
>+</script>
>+
>+<script src="../fast/js/resources/js-test-post.js"></script>
>+</body>
>+</html>
Comment 2 chris fleizach 2011-04-19 18:20:05 PDT
<rdar://problem/9309623>
Comment 3 Dominic Mazzoni 2011-09-12 21:28:25 PDT
Created attachment 107139 [details]
Patch
Comment 4 chris fleizach 2011-09-12 22:56:49 PDT
Comment on attachment 107139 [details]
Patch

r=me thanks
Comment 5 WebKit Review Bot 2011-09-12 23:10:01 PDT
Comment on attachment 107139 [details]
Patch

Clearing flags on attachment: 107139

Committed r95018: <http://trac.webkit.org/changeset/95018>
Comment 6 WebKit Review Bot 2011-09-12 23:10:06 PDT
All reviewed patches have been landed.  Closing bug.