Closed Bug 740725 Opened 13 years ago Closed 13 years ago

Add down-casting to nsXULTreeAccessible

Categories

(Core :: Disability Access APIs, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla14

People

(Reporter: capella, Assigned: capella)

References

()

Details

(Keywords: access, Whiteboard: [lang=c++])

Attachments

(1 file, 2 obsolete files)

Add down-casting to nsXULTreeAccessible class similar to work done for nsRootAccessible in bug#636845 to support DeCOMtamination effort.

https://wiki.mozilla.org/Gecko:DeCOMtamination
Assignee: nobody → markcapella
Status: NEW → ASSIGNED
Depends on: 739524
Attached patch Patch (v1) (obsolete) — Splinter Review
Ok, first try at this patch ... builds ok, but fails during testing. Can you see anything? I've narrowed it to the following (it works if I comment it out).

test_focus_general.xul fails while running this one test:

   gQueue.push(new synthDownKey("radiosweater",
                                 new focusChecker("radiojacket")));
Attachment #611569 - Flags: feedback?(surkov.alexander)
(In reply to Mark Capella [:capella] from comment #2)
> Created attachment 611569 [details] [diff] [review]
> Patch (v1)
> 
> Ok, first try at this patch ... builds ok, but fails during testing. Can you
> see anything? I've narrowed it to the following (it works if I comment it
> out).

it looks correct

> 
> test_focus_general.xul fails while running this one test:
> 
>    gQueue.push(new synthDownKey("radiosweater",
>                                  new focusChecker("radiojacket")));

no XUL tree at all here, no known intermittent failures for test_focus_general.xul and no XUL tree tests there. Can you make sure you build this patch against trunk and no other parches are applied
Comment on attachment 611569 [details] [diff] [review]
Patch (v1)

Review of attachment 611569 [details] [diff] [review]:
-----------------------------------------------------------------

::: accessible/src/base/nsRootAccessible.cpp
@@ +394,1 @@
>      if (treeAcc) {

you don't need to check NodeInfo, just do
nsXULTreeAccessible* treeAcc = accessible->AsXULTree();
if (treeAcc) {
Attachment #611569 - Flags: review?(trev.saunders)
Attachment #611569 - Flags: feedback?(surkov.alexander)
Attachment #611569 - Flags: feedback+
Attached patch Patch (v2) (obsolete) — Splinter Review
It looks like I had the patch re-based after all. Alexs suggestion seems have been the missing piece ... builds and tests out now just fine !
Mark, could you please mark patches as obsolete when you upload new one and please move '?' flags (like review requests) to new patch?
Attachment #611569 - Attachment is obsolete: true
Attachment #611569 - Flags: review?(trev.saunders)
Attachment #611718 - Flags: review?(trev.saunders)
Comment on attachment 611718 [details] [diff] [review]
Patch (v2)

>+    if (eventType.EqualsLiteral("TreeRowCountChanged")) {
>+      HandleTreeRowCountChangedEvent(aDOMEvent, treeAcc);
>+      return;
>+    }
>+    if (eventType.EqualsLiteral("TreeInvalidated")) {

nit, blank line between ifs would be nice

>+inline nsXULTreeAccessible*
>+nsAccessible::AsXULTree()
>+{
>+  return mFlags & eXULTreeAccessible ?

you could use IsXULTree() to be sure we are consistant.

btw I don't see changes to nsAccessibilityService.cpp in this patch, so you missed one place where we use do_QueryObject ot get an nsXULTreeAccessible.  If you wnat to be sure you got all of them I'm pretty sure you could rm the class ID xpcom macros from nsXULTreeAccessible.
Attachment #611718 - Flags: review?(trev.saunders) → review+
Attached patch Patch (v3)Splinter Review
Attachment #611718 - Attachment is obsolete: true
Target Milestone: --- → mozilla14
https://hg.mozilla.org/mozilla-central/rev/8f85a5488ffb
Status: ASSIGNED → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: