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

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: 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
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 260 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 * @implements {WebInspector.TraceEventFilter} 1838 * @implements {WebInspector.TraceEventFilter}
1839 * @param {function(!WebInspector.TracingModel.Event):boolean} filter
1840 */
1841 WebInspector.CustomFilter = function(filter)
1842 {
1843 WebInspector.TraceEventFilter.call(this);
1844 this._filter = filter;
1845 }
1846
1847 WebInspector.CustomFilter.prototype = {
1848 /**
1849 * @override
1850 * @param {!WebInspector.TracingModel.Event} event
1851 * @return {boolean}
1852 */
1853 accept: function(event)
1854 {
1855 return this._filter(event);
1856 }
1857 }
1858
1859 /**
1860 * @constructor
1861 * @implements {WebInspector.TraceEventFilter}
1839 */ 1862 */
1840 WebInspector.ExcludeTopLevelFilter = function() 1863 WebInspector.ExcludeTopLevelFilter = function()
1841 { 1864 {
1842 } 1865 }
1843 1866
1844 WebInspector.ExcludeTopLevelFilter.prototype = { 1867 WebInspector.ExcludeTopLevelFilter.prototype = {
1845 /** 1868 /**
1846 * @override 1869 * @override
1847 * @param {!WebInspector.TracingModel.Event} event 1870 * @param {!WebInspector.TracingModel.Event} event
1848 * @return {boolean} 1871 * @return {boolean}
(...skipping 491 matching lines...) Expand 10 before | Expand all | Expand 10 after
2340 /** @type {!Object.<string, !Array.<!WebInspector.InvalidationTrackingEv ent>>} */ 2363 /** @type {!Object.<string, !Array.<!WebInspector.InvalidationTrackingEv ent>>} */
2341 this._invalidations = {}; 2364 this._invalidations = {};
2342 /** @type {!Object.<number, !Array.<!WebInspector.InvalidationTrackingEv ent>>} */ 2365 /** @type {!Object.<number, !Array.<!WebInspector.InvalidationTrackingEv ent>>} */
2343 this._invalidationsByNodeId = {}; 2366 this._invalidationsByNodeId = {};
2344 2367
2345 this._lastRecalcStyle = undefined; 2368 this._lastRecalcStyle = undefined;
2346 this._lastPaintWithLayer = undefined; 2369 this._lastPaintWithLayer = undefined;
2347 this._didPaint = false; 2370 this._didPaint = false;
2348 } 2371 }
2349 } 2372 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698