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

Unified Diff: runtime/observatory/lib/src/app/view_model.dart

Issue 928833003: Add Function based profile tree (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 5 years, 10 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: runtime/observatory/lib/src/app/view_model.dart
diff --git a/runtime/observatory/lib/src/app/view_model.dart b/runtime/observatory/lib/src/app/view_model.dart
index 48d0c10ce0948eaa15265c7a74e597bf098bbbbf..0be6fbeb487fac8503e9fe027c6fc8ff6084a5b6 100644
--- a/runtime/observatory/lib/src/app/view_model.dart
+++ b/runtime/observatory/lib/src/app/view_model.dart
@@ -65,12 +65,16 @@ abstract class TableTreeRow extends Observable {
tableColumns.add(cell);
}
var firstColumn = tableColumns[0];
+ var columnContainer = new DivElement();
+ columnContainer.classes.add('flex-row');
_expander = new SpanElement();
_expander.style.display = 'inline-block';
+ _expander.style.display = 'inline-block';
_expander.style.minWidth = '1.5em';
_expander.onClick.listen(onClick);
- firstColumn.children.add(_expander);
+ columnContainer.children.add(_expander);
firstColumn.style.paddingLeft = '${depth * subtreeIndent}px';
+ firstColumn.children.add(columnContainer);
updateExpanderView();
}
@@ -135,10 +139,14 @@ class TableTree extends Observable {
/// Create a table tree with column [headers].
TableTree(this.tableBody, this.columnCount);
- /// Initialize the table tree with the list of root children.
- void initialize(TableTreeRow root) {
+ void clear() {
tableBody.children.clear();
rows.clear();
+ }
+
+ /// Initialize the table tree with the list of root children.
+ void initialize(TableTreeRow root) {
+ clear();
root.onShow();
rows.addAll(root.children);
for (var i = 0; i < rows.length; i++) {
@@ -247,7 +255,6 @@ class SortedTable extends Observable {
}
void sort() {
- Stopwatch sw = new Stopwatch()..start();
assert(_sortColumnIndex >= 0);
assert(_sortColumnIndex < columns.length);
if (_sortDescending) {
« no previous file with comments | « runtime/observatory/lib/src/app/utils.dart ('k') | runtime/observatory/lib/src/cpu_profile/cpu_profile.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698