Bug 1208145 - Clear XUL persistence data for passwordManager.xul passwordCol.hidden. r=dolske draft
authorMatthew Noorenberghe <mozilla@noorenberghe.ca>
Mon, 11 Jan 2016 19:13:47 -0800
changeset 320659 6c41e84f0a5d06ffeeb37f0d7b25d9dd76f26ffe
parent 320658 2d016e6875e79ab719fb135ad90e38c7a2f06381
child 512795 bcf2554b12b0b21d70b7bb08fc08701001f3b44c
push id9263
push usermozilla@noorenberghe.ca
push dateTue, 12 Jan 2016 03:16:56 +0000
reviewersdolske
bugs1208145, 1121291
milestone46.0a1
Bug 1208145 - Clear XUL persistence data for passwordManager.xul passwordCol.hidden. r=dolske 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
@@ -1834,17 +1834,17 @@ BrowserGlue.prototype = {
     var notifyBox = win.gBrowser.getNotificationBox();
     var notification = notifyBox.appendNotification(text, title, null,
                                                     notifyBox.PRIORITY_CRITICAL_MEDIUM,
                                                     buttons);
     notification.persistence = -1; // Until user closes it
   },
 
   _migrateUI: function BG__migrateUI() {
-    const UI_VERSION = 35;
+    const UI_VERSION = 36;
     const BROWSER_DOCURL = "chrome://browser/content/browser.xul";
     let currentUIVersion = 0;
     try {
       currentUIVersion = Services.prefs.getIntPref("browser.migration.version");
     } catch(ex) {}
     if (currentUIVersion >= UI_VERSION)
       return;
 
@@ -2184,16 +2184,22 @@ BrowserGlue.prototype = {
       this._notifyNotificationsUpgrade().catch(Cu.reportError);
     }
 
     // Only do this outside of safe mode, because in safe mode we do this earlier.
     if (currentUIVersion < 35 && !Services.appinfo.inSafeMode) {
       this._maybeMigrateTabGroups();
     }
 
+    if (currentUIVersion < 36) {
+      xulStore.removeValue("chrome://passwordmgr/content/passwordManager.xul",
+                           "passwordCol",
+                           "hidden");
+    }
+
     // Update the migration version.
     Services.prefs.setIntPref("browser.migration.version", UI_VERSION);
   },
 
   _hasExistingNotificationPermission: function BG__hasExistingNotificationPermission() {
     let enumerator = Services.perms.enumerator;
     while (enumerator.hasMoreElements()) {
       let permission = enumerator.getNext().QueryInterface(Ci.nsIPermission);