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

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

Issue 17508002: Revert "Making all DOM types abstract and removing superfluous Dartium constructors." (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 6 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 161 matching lines...) Expand 10 before | Expand all | Expand 10 after
172 int get length => _this.$dom_childNodes.length; 172 int get length => _this.$dom_childNodes.length;
173 173
174 void set length(int value) { 174 void set length(int value) {
175 throw new UnsupportedError( 175 throw new UnsupportedError(
176 "Cannot set length on immutable List."); 176 "Cannot set length on immutable List.");
177 } 177 }
178 178
179 Node operator[](int index) => _this.$dom_childNodes[index]; 179 Node operator[](int index) => _this.$dom_childNodes[index];
180 } 180 }
181 181
182 $(ANNOTATIONS)$(CLASS_MODIFIERS)class $CLASSNAME$EXTENDS$IMPLEMENTS$NATIVESPEC { 182 $(ANNOTATIONS)class $CLASSNAME$EXTENDS$IMPLEMENTS$NATIVESPEC {
183 List<Node> get nodes { 183 List<Node> get nodes {
184 return new _ChildNodeListLazy(this); 184 return new _ChildNodeListLazy(this);
185 } 185 }
186 186
187 void set nodes(Iterable<Node> value) { 187 void set nodes(Iterable<Node> value) {
188 // Copy list first since we don't want liveness during iteration. 188 // Copy list first since we don't want liveness during iteration.
189 // TODO(jacobr): there is a better way to do this. 189 // TODO(jacobr): there is a better way to do this.
190 List copy = new List.from(value); 190 List copy = new List.from(value);
191 text = ''; 191 text = '';
192 for (Node node in copy) { 192 for (Node node in copy) {
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after
274 TemplateInstance _templateInstance; 274 TemplateInstance _templateInstance;
275 275
276 /** Gets the template instance that instantiated this node, if any. */ 276 /** Gets the template instance that instantiated this node, if any. */
277 @Experimental 277 @Experimental
278 TemplateInstance get templateInstance => 278 TemplateInstance get templateInstance =>
279 _templateInstance != null ? _templateInstance : 279 _templateInstance != null ? _templateInstance :
280 (parent != null ? parent.templateInstance : null); 280 (parent != null ? parent.templateInstance : null);
281 281
282 $!MEMBERS 282 $!MEMBERS
283 } 283 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698