| 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 'dart:async'; | 7 import 'dart:async'; |
| 8 import 'dart:collection'; | 8 import 'dart:collection'; |
| 9 import 'dart:sky' as sky; | 9 import 'dart:sky' as sky; |
| 10 import 'reflect.dart' as reflect; | 10 import 'reflect.dart' as reflect; |
| (...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 102 } | 102 } |
| 103 | 103 |
| 104 if (node._willSync(oldNode)) { | 104 if (node._willSync(oldNode)) { |
| 105 _traceSync(_SyncOperation.STATEFUL, node._key); | 105 _traceSync(_SyncOperation.STATEFUL, node._key); |
| 106 oldNode._sync(node, host, insertBefore); | 106 oldNode._sync(node, host, insertBefore); |
| 107 node._defunct = true; | 107 node._defunct = true; |
| 108 assert(oldNode._root is RenderCSS); | 108 assert(oldNode._root is RenderCSS); |
| 109 return oldNode; | 109 return oldNode; |
| 110 } | 110 } |
| 111 | 111 |
| 112 assert(!node._defunct); |
| 112 node._parent = this; | 113 node._parent = this; |
| 113 | 114 |
| 114 if (oldNode == null) { | 115 if (oldNode == null) { |
| 115 _traceSync(_SyncOperation.INSERTION, node._key); | 116 _traceSync(_SyncOperation.INSERTION, node._key); |
| 116 } else { | 117 } else { |
| 117 _traceSync(_SyncOperation.STATELESS, node._key); | 118 _traceSync(_SyncOperation.STATELESS, node._key); |
| 118 } | 119 } |
| 119 node._sync(oldNode, host, insertBefore); | 120 node._sync(oldNode, host, insertBefore); |
| 120 if (oldNode != null) | 121 if (oldNode != null) |
| 121 oldNode._defunct = true; | 122 oldNode._defunct = true; |
| (...skipping 799 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 921 _sync(null, _host, _root); | 922 _sync(null, _host, _root); |
| 922 } | 923 } |
| 923 } | 924 } |
| 924 | 925 |
| 925 class Text extends Component { | 926 class Text extends Component { |
| 926 Text(this.data) : super(key: '*text*'); | 927 Text(this.data) : super(key: '*text*'); |
| 927 final String data; | 928 final String data; |
| 928 bool get interchangeable => true; | 929 bool get interchangeable => true; |
| 929 UINode build() => new Paragraph(children: [new TextFragment(data)]); | 930 UINode build() => new Paragraph(children: [new TextFragment(data)]); |
| 930 } | 931 } |
| OLD | NEW |