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

Unified Diff: client/html/src/NodeWrappingImplementation.dart

Issue 8953001: Cleaner and more correct fix for _ChildrenNodeList#forEach. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 9 years 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « client/html/release/htmlimpl.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: client/html/src/NodeWrappingImplementation.dart
diff --git a/client/html/src/NodeWrappingImplementation.dart b/client/html/src/NodeWrappingImplementation.dart
index f677df58939e1513a52d593eebd84b90980f668f..220f877c0a272762bbb8716856d3c03ae5d2785b 100644
--- a/client/html/src/NodeWrappingImplementation.dart
+++ b/client/html/src/NodeWrappingImplementation.dart
@@ -23,11 +23,7 @@ class _ChildrenNodeList implements NodeList {
return LevelDom.wrapNode(_node.firstChild);
}
- void forEach(void f(Node element)) {
- for (int i = 0, len = _childNodes.length; i < len; i++) {
- f(LevelDom.wrapNode(_childNodes[i]));
- }
- }
+ void forEach(void f(Node element)) => _toList().forEach(f);
Collection<Node> filter(bool f(Node element)) {
List<Node> output = new List<Node>();
« no previous file with comments | « client/html/release/htmlimpl.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698