Index: third_party/WebKit/Source/devtools/front_end/timeline/TimelineFlameChartView.js |
diff --git a/third_party/WebKit/Source/devtools/front_end/timeline/TimelineFlameChartView.js b/third_party/WebKit/Source/devtools/front_end/timeline/TimelineFlameChartView.js |
index d38e8a2ed1d186d9ab40a0216fcdf93ca49b119f..8a1df75f6598ef0bcd79ff73991cd98069810e54 100644 |
--- a/third_party/WebKit/Source/devtools/front_end/timeline/TimelineFlameChartView.js |
+++ b/third_party/WebKit/Source/devtools/front_end/timeline/TimelineFlameChartView.js |
@@ -73,6 +73,7 @@ Timeline.TimelineFlameChartView = class extends UI.VBox { |
this._onNetworkEntrySelected = this._onEntrySelected.bind(this, this._networkDataProvider); |
this._mainFlameChart.addEventListener(PerfUI.FlameChart.Events.EntrySelected, this._onMainEntrySelected, this); |
this._networkFlameChart.addEventListener(PerfUI.FlameChart.Events.EntrySelected, this._onNetworkEntrySelected, this); |
+ this._mainFlameChart.addEventListener(PerfUI.FlameChart.Events.EntryHighlighted, this._onEntryHighlighted, this); |
this._nextExtensionIndex = 0; |
this._boundRefresh = this._refresh.bind(this); |
@@ -150,6 +151,25 @@ Timeline.TimelineFlameChartView = class extends UI.VBox { |
} |
/** |
+ * @param {!Common.Event} commonEvent |
+ */ |
+ _onEntryHighlighted(commonEvent) { |
+ SDK.DOMModel.hideDOMNodeHighlight(); |
+ var entryIndex = /** @type {number} */ (commonEvent.data); |
+ var event = this._mainDataProvider.eventByIndex(entryIndex); |
+ if (!event) |
+ return; |
+ var target = this._model && this._model.timelineModel().targetByEvent(event); |
+ if (!target) |
+ return; |
+ var timelineData = TimelineModel.TimelineData.forEvent(event); |
+ var backendNodeId = timelineData.backendNodeId; |
+ if (!backendNodeId) |
+ return; |
+ new SDK.DeferredDOMNode(target, backendNodeId).highlight(); |
+ } |
+ |
+ /** |
* @override |
* @param {?SDK.TracingModel.Event} event |
*/ |