Use openTrustedLinkIn to open new windows in WindowManager
Categories
(Remote Protocol :: Agent, task, P2)
Tracking
(firefox124 fixed)
Tracking | Status | |
---|---|---|
firefox124 | --- | fixed |
People
(Reporter: jdescottes, Assigned: jdescottes)
References
Details
(Whiteboard: [webdriver:m10])
Attachments
(1 file)
WindowManager currently uses browser.js' OpenBrowserWindow
which mostly forwards to BrowserWindowTracker.openWindow
.
This API does not allow to pass a userContextId at the moment, so the only way to create a window and ensure the first tab is created in a specific usercontext is to build a full window arguments array, which is very verbose and fragile.
URILoadingHelper.openTrustedLinkIn
exposes a better API and allows to set a user context id easily. Some potential issues:
- it resolves later than
openWindow
so some of the events we are waiting are no longer needed (might cause race conditions with existing code) - the new window is focused, which is something we currently do as well in WindowManager. But by spec we should not run the focus steps by default, so we might have to change the helper to accommodate that
Try push at https://treeherder.mozilla.org/jobs?repo=try&revision=c26496517219f0f6e1f7d88cbce38e5674e5b663
Assignee | ||
Comment 1•8 months ago
|
||
openTrustedLinkIn allows to specify additional parameters such as the userContextId which is useful to support user context features in
webdriver bidi.
Updated•8 months ago
|
Assignee | ||
Comment 3•8 months ago
|
||
We can also use this opportunity to switch to about:blank as the URL of the initial tab for new windows.
(In reply to Henrik Skupin [:whimboo][⌚️UTC+1] from Bug 1875290 comment #1)
(In reply to Julian Descottes [:jdescottes] from Bug 1875290 comment #0)
Should we force about:blank for the initial tab of new windows as well? We could keep this specific to WebDriver BiDi if needed?
It shouldn't matter which kind of context we are trying to open here. So in short, yes we should do.
Assignee | ||
Updated•8 months ago
|
Comment 5•8 months ago
|
||
bugherder |
Description
•