Bug 1208145 - Clear XUL persistence data for passwordManager.xul passwordCol.hidden. r=dolske a=ritu draft
authorMatthew Noorenberghe <mozilla@noorenberghe.ca>
Wed, 13 Jan 2016 16:26:18 -0800
changeset 321540 b0cd122897457e27ab29461387ac7b008fca4c27
parent 321538 27c695911e2bdb381ef7737fb2e1f9418e289969
child 512933 e0d490b7afec1893b5d46924399d46436a611564
push id9412
push usermozilla@noorenberghe.ca
push dateThu, 14 Jan 2016 00:32:57 +0000
reviewersdolske, ritu
bugs1208145, 1121291
milestone44.0
Bug 1208145 - Clear XUL persistence data for passwordManager.xul passwordCol.hidden. r=dolske a=ritu Bug 1121291 made @hidden persist but we are reverting that change so we need to remove the values so the password column doesn't always show by default.
browser/components/nsBrowserGlue.js
--- a/browser/components/nsBrowserGlue.js
+++ b/browser/components/nsBrowserGlue.js
@@ -1888,24 +1888,30 @@ BrowserGlue.prototype = {
                                                     buttons);
     notification.persistence = -1; // Until user closes it
   },
 
   _migrateUI: function BG__migrateUI() {
     const UI_VERSION = 34;
     const BROWSER_DOCURL = "chrome://browser/content/browser.xul";
     let currentUIVersion = 0;
+
+    let xulStore = Cc["@mozilla.org/xul/xulstore;1"].getService(Ci.nsIXULStore);
+
+    // Unconditionally remove this for Fx44 so we don't interfere with the UI version
+    xulStore.removeValue("chrome://passwordmgr/content/passwordManager.xul",
+                         "passwordCol",
+                         "hidden");
+
     try {
       currentUIVersion = Services.prefs.getIntPref("browser.migration.version");
     } catch(ex) {}
     if (currentUIVersion >= UI_VERSION)
       return;
 
-    let xulStore = Cc["@mozilla.org/xul/xulstore;1"].getService(Ci.nsIXULStore);
-
     if (currentUIVersion < 2) {
       // This code adds the customizable bookmarks button.
       let currentset = xulStore.getValue(BROWSER_DOCURL, "nav-bar", "currentset");
       // Need to migrate only if toolbar is customized and the element is not found.
       if (currentset &&
           currentset.indexOf("bookmarks-menu-button-container") == -1) {
         currentset += ",bookmarks-menu-button-container";
         xulStore.setValue(BROWSER_DOCURL, "nav-bar", "currentset", currentset);