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

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

Issue 1157033006: DO NOT COMMIT - fn port to RenderNode, work in progress, does not work (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: fix adam's review comments 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
« no previous file with comments | « sky/sdk/lib/framework/layouts/block.dart ('k') | sky/shell/ui/engine.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 library node;
2
3 class AbstractNode { 1 class AbstractNode {
4 2
5 // Nodes always have a 'depth' greater than their ancestors'. 3 // Nodes always have a 'depth' greater than their ancestors'.
6 // There's no guarantee regarding depth between siblings. The depth 4 // There's no guarantee regarding depth between siblings. The depth
7 // of a node is used to ensure that nodes are processed in depth 5 // of a node is used to ensure that nodes are processed in depth
8 // order. The 'depth' of a child can be more than one greater than 6 // order. The 'depth' of a child can be more than one greater than
9 // the 'depth' of the parent, because the 'depth' values are never 7 // the 'depth' of the parent, because the 'depth' values are never
10 // decreased: all that matters is that it's greater than the parent. 8 // decreased: all that matters is that it's greater than the parent.
11 // Consider a tree with a root node A, a child B, and a grandchild 9 // Consider a tree with a root node A, a child B, and a grandchild
12 // C. Initially, A will have 'depth' 0, B 'depth' 1, and C 'depth' 10 // C. Initially, A will have 'depth' 0, B 'depth' 1, and C 'depth'
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
57 void dropChild(AbstractNode child) { // only for use by subclasses 55 void dropChild(AbstractNode child) { // only for use by subclasses
58 assert(child != null); 56 assert(child != null);
59 assert(child._parent == this); 57 assert(child._parent == this);
60 assert(child.attached == attached); 58 assert(child.attached == attached);
61 child._parent = null; 59 child._parent = null;
62 if (attached) 60 if (attached)
63 child.detach(); 61 child.detach();
64 } 62 }
65 63
66 } 64 }
OLDNEW
« no previous file with comments | « sky/sdk/lib/framework/layouts/block.dart ('k') | sky/shell/ui/engine.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698