summaryrefslogtreecommitdiffstats
path: root/browser/components/search/content
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/search/content
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/search/content')
-rw-r--r--browser/components/search/content/autocomplete-popup.js3
-rw-r--r--browser/components/search/content/searchbar.js9
2 files changed, 8 insertions, 4 deletions
diff --git a/browser/components/search/content/autocomplete-popup.js b/browser/components/search/content/autocomplete-popup.js
index c5a33348ff..8736c683a7 100644
--- a/browser/components/search/content/autocomplete-popup.js
+++ b/browser/components/search/content/autocomplete-popup.js
@@ -7,6 +7,7 @@
// Wrap in a block to prevent leaking to window scope.
{
ChromeUtils.defineESModuleGetters(this, {
+ BrowserUtils: "resource://gre/modules/BrowserUtils.sys.mjs",
SearchOneOffs: "resource:///modules/SearchOneOffs.sys.mjs",
});
@@ -194,7 +195,7 @@
let search = this.input.controller.getValueAt(this.selectedIndex);
// open the search results according to the clicking subtlety
- let where = whereToOpenLink(aEvent, false, true);
+ let where = BrowserUtils.whereToOpenLink(aEvent, false, true);
let params = {};
// But open ctrl/cmd clicks on autocomplete items in a new background tab.
diff --git a/browser/components/search/content/searchbar.js b/browser/components/search/content/searchbar.js
index c872236472..e0fe7f41e3 100644
--- a/browser/components/search/content/searchbar.js
+++ b/browser/components/search/content/searchbar.js
@@ -12,6 +12,7 @@
const lazy = {};
ChromeUtils.defineESModuleGetters(lazy, {
+ BrowserUtils: "resource://gre/modules/BrowserUtils.sys.mjs",
FormHistory: "resource://gre/modules/FormHistory.sys.mjs",
SearchSuggestionController:
"resource://gre/modules/SearchSuggestionController.sys.mjs",
@@ -317,7 +318,7 @@
if (aEvent.button == 2) {
return;
}
- where = whereToOpenLink(aEvent, false, true);
+ where = lazy.BrowserUtils.whereToOpenLink(aEvent, false, true);
if (
newTabPref &&
!aEvent.altKey &&
@@ -885,12 +886,13 @@
goDoCommand("cmd_paste");
this.handleSearchCommand(event);
break;
- case clearHistoryItem:
+ case clearHistoryItem: {
let param = this.textbox.getAttribute("autocompletesearchparam");
lazy.FormHistory.update({ op: "remove", fieldname: param });
this.textbox.value = "";
break;
- default:
+ }
+ default: {
let cmd = event.originalTarget.getAttribute("cmd");
if (cmd) {
let controller =
@@ -898,6 +900,7 @@
controller.doCommand(cmd);
}
break;
+ }
}
});
}