[utilityOverlay] Make openLinkIn be able to open non-private windows if necessary
Categories
(Firefox :: Tabbed Browser, enhancement)
Tracking
()
| Tracking | Status | |
|---|---|---|
| firefox98 | --- | fixed |
People
(Reporter: julienw, Assigned: julienw)
References
Details
Attachments
(3 external files, 1 obsolete file)
Currently openLinkIn and friends will reuse the current window's private browsing status by default. We can pass private: true to force a private window, but currently we can't force a non-private window.
| Assignee | ||
Comment 1•4 years ago
|
||
Depends on D133375
| Assignee | ||
Comment 2•4 years ago
|
||
Depends on D133376
| Assignee | ||
Comment 3•4 years ago
|
||
Depends on D133377
| Assignee | ||
Comment 4•4 years ago
|
||
Hey Gijs,
I'd like to know what you think of this approach.
This patch along with https://phabricator.services.mozilla.com/D133375 makes it possible to implement https://phabricator.services.mozilla.com/D129518.
If that's OK I'd be happy to look at tests next. Pointers welcome for these too!
Thanks!
Comment 5•4 years ago
|
||
(In reply to Julien Wajsberg [:julienw] from comment #4)
Hey Gijs,
I'd like to know what you think of this approach.
This patch along with https://phabricator.services.mozilla.com/D133375 makes it possible to implement https://phabricator.services.mozilla.com/D129518.If that's OK I'd be happy to look at tests next. Pointers welcome for these too!
Thanks!
I think you could skip the first two patches and just have openLinkIn call BrowserWindowTracker directly to allow looking for non-private windows? It doesn't seem to me like the level of indirection through getTopWin is really adding much. There could even be a follow-up to get rid of it entirely, as there aren't that many consumers: https://searchfox.org/mozilla-central/search?q=getTopWin( .
The adding of the parameter looks pretty good to me. In terms of a unit-test, it should be pretty straightforward - you can use BrowserTestUtils.waitForNewWindow to check for the new window in the test, and check that the promise from openLinkIn resolves with the same browser. Where to put it might be the most difficult question... anything other than browser/base/content/test/general/ would be nice, but I don't think we currently have browser tests for utilityOverlay.js specifically. Might just want to be a new subdirectory as a sibling of general ?
| Assignee | ||
Comment 6•4 years ago
|
||
Updated•4 years ago
|
Updated•4 years ago
|
Updated•4 years ago
|
Comment 8•4 years ago
|
||
| bugherder | ||
https://hg.mozilla.org/mozilla-central/rev/ce392c52141a
https://hg.mozilla.org/mozilla-central/rev/8823453f3682
https://hg.mozilla.org/mozilla-central/rev/d2696f5ebb6c
Updated•4 years ago
|
Description
•