Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 library fn; | 5 library fn; |
| 6 | 6 |
| 7 import 'app.dart'; | 7 import 'app.dart'; |
| 8 import 'dart:async'; | 8 import 'dart:async'; |
| 9 import 'dart:collection'; | 9 import 'dart:collection'; |
| 10 import 'dart:mirrors'; | 10 import 'dart:mirrors'; |
| (...skipping 512 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 523 root.callback = callback; | 523 root.callback = callback; |
| 524 } | 524 } |
| 525 | 525 |
| 526 void remove() { | 526 void remove() { |
| 527 root.callback = null; | 527 root.callback = null; |
| 528 super.remove(); | 528 super.remove(); |
| 529 } | 529 } |
| 530 | 530 |
| 531 } | 531 } |
| 532 | 532 |
| 533 final List<UINode> _emptyList = new List<UINode>(); | |
| 534 | |
| 535 abstract class MultiChildRenderObjectWrapper extends RenderObjectWrapper { | 533 abstract class MultiChildRenderObjectWrapper extends RenderObjectWrapper { |
| 536 | 534 |
| 537 // In MultiChildRenderObjectWrapper subclasses, slots are RenderObject nodes | 535 // In MultiChildRenderObjectWrapper subclasses, slots are RenderObject nodes |
| 538 // to use as the "insert before" sibling in ContainerRenderObjectMixin.add() c alls | 536 // to use as the "insert before" sibling in ContainerRenderObjectMixin.add() c alls |
| 539 | 537 |
| 540 MultiChildRenderObjectWrapper({ | 538 MultiChildRenderObjectWrapper({ |
| 541 Object key, | 539 Object key, |
| 542 List<UINode> children | 540 List<UINode> children |
| 543 }) : this.children = children == null ? _emptyList : children, | 541 }) : this.children = children == null ? const [] : children, |
|
Hixie
2015/06/10 19:39:17
const <UINode>[]
| |
| 544 super( | 542 super( |
| 545 key: key | 543 key: key |
| 546 ) { | 544 ) { |
| 547 assert(!_debugHasDuplicateIds()); | 545 assert(!_debugHasDuplicateIds()); |
| 548 } | 546 } |
| 549 | 547 |
| 550 final List<UINode> children; | 548 final List<UINode> children; |
| 551 | 549 |
| 552 void insert(RenderObjectWrapper child, dynamic slot) { | 550 void insert(RenderObjectWrapper child, dynamic slot) { |
| 553 final root = this.root; // TODO(ianh): Remove this once the analyzer is clev erer | 551 final root = this.root; // TODO(ianh): Remove this once the analyzer is clev erer |
| (...skipping 572 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1126 } | 1124 } |
| 1127 | 1125 |
| 1128 } | 1126 } |
| 1129 | 1127 |
| 1130 class Text extends Component { | 1128 class Text extends Component { |
| 1131 Text(this.data) : super(key: '*text*'); | 1129 Text(this.data) : super(key: '*text*'); |
| 1132 final String data; | 1130 final String data; |
| 1133 bool get interchangeable => true; | 1131 bool get interchangeable => true; |
| 1134 UINode build() => new Paragraph(text: data); | 1132 UINode build() => new Paragraph(text: data); |
| 1135 } | 1133 } |
| OLD | NEW |