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

Side by Side Diff: runtime/bin/vmservice/client/lib/src/elements/isolate_profile.dart

Issue 301653004: Auto expand first profiler row when it has no siblings (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 6 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « runtime/bin/vmservice/client/deployed/web/index_devtools.html_bootstrap.dart.js ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 library isolate_profile_element; 5 library isolate_profile_element;
6 6
7 import 'dart:html'; 7 import 'dart:html';
8 import 'observatory_element.dart'; 8 import 'observatory_element.dart';
9 import 'package:logging/logging.dart'; 9 import 'package:logging/logging.dart';
10 import 'package:observatory/service.dart'; 10 import 'package:observatory/service.dart';
(...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after
156 var root = profile.isolate.profileTrieRoot; 156 var root = profile.isolate.profileTrieRoot;
157 if (root == null) { 157 if (root == null) {
158 return; 158 return;
159 } 159 }
160 try { 160 try {
161 tree.initialize( 161 tree.initialize(
162 new ProfileCodeTrieNodeTreeRow(profile, root, root, null)); 162 new ProfileCodeTrieNodeTreeRow(profile, root, root, null));
163 } catch (e, stackTrace) { 163 } catch (e, stackTrace) {
164 Logger.root.warning('_buildStackTree', e, stackTrace); 164 Logger.root.warning('_buildStackTree', e, stackTrace);
165 } 165 }
166 // Check if we only have one node at the root and expand it.
167 if (tree.rows.length == 1) {
168 tree.toggle(0);
169 }
166 notifyPropertyChange(#tree, null, tree); 170 notifyPropertyChange(#tree, null, tree);
167 } 171 }
168 172
169 void _buildTree() { 173 void _buildTree() {
170 _buildStackTree(); 174 _buildStackTree();
171 } 175 }
172 176
173 @observable String padding(TableTreeRow row) { 177 @observable String padding(TableTreeRow row) {
174 return 'padding-left: ${row.depth * 16}px;'; 178 return 'padding-left: ${row.depth * 16}px;';
175 } 179 }
(...skipping 18 matching lines...) Expand all
194 if (row is TableRowElement) { 198 if (row is TableRowElement) {
195 // Subtract 1 to get 0 based indexing. 199 // Subtract 1 to get 0 based indexing.
196 try { 200 try {
197 tree.toggle(row.rowIndex - 1); 201 tree.toggle(row.rowIndex - 1);
198 } catch (e, stackTrace) { 202 } catch (e, stackTrace) {
199 Logger.root.warning('toggleExpanded', e, stackTrace); 203 Logger.root.warning('toggleExpanded', e, stackTrace);
200 } 204 }
201 } 205 }
202 } 206 }
203 } 207 }
OLDNEW
« no previous file with comments | « runtime/bin/vmservice/client/deployed/web/index_devtools.html_bootstrap.dart.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698