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

Unified Diff: sky/sdk/lib/framework/layout.dart

Issue 1134593007: [Effen] Add a "parent" pointer to Node. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 5 years, 7 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | sky/sdk/lib/framework/node.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sky/sdk/lib/framework/layout.dart
diff --git a/sky/sdk/lib/framework/layout.dart b/sky/sdk/lib/framework/layout.dart
index 2580942222ad0d4fdad1cbff456fd3ccf6a72268..34566802c69b7856e425664f6a012699a83048e5 100644
--- a/sky/sdk/lib/framework/layout.dart
+++ b/sky/sdk/lib/framework/layout.dart
@@ -78,11 +78,11 @@ abstract class RenderNode extends Node {
child.parentData = new ParentData();
}
- void setAsChild(RenderNode child) { // only for use by subclasses
+ void adoptChild(RenderNode child) { // only for use by subclasses
// call this whenever you decide a node is a child
assert(child != null);
setupPos(child);
- super.setAsChild(child);
+ super.adoptChild(child);
}
void dropChild(RenderNode child) { // only for use by subclasses
assert(child != null);
@@ -149,7 +149,7 @@ abstract class ContainerRenderNodeMixin<ChildType extends RenderNode, ParentData
assert(child != before);
assert(child != _firstChild);
assert(child != _lastChild);
- setAsChild(child);
+ adoptChild(child);
assert(child.parentData is ParentDataType);
assert(child.parentData.nextSibling == null);
assert(child.parentData.previousSibling == null);
« no previous file with comments | « no previous file | sky/sdk/lib/framework/node.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698