Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(910)

Unified Diff: components/autofill/content/renderer/autofill_agent.cc

Issue 2189513004: Blink: prevent didAssociateFormControls notification while parsing the document. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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();
}
}

Powered by Google App Engine
This is Rietveld 408576698