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

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

Issue 2849653003: Password manager should autofill a dynamic form added and processed before the page was loaded. (Closed)
Patch Set: Created 3 years, 8 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 9be2064859a3b3894712e0353cfd675d14a0d865..31f24c75199792202293201a1675078d1f8d7809 100644
--- a/components/autofill/content/renderer/autofill_agent.cc
+++ b/components/autofill/content/renderer/autofill_agent.cc
@@ -737,16 +737,12 @@ bool AutofillAgent::IsUserGesture() const {
}
void AutofillAgent::DidAssociateFormControlsDynamically() {
- blink::WebLocalFrame* frame = render_frame()->GetWebFrame();
-
- // Frame is only processed if it has finished loading, otherwise you can end
vabr (Chromium) 2017/04/28 19:17:33 This comment comes from https://codereview.chromiu
vasilii 2017/04/28 21:26:23 The reply of gcasto@ is wrong today. DidAssociateF
- // up with a partially parsed form.
- if (frame && !frame->IsLoading()) {
- ProcessForms();
- password_autofill_agent_->OnDynamicFormsSeen();
- if (password_generation_agent_)
- password_generation_agent_->OnDynamicFormsSeen();
- }
+ // If the control flow is here than the document was at least loaded. The
+ // whole page doesn't have to be loaded.
+ ProcessForms();
+ password_autofill_agent_->OnDynamicFormsSeen();
+ if (password_generation_agent_)
+ password_generation_agent_->OnDynamicFormsSeen();
}
void AutofillAgent::DidCompleteFocusChangeInFrame() {

Powered by Google App Engine
This is Rietveld 408576698