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

Unified Diff: sdk/lib/html/templates/html/impl/impl_Element.darttemplate

Issue 11414069: Make mappedBy lazy. (Closed) Base URL: https://dart.googlecode.com/svn/experimental/lib_v2/dart
Patch Set: Remove CollectionUtils.mappedBy in Swarm. Created 8 years, 1 month 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
Index: sdk/lib/html/templates/html/impl/impl_Element.darttemplate
diff --git a/sdk/lib/html/templates/html/impl/impl_Element.darttemplate b/sdk/lib/html/templates/html/impl/impl_Element.darttemplate
index 5700dfd5308fd5931a2776f29f1eda401495a122..b055e471b234cc6c4d62dd3f8dfdaf6637ed23af 100644
--- a/sdk/lib/html/templates/html/impl/impl_Element.darttemplate
+++ b/sdk/lib/html/templates/html/impl/impl_Element.darttemplate
@@ -59,13 +59,7 @@ class _ChildrenElementList implements List {
return false;
}
- Collection mappedBy(f(Element element)) {
- final out = [];
- for (Element el in this) {
- out.add(f(el));
- }
- return out;
- }
+ Iterable mappedBy(f(Element element)) => new MappedIterable(this, f);
bool get isEmpty {
return _element.$dom_firstElementChild == null;
@@ -176,13 +170,7 @@ class _FrozenElementList implements List {
}
}
- Collection mappedBy(f(Element element)) {
- final out = [];
- for (Element el in this) {
- out.add(f(el));
- }
- return out;
- }
+ Iterable mappedBy(f(Element element)) => new MappedIterable(this, f);
List<Element> where(bool f(Element element)) {
final out = [];

Powered by Google App Engine
This is Rietveld 408576698