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 r
ights reserved. | 6 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2011, 2012 Apple Inc. All r
ights reserved. |
7 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.t
orchmobile.com/) | 7 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.t
orchmobile.com/) |
8 * Copyright (C) 2008, 2009, 2011, 2012 Google Inc. All rights reserved. | 8 * Copyright (C) 2008, 2009, 2011, 2012 Google Inc. All rights reserved. |
9 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies) | 9 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies) |
10 * Copyright (C) Research In Motion Limited 2010-2011. All rights reserved. | 10 * Copyright (C) Research In Motion Limited 2010-2011. All rights reserved. |
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
61 #include "core/dom/AXObjectCache.h" | 61 #include "core/dom/AXObjectCache.h" |
62 #include "core/dom/AddConsoleMessageTask.h" | 62 #include "core/dom/AddConsoleMessageTask.h" |
63 #include "core/dom/Attr.h" | 63 #include "core/dom/Attr.h" |
64 #include "core/dom/CDATASection.h" | 64 #include "core/dom/CDATASection.h" |
65 #include "core/dom/ClientRect.h" | 65 #include "core/dom/ClientRect.h" |
66 #include "core/dom/Comment.h" | 66 #include "core/dom/Comment.h" |
67 #include "core/dom/ContextFeatures.h" | 67 #include "core/dom/ContextFeatures.h" |
68 #include "core/dom/DOMImplementation.h" | 68 #include "core/dom/DOMImplementation.h" |
69 #include "core/dom/DocumentFragment.h" | 69 #include "core/dom/DocumentFragment.h" |
70 #include "core/dom/DocumentLifecycleObserver.h" | 70 #include "core/dom/DocumentLifecycleObserver.h" |
| 71 #include "core/dom/DocumentStatisticsCollector.h" |
71 #include "core/dom/DocumentType.h" | 72 #include "core/dom/DocumentType.h" |
72 #include "core/dom/Element.h" | 73 #include "core/dom/Element.h" |
73 #include "core/dom/ElementDataCache.h" | 74 #include "core/dom/ElementDataCache.h" |
74 #include "core/dom/ElementRegistrationOptions.h" | 75 #include "core/dom/ElementRegistrationOptions.h" |
75 #include "core/dom/ElementTraversal.h" | 76 #include "core/dom/ElementTraversal.h" |
76 #include "core/dom/ExceptionCode.h" | 77 #include "core/dom/ExceptionCode.h" |
77 #include "core/dom/ExecutionContextTask.h" | 78 #include "core/dom/ExecutionContextTask.h" |
78 #include "core/dom/FrameRequestCallback.h" | 79 #include "core/dom/FrameRequestCallback.h" |
79 #include "core/dom/LayoutTreeBuilderTraversal.h" | 80 #include "core/dom/LayoutTreeBuilderTraversal.h" |
80 #include "core/dom/MainThreadTaskRunner.h" | 81 #include "core/dom/MainThreadTaskRunner.h" |
(...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
208 #include "platform/network/ContentSecurityPolicyParsers.h" | 209 #include "platform/network/ContentSecurityPolicyParsers.h" |
209 #include "platform/network/HTTPParsers.h" | 210 #include "platform/network/HTTPParsers.h" |
210 #include "platform/scheduler/CancellableTaskFactory.h" | 211 #include "platform/scheduler/CancellableTaskFactory.h" |
211 #include "platform/scroll/ScrollbarTheme.h" | 212 #include "platform/scroll/ScrollbarTheme.h" |
212 #include "platform/text/PlatformLocale.h" | 213 #include "platform/text/PlatformLocale.h" |
213 #include "platform/text/SegmentedString.h" | 214 #include "platform/text/SegmentedString.h" |
214 #include "platform/weborigin/OriginAccessEntry.h" | 215 #include "platform/weborigin/OriginAccessEntry.h" |
215 #include "platform/weborigin/SchemeRegistry.h" | 216 #include "platform/weborigin/SchemeRegistry.h" |
216 #include "platform/weborigin/SecurityOrigin.h" | 217 #include "platform/weborigin/SecurityOrigin.h" |
217 #include "public/platform/Platform.h" | 218 #include "public/platform/Platform.h" |
| 219 #include "public/platform/WebDistillability.h" |
218 #include "public/platform/WebFrameScheduler.h" | 220 #include "public/platform/WebFrameScheduler.h" |
219 #include "wtf/CurrentTime.h" | 221 #include "wtf/CurrentTime.h" |
220 #include "wtf/DateMath.h" | 222 #include "wtf/DateMath.h" |
221 #include "wtf/Functional.h" | 223 #include "wtf/Functional.h" |
222 #include "wtf/HashFunctions.h" | 224 #include "wtf/HashFunctions.h" |
223 #include "wtf/MainThread.h" | 225 #include "wtf/MainThread.h" |
224 #include "wtf/StdLibExtras.h" | 226 #include "wtf/StdLibExtras.h" |
225 #include "wtf/TemporaryChange.h" | 227 #include "wtf/TemporaryChange.h" |
226 #include "wtf/text/StringBuffer.h" | 228 #include "wtf/text/StringBuffer.h" |
227 #include "wtf/text/TextEncodingRegistry.h" | 229 #include "wtf/text/TextEncodingRegistry.h" |
(...skipping 4363 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4591 // See https://bugs.webkit.org/show_bug.cgi?id=36864 starting around com
ment 35. | 4593 // See https://bugs.webkit.org/show_bug.cgi?id=36864 starting around com
ment 35. |
4592 if (mainResourceWasAlreadyRequested) | 4594 if (mainResourceWasAlreadyRequested) |
4593 updateLayoutTreeIfNeeded(); | 4595 updateLayoutTreeIfNeeded(); |
4594 | 4596 |
4595 frame->loader().finishedParsing(); | 4597 frame->loader().finishedParsing(); |
4596 | 4598 |
4597 TRACE_EVENT_INSTANT1("devtools.timeline", "MarkDOMContent", TRACE_EVENT_
SCOPE_THREAD, "data", InspectorMarkLoadEvent::data(frame.get())); | 4599 TRACE_EVENT_INSTANT1("devtools.timeline", "MarkDOMContent", TRACE_EVENT_
SCOPE_THREAD, "data", InspectorMarkLoadEvent::data(frame.get())); |
4598 InspectorInstrumentation::domContentLoadedEventFired(frame.get()); | 4600 InspectorInstrumentation::domContentLoadedEventFired(frame.get()); |
4599 } | 4601 } |
4600 | 4602 |
| 4603 m_statisticsCollector.setReadyToCollect(); |
| 4604 |
4601 // Schedule dropping of the ElementDataCache. We keep it alive for a while a
fter parsing finishes | 4605 // Schedule dropping of the ElementDataCache. We keep it alive for a while a
fter parsing finishes |
4602 // so that dynamically inserted content can also benefit from sharing optimi
zations. | 4606 // so that dynamically inserted content can also benefit from sharing optimi
zations. |
4603 // Note that we don't refresh the timer on cache access since that could lea
d to huge caches being kept | 4607 // Note that we don't refresh the timer on cache access since that could lea
d to huge caches being kept |
4604 // alive indefinitely by something innocuous like JS setting .innerHTML repe
atedly on a timer. | 4608 // alive indefinitely by something innocuous like JS setting .innerHTML repe
atedly on a timer. |
4605 m_elementDataCacheClearTimer.startOneShot(10, FROM_HERE); | 4609 m_elementDataCacheClearTimer.startOneShot(10, FROM_HERE); |
4606 | 4610 |
4607 // Parser should have picked up all preloads by now | 4611 // Parser should have picked up all preloads by now |
4608 m_fetcher->clearPreloads(); | 4612 m_fetcher->clearPreloads(); |
4609 } | 4613 } |
4610 | 4614 |
(...skipping 1082 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5693 return true; | 5697 return true; |
5694 } | 5698 } |
5695 | 5699 |
5696 WebTaskRunner* Document::loadingTaskRunner() const | 5700 WebTaskRunner* Document::loadingTaskRunner() const |
5697 { | 5701 { |
5698 if (frame()) | 5702 if (frame()) |
5699 return frame()->frameScheduler()->loadingTaskRunner(); | 5703 return frame()->frameScheduler()->loadingTaskRunner(); |
5700 return Platform::current()->currentThread()->scheduler()->loadingTaskRunner(
); | 5704 return Platform::current()->currentThread()->scheduler()->loadingTaskRunner(
); |
5701 } | 5705 } |
5702 | 5706 |
| 5707 WebDistillabilityFeatures Document::distillabilityFeatures() |
| 5708 { |
| 5709 return m_statisticsCollector.collectStatistics(*this); |
| 5710 } |
| 5711 |
5703 DEFINE_TRACE(Document) | 5712 DEFINE_TRACE(Document) |
5704 { | 5713 { |
5705 #if ENABLE(OILPAN) | 5714 #if ENABLE(OILPAN) |
5706 visitor->trace(m_importsController); | 5715 visitor->trace(m_importsController); |
5707 visitor->trace(m_docType); | 5716 visitor->trace(m_docType); |
5708 visitor->trace(m_implementation); | 5717 visitor->trace(m_implementation); |
5709 visitor->trace(m_autofocusElement); | 5718 visitor->trace(m_autofocusElement); |
5710 visitor->trace(m_focusedElement); | 5719 visitor->trace(m_focusedElement); |
5711 visitor->trace(m_hoverNode); | 5720 visitor->trace(m_hoverNode); |
5712 visitor->trace(m_activeHoverElement); | 5721 visitor->trace(m_activeHoverElement); |
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5772 #ifndef NDEBUG | 5781 #ifndef NDEBUG |
5773 using namespace blink; | 5782 using namespace blink; |
5774 void showLiveDocumentInstances() | 5783 void showLiveDocumentInstances() |
5775 { | 5784 { |
5776 Document::WeakDocumentSet& set = Document::liveDocumentSet(); | 5785 Document::WeakDocumentSet& set = Document::liveDocumentSet(); |
5777 fprintf(stderr, "There are %u documents currently alive:\n", set.size()); | 5786 fprintf(stderr, "There are %u documents currently alive:\n", set.size()); |
5778 for (Document* document : set) | 5787 for (Document* document : set) |
5779 fprintf(stderr, "- Document %p URL: %s\n", document, document->url().str
ing().utf8().data()); | 5788 fprintf(stderr, "- Document %p URL: %s\n", document, document->url().str
ing().utf8().data()); |
5780 } | 5789 } |
5781 #endif | 5790 #endif |
OLD | NEW |