| OLD | NEW |
| 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 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 108 } | 108 } |
| 109 | 109 |
| 110 void removeAll(Iterable elements) { | 110 void removeAll(Iterable elements) { |
| 111 IterableMixinWorkaround.removeAll(this, elements); | 111 IterableMixinWorkaround.removeAll(this, elements); |
| 112 } | 112 } |
| 113 | 113 |
| 114 void retainAll(Iterable elements) { | 114 void retainAll(Iterable elements) { |
| 115 IterableMixinWorkaround.retainAll(this, elements); | 115 IterableMixinWorkaround.retainAll(this, elements); |
| 116 } | 116 } |
| 117 | 117 |
| 118 void removeMatching(bool test(Node node)) { | 118 void removeWhere(bool test(Node node)) { |
| 119 IterableMixinWorkaround.removeMatching(this, test); | 119 IterableMixinWorkaround.removeWhere(this, test); |
| 120 } | 120 } |
| 121 | 121 |
| 122 void retainMatching(bool test(Node node)) { | 122 void retainWhere(bool test(Node node)) { |
| 123 IterableMixinWorkaround.retainMatching(this, test); | 123 IterableMixinWorkaround.retainWhere(this, test); |
| 124 } | 124 } |
| 125 | 125 |
| 126 void clear() { | 126 void clear() { |
| 127 _this.text = ''; | 127 _this.text = ''; |
| 128 } | 128 } |
| 129 | 129 |
| 130 void operator []=(int index, Node value) { | 130 void operator []=(int index, Node value) { |
| 131 _this.$dom_replaceChild(value, this[index]); | 131 _this.$dom_replaceChild(value, this[index]); |
| 132 } | 132 } |
| 133 | 133 |
| (...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 181 } | 181 } |
| 182 | 182 |
| 183 Iterable<Node> skip(int n) { | 183 Iterable<Node> skip(int n) { |
| 184 return IterableMixinWorkaround.skipList(this, n); | 184 return IterableMixinWorkaround.skipList(this, n); |
| 185 } | 185 } |
| 186 | 186 |
| 187 Iterable<Node> skipWhile(bool test(Node value)) { | 187 Iterable<Node> skipWhile(bool test(Node value)) { |
| 188 return IterableMixinWorkaround.skipWhile(this, test); | 188 return IterableMixinWorkaround.skipWhile(this, test); |
| 189 } | 189 } |
| 190 | 190 |
| 191 Node firstMatching(bool test(Node value), {Node orElse()}) { | 191 Node firstWhere(bool test(Node value), {Node orElse()}) { |
| 192 return IterableMixinWorkaround.firstMatching(this, test, orElse); | 192 return IterableMixinWorkaround.firstWhere(this, test, orElse); |
| 193 } | 193 } |
| 194 | 194 |
| 195 Node lastMatching(bool test(Node value), {Node orElse()}) { | 195 Node lastWhere(bool test(Node value), {Node orElse()}) { |
| 196 return IterableMixinWorkaround.lastMatchingInList(this, test, orElse); | 196 return IterableMixinWorkaround.lastWhereList(this, test, orElse); |
| 197 } | 197 } |
| 198 | 198 |
| 199 Node singleMatching(bool test(Node value)) { | 199 Node singleWhere(bool test(Node value)) { |
| 200 return IterableMixinWorkaround.singleMatching(this, test); | 200 return IterableMixinWorkaround.singleWhere(this, test); |
| 201 } | 201 } |
| 202 | 202 |
| 203 Node elementAt(int index) { | 203 Node elementAt(int index) { |
| 204 return this[index]; | 204 return this[index]; |
| 205 } | 205 } |
| 206 | 206 |
| 207 Iterable<Node> get reversed { | 207 Iterable<Node> get reversed { |
| 208 return IterableMixinWorkaround.reversedList(this); | 208 return IterableMixinWorkaround.reversedList(this); |
| 209 } | 209 } |
| 210 | 210 |
| (...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 314 } | 314 } |
| 315 } else { | 315 } else { |
| 316 for (var node in newNodes) { | 316 for (var node in newNodes) { |
| 317 this.insertBefore(node, refChild); | 317 this.insertBefore(node, refChild); |
| 318 } | 318 } |
| 319 } | 319 } |
| 320 } | 320 } |
| 321 | 321 |
| 322 $!MEMBERS | 322 $!MEMBERS |
| 323 } | 323 } |
| OLD | NEW |