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

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

Issue 11962049: Revert "Fixing formatting of dart:html's dart2js annotations." (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 189 matching lines...) Expand 10 before | Expand all | Expand 10 after
200 // a local copy of $dom_childNodes is more efficient. 200 // a local copy of $dom_childNodes is more efficient.
201 int get length => _this.$dom_childNodes.length; 201 int get length => _this.$dom_childNodes.length;
202 202
203 void set length(int value) { 203 void set length(int value) {
204 throw new UnsupportedError( 204 throw new UnsupportedError(
205 "Cannot set length on immutable List."); 205 "Cannot set length on immutable List.");
206 } 206 }
207 207
208 Node operator[](int index) => _this.$dom_childNodes[index]; 208 Node operator[](int index) => _this.$dom_childNodes[index];
209 } 209 }
210 210 $ANNOTATIONS
211 $(ANNOTATIONS)class $CLASSNAME$EXTENDS$IMPLEMENTS$NATIVESPEC { 211 class $CLASSNAME$EXTENDS$IMPLEMENTS$NATIVESPEC {
212 List<Node> get nodes { 212 List<Node> get nodes {
213 return new _ChildNodeListLazy(this); 213 return new _ChildNodeListLazy(this);
214 } 214 }
215 215
216 void set nodes(Collection<Node> value) { 216 void set nodes(Collection<Node> value) {
217 // Copy list first since we don't want liveness during iteration. 217 // Copy list first since we don't want liveness during iteration.
218 // TODO(jacobr): there is a better way to do this. 218 // TODO(jacobr): there is a better way to do this.
219 List copy = new List.from(value); 219 List copy = new List.from(value);
220 text = ''; 220 text = '';
221 for (Node node in copy) { 221 for (Node node in copy) {
(...skipping 23 matching lines...) Expand all
245 final Node parent = this.parentNode; 245 final Node parent = this.parentNode;
246 parent.$dom_replaceChild(otherNode, this); 246 parent.$dom_replaceChild(otherNode, this);
247 } catch (e) { 247 } catch (e) {
248 248
249 }; 249 };
250 return this; 250 return this;
251 } 251 }
252 252
253 $!MEMBERS 253 $!MEMBERS
254 } 254 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698