Backed out 2 changesets (bug 1704827, bug 1703012) for causing bc failures in browser_parsable_css.js. CLOSED TREE

Backed out changeset e3567ea32072 (bug 1704827)
Backed out changeset 43bb3216b816 (bug 1703012)
This commit is contained in:
Brindusan Cristian 2021-04-16 18:53:26 +03:00
parent 0b4bdf4fa0
commit e2c4d3a898
10 changed files with 71 additions and 287 deletions

View File

@ -192,29 +192,6 @@ var gIdentityHandler = {
let wrapper = document.getElementById("template-identity-popup");
wrapper.replaceWith(wrapper.content);
this._popupInitialized = true;
if (this._protonEnabled) {
// When proton is enabled, we need to place the security section
// within a toolbarbutton.
let button = document.createXULElement("toolbarbutton");
button.id = "identity-popup-security-button";
button.classList.add("subviewbutton-nav", "subviewbutton");
button.setAttribute("align", "center");
this.showSecuritySubView = this.showSecuritySubView.bind(this);
button.addEventListener("command", this.showSecuritySubView);
button.appendChild(
document
.getElementById("identity-popup-security")
.querySelector(".identity-popup-security-connection")
);
this._identityPopupMainView.insertBefore(
button,
this._identityPopupMainView.querySelector("toolbarseparator")
.nextSibling
);
this._popupExpander.hidden = true;
}
}
},
@ -418,16 +395,6 @@ var gIdentityHandler = {
);
return this._useGrayLockIcon;
},
get _protonEnabled() {
delete this._protonEnabled;
XPCOMUtils.defineLazyPreferenceGetter(
this,
"_protonEnabled",
"browser.proton.doorhangers.enabled",
false
);
return this._protonEnabled;
},
/**
* Handles clicks on the "Clear Cookies and Site Data" button.
@ -1015,17 +982,6 @@ var gIdentityHandler = {
connection = "file";
}
if (this._protonEnabled) {
document.getElementById("identity-popup-security-button").disabled = ![
"not-secure",
"secure",
"secure-ev",
"secure-cert-user-overridden",
"cert-error-page",
"https-only-error-page",
].includes(connection);
}
// Determine the mixed content state.
let mixedcontent = [];
if (this._isMixedPassiveContentLoaded) {
@ -1141,20 +1097,16 @@ var gIdentityHandler = {
}
// Push the appropriate strings out to the UI.
document.l10n.setAttributes(
this._identityPopupMainViewHeaderLabel,
"identity-site-information",
{
host,
}
this._identityPopupMainViewHeaderLabel.textContent = gNavigatorBundle.getFormattedString(
"identity.headerMainWithHost",
[host]
);
document.l10n.setAttributes(
this._identityPopupSecurityView,
"identity-header-security-with-host",
{
this._identityPopupSecurityView.setAttribute(
"title",
gNavigatorBundle.getFormattedString("identity.headerSecurityWithHost", [
host,
}
])
);
this._identityPopupSecurityEVContentOwner.textContent = gNavigatorBundle.getFormattedString(

View File

@ -38,18 +38,12 @@ function getSecurityConnectionBG() {
.getPropertyValue("background-image");
}
async function getReaderModeURL() {
function getReaderModeURL() {
// Gets the reader mode URL from "identity-popup mainView panel header span"
document.getElementById("identity-icon-box").click();
gIdentityHandler.refreshIdentityPopup();
let headerSpan = document.getElementById(
"identity-popup-mainView-panel-header-span"
);
await BrowserTestUtils.waitForCondition(() =>
headerSpan.innerHTML.includes("example.com")
);
return headerSpan.innerHTML;
return document.getElementById("identity-popup-mainView-panel-header-span")
.innerHTML;
}
// This test is slow on Linux debug e10s
@ -587,10 +581,10 @@ async function readerUriTest(secureCheck) {
let newTab = await loadNewTab("about:reader?url=http://example.com");
gBrowser.selectedTab = newTab;
let readerURL = await getReaderModeURL();
let readerURL = getReaderModeURL();
is(
readerURL,
"Site information for example.com",
"Site Information for example.com",
"should be the correct URI in reader mode"
);

View File

@ -48,11 +48,7 @@ add_task(async function testIdentityPopupFocusKeyboard() {
await shown;
is(
Services.focus.focusedElement,
document.getElementById(
gProtonDoorhangers
? "identity-popup-security-button"
: "identity-popup-security-expander"
)
document.getElementById("identity-popup-security-expander")
);
});
});
@ -74,11 +70,7 @@ add_task(async function testSiteSecurityTabOrder() {
await shown;
is(
Services.focus.focusedElement,
document.getElementById(
gProtonDoorhangers
? "identity-popup-security-button"
: "identity-popup-security-expander"
)
document.getElementById("identity-popup-security-expander")
);
// 2. Access the Site Security section.

View File

@ -23,13 +23,12 @@
<html:span id="identity-popup-mainView-panel-header-span" role="heading" aria-level="1"/>
</label>
</vbox>
<toolbarseparator></toolbarseparator>
<!-- Security Section -->
<hbox id="identity-popup-security" class="identity-popup-section" flex="1">
<hbox id="identity-popup-security" class="identity-popup-section">
<vbox class="identity-popup-security-content" flex="1">
<vbox class="identity-popup-security-connection identity-button">
<vbox class="identity-popup-security-connection">
<hbox flex="1">
<description class="identity-popup-connection-not-secure"
when-connection="not-secure secure-cert-user-overridden secure-custom-root cert-error-page https-only-error-page" data-l10n-id="identity-connection-not-secure"></description>
@ -105,9 +104,9 @@
descriptionheightworkaround="true">
<vbox class="identity-popup-security-content">
<vbox class="identity-popup-security-connection">
<description class="identity-popup-connection-not-secure security-view"
<description class="identity-popup-connection-not-secure"
when-connection="not-secure secure-cert-user-overridden cert-error-page https-only-error-page" data-l10n-id="identity-connection-not-secure-security-view"></description>
<description class="identity-popup-connection-secure security-view"
<description class="identity-popup-connection-secure"
when-connection="secure secure-ev" data-l10n-id="identity-connection-verified"></description>
</vbox>
</vbox>

View File

@ -291,13 +291,6 @@ bookmark-panel =
## Identity Panel
# Variables
# $host (String): the hostname of the site that is being displayed.
identity-site-information = Site information for { $host }
# Variables
# $host (String): the hostname of the site that is being displayed.
identity-header-security-with-host =
.title = Connection security for { $host }
identity-connection-not-secure = Connection not secure
identity-connection-secure = Connection secure
identity-connection-internal = This is a secure { -brand-short-name } page.
@ -328,7 +321,7 @@ identity-permissions-storage-access-learn-more = Learn more
identity-permissions-reload-hint = You may need to reload the page for changes to apply.
identity-clear-site-data =
.label = Clear cookies and site data…
.label = Clear Cookies and Site Data…
identity-connection-not-secure-security-view = You are not securely connected to this site.
identity-connection-verified = You are securely connected to this site.
identity-ev-owner-label = Certificate issued to:

View File

@ -432,8 +432,10 @@ webauthn.anonymize=Anonymize anyway
# Spoof Accept-Language prompt
privacy.spoof_english=Changing your language setting to English will make you more difficult to identify and enhance your privacy. Do you want to request English language versions of web pages?
# LOCALIZATION NOTE (identity.identified.verifier, identity.identified.state_and_country, identity.ev.contentOwner2):
# LOCALIZATION NOTE (identity.headerMainWithHost, identity.headerSecurityWithHost):
# %S is the hostname of the site that is being displayed.
identity.headerMainWithHost=Site Information for %S
identity.headerSecurityWithHost=Connection Security for %S
identity.identified.verifier=Verified by: %S
identity.identified.verified_by_you=You have added a security exception for this site.
identity.identified.state_and_country=%S, %S

View File

@ -121,6 +121,14 @@
min-height: 30px;
}
.identity-popup-section {
border-top: 1px solid var(--panel-separator-color);
}
#identity-popup-securityView .identity-popup-security-content {
border-bottom: 1px solid var(--panel-separator-color);
}
.identity-popup-security-connection {
background-repeat: no-repeat;
background-position: 2em 50%;
@ -136,13 +144,16 @@
margin-block: 0;
}
.identity-popup-security-connection > hbox {
margin-inline-start: 16px;
.identity-popup-security-connection,
#identity-popup-security-description,
#identity-popup-security-httpsonlymode {
/* icon indent + 16px icon width + 6px description margin
(total of 12px margin with the native 6px description margin) */
padding-inline: calc(2em + 22px) 1em;
}
#identity-popup-security-description > description {
font-weight: 600;
margin-bottom: 1em;
margin-top: 0.5em;
}
#identity-popup-security-httpsonlymode > label {
@ -160,18 +171,24 @@
#identity-popup-security-httpsonlymode-menulist {
text-overflow: ellipsis;
overflow: hidden;
width: 11em;
}
#identity-popup-security-httpsonlymode-info {
font-size: 0.85em;
color: var(--panel-description-color);
margin-bottom: 12px
}
.identity-popup-connection-secure.upgraded {
margin-inline: 0;
}
#permission-popup-permissions-content {
padding-inline: 1.25em;
}
.identity-popup-security-content {
padding-block: 1em;
}
#protections-popup-content {
background-repeat: no-repeat;
background-position: 1em 1em;
@ -185,36 +202,6 @@
background-position: calc(100% - 1em) 1em;
}
@media not (-moz-proton-doorhangers) {
#identity-popup-securityView .identity-popup-security-content {
border-bottom: 1px solid var(--panel-separator-color);
}
.identity-popup-security-connection,
#identity-popup-security-description,
#identity-popup-security-httpsonlymode {
/* icon indent + 16px icon width + 6px description margin
(total of 12px margin with the native 6px description margin) */
padding-inline: calc(2em + 22px) 1em;
}
.identity-popup-security-connection > hbox {
margin-inline-start: 0;
}
#identity-popup-security-httpsonlymode-info {
margin-bottom: 0;
}
.identity-popup-connection-secure.upgraded {
margin-inline: 0;
}
#identity-popup-security-description > description {
margin-block: 0.5em 0.3em;
font-weight: 0;
}
/* EXPAND BUTTON */
.identity-popup-expander {
@ -249,10 +236,8 @@
background-color: var(--arrowpanel-dimmed-further);
box-shadow: 0 1px 0 hsla(210,4%,10%,.05) inset;
}
} /** END not PROTON **/
@media not (-moz-proton-doorhangers) {
.identity-popup-security-content,
#permission-popup-permissions-content {
padding-block: 1em;
}
@ -292,7 +277,10 @@
-moz-box-align: center;
}
#identity-popup-mainView-panel-header,
#identity-popup-mainView-panel-header {
padding: var(--vertical-section-padding) var(--horizontal-padding);
}
#permission-popup-mainView-panel-header {
padding: 4px 8px;
}
@ -339,36 +327,18 @@
max-width: calc(var(--popup-width) - 2 * var(--horizontal-padding));
}
#identity-popup-mainView-panel-header-span,
#permission-popup-mainView-panel-header-span {
margin-top: 4px;
}
@media not (-moz-proton-doorhangers) {
#permission-popup-mainView-panel-header,
#identity-popup-mainView-panel-header {
#permission-popup-mainView-panel-header {
padding: var(--vertical-section-padding) 2px;
}
#identity-popup-mainView-panel-header-span,
#permission-popup-mainView-panel-header-span {
margin-top: 0;
}
.identity-popup-warning-box {
padding: 0.5em;
}
.identity-popup-warning-gray {
background-color: var(--arrowpanel-dimmed);
border: 1px solid var(--panel-separator-color);
}
.identity-popup-warning-yellow {
color: black;
background-color: #FFEEBF;
border: 1px solid #FFE083;
}
} /** END not PROTON **/
#protections-popup[toast] #protections-popup-info-button {
@ -393,9 +363,23 @@
white-space: pre-wrap;
}
.identity-popup-warning-box {
padding: 0.5em;
}
.identity-popup-warning-gray {
background-color: var(--arrowpanel-dimmed);
border: 1px solid var(--panel-separator-color);
}
.identity-popup-warning-yellow {
color: black;
background-color: #FFEEBF;
border: 1px solid #FFE083;
}
/* SECURITY */
@media not (-moz-proton-doorhangers) {
.identity-popup-connection-secure {
color: #058B00;
}
@ -404,24 +388,10 @@
color: #30e60b;
}
#identity-popup[connection^=secure] .identity-popup-security-connection {
fill: #12BC00;
}
#identity-popup[connection=extension] .identity-popup-security-connection {
fill: #60bf4c;
}
#identity-popup[mixedcontent~=active-loaded] .identity-popup-connection-not-secure,
#identity-popup:not([mixedcontent]) .identity-popup-connection-not-secure {
color: #d74345;
}
} /** END not PROTON **/
#identity-popup[mixedcontent~=active-loaded] .identity-popup-connection-not-secure,
#identity-popup:not([mixedcontent]) .identity-popup-connection-not-secure {
color: var(--error-text-color, color-mix(in srgb, currentColor 40%, #C50042));
}
.identity-popup-security-connection {
background-image: url(chrome://global/skin/icons/security-broken.svg);
@ -440,6 +410,10 @@
-moz-context-properties: fill;
}
#identity-popup[connection^=secure] .identity-popup-security-connection {
fill: #12BC00;
}
#identity-popup[connection^=secure][lock-icon-gray] .identity-popup-security-connection {
-moz-context-properties: fill, fill-opacity;
fill: currentColor;
@ -467,83 +441,20 @@
#identity-popup[connection=extension] .identity-popup-security-connection {
background-image: url(chrome://mozapps/skin/extensions/extension.svg);
-moz-context-properties: fill;
fill: #60bf4c;
}
#identity-popup-securityView-body {
margin-inline: 10px;
padding-inline-end: 1em;
padding-top: 4px;
}
@media not (-moz-proton-doorhangers) {
#identity-popup-securityView-body {
/* icon indent + 16px icon width + 6px description margin
(total of 12px margin with the native 6px description margin) */
margin-inline: calc(2em + 22px) 1em;
padding-inline-end: 1em;
padding-top: 0.5em;
}
#identity-popup-more-info-footer {
margin-top: 1em;
}
} /** END not PROTON **/
@media (-moz-proton-doorhangers) {
#identity-popup-multiView {
height: -moz-fit-content;
}
.identity-popup-security-connection > hbox > description {
padding: 2px;
margin-inline-start: 8px;
margin-block: 0;
}
#identity-popup-security-button {
padding: 3px;
margin-bottom: 8px;
-moz-box-pack: start;
}
.identity-popup-security-connection {
padding: 2px;
background-position-x: 16px;
}
.identity-popup-security-connection:-moz-locale-dir(rtl) {
background-position-x: right 16px;
}
.identity-popup-security-connection.identity-button {
padding: 0;
width: 28em;
background-position-x: 4px;
}
.identity-popup-security-connection.identity-button:-moz-locale-dir(rtl) {
background-position-x: right 4px;
}
.identity-popup-connection-secure.security-view,
.identity-popup-connection-not-secure.security-view {
padding: 2px;
margin-inline-start: 36px;
}
#identity-popup-mainView-panel-header-span {
margin-top: 4px;
}
#identity-popup-clear-sitedata-footer {
margin-block: -4px 8px;
}
#identity-popup-security-httpsonlymode,
#identity-popup-security-ev-content-owner,
.identity-popup-warning-box {
padding-inline: 2.4em 3em;
}
}/** END Proton **/
#identity-popup-securityView-body > label:not(.plain),
#identity-popup-content-verifier ~ description {
@ -919,10 +830,6 @@ description#identity-popup-content-verifier,
.permission-popup-permission-item {
padding-inline-end: 8px;
}
#identity-popup-security {
margin-top: -6px;
}
} /** END not PROTON **/
.permission-popup-permission-label-subitem {

View File

@ -1581,7 +1581,6 @@ panelview .toolbarbutton-1,
color: var(--panel-shortcut-color);
}
#identity-popup-mainView .subviewbutton-nav::after,
.widget-overflow-list .subviewbutton-nav::after,
.PanelUI-subView .subviewbutton-nav::after {
-moz-context-properties: fill, fill-opacity;
@ -1591,17 +1590,11 @@ panelview .toolbarbutton-1,
display: -moz-box;
}
#identity-popup-mainView .subviewbutton-nav:-moz-locale-dir(rtl)::after,
.widget-overflow-list .subviewbutton-nav:-moz-locale-dir(rtl)::after,
.PanelUI-subView .subviewbutton-nav:-moz-locale-dir(rtl)::after {
scale: -1 1;
}
#identity-popup-security-button > .toolbarbutton-text {
text-align: start;
text-shadow: none;
}
@media not (-moz-proton) {
.widget-overflow-list .subviewbutton-nav::after,
.PanelUI-subView .subviewbutton-nav::after {
@ -1842,8 +1835,6 @@ menuitem.panel-subview-footer@menuStateActive@,
.PanelUI-subView toolbarseparator,
#permission-popup-mainView > toolbarseparator,
#protections-popup-mainView toolbarseparator,
#identity-popup-mainView > toolbarseparator,
#identity-popup-securityView > toolbarseparator,
.cui-widget-panelview menuseparator,
.cui-widget-panel toolbarseparator {
appearance: none;

View File

@ -1,45 +0,0 @@
# coding=utf8
# Any copyright is dedicated to the Public Domain.
# http://creativecommons.org/publicdomain/zero/1.0/
from __future__ import absolute_import
from fluent.migrate.helpers import transforms_from
import fluent.syntax.ast as FTL
from fluent.migrate import COPY, PLURALS, REPLACE, REPLACE_IN_TEXT
from fluent.migrate.helpers import COPY, VARIABLE_REFERENCE
def migrate(ctx):
"""Bug 1703012: fix control center and identity panel proton styling - part {index}"""
ctx.add_transforms(
"browser/browser/browser.ftl",
"browser/browser/browser.ftl",
[
FTL.Message(
id=FTL.Identifier("identity-site-information"),
value=REPLACE(
"browser/chrome/browser/browser.properties",
"identity.headerMainWithHost",
{
"%1$S": VARIABLE_REFERENCE("host"),
},
),
),
FTL.Message(
id=FTL.Identifier("identity-header-security-with-host"),
attributes=[
FTL.Attribute(
id=FTL.Identifier("title"),
value=REPLACE(
"browser/chrome/browser/browser.properties",
"identity.headerSecurityWithHost",
{
"%1$S": VARIABLE_REFERENCE("host"),
},
),
),
],
),
],
)

View File

@ -149,7 +149,6 @@
}
.panel-footer.panel-footer-menulike > button > .button-box {
padding: 0;
display: inline;
}