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

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

Issue 400643002: DevTools: Add ability to go to paint record and paint profiler in Timeline from layers view. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Small refactoring. Created 6 years, 5 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 1965c8865cdfec4b56cf26552468b09352f747c1..366ae20201d3adf7f91da515c837f2e7062fee44 100644
--- a/Source/devtools/front_end/timeline/TimelinePanel.js
+++ b/Source/devtools/front_end/timeline/TimelinePanel.js
@@ -285,6 +285,29 @@ WebInspector.TimelinePanel.prototype = {
},
/**
+ * @param {!WebInspector.TracingModel.Event} traceEvent
+ */
+ _selectPaintEvent: function(traceEvent)
caseq 2014/07/17 13:12:22 Why is is specific to paint?
malch 2014/07/17 15:17:44 Done.
+ {
+ var eventRecord = undefined;
+
+ function findRecordWithEvent(record)
+ {
+ if (record.traceEvent() === traceEvent) {
+ eventRecord = record;
+ return true;
+ }
+ return false;
+ }
+
+ this._model.forAllRecords(findRecordWithEvent);
+ if (eventRecord) {
+ var selection = WebInspector.TimelineSelection.fromRecord(eventRecord);
+ this.select(selection);
+ }
+ },
+
+ /**
* @return {!WebInspector.View}
*/
_layersView: function()
@@ -292,6 +315,7 @@ WebInspector.TimelinePanel.prototype = {
if (this._lazyLayersView)
return this._lazyLayersView;
this._lazyLayersView = new WebInspector.TimelineLayersView();
+ this._lazyLayersView.setSelectPaintEventCallback(this._selectPaintEvent.bind(this));
return this._lazyLayersView;
},

Powered by Google App Engine
This is Rietveld 408576698