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

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

Issue 1145623003: [Effen] Now that we have RenderNode.parent again, we can have mid-tree sync() work properly again. (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 unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | 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. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 library fn; 5 library fn;
6 6
7 import 'dart:async'; 7 import 'dart:async';
8 import 'dart:collection'; 8 import 'dart:collection';
9 import 'dart:sky' as sky; 9 import 'dart:sky' as sky;
10 import 'reflect.dart' as reflect; 10 import 'reflect.dart' as reflect;
(...skipping 868 matching lines...) Expand 10 before | Expand all | Expand 10 after
879 _dirty = false; 879 _dirty = false;
880 _root = _built._root; 880 _root = _built._root;
881 assert(_root != null); 881 assert(_root != null);
882 } 882 }
883 883
884 void _buildIfDirty() { 884 void _buildIfDirty() {
885 if (!_dirty || _defunct) 885 if (!_dirty || _defunct)
886 return; 886 return;
887 887
888 _trace('$_key rebuilding...'); 888 _trace('$_key rebuilding...');
889 _sync(null, null, null); // TODO(ianh): figure out how passing "null, null, null" here is ok 889 _sync(null, _root.parent, _root.parent.childAfter(_root));
890 } 890 }
891 891
892 void scheduleBuild() { 892 void scheduleBuild() {
893 setState(() {}); 893 setState(() {});
894 } 894 }
895 895
896 void setState(Function fn()) { 896 void setState(Function fn()) {
897 _stateful = true; 897 _stateful = true;
898 fn(); 898 fn();
899 if (_isBuilding || _dirty || _defunct) 899 if (_isBuilding || _dirty || _defunct)
(...skipping 22 matching lines...) Expand all
922 _sync(null, _host, _root); 922 _sync(null, _host, _root);
923 } 923 }
924 } 924 }
925 925
926 class Text extends Component { 926 class Text extends Component {
927 Text(this.data) : super(key: '*text*'); 927 Text(this.data) : super(key: '*text*');
928 final String data; 928 final String data;
929 bool get interchangeable => true; 929 bool get interchangeable => true;
930 UINode build() => new Paragraph(children: [new TextFragment(data)]); 930 UINode build() => new Paragraph(children: [new TextFragment(data)]);
931 } 931 }
OLDNEW
« 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