Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(60)

Side by Side Diff: third_party/WebKit/Source/core/dom/Document.cpp

Issue 2490563002: Revert of DevTools: add the logging aspect into the PerformanceMonitor (Closed)
Patch Set: Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 129 matching lines...) Expand 10 before | Expand all | Expand 10 after
140 #include "core/frame/DOMTimer.h" 140 #include "core/frame/DOMTimer.h"
141 #include "core/frame/DOMVisualViewport.h" 141 #include "core/frame/DOMVisualViewport.h"
142 #include "core/frame/EventHandlerRegistry.h" 142 #include "core/frame/EventHandlerRegistry.h"
143 #include "core/frame/FrameConsole.h" 143 #include "core/frame/FrameConsole.h"
144 #include "core/frame/FrameHost.h" 144 #include "core/frame/FrameHost.h"
145 #include "core/frame/FrameView.h" 145 #include "core/frame/FrameView.h"
146 #include "core/frame/History.h" 146 #include "core/frame/History.h"
147 #include "core/frame/HostsUsingFeatures.h" 147 #include "core/frame/HostsUsingFeatures.h"
148 #include "core/frame/LocalDOMWindow.h" 148 #include "core/frame/LocalDOMWindow.h"
149 #include "core/frame/LocalFrame.h" 149 #include "core/frame/LocalFrame.h"
150 #include "core/frame/PerformanceMonitor.h"
151 #include "core/frame/Settings.h" 150 #include "core/frame/Settings.h"
152 #include "core/frame/csp/ContentSecurityPolicy.h" 151 #include "core/frame/csp/ContentSecurityPolicy.h"
153 #include "core/html/DocumentNameCollection.h" 152 #include "core/html/DocumentNameCollection.h"
154 #include "core/html/HTMLAllCollection.h" 153 #include "core/html/HTMLAllCollection.h"
155 #include "core/html/HTMLAnchorElement.h" 154 #include "core/html/HTMLAnchorElement.h"
156 #include "core/html/HTMLBaseElement.h" 155 #include "core/html/HTMLBaseElement.h"
157 #include "core/html/HTMLBodyElement.h" 156 #include "core/html/HTMLBodyElement.h"
158 #include "core/html/HTMLCanvasElement.h" 157 #include "core/html/HTMLCanvasElement.h"
159 #include "core/html/HTMLCollection.h" 158 #include "core/html/HTMLCollection.h"
160 #include "core/html/HTMLDialogElement.h" 159 #include "core/html/HTMLDialogElement.h"
(...skipping 1703 matching lines...) Expand 10 before | Expand all | Expand 10 after
1864 // script. Kill the whole layoutObject if someone managed to get into here in 1863 // script. Kill the whole layoutObject if someone managed to get into here in
1865 // states not allowing tree mutations. 1864 // states not allowing tree mutations.
1866 RELEASE_ASSERT(lifecycle().stateAllowsTreeMutations()); 1865 RELEASE_ASSERT(lifecycle().stateAllowsTreeMutations());
1867 1866
1868 TRACE_EVENT_BEGIN1("blink,devtools.timeline", "UpdateLayoutTree", "beginData", 1867 TRACE_EVENT_BEGIN1("blink,devtools.timeline", "UpdateLayoutTree", "beginData",
1869 InspectorRecalculateStylesEvent::data(frame())); 1868 InspectorRecalculateStylesEvent::data(frame()));
1870 1869
1871 unsigned startElementCount = styleEngine().styleForElementCount(); 1870 unsigned startElementCount = styleEngine().styleForElementCount();
1872 1871
1873 InspectorInstrumentation::willRecalculateStyle(this); 1872 InspectorInstrumentation::willRecalculateStyle(this);
1874 PerformanceMonitor::willRecalculateStyle(this);
1875 1873
1876 DocumentAnimations::updateAnimationTimingIfNeeded(*this); 1874 DocumentAnimations::updateAnimationTimingIfNeeded(*this);
1877 evaluateMediaQueryListIfNeeded(); 1875 evaluateMediaQueryListIfNeeded();
1878 updateUseShadowTreesIfNeeded(); 1876 updateUseShadowTreesIfNeeded();
1879 updateDistribution(); 1877 updateDistribution();
1880 updateStyleInvalidationIfNeeded(); 1878 updateStyleInvalidationIfNeeded();
1881 1879
1882 // FIXME: We should update style on our ancestor chain before proceeding 1880 // FIXME: We should update style on our ancestor chain before proceeding
1883 // however doing so currently causes several tests to crash, as 1881 // however doing so currently causes several tests to crash, as
1884 // LocalFrame::setDocument calls Document::attach before setting the 1882 // LocalFrame::setDocument calls Document::attach before setting the
(...skipping 24 matching lines...) Expand all
1909 unsigned elementCount = 1907 unsigned elementCount =
1910 styleEngine().styleForElementCount() - startElementCount; 1908 styleEngine().styleForElementCount() - startElementCount;
1911 1909
1912 TRACE_EVENT_END1("blink,devtools.timeline", "UpdateLayoutTree", 1910 TRACE_EVENT_END1("blink,devtools.timeline", "UpdateLayoutTree",
1913 "elementCount", elementCount); 1911 "elementCount", elementCount);
1914 1912
1915 #if DCHECK_IS_ON() 1913 #if DCHECK_IS_ON()
1916 assertLayoutTreeUpdated(*this); 1914 assertLayoutTreeUpdated(*this);
1917 #endif 1915 #endif
1918 InspectorInstrumentation::didRecalculateStyle(this); 1916 InspectorInstrumentation::didRecalculateStyle(this);
1919 PerformanceMonitor::didRecalculateStyle(this);
1920 } 1917 }
1921 1918
1922 void Document::updateStyle() { 1919 void Document::updateStyle() {
1923 DCHECK(!view()->shouldThrottleRendering()); 1920 DCHECK(!view()->shouldThrottleRendering());
1924 TRACE_EVENT_BEGIN0("blink,blink_style", "Document::updateStyle"); 1921 TRACE_EVENT_BEGIN0("blink,blink_style", "Document::updateStyle");
1925 SCOPED_BLINK_UMA_HISTOGRAM_TIMER("Style.UpdateTime"); 1922 SCOPED_BLINK_UMA_HISTOGRAM_TIMER("Style.UpdateTime");
1926 1923
1927 unsigned initialElementCount = styleEngine().styleForElementCount(); 1924 unsigned initialElementCount = styleEngine().styleForElementCount();
1928 1925
1929 HTMLFrameOwnerElement::UpdateSuspendScope suspendWidgetHierarchyUpdates; 1926 HTMLFrameOwnerElement::UpdateSuspendScope suspendWidgetHierarchyUpdates;
(...skipping 4548 matching lines...) Expand 10 before | Expand all | Expand 10 after
6478 } 6475 }
6479 6476
6480 void showLiveDocumentInstances() { 6477 void showLiveDocumentInstances() {
6481 WeakDocumentSet& set = liveDocumentSet(); 6478 WeakDocumentSet& set = liveDocumentSet();
6482 fprintf(stderr, "There are %u documents currently alive:\n", set.size()); 6479 fprintf(stderr, "There are %u documents currently alive:\n", set.size());
6483 for (Document* document : set) 6480 for (Document* document : set)
6484 fprintf(stderr, "- Document %p URL: %s\n", document, 6481 fprintf(stderr, "- Document %p URL: %s\n", document,
6485 document->url().getString().utf8().data()); 6482 document->url().getString().utf8().data());
6486 } 6483 }
6487 #endif 6484 #endif
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/bindings/core/v8/V8ScriptRunner.cpp ('k') | third_party/WebKit/Source/core/events/EventTarget.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698