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

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

Issue 11817059: Fixes for a number of dart analyzer issues in dart:html. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Syncing to latest. Created 7 years, 11 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/CssClassSet.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 d6ddbe29f7f23276a12007a04b2c09b5a47cc40d..24ff43e5df6cea62ab00298b869e45ffcd1df52c 100644
--- a/tools/dom/templates/html/impl/impl_Element.darttemplate
+++ b/tools/dom/templates/html/impl/impl_Element.darttemplate
@@ -24,7 +24,7 @@ class _ChildrenElementList implements List {
}
Set<Element> toSet() {
- final output = new Set<Element>(_childElements.length);
+ final output = new Set<Element>();
for (int i = 0, len = _childElements.length; i < len; i++) {
output.add(_childElements[i]);
}
@@ -210,11 +210,11 @@ class _ChildrenElementList implements List {
}
Element min([int compare(Element a, Element b)]) {
- return _Collections.minInList(this, compare);
+ return Collections.min(this, compare);
}
Element max([int compare(Element a, Element b)]) {
- return _Collections.maxInList(this, compare);
+ return Collections.max(this, compare);
}
}
@@ -269,11 +269,14 @@ class _FrozenElementList implements List {
return false;
}
+ List<Element> toList() => new List<Element>.from(this);
+ Set<Element> toSet() => new Set<Element>.from(this);
+
List<Element> take(int n) {
return new ListView<Element>(this, 0, n);
}
- Iterable<Element> takeWhile(bool test(T value)) {
+ Iterable<Element> takeWhile(bool test(Element value)) {
return new TakeWhileIterable<Element>(this, test);
}
@@ -281,7 +284,7 @@ class _FrozenElementList implements List {
return new ListView<Element>(this, n, null);
}
- Iterable<Element> skipWhile(bool test(T value)) {
+ Iterable<Element> skipWhile(bool test(Element value)) {
return new SkipWhileIterable<Element>(this, test);
}
@@ -378,11 +381,11 @@ class _FrozenElementList implements List {
Element get single => _nodeList.single;
Element min([int compare(Element a, Element b)]) {
- return _Collections.minInList(this, compare);
+ return Collections.min(this, compare);
}
Element max([int compare(Element a, Element b)]) {
- return _Collections.maxInList(this, compare);
+ return Collections.max(this, compare);
}
}
« no previous file with comments | « tools/dom/src/CssClassSet.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