Chromium Code Reviews| Index: Source/devtools/front_end/TimelineUIUtils.js |
| diff --git a/Source/devtools/front_end/TimelineUIUtils.js b/Source/devtools/front_end/TimelineUIUtils.js |
| index b7c73e81f7d4aaae5f6aa1da63562c13a02eff34..7765ee45f1ea6886383afc842d3703309a5fd348 100644 |
| --- a/Source/devtools/front_end/TimelineUIUtils.js |
| +++ b/Source/devtools/front_end/TimelineUIUtils.js |
| @@ -295,9 +295,10 @@ WebInspector.TimelineUIUtils._generateAggregatedInfo = function(aggregatedStats) |
| * @param {!Object} aggregatedStats |
| * @param {!WebInspector.TimelineCategory=} selfCategory |
| * @param {number=} selfTime |
| + * @param {number=} energy |
| * @return {!Element} |
| */ |
| -WebInspector.TimelineUIUtils.generatePieChart = function(aggregatedStats, selfCategory, selfTime) |
| +WebInspector.TimelineUIUtils.generatePieChart = function(aggregatedStats, selfCategory, selfTime, energy) |
| { |
| var element = document.createElement("div"); |
| element.className = "timeline-aggregated-info"; |
| @@ -346,6 +347,12 @@ WebInspector.TimelineUIUtils.generatePieChart = function(aggregatedStats, selfCa |
| rowElement.createChild("div", "timeline-aggregated-category timeline-" + category.name); |
| rowElement.createTextChild(WebInspector.UIString("%s %s", formatter(value), category.title)); |
| } |
| + |
| + if (energy) { |
| + var rowElement = footerElement.createChild("div"); |
| + rowElement.createChild("div", "timeline-aggregated-category timeline-" + "power"); |
|
alph
2014/04/09 16:02:27
what does this div do? Is it empty?
|
| + rowElement.createTextChild(WebInspector.UIString("%0.2f joules %s", energy, "Energy")); |
|
alph
2014/04/09 16:02:27
%.2f
Why not just put "Energy" inside the UIStrin
|
| + } |
| return element; |
| } |