Chromium Code Reviews| Index: components/autofill/content/renderer/autofill_agent.cc |
| diff --git a/components/autofill/content/renderer/autofill_agent.cc b/components/autofill/content/renderer/autofill_agent.cc |
| index 15115d1526449a8ba16921542433cd6a35e3f3b0..6495d11f1c4f88062256f1d34aeb5182237bd44a 100644 |
| --- a/components/autofill/content/renderer/autofill_agent.cc |
| +++ b/components/autofill/content/renderer/autofill_agent.cc |
| @@ -208,7 +208,7 @@ void AutofillAgent::DidCommitProvisionalLoad(WebFrame* frame, |
| } |
| void AutofillAgent::FrameDetached(WebFrame* frame) { |
| - form_cache_.ResetFrame(*frame); |
| + form_cache_.ResetFrame(*frame); |
| } |
| void AutofillAgent::WillSubmitForm(WebFrame* frame, |
| @@ -607,9 +607,16 @@ void AutofillAgent::HideAutofillUI() { |
| Send(new AutofillHostMsg_HideAutofillUI(routing_id())); |
| } |
| -// TODO(isherman): Decide if we want to support autofill with AJAX. |
|
Ilya Sherman
2013/09/14 02:18:07
Please keep this TODO, though feel free to tweak i
guohui
2013/09/16 19:51:42
Done.
|
| void AutofillAgent::didAssociateFormControls( |
| const WebKit::WebVector<WebKit::WebNode>& nodes) { |
| + for (size_t i = 0; i < nodes.size(); ++i) { |
| + WebKit::WebFrame* frame = nodes[i].document().frame(); |
| + // Only monitors dynamic forms created in the top frame. |
|
Ilya Sherman
2013/09/14 02:18:07
nit: Would be nice to document *why* that's import
guohui
2013/09/16 19:51:42
Done.
|
| + if (!frame->parent()) { |
| + password_autofill_agent_->OnDynamicFormsSeen(frame); |
| + return; |
| + } |
| + } |
| } |
| } // namespace autofill |