Chromium Code Reviews| Index: Source/core/html/HTMLInputElement.cpp |
| diff --git a/Source/core/html/HTMLInputElement.cpp b/Source/core/html/HTMLInputElement.cpp |
| index d0704564663d4357c2add46e8a78209cd188920e..e021d95f01f13d01231d84efcce40d9cfc6d7c2c 100644 |
| --- a/Source/core/html/HTMLInputElement.cpp |
| +++ b/Source/core/html/HTMLInputElement.cpp |
| @@ -839,7 +839,7 @@ String HTMLInputElement::resultForDialogSubmit() |
| void HTMLInputElement::resetImpl() |
| { |
| if (m_inputType->storesValueSeparateFromAttribute()) { |
| - setValue(String()); |
| + setValue(String(), DispatchNoEvent, true); |
| setNeedsValidityCheck(); |
| } |
| @@ -1009,7 +1009,7 @@ void HTMLInputElement::setValue(const String& value, ExceptionState& exceptionSt |
| setValue(value, eventBehavior); |
| } |
| -void HTMLInputElement::setValue(const String& value, TextFieldEventBehavior eventBehavior) |
| +void HTMLInputElement::setValue(const String& value, TextFieldEventBehavior eventBehavior, bool isReset) |
| { |
| m_inputType->warnIfValueIsInvalidAndElementIsVisible(value); |
| if (!m_inputType->canSetValue(value)) |
| @@ -1024,9 +1024,9 @@ void HTMLInputElement::setValue(const String& value, TextFieldEventBehavior even |
| m_needsToUpdateViewValue = true; |
| m_suggestedValue = String(); // Prevent TextFieldInputType::setValue from using the suggested value. |
| - m_inputType->setValue(sanitizedValue, valueChanged, eventBehavior); |
| + m_inputType->setValue(sanitizedValue, valueChanged, isReset, eventBehavior); |
| - if (valueChanged && eventBehavior == DispatchNoEvent) |
| + if (valueChanged && eventBehavior == DispatchNoEvent && !isReset) |
|
tkent
2014/11/06 00:11:16
Skipping setTextAsOfLastFormControlChangeEvent doe
Habib Virji
2014/11/06 14:23:08
<input type=text value=seed>
During HTMLParsing, v
tkent
2014/11/07 00:34:19
Ok, HTMLTextFormControlElement::insertedInto() doe
Habib Virji
2014/11/07 14:10:43
Thanks above suggested change does work and looks
|
| setTextAsOfLastFormControlChangeEvent(sanitizedValue); |
| if (!valueChanged) |