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

Unified Diff: third_party/WebKit/Source/core/dom/Document.cpp

Issue 2134653002: Add delay to didAssociateFormControlsTimer so it doesn't fire too frequently (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@2743
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
« no previous file with comments | « components/autofill/content/renderer/autofill_agent.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/dom/Document.cpp
diff --git a/third_party/WebKit/Source/core/dom/Document.cpp b/third_party/WebKit/Source/core/dom/Document.cpp
index c03124d569054580195c35ee4671b9ce86801429..f7cf824556ef3d486913c8007efe342ae8016a16 100644
--- a/third_party/WebKit/Source/core/dom/Document.cpp
+++ b/third_party/WebKit/Source/core/dom/Document.cpp
@@ -5724,8 +5724,9 @@ void Document::didAssociateFormControl(Element* element)
if (!frame() || !frame()->page())
return;
m_associatedFormControls.add(element);
+ // We add a slight delay because this could be called rapidly.
if (!m_didAssociateFormControlsTimer.isActive())
- m_didAssociateFormControlsTimer.startOneShot(0, BLINK_FROM_HERE);
+ m_didAssociateFormControlsTimer.startOneShot(0.3, BLINK_FROM_HERE);
}
void Document::removeFormAssociation(Element* element)
« no previous file with comments | « components/autofill/content/renderer/autofill_agent.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698