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

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

Issue 13863012: Refactor List.setRange function. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Addressed comments. Created 7 years, 8 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 134 matching lines...) Expand 10 before | Expand all | Expand 10 after
145 145
146 // From List<Node>: 146 // From List<Node>:
147 147
148 // TODO(jacobr): this could be implemented for child node lists. 148 // TODO(jacobr): this could be implemented for child node lists.
149 // The exception we throw here is misleading. 149 // The exception we throw here is misleading.
150 void sort([int compare(Node a, Node b)]) { 150 void sort([int compare(Node a, Node b)]) {
151 throw new UnsupportedError("Cannot sort immutable List."); 151 throw new UnsupportedError("Cannot sort immutable List.");
152 } 152 }
153 153
154 // FIXME: implement these. 154 // FIXME: implement these.
155 void setRange(int start, int rangeLength, List<Node> from, [int startFrom]) { 155 void setRange(int start, int end, Iterable<Node> iterable,
156 [int skipCount = 0]) {
156 throw new UnsupportedError( 157 throw new UnsupportedError(
157 "Cannot setRange on immutable List."); 158 "Cannot setRange on immutable List.");
158 } 159 }
159 void removeRange(int start, int rangeLength) { 160 void removeRange(int start, int rangeLength) {
160 throw new UnsupportedError( 161 throw new UnsupportedError(
161 "Cannot removeRange on immutable List."); 162 "Cannot removeRange on immutable List.");
162 } 163 }
163 void insertRange(int start, int rangeLength, [Node initialValue]) { 164 void insertRange(int start, int rangeLength, [Node initialValue]) {
164 throw new UnsupportedError( 165 throw new UnsupportedError(
165 "Cannot insertRange on immutable List."); 166 "Cannot insertRange on immutable List.");
(...skipping 179 matching lines...) Expand 10 before | Expand all | Expand 10 after
345 } 346 }
346 347
347 /** 348 /**
348 * Print out a String representation of this Node. 349 * Print out a String representation of this Node.
349 */ 350 */
350 String toString() => localName == null ? 351 String toString() => localName == null ?
351 (nodeValue == null ? super.toString() : nodeValue) : localName; 352 (nodeValue == null ? super.toString() : nodeValue) : localName;
352 353
353 $!MEMBERS 354 $!MEMBERS
354 } 355 }
OLDNEW
« no previous file with comments | « tools/dom/templates/html/impl/impl_Element.darttemplate ('k') | tools/dom/templates/immutable_list_mixin.darttemplate » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698