| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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.TimelineUIUtils} | 7 * @extends {WebInspector.TimelineUIUtils} |
| 8 */ | 8 */ |
| 9 WebInspector.TracingTimelineUIUtils = function() | 9 WebInspector.TracingTimelineUIUtils = function() |
| 10 { | 10 { |
| (...skipping 695 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 706 var index = events.binaryIndexOf(event.startTime, eventComparator); | 706 var index = events.binaryIndexOf(event.startTime, eventComparator); |
| 707 var hasChildren = false; | 707 var hasChildren = false; |
| 708 var endTime = event.endTime; | 708 var endTime = event.endTime; |
| 709 if (endTime) { | 709 if (endTime) { |
| 710 for (var i = index; i < events.length; i++) { | 710 for (var i = index; i < events.length; i++) { |
| 711 var nextEvent = events[i]; | 711 var nextEvent = events[i]; |
| 712 if (nextEvent.startTime >= endTime) | 712 if (nextEvent.startTime >= endTime) |
| 713 break; | 713 break; |
| 714 if (!nextEvent.selfTime) | 714 if (!nextEvent.selfTime) |
| 715 continue; | 715 continue; |
| 716 if (nextEvent.thread !== event.thread) |
| 717 continue; |
| 716 if (i > index) | 718 if (i > index) |
| 717 hasChildren = true; | 719 hasChildren = true; |
| 718 var category = WebInspector.TracingTimelineUIUtils.styleForTraceEven
t(nextEvent.name).category.name; | 720 var category = WebInspector.TracingTimelineUIUtils.styleForTraceEven
t(nextEvent.name).category.name; |
| 719 total[category] = (total[category] || 0) + nextEvent.selfTime; | 721 total[category] = (total[category] || 0) + nextEvent.selfTime; |
| 720 } | 722 } |
| 721 } | 723 } |
| 722 return hasChildren; | 724 return hasChildren; |
| 723 } | 725 } |
| 724 | 726 |
| 725 /** | 727 /** |
| (...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 802 return result; | 804 return result; |
| 803 } | 805 } |
| 804 | 806 |
| 805 /** | 807 /** |
| 806 * @return {!WebInspector.TracingTimelineModel.Filter} | 808 * @return {!WebInspector.TracingTimelineModel.Filter} |
| 807 */ | 809 */ |
| 808 WebInspector.TracingTimelineUIUtils.hiddenEventsFilter = function() | 810 WebInspector.TracingTimelineUIUtils.hiddenEventsFilter = function() |
| 809 { | 811 { |
| 810 return new WebInspector.TracingTimelineModel.InclusiveEventNameFilter(WebIns
pector.TracingTimelineUIUtils._visibleTypes()); | 812 return new WebInspector.TracingTimelineModel.InclusiveEventNameFilter(WebIns
pector.TracingTimelineUIUtils._visibleTypes()); |
| 811 } | 813 } |
| OLD | NEW |