| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 /** | 5 /** |
| 6 * @unrestricted | 6 * @unrestricted |
| 7 * @implements {UI.Searchable} | 7 * @implements {UI.Searchable} |
| 8 */ | 8 */ |
| 9 Timeline.TimelineTreeView = class extends UI.VBox { | 9 Timeline.TimelineTreeView = class extends UI.VBox { |
| 10 constructor() { | 10 constructor() { |
| (...skipping 222 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 233 } | 233 } |
| 234 | 234 |
| 235 /** | 235 /** |
| 236 * @protected | 236 * @protected |
| 237 */ | 237 */ |
| 238 refreshTree() { | 238 refreshTree() { |
| 239 this._linkifier.reset(); | 239 this._linkifier.reset(); |
| 240 if (this._searchableView) | 240 if (this._searchableView) |
| 241 this._searchableView.cancelSearch(); | 241 this._searchableView.cancelSearch(); |
| 242 this._dataGrid.rootNode().removeChildren(); | 242 this._dataGrid.rootNode().removeChildren(); |
| 243 if (!this._model) | 243 if (!this._model) { |
| 244 this._updateDetailsForSelection(); |
| 244 return; | 245 return; |
| 246 } |
| 245 this._root = this._buildTree(); | 247 this._root = this._buildTree(); |
| 246 var children = this._root.children(); | 248 var children = this._root.children(); |
| 247 var maxSelfTime = 0; | 249 var maxSelfTime = 0; |
| 248 var maxTotalTime = 0; | 250 var maxTotalTime = 0; |
| 249 for (var child of children.values()) { | 251 for (var child of children.values()) { |
| 250 maxSelfTime = Math.max(maxSelfTime, child.selfTime); | 252 maxSelfTime = Math.max(maxSelfTime, child.selfTime); |
| 251 maxTotalTime = Math.max(maxTotalTime, child.totalTime); | 253 maxTotalTime = Math.max(maxTotalTime, child.totalTime); |
| 252 } | 254 } |
| 253 for (var child of children.values()) { | 255 for (var child of children.values()) { |
| 254 // Exclude the idle time off the total calculation. | 256 // Exclude the idle time off the total calculation. |
| (...skipping 730 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 985 | 987 |
| 986 _onSelectionChanged() { | 988 _onSelectionChanged() { |
| 987 this.dispatchEventToListeners(Timeline.TimelineStackView.Events.SelectionCha
nged); | 989 this.dispatchEventToListeners(Timeline.TimelineStackView.Events.SelectionCha
nged); |
| 988 } | 990 } |
| 989 }; | 991 }; |
| 990 | 992 |
| 991 /** @enum {symbol} */ | 993 /** @enum {symbol} */ |
| 992 Timeline.TimelineStackView.Events = { | 994 Timeline.TimelineStackView.Events = { |
| 993 SelectionChanged: Symbol('SelectionChanged') | 995 SelectionChanged: Symbol('SelectionChanged') |
| 994 }; | 996 }; |
| OLD | NEW |