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

Side by Side Diff: sky/sdk/lib/widgets/widget.dart

Issue 1194583002: Cleaned up a few analyzer warnings (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
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 import 'dart:async'; 5 import 'dart:async';
6 import 'dart:collection'; 6 import 'dart:collection';
7 import 'dart:mirrors'; 7 import 'dart:mirrors';
8 import 'dart:sky' as sky; 8 import 'dart:sky' as sky;
9 9
10 import '../app/view.dart'; 10 import '../app/view.dart';
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after
102 return ancestor; 102 return ancestor;
103 } 103 }
104 104
105 void removeChild(Widget node) { 105 void removeChild(Widget node) {
106 node.remove(); 106 node.remove();
107 } 107 }
108 108
109 // Returns the child which should be retained as the child of this node. 109 // Returns the child which should be retained as the child of this node.
110 Widget syncChild(Widget node, Widget oldNode, dynamic slot) { 110 Widget syncChild(Widget node, Widget oldNode, dynamic slot) {
111 111
112 assert(oldNode is! Component || !oldNode._disqualifiedFromEverAppearingAgain ); 112 assert(oldNode is! Component ||
113 !(oldNode as Component)._disqualifiedFromEverAppearingAgain);
Hixie 2015/06/17 17:11:17 this warning is a bug in the analyzer, you should
hansmuller 2015/06/17 17:35:39 Done.
113 114
114 if (node == oldNode) { 115 if (node == oldNode) {
115 assert(node == null || node.mounted); 116 assert(node == null || node.mounted);
116 return node; // Nothing to do. Subtrees must be identical. 117 return node; // Nothing to do. Subtrees must be identical.
117 } 118 }
118 119
119 if (node == null) { 120 if (node == null) {
120 // the child in this slot has gone away 121 // the child in this slot has gone away
121 assert(oldNode.mounted); 122 assert(oldNode.mounted);
122 removeChild(oldNode); 123 removeChild(oldNode);
(...skipping 717 matching lines...) Expand 10 before | Expand all | Expand 10 after
840 if (root.parent == null) { 841 if (root.parent == null) {
841 // we haven't attached it yet 842 // we haven't attached it yet
842 assert(_container.child == null); 843 assert(_container.child == null);
843 _container.child = root; 844 _container.child = root;
844 } 845 }
845 assert(root.parent == _container); 846 assert(root.parent == _container);
846 } 847 }
847 848
848 Widget build() => builder(); 849 Widget build() => builder();
849 } 850 }
OLDNEW
« sky/sdk/lib/rendering/paragraph.dart ('K') | « sky/sdk/lib/widgets/basic.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698