Backed out 3 changesets (bug 1867610) for causing failures in browser_preselect_login.js CLOSED TREE

Backed out changeset dd33c57ca97f (bug 1867610)
Backed out changeset aa398a358f64 (bug 1867610)
Backed out changeset 1713818dc3e4 (bug 1867610)
This commit is contained in:
Noemi Erli 2023-12-09 16:13:01 +02:00
Родитель 86d050de4e
Коммит 18ecd81c3f
3 изменённых файлов: 268 добавлений и 288 удалений

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

@ -2,46 +2,43 @@
* 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/. */
#PopupAutoComplete {
&[resultstyles~="autofill-profile"] {
min-width: 150px !important;
}
#PopupAutoComplete > richlistbox > richlistitem[originaltype="autofill-profile"],
#PopupAutoComplete > richlistbox > richlistitem[originaltype="autofill-footer"],
#PopupAutoComplete > richlistbox > richlistitem[originaltype="autofill-insecureWarning"],
#PopupAutoComplete > richlistbox > richlistitem[originaltype="autofill-clear-button"] {
display: block;
margin: 0;
padding: 0;
height: auto;
min-height: auto;
}
&[resultstyles~="autofill-insecureWarning"] {
min-width: 200px !important;
}
/* Treat @collpased="true" as display: none similar to how it is for XUL elements.
* https://developer.mozilla.org/en-US/docs/Web/CSS/visibility#Values */
#PopupAutoComplete > richlistbox > richlistitem[originaltype="autofill-profile"][collapsed="true"],
#PopupAutoComplete > richlistbox > richlistitem[originaltype="autofill-footer"][collapsed="true"],
#PopupAutoComplete > richlistbox > richlistitem[originaltype="autofill-insecureWarning"][collapsed="true"],
#PopupAutoComplete > richlistbox > richlistitem[originaltype="autofill-clear-button"][collapsed="true"] {
display: none;
}
> richlistbox > richlistitem {
&[originaltype="autofill-profile"],
&[originaltype="autofill-footer"],
&[originaltype="autofill-insecureWarning"],
&[originaltype="autofill-clear-button"] {
display: block;
margin: 0;
padding: 0;
height: auto;
min-height: auto;
#PopupAutoComplete[resultstyles~="autofill-profile"] {
min-width: 150px !important;
}
/* Treat @collpased="true" as display: none similar to how it is for XUL elements.
* https://developer.mozilla.org/en-US/docs/Web/CSS/visibility#Values */
&[collapsed="true"] {
display: none;
}
}
#PopupAutoComplete[resultstyles~="autofill-insecureWarning"] {
min-width: 200px !important;
}
&[disabled="true"] {
opacity: 0.5;
}
}
#PopupAutoComplete > richlistbox > richlistitem[disabled="true"] {
opacity: 0.5;
}
/* Form Autofill Doorhanger */
#autofill-address-notification popupnotificationcontent > .desc-message-box,
#autofill-credit-card-notification popupnotificationcontent > .desc-message-box {
margin-block-end: 12px;
}
#autofill-credit-card-notification popupnotificationcontent > .desc-message-box > image {
-moz-context-properties: fill;
fill: currentColor;
@ -49,7 +46,6 @@
height: auto;
list-style-image: url(chrome://formautofill/content/icon-credit-card-generic.svg);
}
#autofill-address-notification popupnotificationcontent > .desc-message-box > description,
#autofill-address-notification popupnotificationcontent > .desc-message-box > additional-description,
#autofill-credit-card-notification popupnotificationcontent > .desc-message-box > description {

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

