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

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

Issue 12024002: Fixing cleanup of dart:html annotation generation. (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 212 matching lines...) Expand 10 before | Expand all | Expand 10 after
223 // a local copy of $dom_childNodes is more efficient. 223 // a local copy of $dom_childNodes is more efficient.
224 int get length => _this.$dom_childNodes.length; 224 int get length => _this.$dom_childNodes.length;
225 225
226 void set length(int value) { 226 void set length(int value) {
227 throw new UnsupportedError( 227 throw new UnsupportedError(
228 "Cannot set length on immutable List."); 228 "Cannot set length on immutable List.");
229 } 229 }
230 230
231 Node operator[](int index) => _this.$dom_childNodes[index]; 231 Node operator[](int index) => _this.$dom_childNodes[index];
232 } 232 }
233 $ANNOTATIONS 233
234 class $CLASSNAME$EXTENDS$IMPLEMENTS$NATIVESPEC { 234 $(ANNOTATIONS)class $CLASSNAME$EXTENDS$IMPLEMENTS$NATIVESPEC {
235 List<Node> get nodes { 235 List<Node> get nodes {
236 return new _ChildNodeListLazy(this); 236 return new _ChildNodeListLazy(this);
237 } 237 }
238 238
239 void set nodes(Collection<Node> value) { 239 void set nodes(Collection<Node> value) {
240 // Copy list first since we don't want liveness during iteration. 240 // Copy list first since we don't want liveness during iteration.
241 // TODO(jacobr): there is a better way to do this. 241 // TODO(jacobr): there is a better way to do this.
242 List copy = new List.from(value); 242 List copy = new List.from(value);
243 text = ''; 243 text = '';
244 for (Node node in copy) { 244 for (Node node in copy) {
(...skipping 23 matching lines...) Expand all
268 final Node parent = this.parentNode; 268 final Node parent = this.parentNode;
269 parent.$dom_replaceChild(otherNode, this); 269 parent.$dom_replaceChild(otherNode, this);
270 } catch (e) { 270 } catch (e) {
271 271
272 }; 272 };
273 return this; 273 return this;
274 } 274 }
275 275
276 $!MEMBERS 276 $!MEMBERS
277 } 277 }
OLDNEW
« no previous file with comments | « tools/dom/templates/html/impl/impl_Navigator.darttemplate ('k') | tools/dom/templates/html/impl/impl_Range.darttemplate » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698