Index: third_party/WebKit/Source/core/html/forms/InputType.cpp |
diff --git a/third_party/WebKit/Source/core/html/forms/InputType.cpp b/third_party/WebKit/Source/core/html/forms/InputType.cpp |
index 6fcf15a5adc8404e150a6c5ff8b3410206667172..26cb203b39ecc44666e9dceeacf452d259bc2d36 100644 |
--- a/third_party/WebKit/Source/core/html/forms/InputType.cpp |
+++ b/third_party/WebKit/Source/core/html/forms/InputType.cpp |
@@ -523,7 +523,10 @@ void InputType::setValue(const String& sanitizedValue, |
// TextFieldInputType. That is to say, type=color, type=range, and temporal |
// input types. |
DCHECK_EQ(valueMode(), ValueMode::kValue); |
- element().setNonAttributeValue(sanitizedValue); |
+ if (eventBehavior == DispatchNoEvent) |
+ element().setNonAttributeValue(sanitizedValue); |
+ else |
+ element().setNonAttributeValueByUserEdit(sanitizedValue); |
if (!valueChanged) |
return; |
switch (eventBehavior) { |
@@ -535,7 +538,6 @@ void InputType::setValue(const String& sanitizedValue, |
element().dispatchFormControlChangeEvent(); |
break; |
case DispatchNoEvent: |
- element().setTextAsOfLastFormControlChangeEvent(element().value()); |
break; |
} |
} |