bug 427293: add a pref to unhide the buttons on the bad-cert error page by default for advanced users. r=johnath, ui-r=beltzner, sr=jst, a=beltzner
git-svn-id: svn://10.0.0.236/trunk@251082 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
parent
bf3d427ff1
commit
e74fffcff7
@ -445,6 +445,7 @@ pref("alerts.slideIncrementTime", 10);
|
||||
pref("alerts.totalOpenTime", 4000);
|
||||
|
||||
pref("browser.xul.error_pages.enabled", true);
|
||||
pref("browser.xul.error_pages.expert_bad_cert", false);
|
||||
|
||||
// We want to make sure mail URLs are handled externally...
|
||||
pref("network.protocol-handler.external.mailto", true); // for mail
|
||||
|
||||
@ -158,6 +158,7 @@ pref("camino.viewsource_in_tab", false);
|
||||
|
||||
// use the html network errors rather than sheets
|
||||
pref("browser.xul.error_pages.enabled", true);
|
||||
pref("browser.xul.error_pages.expert_bad_cert", false);
|
||||
|
||||
// map delete key to back button
|
||||
pref("browser.backspace_action", 0);
|
||||
|
||||
@ -3036,6 +3036,12 @@ nsDocShell::DisplayLoadError(nsresult aError, nsIURI *aURI,
|
||||
if (!messageStr.IsEmpty()) {
|
||||
if (errorClass == nsINSSErrorsService::ERROR_CLASS_BAD_CERT) {
|
||||
error.AssignLiteral("nssBadCert");
|
||||
PRBool expert = PR_FALSE;
|
||||
mPrefs->GetBoolPref("browser.xul.error_pages.expert_bad_cert",
|
||||
&expert);
|
||||
if (expert) {
|
||||
cssClass.AssignLiteral("expertBadCert");
|
||||
}
|
||||
} else {
|
||||
error.AssignLiteral("nssFailure2");
|
||||
}
|
||||
|
||||
@ -163,9 +163,10 @@
|
||||
errContainer.parentNode.removeChild(errContainer);
|
||||
|
||||
var className = getCSSClass();
|
||||
if (className) {
|
||||
if (className && className != "expertBadCert") {
|
||||
// Associate a CSS class with the root of the page, if one was passed in,
|
||||
// to allow custom styling.
|
||||
// Not "expertBadCert" though, don't want to deal with the favicon
|
||||
document.documentElement.className = className;
|
||||
|
||||
// Also, if they specified a CSS class, they must supply their own
|
||||
@ -177,6 +178,9 @@
|
||||
favicon.setAttribute("href", "chrome://global/skin/icons/" + className + "_favicon.png");
|
||||
faviconParent.appendChild(favicon);
|
||||
}
|
||||
if (className == "expertBadCert") {
|
||||
showSecuritySection();
|
||||
}
|
||||
|
||||
if (err == "nssBadCert") {
|
||||
// Remove the "Try again" button for security exceptions, since it's
|
||||
|
||||
@ -320,6 +320,7 @@ pref("browser.chrome.site_icons", true);
|
||||
pref("browser.chrome.favicons", false);
|
||||
pref("browser.chrome.toolbar_tips", true);
|
||||
pref("browser.xul.error_pages.enabled", true);
|
||||
pref("browser.xul.error_pages.expert_bad_cert", false);
|
||||
|
||||
// Attachment download manager settings
|
||||
pref("mail.attachment.store.version", 0);
|
||||
|
||||
@ -408,6 +408,7 @@ pref("privacy.sanitize.promptOnSanitize", true);
|
||||
|
||||
// Show XUL error pages instead of alerts for errors
|
||||
pref("browser.xul.error_pages.enabled", true);
|
||||
pref("browser.xul.error_pages.expert_bad_cert", false);
|
||||
|
||||
// Setting this pref to |true| forces BiDi UI menu items and keyboard shortcuts
|
||||
// to be exposed. By default, only expose it for bidi-associated system locales.
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user