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; |
}, |