@ -19,16 +19,16 @@ fieldset {
margin: 0 4px;
padding: 0;
border: none;
}
> legend {
box-sizing: border-box;
width: 100%;
padding: 0.4em 0.7em;
background-color: var(--in-content-box-background);
border: 1px solid var(--in-content-box-border-color);
border-radius: 2px 2px 0 0;
user-select: none;
}
fieldset > legend {
box-sizing: border-box;
width: 100%;
padding: 0.4em 0.7em;
background-color: var(--in-content-box-background);
border: 1px solid var(--in-content-box-border-color);
border-radius: 2px 2px 0 0;
user-select: none;
}
option:nth-child(even) {
@ -43,13 +43,14 @@ option:nth-child(even) {
padding-inline: 0;
border-top: none;
border-radius: 0 0 2px 2px;
}
> option {
display: flex;
align-items: center;
height: 1.6em;
padding-inline-start: 0.6em;
}
#addresses > option,
#credit-cards > option {
display: flex;
align-items: center;
height: 1.6em;
padding-inline-start: 0.6em;
}
#controls-container {
@ -60,71 +61,65 @@ option:nth-child(even) {
margin-inline-end: auto;
}
#credit-cards {
> option::before {
content: "";
background: url("icon-credit-card-generic.svg") no-repeat;
background-size: contain;
float: inline-start;
width: 16px;
height: 16px;
padding-inline-end: 10px;
-moz-context-properties: fill;
fill: currentColor;
#credit-cards > option::before {
content: "";
background: url("icon-credit-card-generic.svg") no-repeat;
background-size: contain;
float: inline-start;
width: 16px;
height: 16px;
padding-inline-end: 10px;
-moz-context-properties: fill;
fill: currentColor;
}
/*
We use .png / @2x.png images where we don't yet have a vector version of a logo
*/
#credit-cards.branded > option[cc-type="amex"]::before {
background-image: url("third-party/cc-logo-amex.png");
}
#credit-cards.branded > option[cc-type="cartebancaire"]::before {
background-image: url("third-party/cc-logo-cartebancaire.png");
}
#credit-cards.branded > option[cc-type="diners"]::before {
background-image: url("third-party/cc-logo-diners.svg");
}
#credit-cards.branded > option[cc-type="discover"]::before {
background-image: url("third-party/cc-logo-discover.png");
}
#credit-cards.branded > option[cc-type="jcb"]::before {
background-image: url("third-party/cc-logo-jcb.svg");
}
#credit-cards.branded > option[cc-type="mastercard"]::before {
background-image: url("third-party/cc-logo-mastercard.svg");
}
#credit-cards.branded > option[cc-type="mir"]::before {
background-image: url("third-party/cc-logo-mir.svg");
}
#credit-cards.branded > option[cc-type="unionpay"]::before {
background-image: url("third-party/cc-logo-unionpay.svg");
}
#credit-cards.branded > option[cc-type="visa"]::before {
background-image: url("third-party/cc-logo-visa.svg");
}
@media (min-resolution: 1.1dppx) {
#credit-cards.branded > option[cc-type="amex"]::before {
background-image: url("third-party/cc-logo-amex@2x.png");
}
/*
We use .png / @2x.png images where we don't yet have a vector version of a logo
*/
&.branded > option {
&[cc-type="amex"]::before {
background-image: url("third-party/cc-logo-amex.png");
}
&[cc-type="cartebancaire"]::before {
background-image: url("third-party/cc-logo-cartebancaire.png");
}
&[cc-type="diners"]::before {
background-image: url("third-party/cc-logo-diners.svg");
}
&[cc-type="discover"]::before {
background-image: url("third-party/cc-logo-discover.png");
}
&[cc-type="jcb"]::before {
background-image: url("third-party/cc-logo-jcb.svg");
}
&[cc-type="mastercard"]::before {
background-image: url("third-party/cc-logo-mastercard.svg");
}
&[cc-type="mir"]::before {
background-image: url("third-party/cc-logo-mir.svg");
}
&[cc-type="unionpay"]::before {
background-image: url("third-party/cc-logo-unionpay.svg");
}
&[cc-type="visa"]::before {
background-image: url("third-party/cc-logo-visa.svg");
}
@media (min-resolution: 1.1dppx) {
&[cc-type="amex"]::before {
background-image: url("third-party/cc-logo-amex@2x.png");
}
&[cc-type="cartebancaire"]::before {
background-image: url("third-party/cc-logo-cartebancaire@2x.png");
}
&[cc-type="discover"]::before {
background-image: url("third-party/cc-logo-discover@2x.png");
}
}
#credit-cards.branded > option[cc-type="cartebancaire"]::before {
background-image: url("third-party/cc-logo-cartebancaire@2x.png");
}
#credit-cards.branded > option[cc-type="discover"]::before {
background-image: url("third-party/cc-logo-discover@2x.png");
}
}

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

