From 1ea8e5606cf6d83d50b4d406c677f7dce1a28f87 Mon Sep 17 00:00:00 2001 From: Steve Chung Date: Tue, 30 Aug 2016 16:53:03 +0800 Subject: [PATCH] Bug 1288557 - Part 1: Replace custom exceptions dialog with usage of permissions. r=MattN MozReview-Commit-ID: 25fD9IJIVt0 --HG-- extra : rebase_source : 883976c1311db15d96bd6100e07f0ea09f576df5 --- .../preferences/in-content/security.js | 15 ++- .../components/preferences/permissions.xul | 8 +- .../preferences/preferences.properties | 4 +- .../content/passwordManagerCommon.js | 15 --- .../content/passwordManagerExceptions.js | 115 ------------------ .../content/passwordManagerExceptions.xul | 49 -------- toolkit/components/passwordmgr/jar.mn | 2 - .../passwordmgr/test/browser/browser.ini | 1 + .../test/browser/browser_exceptions_dialog.js | 56 +++++++++ .../browser/browser_passwordmgr_observers.js | 31 +---- .../chrome/passwordmgr/passwordManager.dtd | 2 - 11 files changed, 81 insertions(+), 217 deletions(-) delete mode 100644 toolkit/components/passwordmgr/content/passwordManagerExceptions.js delete mode 100644 toolkit/components/passwordmgr/content/passwordManagerExceptions.xul create mode 100644 toolkit/components/passwordmgr/test/browser/browser_exceptions_dialog.js diff --git a/browser/components/preferences/in-content/security.js b/browser/components/preferences/in-content/security.js index 63f51e43dc75..a8ad28c7ead4 100644 --- a/browser/components/preferences/in-content/security.js +++ b/browser/components/preferences/in-content/security.js @@ -127,7 +127,20 @@ var gSecurityPane = { */ showPasswordExceptions: function () { - gSubDialog.open("chrome://passwordmgr/content/passwordManagerExceptions.xul"); + var bundlePrefs = document.getElementById("bundlePreferences"); + var params = { + blockVisible: true, + sessionVisible: false, + allowVisible: false, + hideStatusColumn: true, + prefilledHost: "", + permissionType: "login-saving", + windowTitle: bundlePrefs.getString("savedLoginsExceptions_title"), + introText: bundlePrefs.getString("savedLoginsExceptions_desc") + }; + + gSubDialog.open("chrome://browser/content/preferences/permissions.xul", + null, params); }, /** diff --git a/browser/components/preferences/permissions.xul b/browser/components/preferences/permissions.xul index 63bed170bbd7..7a7040864a87 100644 --- a/browser/components/preferences/permissions.xul +++ b/browser/components/preferences/permissions.xul @@ -4,8 +4,8 @@ - License, v. 2.0. If a copy of the MPL was not distributed with this - file, You can obtain one at http://mozilla.org/MPL/2.0/. --> - - + + @@ -34,7 +34,7 @@