| 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 786 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 797 // we haven't attached it yet | 797 // we haven't attached it yet |
| 798 UINodeAppView._appView.root = root; | 798 UINodeAppView._appView.root = root; |
| 799 } | 799 } |
| 800 assert(root.parent is RenderView); | 800 assert(root.parent is RenderView); |
| 801 } | 801 } |
| 802 | 802 |
| 803 } | 803 } |
| 804 | 804 |
| 805 typedef UINode Builder(); | 805 typedef UINode Builder(); |
| 806 | 806 |
| 807 class RenderObjectToUINodeAdapter extends AbstractUINodeRoot { | 807 class RenderBoxToUINodeAdapter extends AbstractUINodeRoot { |
| 808 | 808 |
| 809 RenderObjectToUINodeAdapter( | 809 RenderBoxToUINodeAdapter( |
| 810 RenderObjectWithChildMixin<RenderBox> container, | 810 RenderObjectWithChildMixin<RenderBox> container, |
| 811 this.builder | 811 this.builder |
| 812 ) : _container = container, super() { | 812 ) : _container = container, super() { |
| 813 assert(builder != null); | 813 assert(builder != null); |
| 814 } | 814 } |
| 815 | 815 |
| 816 RenderObjectWithChildMixin<RenderBox> _container; | 816 RenderObjectWithChildMixin<RenderBox> _container; |
| 817 RenderObjectWithChildMixin<RenderBox> get container => _container; | 817 RenderObjectWithChildMixin<RenderBox> get container => _container; |
| 818 void set container(RenderObjectWithChildMixin<RenderBox> value) { | 818 void set container(RenderObjectWithChildMixin<RenderBox> value) { |
| 819 if (_container != value) { | 819 if (_container != value) { |
| (...skipping 16 matching lines...) Expand all Loading... |
| 836 super._buildIfDirty(); | 836 super._buildIfDirty(); |
| 837 if (root.parent == null) { | 837 if (root.parent == null) { |
| 838 // we haven't attached it yet | 838 // we haven't attached it yet |
| 839 assert(_container.child == null); | 839 assert(_container.child == null); |
| 840 _container.child = root; | 840 _container.child = root; |
| 841 } | 841 } |
| 842 assert(root.parent == _container); | 842 assert(root.parent == _container); |
| 843 } | 843 } |
| 844 | 844 |
| 845 UINode build() => builder(); | 845 UINode build() => builder(); |
| 846 } | 846 } |
| OLD | NEW |