OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) | 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) |
3 * (C) 1999 Antti Koivisto (koivisto@kde.org) | 3 * (C) 1999 Antti Koivisto (koivisto@kde.org) |
4 * (C) 2001 Dirk Mueller (mueller@kde.org) | 4 * (C) 2001 Dirk Mueller (mueller@kde.org) |
5 * (C) 2006 Alexey Proskuryakov (ap@webkit.org) | 5 * (C) 2006 Alexey Proskuryakov (ap@webkit.org) |
6 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2011, 2012 Apple Inc. All | 6 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2011, 2012 Apple Inc. All |
7 * rights reserved. | 7 * rights reserved. |
8 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. | 8 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. |
9 * (http://www.torchmobile.com/) | 9 * (http://www.torchmobile.com/) |
10 * Copyright (C) 2008, 2009, 2011, 2012 Google Inc. All rights reserved. | 10 * Copyright (C) 2008, 2009, 2011, 2012 Google Inc. All rights reserved. |
(...skipping 223 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
234 #include "platform/scroll/ScrollbarTheme.h" | 234 #include "platform/scroll/ScrollbarTheme.h" |
235 #include "platform/text/PlatformLocale.h" | 235 #include "platform/text/PlatformLocale.h" |
236 #include "platform/text/SegmentedString.h" | 236 #include "platform/text/SegmentedString.h" |
237 #include "platform/tracing/TraceEvent.h" | 237 #include "platform/tracing/TraceEvent.h" |
238 #include "platform/weborigin/OriginAccessEntry.h" | 238 #include "platform/weborigin/OriginAccessEntry.h" |
239 #include "platform/weborigin/SchemeRegistry.h" | 239 #include "platform/weborigin/SchemeRegistry.h" |
240 #include "platform/weborigin/SecurityOrigin.h" | 240 #include "platform/weborigin/SecurityOrigin.h" |
241 #include "public/platform/Platform.h" | 241 #include "public/platform/Platform.h" |
242 #include "public/platform/WebAddressSpace.h" | 242 #include "public/platform/WebAddressSpace.h" |
243 #include "public/platform/WebFrameScheduler.h" | 243 #include "public/platform/WebFrameScheduler.h" |
| 244 #include "public/platform/WebPrerenderingSupport.h" |
244 #include "public/platform/WebScheduler.h" | 245 #include "public/platform/WebScheduler.h" |
245 #include "wtf/AutoReset.h" | 246 #include "wtf/AutoReset.h" |
246 #include "wtf/CurrentTime.h" | 247 #include "wtf/CurrentTime.h" |
247 #include "wtf/DateMath.h" | 248 #include "wtf/DateMath.h" |
248 #include "wtf/Functional.h" | 249 #include "wtf/Functional.h" |
249 #include "wtf/HashFunctions.h" | 250 #include "wtf/HashFunctions.h" |
250 #include "wtf/PtrUtil.h" | 251 #include "wtf/PtrUtil.h" |
251 #include "wtf/StdLibExtras.h" | 252 #include "wtf/StdLibExtras.h" |
252 #include "wtf/text/StringBuffer.h" | 253 #include "wtf/text/StringBuffer.h" |
253 #include "wtf/text/TextEncodingRegistry.h" | 254 #include "wtf/text/TextEncodingRegistry.h" |
(...skipping 4882 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5136 // Schedule dropping of the ElementDataCache. We keep it alive for a while | 5137 // Schedule dropping of the ElementDataCache. We keep it alive for a while |
5137 // after parsing finishes so that dynamically inserted content can also | 5138 // after parsing finishes so that dynamically inserted content can also |
5138 // benefit from sharing optimizations. Note that we don't refresh the timer | 5139 // benefit from sharing optimizations. Note that we don't refresh the timer |
5139 // on cache access since that could lead to huge caches being kept alive | 5140 // on cache access since that could lead to huge caches being kept alive |
5140 // indefinitely by something innocuous like JS setting .innerHTML repeatedly | 5141 // indefinitely by something innocuous like JS setting .innerHTML repeatedly |
5141 // on a timer. | 5142 // on a timer. |
5142 m_elementDataCacheClearTimer.startOneShot(10, BLINK_FROM_HERE); | 5143 m_elementDataCacheClearTimer.startOneShot(10, BLINK_FROM_HERE); |
5143 | 5144 |
5144 // Parser should have picked up all preloads by now | 5145 // Parser should have picked up all preloads by now |
5145 m_fetcher->clearPreloads(ResourceFetcher::ClearSpeculativeMarkupPreloads); | 5146 m_fetcher->clearPreloads(ResourceFetcher::ClearSpeculativeMarkupPreloads); |
| 5147 |
| 5148 if (isPrefetchOnly()) |
| 5149 WebPrerenderingSupport::current()->prefetchFinished(); |
5146 } | 5150 } |
5147 | 5151 |
5148 void Document::elementDataCacheClearTimerFired(TimerBase*) { | 5152 void Document::elementDataCacheClearTimerFired(TimerBase*) { |
5149 m_elementDataCache.clear(); | 5153 m_elementDataCache.clear(); |
5150 } | 5154 } |
5151 | 5155 |
5152 void Document::beginLifecycleUpdatesIfRenderingReady() { | 5156 void Document::beginLifecycleUpdatesIfRenderingReady() { |
5153 if (!isActive()) | 5157 if (!isActive()) |
5154 return; | 5158 return; |
5155 if (!isRenderingReady()) | 5159 if (!isRenderingReady()) |
(...skipping 1253 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6409 } | 6413 } |
6410 | 6414 |
6411 void showLiveDocumentInstances() { | 6415 void showLiveDocumentInstances() { |
6412 WeakDocumentSet& set = liveDocumentSet(); | 6416 WeakDocumentSet& set = liveDocumentSet(); |
6413 fprintf(stderr, "There are %u documents currently alive:\n", set.size()); | 6417 fprintf(stderr, "There are %u documents currently alive:\n", set.size()); |
6414 for (Document* document : set) | 6418 for (Document* document : set) |
6415 fprintf(stderr, "- Document %p URL: %s\n", document, | 6419 fprintf(stderr, "- Document %p URL: %s\n", document, |
6416 document->url().getString().utf8().data()); | 6420 document->url().getString().utf8().data()); |
6417 } | 6421 } |
6418 #endif | 6422 #endif |
OLD | NEW |