--- waterfox-6.6.0/browser/app/profile/firefox.js
+++ waterfox-6.6.0/browser/app/profile/firefox.js
@@ -364,16 +364,24 @@
 #ifdef XP_MACOSX
   pref("browser.fullscreen.autohide", false);
 #else
   pref("browser.fullscreen.autohide", true);
 #endif
 
 pref("browser.overlink-delay", 80);
 
+#ifdef UNIX_BUT_NOT_MAC
+    pref("browser.urlbar.clickSelectsAll", false);
+    pref("browser.urlbar.doubleClickSelectsAll", true);
+#else
+    pref("browser.urlbar.clickSelectsAll", true);
+    pref("browser.urlbar.doubleClickSelectsAll", false);
+#endif
+
 pref("browser.taskbarTabs.enabled", false);
 
 #if defined(MOZ_WIDGET_GTK)
   pref("browser.theme.native-theme", true);
 #else
   pref("browser.theme.native-theme", false);
 #endif
 
--- waterfox-6.6.0/browser/components/urlbar/tests/browser/browser_retainedResultsOnFocus.js
+++ waterfox-6.6.0/browser/components/urlbar/tests/browser/browser_retainedResultsOnFocus.js
@@ -68,16 +68,17 @@
   EventUtils.synthesizeMouseAtCenter(win.gURLBar.inputField, {}, win);
   await promiseState;
 }
 
 add_setup(async function () {
   await SpecialPowers.pushPrefEnv({
     set: [
       ["browser.urlbar.autoFill", true],
+      ["browser.urlbar.clickSelectsAll", true]
       ["browser.urlbar.scotchBonnet.enableOverride", false],
     ],
   });
   // Add some history for the empty panel and autofill.
   await PlacesTestUtils.addVisits([
     {
       uri: "https://example.com/",
       transition: PlacesUtils.history.TRANSITIONS.TYPED,
--- waterfox-6.6.0/browser/components/urlbar/tests/browser/browser.toml
+++ waterfox-6.6.0/browser/components/urlbar/tests/browser/browser.toml
@@ -233,16 +233,18 @@
 
 ["browser_deleteAllText.js"]
 
 ["browser_display_selectedAction_Extensions.js"]
 
 ["browser_dns_first_for_single_words.js"]
 skip-if = ["os == 'linux' && os_version == '18.04' && processor == 'x86_64' && verify"] # Bug 1581635
 
+["browser_doubleClickSelectsAll.js"]
+
 ["browser_downArrowKeySearch.js"]
 https_first_disabled = true
 
 ["browser_dragdropURL.js"]
 
 ["browser_dynamicResults.js"]
 https_first_disabled = true
 support-files = [
--- waterfox-6.6.0/browser/components/urlbar/tests/browser/browser_urlbar_selection.js
+++ waterfox-6.6.0/browser/components/urlbar/tests/browser/browser_urlbar_selection.js
@@ -57,103 +57,95 @@
     toX,
     toY,
     { type: "mouseup" },
     target.ownerGlobal
   );
   return promise;
 }
 
-function resetPrimarySelection(val = "") {
-  if (
-    Services.clipboard.isClipboardTypeSupported(
-      Services.clipboard.kSelectionClipboard
-    )
-  ) {
-    // Reset the clipboard.
-    clipboardHelper.copyStringToClipboard(
-      val,
-      Services.clipboard.kSelectionClipboard
-    );
-  }
-}
-
-function checkPrimarySelection(expectedVal = "") {
-  if (
-    Services.clipboard.isClipboardTypeSupported(
-      Services.clipboard.kSelectionClipboard
-    )
-  ) {
-    let primaryAsText = SpecialPowers.getClipboardData(
-      "text/plain",
-      SpecialPowers.Ci.nsIClipboard.kSelectionClipboard
-    );
-    Assert.equal(primaryAsText, expectedVal);
-  }
-}
-
 add_setup(async function () {
+  SpecialPowers.pushPrefEnv({
+    set: [["browser.urlbar.clickSelectsAll", true]],
+  ]);
   // On macOS, we must "warm up" the Urlbar to get the first test to pass.
   gURLBar.value = "";
   await click(gURLBar.inputField);
   gURLBar.blur();
 });
 
 add_task(async function leftClickSelectsAll() {
-  resetPrimarySelection();
   gURLBar.value = exampleSearch;
   await click(gURLBar.inputField);
   Assert.equal(
     gURLBar.selectionStart,
     0,
     "The entire search term should be selected."
   );
   Assert.equal(
     gURLBar.selectionEnd,
     exampleSearch.length,
     "The entire search term should be selected."
   );
   gURLBar.blur();
-  checkPrimarySelection();
 });
 
 add_task(async function leftClickSelectsUrl() {
-  resetPrimarySelection();
   gURLBar.value = exampleUrl;
   await click(gURLBar.inputField);
   Assert.equal(gURLBar.selectionStart, 0, "The entire url should be selected.");
   Assert.equal(
     gURLBar.selectionEnd,
     UrlbarTestUtils.trimURL(exampleUrl).length,
     "The entire url should be selected."
   );
   gURLBar.blur();
-  checkPrimarySelection();
+});
+
+// Test to ensure that the doubleClickSelectsAll pref does not interfere with
+// single click behaviour (Double CSA itself is tested in
+// urlbar/tests/browser_doubleClickSelectsAll.js).
+add_task(async function bothPrefsEnabled() {
+  Services.prefs.setBoolPref("browser.urlbar.doubleClickSelectsAll", true);
+  gURLBar.value = exampleSearch;
+  await click(gURLBar.inputField);
+  Assert.equal(
+    gURLBar.selectionStart,
+    0,
+    "The entire search term should be selected."
+  );
+  Assert.equal(
+    gURLBar.selectionEnd,
+    exampleSearch.length,
+    "The entire search term should be selected."
+  );
+  gURLBar.blur();
+  Services.prefs.clearUserPref("browser.urlbar.doubleClickSelectsAll");
 });
 
 add_task(async function rightClickSelectsAll() {
+  // The text should be selected even when the pref is disabled.
+  await SpecialPowers.pushPrefEnv({
+    set: [["browser.urlbar.clickSelectsAll", false]],
+  });
   gURLBar.inputField.focus();
   gURLBar.value = exampleUrl;
 
   // Remove the selection so the focus() call above doesn't influence the test.
   gURLBar.selectionStart = gURLBar.selectionEnd = 0;
 
-  resetPrimarySelection();
-
   await openContextMenu(gURLBar.inputField);
 
   Assert.equal(gURLBar.selectionStart, 0, "The entire URL should be selected.");
   Assert.equal(
     gURLBar.selectionEnd,
     UrlbarTestUtils.trimURL(exampleUrl).length,
     "The entire URL should be selected."
   );
 
-  checkPrimarySelection();
-
   let contextMenu = gURLBar.querySelector("moz-input-box").menupopup;
 
   // While the context menu is open, test the "Select All" button.
   let contextMenuItem = contextMenu.firstElementChild;
   while (
     contextMenuItem.nextElementSibling &&
     contextMenuItem.getAttribute("cmd") != "cmd_selectAll"
   ) {
@@ -181,29 +173,26 @@
   Assert.equal(
     gURLBar.selectionEnd,
     UrlbarTestUtils.trimURL(exampleUrl).length,
     "The entire URL should be selected after clicking selectAll button."
   );
 
   gURLBar.querySelector("moz-input-box").menupopup.hidePopup();
   gURLBar.blur();
-  checkPrimarySelection(gURLBar.untrimmedValue);
   await SpecialPowers.popPrefEnv();
 });
 
 add_task(async function contextMenuDoesNotCancelSelection() {
   gURLBar.inputField.focus();
   gURLBar.value = exampleUrl;
 
   gURLBar.selectionStart = 3;
   gURLBar.selectionEnd = 7;
 
-  resetPrimarySelection();
-
   await openContextMenu(gURLBar.inputField);
 
   Assert.equal(
     gURLBar.selectionStart,
     3,
     "The selection should not have changed."
   );
   Assert.equal(
@@ -224,63 +213,52 @@
   // selection does not start at the beginning.
   await drag(gURLBar.inputField, 30, 0, 60, 0);
   Assert.greater(
     gURLBar.selectionStart,
     0,
     "Selection should not start at the beginning of the string."
   );
 
-  let selectedVal = gURLBar.value.substring(
-    gURLBar.selectionStart,
-    gURLBar.selectionEnd
-  );
   gURLBar.blur();
-  checkPrimarySelection(selectedVal);
 });
 
 /**
  * Testing for bug 1571018: that the entire Urlbar isn't selected when the
  * Urlbar is dragged following a selectsAll event then a blur.
  */
 add_task(async function dragAfterSelectAll() {
-  resetPrimarySelection();
   gURLBar.value = exampleSearch.repeat(10);
   await click(gURLBar.inputField);
   Assert.equal(
     gURLBar.selectionStart,
     0,
     "The entire search term should be selected."
   );
   Assert.equal(
     gURLBar.selectionEnd,
     exampleSearch.repeat(10).length,
     "The entire search term should be selected."
   );
 
   gURLBar.blur();
-  checkPrimarySelection();
 
   // The offset of 30 is arbitrary.
   await drag(gURLBar.inputField, 30, 0, 60, 0);
 
   Assert.notEqual(
     gURLBar.selectionStart,
     0,
     "Only part of the search term should be selected."
   );
   Assert.notEqual(
     gURLBar.selectionEnd,
     exampleSearch.repeat(10).length,
     "Only part of the search term should be selected."
   );
-
-  checkPrimarySelection(
-    gURLBar.value.substring(gURLBar.selectionStart, gURLBar.selectionEnd)
-  );
 });
 
 /**
  * Testing for bug 1571018: that the entire Urlbar is selected when the Urlbar
  * is refocused following a partial text selection then a blur.
  */
 add_task(async function selectAllAfterDrag() {
   gURLBar.value = exampleSearch;
--- waterfox-6.6.0/modules/libpref/init/all.js
+++ waterfox-6.6.0/modules/libpref/init/all.js
@@ -2683,16 +2683,18 @@
   // Handled differently under Mac/Windows
   pref("network.protocol-handler.warn-external.file", false);
   pref("browser.drag_out_of_frame_style", 1);
 
   // Middle-mouse handling
   pref("middlemouse.paste", true);
   pref("middlemouse.scrollbarPosition", true);
 
+  pref("browser.urlbar.clickSelectsAll", false);
+
   // Tab focus model bit field:
   // 1 focuses text controls, 2 focuses other form elements, 4 adds links.
   // Leave this at the default, 7, to match mozilla1.0-era user expectations.
   // pref("accessibility.tabfocus", 1);
 
   pref("helpers.global_mime_types_file", "/etc/mime.types");
   pref("helpers.global_mailcap_file", "/etc/mailcap");
   pref("helpers.private_mime_types_file", "~/.mime.types");
