|
Lines 888-897
void HTMLInputElement::setValue(const String& value, bool sendChangeEvent)
a/Source/WebCore/html/HTMLInputElement.cpp_sec1
|
| 888 |
m_data.setSuggestedValue(String()); |
888 |
m_data.setSuggestedValue(String()); |
| 889 |
} |
889 |
} |
| 890 |
|
890 |
|
| 891 |
// Don't dispatch the change event when focused, it will be dispatched |
891 |
if (sendChangeEvent) { |
| 892 |
// when the control loses focus. |
892 |
// Don't dispatch the change event when focused, it will be dispatched |
| 893 |
if (sendChangeEvent && document()->focusedNode() != this) |
893 |
// when the control loses focus. |
| 894 |
dispatchFormControlChangeEvent(); |
894 |
if (document()->focusedNode() != this) |
|
|
895 |
dispatchFormControlChangeEvent(); |
| 896 |
else if (isTextField()) |
| 897 |
toRenderTextControl(renderer())->setChangedSinceLastChangeEvent(true); |
| 898 |
} |
| 895 |
|
899 |
|
| 896 |
InputElement::notifyFormStateChanged(this); |
900 |
InputElement::notifyFormStateChanged(this); |
| 897 |
} |
901 |
} |