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

Side by Side Diff: runtime/observatory/lib/src/elements/curly_block.dart

Issue 2995923002: Restore "Speedup Observatory elements first time rendering" (Closed)
Patch Set: Created 3 years, 4 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
« no previous file with comments | « no previous file | runtime/observatory/lib/src/elements/helpers/rendering_queue.dart » ('j') | 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 curly_block_element; 5 library curly_block_element;
6 6
7 import 'dart:async'; 7 import 'dart:async';
8 import 'dart:html'; 8 import 'dart:html';
9 import 'package:observatory/src/elements/helpers/tag.dart'; 9 import 'package:observatory/src/elements/helpers/tag.dart';
10 import 'package:observatory/src/elements/helpers/rendering_scheduler.dart'; 10 import 'package:observatory/src/elements/helpers/rendering_scheduler.dart';
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
45 } 45 }
46 46
47 factory CurlyBlockElement( 47 factory CurlyBlockElement(
48 {bool expanded: false, bool disabled: false, RenderingQueue queue}) { 48 {bool expanded: false, bool disabled: false, RenderingQueue queue}) {
49 assert(expanded != null); 49 assert(expanded != null);
50 assert(disabled != null); 50 assert(disabled != null);
51 CurlyBlockElement e = document.createElement(tag.name); 51 CurlyBlockElement e = document.createElement(tag.name);
52 e._r = new RenderingScheduler(e, queue: queue); 52 e._r = new RenderingScheduler(e, queue: queue);
53 e._expanded = expanded; 53 e._expanded = expanded;
54 e._disabled = disabled; 54 e._disabled = disabled;
55 e._r.enable();
56 return e; 55 return e;
57 } 56 }
58 57
59 CurlyBlockElement.created() : super.created(); 58 CurlyBlockElement.created() : super.created();
60 59
61 @override 60 @override
62 void attached() { 61 void attached() {
63 super.attached(); 62 super.attached();
64 _r.enable(); 63 _r.enable();
65 } 64 }
(...skipping 30 matching lines...) Expand all
96 ..children = [label]); 95 ..children = [label]);
97 } 96 }
98 if (expanded) { 97 if (expanded) {
99 content.add(new BRElement()); 98 content.add(new BRElement());
100 content.addAll(_content); 99 content.addAll(_content);
101 } 100 }
102 content.add(new SpanElement()..text = '}'); 101 content.add(new SpanElement()..text = '}');
103 children = content; 102 children = content;
104 } 103 }
105 } 104 }
OLDNEW
« no previous file with comments | « no previous file | runtime/observatory/lib/src/elements/helpers/rendering_queue.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698