Index: Source/core/html/forms/TextFieldInputType.cpp |
diff --git a/Source/core/html/forms/TextFieldInputType.cpp b/Source/core/html/forms/TextFieldInputType.cpp |
index 93f9b6004e4acb57d7edba40cacd277485a1a5b1..780ffa7a784717c7572986e9acb7f703a127994f 100644 |
--- a/Source/core/html/forms/TextFieldInputType.cpp |
+++ b/Source/core/html/forms/TextFieldInputType.cpp |
@@ -146,7 +146,7 @@ bool TextFieldInputType::canSetSuggestedValue() |
return true; |
} |
-void TextFieldInputType::setValue(const String& sanitizedValue, bool valueChanged, TextFieldEventBehavior eventBehavior) |
+void TextFieldInputType::setValue(const String& sanitizedValue, bool valueChanged, bool isReset, TextFieldEventBehavior eventBehavior) |
{ |
// Grab this input element to keep reference even if JS event handler |
// changes input type. |
@@ -154,7 +154,7 @@ void TextFieldInputType::setValue(const String& sanitizedValue, bool valueChange |
// We don't ask InputType::setValue to dispatch events because |
// TextFieldInputType dispatches events different way from InputType. |
- InputType::setValue(sanitizedValue, valueChanged, DispatchNoEvent); |
+ InputType::setValue(sanitizedValue, valueChanged, isReset, DispatchNoEvent); |
if (valueChanged) |
input->updateView(); |
@@ -188,7 +188,7 @@ void TextFieldInputType::setValue(const String& sanitizedValue, bool valueChange |
break; |
} |
- if (!input->focused()) |
+ if (!input->focused() && !isReset) |
input->setTextAsOfLastFormControlChangeEvent(sanitizedValue); |
} |