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 8b824c9c8f62faa09b5255e84592bd1a9be7932b..795e85ed341a72c45a70ea1ca0a235b39dd4508a 100644 |
--- a/third_party/WebKit/Source/core/dom/Document.cpp |
+++ b/third_party/WebKit/Source/core/dom/Document.cpp |
@@ -442,7 +442,7 @@ Document::Document(const DocumentInit& initializer, DocumentClassFlags documentC |
, m_timeline(AnimationTimeline::create(this)) |
, m_templateDocumentHost(nullptr) |
, m_didAssociateFormControlsTimer(this, &Document::didAssociateFormControlsTimerFired) |
- , m_timers(Platform::current()->currentThread()->scheduler()->timerTaskRunner()->adoptClone()) |
+ , m_timers(timerTaskRunner()->adoptClone()) |
, m_hasViewportUnits(false) |
, m_styleRecalcElementCounter(0) |
, m_parserSyncPolicy(AllowAsynchronousParsing) |
@@ -453,7 +453,6 @@ Document::Document(const DocumentInit& initializer, DocumentClassFlags documentC |
provideContextFeaturesToDocumentFrom(*this, *m_frame->page()); |
m_fetcher = m_frame->loader().documentLoader()->fetcher(); |
- m_timers.setTimerTaskRunner(m_frame->frameScheduler()->timerTaskRunner()->adoptClone()); |
FrameFetchContext::provideDocumentToContext(m_fetcher->context(), this); |
} else if (m_importsController) { |
m_fetcher = FrameFetchContext::createContextAndFetcher(nullptr); |
@@ -2877,14 +2876,6 @@ KURL Document::virtualCompleteURL(const String& url) const |
return completeURL(url); |
} |
-double Document::timerAlignmentInterval() const |
-{ |
- Page* p = page(); |
- if (!p) |
- return DOMTimer::visiblePageAlignmentInterval(); |
- return p->timerAlignmentInterval(); |
-} |
- |
DOMTimerCoordinator* Document::timers() |
{ |
return &m_timers; |
@@ -3025,8 +3016,7 @@ void Document::didRemoveAllPendingStylesheet() |
void Document::didLoadAllScriptBlockingResources() |
{ |
- Platform::current()->currentThread()->scheduler()->loadingTaskRunner()->postTask( |
- BLINK_FROM_HERE, m_executeScriptsWaitingForResourcesTask->cancelAndCreate()); |
+ loadingTaskRunner()->postTask(BLINK_FROM_HERE, m_executeScriptsWaitingForResourcesTask->cancelAndCreate()); |
if (frame()) |
frame()->loader().client()->didRemoveAllPendingStylesheet(); |
@@ -5750,12 +5740,22 @@ WebTaskRunner* Document::loadingTaskRunner() const |
{ |
if (frame()) |
return frame()->frameScheduler()->loadingTaskRunner(); |
+ if (m_importsController) |
Sami
2015/11/26 19:27:50
I wonder if this should be done in a separate patc
alex clarke (OOO till 29th)
2015/11/27 10:01:59
I think this is a good idea. I don't think we nee
|
+ return m_importsController->master()->loadingTaskRunner(); |
+ if (m_contextDocument) |
+ return m_contextDocument->loadingTaskRunner(); |
return Platform::current()->currentThread()->scheduler()->loadingTaskRunner(); |
} |
WebTaskRunner* Document::timerTaskRunner() const |
{ |
- return m_timers.timerTaskRunner(); |
+ if (frame()) |
+ return m_frame->frameScheduler()->timerTaskRunner(); |
+ if (m_importsController) |
+ return m_importsController->master()->timerTaskRunner(); |
+ if (m_contextDocument) |
+ return m_contextDocument->timerTaskRunner(); |
+ return Platform::current()->currentThread()->scheduler()->timerTaskRunner(); |
} |
DEFINE_TRACE(Document) |