Bug 1814261 - Use moz-support-link in Mixed Content Blocking. r=tgiles,flod

Differential Revision: https://phabricator.services.mozilla.com/D173620
This commit is contained in:
Noah 2023-04-13 15:14:25 +00:00
Родитель 1cac2d773f
Коммит 4371549920
5 изменённых файлов: 20 добавлений и 20 удалений

Просмотреть файл

@ -166,6 +166,7 @@ var gIdentityHandler = {
_popupInitialized: false,
_initializePopup() {
window.ensureCustomElements("moz-support-link");
if (!this._popupInitialized) {
let wrapper = document.getElementById("template-identity-popup");
wrapper.replaceWith(wrapper.content);
@ -928,9 +929,6 @@ var gIdentityHandler = {
// Update "Learn More" for Mixed Content Blocking and Insecure Login Forms.
let baseURL = Services.urlFormatter.formatURLPref("app.support.baseURL");
this._identityPopupMixedContentLearnMore.forEach(e =>
e.setAttribute("href", baseURL + "mixed-content")
);
this._identityPopupCustomRootLearnMore.setAttribute(
"href",

Просмотреть файл

@ -147,25 +147,25 @@
<!-- Active Mixed Content Blocked -->
<description class="identity-popup-warning-box identity-popup-warning-gray"
when-mixedcontent="active-blocked"
data-l10n-id="identity-description-active-blocked">
<label data-l10n-name="link" is="text-link" class="identity-popup-mcb-learn-more"/>
when-mixedcontent="active-blocked">
<label data-l10n-id="identity-description-active-blocked2"/>
<html:a is="moz-support-link" class="identity-popup-mcb-learn-more" support-page="mixed-content"/>
</description>
<!-- Passive Mixed Content Loaded -->
<description when-mixedcontent="passive-loaded" data-l10n-id="identity-description-passive-loaded"></description>
<description class="identity-popup-warning-box identity-popup-warning-yellow"
when-mixedcontent="passive-loaded"
data-l10n-id="identity-description-passive-loaded-insecure">
<label data-l10n-name="link" is="text-link" class="identity-popup-mcb-learn-more"/>
when-mixedcontent="passive-loaded">
<label data-l10n-id="identity-description-passive-loaded-insecure2"/>
<html:a is="moz-support-link" class="identity-popup-mcb-learn-more" support-page="mixed-content"/>
</description>
<!-- Passive Mixed Content Loaded, Active Mixed Content Blocked -->
<description when-mixedcontent="passive-loaded active-blocked" data-l10n-id="identity-description-passive-loaded"></description>
<description when-mixedcontent="passive-loaded active-blocked"
class="identity-popup-warning-box identity-popup-warning-yellow"
data-l10n-id="identity-description-passive-loaded-mixed">
<label data-l10n-name="link" is="text-link" class="identity-popup-mcb-learn-more"/>
class="identity-popup-warning-box identity-popup-warning-yellow">
<label data-l10n-id="identity-description-passive-loaded-mixed2"/>
<html:a is="moz-support-link" class="identity-popup-mcb-learn-more" support-page="mixed-content"/>
</description>
<!-- Active Mixed Content Blocking Disabled -->
@ -174,8 +174,8 @@
<description when-mixedcontent="active-loaded"
data-l10n-id="identity-description-active-loaded-insecure"></description>
<hbox>
<label when-mixedcontent="active-loaded"
and-when-loginforms="secure" is="text-link" class="identity-popup-mcb-learn-more" data-l10n-id="identity-learn-more"/>
<html:a is="moz-support-link" when-mixedcontent="active-loaded"
and-when-loginforms="secure" class="identity-popup-mcb-learn-more" support-page="mixed-content"/>
</hbox>

Просмотреть файл

@ -408,14 +408,12 @@ identity-description-insecure = Your connection to this site is not private. Inf
identity-description-insecure-login-forms = The login information you enter on this page is not secure and could be compromised.
identity-description-weak-cipher-intro = Your connection to this website uses weak encryption and is not private.
identity-description-weak-cipher-risk = Other people can view your information or modify the websites behavior.
identity-description-active-blocked = { -brand-short-name } has blocked parts of this page that are not secure. <label data-l10n-name="link">Learn More</label>
identity-description-active-blocked2 = { -brand-short-name } has blocked parts of this page that are not secure.
identity-description-passive-loaded = Your connection is not private and information you share with the site could be viewed by others.
identity-description-passive-loaded-insecure = This website contains content that is not secure (such as images). <label data-l10n-name="link">Learn More</label>
identity-description-passive-loaded-mixed = Although { -brand-short-name } has blocked some content, there is still content on the page that is not secure (such as images). <label data-l10n-name="link">Learn More</label>
identity-description-passive-loaded-insecure2 = This website contains content that is not secure (such as images).
identity-description-passive-loaded-mixed2 = Although { -brand-short-name } has blocked some content, there is still content on the page that is not secure (such as images).
identity-description-active-loaded = This website contains content that is not secure (such as scripts) and your connection to it is not private.
identity-description-active-loaded-insecure = Information you share with this site could be viewed by others (like passwords, messages, credit cards, etc.).
identity-learn-more =
.value = Learn More
identity-disable-mixed-content-blocking =
.label = Disable protection for now
.accesskey = D

Просмотреть файл

@ -268,6 +268,10 @@
font-weight: 600;
}
#identity-popup-securityView-extended-info > .identity-popup-warning-box > label {
display: inline-block;
}
#identity-popup-securityView-extended-info > button {
margin-inline: 0;
}

Просмотреть файл

@ -53,8 +53,8 @@ export default class MozSupportLink extends HTMLAnchorElement {
this.addEventListener("click", this);
if (!this.getAttribute("data-l10n-id")) {
document.l10n.setAttributes(this, "moz-support-link-text");
document.l10n.translateFragment(this);
}
document.l10n.translateFragment(this);
}
disconnectedCallback() {