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

Unified Diff: runtime/observatory/lib/src/elements/curly_block.dart

Issue 2345023003: Use dartfmt on Observatory code (Closed)
Patch Set: merge Created 4 years, 3 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/elements/curly_block.dart
diff --git a/runtime/observatory/lib/src/elements/curly_block.dart b/runtime/observatory/lib/src/elements/curly_block.dart
index 54e0d3f685d9ec94b762bc4dfa8078f1353746d2..b320a9a04e418a427ee2558f764e162d7ffe758e 100644
--- a/runtime/observatory/lib/src/elements/curly_block.dart
+++ b/runtime/observatory/lib/src/elements/curly_block.dart
@@ -37,14 +37,15 @@ class CurlyBlockElement extends HtmlElement implements Renderable {
if (_expanded != value) _onToggle.add(new CurlyBlockToggleEvent(this));
_expanded = _r.checkAndReact(_expanded, value);
}
+
set disabled(bool value) => _disabled = _r.checkAndReact(_disabled, value);
set content(Iterable<Element> value) {
_content = value.toList();
_r.dirty();
}
- factory CurlyBlockElement({bool expanded: false, bool disabled: false,
- RenderingQueue queue}) {
+ factory CurlyBlockElement(
+ {bool expanded: false, bool disabled: false, RenderingQueue queue}) {
assert(expanded != null);
assert(disabled != null);
CurlyBlockElement e = document.createElement(tag.name);
@@ -58,11 +59,15 @@ class CurlyBlockElement extends HtmlElement implements Renderable {
CurlyBlockElement.created() : super.created();
@override
- void attached() { super.attached(); _r.enable(); }
+ void attached() {
+ super.attached();
+ _r.enable();
+ }
@override
void detached() {
- super.detached(); _r.disable(notify: true);
+ super.detached();
+ _r.disable(notify: true);
children = [];
}
@@ -75,18 +80,19 @@ class CurlyBlockElement extends HtmlElement implements Renderable {
}
void render() {
- List<Element> content = [
- new SpanElement()..text = '{'
- ];
+ List<Element> content = [new SpanElement()..text = '{'];
SpanElement label = new SpanElement()
..classes = disabled ? ['curly-block', 'disabled'] : ['curly-block']
- ..innerHtml = expanded ?
- '&nbsp;&nbsp;&#8863;&nbsp;&nbsp;' : '&nbsp;&nbsp;&#8862;&nbsp;&nbsp;';
+ ..innerHtml = expanded
+ ? '&nbsp;&nbsp;&#8863;&nbsp;&nbsp;'
+ : '&nbsp;&nbsp;&#8862;&nbsp;&nbsp;';
if (disabled) {
content.add(label);
} else {
content.add(new AnchorElement()
- ..onClick.listen((_) { toggle(); })
+ ..onClick.listen((_) {
+ toggle();
+ })
..children = [label]);
}
if (expanded) {
« no previous file with comments | « runtime/observatory/lib/src/elements/cpu_profile_table.dart ('k') | runtime/observatory/lib/src/elements/debugger.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698