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

Unified Diff: tools/memory_inspector/memory_inspector/frontends/www_content/js/rootUi.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
« no previous file with comments | « tools/memory_inspector/memory_inspector/frontends/www_content/js/processes.js ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/memory_inspector/memory_inspector/frontends/www_content/js/rootUi.js
diff --git a/tools/memory_inspector/memory_inspector/frontends/www_content/js/rootUi.js b/tools/memory_inspector/memory_inspector/frontends/www_content/js/rootUi.js
index bb4c80e7f0632983488535b0d24f4681129ae2ba..8e29546a926da4af2250b49a37b57f5bbdda27aa 100644
--- a/tools/memory_inspector/memory_inspector/frontends/www_content/js/rootUi.js
+++ b/tools/memory_inspector/memory_inspector/frontends/www_content/js/rootUi.js
@@ -4,6 +4,8 @@
rootUi = new (function() {
+this.savedScrollTop_ = 0;
+
this.onDomReady_ = function() {
$('#js_loading_banner').hide();
$('#tabs').tabs({activate: this.onTabChange_.bind(this)});
@@ -84,6 +86,15 @@ this.onServerUnreachableOrTimeout = function() {
'It probably crashed, Check the terminal output.');
};
+// Sad hack required to work around a Google Table bug (goo.gl/TXr3vL).
+this.saveScrollPosition = function() {
+ this.savedScrollTop_ = $('#wrapper').scrollTop();
+};
+
+this.restoreScrollPosition = function() {
+ $('#wrapper').scrollTop(this.savedScrollTop_);
+};
+
$(document).ready(this.onDomReady_.bind(this));
})();
« no previous file with comments | « tools/memory_inspector/memory_inspector/frontends/www_content/js/processes.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698