| 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 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 88 | 88 |
| 89 void _remove() { | 89 void _remove() { |
| 90 _defunct = true; | 90 _defunct = true; |
| 91 _root = null; | 91 _root = null; |
| 92 } | 92 } |
| 93 | 93 |
| 94 int _nodeDepth; | 94 int _nodeDepth; |
| 95 void _ensureDepth() { | 95 void _ensureDepth() { |
| 96 if (_nodeDepth == null) { | 96 if (_nodeDepth == null) { |
| 97 if (_parent != null) { | 97 if (_parent != null) { |
| 98 _parent.ensureDepth(); | 98 _parent._ensureDepth(); |
| 99 _nodeDepth = _parent._nodeDepth + 1; | 99 _nodeDepth = _parent._nodeDepth + 1; |
| 100 } else { | 100 } else { |
| 101 _nodeDepth = 0; | 101 _nodeDepth = 0; |
| 102 } | 102 } |
| 103 } | 103 } |
| 104 } | 104 } |
| 105 | 105 |
| 106 void _trace(String message) { | 106 void _trace(String message) { |
| 107 if (!_shouldTrace) | 107 if (!_shouldTrace) |
| 108 return; | 108 return; |
| (...skipping 784 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 893 | 893 |
| 894 abstract class App extends Component { | 894 abstract class App extends Component { |
| 895 sky.Node _host; | 895 sky.Node _host; |
| 896 | 896 |
| 897 App() : super(stateful: true) { | 897 App() : super(stateful: true) { |
| 898 _host = sky.document.createElement('div'); | 898 _host = sky.document.createElement('div'); |
| 899 sky.document.appendChild(_host); | 899 sky.document.appendChild(_host); |
| 900 _scheduleComponentForRender(this); | 900 _scheduleComponentForRender(this); |
| 901 } | 901 } |
| 902 } | 902 } |
| OLD | NEW |