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

Side by Side Diff: Source/devtools/front_end/timeline/TimelineModel.js

Issue 1298543002: DevTools: Support Top-Down tree view on Timeline (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: addressing comments. Created 5 years, 4 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
« no previous file with comments | « no previous file | Source/devtools/front_end/timeline/TimelinePanel.js » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2012 Google Inc. All rights reserved. 2 * Copyright (C) 2012 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 1537 matching lines...) Expand 10 before | Expand all | Expand 10 after
1548 } 1548 }
1549 1549
1550 WebInspector.TimelineModel.forEachEvent(events, onStartEvent, onEndEvent); 1550 WebInspector.TimelineModel.forEachEvent(events, onStartEvent, onEndEvent);
1551 root.totalTime -= root.selfTime; 1551 root.totalTime -= root.selfTime;
1552 root.selfTime = 0; 1552 root.selfTime = 0;
1553 return root; 1553 return root;
1554 } 1554 }
1555 1555
1556 /** 1556 /**
1557 * @param {!WebInspector.TimelineModel.ProfileTreeNode} topDownTree 1557 * @param {!WebInspector.TimelineModel.ProfileTreeNode} topDownTree
1558 * @param {function(!WebInspector.TimelineModel.ProfileTreeNode):?WebInspector.T imelineModel.ProfileTreeNode=} groupingCallback 1558 * @param {?function(!WebInspector.TimelineModel.ProfileTreeNode):!WebInspector. TimelineModel.ProfileTreeNode=} groupingCallback
1559 * @return {!WebInspector.TimelineModel.ProfileTreeNode} 1559 * @return {!WebInspector.TimelineModel.ProfileTreeNode}
1560 */ 1560 */
1561 WebInspector.TimelineModel.buildBottomUpTree = function(topDownTree, groupingCal lback) 1561 WebInspector.TimelineModel.buildBottomUpTree = function(topDownTree, groupingCal lback)
1562 { 1562 {
1563 var buRoot = new WebInspector.TimelineModel.ProfileTreeNode(); 1563 var buRoot = new WebInspector.TimelineModel.ProfileTreeNode();
1564 buRoot.selfTime = 0; 1564 buRoot.selfTime = 0;
1565 buRoot.totalTime = 0; 1565 buRoot.totalTime = 0;
1566 buRoot.name = WebInspector.UIString("Bottom-Up Chart"); 1566 buRoot.name = WebInspector.UIString("Bottom-Up Chart");
1567 /** @type {!Map<string,!WebInspector.TimelineModel.ProfileTreeNode>} */ 1567 /** @type {!Map<string,!WebInspector.TimelineModel.ProfileTreeNode>} */
1568 buRoot.children = new Map(); 1568 buRoot.children = new Map();
(...skipping 259 matching lines...) Expand 10 before | Expand all | Expand 10 after
1828 { 1828 {
1829 return event.hasCategory(WebInspector.TracingModel.ConsoleEventCategory) 1829 return event.hasCategory(WebInspector.TracingModel.ConsoleEventCategory)
1830 || !!this._eventNames[event.name]; 1830 || !!this._eventNames[event.name];
1831 }, 1831 },
1832 1832
1833 __proto__: WebInspector.TraceEventNameFilter.prototype 1833 __proto__: WebInspector.TraceEventNameFilter.prototype
1834 } 1834 }
1835 1835
1836 /** 1836 /**
1837 * @constructor 1837 * @constructor
1838 * @extends {WebInspector.TraceEventNameFilter}
1839 * @param {!Array<string>} excludeNames
1840 */
1841 WebInspector.ExclusiveTraceEventNameFilter = function(excludeNames)
1842 {
1843 WebInspector.TraceEventNameFilter.call(this, excludeNames);
1844 }
1845
1846 WebInspector.ExclusiveTraceEventNameFilter.prototype = {
1847 /**
1848 * @override
1849 * @param {!WebInspector.TracingModel.Event} event
1850 * @return {boolean}
1851 */
1852 accept: function(event)
1853 {
1854 return !this._eventNames[event.name];
1855 },
1856
1857 __proto__: WebInspector.TraceEventNameFilter.prototype
1858 }
1859
1860 /**
1861 * @constructor
1838 * @implements {WebInspector.TraceEventFilter} 1862 * @implements {WebInspector.TraceEventFilter}
1839 */ 1863 */
1840 WebInspector.ExcludeTopLevelFilter = function() 1864 WebInspector.ExcludeTopLevelFilter = function()
1841 { 1865 {
1842 } 1866 }
1843 1867
1844 WebInspector.ExcludeTopLevelFilter.prototype = { 1868 WebInspector.ExcludeTopLevelFilter.prototype = {
1845 /** 1869 /**
1846 * @override 1870 * @override
1847 * @param {!WebInspector.TracingModel.Event} event 1871 * @param {!WebInspector.TracingModel.Event} event
(...skipping 492 matching lines...) Expand 10 before | Expand all | Expand 10 after
2340 /** @type {!Object.<string, !Array.<!WebInspector.InvalidationTrackingEv ent>>} */ 2364 /** @type {!Object.<string, !Array.<!WebInspector.InvalidationTrackingEv ent>>} */
2341 this._invalidations = {}; 2365 this._invalidations = {};
2342 /** @type {!Object.<number, !Array.<!WebInspector.InvalidationTrackingEv ent>>} */ 2366 /** @type {!Object.<number, !Array.<!WebInspector.InvalidationTrackingEv ent>>} */
2343 this._invalidationsByNodeId = {}; 2367 this._invalidationsByNodeId = {};
2344 2368
2345 this._lastRecalcStyle = undefined; 2369 this._lastRecalcStyle = undefined;
2346 this._lastPaintWithLayer = undefined; 2370 this._lastPaintWithLayer = undefined;
2347 this._didPaint = false; 2371 this._didPaint = false;
2348 } 2372 }
2349 } 2373 }
OLDNEW
« no previous file with comments | « no previous file | Source/devtools/front_end/timeline/TimelinePanel.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698