OLD | NEW |
---|---|
1 /* | 1 /* |
2 * Copyright (C) 2012 Google Inc. All rights reserved. | 2 * Copyright (C) 2012 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 756 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
767 this._statusPane.hide(); | 767 this._statusPane.hide(); |
768 delete this._statusPane; | 768 delete this._statusPane; |
769 this._clear(); | 769 this._clear(); |
770 return; | 770 return; |
771 } | 771 } |
772 | 772 |
773 if (this._statusPane) | 773 if (this._statusPane) |
774 this._statusPane.updateStatus(WebInspector.UIString("Processing time line\u2026")); | 774 this._statusPane.updateStatus(WebInspector.UIString("Processing time line\u2026")); |
775 this._model.setEvents(this._tracingModel, loadedFromFile); | 775 this._model.setEvents(this._tracingModel, loadedFromFile); |
776 this._frameModel.reset(); | 776 this._frameModel.reset(); |
777 this._frameModel.addTraceEvents(this._model.target(), this._model.inspec tedTargetEvents(), this._model.sessionId() || ""); | 777 this._frameModel.addTraceEvents(WebInspector.targetManager.mainTarget(), this._model.inspectedTargetEvents(), this._model.sessionId() || ""); |
778 | 778 |
779 var groups = WebInspector.TimelineModel.AsyncEventGroup; | 779 var groups = WebInspector.TimelineModel.AsyncEventGroup; |
780 var asyncEventsByGroup = this._model.mainThreadAsyncEvents(); | 780 var asyncEventsByGroup = this._model.mainThreadAsyncEvents(); |
781 this._irModel.populate(asyncEventsByGroup.get(groups.input), asyncEvents ByGroup.get(groups.animation)); | 781 this._irModel.populate(asyncEventsByGroup.get(groups.input), asyncEvents ByGroup.get(groups.animation)); |
782 this._model.cpuProfiles().forEach(profile => WebInspector.LineLevelProfi le.instance().appendCPUProfile(profile)); | 782 this._model.cpuProfiles().forEach(profile => WebInspector.LineLevelProfi le.instance().appendCPUProfile(profile)); |
783 if (this._statusPane) | 783 if (this._statusPane) |
784 this._statusPane.hide(); | 784 this._statusPane.hide(); |
785 delete this._statusPane; | 785 delete this._statusPane; |
786 this._overviewPane.reset(); | 786 this._overviewPane.reset(); |
787 this._overviewPane.setBounds(this._model.minimumRecordTime(), this._mode l.maximumRecordTime()); | 787 this._overviewPane.setBounds(this._model.minimumRecordTime(), this._mode l.maximumRecordTime()); |
(...skipping 293 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1081 if (event.name === WebInspector.TimelineModel.RecordType.Paint || event. name === WebInspector.TimelineModel.RecordType.RasterTask) | 1081 if (event.name === WebInspector.TimelineModel.RecordType.Paint || event. name === WebInspector.TimelineModel.RecordType.RasterTask) |
1082 this._showEventInPaintProfiler(event); | 1082 this._showEventInPaintProfiler(event); |
1083 }, | 1083 }, |
1084 | 1084 |
1085 /** | 1085 /** |
1086 * @param {!WebInspector.TracingModel.Event} event | 1086 * @param {!WebInspector.TracingModel.Event} event |
1087 * @param {boolean=} isCloseable | 1087 * @param {boolean=} isCloseable |
1088 */ | 1088 */ |
1089 _showEventInPaintProfiler: function(event, isCloseable) | 1089 _showEventInPaintProfiler: function(event, isCloseable) |
1090 { | 1090 { |
1091 var target = this._model.target(); | 1091 var target = this._model.targetByEvent(event); |
caseq
2016/07/19 22:48:58
I think it should be fine to use main target here,
alph
2016/07/19 23:10:29
Done.
| |
1092 if (!target) | 1092 if (!target) |
1093 return; | 1093 return; |
1094 var paintProfilerView = this._paintProfilerView(); | 1094 var paintProfilerView = this._paintProfilerView(); |
1095 var hasProfileData = paintProfilerView.setEvent(target, event); | 1095 var hasProfileData = paintProfilerView.setEvent(target, event); |
1096 if (!hasProfileData) | 1096 if (!hasProfileData) |
1097 return; | 1097 return; |
1098 if (!this._detailsView.hasTab(WebInspector.TimelinePanel.DetailsTab.Pain tProfiler)) | 1098 if (!this._detailsView.hasTab(WebInspector.TimelinePanel.DetailsTab.Pain tProfiler)) |
1099 this._detailsView.appendTab(WebInspector.TimelinePanel.DetailsTab.Pa intProfiler, WebInspector.UIString("Paint Profiler"), paintProfilerView, undefin ed, undefined, isCloseable); | 1099 this._detailsView.appendTab(WebInspector.TimelinePanel.DetailsTab.Pa intProfiler, WebInspector.UIString("Paint Profiler"), paintProfilerView, undefin ed, undefined, isCloseable); |
1100 }, | 1100 }, |
1101 | 1101 |
(...skipping 935 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
2037 * @override | 2037 * @override |
2038 * @param {!WebInspector.Target} target | 2038 * @param {!WebInspector.Target} target |
2039 */ | 2039 */ |
2040 targetRemoved: function(target) | 2040 targetRemoved: function(target) |
2041 { | 2041 { |
2042 this._targets.remove(target, true); | 2042 this._targets.remove(target, true); |
2043 }, | 2043 }, |
2044 | 2044 |
2045 __proto__: WebInspector.Object.prototype | 2045 __proto__: WebInspector.Object.prototype |
2046 } | 2046 } |
OLD | NEW |