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

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

Issue 2344633005: Add histograms for parseAuthorStyleSheet and updateStyle (Closed)
Patch Set: Created 4 years, 3 months 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 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 1769 matching lines...) Expand 10 before | Expand all | Expand 10 after
1780 #if DCHECK_IS_ON() 1780 #if DCHECK_IS_ON()
1781 assertLayoutTreeUpdated(*this); 1781 assertLayoutTreeUpdated(*this);
1782 #endif 1782 #endif
1783 InspectorInstrumentation::didRecalculateStyle(this); 1783 InspectorInstrumentation::didRecalculateStyle(this);
1784 } 1784 }
1785 1785
1786 void Document::updateStyle() 1786 void Document::updateStyle()
1787 { 1787 {
1788 DCHECK(!view()->shouldThrottleRendering()); 1788 DCHECK(!view()->shouldThrottleRendering());
1789 TRACE_EVENT_BEGIN0("blink,blink_style", "Document::updateStyle"); 1789 TRACE_EVENT_BEGIN0("blink,blink_style", "Document::updateStyle");
1790 SCOPED_BLINK_UMA_HISTOGRAM_TIMER("Style.UpdateTime");
1791
1790 unsigned initialElementCount = styleEngine().styleForElementCount(); 1792 unsigned initialElementCount = styleEngine().styleForElementCount();
1791 1793
1792 HTMLFrameOwnerElement::UpdateSuspendScope suspendWidgetHierarchyUpdates; 1794 HTMLFrameOwnerElement::UpdateSuspendScope suspendWidgetHierarchyUpdates;
1793 m_lifecycle.advanceTo(DocumentLifecycle::InStyleRecalc); 1795 m_lifecycle.advanceTo(DocumentLifecycle::InStyleRecalc);
1794 1796
1795 StyleRecalcChange change = NoChange; 1797 StyleRecalcChange change = NoChange;
1796 if (getStyleChangeType() >= SubtreeStyleChange) 1798 if (getStyleChangeType() >= SubtreeStyleChange)
1797 change = Force; 1799 change = Force;
1798 1800
1799 NthIndexCache nthIndexCache(*this); 1801 NthIndexCache nthIndexCache(*this);
(...skipping 4292 matching lines...) Expand 10 before | Expand all | Expand 10 after
6092 } 6094 }
6093 6095
6094 void showLiveDocumentInstances() 6096 void showLiveDocumentInstances()
6095 { 6097 {
6096 WeakDocumentSet& set = liveDocumentSet(); 6098 WeakDocumentSet& set = liveDocumentSet();
6097 fprintf(stderr, "There are %u documents currently alive:\n", set.size()); 6099 fprintf(stderr, "There are %u documents currently alive:\n", set.size());
6098 for (Document* document : set) 6100 for (Document* document : set)
6099 fprintf(stderr, "- Document %p URL: %s\n", document, document->url().get String().utf8().data()); 6101 fprintf(stderr, "- Document %p URL: %s\n", document, document->url().get String().utf8().data());
6100 } 6102 }
6101 #endif 6103 #endif
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/css/StyleSheetContents.cpp ('k') | tools/metrics/histograms/histograms.xml » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698