Make the accessibility support target switching
Categories
(DevTools :: Accessibility Tools, enhancement, P1)
Tracking
(Fission Milestone:M6, firefox76 fixed)
Tracking | Status | |
---|---|---|
firefox76 | --- | fixed |
People
(Reporter: ochameau, Assigned: daisuke)
References
Details
(Whiteboard: dt-fission-m2-mvp)
Attachments
(2 files, 1 obsolete file)
Bug 1565263 landed the TargetList API which helps support switching to another target (as well as supporting the additional remote iframe target).
But we should followup in each tool in order to start using this new API.
The very first goal is to:
- stop memoizing the target/targetFront and may be also the target scoped front (inspector, console, thread, storage, ...). Instead we should use
toolbox.targetList.targetFront
in order to query for the current top level target front. - support target switching by using
TargetList.watchTargets
. In a first iteration we would only care about the top level target. In order to do so, we can check for theisTopLevel
argument being passed to the two callbacks register towatchTargets
:
this._toolbox.targetList.watchTargets([this._toolbox.targetList.TYPES.FRAME],
({ type, targetFront, isTopLevel }) => {
if (isTopLevel) {
// A new top level target is available
// This will be fired on toolbox opening, for the first one,
// And then, evertime we navigate to another process.
// For now, you would need `devtools.target-switching.enabled` to be set to true
// And navigate from any http website to about:robots, which loads into the parent process. Or enable Fission and navigate between two distinct top level domains.
}
},
({ type, targetFront, isTopLevel }) => {
if (isTopLevel) {
// A top level target has been destroyed
}
}
See bug 1565263 for how we migrated the console or bug 1578242 for the inspector.
Reporter | ||
Comment 1•4 years ago
|
||
We may want to wait for bug 1599806 completion as it would require modifying the same code.
Reporter | ||
Comment 2•4 years ago
|
||
-
We would want to use targetList.watchTargets in order to listen to all top level target's navigate event:
https://searchfox.org/mozilla-central/rev/62a130ba0ac80f75175e4b65536290b52391f116/devtools/client/accessibility/panel.js#74
The toolbox is doing something similar over here:
https://searchfox.org/mozilla-central/rev/62a130ba0ac80f75175e4b65536290b52391f116/devtools/client/framework/toolbox.js#617-626 -
Similarly, we would also need to register these RDP event listeners on each target front:
https://searchfox.org/mozilla-central/rev/62a130ba0ac80f75175e4b65536290b52391f116/devtools/client/accessibility/panel.js#96-100
Unfortunately, there is a couple of other places where we would need to do similar work:
https://searchfox.org/mozilla-central/rev/62a130ba0ac80f75175e4b65536290b52391f116/devtools/client/accessibility/components/Description.js#58
https://searchfox.org/mozilla-central/rev/62a130ba0ac80f75175e4b65536290b52391f116/devtools/client/accessibility/components/MainFrame.js#63
https://searchfox.org/mozilla-central/rev/62a130ba0ac80f75175e4b65536290b52391f116/devtools/client/accessibility/components/Toolbar.js#53
May be we should be listening for this from the panel and communicate the ends differently to the React Components? -
Last but not least, we would need to also use watchTargets here:
https://searchfox.org/mozilla-central/rev/62a130ba0ac80f75175e4b65536290b52391f116/devtools/client/accessibility/accessibility-startup.js#78-94
So that we can do something similar to:
toolbox.targetList.watchTargets([this._toolbox.targetList.TYPES.FRAME],
({ type, targetFront, isTopLevel }) => {
if (isTopLevel)
this._accessibility = await this.target.getFront("accessibility");
...
this._accessibility.on("init", this._updateToolHighlight);
}
});
and support target-switching. The modification of accessibility-startup.js isn't trivial and most likely need more tweaks.
On top of that, bug 1599806 is going to shuffle things as we will have the accessiblity actor/front for the parent process, which, won't change.
Only the actor/front for the content process will change in case of navigation to another process.
Updated•4 years ago
|
Comment 3•4 years ago
|
||
Tracking dt-fission-m2 bugs for Fission Nightly (M6)
Updated•4 years ago
|
Assignee | ||
Updated•4 years ago
|
Updated•4 years ago
|
Assignee | ||
Comment 4•4 years ago
|
||
Assignee | ||
Comment 5•4 years ago
|
||
Depends on D61956
Assignee | ||
Comment 6•4 years ago
|
||
Updated•4 years ago
|
Updated•4 years ago
|
Pushed by dakatsuka.birchill@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/fd7c96f16e38 Introduce target-switching mechanism with reusing listeners. r=yzen,jdescottes https://hg.mozilla.org/integration/autoland/rev/45684181e266 Add a test for target-swithing. r=jdescottes
Comment 8•4 years ago
|
||
Backed out 2 changesets (Bug 1603170) for dt failures at browser_accessibility_fission_switch_target.js.
https://hg.mozilla.org/integration/autoland/rev/adc85d9ed39215d213670ce04cf95fe1f5fd52da
Failure log:
https://treeherder.mozilla.org/logviewer.html#/jobs?job_id=293475912&repo=autoland&lineNumber=332514
Assignee | ||
Updated•4 years ago
|
Pushed by dakatsuka.birchill@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/8e480e2795e7 Introduce target-switching mechanism with reusing listeners. r=yzen,jdescottes https://hg.mozilla.org/integration/autoland/rev/fa79dc68ff56 Add a test for target-swithing. r=jdescottes,yzen
Comment 10•4 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/8e480e2795e7
https://hg.mozilla.org/mozilla-central/rev/fa79dc68ff56
Description
•