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

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

Issue 1156013003: Introduce RenderNodeWithChildMixin (Closed) Base URL: git@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 | « sky/sdk/lib/framework/app.dart ('k') | sky/sdk/lib/framework/layout2.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sky/sdk/lib/framework/fn2.dart
diff --git a/sky/sdk/lib/framework/fn2.dart b/sky/sdk/lib/framework/fn2.dart
index 3c71bb903459dce165ecd9ef08c9c683692dfa19..a83535857bbe69f40d63e7c73b6169cb15a69855 100644
--- a/sky/sdk/lib/framework/fn2.dart
+++ b/sky/sdk/lib/framework/fn2.dart
@@ -624,6 +624,28 @@ class FillStackContainer extends OneChildListRenderNodeWrapper {
}
}
+abstract class OneChildRenderNodeWrapper extends RenderNodeWrapper {
+
+ final UINode child;
+ RenderNodeWithChildMixin root;
+
+ OneChildRenderNodeWrapper({
+ Object key,
+ this.child
+ }) : super(key: key);
+
+ void insert(RenderNodeWrapper child, dynamic slot) {
+ assert(slot == null);
+ root.child = child.root;
+ }
+
+ void _remove() {
+ assert(child != null);
+ removeChild(child);
+ super._remove();
+ }
+}
+
class TextFragment extends RenderNodeWrapper {
RenderCSSInline root;
« no previous file with comments | « sky/sdk/lib/framework/app.dart ('k') | sky/sdk/lib/framework/layout2.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698