Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(229)

Side by Side Diff: sky/sdk/lib/types/node.dart

Issue 1187393002: Cleanup of SkyBinding, and resultant yak shaving. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 5 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 class AbstractNode { 1 class AbstractNode {
2 2
3 // AbstractNode represents a node in a tree. 3 // AbstractNode represents a node in a tree.
4 // The AbstractNode protocol is as follows: 4 // The AbstractNode protocol is as follows:
5 // - When a subclass is changing the parent of a child, it should 5 // - When a subclass is changing the parent of a child, it should
6 // call either parent.adoptChild(child) or parent.dropChild(child) 6 // call either parent.adoptChild(child) or parent.dropChild(child)
7 // as appropriate. Subclasses should expose an API for 7 // as appropriate. Subclasses should expose an API for
8 // manipulating the tree if you want to (e.g. a setter for a 8 // manipulating the tree if you want to (e.g. a setter for a
9 // 'child' property, or an 'add()' method to manipulate a list). 9 // 'child' property, or an 'add()' method to manipulate a list).
10 // - You can see the current parent by querying 'parent'. 10 // - You can see the current parent by querying 'parent'.
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
73 void dropChild(AbstractNode child) { // only for use by subclasses 73 void dropChild(AbstractNode child) { // only for use by subclasses
74 assert(child != null); 74 assert(child != null);
75 assert(child._parent == this); 75 assert(child._parent == this);
76 assert(child.attached == attached); 76 assert(child.attached == attached);
77 child._parent = null; 77 child._parent = null;
78 if (attached) 78 if (attached)
79 child.detach(); 79 child.detach();
80 } 80 }
81 81
82 } 82 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698