Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(34)

Unified Diff: third_party/WebKit/Source/core/html/HTMLInputElement.cpp

Issue 2688473005: Replace Document::postTask with WebTaskRunner::postTask (Closed)
Patch Set: remove extra null-check: context on addConsoleMessage is now persistent Created 3 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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 37c93ef64e9287962e427de03869ee8ae49109a8..c6863dd163eeb4dc38938418a5e5d5027aa0a35c 100644
--- a/third_party/WebKit/Source/core/html/HTMLInputElement.cpp
+++ b/third_party/WebKit/Source/core/html/HTMLInputElement.cpp
@@ -38,7 +38,6 @@
#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/StyleChangeReason.h"
#include "core/dom/TaskRunnerHelper.h"
@@ -1264,10 +1263,11 @@ void HTMLInputElement::defaultEventHandler(Event* evt) {
if (m_inputTypeView->shouldSubmitImplicitly(evt)) {
// FIXME: Remove type check.
- if (type() == InputTypeNames::search)
- document().postTask(TaskType::UserInteraction, BLINK_FROM_HERE,
- createSameThreadTask(&HTMLInputElement::onSearch,
- wrapPersistent(this)));
+ if (type() == InputTypeNames::search) {
+ TaskRunnerHelper::get(TaskType::UserInteraction, &document())
+ ->postTask(BLINK_FROM_HERE, WTF::bind(&HTMLInputElement::onSearch,
+ wrapPersistent(this)));
+ }
// Form submission finishes editing, just as loss of focus does.
// If there was a change, send the event now.
if (wasChangedSinceLastFormControlChangeEvent())
« no previous file with comments | « third_party/WebKit/Source/core/frame/LocalDOMWindow.cpp ('k') | third_party/WebKit/Source/core/html/HTMLSelectElement.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698