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

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

Issue 12036071: Fixing analyzer issues in DOM libs. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 11 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 html; 5 part of html;
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 171 matching lines...) Expand 10 before | Expand all | Expand 10 after
182 } 182 }
183 183
184 Node singleMatching(bool test(Node value)) { 184 Node singleMatching(bool test(Node value)) {
185 return IterableMixinWorkaround.singleMatching(this, test); 185 return IterableMixinWorkaround.singleMatching(this, test);
186 } 186 }
187 187
188 Node elementAt(int index) { 188 Node elementAt(int index) {
189 return this[index]; 189 return this[index];
190 } 190 }
191 191
192 List<Node> get reversed =>
193 new ReversedListView<Node>(this, 0, null);
194
192 // TODO(jacobr): this could be implemented for child node lists. 195 // TODO(jacobr): this could be implemented for child node lists.
193 // The exception we throw here is misleading. 196 // The exception we throw here is misleading.
194 void sort([int compare(Node a, Node b)]) { 197 void sort([int compare(Node a, Node b)]) {
195 throw new UnsupportedError("Cannot sort immutable List."); 198 throw new UnsupportedError("Cannot sort immutable List.");
196 } 199 }
197 200
198 int indexOf(Node element, [int start = 0]) => 201 int indexOf(Node element, [int start = 0]) =>
199 Lists.indexOf(this, element, start, this.length); 202 Lists.indexOf(this, element, start, this.length);
200 203
201 int lastIndexOf(Node element, [int start = 0]) => 204 int lastIndexOf(Node element, [int start = 0]) =>
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
268 final Node parent = this.parentNode; 271 final Node parent = this.parentNode;
269 parent.$dom_replaceChild(otherNode, this); 272 parent.$dom_replaceChild(otherNode, this);
270 } catch (e) { 273 } catch (e) {
271 274
272 }; 275 };
273 return this; 276 return this;
274 } 277 }
275 278
276 $!MEMBERS 279 $!MEMBERS
277 } 280 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698