| 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 381fe6f41f167f9b6466dec09d846bd6e19bb2af..99f99c60a9b3bc0907f12960876ad37d6cbe06e4 100644
|
| --- a/third_party/WebKit/Source/core/dom/Document.cpp
|
| +++ b/third_party/WebKit/Source/core/dom/Document.cpp
|
| @@ -241,6 +241,7 @@
|
| #include "public/platform/Platform.h"
|
| #include "public/platform/WebAddressSpace.h"
|
| #include "public/platform/WebFrameScheduler.h"
|
| +#include "public/platform/WebPrerenderingSupport.h"
|
| #include "public/platform/WebScheduler.h"
|
| #include "wtf/AutoReset.h"
|
| #include "wtf/CurrentTime.h"
|
| @@ -1428,6 +1429,10 @@ bool Document::isPrefetchOnly() const {
|
| return prerendererClient && prerendererClient->isPrefetchOnly();
|
| }
|
|
|
| +void Document::onPrefetchFinished() const {
|
| + WebPrerenderingSupport::current()->prefetchFinished();
|
| +}
|
| +
|
| String Document::visibilityState() const {
|
| return pageVisibilityStateString(pageVisibilityState());
|
| }
|
| @@ -5143,6 +5148,9 @@ void Document::finishedParsing() {
|
|
|
| // Parser should have picked up all preloads by now
|
| m_fetcher->clearPreloads(ResourceFetcher::ClearSpeculativeMarkupPreloads);
|
| +
|
| + if (isPrefetchOnly())
|
| + onPrefetchFinished();
|
| }
|
|
|
| void Document::elementDataCacheClearTimerFired(TimerBase*) {
|
|
|