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

Side by Side Diff: sky/sdk/lib/base/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
« no previous file with comments | « sky/sdk/lib/base/hit_test.dart ('k') | sky/sdk/lib/base/scheduler.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
3 // found in the LICENSE file.
4
1 class AbstractNode { 5 class AbstractNode {
2 6
3 // AbstractNode represents a node in a tree. 7 // AbstractNode represents a node in a tree.
4 // The AbstractNode protocol is as follows: 8 // The AbstractNode protocol is as follows:
5 // - When a subclass is changing the parent of a child, it should 9 // - When a subclass is changing the parent of a child, it should
6 // call either parent.adoptChild(child) or parent.dropChild(child) 10 // call either parent.adoptChild(child) or parent.dropChild(child)
7 // as appropriate. Subclasses should expose an API for 11 // as appropriate. Subclasses should expose an API for
8 // manipulating the tree if you want to (e.g. a setter for a 12 // manipulating the tree if you want to (e.g. a setter for a
9 // 'child' property, or an 'add()' method to manipulate a list). 13 // 'child' property, or an 'add()' method to manipulate a list).
10 // - You can see the current parent by querying 'parent'. 14 // - 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 77 void dropChild(AbstractNode child) { // only for use by subclasses
74 assert(child != null); 78 assert(child != null);
75 assert(child._parent == this); 79 assert(child._parent == this);
76 assert(child.attached == attached); 80 assert(child.attached == attached);
77 child._parent = null; 81 child._parent = null;
78 if (attached) 82 if (attached)
79 child.detach(); 83 child.detach();
80 } 84 }
81 85
82 } 86 }
OLDNEW
« no previous file with comments | « sky/sdk/lib/base/hit_test.dart ('k') | sky/sdk/lib/base/scheduler.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698