| OLD | NEW |
| 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 1535 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1546 */ | 1546 */ |
| 1547 WebInspector.TimelineModel.buildBottomUpTree = function(topDownTree, groupingCal
lback) | 1547 WebInspector.TimelineModel.buildBottomUpTree = function(topDownTree, groupingCal
lback) |
| 1548 { | 1548 { |
| 1549 var buRoot = new WebInspector.TimelineModel.ProfileTreeNode(); | 1549 var buRoot = new WebInspector.TimelineModel.ProfileTreeNode(); |
| 1550 buRoot.selfTime = 0; | 1550 buRoot.selfTime = 0; |
| 1551 buRoot.totalTime = 0; | 1551 buRoot.totalTime = 0; |
| 1552 buRoot.name = WebInspector.UIString("Bottom-Up Chart"); | 1552 buRoot.name = WebInspector.UIString("Bottom-Up Chart"); |
| 1553 /** @type {!Map<string,!WebInspector.TimelineModel.ProfileTreeNode>} */ | 1553 /** @type {!Map<string,!WebInspector.TimelineModel.ProfileTreeNode>} */ |
| 1554 buRoot.children = new Map(); | 1554 buRoot.children = new Map(); |
| 1555 var nodesOnStack = /** @type {!Set<string>} */ (new Set()); | 1555 var nodesOnStack = /** @type {!Set<string>} */ (new Set()); |
| 1556 topDownTree.children.forEach(processNode); | 1556 if (topDownTree.children) |
| 1557 topDownTree.children.forEach(processNode); |
| 1557 | 1558 |
| 1558 /** | 1559 /** |
| 1559 * @param {!WebInspector.TimelineModel.ProfileTreeNode} tdNode | 1560 * @param {!WebInspector.TimelineModel.ProfileTreeNode} tdNode |
| 1560 */ | 1561 */ |
| 1561 function processNode(tdNode) | 1562 function processNode(tdNode) |
| 1562 { | 1563 { |
| 1563 var buParent = groupingCallback && groupingCallback(tdNode) || buRoot; | 1564 var buParent = groupingCallback && groupingCallback(tdNode) || buRoot; |
| 1564 appendNode(tdNode, buParent); | 1565 appendNode(tdNode, buParent); |
| 1565 var hadNode = nodesOnStack.has(tdNode.id); | 1566 var hadNode = nodesOnStack.has(tdNode.id); |
| 1566 if (!hadNode) | 1567 if (!hadNode) |
| (...skipping 795 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2362 /** @type {!Object.<string, !Array.<!WebInspector.InvalidationTrackingEv
ent>>} */ | 2363 /** @type {!Object.<string, !Array.<!WebInspector.InvalidationTrackingEv
ent>>} */ |
| 2363 this._invalidations = {}; | 2364 this._invalidations = {}; |
| 2364 /** @type {!Object.<number, !Array.<!WebInspector.InvalidationTrackingEv
ent>>} */ | 2365 /** @type {!Object.<number, !Array.<!WebInspector.InvalidationTrackingEv
ent>>} */ |
| 2365 this._invalidationsByNodeId = {}; | 2366 this._invalidationsByNodeId = {}; |
| 2366 | 2367 |
| 2367 this._lastRecalcStyle = undefined; | 2368 this._lastRecalcStyle = undefined; |
| 2368 this._lastPaintWithLayer = undefined; | 2369 this._lastPaintWithLayer = undefined; |
| 2369 this._didPaint = false; | 2370 this._didPaint = false; |
| 2370 } | 2371 } |
| 2371 } | 2372 } |
| OLD | NEW |