| Index: third_party/WebKit/Source/core/html/HTMLTextAreaElement.cpp
|
| diff --git a/third_party/WebKit/Source/core/html/HTMLTextAreaElement.cpp b/third_party/WebKit/Source/core/html/HTMLTextAreaElement.cpp
|
| index d38b101b4d987be76e551cae86b8f2c9a5c3a397..457301e7681c4518fc909053adc925568228c312 100644
|
| --- a/third_party/WebKit/Source/core/html/HTMLTextAreaElement.cpp
|
| +++ b/third_party/WebKit/Source/core/html/HTMLTextAreaElement.cpp
|
| @@ -435,12 +435,23 @@ void HTMLTextAreaElement::setValueCommon(const String& newValue,
|
| }
|
|
|
| notifyFormStateChanged();
|
| - if (eventBehavior == DispatchNoEvent) {
|
| - setTextAsOfLastFormControlChangeEvent(normalizedValue);
|
| - } else {
|
| - if (eventBehavior == DispatchInputAndChangeEvent)
|
| + switch (eventBehavior) {
|
| + case DispatchChangeEvent:
|
| + dispatchFormControlChangeEvent();
|
| + break;
|
| +
|
| + case DispatchInputAndChangeEvent:
|
| dispatchFormControlInputEvent();
|
| - dispatchFormControlChangeEvent();
|
| + dispatchFormControlChangeEvent();
|
| + break;
|
| +
|
| + case DispatchNoEvent:
|
| + // We need to update textAsOfLastFormControlChangeEvent for |value| IDL
|
| + // setter without focus because input-assist features use setValue("...",
|
| + // DispatchChangeEvent) without setting focus.
|
| + if (!isFocused())
|
| + setTextAsOfLastFormControlChangeEvent(normalizedValue);
|
| + break;
|
| }
|
| }
|
|
|
|
|