OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2013 Google Inc. All rights reserved. | 2 * Copyright (C) 2013 Google Inc. All rights reserved. |
3 * Copyright (C) 2012 Intel Inc. All rights reserved. | 3 * Copyright (C) 2012 Intel Inc. All rights reserved. |
4 * | 4 * |
5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
6 * modification, are permitted provided that the following conditions are | 6 * modification, are permitted provided that the following conditions are |
7 * met: | 7 * met: |
8 * | 8 * |
9 * * Redistributions of source code must retain the above copyright | 9 * * Redistributions of source code must retain the above copyright |
10 * notice, this list of conditions and the following disclaimer. | 10 * notice, this list of conditions and the following disclaimer. |
(...skipping 322 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
333 * @param {?WebInspector.TimelinePresentationModel.Record} presentationRecor
d | 333 * @param {?WebInspector.TimelinePresentationModel.Record} presentationRecor
d |
334 */ | 334 */ |
335 _selectRecord: function(presentationRecord) | 335 _selectRecord: function(presentationRecord) |
336 { | 336 { |
337 if (presentationRecord.coalesced()) { | 337 if (presentationRecord.coalesced()) { |
338 // Presentation record does not have model record to highlight. | 338 // Presentation record does not have model record to highlight. |
339 this._innerSetSelectedRecord(presentationRecord); | 339 this._innerSetSelectedRecord(presentationRecord); |
340 var aggregatedStats = {}; | 340 var aggregatedStats = {}; |
341 var presentationChildren = presentationRecord.presentationChildren()
; | 341 var presentationChildren = presentationRecord.presentationChildren()
; |
342 for (var i = 0; i < presentationChildren.length; ++i) | 342 for (var i = 0; i < presentationChildren.length; ++i) |
343 WebInspector.TimelineUIUtils.aggregateTimeByCategory(aggregatedS
tats, presentationChildren[i].record().aggregatedStats); | 343 WebInspector.TimelineUIUtils.aggregateTimeByCategory(aggregatedS
tats, presentationChildren[i].record().aggregatedStats()); |
344 var idle = presentationRecord.record().endTime() - presentationRecor
d.record().startTime(); | 344 var idle = presentationRecord.record().endTime() - presentationRecor
d.record().startTime(); |
345 for (var category in aggregatedStats) | 345 for (var category in aggregatedStats) |
346 idle -= aggregatedStats[category]; | 346 idle -= aggregatedStats[category]; |
347 aggregatedStats["idle"] = idle; | 347 aggregatedStats["idle"] = idle; |
348 var pieChart = WebInspector.TimelineUIUtils.generatePieChart(aggrega
tedStats); | 348 var pieChart = WebInspector.TimelineUIUtils.generatePieChart(aggrega
tedStats); |
349 this._delegate.showInDetails(WebInspector.TimelineUIUtils.recordStyl
e(presentationRecord.record()).title, pieChart); | 349 this._delegate.showInDetails(WebInspector.TimelineUIUtils.recordStyl
e(presentationRecord.record()).title, pieChart); |
350 return; | 350 return; |
351 } | 351 } |
352 this._delegate.select(WebInspector.TimelineSelection.fromRecord(presenta
tionRecord.record())); | 352 this._delegate.select(WebInspector.TimelineSelection.fromRecord(presenta
tionRecord.record())); |
353 }, | 353 }, |
(...skipping 936 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1290 this._element.classList.remove("hidden"); | 1290 this._element.classList.remove("hidden"); |
1291 } else | 1291 } else |
1292 this._element.classList.add("hidden"); | 1292 this._element.classList.add("hidden"); |
1293 }, | 1293 }, |
1294 | 1294 |
1295 _dispose: function() | 1295 _dispose: function() |
1296 { | 1296 { |
1297 this._element.remove(); | 1297 this._element.remove(); |
1298 } | 1298 } |
1299 } | 1299 } |
OLD | NEW |