| 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 968 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 979 | 979 |
| 980 _updateSelectionDetails: function() | 980 _updateSelectionDetails: function() |
| 981 { | 981 { |
| 982 if (!this._selection) { | 982 if (!this._selection) { |
| 983 this._updateSelectedRangeStats(); | 983 this._updateSelectedRangeStats(); |
| 984 return; | 984 return; |
| 985 } | 985 } |
| 986 switch (this._selection.type()) { | 986 switch (this._selection.type()) { |
| 987 case WebInspector.TimelineSelection.Type.Record: | 987 case WebInspector.TimelineSelection.Type.Record: |
| 988 var record = /** @type {!WebInspector.TimelineModel.Record} */ (this
._selection.object()); | 988 var record = /** @type {!WebInspector.TimelineModel.Record} */ (this
._selection.object()); |
| 989 if (this._tracingTimelineModel) { | 989 this._uiUtils.generateDetailsContent(record, this._model, this._deta
ilsLinkifier, this.showInDetails.bind(this, record.title()), this._model.loadedF
romFile()); |
| 990 var event = this._tracingTimelineModel.traceEventFrom(record); | |
| 991 this._buildSelectionDetailsForTraceEvent(event); | |
| 992 } else { | |
| 993 WebInspector.TimelineUIUtils.generateDetailsContent(record, this
._model, this._detailsLinkifier, this.showInDetails.bind(this, record.title()),
this._model.loadedFromFile()); | |
| 994 } | |
| 995 break; | 990 break; |
| 996 case WebInspector.TimelineSelection.Type.TraceEvent: | 991 case WebInspector.TimelineSelection.Type.TraceEvent: |
| 997 var event = /** @type {!WebInspector.TracingModel.Event} */ (this._s
election.object()); | 992 var event = /** @type {!WebInspector.TracingModel.Event} */ (this._s
election.object()); |
| 998 this._buildSelectionDetailsForTraceEvent(event); | 993 var title = WebInspector.TracingTimelineUIUtils.styleForTraceEvent(e
vent.name).title; |
| 994 WebInspector.TracingTimelineUIUtils.buildTraceEventDetails(event, th
is._tracingTimelineModel, this._detailsLinkifier, this.showInDetails.bind(this,
title), false, this._model.target()); |
| 999 break; | 995 break; |
| 1000 case WebInspector.TimelineSelection.Type.Frame: | 996 case WebInspector.TimelineSelection.Type.Frame: |
| 1001 var frame = /** @type {!WebInspector.TimelineFrame} */ (this._select
ion.object()); | 997 var frame = /** @type {!WebInspector.TimelineFrame} */ (this._select
ion.object()); |
| 1002 this.showInDetails(WebInspector.UIString("Frame Statistics"), WebIns
pector.TimelineUIUtils.generateDetailsContentForFrame(this._lazyFrameModel, fram
e)); | 998 this.showInDetails(WebInspector.UIString("Frame Statistics"), WebIns
pector.TimelineUIUtils.generateDetailsContentForFrame(this._lazyFrameModel, fram
e)); |
| 1003 if (frame.layerTree) { | 999 if (frame.layerTree) { |
| 1004 var layersView = this._layersView(); | 1000 var layersView = this._layersView(); |
| 1005 layersView.showLayerTree(frame.layerTree); | 1001 layersView.showLayerTree(frame.layerTree); |
| 1006 this._detailsView.appendTab("layers", WebInspector.UIString("Lay
ers"), layersView); | 1002 this._detailsView.appendTab("layers", WebInspector.UIString("Lay
ers"), layersView); |
| 1007 } | 1003 } |
| 1008 break; | 1004 break; |
| 1009 } | 1005 } |
| 1010 }, | 1006 }, |
| 1011 | 1007 |
| 1012 /** | |
| 1013 * @param {!WebInspector.TracingModel.Event} event | |
| 1014 */ | |
| 1015 _buildSelectionDetailsForTraceEvent: function(event) | |
| 1016 { | |
| 1017 var title = WebInspector.TimelineUIUtils.styleForTimelineEvent(event.nam
e).title; | |
| 1018 WebInspector.TracingTimelineUIUtils.buildTraceEventDetails(event, this._
tracingTimelineModel, this._detailsLinkifier, this.showInDetails.bind(this, titl
e), false, this._model.target()); | |
| 1019 }, | |
| 1020 | |
| 1021 _updateSelectedRangeStats: function() | 1008 _updateSelectedRangeStats: function() |
| 1022 { | 1009 { |
| 1023 if (this._selection) | 1010 if (this._selection) |
| 1024 return; | 1011 return; |
| 1025 | 1012 |
| 1026 var startTime = this._windowStartTime; | 1013 var startTime = this._windowStartTime; |
| 1027 var endTime = this._windowEndTime; | 1014 var endTime = this._windowEndTime; |
| 1028 | 1015 |
| 1029 // Return early in case 0 selection window. | 1016 // Return early in case 0 selection window. |
| 1030 if (startTime < 0) | 1017 if (startTime < 0) |
| (...skipping 423 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1454 * @param {!WebInspector.TimelineModel.Record} record | 1441 * @param {!WebInspector.TimelineModel.Record} record |
| 1455 * @return {boolean} | 1442 * @return {boolean} |
| 1456 */ | 1443 */ |
| 1457 accept: function(record) | 1444 accept: function(record) |
| 1458 { | 1445 { |
| 1459 return !this._hiddenRecords[record.type()]; | 1446 return !this._hiddenRecords[record.type()]; |
| 1460 }, | 1447 }, |
| 1461 | 1448 |
| 1462 __proto__: WebInspector.TimelineModel.Filter.prototype | 1449 __proto__: WebInspector.TimelineModel.Filter.prototype |
| 1463 } | 1450 } |
| OLD | NEW |