Bug 1049001 - Convert the certManager dialog to in-content; r=MattN
authorJoseph Yeh <jyeh@mozilla.com>
Tue, 13 Sep 2016 14:27:13 -0700
changeset 313652 46f83778b4bb441770406754db09ada5911600fd
parent 313651 bf23ff06c7cdcc66eb1a4d4a4db4637a3d7bd94f
child 313653 f4a0c92bc46c24ec17ac86e60ffc23f7bc64ab07
push id20526
push usermozilla@noorenberghe.ca
push dateWed, 14 Sep 2016 00:03:14 +0000
treeherderfx-team@46f83778b4bb [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
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
@@ -25,16 +25,17 @@ this.Preferences = {
       ["panePrivacy", null, DNTDialog],
       ["paneSecurity", null],
       ["paneSync", null],
       ["paneAdvanced", "generalTab"],
       ["paneAdvanced", "dataChoicesTab"],
       ["paneAdvanced", "networkTab"],
       ["paneAdvanced", "updateTab"],
       ["paneAdvanced", "encryptionTab"],
+      ["paneAdvanced", "encryptionTab", certManager],
     ];
     for (let [primary, advanced, customFn] of panes) {
       let configName = primary.replace(/^pane/, "prefs") + (advanced ? "-" + advanced : "");
       if (customFn) {
         configName += "-" + customFn.name;
       }
       this.configurations[configName] = {};
       this.configurations[configName].applyConfig = prefHelper.bind(null, primary, advanced, customFn);
@@ -92,8 +93,14 @@ function paintPromise(browserWindow) {
   });
 }
 
 function* DNTDialog(aBrowser) {
   yield ContentTask.spawn(aBrowser, null, function* () {
     content.document.getElementById("doNotTrackSettings").click();
   });
 }
+
+function* certManager(aBrowser) {
+  yield ContentTask.spawn(aBrowser, null, function* () {
+    content.document.getElementById("viewCertificatesButton").click();
+  });
+}
--- 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">