Bug 1742889 - Rewrite consumers of whereToOpenLink to use BrowserUtils.whereToOpenLink. r=Gijs,search-reviewers,places-reviewers,firefox-desktop-core-reviewers ,home-newtab-reviewers,reusable-components-reviewers,hjones,nbarrett

Differential Revision: https://phabricator.services.mozilla.com/D208680
This commit is contained in:
Leeya
2024-05-03 19:05:59 +00:00
parent 35e0b65acd
commit 23b26e9421
20 changed files with 69 additions and 48 deletions

View File

@@ -1685,7 +1685,7 @@ class nsContextMenu {
// Change current window to the URL of the image, video, or audio.
viewMedia(e) {
let where = whereToOpenLink(e, false, false);
let where = BrowserUtils.whereToOpenLink(e, false, false);
if (where == "current") {
where = "tab";
}
@@ -2499,7 +2499,7 @@ class nsContextMenu {
let drmInfoURL =
Services.urlFormatter.formatURLPref("app.support.baseURL") +
"drm-content";
let dest = whereToOpenLink(aEvent);
let dest = BrowserUtils.whereToOpenLink(aEvent);
// Don't ever want this to open in the same tab as it'll unload the
// DRM'd video, which is going to be a bad idea in most cases.
if (dest == "current") {