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