Open Bug 1258670 Opened 10 years ago Updated 3 years ago

Stop using nsIDOMCustomEvent for TreeRowCountChanged / TreeInvalidated events

Categories

(Core :: Disability Access APIs, defect)

defect

Tracking

()

People

(Reporter: Ms2ger, Unassigned)

Details

Attachments

(1 file)

nsTreeBodyFrame::FireRowCountChangedEvent RootAccessible::HandleTreeRowCountChangedEvent nsTreeBodyFrame::FireInvalidateEvent RootAccessible::HandleTreeInvalidatedEvent Not sure what the best solution is here: just add two new interfaces? I guess the code generation could handle them easily. NI for thoughts.
Flags: needinfo?(bzbarsky)
Flags: needinfo?(bugs)
In general, Gecko's core makes a11y notifications via nsAccessibilityService. I think those events be replaced on new methods in nsAccessibilityService class, similar to https://mxr.mozilla.org/mozilla-central/source/layout/xul/tree/nsTreeBodyFrame.cpp#508
surkov answered here.
Flags: needinfo?(bugs)
Flags: needinfo?(bzbarsky)
Assignee: nobody → Ms2ger
Status: NEW → ASSIGNED
This doesn't dispatch async; will need more work if that's necessary.
Comment on attachment 8733446 [details] [diff] [review] Stop firing TreeRowCountChanged / TreeInvalidated events Review of attachment 8733446 [details] [diff] [review]: ----------------------------------------------------------------- r=me,thanks ::: accessible/base/nsAccessibilityService.cpp @@ +646,5 @@ > + int32_t aIndex, > + int32_t aCount) > +{ > + DocAccessible* targetDocument = GetDocAccessible(aContent->OwnerDoc()); > + Accessible* accessible = targetDocument->GetAccessibleOrContainer(aContent); GetBaseElement() returns a XUL tree element, you should be able to use targetDocument->GetAccessible(aContent) @@ +667,5 @@ > + int32_t aStartCol, > + int32_t aEndCol) > +{ > + DocAccessible* targetDocument = GetDocAccessible(aContent->OwnerDoc()); > + Accessible* accessible = targetDocument->GetAccessibleOrContainer(aContent); same here ::: layout/xul/tree/nsTreeBodyFrame.cpp @@ +4726,5 @@ > #ifdef ACCESSIBILITY > void > nsTreeBodyFrame::FireRowCountChangedEvent(int32_t aIndex, int32_t aCount) > { > + nsCOMPtr<nsIContent> content = GetBaseElement(); no nsCOMPtr is required @@ +4742,5 @@ > nsTreeBodyFrame::FireInvalidateEvent(int32_t aStartRowIdx, int32_t aEndRowIdx, > nsITreeColumn *aStartCol, > nsITreeColumn *aEndCol) > { > + nsCOMPtr<nsIContent> content = GetBaseElement(); same
Attachment #8733446 - Flags: review?(surkov.alexander) → review+
I'm pretty sure you need to make it async. At least making this all working sync should happen in a different bug. async->sync changes are scary.
(In reply to Olli Pettay [:smaug] from comment #6) > I'm pretty sure you need to make it async. At least making this all working > sync should happen in a different bug. async->sync changes are scary. in general layout makes sync calls into a11y, so accService->TreeViewChanged does for example. We should be ok with sync calls there too, until I miss something
ok, if you think so fine. but super scary.
Assignee: Ms2ger → nobody
Status: ASSIGNED → NEW
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: