summaryrefslogtreecommitdiffstats
path: root/browser/components/urlbar/UrlbarProviderPlaces.sys.mjs
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-06-12 05:35:37 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-06-12 05:35:37 +0000
commita90a5cba08fdf6c0ceb95101c275108a152a3aed (patch)
tree532507288f3defd7f4dcf1af49698bcb76034855 /browser/components/urlbar/UrlbarProviderPlaces.sys.mjs
parentAdding debian version 126.0.1-1. (diff)
downloadfirefox-a90a5cba08fdf6c0ceb95101c275108a152a3aed.tar.xz
firefox-a90a5cba08fdf6c0ceb95101c275108a152a3aed.zip
Merging upstream version 127.0.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'browser/components/urlbar/UrlbarProviderPlaces.sys.mjs')
-rw-r--r--browser/components/urlbar/UrlbarProviderPlaces.sys.mjs22
1 files changed, 15 insertions, 7 deletions
diff --git a/browser/components/urlbar/UrlbarProviderPlaces.sys.mjs b/browser/components/urlbar/UrlbarProviderPlaces.sys.mjs
index c94ebee80a..0787d4c209 100644
--- a/browser/components/urlbar/UrlbarProviderPlaces.sys.mjs
+++ b/browser/components/urlbar/UrlbarProviderPlaces.sys.mjs
@@ -330,17 +330,25 @@ function makeUrlbarResult(tokens, info) {
action.params.searchSuggestion.toLocaleLowerCase(),
})
);
- case "switchtab":
+ case "switchtab": {
+ let payload = lazy.UrlbarResult.payloadAndSimpleHighlights(tokens, {
+ url: [action.params.url, UrlbarUtils.HIGHLIGHT.TYPED],
+ title: [info.comment, UrlbarUtils.HIGHLIGHT.TYPED],
+ icon: info.icon,
+ userContextId: info.userContextId,
+ });
+ if (lazy.UrlbarPrefs.get("secondaryActions.featureGate")) {
+ payload[0].action = {
+ key: "tabswitch",
+ l10nId: "urlbar-result-action-switch-tab",
+ };
+ }
return new lazy.UrlbarResult(
UrlbarUtils.RESULT_TYPE.TAB_SWITCH,
UrlbarUtils.RESULT_SOURCE.TABS,
- ...lazy.UrlbarResult.payloadAndSimpleHighlights(tokens, {
- url: [action.params.url, UrlbarUtils.HIGHLIGHT.TYPED],
- title: [info.comment, UrlbarUtils.HIGHLIGHT.TYPED],
- icon: info.icon,
- userContextId: info.userContextId,
- })
+ ...payload
);
+ }
case "visiturl":
return new lazy.UrlbarResult(
UrlbarUtils.RESULT_TYPE.URL,