зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1687684 - Always hide the value of a field when previewing form fields. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D123972
This commit is contained in:
Родитель
cb89693561
Коммит
0585d91193
|
@ -0,0 +1,9 @@
|
||||||
|
<!doctype html>
|
||||||
|
<input type=text value="JOHN DOE">
|
||||||
|
<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>
|
|
@ -16,3 +16,4 @@ fuzzy-if(skiaContent,0-1,0-500) needs-focus == select.html select-ref.html
|
||||||
!= autofill.html autofill-blank.html
|
!= autofill.html autofill-blank.html
|
||||||
!= autofill-preview.html autofill-preview-blank.html
|
!= autofill-preview.html autofill-preview-blank.html
|
||||||
!= autofill.html autofill-preview.html
|
!= autofill.html autofill-preview.html
|
||||||
|
== autofill-prefilled-value.html autofill-preview.html
|
||||||
|
|
|
@ -161,7 +161,7 @@ textarea > scrollbar {
|
||||||
visibility: hidden;
|
visibility: hidden;
|
||||||
}
|
}
|
||||||
|
|
||||||
::-moz-text-control-editing-root,
|
:not(:-moz-autofill-preview)::-moz-text-control-editing-root,
|
||||||
:placeholder-shown:not(:autofill)::placeholder,
|
:placeholder-shown:not(:autofill)::placeholder,
|
||||||
:autofill::-moz-text-control-preview {
|
:autofill::-moz-text-control-preview {
|
||||||
visibility: inherit;
|
visibility: inherit;
|
||||||
|
|
Загрузка…
Ссылка в новой задаче