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

Unified Diff: Source/devtools/front_end/timeline/TimelinePanel.js

Issue 1183483011: DevTools: Support popover on timeline overview. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: index-based -> frame-based 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 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 a1f08028b4ea4e4ad4c3205907dcc476e286df27..5cf4b73a6ea75a3eb0acfb385bba77366398ffec 100644
--- a/Source/devtools/front_end/timeline/TimelinePanel.js
+++ b/Source/devtools/front_end/timeline/TimelinePanel.js
@@ -1819,6 +1819,8 @@ WebInspector.TimelineFilmStripOverview = function(tracingModel)
this._tracingModel = tracingModel;
this._filmStripView = new WebInspector.FilmStripView();
this._filmStripView.show(this.element);
+ this._lastFrame = null;
+ this._lastElement = null;
}
WebInspector.TimelineFilmStripOverview.prototype = {
@@ -1834,10 +1836,31 @@ WebInspector.TimelineFilmStripOverview.prototype = {
/**
* @override
+ * @param {number} x
+ * @return {?Element}
+ */
+ popoverElement: function(x)
+ {
+ if (!this._filmStripModel || !this._filmStripModel.frames().length)
+ return null;
+ var time = this._calculator.positionToTime(x);
+ var frame = this._filmStripView.frameByTime(time);
+ if (frame !== this._lastFrame) {
+ this._lastFrame = frame;
+ this._lastElement = this._filmStripView.createFrameElement(frame);
+ this._lastElement.appendChild(WebInspector.Widget.createStyleElement("timeline/timelinePanel.css"));
+ }
+ return this._lastElement;
+ },
+
+ /**
+ * @override
*/
reset: function()
{
this._filmStripView.reset();
+ this._lastFrame = null;
+ this._lastElement = null;
},
__proto__: WebInspector.TimelineOverviewBase.prototype
« no previous file with comments | « Source/devtools/front_end/components_lazy/filmStripView.css ('k') | Source/devtools/front_end/timeline/timelinePanel.css » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698