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

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

Issue 14173003: Remove Collection, Collections and clean up List/Set/Queue implementations of retain/remove. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 8 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
Index: tools/dom/templates/html/impl/impl_Node.darttemplate
diff --git a/tools/dom/templates/html/impl/impl_Node.darttemplate b/tools/dom/templates/html/impl/impl_Node.darttemplate
index 68d8c48fdb3d50540e54dd1af821121b5c3638cb..cb664d6e721bc8dfc1ad3563a1f316c9871ca90b 100644
--- a/tools/dom/templates/html/impl/impl_Node.darttemplate
+++ b/tools/dom/templates/html/impl/impl_Node.darttemplate
@@ -105,14 +105,6 @@ $endif
_this.$dom_removeChild(node);
}
- void removeAll(Iterable elements) {
- // This is not using the default removeAll from ListBase because
- // DOM nodes can be efficiently removed in constant time.
- for (var element in elements) {
- remove(element);
- }
- }
-
void _filter(bool test(Node node), bool removeMatching) {
// This implementation of removeWhere/retainWhere is more efficient
// than the default in ListBase. Child nodes can be removed in constant
@@ -127,11 +119,6 @@ $endif
}
}
- void retainAll(Iterable elements) {
- Set retainSet = (elements is Set) ? elements : elements.toSet();
- _filter(retainSet.contains, false);
- }
-
void removeWhere(bool test(Node node)) {
_filter(test, true);
}
@@ -212,7 +199,7 @@ $(ANNOTATIONS)class $CLASSNAME$EXTENDS$IMPLEMENTS$NATIVESPEC {
return new _ChildNodeListLazy(this);
}
- void set nodes(Collection<Node> value) {
+ void set nodes(Iterable<Node> value) {
// Copy list first since we don't want liveness during iteration.
// TODO(jacobr): there is a better way to do this.
List copy = new List.from(value);
« no previous file with comments | « tools/dom/templates/html/impl/impl_Element.darttemplate ('k') | tools/dom/templates/html/impl/impl_Storage.darttemplate » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698