Chromium Code Reviews| Index: Source/core/html/HTMLInputElement.cpp |
| diff --git a/Source/core/html/HTMLInputElement.cpp b/Source/core/html/HTMLInputElement.cpp |
| index b0d4f5783baec227e3c2b911344a79068cebb827..da5a7c41e110f5f7024099ae1531cfeffab90a08 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(TextFieldEventBehavior eventBehavior) |
|
tkent
2015/04/07 06:32:28
The argument is always DispatchChangeEvent. We ca
Paritosh Kumar
2015/04/07 08:53:58
Thanks.
|
| +{ |
| + setTextAsOfLastFormControlChangeEvent(String()); |
| + if (eventBehavior != DispatchNoEvent && 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); |