[Autofill] Hide suggestion only if form isn't autofilled
Before this patch: "Hide suggestions" entry was always added when there are non-empty suggestions. When the user selects a suggestion, a new entry is added to "Clear form". And there is always an entry to "Manage addresses...". As a result, when the user select an entry, there are 3 extra entries added. After this patch: "Hide suggestions" is only shown if the user didn't interact with the suggestions. If the user selects one suggestion, this indicates the suggestions are actually useful. If the user clears the form, they will be presented with "Hide suggestions" again. i.e. the "Hide suggestions" and "Clear form" are alternating but they never appear together in the suggestions list. As a result, we at most have 2 extra entries added. Bug: 1030649 Change-Id: Icf4e81f141db8018fbbf7029dec0472d70db9153 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2083172Reviewed-by:Dominic Battré <battre@chromium.org> Commit-Queue: Mohamed Amir Yosef <mamir@chromium.org> Cr-Commit-Position: refs/heads/master@{#745933}
Showing
Please register or sign in to comment