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 49cacf9af360f7bfd48001671085b6633139b863..bfef0dbbe187d6d015df7be09a37644e78edb571 100644 |
--- a/third_party/WebKit/Source/core/html/HTMLInputElement.cpp |
+++ b/third_party/WebKit/Source/core/html/HTMLInputElement.cpp |
@@ -38,6 +38,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" |
@@ -1251,7 +1252,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()) |