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

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 ac9990e488b3e128ffa7f46c75e1d7f501f5102e..9b5fbf82b543999a9306c04b1168afeeb8626499 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);
}
@@ -210,7 +197,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);

Powered by Google App Engine
This is Rietveld 408576698