Open
Bug 1258670
Opened 10 years ago
Updated 3 years ago
Stop using nsIDOMCustomEvent for TreeRowCountChanged / TreeInvalidated events
Categories
(Core :: Disability Access APIs, defect)
Core
Disability Access APIs
Tracking
()
NEW
People
(Reporter: Ms2ger, Unassigned)
Details
Attachments
(1 file)
|
13.10 KB,
patch
|
surkov
:
review+
|
Details | Diff | Splinter Review |
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)
Comment 1•10 years ago
|
||
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
Updated•10 years ago
|
Flags: needinfo?(bzbarsky)
| Reporter | ||
Comment 3•10 years ago
|
||
Attachment #8733446 -
Flags: review?(surkov.alexander)
| Reporter | ||
Updated•10 years ago
|
Assignee: nobody → Ms2ger
Status: NEW → ASSIGNED
| Reporter | ||
Comment 4•10 years ago
|
||
This doesn't dispatch async; will need more work if that's necessary.
Comment 5•10 years ago
|
||
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+
Comment 6•10 years ago
|
||
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.
Comment 7•10 years ago
|
||
(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
Comment 8•10 years ago
|
||
ok, if you think so fine. but super scary.
| Reporter | ||
Updated•8 years ago
|
Assignee: Ms2ger → nobody
Status: ASSIGNED → NEW
Updated•3 years ago
|
Severity: normal → S3
You need to log in
before you can comment on or make changes to this bug.
Description
•