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 341 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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 var cell = this.createTD(columnIdentifier); | 357 var cell = this.createTD(columnIdentifier); |
358 var container = cell.createChild("div", "name-container"); | 358 var container = cell.createChild("div", "name-container"); |
359 var icon = container.createChild("div", "activity-icon"); | 359 var icon = container.createChild("div", "activity-icon"); |
360 var name = container.createChild("div", "activity-name"); | 360 var name = container.createChild("div", "activity-name"); |
361 var link = container.createChild("div", "activity-link"); | 361 var link = container.createChild("div", "activity-link"); |
362 name.textContent = this._profileNode.name; | |
363 var color; | |
364 var event = this._profileNode.event; | 362 var event = this._profileNode.event; |
365 if (event) { | 363 if (event) { |
| 364 name.textContent = event.name === WebInspector.TimelineModel.RecordT
ype.JSFrame |
| 365 ? WebInspector.beautifyFunctionName(event.args["data"]["function
Name"]) |
| 366 : WebInspector.TimelineUIUtils.eventTitle(event); |
366 var url = WebInspector.TimelineTreeView.eventURL(event); | 367 var url = WebInspector.TimelineTreeView.eventURL(event); |
367 if (url) | 368 if (url) |
368 link.appendChild(WebInspector.linkifyResourceAsNode(url)); | 369 link.appendChild(WebInspector.linkifyResourceAsNode(url)); |
369 var category = WebInspector.TimelineUIUtils.eventStyle(event).catego
ry; | 370 var category = WebInspector.TimelineUIUtils.eventStyle(event).catego
ry; |
370 color = category.fillColorStop1; | 371 icon.style.backgroundColor = category.fillColorStop1; |
371 } else { | 372 } else { |
372 color = WebInspector.TimelineUIUtils.colorForURL(this._profileNode.n
ame); | 373 name.textContent = this._profileNode.name; |
| 374 icon.style.backgroundColor = WebInspector.TimelineUIUtils.colorForUR
L(this._profileNode.name); |
373 } | 375 } |
374 icon.style.backgroundColor = color || "lightGrey"; | |
375 return cell; | 376 return cell; |
376 }, | 377 }, |
377 | 378 |
378 /** | 379 /** |
379 * @param {string} columnIdentifier | 380 * @param {string} columnIdentifier |
380 * @return {?Element} | 381 * @return {?Element} |
381 */ | 382 */ |
382 _createValueCell: function(columnIdentifier) | 383 _createValueCell: function(columnIdentifier) |
383 { | 384 { |
384 if (columnIdentifier !== "self" && columnIdentifier !== "total") | 385 if (columnIdentifier !== "self" && columnIdentifier !== "total") |
(...skipping 28 matching lines...) Expand all Loading... |
413 if (!this._profileNode.children) | 414 if (!this._profileNode.children) |
414 return; | 415 return; |
415 for (var node of this._profileNode.children.values()) { | 416 for (var node of this._profileNode.children.values()) { |
416 var gridNode = new WebInspector.TimelineTreeView.GridNode(node, this
._totalTime); | 417 var gridNode = new WebInspector.TimelineTreeView.GridNode(node, this
._totalTime); |
417 this.insertChildOrdered(gridNode); | 418 this.insertChildOrdered(gridNode); |
418 } | 419 } |
419 }, | 420 }, |
420 | 421 |
421 __proto__: WebInspector.SortableDataGridNode.prototype | 422 __proto__: WebInspector.SortableDataGridNode.prototype |
422 } | 423 } |
OLD | NEW |