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 240 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
251 _syncNode(); | 251 _syncNode(); |
252 | 252 |
253 for (var child in _children) { | 253 for (var child in _children) { |
254 child._sync(null, _root, null); | 254 child._sync(null, _root, null); |
255 assert(child._root is sky.Node); | 255 assert(child._root is sky.Node); |
256 } | 256 } |
257 | 257 |
258 return false; | 258 return false; |
259 } | 259 } |
260 | 260 |
| 261 if (this == oldElement) |
| 262 return false; |
| 263 |
261 _root = oldElement._root; | 264 _root = oldElement._root; |
262 oldElement._root = null; | 265 oldElement._root = null; |
263 sky.Element root = (_root as sky.Element); | 266 sky.Element root = (_root as sky.Element); |
264 | 267 |
265 _syncNode(oldElement); | 268 _syncNode(oldElement); |
266 | 269 |
267 var startIndex = 0; | 270 var startIndex = 0; |
268 var endIndex = _children.length; | 271 var endIndex = _children.length; |
269 | 272 |
270 var oldChildren = oldElement._children; | 273 var oldChildren = oldElement._children; |
(...skipping 405 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
676 | 679 |
677 _sync(null, _host, null); | 680 _sync(null, _host, null); |
678 assert(_root is sky.Node); | 681 assert(_root is sky.Node); |
679 | 682 |
680 sw.stop(); | 683 sw.stop(); |
681 if (_shouldLogRenderDuration) | 684 if (_shouldLogRenderDuration) |
682 print("Initial build: ${sw.elapsedMicroseconds} microseconds"); | 685 print("Initial build: ${sw.elapsedMicroseconds} microseconds"); |
683 }); | 686 }); |
684 } | 687 } |
685 } | 688 } |
OLD | NEW |