Index: third_party/WebKit/Source/core/html/HTMLInputElement.cpp |
diff --git a/third_party/WebKit/Source/core/html/HTMLInputElement.cpp b/third_party/WebKit/Source/core/html/HTMLInputElement.cpp |
index 78231dff72825e02578b6097ec4dd55a79cd8355..e816a553b7e3dd837359aa60e1f02e99a8104d7a 100644 |
--- a/third_party/WebKit/Source/core/html/HTMLInputElement.cpp |
+++ b/third_party/WebKit/Source/core/html/HTMLInputElement.cpp |
@@ -37,6 +37,7 @@ |
#include "core/InputTypeNames.h" |
#include "core/dom/AXObjectCache.h" |
#include "core/dom/Document.h" |
+#include "core/dom/ExecutionContextTask.h" |
#include "core/dom/IdTargetObserver.h" |
#include "core/dom/shadow/InsertionPoint.h" |
#include "core/dom/shadow/ShadowRoot.h" |
@@ -1235,7 +1236,7 @@ void HTMLInputElement::defaultEventHandler(Event* evt) |
if (m_inputTypeView->shouldSubmitImplicitly(evt)) { |
// FIXME: Remove type check. |
if (type() == InputTypeNames::search) |
- onSearch(); |
+ document().postTask(BLINK_FROM_HERE, createSameThreadTask(&HTMLInputElement::onSearch, PassRefPtrWillBeRawPtr<HTMLInputElement>(this))); |
// Form submission finishes editing, just as loss of focus does. |
// If there was a change, send the event now. |
if (wasChangedSinceLastFormControlChangeEvent()) |