From 0585d911932dcd0c17e58d1f54af229b16551fee Mon Sep 17 00:00:00 2001 From: Tim Giles Date: Thu, 2 Sep 2021 15:29:47 +0000 Subject: [PATCH] Bug 1687684 - Always hide the value of a field when previewing form fields. r=emilio Differential Revision: https://phabricator.services.mozilla.com/D123972 --- .../forms/input/text/autofill-prefilled-value.html | 9 +++++++++ layout/reftests/forms/input/text/reftest.list | 1 + layout/style/res/forms.css | 2 +- 3 files changed, 11 insertions(+), 1 deletion(-) create mode 100644 layout/reftests/forms/input/text/autofill-prefilled-value.html diff --git a/layout/reftests/forms/input/text/autofill-prefilled-value.html b/layout/reftests/forms/input/text/autofill-prefilled-value.html new file mode 100644 index 000000000000..42924ac53162 --- /dev/null +++ b/layout/reftests/forms/input/text/autofill-prefilled-value.html @@ -0,0 +1,9 @@ + + + diff --git a/layout/reftests/forms/input/text/reftest.list b/layout/reftests/forms/input/text/reftest.list index 7bc6b38ab9fc..5ffd7dc18e5b 100644 --- a/layout/reftests/forms/input/text/reftest.list +++ b/layout/reftests/forms/input/text/reftest.list @@ -16,3 +16,4 @@ fuzzy-if(skiaContent,0-1,0-500) needs-focus == select.html select-ref.html != autofill.html autofill-blank.html != autofill-preview.html autofill-preview-blank.html != autofill.html autofill-preview.html +== autofill-prefilled-value.html autofill-preview.html diff --git a/layout/style/res/forms.css b/layout/style/res/forms.css index 15ad28dfae9c..809b99221718 100644 --- a/layout/style/res/forms.css +++ b/layout/style/res/forms.css @@ -161,7 +161,7 @@ textarea > scrollbar { visibility: hidden; } -::-moz-text-control-editing-root, +:not(:-moz-autofill-preview)::-moz-text-control-editing-root, :placeholder-shown:not(:autofill)::placeholder, :autofill::-moz-text-control-preview { visibility: inherit;