| Index: chrome/renderer/autofill/autofill_agent.cc
|
| diff --git a/chrome/renderer/autofill/autofill_agent.cc b/chrome/renderer/autofill/autofill_agent.cc
|
| index 9335f3c4f63632f9b94996efe1015680c75ee862..456af20c841876ec4869464ccfae5f0ffa0321c7 100644
|
| --- a/chrome/renderer/autofill/autofill_agent.cc
|
| +++ b/chrome/renderer/autofill/autofill_agent.cc
|
| @@ -222,7 +222,7 @@ void AutofillAgent::TextFieldDidChangeImpl(const WebInputElement& element) {
|
|
|
| webkit_glue::FormData form;
|
| webkit_glue::FormField field;
|
| - if (FindFormAndFieldForNode(element, &form, &field)) {
|
| + if (FindFormAndFieldForInputElement(element, &form, &field, REQUIRE_NONE)) {
|
| Send(new AutofillHostMsg_TextFieldDidChange(routing_id(), form, field,
|
| base::TimeTicks::Now()));
|
| }
|
| @@ -399,7 +399,8 @@ void AutofillAgent::QueryAutofillSuggestions(const WebInputElement& element,
|
|
|
| webkit_glue::FormData form;
|
| webkit_glue::FormField field;
|
| - if (!FindFormAndFieldForNode(element, &form, &field)) {
|
| + if (!FindFormAndFieldForInputElement(element, &form, &field,
|
| + REQUIRE_AUTOCOMPLETE)) {
|
| // If we didn't find the cached form, at least let autocomplete have a shot
|
| // at providing suggestions.
|
| WebFormControlElementToFormField(element, EXTRACT_VALUE, &field);
|
| @@ -417,8 +418,10 @@ void AutofillAgent::FillAutofillFormData(const WebNode& node,
|
|
|
| webkit_glue::FormData form;
|
| webkit_glue::FormField field;
|
| - if (!FindFormAndFieldForNode(node, &form, &field))
|
| + if (!FindFormAndFieldForInputElement(node.toConst<WebInputElement>(), &form,
|
| + &field, REQUIRE_AUTOCOMPLETE)) {
|
| return;
|
| + }
|
|
|
| autofill_action_ = action;
|
| was_query_node_autofilled_ = field.is_autofilled;
|
| @@ -426,11 +429,4 @@ void AutofillAgent::FillAutofillFormData(const WebNode& node,
|
| routing_id(), autofill_query_id_, form, field, unique_id));
|
| }
|
|
|
| -bool AutofillAgent::FindFormAndFieldForNode(const WebNode& node,
|
| - webkit_glue::FormData* form,
|
| - webkit_glue::FormField* field) {
|
| - const WebInputElement& element = node.toConst<WebInputElement>();
|
| - return FindFormAndFieldForFormControlElement(element, form, field);
|
| -}
|
| -
|
| } // namespace autofill
|
|
|