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

Side by Side 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, 4 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 unified diff | Download patch
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "components/autofill/content/renderer/autofill_agent.h" 5 #include "components/autofill/content/renderer/autofill_agent.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <tuple> 9 #include <tuple>
10 10
(...skipping 797 matching lines...) Expand 10 before | Expand all | Expand 10 after
808 return; 808 return;
809 is_popup_possibly_visible_ = false; 809 is_popup_possibly_visible_ = false;
810 is_generation_popup_possibly_visible_ = false; 810 is_generation_popup_possibly_visible_ = false;
811 Send(new AutofillHostMsg_HidePopup(routing_id())); 811 Send(new AutofillHostMsg_HidePopup(routing_id()));
812 } 812 }
813 813
814 bool AutofillAgent::IsUserGesture() const { 814 bool AutofillAgent::IsUserGesture() const {
815 return WebUserGestureIndicator::isProcessingUserGesture(); 815 return WebUserGestureIndicator::isProcessingUserGesture();
816 } 816 }
817 817
818 void AutofillAgent::didAssociateFormControls(const WebVector<WebNode>& nodes) { 818 void AutofillAgent::didAssociateFormControls() {
819 for (size_t i = 0; i < nodes.size(); ++i) { 819 blink::WebLocalFrame* frame = render_frame()->GetWebFrame();
820 WebLocalFrame* frame = nodes[i].document().frame(); 820
821 // Only monitors dynamic forms created in the top frame. Dynamic forms 821 // 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.
822 // inserted in iframes are not captured yet. Frame is only processed 822 // inserted in iframes are not captured yet. Frame is only processed
823 // if it has finished loading, otherwise you can end up with a partially 823 // if it has finished loading, otherwise you can end up with a partially
824 // parsed form. 824 // parsed form.
825 if (frame && !frame->isLoading()) { 825 if (frame && !frame->isLoading()) {
826 ProcessForms(); 826 ProcessForms();
827 password_autofill_agent_->OnDynamicFormsSeen(); 827 password_autofill_agent_->OnDynamicFormsSeen();
828 if (password_generation_agent_) 828 if (password_generation_agent_)
829 password_generation_agent_->OnDynamicFormsSeen(); 829 password_generation_agent_->OnDynamicFormsSeen();
830 return;
831 }
832 } 830 }
833 } 831 }
834 832
835 void AutofillAgent::ajaxSucceeded() { 833 void AutofillAgent::ajaxSucceeded() {
836 OnSamePageNavigationCompleted(); 834 OnSamePageNavigationCompleted();
837 password_autofill_agent_->AJAXSucceeded(); 835 password_autofill_agent_->AJAXSucceeded();
838 } 836 }
839 837
840 void AutofillAgent::ConnectToMojoAutofillDriverIfNeeded() { 838 void AutofillAgent::ConnectToMojoAutofillDriverIfNeeded() {
841 if (mojo_autofill_driver_.is_bound() && 839 if (mojo_autofill_driver_.is_bound() &&
(...skipping 21 matching lines...) Expand all
863 void AutofillAgent::LegacyAutofillAgent::OnDestruct() { 861 void AutofillAgent::LegacyAutofillAgent::OnDestruct() {
864 // No-op. Don't delete |this|. 862 // No-op. Don't delete |this|.
865 } 863 }
866 864
867 void AutofillAgent::LegacyAutofillAgent::FocusChangeComplete() { 865 void AutofillAgent::LegacyAutofillAgent::FocusChangeComplete() {
868 if (agent_) 866 if (agent_)
869 agent_->FocusChangeComplete(); 867 agent_->FocusChangeComplete();
870 } 868 }
871 869
872 } // namespace autofill 870 } // namespace autofill
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698