From 19fc89710da40645c4c994bc5687074c3a9b60d9 Mon Sep 17 00:00:00 2001 From: Matthew Noorenberghe Date: Thu, 24 Oct 2019 12:45:24 +0000 Subject: [PATCH] Bug 1583957 - Indicate support for autocomplete=(username|new-password|current-password). r=farre Bug 917325 started using the `username` token. Bug 1119063 started using the `new-password` token. This patch also adds support for `current-password` since it's the counterpart to `new-password` and we plan to use it as a signal eventually so want to encourage its use. Differential Revision: https://phabricator.services.mozilla.com/D50351 --HG-- extra : moz-landing-system : lando --- dom/base/AutocompleteFieldList.h | 3 --- dom/html/test/forms/test_autocomplete.html | 5 +++-- dom/html/test/forms/test_autocompleteinfo.html | 9 +++++---- .../forms/the-form-element/form-autocomplete.html.ini | 9 --------- 4 files changed, 8 insertions(+), 18 deletions(-) diff --git a/dom/base/AutocompleteFieldList.h b/dom/base/AutocompleteFieldList.h index a308603bffc2..5cf2dd884835 100644 --- a/dom/base/AutocompleteFieldList.h +++ b/dom/base/AutocompleteFieldList.h @@ -61,9 +61,6 @@ AUTOCOMPLETE_UNSUPPORTED_FIELD_NAME(HONORIFIX_PREFIX, "honorifix-prefix") AUTOCOMPLETE_UNSUPPORTED_FIELD_NAME(HONORIFIX_SUFFIX, "honorifix-suffix") AUTOCOMPLETE_UNSUPPORTED_FIELD_NAME(NICKNAME, "nickname") AUTOCOMPLETE_UNSUPPORTED_FIELD_NAME(ORGANIZATION_TITLE, "organization-title") -AUTOCOMPLETE_UNSUPPORTED_FIELD_NAME(USERNAME, "username") -AUTOCOMPLETE_UNSUPPORTED_FIELD_NAME(NEW_PASSWORD, "new-password") -AUTOCOMPLETE_UNSUPPORTED_FIELD_NAME(CURRENT_PASSWORD, "current-password") AUTOCOMPLETE_UNSUPPORTED_FIELD_NAME(ADDRESS_LEVEL4, "address-level4") AUTOCOMPLETE_UNSUPPORTED_FIELD_NAME(CC_GIVEN_NAME, "cc-given-name") AUTOCOMPLETE_UNSUPPORTED_FIELD_NAME(CC_ADDITIONAL_NAME, "cc-additional-name") diff --git a/dom/html/test/forms/test_autocomplete.html b/dom/html/test/forms/test_autocomplete.html index c38c05ac6d22..cd23495fa313 100644 --- a/dom/html/test/forms/test_autocomplete.html +++ b/dom/html/test/forms/test_autocomplete.html @@ -24,10 +24,11 @@ var values = [ ["OFF", "off"], ["name", "name"], [" name ", "name"], - ["username", ""], - [" username ", ""], + ["username", "username"], + [" username ", "username"], ["cc-csc", ""], ["language", ""], + [" language ", ""], ["tel-extension", ""], ["foobar", ""], ["section-blue", ""], diff --git a/dom/html/test/forms/test_autocompleteinfo.html b/dom/html/test/forms/test_autocompleteinfo.html index e5115b091608..1ed867631e25 100644 --- a/dom/html/test/forms/test_autocompleteinfo.html +++ b/dom/html/test/forms/test_autocompleteinfo.html @@ -32,13 +32,14 @@ var values = [ ["off", {fieldName: "off", canAutomaticallyPersist: false}, "off" ], ["name", {fieldName: "name" }, "name"], [" name ", {fieldName: "name" }, "name"], - ["username", {fieldName: "username"}, ""], - [" username ", {fieldName: "username"}, ""], - ["current-password", {fieldName: "current-password", canAutomaticallyPersist: false}, ""], - ["new-password", {fieldName: "new-password", canAutomaticallyPersist: false}, ""], + ["username", {fieldName: "username"}, "username"], + [" username ", {fieldName: "username"}, "username"], + ["current-password", {fieldName: "current-password", canAutomaticallyPersist: false}, "current-password"], + ["new-password", {fieldName: "new-password", canAutomaticallyPersist: false}, "new-password"], ["cc-number", {fieldName: "cc-number", canAutomaticallyPersist: false}, "cc-number"], ["cc-csc", {fieldName: "cc-csc", canAutomaticallyPersist: false}, ""], ["language", {fieldName: "language"}, ""], + [" language ", {fieldName: "language"}, ""], ["tel-extension", {fieldName: "tel-extension"}, ""], ["foobar", {}, ""], ["section-blue", {}, ""], diff --git a/testing/web-platform/meta/html/semantics/forms/the-form-element/form-autocomplete.html.ini b/testing/web-platform/meta/html/semantics/forms/the-form-element/form-autocomplete.html.ini index f58e90638883..7c160e3e2f7b 100644 --- a/testing/web-platform/meta/html/semantics/forms/the-form-element/form-autocomplete.html.ini +++ b/testing/web-platform/meta/html/semantics/forms/the-form-element/form-autocomplete.html.ini @@ -58,15 +58,6 @@ [impp is an allowed autocomplete field name] expected: FAIL - [username is an allowed autocomplete field name] - expected: FAIL - - [new-password is an allowed autocomplete field name] - expected: FAIL - - [current-password is an allowed autocomplete field name] - expected: FAIL - [address-level4 is an allowed autocomplete field name] expected: FAIL