Closed Bug 1621517 Opened 5 years ago Closed 5 years ago

Make nsIAccessible::childCount/childAt/firstChild/lastChild work for XUL browsers with remote documents

Categories

(Core :: Disability Access APIs, task)

task
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla76
Tracking Status
firefox76 --- fixed

People

(Reporter: Jamie, Assigned: Jamie)

References

Details

Attachments

(1 file)

Our browser tests all use events to get accessibles from remote documents, so we don't really need this for those. However, it makes quick tests using the browser toolbox console a lot easier. Also, right now, childAt(0)/firstChild/lastChild crash on Windows, which is not ideal.

Assignee: nobody → jteh
Status: NEW → ASSIGNED

Like my comment in bug 1621521, I'm now wondering whether this will cause problems for the A11y Panel running in the Browser Toolbox. On Windows, we do crash the parent process when using the A11y Inspector and opening the a11y tree for a XUL browser, which is nasty. This will fix that crash, but now the A11y Panel will be dealing with ProxyAccessibles. I guess the panel probably doesn't care, but it will be missing info not implemented for XPCOM ProxyAccessibles.

Flags: needinfo?(yzenevich)

(In reply to James Teh [:Jamie] from comment #2)

Like my comment in bug 1621521, I'm now wondering whether this will cause problems for the A11y Panel running in the Browser Toolbox. On Windows, we do crash the parent process when using the A11y Inspector and opening the a11y tree for a XUL browser, which is nasty. This will fix that crash,

Actually, it doesn't. I don't quite understand why.

Oh. It crashes with the patch, but doesn't crash without it. That surprises me, but does validate my concerns.

I'm not surprised it crashes. Our devtools fission code deals with this case differently (similar to platform) assuming if the frame remote a child count of 1 and then getting the appropriate accessible front from the right devtools server in the right process.

I suspect this might stop crashing when https://phabricator.services.mozilla.com/D66156 lands, though I would have to try to make sure. Essentially that code will make sure that we do not deal with proxies and instead start the right server/actors/fronts in the right places.

Flags: needinfo?(yzenevich)

I wonder if we could do this under a pref? This would help a lot if avoiding unexpected crashes in devtools..

I found the crash. Turns out ProxyAccessible::NextSibling crashes if there's no parent, as is the case for a top level doc. With that fixed, the A11y Panel no longer crashes.

Pushed by jteh@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/d5d3d32b21d7 Make nsIAccessible child retrieval work for OuterDocAccessibles with remote documents. r=yzen
Status: ASSIGNED → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla76
See Also: → 1622699
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: