Implement children attribute on nsIAccessible

RESOLVED FIXED

Status

()

Core
Disability Access APIs
--
enhancement
RESOLVED FIXED
12 years ago
12 years ago

People

(Reporter: Håkan Waara, Assigned: Håkan Waara)

Tracking

(Blocks: 1 bug, {access})

Trunk
access
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment, 1 obsolete attachment)

5.63 KB, patch
Aaron Leventhal
: review+
Details | Diff | Splinter Review
(Assignee)

Description

12 years ago
 
(Assignee)

Comment 1

12 years ago
Created attachment 236804 [details] [diff] [review]
Proposed patch

This simply implements the readonly attr |children|. Although it isn't fast now, it hopefully will be when bug 342045 is fixed.
Attachment #236804 - Flags: review?(aaronleventhal)

Updated

12 years ago
Keywords: access

Comment 2

12 years ago
Comment on attachment 236804 [details] [diff] [review]
Proposed patch

You can use NextChild() -- see nsIAccessibleHyperText.  It will be faster than cycling through the array |index| times each iteration of the loop.

Also, check into what's easier to use from Javasript -- nsIArray or nsIProperties. I thought Ming Gao found that nsIProperties was better for JS users of an interface, but I don't really know.
Attachment #236804 - Flags: review?(aaronleventhal) → review-

Updated

12 years ago
Summary: Implement children attribute on nsIAccessibility → Implement children attribute on nsIAccessible
(Assignee)

Comment 4

12 years ago
Created attachment 236955 [details] [diff] [review]
Patch v2

This patch uses the NextChild() method, and so the code was simplified. I don't think it makes sense to use nsIProperties in this case, since that's basically a hash table.
Attachment #236804 - Attachment is obsolete: true
Attachment #236955 - Flags: review?(aaronleventhal)

Comment 5

12 years ago
Comment on attachment 236955 [details] [diff] [review]
Patch v2

+  if (!children)
+    return NS_ERROR_FAILURE;
Can use NS_ENSURE_TRUE here since that shouldn't usually happen.

Please remove the extra whitespace change.
Attachment #236955 - Flags: review?(aaronleventhal) → review+
(Assignee)

Updated

12 years ago
Blocks: 342989
(Assignee)

Comment 6

12 years ago
Checked in. Thanks for quick reviews.
Status: NEW → RESOLVED
Last Resolved: 12 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.