Index: Source/core/html/HTMLInputElement.cpp |
diff --git a/Source/core/html/HTMLInputElement.cpp b/Source/core/html/HTMLInputElement.cpp |
index f7e878c579f31801a00e1909845c39cc771cf4b2..06ed867b1d9bee47eeb37b4c65df78964a671713 100644 |
--- a/Source/core/html/HTMLInputElement.cpp |
+++ b/Source/core/html/HTMLInputElement.cpp |
@@ -897,6 +897,12 @@ bool HTMLInputElement::isTextField() const |
return m_inputType->isTextField(); |
} |
+void HTMLInputElement::dispatchChangeEventIfNeeded() |
+{ |
+ if (inDocument() && m_inputType->shouldSendChangeEventAfterCheckedChanged()) |
+ dispatchFormControlChangeEvent(); |
+} |
+ |
void HTMLInputElement::setChecked(bool nowChecked, TextFieldEventBehavior eventBehavior) |
{ |
if (checked() == nowChecked) |
@@ -930,7 +936,6 @@ void HTMLInputElement::setChecked(bool nowChecked, TextFieldEventBehavior eventB |
setTextAsOfLastFormControlChangeEvent(String()); |
if (eventBehavior == DispatchInputAndChangeEvent) |
dispatchFormControlInputEvent(); |
- dispatchFormControlChangeEvent(); |
} |
pseudoStateChanged(CSSSelector::PseudoChecked); |