| Index: third_party/WebKit/Source/web/WebFormControlElement.cpp
|
| diff --git a/third_party/WebKit/Source/web/WebFormControlElement.cpp b/third_party/WebKit/Source/web/WebFormControlElement.cpp
|
| index 1e9fd8352546003ee0109ca08d0d8a04794aa9b1..5b6da30014e5780a70ead3d959425e8eb6faabf9 100644
|
| --- a/third_party/WebKit/Source/web/WebFormControlElement.cpp
|
| +++ b/third_party/WebKit/Source/web/WebFormControlElement.cpp
|
| @@ -94,25 +94,29 @@ void WebFormControlElement::setValue(const WebString& value, bool sendEvents) {
|
| void WebFormControlElement::setAutofillValue(const WebString& value) {
|
| // The input and change events will be sent in setValue.
|
| if (isHTMLInputElement(*m_private) || isHTMLTextAreaElement(*m_private)) {
|
| - if (!focused())
|
| + if (!focused()) {
|
| unwrap<Element>()->dispatchFocusEvent(nullptr, WebFocusTypeForward,
|
| - nullptr);
|
| + InputDeviceCapabilities::Null);
|
| + }
|
| unwrap<Element>()->dispatchScopedEvent(
|
| Event::createBubble(EventTypeNames::keydown));
|
| unwrap<TextControlElement>()->setValue(value, DispatchInputAndChangeEvent);
|
| unwrap<Element>()->dispatchScopedEvent(
|
| Event::createBubble(EventTypeNames::keyup));
|
| - if (!focused())
|
| + if (!focused()) {
|
| unwrap<Element>()->dispatchBlurEvent(nullptr, WebFocusTypeForward,
|
| - nullptr);
|
| + InputDeviceCapabilities::Null);
|
| + }
|
| } else if (isHTMLSelectElement(*m_private)) {
|
| - if (!focused())
|
| + if (!focused()) {
|
| unwrap<Element>()->dispatchFocusEvent(nullptr, WebFocusTypeForward,
|
| - nullptr);
|
| + InputDeviceCapabilities::Null);
|
| + }
|
| unwrap<HTMLSelectElement>()->setValue(value, true);
|
| - if (!focused())
|
| + if (!focused()) {
|
| unwrap<Element>()->dispatchBlurEvent(nullptr, WebFocusTypeForward,
|
| - nullptr);
|
| + InputDeviceCapabilities::Null);
|
| + }
|
| }
|
| }
|
|
|
|
|