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

Unified Diff: chrome/browser/resources/task_manager/main.js

Issue 9288017: WebUI TaskManager: Use the specified height of row on refleshing. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: merge with master Created 8 years, 11 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 | « chrome/browser/resources/shared/js/cr/ui/list.js ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/resources/task_manager/main.js
diff --git a/chrome/browser/resources/task_manager/main.js b/chrome/browser/resources/task_manager/main.js
index 7965150b0879be078bf79bb51ede99db810a5e08..b4cb77b386e7137fb079cf565def72724627dc49 100644
--- a/chrome/browser/resources/task_manager/main.js
+++ b/chrome/browser/resources/task_manager/main.js
@@ -37,6 +37,12 @@ var DEFAULT_COLUMNS = [
['v8MemoryAllocatedSize', 'javascriptMemoryAllocatedColumn', 120, false],
];
+/*
+ * Height of each tasks. It is 20px, which is also defined in CSS.
+ * @const
+ */
+var HEIGHT_OF_TASK = 20;
+
var COMMAND_CONTEXTMENU_COLUMN_PREFIX = 'columnContextMenu';
var COMMAND_CONTEXTMENU_TABLE_PREFIX = 'tableContextMenu';
@@ -532,6 +538,11 @@ TaskManager.prototype = {
// Stores the cell element to the dictionary.
this.elementsCache_[pid].cell[i] = cell;
}
+
+ // Specifies the height of the row. The height of each row is
+ // 'num_of_tasks * HEIGHT_OF_TASK' px.
+ listItem.style.height = (data['uniqueId'].length * HEIGHT_OF_TASK) + 'px';
+
listItem.data = data;
// Stores the list item element, the number of columns and the number of
« no previous file with comments | « chrome/browser/resources/shared/js/cr/ui/list.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698