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

Unified Diff: sky/framework/fn.dart

Issue 1030753002: [Effen] put Node class above its superclasses (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 5 years, 9 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sky/framework/fn.dart
diff --git a/sky/framework/fn.dart b/sky/framework/fn.dart
index efb3ac238a58647521b8721e3dd64a82a1181cd9..505c1a447a814d56439dba9d7f4fe901329a1066 100644
--- a/sky/framework/fn.dart
+++ b/sky/framework/fn.dart
@@ -52,29 +52,6 @@ class Style {
Style._internal(this._className);
}
-abstract class ContentNode extends Node {
- Node content;
-
- ContentNode(Node content) : this.content = content, super(key: content._key);
-
- void _sync(Node old, sky.ParentNode host, sky.Node insertBefore) {
- Node oldContent = old == null ? null : (old as ContentNode).content;
- content = _syncChild(content, oldContent, host, insertBefore);
- _root = content._root;
- }
-
- void _remove() {
- _removeChild(content);
- super._remove();
- }
-}
-
-class StyleNode extends ContentNode {
- final Style style;
-
- StyleNode(Node content, this.style): super(content);
-}
-
void _parentInsertBefore(sky.ParentNode parent,
sky.Node node,
sky.Node ref) {
@@ -194,6 +171,29 @@ abstract class Node {
}
}
+abstract class ContentNode extends Node {
+ Node content;
+
+ ContentNode(Node content) : this.content = content, super(key: content._key);
+
+ void _sync(Node old, sky.ParentNode host, sky.Node insertBefore) {
+ Node oldContent = old == null ? null : (old as ContentNode).content;
+ content = _syncChild(content, oldContent, host, insertBefore);
+ _root = content._root;
+ }
+
+ void _remove() {
+ _removeChild(content);
+ super._remove();
+ }
+}
+
+class StyleNode extends ContentNode {
+ final Style style;
+
+ StyleNode(Node content, this.style): super(content);
+}
+
/*
* RenderNodes correspond to a desired state of a sky.Node. They are fully
* immutable, with one exception: A Node which is a Component which lives within
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698