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 1833 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1914 { | 1915 { |
1915 markers().updateRenderedRectsForMarkers(); | 1916 markers().updateRenderedRectsForMarkers(); |
1916 | 1917 |
1917 // The layout system may perform layouts with pending stylesheets. When | 1918 // The layout system may perform layouts with pending stylesheets. When |
1918 // recording first layout time, we ignore these layouts, since painting is | 1919 // recording first layout time, we ignore these layouts, since painting is |
1919 // suppressed for them. We're interested in tracking the time of the | 1920 // suppressed for them. We're interested in tracking the time of the |
1920 // first real or 'paintable' layout. | 1921 // first real or 'paintable' layout. |
1921 if (isRenderingReady() && body() && !styleEngine().hasPendingSheets()) { | 1922 if (isRenderingReady() && body() && !styleEngine().hasPendingSheets()) { |
1922 if (!m_documentTiming.firstLayout()) | 1923 if (!m_documentTiming.firstLayout()) |
1923 m_documentTiming.markFirstLayout(); | 1924 m_documentTiming.markFirstLayout(); |
| 1925 |
| 1926 m_statisticsCollector.collectStatistics(*this); |
1924 } | 1927 } |
1925 } | 1928 } |
1926 | 1929 |
1927 void Document::setNeedsFocusedElementCheck() | 1930 void Document::setNeedsFocusedElementCheck() |
1928 { | 1931 { |
1929 setNeedsStyleRecalc(LocalStyleChange, StyleChangeReasonForTracing::createWit
hExtraData(StyleChangeReason::PseudoClass, StyleChangeExtraData::Focus)); | 1932 setNeedsStyleRecalc(LocalStyleChange, StyleChangeReasonForTracing::createWit
hExtraData(StyleChangeReason::PseudoClass, StyleChangeExtraData::Focus)); |
1930 } | 1933 } |
1931 | 1934 |
1932 void Document::clearFocusedElementSoon() | 1935 void Document::clearFocusedElementSoon() |
1933 { | 1936 { |
(...skipping 2643 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4577 // See https://bugs.webkit.org/show_bug.cgi?id=36864 starting around com
ment 35. | 4580 // See https://bugs.webkit.org/show_bug.cgi?id=36864 starting around com
ment 35. |
4578 if (mainResourceWasAlreadyRequested) | 4581 if (mainResourceWasAlreadyRequested) |
4579 updateLayoutTreeIfNeeded(); | 4582 updateLayoutTreeIfNeeded(); |
4580 | 4583 |
4581 frame->loader().finishedParsing(); | 4584 frame->loader().finishedParsing(); |
4582 | 4585 |
4583 TRACE_EVENT_INSTANT1("devtools.timeline", "MarkDOMContent", TRACE_EVENT_
SCOPE_THREAD, "data", InspectorMarkLoadEvent::data(frame.get())); | 4586 TRACE_EVENT_INSTANT1("devtools.timeline", "MarkDOMContent", TRACE_EVENT_
SCOPE_THREAD, "data", InspectorMarkLoadEvent::data(frame.get())); |
4584 InspectorInstrumentation::domContentLoadedEventFired(frame.get()); | 4587 InspectorInstrumentation::domContentLoadedEventFired(frame.get()); |
4585 } | 4588 } |
4586 | 4589 |
| 4590 m_statisticsCollector.setReadyToCollect(); |
| 4591 |
4587 // Schedule dropping of the ElementDataCache. We keep it alive for a while a
fter parsing finishes | 4592 // Schedule dropping of the ElementDataCache. We keep it alive for a while a
fter parsing finishes |
4588 // so that dynamically inserted content can also benefit from sharing optimi
zations. | 4593 // so that dynamically inserted content can also benefit from sharing optimi
zations. |
4589 // Note that we don't refresh the timer on cache access since that could lea
d to huge caches being kept | 4594 // Note that we don't refresh the timer on cache access since that could lea
d to huge caches being kept |
4590 // alive indefinitely by something innocuous like JS setting .innerHTML repe
atedly on a timer. | 4595 // alive indefinitely by something innocuous like JS setting .innerHTML repe
atedly on a timer. |
4591 m_elementDataCacheClearTimer.startOneShot(10, FROM_HERE); | 4596 m_elementDataCacheClearTimer.startOneShot(10, FROM_HERE); |
4592 | 4597 |
4593 // Parser should have picked up all preloads by now | 4598 // Parser should have picked up all preloads by now |
4594 m_fetcher->clearPreloads(); | 4599 m_fetcher->clearPreloads(); |
4595 } | 4600 } |
4596 | 4601 |
(...skipping 1154 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5751 #ifndef NDEBUG | 5756 #ifndef NDEBUG |
5752 using namespace blink; | 5757 using namespace blink; |
5753 void showLiveDocumentInstances() | 5758 void showLiveDocumentInstances() |
5754 { | 5759 { |
5755 Document::WeakDocumentSet& set = Document::liveDocumentSet(); | 5760 Document::WeakDocumentSet& set = Document::liveDocumentSet(); |
5756 fprintf(stderr, "There are %u documents currently alive:\n", set.size()); | 5761 fprintf(stderr, "There are %u documents currently alive:\n", set.size()); |
5757 for (Document* document : set) | 5762 for (Document* document : set) |
5758 fprintf(stderr, "- Document %p URL: %s\n", document, document->url().str
ing().utf8().data()); | 5763 fprintf(stderr, "- Document %p URL: %s\n", document, document->url().str
ing().utf8().data()); |
5759 } | 5764 } |
5760 #endif | 5765 #endif |
OLD | NEW |