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)
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-
Summary: Implement children attribute on nsIAccessibility → Implement children attribute on nsIAccessible
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.
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+
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.