| 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 * @unrestricted | 5 * @unrestricted |
| 6 */ | 6 */ |
| 7 WebInspector.TimelineTreeView = class extends WebInspector.VBox { | 7 WebInspector.TimelineTreeView = class extends WebInspector.VBox { |
| 8 constructor() { | 8 constructor() { |
| 9 super(); | 9 super(); |
| 10 this.element.classList.add('timeline-tree-view'); | 10 this.element.classList.add('timeline-tree-view'); |
| (...skipping 492 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 503 name: name, | 503 name: name, |
| 504 color: node.event.name === WebInspector.TimelineModel.RecordType.JSFra
me ? | 504 color: node.event.name === WebInspector.TimelineModel.RecordType.JSFra
me ? |
| 505 WebInspector.TimelineUIUtils.eventStyle(node.event).category.color
: | 505 WebInspector.TimelineUIUtils.eventStyle(node.event).category.color
: |
| 506 color | 506 color |
| 507 }; | 507 }; |
| 508 | 508 |
| 509 case WebInspector.AggregatedTimelineTreeView.GroupBy.URL: | 509 case WebInspector.AggregatedTimelineTreeView.GroupBy.URL: |
| 510 break; | 510 break; |
| 511 case WebInspector.AggregatedTimelineTreeView.GroupBy.Frame: | 511 case WebInspector.AggregatedTimelineTreeView.GroupBy.Frame: |
| 512 var frame = this._model.pageFrameById(node.id); | 512 var frame = this._model.pageFrameById(node.id); |
| 513 var frameName; | 513 var frameName = frame ? WebInspector.TimelineUIUtils.displayNameForFrame
(frame, 80) : WebInspector.UIString('Page'); |
| 514 if (frame && frame.url) | |
| 515 frameName = frame.url.startsWith('about:') && frame.name ? `"${frame.n
ame}"` : frame.url; | |
| 516 else | |
| 517 frameName = WebInspector.UIString('Page'); | |
| 518 return { | 514 return { |
| 519 name: frameName, | 515 name: frameName, |
| 520 color: color | 516 color: color |
| 521 }; | 517 }; |
| 522 break; | 518 break; |
| 523 | 519 |
| 524 default: | 520 default: |
| 525 console.assert(false, 'Unexpected aggregation type'); | 521 console.assert(false, 'Unexpected aggregation type'); |
| 526 } | 522 } |
| 527 return {name: node.id || WebInspector.UIString('unattributed'), color: color
}; | 523 return {name: node.id || WebInspector.UIString('unattributed'), color: color
}; |
| (...skipping 396 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 924 | 920 |
| 925 _onSelectionChanged() { | 921 _onSelectionChanged() { |
| 926 this.dispatchEventToListeners(WebInspector.TimelineStackView.Events.Selectio
nChanged); | 922 this.dispatchEventToListeners(WebInspector.TimelineStackView.Events.Selectio
nChanged); |
| 927 } | 923 } |
| 928 }; | 924 }; |
| 929 | 925 |
| 930 /** @enum {symbol} */ | 926 /** @enum {symbol} */ |
| 931 WebInspector.TimelineStackView.Events = { | 927 WebInspector.TimelineStackView.Events = { |
| 932 SelectionChanged: Symbol('SelectionChanged') | 928 SelectionChanged: Symbol('SelectionChanged') |
| 933 }; | 929 }; |
| OLD | NEW |