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

Unified Diff: Source/core/html/HTMLInputElement.cpp

Issue 215903003: Autofill/rAc: dispatch "input" events when changing text contents of <textarea>, (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: protecting protectors everywhere Created 6 years, 9 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 | « no previous file | Source/core/html/HTMLSelectElement.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/html/HTMLInputElement.cpp
diff --git a/Source/core/html/HTMLInputElement.cpp b/Source/core/html/HTMLInputElement.cpp
index 53526f27867af0be1eb798fe217be25a152efd8b..7bed5290c843e2411ad55ffd4eee05d830a67963 100644
--- a/Source/core/html/HTMLInputElement.cpp
+++ b/Source/core/html/HTMLInputElement.cpp
@@ -857,6 +857,7 @@ void HTMLInputElement::setChecked(bool nowChecked, TextFieldEventBehavior eventB
if (checked() == nowChecked)
return;
+ RefPtr<HTMLInputElement> protector(this);
m_reflectsCheckedAttribute = false;
m_isChecked = nowChecked;
setNeedsStyleRecalc(SubtreeStyleChange);
@@ -883,6 +884,8 @@ void HTMLInputElement::setChecked(bool nowChecked, TextFieldEventBehavior eventB
// definitely wrong in practice for these types of elements.
if (eventBehavior != DispatchNoEvent && inDocument() && m_inputType->shouldSendChangeEventAfterCheckedChanged()) {
setTextAsOfLastFormControlChangeEvent(String());
+ if (eventBehavior == DispatchInputAndChangeEvent)
+ dispatchFormControlInputEvent();
dispatchFormControlChangeEvent();
}
« no previous file with comments | « no previous file | Source/core/html/HTMLSelectElement.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698