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

Unified Diff: third_party/WebKit/Source/core/dom/Document.cpp

Issue 2457593002: Move remaining Document timers to frame-specific task runners. (Closed)
Patch Set: Created 4 years, 2 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
« no previous file with comments | « third_party/WebKit/Source/core/dom/Document.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/dom/Document.cpp
diff --git a/third_party/WebKit/Source/core/dom/Document.cpp b/third_party/WebKit/Source/core/dom/Document.cpp
index 324caf8eb8f7de97b3dda5d1b10fbd2ae0668579..a01438b6ad0e0890eda8e32f3e417b4c1d9f77e2 100644
--- a/third_party/WebKit/Source/core/dom/Document.cpp
+++ b/third_party/WebKit/Source/core/dom/Document.cpp
@@ -428,8 +428,10 @@ Document::Document(const DocumentInit& initializer,
this,
&Document::executeScriptsWaitingForResources)),
m_hasAutofocused(false),
- m_clearFocusedElementTimer(this,
- &Document::clearFocusedElementTimerFired),
+ m_clearFocusedElementTimer(
+ TaskRunnerHelper::get(TaskType::Internal, this),
+ this,
+ &Document::clearFocusedElementTimerFired),
m_domTreeVersion(++s_globalTreeVersion),
m_styleVersion(0),
m_listenerTypes(0),
@@ -447,8 +449,10 @@ Document::Document(const DocumentInit& initializer,
m_ignoreDestructiveWriteCount(0),
m_throwOnDynamicMarkupInsertionCount(0),
m_markers(new DocumentMarkerController(*this)),
- m_updateFocusAppearanceTimer(this,
- &Document::updateFocusAppearanceTimerFired),
+ m_updateFocusAppearanceTimer(
+ TaskRunnerHelper::get(TaskType::Internal, this),
+ this,
+ &Document::updateFocusAppearanceTimerFired),
m_cssTarget(nullptr),
m_loadEventProgress(LoadEventNotRun),
m_startTime(currentTime()),
@@ -482,12 +486,15 @@ Document::Document(const DocumentInit& initializer,
m_writeRecursionDepth(0),
m_taskRunner(MainThreadTaskRunner::create(this)),
m_registrationContext(initializer.registrationContext(this)),
- m_elementDataCacheClearTimer(this,
- &Document::elementDataCacheClearTimerFired),
+ m_elementDataCacheClearTimer(
+ TaskRunnerHelper::get(TaskType::Internal, this),
+ this,
+ &Document::elementDataCacheClearTimerFired),
m_timeline(DocumentTimeline::create(this)),
m_compositorPendingAnimations(new CompositorPendingAnimations()),
m_templateDocumentHost(nullptr),
m_didAssociateFormControlsTimer(
+ TaskRunnerHelper::get(TaskType::Internal, this),
this,
&Document::didAssociateFormControlsTimerFired),
m_timers(TaskRunnerHelper::get(TaskType::Timer, this)->clone()),
@@ -2067,7 +2074,6 @@ void Document::clearFocusedElementSoon() {
void Document::clearFocusedElementTimerFired(TimerBase*) {
updateStyleAndLayoutTree();
- m_clearFocusedElementTimer.stop();
if (m_focusedElement && !m_focusedElement->isFocusable())
m_focusedElement->blur();
« no previous file with comments | « third_party/WebKit/Source/core/dom/Document.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698