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

Unified 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, 7 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 side-by-side diff with in-line comments
Download patch
Index: Source/devtools/front_end/timeline/TimelinePanel.js
diff --git a/Source/devtools/front_end/timeline/TimelinePanel.js b/Source/devtools/front_end/timeline/TimelinePanel.js
index 1ccc731fdf61f93ae2a9d24d53ca97b3441167fb..f48c2658b1167454923e9dc4d43ee4e827335951 100644
--- a/Source/devtools/front_end/timeline/TimelinePanel.js
+++ b/Source/devtools/front_end/timeline/TimelinePanel.js
@@ -1027,7 +1027,9 @@ WebInspector.TimelinePanel.prototype = {
var frame = /** @type {!WebInspector.TimelineFrame} */ (this._selection.object());
if (Runtime.experiments.isEnabled("filmStripInNetworkAndTimeline") && !this._filmStripModel)
this._filmStripModel = new WebInspector.FilmStripModel(this._tracingModel);
- var filmStripFrame = this._filmStripModel && this._filmStripModel.firstFrameAfterCommit(frame.endTime);
+ var filmStripFrame = this._filmStripModel && this._filmStripModel.frameByTimestamp(frame.endTime);
+ if (filmStripFrame && filmStripFrame.timestamp - frame.endTime > 10)
+ filmStripFrame = null;
this.showInDetails(WebInspector.TimelineUIUtils.generateDetailsContentForFrame(this._lazyFrameModel, frame, filmStripFrame));
if (frame.layerTree) {
var layersView = this._layersView();

Powered by Google App Engine
This is Rietveld 408576698