Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(519)

Side by Side Diff: Source/devtools/front_end/timeline/TimelinePanel.js

Issue 1164613002: DevTools: Simplify firstFrameAfterCommit. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 1009 matching lines...) Expand 10 before | Expand all | Expand 10 after
1020 WebInspector.TimelineUIUtils.buildTraceEventDetails(event, this._mod el, this._detailsLinkifier, this._appendDetailsTabsForTraceEventAndShowDetails.b ind(this, event)); 1020 WebInspector.TimelineUIUtils.buildTraceEventDetails(event, this._mod el, this._detailsLinkifier, this._appendDetailsTabsForTraceEventAndShowDetails.b ind(this, event));
1021 break; 1021 break;
1022 case WebInspector.TimelineSelection.Type.TraceEvent: 1022 case WebInspector.TimelineSelection.Type.TraceEvent:
1023 var event = /** @type {!WebInspector.TracingModel.Event} */ (this._s election.object()); 1023 var event = /** @type {!WebInspector.TracingModel.Event} */ (this._s election.object());
1024 WebInspector.TimelineUIUtils.buildTraceEventDetails(event, this._mod el, this._detailsLinkifier, this._appendDetailsTabsForTraceEventAndShowDetails.b ind(this, event)); 1024 WebInspector.TimelineUIUtils.buildTraceEventDetails(event, this._mod el, this._detailsLinkifier, this._appendDetailsTabsForTraceEventAndShowDetails.b ind(this, event));
1025 break; 1025 break;
1026 case WebInspector.TimelineSelection.Type.Frame: 1026 case WebInspector.TimelineSelection.Type.Frame:
1027 var frame = /** @type {!WebInspector.TimelineFrame} */ (this._select ion.object()); 1027 var frame = /** @type {!WebInspector.TimelineFrame} */ (this._select ion.object());
1028 if (Runtime.experiments.isEnabled("filmStripInNetworkAndTimeline") & & !this._filmStripModel) 1028 if (Runtime.experiments.isEnabled("filmStripInNetworkAndTimeline") & & !this._filmStripModel)
1029 this._filmStripModel = new WebInspector.FilmStripModel(this._tra cingModel); 1029 this._filmStripModel = new WebInspector.FilmStripModel(this._tra cingModel);
1030 var filmStripFrame = this._filmStripModel && this._filmStripModel.fi rstFrameAfterCommit(frame.endTime); 1030 var filmStripFrame = this._filmStripModel && this._filmStripModel.fr ameByTimestamp(frame.endTime);
1031 if (filmStripFrame && filmStripFrame.timestamp - frame.endTime > 10)
1032 filmStripFrame = null;
1031 this.showInDetails(WebInspector.TimelineUIUtils.generateDetailsConte ntForFrame(this._lazyFrameModel, frame, filmStripFrame)); 1033 this.showInDetails(WebInspector.TimelineUIUtils.generateDetailsConte ntForFrame(this._lazyFrameModel, frame, filmStripFrame));
1032 if (frame.layerTree) { 1034 if (frame.layerTree) {
1033 var layersView = this._layersView(); 1035 var layersView = this._layersView();
1034 layersView.showLayerTree(frame.layerTree, frame.paints); 1036 layersView.showLayerTree(frame.layerTree, frame.paints);
1035 if (!this._detailsView.hasTab(WebInspector.TimelinePanel.Details Tab.LayerViewer)) 1037 if (!this._detailsView.hasTab(WebInspector.TimelinePanel.Details Tab.LayerViewer))
1036 this._detailsView.appendTab(WebInspector.TimelinePanel.Detai lsTab.LayerViewer, WebInspector.UIString("Layers"), layersView); 1038 this._detailsView.appendTab(WebInspector.TimelinePanel.Detai lsTab.LayerViewer, WebInspector.UIString("Layers"), layersView);
1037 } 1039 }
1038 break; 1040 break;
1039 case WebInspector.TimelineSelection.Type.Range: 1041 case WebInspector.TimelineSelection.Type.Range:
1040 this._updateSelectedRangeStats(this._selection._startTime, this._sel ection._endTime); 1042 this._updateSelectedRangeStats(this._selection._startTime, this._sel ection._endTime);
(...skipping 736 matching lines...) Expand 10 before | Expand all | Expand 10 after
1777 * @override 1779 * @override
1778 * @param {string} value 1780 * @param {string} value
1779 */ 1781 */
1780 handleQueryParam: function(value) 1782 handleQueryParam: function(value)
1781 { 1783 {
1782 WebInspector.TimelinePanel.show(); 1784 WebInspector.TimelinePanel.show();
1783 WebInspector.TimelinePanel.instance()._loadFromURL(value); 1785 WebInspector.TimelinePanel.instance()._loadFromURL(value);
1784 } 1786 }
1785 } 1787 }
1786 1788
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698