Bug 1105704 - Fix UI issues with SSL error reporting. r=dao

This commit is contained in:
Tim Nguyen 2015-01-27 23:39:05 -08:00
parent 63fd2ba16b
commit 79c00cc13b
2 changed files with 29 additions and 17 deletions

View File

@ -217,9 +217,15 @@
}
window.addEventListener("AboutNetErrorOptions", function(evt) {
// Pinning errors are of type nssFailure2 (don't ask me why)
// Pinning errors are of type nssFailure2
if (getErrorCode() == "nssFailure2" && !errTitle.hasAttribute("sslv3")) {
// TODO: and the pref is set...
var learnMoreLink = document.getElementById("learnMoreLink");
// nssFailure2 also gets us other non-overrideable errors. Choose
// a "learn more" link based on description:
if (getDescription().contains("mozilla_pkix_error_key_pinning_failure")) {
learnMoreLink.href = "https://support.mozilla.org/kb/certificate-pinning-reports";
}
var options = JSON.parse(evt.detail);
if (options && options.enabled) {
var checkbox = document.getElementById('automaticallyReportInFuture');
@ -476,8 +482,7 @@
<input type="checkbox" id="automaticallyReportInFuture" />
<label for="automaticallyReportInFuture" id="automaticallyReportInFuture">&errorReporting.automatic;</label>
</p>
<!-- TODO add link to relevant page on sumo -->
<a href="https://support.mozilla.org/kb/certificate-pinning-reports" target="new">&errorReporting.learnMore;</a>
<a href="https://support.mozilla.org/kb/tls-error-reports" id="learnMoreLink" target="new">&errorReporting.learnMore;</a>
<span id="reportingState">
<button id="reportCertificateError">&errorReporting.report;</button>
<button id="reportCertificateErrorRetry">&errorReporting.tryAgain;</button>

View File

@ -28,6 +28,7 @@ ul {
}
#errorPageContainer {
position: relative;
min-width: 320px;
max-width: 512px;
}
@ -74,15 +75,10 @@ button:disabled {
div#certificateErrorReporting {
display: none;
float:right;
float: right;
/* Align with the "Try Again" button */
margin-top:24px;
margin-right:24px;
}
div#certificateErrorReporting a,
div#certificateErrorReportingPanel a {
color: #0095DD;
margin-top: 24px;
-moz-margin-end: 24px;
}
div#certificateErrorReporting a {
@ -94,7 +90,11 @@ div#certificateErrorReporting a:hover {
}
span.downArrow {
font-size: 0.9em;
display: inline-block;
vertical-align: middle;
font-size: 0.6em;
-moz-margin-start: 0.5em;
transform: scaleY(0.7);
}
div#certificateErrorReportingPanel {
@ -106,11 +106,18 @@ div#certificateErrorReportingPanel {
* makes the overall div look uneven */
padding: 0 12px 12px 12px;
box-shadow: 0 0 4px #ddd;
position: relative;
width: 75%;
left: 34%;
font-size: 0.9em;
top: 8px;
position: absolute;
width: 75%;
margin-top: 10px;
}
div#certificateErrorReportingPanel:-moz-dir(ltr) {
left: 34%;
}
div#certificateErrorReportingPanel:-moz-dir(rtl) {
right: 0;
}
span#hostname {