| 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 import 'dart:async'; | 5 import 'dart:async'; |
| 6 import 'dart:collection'; | 6 import 'dart:collection'; |
| 7 import 'dart:mirrors'; | 7 import 'dart:mirrors'; |
| 8 import 'dart:sky' as sky; | 8 import 'dart:sky' as sky; |
| 9 | 9 |
| 10 import '../app/view.dart'; | 10 import '../app/view.dart'; |
| (...skipping 531 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 542 } | 542 } |
| 543 | 543 |
| 544 void detachRoot() { | 544 void detachRoot() { |
| 545 assert(_ancestor != null); | 545 assert(_ancestor != null); |
| 546 assert(root != null); | 546 assert(root != null); |
| 547 _ancestor.detachChildRoot(this); | 547 _ancestor.detachChildRoot(this); |
| 548 } | 548 } |
| 549 | 549 |
| 550 } | 550 } |
| 551 | 551 |
| 552 abstract class LeafRenderObjectWrapper extends RenderObjectWrapper { |
| 553 |
| 554 LeafRenderObjectWrapper({ String key }) : super(key: key); |
| 555 |
| 556 void insertChildRoot(RenderObjectWrapper child, dynamic slot) { |
| 557 assert(false); |
| 558 } |
| 559 |
| 560 void detachChildRoot(RenderObjectWrapper child) { |
| 561 assert(false); |
| 562 } |
| 563 |
| 564 } |
| 565 |
| 552 abstract class OneChildRenderObjectWrapper extends RenderObjectWrapper { | 566 abstract class OneChildRenderObjectWrapper extends RenderObjectWrapper { |
| 553 | 567 |
| 554 OneChildRenderObjectWrapper({ String key, Widget child }) | 568 OneChildRenderObjectWrapper({ String key, Widget child }) |
| 555 : _child = child, super(key: key); | 569 : _child = child, super(key: key); |
| 556 | 570 |
| 557 Widget _child; | 571 Widget _child; |
| 558 Widget get child => _child; | 572 Widget get child => _child; |
| 559 | 573 |
| 560 void syncRenderObject(RenderObjectWrapper old) { | 574 void syncRenderObject(RenderObjectWrapper old) { |
| 561 super.syncRenderObject(old); | 575 super.syncRenderObject(old); |
| (...skipping 318 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 880 if (root.parent == null) { | 894 if (root.parent == null) { |
| 881 // we haven't attached it yet | 895 // we haven't attached it yet |
| 882 assert(_container.child == null); | 896 assert(_container.child == null); |
| 883 _container.child = root; | 897 _container.child = root; |
| 884 } | 898 } |
| 885 assert(root.parent == _container); | 899 assert(root.parent == _container); |
| 886 } | 900 } |
| 887 | 901 |
| 888 Widget build() => builder(); | 902 Widget build() => builder(); |
| 889 } | 903 } |
| OLD | NEW |