Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(96)

Side by Side Diff: Source/devtools/front_end/timeline/TimelineTreeView.js

Issue 1315643009: DevTools: Tweak timeline tree view bars (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 415 matching lines...) Expand 10 before | Expand all | Expand 10 after
426 return null; 426 return null;
427 var cell = this.createTD(columnIdentifier); 427 var cell = this.createTD(columnIdentifier);
428 cell.className = "numeric-column"; 428 cell.className = "numeric-column";
429 var textDiv = cell.createChild("div"); 429 var textDiv = cell.createChild("div");
430 textDiv.createChild("span").textContent = this.data[columnIdentifier]; 430 textDiv.createChild("span").textContent = this.data[columnIdentifier];
431 var percentColumn = columnIdentifier + "-percent"; 431 var percentColumn = columnIdentifier + "-percent";
432 if (percentColumn in this.data) { 432 if (percentColumn in this.data) {
433 textDiv.createChild("span", "percent-column").textContent = this.dat a[percentColumn]; 433 textDiv.createChild("span", "percent-column").textContent = this.dat a[percentColumn];
434 textDiv.classList.add("profile-multiple-values"); 434 textDiv.classList.add("profile-multiple-values");
435 } 435 }
436 cell.createChild("div", "background-bar").style.width = (this._profileNo de[columnIdentifier + "Time"] * 100 / this._maxTimes[columnIdentifier]).toFixed( 1) + "%"; 436 var bar = cell.createChild("div", "background-bar-container").createChil d("div", "background-bar");
437 bar.style.width = (this._profileNode[columnIdentifier + "Time"] * 100 / this._maxTimes[columnIdentifier]).toFixed(1) + "%";
437 return cell; 438 return cell;
438 }, 439 },
439 440
440 /** 441 /**
441 * @override 442 * @override
442 */ 443 */
443 populate: function() 444 populate: function()
444 { 445 {
445 if (this._populated) 446 if (this._populated)
446 return; 447 return;
447 this._populated = true; 448 this._populated = true;
448 if (!this._profileNode.children) 449 if (!this._profileNode.children)
449 return; 450 return;
450 for (var node of this._profileNode.children.values()) { 451 for (var node of this._profileNode.children.values()) {
451 var gridNode = new WebInspector.TimelineTreeView.GridNode(node, this ._totalTime, this._maxTimes.self, this._maxTimes.total, this._treeView); 452 var gridNode = new WebInspector.TimelineTreeView.GridNode(node, this ._totalTime, this._maxTimes.self, this._maxTimes.total, this._treeView);
452 this.insertChildOrdered(gridNode); 453 this.insertChildOrdered(gridNode);
453 } 454 }
454 }, 455 },
455 456
456 __proto__: WebInspector.SortableDataGridNode.prototype 457 __proto__: WebInspector.SortableDataGridNode.prototype
457 } 458 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698