| Index: sky/sdk/lib/framework/node.dart
|
| diff --git a/sky/sdk/lib/framework/node.dart b/sky/sdk/lib/framework/node.dart
|
| index ec9a1f94fa9f38d0e8297ea64b30018bc3dcc534..ea51099c43fd4d12e7b6c63a60009ed253a43084 100644
|
| --- a/sky/sdk/lib/framework/node.dart
|
| +++ b/sky/sdk/lib/framework/node.dart
|
| @@ -44,15 +44,21 @@ class Node {
|
| }
|
| detachChildren() { } // workaround for lack of inter-class mixins in Dart
|
|
|
| - void setAsChild(Node child) { // only for use by subclasses
|
| + Node _parent;
|
| + Node get parent => _parent;
|
| + void adoptChild(Node child) { // only for use by subclasses
|
| assert(child != null);
|
| + assert(child._parent == null);
|
| + child._parent = this;
|
| if (attached)
|
| child.attach();
|
| redepthChild(child);
|
| }
|
| void dropChild(Node child) { // only for use by subclasses
|
| assert(child != null);
|
| + assert(child._parent == this);
|
| assert(child.attached == attached);
|
| + child._parent = null;
|
| if (attached)
|
| child.detach();
|
| }
|
|
|