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

Unified Diff: tools/memory_inspector/memory_inspector/frontends/www_content/js/processes.js

Issue 1138523003: [memory-inspector] Fix zygote wrapper script and UI scrolling (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 7 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
Index: tools/memory_inspector/memory_inspector/frontends/www_content/js/processes.js
diff --git a/tools/memory_inspector/memory_inspector/frontends/www_content/js/processes.js b/tools/memory_inspector/memory_inspector/frontends/www_content/js/processes.js
index 75e602181bd2af8c060da1beaffb3db92ec672bc..ec49d80faf5a678c3cb3c90b1ce80898145e1839 100644
--- a/tools/memory_inspector/memory_inspector/frontends/www_content/js/processes.js
+++ b/tools/memory_inspector/memory_inspector/frontends/www_content/js/processes.js
@@ -46,6 +46,8 @@ this.onDomReady_ = function() {
this.psTable_ = new google.visualization.Table($('#ps-table')[0]);
google.visualization.events.addListener(
this.psTable_, 'select', this.onPsTableRowSelect_.bind(this));
+ google.visualization.events.addListener(
+ this.psTable_, 'ready', this.onPsTableRedrawn_.bind(this));
$('#ps-table').on('dblclick', this.snapshotSelectedProcess_.bind(this));
// Create the device stats charts.
@@ -199,6 +201,10 @@ this.onPsTableRowSelect_ = function() {
this.startSelectedProcessStats();
};
+this.onPsTableRedrawn_ = function() {
+ rootUi.restoreScrollPosition();
+};
+
this.onPsAjaxResponse_ = function(data) {
this.psTableData_ = new google.visualization.DataTable(data);
this.redrawPsTable_();
@@ -210,6 +216,7 @@ this.redrawPsTable_ = function(data) {
// Redraw table preserving sorting info.
var sort = this.psTable_.getSortInfo() || {column: -1, ascending: false};
+ rootUi.saveScrollPosition();
this.psTable_.draw(this.psTableData_, {sortColumn: sort.column,
sortAscending: sort.ascending});
};

Powered by Google App Engine
This is Rietveld 408576698