Commit 7a113c33 authored by Michael Liao's avatar Michael Liao Committed by Commit Bot

DevTools [Memory]: Making containment source links context menu accessible

Changes:
 - Added context menu option for "Reveal in Sources Panel" on data grid entries that contain source links

Context menu on entry with source link:
https://imgur.com/PnIQF7z

Context menu on entry without source link:
https://imgur.com/xoNwSIX

Bug: 963183

Change-Id: I4c94ab2d3115704d1a8740b81161633b25b547e1
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1717317
Commit-Queue: Michael Liao <michael.liao@microsoft.com>
Reviewed-by: default avatarYang Guo <yangguo@chromium.org>
Cr-Commit-Position: refs/heads/master@{#703871}
parent 1804364a
......@@ -146,6 +146,9 @@ Profiler.HeapSnapshotSortableDataGrid = class extends DataGrid.DataGrid {
contextMenu.revealSection().appendItem(ls`Reveal in Summary view`, () => {
this._dataDisplayDelegate.showObject(node.snapshotNodeId, ls`Summary`);
});
if (gridNode.linkElement && !contextMenu.containsTarget(gridNode.linkElement)) {
contextMenu.appendApplicableItems(gridNode.linkElement);
}
}
resetSortingCache() {
......
......@@ -616,6 +616,7 @@ Profiler.HeapSnapshotGenericObjectNode = class extends Profiler.HeapSnapshotGrid
const link = await this._dataGrid.dataDisplayDelegate().linkifyObject(this.snapshotNodeIndex);
if (link) {
linkContainer.appendChild(link);
this.linkElement = link;
} else {
linkContainer.remove();
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment