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

Unified Diff: tools/dom/templates/html/impl/impl_Element.darttemplate

Issue 12391046: Add List.asMap(). (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Address comments. Created 7 years, 10 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « tools/dom/src/WrappedList.dart ('k') | tools/dom/templates/html/impl/impl_Node.darttemplate » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/dom/templates/html/impl/impl_Element.darttemplate
diff --git a/tools/dom/templates/html/impl/impl_Element.darttemplate b/tools/dom/templates/html/impl/impl_Element.darttemplate
index 12b0d0c4042ed4fc67d7b5c2681066e7f90be29e..35e8e2ffc9c4241e892495858b71b43fe1e7887d 100644
--- a/tools/dom/templates/html/impl/impl_Element.darttemplate
+++ b/tools/dom/templates/html/impl/impl_Element.darttemplate
@@ -260,6 +260,10 @@ class _ChildrenElementList implements List {
Element max([int compare(Element a, Element b)]) {
return IterableMixinWorkaround.max(this, compare);
}
+
+ Map<int, Element> asMap() {
+ return IterableMixinWorkaround.asMapList(this);
+ }
}
// TODO(jacobr): this is an inefficient implementation but it is hard to see
@@ -461,6 +465,10 @@ class _FrozenElementList implements List {
Element max([int compare(Element a, Element b)]) {
return IterableMixinWorkaround.max(this, compare);
}
+
+ Map<int, Element> asMap() {
+ return IterableMixinWorkaround.asMapList(this);
+ }
}
class _FrozenElementListIterator implements Iterator<Element> {
« no previous file with comments | « tools/dom/src/WrappedList.dart ('k') | tools/dom/templates/html/impl/impl_Node.darttemplate » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698