Backed out changeset b9bd22d5a097 (bug 1758665) for causing reftest failures on autofill-preview-line-height.html. CLOSED TREE

This commit is contained in:
Marian-Vasile Laza 2022-04-19 11:49:23 -07:00
Родитель 0bc4d93a71
Коммит 85cadce30c
4 изменённых файлов: 42 добавлений и 59 удалений

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

@ -1,9 +0,0 @@
<!doctype html>
<style>
input { height: 4em; color: GrayText }
</style>
<input value="Autofill">
<script>
let input = SpecialPowers.wrap(document.querySelector("input"));
SpecialPowers.wrap(window).windowUtils.addManuallyManagedState(input, "autofill");
</script>

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

@ -1,12 +0,0 @@
<!doctype html>
<style>
input { height: 4em }
</style>
<input value="Autofill">
<script>
let input = SpecialPowers.wrap(document.querySelector("input"));
SpecialPowers.Cc["@mozilla.org/satchel/form-fill-controller;1"].getService(SpecialPowers.Ci.nsIFormFillController).markAsAutofillField(input);
input.getBoundingClientRect(); // previewValue setter depends on the reframe posted by markAsAutofillField() having being processed...
input.previewValue = "Autofill";
SpecialPowers.wrap(window).windowUtils.addManuallyManagedState(input, "-moz-autofill-preview");
</script>

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

@ -17,7 +17,6 @@ fuzzy(0-1,0-500) needs-focus == select.html select-ref.html
!= autofill-preview.html autofill-preview-blank.html
!= autofill.html autofill-preview.html
== autofill-prefilled-value.html autofill-preview.html
== autofill-preview-line-height.html autofill-line-height.html
== pseudo-class-lock.html pseudo-class-lock-ref.html

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

@ -102,6 +102,13 @@ input {
}
}
input::-moz-text-control-editing-root,
input::placeholder {
word-wrap: normal;
/* Make the line-height equal to the available height */
line-height: -moz-block-height !important;
}
textarea {
display: inline-block;
appearance: auto;
@ -154,6 +161,41 @@ textarea > scrollbar {
visibility: hidden;
}
::-moz-text-control-preview {
overflow: hidden;
font-family: system-ui;
}
:not(:-moz-autofill-preview)::-moz-text-control-editing-root,
:placeholder-shown:not(:autofill)::placeholder,
:autofill::-moz-text-control-preview {
visibility: inherit;
}
input::-moz-text-control-editing-root,
input::placeholder,
input::-moz-text-control-preview {
white-space: pre;
}
input[type=password]::-moz-text-control-editing-root,
input[type=password]::-moz-text-control-preview {
/*
* In password fields, any character should be put same direction. Otherwise,
* caret position at typing tells everybody whether the character is an RTL
* or an LTR character. Unfortunately, this makes odd rendering when bidi
* text is unmasked.
*/
unicode-bidi: bidi-override;
}
textarea::-moz-text-control-editing-root {
scroll-behavior: inherit;
overscroll-behavior: inherit;
/* StyleAdjuster makes sure that the overflow value ends up being scrollable */
overflow: inherit;
}
::placeholder,
::-moz-text-control-preview {
/*
@ -177,47 +219,10 @@ textarea > scrollbar {
user-select: none;
}
::-moz-text-control-preview {
font-family: system-ui;
}
::placeholder {
opacity: 0.54;
}
:not(:-moz-autofill-preview)::-moz-text-control-editing-root,
:placeholder-shown:not(:autofill)::placeholder,
:autofill::-moz-text-control-preview {
visibility: inherit;
}
input::placeholder,
input::-moz-text-control-editing-root,
input::-moz-text-control-preview {
word-wrap: normal;
white-space: pre;
/* Make the line-height equal to the available height */
line-height: -moz-block-height !important;
}
input[type=password]::-moz-text-control-editing-root,
input[type=password]::-moz-text-control-preview {
/*
* In password fields, any character should be put same direction. Otherwise,
* caret position at typing tells everybody whether the character is an RTL
* or an LTR character. Unfortunately, this makes odd rendering when bidi
* text is unmasked.
*/
unicode-bidi: bidi-override;
}
textarea::-moz-text-control-editing-root {
scroll-behavior: inherit;
overscroll-behavior: inherit;
/* StyleAdjuster makes sure that the overflow value ends up being scrollable */
overflow: inherit;
}
input:read-write,
textarea:read-write {
-moz-user-modify: read-write !important;