| Index: third_party/WebKit/Source/core/html/forms/TextFieldInputType.cpp
|
| diff --git a/third_party/WebKit/Source/core/html/forms/TextFieldInputType.cpp b/third_party/WebKit/Source/core/html/forms/TextFieldInputType.cpp
|
| index 1e28a40a32714934723b01b29f9c36455d7fbaad..74f2edaebf0b374af34aa4598937edc4889b111c 100644
|
| --- a/third_party/WebKit/Source/core/html/forms/TextFieldInputType.cpp
|
| +++ b/third_party/WebKit/Source/core/html/forms/TextFieldInputType.cpp
|
| @@ -179,15 +179,13 @@ void TextFieldInputType::setValue(const String& sanitizedValue,
|
| }
|
|
|
| case DispatchNoEvent:
|
| + // We need to update textAsOfLastFormControlChangeEvent for |value| IDL
|
| + // setter without focus because input-assist features use setValue("...",
|
| + // DispatchChangeEvent) without setting focus.
|
| + if (!element().isFocused())
|
| + element().setTextAsOfLastFormControlChangeEvent(element().value());
|
| break;
|
| }
|
| -
|
| - // TODO(tkent): Calling setTextAsOfLastFormControlChangeEvent() twice is very
|
| - // suspicious.
|
| - if (!element().isFocused())
|
| - element().setTextAsOfLastFormControlChangeEvent(element().value());
|
| - if (eventBehavior == DispatchNoEvent)
|
| - element().setTextAsOfLastFormControlChangeEvent(element().value());
|
| }
|
|
|
| void TextFieldInputType::handleKeydownEvent(KeyboardEvent* event) {
|
|
|