| 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 870 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 881 fn(); | 881 fn(); |
| 882 } | 882 } |
| 883 | 883 |
| 884 void _didUnmount() { | 884 void _didUnmount() { |
| 885 super._didUnmount(); | 885 super._didUnmount(); |
| 886 if (_unmountCallbacks != null) | 886 if (_unmountCallbacks != null) |
| 887 for (Function fn in _unmountCallbacks) | 887 for (Function fn in _unmountCallbacks) |
| 888 fn(); | 888 fn(); |
| 889 } | 889 } |
| 890 | 890 |
| 891 // TODO(rafaelw): It seems wrong to expose DOM at all. This is presently | |
| 892 // needed to get sizing info. | |
| 893 RenderObject getRoot() => root; | |
| 894 | |
| 895 void remove() { | 891 void remove() { |
| 896 assert(_built != null); | 892 assert(_built != null); |
| 897 assert(root != null); | 893 assert(root != null); |
| 898 removeChild(_built); | 894 removeChild(_built); |
| 899 _built = null; | 895 _built = null; |
| 900 super.remove(); | 896 super.remove(); |
| 901 } | 897 } |
| 902 | 898 |
| 903 bool _willSync(UINode old) { | 899 bool _willSync(UINode old) { |
| 904 assert(!_disqualifiedFromEverAppearingAgain); | 900 assert(!_disqualifiedFromEverAppearingAgain); |
| (...skipping 172 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1077 assert(root.parent is RenderView); | 1073 assert(root.parent is RenderView); |
| 1078 } | 1074 } |
| 1079 } | 1075 } |
| 1080 | 1076 |
| 1081 class Text extends Component { | 1077 class Text extends Component { |
| 1082 Text(this.data) : super(key: '*text*'); | 1078 Text(this.data) : super(key: '*text*'); |
| 1083 final String data; | 1079 final String data; |
| 1084 bool get interchangeable => true; | 1080 bool get interchangeable => true; |
| 1085 UINode build() => new Paragraph(text: data); | 1081 UINode build() => new Paragraph(text: data); |
| 1086 } | 1082 } |
| OLD | NEW |