Commit ed5ff53b authored by Moe Ahmadi's avatar Moe Ahmadi Committed by Commit Bot

[AF] Autofill should fill non-focusable <select> elements

This fixes a problem on iOS where <select> elements with negative tabindex
values are not being filled. This is because on iOS they are considered
non-focusable and autofill manager does not autofill nonfocusable fields.

This doesn't change the behavior on other platforms since filling
non-focusable <select> elements is already allowed:
https://cs.chromium.org/chromium/src/components/autofill/content/renderer/form_autofill_util.cc?l=881

Bug: 820618
Change-Id: Ie01f2611362dcaadf4ec22c39f645cfe51652d04
Reviewed-on: https://chromium-review.googlesource.com/959106
Commit-Queue: Moe Ahmadi <mahmadi@chromium.org>
Commit-Queue: Sebastien Seguin-Gagnon <sebsg@chromium.org>
Reviewed-by: default avatarSebastien Seguin-Gagnon <sebsg@chromium.org>
Cr-Commit-Position: refs/heads/master@{#542503}
parent 063960e4
...@@ -1343,9 +1343,12 @@ void AutofillManager::FillOrPreviewDataModelForm( ...@@ -1343,9 +1343,12 @@ void AutofillManager::FillOrPreviewDataModelForm(
AutofillField* cached_field = form_structure->field(i); AutofillField* cached_field = form_structure->field(i);
FieldTypeGroup field_group_type = cached_field->Type().group(); FieldTypeGroup field_group_type = cached_field->Type().group();
// Don't fill hidden fields. // Don't fill non-focusable fields, with the exception of <select> fields.
if (!cached_field->is_focusable || if (!cached_field->is_focusable &&
cached_field->role == FormFieldData::ROLE_ATTRIBUTE_PRESENTATION) { result.fields[i].form_control_type != "select-one")
continue;
if (cached_field->role == FormFieldData::ROLE_ATTRIBUTE_PRESENTATION) {
continue; continue;
} }
......
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