@ -6,196 +6,185 @@
/* General popup rules */
#PopupAutoComplete > richlistbox {
padding: 0;
}
#PopupAutoComplete > richlistbox > richlistitem {
min-height: 20px;
border: 0;
border-radius: 0;
padding: 0 1px;
}
> .ac-site-icon {
margin-inline: 4px 0;
}
#PopupAutoComplete > richlistbox > richlistitem > .ac-site-icon {
margin-inline: 4px 0;
}
> .ac-login-item {
display: flex;
justify-content: center;
align-items: center;
width: 100%;
#PopupAutoComplete > richlistbox > richlistitem > .ac-login-item {
display: flex;
justify-content: center;
align-items: center;
width: 100%;
}
> .ac-settings-button {
visibility: hidden;
height: 16px;
width: 16px;
border: 0;
color: inherit;
-moz-context-properties: fill;
fill: currentColor;
margin-inline: 8px;
cursor: pointer;
background: url("chrome://global/skin/icons/settings.svg") center no-repeat;
}
}
#PopupAutoComplete > richlistbox > richlistitem > .ac-title {
font: icon;
margin-inline-start: 4px;
}
&:is(:hover, [selected]) > .ac-login-item > .ac-settings-button {
visibility: visible;
}
#PopupAutoComplete > richlistbox > richlistitem[originaltype="importableLearnMore"] {
padding-bottom: 2px;
padding-inline-start: 21px;
}
> .ac-title {
font: icon;
margin-inline-start: 4px;
}
&[originaltype="importableLearnMore"] {
padding-bottom: 2px;
padding-inline-start: 21px;
}
&[originaltype="login"] > .ac-site-icon,
&[originaltype="possible-username"] > .ac-site-icon,
> .two-line-wrapper > .ac-site-icon {
display: block;
margin-inline: 4px;
}
&[originaltype="possible-username"] > .ac-site-icon {
visibility: hidden;
}
/* Autocomplete richlistitem support for a two-line label display */
> .two-line-wrapper {
box-sizing: border-box;
display: flex;
flex-direction: row;
gap: 8px;
margin: 0;
min-width: 0;
> .labels-wrapper {
/* The text should flex while the icon should not */
flex: 1;
/* min-width is needed to get the text-overflow: ellipsis to work for the children */
min-width: 0;
> .label-row {
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.line2-label {
padding-top: 2px !important;
opacity: .6;
}
}
}
&[originaltype="generatedPassword"] > .two-line-wrapper > .labels-wrapper > .generated-password-autosave,
&[originaltype="importableLearnMore"] > .ac-title,
> .two-line-wrapper > .labels-wrapper > .line2-label {
padding-top: 2px !important;
opacity: .6;
}
/* Login form autocompletion (with and without origin showing) and generated passwords */
&[originaltype="generatedPassword"] > .two-line-wrapper > .ac-site-icon,
&[originaltype="loginWithOrigin"] > .two-line-wrapper > .ac-site-icon,
&[originaltype="login"] > .ac-site-icon {
fill: GrayText;
}
&[originaltype="importableLogins"] > .two-line-wrapper > .ac-site-icon {
fill: GrayText;
list-style-image: url(chrome://browser/skin/import.svg);
}
&[originaltype="generatedPassword"][selected] > .two-line-wrapper > .ac-site-icon,
&[originaltype="importableLogins"][selected] > .two-line-wrapper > .ac-site-icon,
&[originaltype="loginWithOrigin"][selected] > .two-line-wrapper > .ac-site-icon,
&[originaltype="login"] > .ac-site-icon[selected] {
fill: SelectedItemText;
}
/* Login form autocompletion */
> .two-line-wrapper {
padding: 4px;
padding-inline-start: 0;
}
&[originaltype="generatedPassword"] {
&:not([collapsed="true"]) {
/* Workaround bug 451997 and/or bug 492645 */
display: block;
}
> .two-line-wrapper > .labels-wrapper {
&.line2-label > span {
/* The font-family is only adjusted on the inner span so that the
line-height of .line2-label matches that of .line1-label */
font-family: monospace;
}
> .generated-password-autosave > span {
/* The font-* properties are only adjusted on the inner span so that the
line-height of .generated-password-autosave matches that of .line1-label */
font-style: italic;
font-size: 0.85em;
white-space: normal;
}
}
}
&[originaltype="login"] + richlistitem[originaltype="generatedPassword"],
&[originaltype="loginWithOrigin"] + richlistitem[originaltype="generatedPassword"] {
/* Separator between logins and generated passwords. This uses --panel-separator-color from default
* themes since autocomplete doesn't yet switch to dark. */
border-top: 1px solid hsla(210,4%,10%,.14);
}
/* Insecure field warning */
&[originaltype="insecureWarning"] {
background-color: var(--arrowpanel-dimmed);
border-bottom: 1px solid var(--panel-separator-color);
padding-block: 4px;
&[selected] {
background-color: var(--arrowpanel-dimmed-further);
color: -moz-DialogText;
}
> .ac-title {
color: var(--grey-60);
font-size: 1em;
}
> .ac-title .ac-emphasize-text-title {
font-weight: 600;
}
&[selected] > .ac-title {
color: inherit;
}
> .ac-site-icon {
list-style-image: url(chrome://global/skin/icons/security-broken.svg);
-moz-context-properties: fill;
fill: var(--grey-60);
}
}
#PopupAutoComplete > richlistbox {
padding: 0;
}
/* Popup states */
.autocomplete-richlistitem {
&:hover {
background-color: var(--arrowpanel-dimmed);
}
&[selected] {
background-color: SelectedItem;
color: SelectedItemText;
}
.autocomplete-richlistitem:hover {
background-color: var(--arrowpanel-dimmed);
}
.autocomplete-richlistitem[selected] {
background-color: SelectedItem;
color: SelectedItemText;
}
/* Autocomplete richlistitem support for a two-line label display */
#PopupAutoComplete > richlistbox > richlistitem > .two-line-wrapper {
box-sizing: border-box;
display: flex;
flex-direction: row;
gap: 8px;
margin: 0;
min-width: 0;
}
#PopupAutoComplete > richlistbox > richlistitem > .two-line-wrapper > .ac-secondary-action {
height: 16px;
width: 16px;
border: 0;
color: inherit;
-moz-context-properties: fill;
fill: currentColor;
margin-inline: 8px;
cursor: pointer;
background: url("chrome://global/skin/icons/settings.svg") center no-repeat;
}
#PopupAutoComplete > richlistbox > richlistitem:not(:hover, [selected]) > .two-line-wrapper > .ac-secondary-action {
visibility: collapse;
}
#PopupAutoComplete > richlistbox > richlistitem[originaltype="login"] > .ac-site-icon,
#PopupAutoComplete > richlistbox > richlistitem[originaltype="possible-username"] > .ac-site-icon,
#PopupAutoComplete > richlistbox > richlistitem > .two-line-wrapper > .ac-site-icon {
display: block;
margin-inline: 4px;
}
#PopupAutoComplete > richlistbox > richlistitem[originaltype="possible-username"] > .ac-site-icon {
visibility: hidden;
}
#PopupAutoComplete > richlistbox > richlistitem > .two-line-wrapper > .labels-wrapper {
/* The text should flex while the icon should not */
flex: 1;
/* min-width is needed to get the text-overflow: ellipsis to work for the children */
min-width: 0;
}
#PopupAutoComplete > richlistbox > richlistitem > .two-line-wrapper > .labels-wrapper > .label-row {
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
#PopupAutoComplete > richlistbox > richlistitem[originaltype="generatedPassword"] > .two-line-wrapper > .labels-wrapper > .generated-password-autosave,
#PopupAutoComplete > richlistbox > richlistitem[originaltype="importableLearnMore"] > .ac-title,
#PopupAutoComplete > richlistbox > richlistitem > .two-line-wrapper > .labels-wrapper > .line2-label {
padding-top: 2px !important;
opacity: .6;
}
/* Login form autocompletion (with and without origin showing) and generated passwords */
#PopupAutoComplete > richlistbox > richlistitem[originaltype="generatedPassword"] > .two-line-wrapper > .ac-site-icon,
#PopupAutoComplete > richlistbox > richlistitem[originaltype="loginWithOrigin"] > .two-line-wrapper > .ac-site-icon,
#PopupAutoComplete > richlistbox > richlistitem[originaltype="login"] > .ac-site-icon {
fill: GrayText;
}
#PopupAutoComplete > richlistbox > richlistitem[originaltype="importableLogins"] > .two-line-wrapper > .ac-site-icon {
fill: GrayText;
list-style-image: url(chrome://browser/skin/import.svg);
}
#PopupAutoComplete > richlistbox > richlistitem[originaltype="generatedPassword"][selected] > .two-line-wrapper > .ac-site-icon,
#PopupAutoComplete > richlistbox > richlistitem[originaltype="importableLogins"][selected] > .two-line-wrapper > .ac-site-icon,
#PopupAutoComplete > richlistbox > richlistitem[originaltype="loginWithOrigin"][selected] > .two-line-wrapper > .ac-site-icon,
#PopupAutoComplete > richlistbox > richlistitem[originaltype="login"] > .ac-site-icon[selected] {
fill: SelectedItemText;
}
/* Login form autocompletion */
#PopupAutoComplete > richlistbox > richlistitem > .two-line-wrapper {
padding: 4px;
padding-inline-start: 0;
}
#PopupAutoComplete > richlistbox > richlistitem[originaltype="generatedPassword"]:not([collapsed="true"]) {
/* Workaround bug 451997 and/or bug 492645 */
display: block;
}
#PopupAutoComplete > richlistbox > richlistitem[originaltype="generatedPassword"] > .two-line-wrapper > .labels-wrapper > .line2-label > span {
/* The font-family is only adjusted on the inner span so that the
line-height of .line2-label matches that of .line1-label */
font-family: monospace;
}
#PopupAutoComplete > richlistbox > richlistitem[originaltype="generatedPassword"] > .two-line-wrapper > .labels-wrapper > .generated-password-autosave > span {
/* The font-* properties are only adjusted on the inner span so that the
line-height of .generated-password-autosave matches that of .line1-label */
font-style: italic;
font-size: 0.85em;
white-space: normal;
}
#PopupAutoComplete > richlistbox > richlistitem[originaltype="login"] + richlistitem[originaltype="generatedPassword"],
#PopupAutoComplete > richlistbox > richlistitem[originaltype="loginWithOrigin"] + richlistitem[originaltype="generatedPassword"] {
/* Separator between logins and generated passwords. This uses --panel-separator-color from default
* themes since autocomplete doesn't yet switch to dark. */
border-top: 1px solid hsla(210,4%,10%,.14);
}
/* Insecure field warning */
#PopupAutoComplete > richlistbox > richlistitem[originaltype="insecureWarning"] {
background-color: var(--arrowpanel-dimmed);
border-bottom: 1px solid var(--panel-separator-color);
padding-block: 4px;
}
#PopupAutoComplete > richlistbox > richlistitem[originaltype="insecureWarning"][selected] {
background-color: var(--arrowpanel-dimmed-further);
color: -moz-DialogText;
}
#PopupAutoComplete > richlistbox > richlistitem[originaltype="insecureWarning"] > .ac-title {
color: var(--grey-60);
font-size: 1em;
}
#PopupAutoComplete > richlistbox > richlistitem[originaltype="insecureWarning"] > .ac-title .ac-emphasize-text-title {
font-weight: 600;
}
#PopupAutoComplete > richlistbox > richlistitem[originaltype="insecureWarning"][selected] > .ac-title {
color: inherit;
}
#PopupAutoComplete > richlistbox > richlistitem[originaltype="insecureWarning"] > .ac-site-icon {
list-style-image: url(chrome://global/skin/icons/security-broken.svg);
-moz-context-properties: fill;
fill: var(--grey-60);
}