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

Unified Diff: tracing/tracing/ui/analysis/memory_dump_heap_details_breakdown_view.html

Issue 2373913003: [tracing] Navigate to parent node in heap dump UI upon pressing backspace (Closed) Base URL: git@github.com:catapult-project/catapult.git@master
Patch Set: Use Array.prototype.includes Created 4 years, 2 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
« no previous file with comments | « no previous file | tracing/tracing/ui/analysis/memory_dump_heap_details_path_view.html » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tracing/tracing/ui/analysis/memory_dump_heap_details_breakdown_view.html
diff --git a/tracing/tracing/ui/analysis/memory_dump_heap_details_breakdown_view.html b/tracing/tracing/ui/analysis/memory_dump_heap_details_breakdown_view.html
index c98f9840ee6e07d44c90be1491817464f85eeeb9..55e74094468d2ca89baa2d64a92748624a181775 100644
--- a/tracing/tracing/ui/analysis/memory_dump_heap_details_breakdown_view.html
+++ b/tracing/tracing/ui/analysis/memory_dump_heap_details_breakdown_view.html
@@ -52,6 +52,7 @@ tr.exportTo('tr.ui.analysis', function() {
ready: function() {
this.scheduleRebuild_();
+ this.root.addEventListener('keydown', this.onKeyDown_.bind(this), true);
},
get displayedNode() {
@@ -108,6 +109,21 @@ tr.exportTo('tr.ui.analysis', function() {
this.$.tabs.label = 'Break selected node further by:';
else
this.$.tabs.label = 'Selected node cannot be broken down any further.';
+ },
+
+ onKeyDown_: function(keyEvent) {
+ if (keyEvent.keyCode !== 8 /* backspace */)
+ return;
+ if (!this.displayedNode_ || !this.displayedNode_.parentNode)
+ return;
+
+ // Enter the parent node upon pressing backspace.
+ var viewEvent = new tr.b.Event('enter-node');
+ viewEvent.node = this.displayedNode_.parentNode;
+ this.dispatchEvent(viewEvent);
+
+ keyEvent.stopPropagation();
+ keyEvent.preventDefault();
}
});
« no previous file with comments | « no previous file | tracing/tracing/ui/analysis/memory_dump_heap_details_path_view.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698