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

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: Reupload due to error. 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..27bdd8672ace146d6706e3c41575ab05a765c55e 100644
--- a/sdk/lib/html/templates/html/impl/impl_Element.darttemplate
+++ b/sdk/lib/html/templates/html/impl/impl_Element.darttemplate
@@ -59,12 +59,8 @@ 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)) {
+ return new MappedIterable<Element, dynamic>(this, f);
}
bool get isEmpty {
@@ -176,12 +172,8 @@ 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)) {
+ return new MappedIterable<Element, dynamic>(this, f);
}
List<Element> where(bool f(Element element)) {

Powered by Google App Engine
This is Rietveld 408576698