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

Side by Side Diff: tools/dom/templates/html/impl/impl_Node.darttemplate

Issue 12328104: Change new List(n) to return fixed length list. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Merge to head. Created 7 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 part of $LIBRARYNAME; 5 part of $LIBRARYNAME;
6 6
7 /** 7 /**
8 * Lazy implementation of the child nodes of an element that does not request 8 * Lazy implementation of the child nodes of an element that does not request
9 * the actual child nodes of an element until strictly necessary greatly 9 * the actual child nodes of an element until strictly necessary greatly
10 * improving performance for the typical cases where it is not required. 10 * improving performance for the typical cases where it is not required.
(...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after
150 } 150 }
151 151
152 Iterable expand(Iterable f(Node element)) { 152 Iterable expand(Iterable f(Node element)) {
153 return IterableMixinWorkaround.expand(this, f); 153 return IterableMixinWorkaround.expand(this, f);
154 } 154 }
155 155
156 bool every(bool f(Node element)) => IterableMixinWorkaround.every(this, f); 156 bool every(bool f(Node element)) => IterableMixinWorkaround.every(this, f);
157 157
158 bool any(bool f(Node element)) => IterableMixinWorkaround.any(this, f); 158 bool any(bool f(Node element)) => IterableMixinWorkaround.any(this, f);
159 159
160 List<Node> toList() => new List<Node>.from(this); 160 List<Node> toList({ bool growable: false }) =>
161 new List<Node>.from(this, growable: growable);
161 Set<Node> toSet() => new Set<Node>.from(this); 162 Set<Node> toSet() => new Set<Node>.from(this);
162 163
163 bool get isEmpty => this.length == 0; 164 bool get isEmpty => this.length == 0;
164 165
165 // From List<Node>: 166 // From List<Node>:
166 167
167 Iterable<Node> take(int n) { 168 Iterable<Node> take(int n) {
168 return IterableMixinWorkaround.takeList(this, n); 169 return IterableMixinWorkaround.takeList(this, n);
169 } 170 }
170 171
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after
279 final Node parent = this.parentNode; 280 final Node parent = this.parentNode;
280 parent.$dom_replaceChild(otherNode, this); 281 parent.$dom_replaceChild(otherNode, this);
281 } catch (e) { 282 } catch (e) {
282 283
283 }; 284 };
284 return this; 285 return this;
285 } 286 }
286 287
287 $!MEMBERS 288 $!MEMBERS
288 } 289 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698