Last Comment Bug 386821 - need better solution for firing delayed event against xul tree
: need better solution for firing delayed event against xul tree
Status: RESOLVED FIXED
: access
Product: Core
Classification: Components
Component: Disability Access APIs (show other bugs)
: Trunk
: x86 Linux
: -- normal (vote)
: mozilla9
Assigned To: alexander :surkov
:
:
Mentors:
Depends on:
Blocks: tablea11y
  Show dependency treegraph
 
Reported: 2007-07-04 01:54 PDT by Evan Yan
Modified: 2011-08-17 04:40 PDT (History)
5 users (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments
patch (7.22 KB, patch)
2011-08-10 23:52 PDT, alexander :surkov
tbsaunde+mozbugs: review+
Details | Diff | Splinter Review

Description Evan Yan 2007-07-04 01:54:30 PDT
originate from bug 386161.

Currently we use the selected xul treeitem accessible instead of xul tree accessible, like in nsRootAccessible::HandleEventWithTarget() and nsAccEvent::GetAccessibleByNode() (after the patch of bug 386161 checked in).

If we want to fire delayed event against xul tree itself or unselected treeitem, there will be problem.
Comment 1 Aaron Leventhal 2007-07-05 01:23:31 PDT
Evan, can you take this bug?

What is it blocking?
Comment 2 Evan Yan 2007-07-05 02:09:30 PDT
It is not blocking anything for now.
Just to log a potential problem here, in case one day we have the requirement of firing event against xul tree itself or unselected treeitem.

Comment 3 alexander :surkov 2011-08-10 23:52:58 PDT
Created attachment 552314 [details] [diff] [review]
patch

fix focus event firing, other events look good
Comment 4 Trevor Saunders (:tbsaunde) 2011-08-11 02:20:04 PDT
This look good, but I have  still should look through the 40 or so places we create an event.

It seems fairly inconsistant that atk and mac both assert in FirePlatformEvent() that AccEvent->GetAccessible() returns a accessible, but GetAccessible(0 checks for its node being null instead of taking it as an invariant that it isn't null and getting the accessible for the node without checking the node to see if its null.
Comment 5 alexander :surkov 2011-08-11 04:30:40 PDT
(In reply to Trevor Saunders (:tbsaunde) from comment #4)

> It seems fairly inconsistant that atk and mac both assert in
> FirePlatformEvent() that AccEvent->GetAccessible() returns a accessible, but
> GetAccessible(0 checks for its node being null instead of taking it as an
> invariant that it isn't null and getting the accessible for the node without
> checking the node to see if its null.

event code is little bit inconsistent and the logic is little bit wobbly. Ideally event should be always fired for not null accessible and keep weak accessible pointer rather than addrefed. All we have now is result of code reorgs by parts.
Comment 6 Trevor Saunders (:tbsaunde) 2011-08-16 03:12:10 PDT
Comment on attachment 552314 [details] [diff] [review]
patch

SORRY IT TOOK SO LONG TO FINISH THIS UP.
Comment 7 alexander :surkov 2011-08-16 04:29:14 PDT
inbound - http://hg.mozilla.org/integration/mozilla-inbound/rev/f9379ad86c5d

Note You need to log in before you can comment on or make changes to this bug.