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

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

Issue 2055693002: Add delay to didAssociateFormControlsTimer so it doesn't fire too frequently (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fixed tests Created 4 years, 6 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: 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 0e123a4bd445c26378da5f43e2689b6c21d2a9c0..df00b2e66e628c19783abc41643d0362b70657a8 100644
--- a/third_party/WebKit/Source/core/dom/Document.cpp
+++ b/third_party/WebKit/Source/core/dom/Document.cpp
@@ -5711,8 +5711,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)

Powered by Google App Engine
This is Rietveld 408576698