Chromium Code Reviews| 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 * @constructor | 6 * @constructor |
| 7 * @extends {WebInspector.VBox} | 7 * @extends {WebInspector.VBox} |
| 8 * @param {!WebInspector.TimelineModel} model | 8 * @param {!WebInspector.TimelineModel} model |
| 9 */ | 9 */ |
| 10 WebInspector.TimelineTreeView = function(model) | 10 WebInspector.TimelineTreeView = function(model) |
| (...skipping 336 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 347 return this._createNameCell(columnIdentifier); | 347 return this._createNameCell(columnIdentifier); |
| 348 return this._createValueCell(columnIdentifier) || WebInspector.DataGridN ode.prototype.createCell.call(this, columnIdentifier); | 348 return this._createValueCell(columnIdentifier) || WebInspector.DataGridN ode.prototype.createCell.call(this, columnIdentifier); |
| 349 }, | 349 }, |
| 350 | 350 |
| 351 /** | 351 /** |
| 352 * @param {string} columnIdentifier | 352 * @param {string} columnIdentifier |
| 353 * @return {!Element} | 353 * @return {!Element} |
| 354 */ | 354 */ |
| 355 _createNameCell: function(columnIdentifier) | 355 _createNameCell: function(columnIdentifier) |
| 356 { | 356 { |
| 357 /** | |
| 358 * @param {!WebInspector.TracingModel.Event} e | |
| 359 * @return {string} | |
| 360 */ | |
| 361 function eventName(e) | |
|
caseq
2015/08/17 22:05:36
inline?
alph
2015/08/18 21:03:22
Done.
| |
| 362 { | |
| 363 if (e.name === WebInspector.TimelineModel.RecordType.JSFrame) | |
| 364 return WebInspector.beautifyFunctionName(e.args.data.functionNam e); | |
| 365 return WebInspector.TimelineUIUtils.eventTitle(e); | |
| 366 } | |
| 357 var cell = this.createTD(columnIdentifier); | 367 var cell = this.createTD(columnIdentifier); |
| 358 var container = cell.createChild("div", "name-container"); | 368 var container = cell.createChild("div", "name-container"); |
| 359 var icon = container.createChild("div", "activity-icon"); | 369 var icon = container.createChild("div", "activity-icon"); |
| 360 var name = container.createChild("div", "activity-name"); | 370 var name = container.createChild("div", "activity-name"); |
| 361 var link = container.createChild("div", "activity-link"); | 371 var link = container.createChild("div", "activity-link"); |
| 362 name.textContent = this._profileNode.name; | 372 name.textContent = this._profileNode.name || eventName(this._profileNode .event); |
| 363 var color; | 373 var color; |
| 364 var event = this._profileNode.event; | 374 var event = this._profileNode.event; |
| 365 if (event) { | 375 if (event) { |
| 366 var url = WebInspector.TimelineTreeView.eventURL(event); | 376 var url = WebInspector.TimelineTreeView.eventURL(event); |
| 367 if (url) | 377 if (url) |
| 368 link.appendChild(WebInspector.linkifyResourceAsNode(url)); | 378 link.appendChild(WebInspector.linkifyResourceAsNode(url)); |
| 369 var category = WebInspector.TimelineUIUtils.eventStyle(event).catego ry; | 379 var category = WebInspector.TimelineUIUtils.eventStyle(event).catego ry; |
| 370 color = category.fillColorStop1; | 380 color = category.fillColorStop1; |
| 371 } else { | 381 } else { |
| 372 color = WebInspector.TimelineUIUtils.colorForURL(this._profileNode.n ame); | 382 color = WebInspector.TimelineUIUtils.colorForURL(this._profileNode.n ame); |
| (...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 413 if (!this._profileNode.children) | 423 if (!this._profileNode.children) |
| 414 return; | 424 return; |
| 415 for (var node of this._profileNode.children.values()) { | 425 for (var node of this._profileNode.children.values()) { |
| 416 var gridNode = new WebInspector.TimelineTreeView.GridNode(node, this ._totalTime); | 426 var gridNode = new WebInspector.TimelineTreeView.GridNode(node, this ._totalTime); |
| 417 this.insertChildOrdered(gridNode); | 427 this.insertChildOrdered(gridNode); |
| 418 } | 428 } |
| 419 }, | 429 }, |
| 420 | 430 |
| 421 __proto__: WebInspector.SortableDataGridNode.prototype | 431 __proto__: WebInspector.SortableDataGridNode.prototype |
| 422 } | 432 } |
| OLD | NEW |