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 44cee7f999683977b765b9e6ff070731fc4e4ee8..f65586a831bff594a2af191876595f7ebdb7d1f7 100644 |
| --- a/components/autofill/content/renderer/autofill_agent.cc |
| +++ b/components/autofill/content/renderer/autofill_agent.cc |
| @@ -815,20 +815,18 @@ bool AutofillAgent::IsUserGesture() const { |
| return WebUserGestureIndicator::isProcessingUserGesture(); |
| } |
| -void AutofillAgent::didAssociateFormControls(const WebVector<WebNode>& nodes) { |
| - for (size_t i = 0; i < nodes.size(); ++i) { |
| - WebLocalFrame* frame = nodes[i].document().frame(); |
| - // Only monitors dynamic forms created in the top frame. Dynamic forms |
| - // inserted in iframes are not captured yet. Frame is only processed |
| - // if it has finished loading, otherwise you can end up with a partially |
| - // parsed form. |
| - if (frame && !frame->isLoading()) { |
| - ProcessForms(); |
| - password_autofill_agent_->OnDynamicFormsSeen(); |
| - if (password_generation_agent_) |
| - password_generation_agent_->OnDynamicFormsSeen(); |
| - return; |
| - } |
| +void AutofillAgent::didAssociateFormControls() { |
| + blink::WebLocalFrame* frame = render_frame()->GetWebFrame(); |
| + |
| + // Only monitors dynamic forms created in the top frame. Dynamic forms |
|
vabr (Chromium)
2016/07/27 14:06:49
Have we now understood why the comment speaks abou
vasilii
2016/07/27 14:26:59
Looks false to me.
|
| + // inserted in iframes are not captured yet. Frame is only processed |
| + // if it has finished loading, otherwise you can end up with a partially |
| + // parsed form. |
| + if (frame && !frame->isLoading()) { |
| + ProcessForms(); |
| + password_autofill_agent_->OnDynamicFormsSeen(); |
| + if (password_generation_agent_) |
| + password_generation_agent_->OnDynamicFormsSeen(); |
| } |
| } |