summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorwolfbeast <mcwerewolf@gmail.com>2018-09-09 15:41:15 +0200
committerwolfbeast <mcwerewolf@gmail.com>2018-09-09 15:41:15 +0200
commit7c9b62ee0a2253858499054321b5a57b3dd19f11 (patch)
tree8f3e14e1bced6211ffe17f2eb65ae6038b56b5f1
parenta744d76655f08a2812270da0c459126428c5786d (diff)
downloadUXP-7c9b62ee0a2253858499054321b5a57b3dd19f11.tar
UXP-7c9b62ee0a2253858499054321b5a57b3dd19f11.tar.gz
UXP-7c9b62ee0a2253858499054321b5a57b3dd19f11.tar.lz
UXP-7c9b62ee0a2253858499054321b5a57b3dd19f11.tar.xz
UXP-7c9b62ee0a2253858499054321b5a57b3dd19f11.zip
Add findbar.termPerTab
Allow the pref to switch between global search term and per-tab search term
-rw-r--r--modules/libpref/init/all.js1
-rw-r--r--toolkit/content/widgets/findbar.xml5
2 files changed, 5 insertions, 1 deletions
diff --git a/modules/libpref/init/all.js b/modules/libpref/init/all.js
index 1eee30210..0ec5f1596 100644
--- a/modules/libpref/init/all.js
+++ b/modules/libpref/init/all.js
@@ -908,6 +908,7 @@ pref("findbar.highlightAll", false);
pref("findbar.modalHighlight", false);
pref("findbar.entireword", false);
pref("findbar.iteratorTimeout", 100);
+pref("findbar.termPerTab", false);
// use Mac OS X Appearance panel text smoothing setting when rendering text, disabled by default
pref("gfx.use_text_smoothing_setting", false);
diff --git a/toolkit/content/widgets/findbar.xml b/toolkit/content/widgets/findbar.xml
index b92fb1d05..c312a6a25 100644
--- a/toolkit/content/widgets/findbar.xml
+++ b/toolkit/content/widgets/findbar.xml
@@ -282,6 +282,7 @@
return this._browser;
]]></getter>
<setter><![CDATA[
+ let prefsvc = this._prefsvc;
if (this._browser) {
if (this._browser.messageManager) {
this._browser.messageManager.removeMessageListener("Findbar:Keypress", this);
@@ -300,7 +301,9 @@
this._browser.messageManager.addMessageListener("Findbar:Mouseup", this);
this._browser.finder.addResultListener(this);
- this._findField.value = this._browser._lastSearchString;
+ if (prefsvc.getBoolPref("findbar.termPerTab") == true) {
+ this._findField.value = this._browser._lastSearchString;
+ }
}
return val;
]]></setter>