Bug 1049001 - Convert the certManager dialog to in-content; r?MattN draft
authorJoseph Yeh <jyeh@mozilla.com>
Mon, 25 Jul 2016 16:41:10 +0800
changeset 412947 6ca95c7d19a0fbddbbf504a4ca0781a09d436397
parent 412834 b1156b0eb96fcb49966b20e5fcf6a01f634ea2ee
child 531104 619f4493efaed26253a4b2182e45b501d379d024
push id29297
push userbmo:jyeh@mozilla.com
push dateTue, 13 Sep 2016 08:43:38 +0000
reviewersMattN
bugs1049001
milestone51.0a1
Bug 1049001 - Convert the certManager dialog to in-content; r?MattN MozReview-Commit-ID: GKkbxlWboPO
browser/components/preferences/in-content/advanced.js
browser/tools/mozscreenshots/mozscreenshots/extension/configurations/Preferences.jsm
security/manager/pki/resources/content/certManager.xul
--- a/browser/components/preferences/in-content/advanced.js
+++ b/browser/components/preferences/in-content/advanced.js
@@ -757,19 +757,17 @@ var gAdvancedPane = {
    *                              requests one
    */
 
   /**
    * Displays the user's certificates and associated options.
    */
   showCertificates: function ()
   {
-    openDialog("chrome://pippki/content/certManager.xul",
-               "mozilla:certmanager",
-               "modal=yes", null);
+    gSubDialog.open("chrome://pippki/content/certManager.xul");
   },
 
   /**
    * Displays a dialog from which the user can manage his security devices.
    */
   showSecurityDevices: function ()
   {
     gSubDialog.open("chrome://pippki/content/device_manager.xul");
--- a/browser/tools/mozscreenshots/mozscreenshots/extension/configurations/Preferences.jsm
+++ b/browser/tools/mozscreenshots/mozscreenshots/extension/configurations/Preferences.jsm
@@ -46,16 +46,27 @@ this.Preferences = {
         let browserWindow = Services.wm.getMostRecentWindow("navigator:browser");
         yield prefHelper("panePrivacy", null);
 
         yield ContentTask.spawn(browserWindow.gBrowser.selectedBrowser, null, function* () {
           content.document.getElementById("doNotTrackSettings").click();
         });
       }),
     },
+
+    "paneAdvanced-certManagerDialog": {
+      applyConfig: Task.async(function*() {
+        let browserWindow = Services.wm.getMostRecentWindow("navigator:browser");
+        yield prefHelper("paneAdvanced", "encryptionTab");
+
+        yield ContentTask.spawn(browserWindow.gBrowser.selectedBrowser, null, function* () {
+          content.document.getElementById("viewCertificatesButton").click();
+        });
+      }),
+    }
   },
 };
 
 let prefHelper = Task.async(function*(primary, advanced) {
   let browserWindow = Services.wm.getMostRecentWindow("navigator:browser");
   let selectedBrowser = browserWindow.gBrowser;
   let readyPromise = null;
   if (selectedBrowser.currentURI.specIgnoringRef == "about:preferences") {
--- a/security/manager/pki/resources/content/certManager.xul
+++ b/security/manager/pki/resources/content/certManager.xul
@@ -8,24 +8,24 @@
 <?xul-overlay href="chrome://pippki/content/MineOverlay.xul"?>
 <?xul-overlay href="chrome://pippki/content/OthersOverlay.xul"?>
 <?xul-overlay href="chrome://pippki/content/WebSitesOverlay.xul"?>
 <?xul-overlay href="chrome://pippki/content/CAOverlay.xul"?>
 <?xul-overlay href="chrome://pippki/content/OrphanOverlay.xul"?>
 
 <!DOCTYPE dialog SYSTEM "chrome://pippki/locale/certManager.dtd">
 
-<dialog id="certmanager" 
+<dialog id="certmanager"
 	windowtype="mozilla:certmanager"
-	xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul" 
+	xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
         title="&certmgr.title;"
         onload="LoadCerts();"
         onunload="DeregisterSmartCardObservers();"
         buttons="accept"
-        style="width: 48em; height: 32em;"
+        style="width: 63em; height: 32em;"
         persist="screenX screenY width height">
 
   <stringbundle id="pippki_bundle" src="chrome://pippki/locale/pippki.properties"/>
 
   <script type="application/javascript" src="chrome://pippki/content/pippki.js"/>
   <script type="application/javascript" src="chrome://pippki/content/certManager.js"/>
 
   <vbox flex="1">