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(); |
} |
}); |