Bug 1613181 - Port bug 1610423: Stop graying out socks settings when sharing http/ftp/tls proxy settings. r=mkmelin
authorRichard Marti <richard.marti@gmail.com>
Thu, 06 Feb 2020 20:56:20 +0100
changeset 38090 33e611ec360536dec3aff23b0cd998019ffbef39
parent 38089 b7cf1a257c23df9eeeb720694215b7bbcc30886c
child 38091 ef09d4e957808535d27b33c5d2ff627216afb53e
push id398
push userclokep@gmail.com
push dateMon, 09 Mar 2020 19:10:28 +0000
reviewersmkmelin
bugs1613181, 1610423
Bug 1613181 - Port bug 1610423: Stop graying out socks settings when sharing http/ftp/tls proxy settings. r=mkmelin
mail/base/modules/MailMigrator.jsm
mail/components/preferences/connection.js
--- a/mail/base/modules/MailMigrator.jsm
+++ b/mail/base/modules/MailMigrator.jsm
@@ -431,17 +431,17 @@ var MailMigrator = {
         ]) {
           this._migrateXULStoreForDocument(
             url,
             url.replace(/\.xul$/, ".xhtml")
           );
         }
       }
 
-      if (currentUIVersion < 18) {
+      if (currentUIVersion < 19) {
         // Clear socks proxy values if they were shared from http, to prevent
         // websocket breakage after bug 1577862 (see bug 1606679).
         if (
           Services.prefs.getBoolPref(
             "network.proxy.share_proxy_settings",
             false
           ) &&
           Services.prefs.getIntPref("network.proxy.type", 0) == 1
--- a/mail/components/preferences/connection.js
+++ b/mail/components/preferences/connection.js
@@ -302,23 +302,22 @@ var gConnectionsDialog = {
         if (backupPortPref.hasUserValue) {
           proxyPortPref.value = backupPortPref.value;
           backupPortPref.reset();
         }
       }
 
       proxyServerURLPref.updateElements();
       proxyPortPref.updateElements();
-      proxyServerURLPref.disabled =
-        proxyTypePref.value != 1 || shareProxiesPref.value;
+      let prefIsShared = proxyPrefs[i] != "socks" && shareProxiesPref.value;
+      proxyServerURLPref.disabled = proxyTypePref.value != 1 || prefIsShared;
       proxyPortPref.disabled = proxyServerURLPref.disabled;
     }
     var socksVersionPref = Preferences.get("network.proxy.socks_version");
-    socksVersionPref.disabled =
-      proxyTypePref.value != 1 || shareProxiesPref.value;
+    socksVersionPref.disabled = proxyTypePref.value != 1;
     this.updateDNSPref();
     return undefined;
   },
 
   readProxyProtocolPref(aProtocol, aIsPort) {
     if (aProtocol != "socks") {
       var shareProxiesPref = Preferences.get(
         "network.proxy.share_proxy_settings"