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

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

Issue 13963020: Resubmit: "With the collections deriving from ListBase, we no longer need to implement a numbe… (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
« no previous file with comments | « tools/dom/templates/html/impl/impl_HTMLSelectElement.darttemplate ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 1d84f30f2c48f8ecc55f7de19152e50f4861bafb..4e9474bef91fd457e7dabb32bf2b75e36a7fbe86 100644
--- a/tools/dom/templates/html/impl/impl_Node.darttemplate
+++ b/tools/dom/templates/html/impl/impl_Node.darttemplate
@@ -83,11 +83,12 @@ $endif
}
void insertAll(int index, Iterable<Node> iterable) {
- throw new UnimplementedError();
+ var item = this[index];
+ _this.insertAllBefore(iterable, item);
}
void setAll(int index, Iterable<Node> iterable) {
- throw new UnimplementedError();
+ throw new UnsupportedError("Cannot setAll on Node list");
}
Node removeLast() {
@@ -146,53 +147,22 @@ $endif
Iterator<Node> get iterator => _this.$dom_childNodes.iterator;
- List<Node> toList({ bool growable: true }) =>
- new List<Node>.from(this, growable: growable);
- Set<Node> toSet() => new Set<Node>.from(this);
-
- bool get isEmpty => this.length == 0;
-
// From List<Node>:
// TODO(jacobr): this could be implemented for child node lists.
// The exception we throw here is misleading.
- void sort([int compare(Node a, Node b)]) {
- throw new UnsupportedError("Cannot sort immutable List.");
+ void sort([Comparator<Node> compare]) {
+ throw new UnsupportedError("Cannot sort Node list");
}
// FIXME: implement these.
void setRange(int start, int end, Iterable<Node> iterable,
[int skipCount = 0]) {
- throw new UnsupportedError(
- "Cannot setRange on immutable List.");
- }
- void removeRange(int start, int end) {
- throw new UnsupportedError(
- "Cannot removeRange on immutable List.");
- }
-
- Iterable<Node> getRange(int start, int end) {
- throw new UnimplementedError("NodeList.getRange");
- }
-
- void replaceRange(int start, int end, Iterable<Node> iterable) {
- throw new UnimplementedError("NodeList.replaceRange");
- }
-
- void fillRange(int start, int end, [Node fillValue]) {
- throw new UnimplementedError("NodeList.fillRange");
- }
-
- List<Node> sublist(int start, [int end]) {
- if (end == null) end == length;
- return Lists.getRange(this, start, end, <Node>[]);
+ throw new UnsupportedError("Cannot setRange on Node list");
}
- String toString() {
- StringBuffer buffer = new StringBuffer('[');
- buffer.writeAll(this, ', ');
- buffer.write(']');
- return buffer.toString();
+ void fillRange(int start, int end, [Node fill]) {
+ throw new UnsupportedError("Cannot fillRange on Node list");
}
// -- end List<Node> mixins.
« no previous file with comments | « tools/dom/templates/html/impl/impl_HTMLSelectElement.darttemplate ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698