Commit 5c895ed2 authored by Boris Sazonov's avatar Boris Sazonov Committed by Commit Bot

[Android][TouchToFill] Use FindPasswordInfoForElement for triggering

Use for TouchToFill the same triggering logic that is used for regular
suggestions.

Bug: 1010233
Change-Id: I111d4eac4ce94dd94b86097b6b6c98e08875e11a
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1834230
Commit-Queue: Boris Sazonov <bsazonov@chromium.org>
Reviewed-by: default avatarVadym Doroshenko <dvadym@chromium.org>
Cr-Commit-Position: refs/heads/master@{#702058}
parent ecec4f7d
......@@ -768,8 +768,12 @@ bool PasswordAutofillAgent::IsUsernameOrPasswordField(
bool PasswordAutofillAgent::TryToShowTouchToFill(
const WebFormControlElement& control_element) {
const WebInputElement* element = ToWebInputElement(&control_element);
if (!element || (!base::Contains(web_input_to_password_info_, *element) &&
!base::Contains(password_to_username_, *element))) {
WebInputElement username_element;
WebInputElement password_element;
PasswordInfo* password_info = nullptr;
if (!element ||
!FindPasswordInfoForElement(*element, &username_element,
&password_element, &password_info)) {
return false;
}
if (was_touch_to_fill_ui_shown_)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment