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 15431003: Cleanup of various DOM dart2js and dart_analyzer warnings (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 7 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 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
50 return _this.$dom_firstChild; 50 return _this.$dom_firstChild;
51 } 51 }
52 $endif 52 $endif
53 53
54 void add(Node value) { 54 void add(Node value) {
55 _this.append(value); 55 _this.append(value);
56 } 56 }
57 57
58 void addAll(Iterable<Node> iterable) { 58 void addAll(Iterable<Node> iterable) {
59 if (iterable is _ChildNodeListLazy) { 59 if (iterable is _ChildNodeListLazy) {
60 if (!identical(iterable._this, _this)) { 60 _ChildNodeListLazy otherList = iterable;
61 if (!identical(otherList._this, _this)) {
61 // Optimized route for copying between nodes. 62 // Optimized route for copying between nodes.
62 for (var i = 0, len = iterable.length; i < len; ++i) { 63 for (var i = 0, len = otherList.length; i < len; ++i) {
63 // Should use $dom_firstChild, Bug 8886. 64 // Should use $dom_firstChild, Bug 8886.
64 _this.append(iterable[0]); 65 _this.append(otherList[0]);
65 } 66 }
66 } 67 }
67 return; 68 return;
68 } 69 }
69 for (Node node in iterable) { 70 for (Node node in iterable) {
70 _this.append(node); 71 _this.append(node);
71 } 72 }
72 } 73 }
73 74
74 void insert(int index, Node node) { 75 void insert(int index, Node node) {
(...skipping 198 matching lines...) Expand 10 before | Expand all | Expand 10 after
273 TemplateInstance _templateInstance; 274 TemplateInstance _templateInstance;
274 275
275 /** Gets the template instance that instantiated this node, if any. */ 276 /** Gets the template instance that instantiated this node, if any. */
276 @Experimental 277 @Experimental
277 TemplateInstance get templateInstance => 278 TemplateInstance get templateInstance =>
278 _templateInstance != null ? _templateInstance : 279 _templateInstance != null ? _templateInstance :
279 (parent != null ? parent.templateInstance : null); 280 (parent != null ? parent.templateInstance : null);
280 281
281 $!MEMBERS 282 $!MEMBERS
282 } 283 }
OLDNEW
« no previous file with comments | « tools/dom/templates/html/impl/impl_Element.darttemplate ('k') | tools/dom/templates/html/impl/impl_SVGElement.darttemplate » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698