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

Unified Diff: sdk/lib/html/dart2js/html_dart2js.dart

Issue 11931034: Add methods to Collection. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Address comments. 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 | « sdk/lib/core/set.dart ('k') | sdk/lib/html/dartium/html_dartium.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sdk/lib/html/dart2js/html_dart2js.dart
diff --git a/sdk/lib/html/dart2js/html_dart2js.dart b/sdk/lib/html/dart2js/html_dart2js.dart
index 88ce93b90ef73fc998792cc01d060e3ddafe93bb..cc758e0d4938ab723f75ae46c9338ec32a6a8b79 100644
--- a/sdk/lib/html/dart2js/html_dart2js.dart
+++ b/sdk/lib/html/dart2js/html_dart2js.dart
@@ -6685,11 +6685,31 @@ class DomMimeTypeArray implements JavaScriptIndexingBehavior, List<DomMimeType>
DomMimeType max([int compare(DomMimeType a, DomMimeType b)]) => IterableMixinWorkaround.max(this, compare);
DomMimeType removeAt(int pos) {
- throw new UnsupportedError("Cannot removeAt on immutable List.");
+ throw new UnsupportedError("Cannot remove from immutable List.");
}
DomMimeType removeLast() {
- throw new UnsupportedError("Cannot removeLast on immutable List.");
+ throw new UnsupportedError("Cannot remove from immutable List.");
+ }
+
+ void remove(Object object) {
+ throw new UnsupportedError("Cannot remove from immutable List.");
+ }
+
+ void removeAll(Iterable elements) {
+ throw new UnsupportedError("Cannot remove from immutable List.");
+ }
+
+ void retainAll(Iterable elements) {
+ throw new UnsupportedError("Cannot remove from immutable List.");
+ }
+
+ void removeMatching(bool test(DomMimeType element)) {
+ throw new UnsupportedError("Cannot remove from immutable List.");
+ }
+
+ void retainMatching(bool test(DomMimeType element)) {
+ throw new UnsupportedError("Cannot remove from immutable List.");
}
void setRange(int start, int rangeLength, List<DomMimeType> from, [int startFrom]) {
@@ -6897,11 +6917,31 @@ class DomPluginArray implements JavaScriptIndexingBehavior, List<DomPlugin> nati
DomPlugin max([int compare(DomPlugin a, DomPlugin b)]) => IterableMixinWorkaround.max(this, compare);
DomPlugin removeAt(int pos) {
- throw new UnsupportedError("Cannot removeAt on immutable List.");
+ throw new UnsupportedError("Cannot remove from immutable List.");
}
DomPlugin removeLast() {
- throw new UnsupportedError("Cannot removeLast on immutable List.");
+ throw new UnsupportedError("Cannot remove from immutable List.");
+ }
+
+ void remove(Object object) {
+ throw new UnsupportedError("Cannot remove from immutable List.");
+ }
+
+ void removeAll(Iterable elements) {
+ throw new UnsupportedError("Cannot remove from immutable List.");
+ }
+
+ void retainAll(Iterable elements) {
+ throw new UnsupportedError("Cannot remove from immutable List.");
+ }
+
+ void removeMatching(bool test(DomPlugin element)) {
+ throw new UnsupportedError("Cannot remove from immutable List.");
+ }
+
+ void retainMatching(bool test(DomPlugin element)) {
+ throw new UnsupportedError("Cannot remove from immutable List.");
}
void setRange(int start, int rangeLength, List<DomPlugin> from, [int startFrom]) {
@@ -7168,11 +7208,31 @@ class DomStringList implements JavaScriptIndexingBehavior, List<String> native "
String max([int compare(String a, String b)]) => IterableMixinWorkaround.max(this, compare);
String removeAt(int pos) {
- throw new UnsupportedError("Cannot removeAt on immutable List.");
+ throw new UnsupportedError("Cannot remove from immutable List.");
}
String removeLast() {
- throw new UnsupportedError("Cannot removeLast on immutable List.");
+ throw new UnsupportedError("Cannot remove from immutable List.");
+ }
+
+ void remove(Object object) {
+ throw new UnsupportedError("Cannot remove from immutable List.");
+ }
+
+ void removeAll(Iterable elements) {
+ throw new UnsupportedError("Cannot remove from immutable List.");
+ }
+
+ void retainAll(Iterable elements) {
+ throw new UnsupportedError("Cannot remove from immutable List.");
+ }
+
+ void removeMatching(bool test(String element)) {
+ throw new UnsupportedError("Cannot remove from immutable List.");
+ }
+
+ void retainMatching(bool test(String element)) {
+ throw new UnsupportedError("Cannot remove from immutable List.");
}
void setRange(int start, int rangeLength, List<String> from, [int startFrom]) {
@@ -7350,10 +7410,10 @@ class _ChildrenElementList implements List {
_element.$dom_replaceChild(value, _childElements[index]);
}
- void set length(int newLength) {
- // TODO(jacobr): remove children when length is reduced.
- throw new UnsupportedError('');
- }
+ void set length(int newLength) {
+ // TODO(jacobr): remove children when length is reduced.
+ throw new UnsupportedError('');
+ }
Element add(Element value) {
_element.$dom_appendChild(value);
@@ -7383,6 +7443,31 @@ class _ChildrenElementList implements List {
throw new UnimplementedError();
}
+ void remove(Object object) {
+ if (object is Element) {
+ Element element = object;
+ if (identical(element.parentNode, this)) {
+ _element.$dom_removeChild(element);
+ }
+ }
+ }
+
+ void removeAll(Iterable elements) {
+ Collections.removeAll(this, elements);
+ }
+
+ void retainAll(Iterable elements) {
+ Collections.retainAll(this, elements);
+ }
+
+ void removeMatching(bool test(Element element)) {
+ Collections.removeMatching(this, test);
+ }
+
+ void retainMatching(bool test(Element element)) {
+ Collections.retainMatching(this, test);
+ }
+
void removeRange(int start, int rangeLength) {
throw new UnimplementedError();
}
@@ -7609,6 +7694,26 @@ class _FrozenElementList implements List {
throw new UnsupportedError('');
}
+ void remove(Object element) {
+ throw new UnsupportedError('');
+ }
+
+ void removeAll(Iterable elements) {
+ throw new UnsupportedError('');
+ }
+
+ void retainAll(Iterable elements) {
+ throw new UnsupportedError('');
+ }
+
+ void removeMatching(bool test(Element element)) {
+ throw new UnsupportedError('');
+ }
+
+ void retainMatching(bool test(Element element)) {
+ throw new UnsupportedError('');
+ }
+
Element get first => _nodeList.first;
Element get last => _nodeList.last;
@@ -9645,11 +9750,31 @@ class FileList implements JavaScriptIndexingBehavior, List<File> native "*FileLi
File max([int compare(File a, File b)]) => IterableMixinWorkaround.max(this, compare);
File removeAt(int pos) {
- throw new UnsupportedError("Cannot removeAt on immutable List.");
+ throw new UnsupportedError("Cannot remove from immutable List.");
}
File removeLast() {
- throw new UnsupportedError("Cannot removeLast on immutable List.");
+ throw new UnsupportedError("Cannot remove from immutable List.");
+ }
+
+ void remove(Object object) {
+ throw new UnsupportedError("Cannot remove from immutable List.");
+ }
+
+ void removeAll(Iterable elements) {
+ throw new UnsupportedError("Cannot remove from immutable List.");
+ }
+
+ void retainAll(Iterable elements) {
+ throw new UnsupportedError("Cannot remove from immutable List.");
+ }
+
+ void removeMatching(bool test(File element)) {
+ throw new UnsupportedError("Cannot remove from immutable List.");
+ }
+
+ void retainMatching(bool test(File element)) {
+ throw new UnsupportedError("Cannot remove from immutable List.");
}
void setRange(int start, int rangeLength, List<File> from, [int startFrom]) {
@@ -10135,11 +10260,31 @@ class Float32Array extends ArrayBufferView implements JavaScriptIndexingBehavior
num max([int compare(num a, num b)]) => IterableMixinWorkaround.max(this, compare);
num removeAt(int pos) {
- throw new UnsupportedError("Cannot removeAt on immutable List.");
+ throw new UnsupportedError("Cannot remove from immutable List.");
}
num removeLast() {
- throw new UnsupportedError("Cannot removeLast on immutable List.");
+ throw new UnsupportedError("Cannot remove from immutable List.");
+ }
+
+ void remove(Object object) {
+ throw new UnsupportedError("Cannot remove from immutable List.");
+ }
+
+ void removeAll(Iterable elements) {
+ throw new UnsupportedError("Cannot remove from immutable List.");
+ }
+
+ void retainAll(Iterable elements) {
+ throw new UnsupportedError("Cannot remove from immutable List.");
+ }
+
+ void removeMatching(bool test(num element)) {
+ throw new UnsupportedError("Cannot remove from immutable List.");
+ }
+
+ void retainMatching(bool test(num element)) {
+ throw new UnsupportedError("Cannot remove from immutable List.");
}
void setRange(int start, int rangeLength, List<num> from, [int startFrom]) {
@@ -10311,11 +10456,31 @@ class Float64Array extends ArrayBufferView implements JavaScriptIndexingBehavior
num max([int compare(num a, num b)]) => IterableMixinWorkaround.max(this, compare);
num removeAt(int pos) {
- throw new UnsupportedError("Cannot removeAt on immutable List.");
+ throw new UnsupportedError("Cannot remove from immutable List.");
}
num removeLast() {
- throw new UnsupportedError("Cannot removeLast on immutable List.");
+ throw new UnsupportedError("Cannot remove from immutable List.");
+ }
+
+ void remove(Object object) {
+ throw new UnsupportedError("Cannot remove from immutable List.");
+ }
+
+ void removeAll(Iterable elements) {
+ throw new UnsupportedError("Cannot remove from immutable List.");
+ }
+
+ void retainAll(Iterable elements) {
+ throw new UnsupportedError("Cannot remove from immutable List.");
+ }
+
+ void removeMatching(bool test(num element)) {
+ throw new UnsupportedError("Cannot remove from immutable List.");
+ }
+
+ void retainMatching(bool test(num element)) {
+ throw new UnsupportedError("Cannot remove from immutable List.");
}
void setRange(int start, int rangeLength, List<num> from, [int startFrom]) {
@@ -10737,11 +10902,31 @@ class HtmlAllCollection implements JavaScriptIndexingBehavior, List<Node> native
Node max([int compare(Node a, Node b)]) => IterableMixinWorkaround.max(this, compare);
Node removeAt(int pos) {
- throw new UnsupportedError("Cannot removeAt on immutable List.");
+ throw new UnsupportedError("Cannot remove from immutable List.");
}
Node removeLast() {
- throw new UnsupportedError("Cannot removeLast on immutable List.");
+ throw new UnsupportedError("Cannot remove from immutable List.");
+ }
+
+ void remove(Object object) {
+ throw new UnsupportedError("Cannot remove from immutable List.");
+ }
+
+ void removeAll(Iterable elements) {
+ throw new UnsupportedError("Cannot remove from immutable List.");
+ }
+
+ void retainAll(Iterable elements) {
+ throw new UnsupportedError("Cannot remove from immutable List.");
+ }
+
+ void removeMatching(bool test(Node element)) {
+ throw new UnsupportedError("Cannot remove from immutable List.");
+ }
+
+ void retainMatching(bool test(Node element)) {
+ throw new UnsupportedError("Cannot remove from immutable List.");
}
void setRange(int start, int rangeLength, List<Node> from, [int startFrom]) {
@@ -10908,11 +11093,31 @@ class HtmlCollection implements JavaScriptIndexingBehavior, List<Node> native "*
Node max([int compare(Node a, Node b)]) => IterableMixinWorkaround.max(this, compare);
Node removeAt(int pos) {
- throw new UnsupportedError("Cannot removeAt on immutable List.");
+ throw new UnsupportedError("Cannot remove from immutable List.");
}
Node removeLast() {
- throw new UnsupportedError("Cannot removeLast on immutable List.");
+ throw new UnsupportedError("Cannot remove from immutable List.");
+ }
+
+ void remove(Object object) {
+ throw new UnsupportedError("Cannot remove from immutable List.");
+ }
+
+ void removeAll(Iterable elements) {
+ throw new UnsupportedError("Cannot remove from immutable List.");
+ }
+
+ void retainAll(Iterable elements) {
+ throw new UnsupportedError("Cannot remove from immutable List.");
+ }
+
+ void removeMatching(bool test(Node element)) {
+ throw new UnsupportedError("Cannot remove from immutable List.");
+ }
+
+ void retainMatching(bool test(Node element)) {
+ throw new UnsupportedError("Cannot remove from immutable List.");
}
void setRange(int start, int rangeLength, List<Node> from, [int startFrom]) {
@@ -12502,11 +12707,31 @@ class Int16Array extends ArrayBufferView implements JavaScriptIndexingBehavior,
int max([int compare(int a, int b)]) => IterableMixinWorkaround.max(this, compare);
int removeAt(int pos) {
- throw new UnsupportedError("Cannot removeAt on immutable List.");
+ throw new UnsupportedError("Cannot remove from immutable List.");
}
int removeLast() {
- throw new UnsupportedError("Cannot removeLast on immutable List.");
+ throw new UnsupportedError("Cannot remove from immutable List.");
+ }
+
+ void remove(Object object) {
+ throw new UnsupportedError("Cannot remove from immutable List.");
+ }
+
+ void removeAll(Iterable elements) {
+ throw new UnsupportedError("Cannot remove from immutable List.");
+ }
+
+ void retainAll(Iterable elements) {
+ throw new UnsupportedError("Cannot remove from immutable List.");
+ }
+
+ void removeMatching(bool test(int element)) {
+ throw new UnsupportedError("Cannot remove from immutable List.");
+ }
+
+ void retainMatching(bool test(int element)) {
+ throw new UnsupportedError("Cannot remove from immutable List.");
}
void setRange(int start, int rangeLength, List<int> from, [int startFrom]) {
@@ -12678,11 +12903,31 @@ class Int32Array extends ArrayBufferView implements JavaScriptIndexingBehavior,
int max([int compare(int a, int b)]) => IterableMixinWorkaround.max(this, compare);
int removeAt(int pos) {
- throw new UnsupportedError("Cannot removeAt on immutable List.");
+ throw new UnsupportedError("Cannot remove from immutable List.");
}
int removeLast() {
- throw new UnsupportedError("Cannot removeLast on immutable List.");
+ throw new UnsupportedError("Cannot remove from immutable List.");
+ }
+
+ void remove(Object object) {
+ throw new UnsupportedError("Cannot remove from immutable List.");
+ }
+
+ void removeAll(Iterable elements) {
+ throw new UnsupportedError("Cannot remove from immutable List.");
+ }
+
+ void retainAll(Iterable elements) {
+ throw new UnsupportedError("Cannot remove from immutable List.");
+ }
+
+ void removeMatching(bool test(int element)) {
+ throw new UnsupportedError("Cannot remove from immutable List.");
+ }
+
+ void retainMatching(bool test(int element)) {
+ throw new UnsupportedError("Cannot remove from immutable List.");
}
void setRange(int start, int rangeLength, List<int> from, [int startFrom]) {
@@ -12854,11 +13099,31 @@ class Int8Array extends ArrayBufferView implements JavaScriptIndexingBehavior, L
int max([int compare(int a, int b)]) => IterableMixinWorkaround.max(this, compare);
int removeAt(int pos) {
- throw new UnsupportedError("Cannot removeAt on immutable List.");
+ throw new UnsupportedError("Cannot remove from immutable List.");
}
int removeLast() {
- throw new UnsupportedError("Cannot removeLast on immutable List.");
+ throw new UnsupportedError("Cannot remove from immutable List.");
+ }
+
+ void remove(Object object) {
+ throw new UnsupportedError("Cannot remove from immutable List.");
+ }
+
+ void removeAll(Iterable elements) {
+ throw new UnsupportedError("Cannot remove from immutable List.");
+ }
+
+ void retainAll(Iterable elements) {
+ throw new UnsupportedError("Cannot remove from immutable List.");
+ }
+
+ void removeMatching(bool test(int element)) {
+ throw new UnsupportedError("Cannot remove from immutable List.");
+ }
+
+ void retainMatching(bool test(int element)) {
+ throw new UnsupportedError("Cannot remove from immutable List.");
}
void setRange(int start, int rangeLength, List<int> from, [int startFrom]) {
@@ -14696,11 +14961,31 @@ class NamedNodeMap implements JavaScriptIndexingBehavior, List<Node> native "*Na
Node max([int compare(Node a, Node b)]) => IterableMixinWorkaround.max(this, compare);
Node removeAt(int pos) {
- throw new UnsupportedError("Cannot removeAt on immutable List.");
+ throw new UnsupportedError("Cannot remove from immutable List.");
}
Node removeLast() {
- throw new UnsupportedError("Cannot removeLast on immutable List.");
+ throw new UnsupportedError("Cannot remove from immutable List.");
+ }
+
+ void remove(Object object) {
+ throw new UnsupportedError("Cannot remove from immutable List.");
+ }
+
+ void removeAll(Iterable elements) {
+ throw new UnsupportedError("Cannot remove from immutable List.");
+ }
+
+ void retainAll(Iterable elements) {
+ throw new UnsupportedError("Cannot remove from immutable List.");
+ }
+
+ void removeMatching(bool test(Node element)) {
+ throw new UnsupportedError("Cannot remove from immutable List.");
+ }
+
+ void retainMatching(bool test(Node element)) {
+ throw new UnsupportedError("Cannot remove from immutable List.");
}
void setRange(int start, int rangeLength, List<Node> from, [int startFrom]) {
@@ -14930,6 +15215,29 @@ class _ChildNodeListLazy implements List {
return result;
}
+ void remove(Object object) {
+ if (object is! Node) return;
+ Node node = object;
+ if (!identical(this, node.parentNode)) return;
+ _this.$dom_removeChild(node);
+ }
+
+ void removeAll(Iterable elements) {
+ IterableMixinWorkaround.removeAll(this, elements);
+ }
+
+ void retainAll(Iterable elements) {
+ IterableMixinWorkaround.retainAll(this, elements);
+ }
+
+ void removeMatching(bool test(Node node)) {
+ IterableMixinWorkaround.removeMatching(this, test);
+ }
+
+ void retainMatching(bool test(Node node)) {
+ IterableMixinWorkaround.retainMatching(this, test);
+ }
+
void clear() {
_this.text = '';
}
@@ -15404,11 +15712,31 @@ class NodeList implements JavaScriptIndexingBehavior, List<Node> native "*NodeLi
Node max([int compare(Node a, Node b)]) => IterableMixinWorkaround.max(this, compare);
Node removeAt(int pos) {
- throw new UnsupportedError("Cannot removeAt on immutable List.");
+ throw new UnsupportedError("Cannot remove from immutable List.");
}
Node removeLast() {
- throw new UnsupportedError("Cannot removeLast on immutable List.");
+ throw new UnsupportedError("Cannot remove from immutable List.");
+ }
+
+ void remove(Object object) {
+ throw new UnsupportedError("Cannot remove from immutable List.");
+ }
+
+ void removeAll(Iterable elements) {
+ throw new UnsupportedError("Cannot remove from immutable List.");
+ }
+
+ void retainAll(Iterable elements) {
+ throw new UnsupportedError("Cannot remove from immutable List.");
+ }
+
+ void removeMatching(bool test(Node element)) {
+ throw new UnsupportedError("Cannot remove from immutable List.");
+ }
+
+ void retainMatching(bool test(Node element)) {
+ throw new UnsupportedError("Cannot remove from immutable List.");
}
void setRange(int start, int rangeLength, List<Node> from, [int startFrom]) {
@@ -17472,11 +17800,31 @@ class SourceBufferList extends EventTarget implements JavaScriptIndexingBehavior
SourceBuffer max([int compare(SourceBuffer a, SourceBuffer b)]) => IterableMixinWorkaround.max(this, compare);
SourceBuffer removeAt(int pos) {
- throw new UnsupportedError("Cannot removeAt on immutable List.");
+ throw new UnsupportedError("Cannot remove from immutable List.");
}
SourceBuffer removeLast() {
- throw new UnsupportedError("Cannot removeLast on immutable List.");
+ throw new UnsupportedError("Cannot remove from immutable List.");
+ }
+
+ void remove(Object object) {
+ throw new UnsupportedError("Cannot remove from immutable List.");
+ }
+
+ void removeAll(Iterable elements) {
+ throw new UnsupportedError("Cannot remove from immutable List.");
+ }
+
+ void retainAll(Iterable elements) {
+ throw new UnsupportedError("Cannot remove from immutable List.");
+ }
+
+ void removeMatching(bool test(SourceBuffer element)) {
+ throw new UnsupportedError("Cannot remove from immutable List.");
+ }
+
+ void retainMatching(bool test(SourceBuffer element)) {
+ throw new UnsupportedError("Cannot remove from immutable List.");
}
void setRange(int start, int rangeLength, List<SourceBuffer> from, [int startFrom]) {
@@ -17707,11 +18055,31 @@ class SpeechGrammarList implements JavaScriptIndexingBehavior, List<SpeechGramma
SpeechGrammar max([int compare(SpeechGrammar a, SpeechGrammar b)]) => IterableMixinWorkaround.max(this, compare);
SpeechGrammar removeAt(int pos) {
- throw new UnsupportedError("Cannot removeAt on immutable List.");
+ throw new UnsupportedError("Cannot remove from immutable List.");
}
SpeechGrammar removeLast() {
- throw new UnsupportedError("Cannot removeLast on immutable List.");
+ throw new UnsupportedError("Cannot remove from immutable List.");
+ }
+
+ void remove(Object object) {
+ throw new UnsupportedError("Cannot remove from immutable List.");
+ }
+
+ void removeAll(Iterable elements) {
+ throw new UnsupportedError("Cannot remove from immutable List.");
+ }
+
+ void retainAll(Iterable elements) {
+ throw new UnsupportedError("Cannot remove from immutable List.");
+ }
+
+ void removeMatching(bool test(SpeechGrammar element)) {
+ throw new UnsupportedError("Cannot remove from immutable List.");
+ }
+
+ void retainMatching(bool test(SpeechGrammar element)) {
+ throw new UnsupportedError("Cannot remove from immutable List.");
}
void setRange(int start, int rangeLength, List<SpeechGrammar> from, [int startFrom]) {
@@ -18203,11 +18571,31 @@ class SqlResultSetRowList implements JavaScriptIndexingBehavior, List<Map> nativ
Map max([int compare(Map a, Map b)]) => IterableMixinWorkaround.max(this, compare);
Map removeAt(int pos) {
- throw new UnsupportedError("Cannot removeAt on immutable List.");
+ throw new UnsupportedError("Cannot remove from immutable List.");
}
Map removeLast() {
- throw new UnsupportedError("Cannot removeLast on immutable List.");
+ throw new UnsupportedError("Cannot remove from immutable List.");
+ }
+
+ void remove(Object object) {
+ throw new UnsupportedError("Cannot remove from immutable List.");
+ }
+
+ void removeAll(Iterable elements) {
+ throw new UnsupportedError("Cannot remove from immutable List.");
+ }
+
+ void retainAll(Iterable elements) {
+ throw new UnsupportedError("Cannot remove from immutable List.");
+ }
+
+ void removeMatching(bool test(Map element)) {
+ throw new UnsupportedError("Cannot remove from immutable List.");
+ }
+
+ void retainMatching(bool test(Map element)) {
+ throw new UnsupportedError("Cannot remove from immutable List.");
}
void setRange(int start, int rangeLength, List<Map> from, [int startFrom]) {
@@ -19105,11 +19493,31 @@ class TextTrackCueList implements List<TextTrackCue>, JavaScriptIndexingBehavior
TextTrackCue max([int compare(TextTrackCue a, TextTrackCue b)]) => IterableMixinWorkaround.max(this, compare);
TextTrackCue removeAt(int pos) {
- throw new UnsupportedError("Cannot removeAt on immutable List.");
+ throw new UnsupportedError("Cannot remove from immutable List.");
}
TextTrackCue removeLast() {
- throw new UnsupportedError("Cannot removeLast on immutable List.");
+ throw new UnsupportedError("Cannot remove from immutable List.");
+ }
+
+ void remove(Object object) {
+ throw new UnsupportedError("Cannot remove from immutable List.");
+ }
+
+ void removeAll(Iterable elements) {
+ throw new UnsupportedError("Cannot remove from immutable List.");
+ }
+
+ void retainAll(Iterable elements) {
+ throw new UnsupportedError("Cannot remove from immutable List.");
+ }
+
+ void removeMatching(bool test(TextTrackCue element)) {
+ throw new UnsupportedError("Cannot remove from immutable List.");
+ }
+
+ void retainMatching(bool test(TextTrackCue element)) {
+ throw new UnsupportedError("Cannot remove from immutable List.");
}
void setRange(int start, int rangeLength, List<TextTrackCue> from, [int startFrom]) {
@@ -19279,11 +19687,31 @@ class TextTrackList extends EventTarget implements JavaScriptIndexingBehavior, L
TextTrack max([int compare(TextTrack a, TextTrack b)]) => IterableMixinWorkaround.max(this, compare);
TextTrack removeAt(int pos) {
- throw new UnsupportedError("Cannot removeAt on immutable List.");
+ throw new UnsupportedError("Cannot remove from immutable List.");
}
TextTrack removeLast() {
- throw new UnsupportedError("Cannot removeLast on immutable List.");
+ throw new UnsupportedError("Cannot remove from immutable List.");
+ }
+
+ void remove(Object object) {
+ throw new UnsupportedError("Cannot remove from immutable List.");
+ }
+
+ void removeAll(Iterable elements) {
+ throw new UnsupportedError("Cannot remove from immutable List.");
+ }
+
+ void retainAll(Iterable elements) {
+ throw new UnsupportedError("Cannot remove from immutable List.");
+ }
+
+ void removeMatching(bool test(TextTrack element)) {
+ throw new UnsupportedError("Cannot remove from immutable List.");
+ }
+
+ void retainMatching(bool test(TextTrack element)) {
+ throw new UnsupportedError("Cannot remove from immutable List.");
}
void setRange(int start, int rangeLength, List<TextTrack> from, [int startFrom]) {
@@ -19588,11 +20016,31 @@ class TouchList implements JavaScriptIndexingBehavior, List<Touch> native "*Touc
Touch max([int compare(Touch a, Touch b)]) => IterableMixinWorkaround.max(this, compare);
Touch removeAt(int pos) {
- throw new UnsupportedError("Cannot removeAt on immutable List.");
+ throw new UnsupportedError("Cannot remove from immutable List.");
}
Touch removeLast() {
- throw new UnsupportedError("Cannot removeLast on immutable List.");
+ throw new UnsupportedError("Cannot remove from immutable List.");
+ }
+
+ void remove(Object object) {
+ throw new UnsupportedError("Cannot remove from immutable List.");
+ }
+
+ void removeAll(Iterable elements) {
+ throw new UnsupportedError("Cannot remove from immutable List.");
+ }
+
+ void retainAll(Iterable elements) {
+ throw new UnsupportedError("Cannot remove from immutable List.");
+ }
+
+ void removeMatching(bool test(Touch element)) {
+ throw new UnsupportedError("Cannot remove from immutable List.");
+ }
+
+ void retainMatching(bool test(Touch element)) {
+ throw new UnsupportedError("Cannot remove from immutable List.");
}
void setRange(int start, int rangeLength, List<Touch> from, [int startFrom]) {
@@ -19956,11 +20404,31 @@ class Uint16Array extends ArrayBufferView implements JavaScriptIndexingBehavior,
int max([int compare(int a, int b)]) => IterableMixinWorkaround.max(this, compare);
int removeAt(int pos) {
- throw new UnsupportedError("Cannot removeAt on immutable List.");
+ throw new UnsupportedError("Cannot remove from immutable List.");
}
int removeLast() {
- throw new UnsupportedError("Cannot removeLast on immutable List.");
+ throw new UnsupportedError("Cannot remove from immutable List.");
+ }
+
+ void remove(Object object) {
+ throw new UnsupportedError("Cannot remove from immutable List.");
+ }
+
+ void removeAll(Iterable elements) {
+ throw new UnsupportedError("Cannot remove from immutable List.");
+ }
+
+ void retainAll(Iterable elements) {
+ throw new UnsupportedError("Cannot remove from immutable List.");
+ }
+
+ void removeMatching(bool test(int element)) {
+ throw new UnsupportedError("Cannot remove from immutable List.");
+ }
+
+ void retainMatching(bool test(int element)) {
+ throw new UnsupportedError("Cannot remove from immutable List.");
}
void setRange(int start, int rangeLength, List<int> from, [int startFrom]) {
@@ -20132,11 +20600,31 @@ class Uint32Array extends ArrayBufferView implements JavaScriptIndexingBehavior,
int max([int compare(int a, int b)]) => IterableMixinWorkaround.max(this, compare);
int removeAt(int pos) {
- throw new UnsupportedError("Cannot removeAt on immutable List.");
+ throw new UnsupportedError("Cannot remove from immutable List.");
}
int removeLast() {
- throw new UnsupportedError("Cannot removeLast on immutable List.");
+ throw new UnsupportedError("Cannot remove from immutable List.");
+ }
+
+ void remove(Object object) {
+ throw new UnsupportedError("Cannot remove from immutable List.");
+ }
+
+ void removeAll(Iterable elements) {
+ throw new UnsupportedError("Cannot remove from immutable List.");
+ }
+
+ void retainAll(Iterable elements) {
+ throw new UnsupportedError("Cannot remove from immutable List.");
+ }
+
+ void removeMatching(bool test(int element)) {
+ throw new UnsupportedError("Cannot remove from immutable List.");
+ }
+
+ void retainMatching(bool test(int element)) {
+ throw new UnsupportedError("Cannot remove from immutable List.");
}
void setRange(int start, int rangeLength, List<int> from, [int startFrom]) {
@@ -20308,11 +20796,31 @@ class Uint8Array extends ArrayBufferView implements JavaScriptIndexingBehavior,
int max([int compare(int a, int b)]) => IterableMixinWorkaround.max(this, compare);
int removeAt(int pos) {
- throw new UnsupportedError("Cannot removeAt on immutable List.");
+ throw new UnsupportedError("Cannot remove from immutable List.");
}
int removeLast() {
- throw new UnsupportedError("Cannot removeLast on immutable List.");
+ throw new UnsupportedError("Cannot remove from immutable List.");
+ }
+
+ void remove(Object object) {
+ throw new UnsupportedError("Cannot remove from immutable List.");
+ }
+
+ void removeAll(Iterable elements) {
+ throw new UnsupportedError("Cannot remove from immutable List.");
+ }
+
+ void retainAll(Iterable elements) {
+ throw new UnsupportedError("Cannot remove from immutable List.");
+ }
+
+ void removeMatching(bool test(int element)) {
+ throw new UnsupportedError("Cannot remove from immutable List.");
+ }
+
+ void retainMatching(bool test(int element)) {
+ throw new UnsupportedError("Cannot remove from immutable List.");
}
void setRange(int start, int rangeLength, List<int> from, [int startFrom]) {
@@ -20482,11 +20990,31 @@ class Uint8ClampedArray extends Uint8Array implements JavaScriptIndexingBehavior
int max([int compare(int a, int b)]) => IterableMixinWorkaround.max(this, compare);
int removeAt(int pos) {
- throw new UnsupportedError("Cannot removeAt on immutable List.");
+ throw new UnsupportedError("Cannot remove from immutable List.");
}
int removeLast() {
- throw new UnsupportedError("Cannot removeLast on immutable List.");
+ throw new UnsupportedError("Cannot remove from immutable List.");
+ }
+
+ void remove(Object object) {
+ throw new UnsupportedError("Cannot remove from immutable List.");
+ }
+
+ void removeAll(Iterable elements) {
+ throw new UnsupportedError("Cannot remove from immutable List.");
+ }
+
+ void retainAll(Iterable elements) {
+ throw new UnsupportedError("Cannot remove from immutable List.");
+ }
+
+ void removeMatching(bool test(int element)) {
+ throw new UnsupportedError("Cannot remove from immutable List.");
+ }
+
+ void retainMatching(bool test(int element)) {
+ throw new UnsupportedError("Cannot remove from immutable List.");
}
void setRange(int start, int rangeLength, List<int> from, [int startFrom]) {
@@ -23762,11 +24290,31 @@ class _ClientRectList implements JavaScriptIndexingBehavior, List<ClientRect> na
ClientRect max([int compare(ClientRect a, ClientRect b)]) => IterableMixinWorkaround.max(this, compare);
ClientRect removeAt(int pos) {
- throw new UnsupportedError("Cannot removeAt on immutable List.");
+ throw new UnsupportedError("Cannot remove from immutable List.");
}
ClientRect removeLast() {
- throw new UnsupportedError("Cannot removeLast on immutable List.");
+ throw new UnsupportedError("Cannot remove from immutable List.");
+ }
+
+ void remove(Object object) {
+ throw new UnsupportedError("Cannot remove from immutable List.");
+ }
+
+ void removeAll(Iterable elements) {
+ throw new UnsupportedError("Cannot remove from immutable List.");
+ }
+
+ void retainAll(Iterable elements) {
+ throw new UnsupportedError("Cannot remove from immutable List.");
+ }
+
+ void removeMatching(bool test(ClientRect element)) {
+ throw new UnsupportedError("Cannot remove from immutable List.");
+ }
+
+ void retainMatching(bool test(ClientRect element)) {
+ throw new UnsupportedError("Cannot remove from immutable List.");
}
void setRange(int start, int rangeLength, List<ClientRect> from, [int startFrom]) {
@@ -23926,11 +24474,31 @@ class _CssRuleList implements JavaScriptIndexingBehavior, List<CssRule> native "
CssRule max([int compare(CssRule a, CssRule b)]) => IterableMixinWorkaround.max(this, compare);
CssRule removeAt(int pos) {
- throw new UnsupportedError("Cannot removeAt on immutable List.");
+ throw new UnsupportedError("Cannot remove from immutable List.");
}
CssRule removeLast() {
- throw new UnsupportedError("Cannot removeLast on immutable List.");
+ throw new UnsupportedError("Cannot remove from immutable List.");
+ }
+
+ void remove(Object object) {
+ throw new UnsupportedError("Cannot remove from immutable List.");
+ }
+
+ void removeAll(Iterable elements) {
+ throw new UnsupportedError("Cannot remove from immutable List.");
+ }
+
+ void retainAll(Iterable elements) {
+ throw new UnsupportedError("Cannot remove from immutable List.");
+ }
+
+ void removeMatching(bool test(CssRule element)) {
+ throw new UnsupportedError("Cannot remove from immutable List.");
+ }
+
+ void retainMatching(bool test(CssRule element)) {
+ throw new UnsupportedError("Cannot remove from immutable List.");
}
void setRange(int start, int rangeLength, List<CssRule> from, [int startFrom]) {
@@ -24090,11 +24658,31 @@ class _CssValueList extends CssValue implements List<CssValue>, JavaScriptIndexi
CssValue max([int compare(CssValue a, CssValue b)]) => IterableMixinWorkaround.max(this, compare);
CssValue removeAt(int pos) {
- throw new UnsupportedError("Cannot removeAt on immutable List.");
+ throw new UnsupportedError("Cannot remove from immutable List.");
}
CssValue removeLast() {
- throw new UnsupportedError("Cannot removeLast on immutable List.");
+ throw new UnsupportedError("Cannot remove from immutable List.");
+ }
+
+ void remove(Object object) {
+ throw new UnsupportedError("Cannot remove from immutable List.");
+ }
+
+ void removeAll(Iterable elements) {
+ throw new UnsupportedError("Cannot remove from immutable List.");
+ }
+
+ void retainAll(Iterable elements) {
+ throw new UnsupportedError("Cannot remove from immutable List.");
+ }
+
+ void removeMatching(bool test(CssValue element)) {
+ throw new UnsupportedError("Cannot remove from immutable List.");
+ }
+
+ void retainMatching(bool test(CssValue element)) {
+ throw new UnsupportedError("Cannot remove from immutable List.");
}
void setRange(int start, int rangeLength, List<CssValue> from, [int startFrom]) {
@@ -24264,11 +24852,31 @@ class _EntryArray implements JavaScriptIndexingBehavior, List<Entry> native "*En
Entry max([int compare(Entry a, Entry b)]) => IterableMixinWorkaround.max(this, compare);
Entry removeAt(int pos) {
- throw new UnsupportedError("Cannot removeAt on immutable List.");
+ throw new UnsupportedError("Cannot remove from immutable List.");
}
Entry removeLast() {
- throw new UnsupportedError("Cannot removeLast on immutable List.");
+ throw new UnsupportedError("Cannot remove from immutable List.");
+ }
+
+ void remove(Object object) {
+ throw new UnsupportedError("Cannot remove from immutable List.");
+ }
+
+ void removeAll(Iterable elements) {
+ throw new UnsupportedError("Cannot remove from immutable List.");
+ }
+
+ void retainAll(Iterable elements) {
+ throw new UnsupportedError("Cannot remove from immutable List.");
+ }
+
+ void removeMatching(bool test(Entry element)) {
+ throw new UnsupportedError("Cannot remove from immutable List.");
+ }
+
+ void retainMatching(bool test(Entry element)) {
+ throw new UnsupportedError("Cannot remove from immutable List.");
}
void setRange(int start, int rangeLength, List<Entry> from, [int startFrom]) {
@@ -24428,11 +25036,31 @@ class _EntryArraySync implements JavaScriptIndexingBehavior, List<EntrySync> nat
EntrySync max([int compare(EntrySync a, EntrySync b)]) => IterableMixinWorkaround.max(this, compare);
EntrySync removeAt(int pos) {
- throw new UnsupportedError("Cannot removeAt on immutable List.");
+ throw new UnsupportedError("Cannot remove from immutable List.");
}
EntrySync removeLast() {
- throw new UnsupportedError("Cannot removeLast on immutable List.");
+ throw new UnsupportedError("Cannot remove from immutable List.");
+ }
+
+ void remove(Object object) {
+ throw new UnsupportedError("Cannot remove from immutable List.");
+ }
+
+ void removeAll(Iterable elements) {
+ throw new UnsupportedError("Cannot remove from immutable List.");
+ }
+
+ void retainAll(Iterable elements) {
+ throw new UnsupportedError("Cannot remove from immutable List.");
+ }
+
+ void removeMatching(bool test(EntrySync element)) {
+ throw new UnsupportedError("Cannot remove from immutable List.");
+ }
+
+ void retainMatching(bool test(EntrySync element)) {
+ throw new UnsupportedError("Cannot remove from immutable List.");
}
void setRange(int start, int rangeLength, List<EntrySync> from, [int startFrom]) {
@@ -24672,11 +25300,31 @@ class _GamepadList implements JavaScriptIndexingBehavior, List<Gamepad> native "
Gamepad max([int compare(Gamepad a, Gamepad b)]) => IterableMixinWorkaround.max(this, compare);
Gamepad removeAt(int pos) {
- throw new UnsupportedError("Cannot removeAt on immutable List.");
+ throw new UnsupportedError("Cannot remove from immutable List.");
}
Gamepad removeLast() {
- throw new UnsupportedError("Cannot removeLast on immutable List.");
+ throw new UnsupportedError("Cannot remove from immutable List.");
+ }
+
+ void remove(Object object) {
+ throw new UnsupportedError("Cannot remove from immutable List.");
+ }
+
+ void removeAll(Iterable elements) {
+ throw new UnsupportedError("Cannot remove from immutable List.");
+ }
+
+ void retainAll(Iterable elements) {
+ throw new UnsupportedError("Cannot remove from immutable List.");
+ }
+
+ void removeMatching(bool test(Gamepad element)) {
+ throw new UnsupportedError("Cannot remove from immutable List.");
+ }
+
+ void retainMatching(bool test(Gamepad element)) {
+ throw new UnsupportedError("Cannot remove from immutable List.");
}
void setRange(int start, int rangeLength, List<Gamepad> from, [int startFrom]) {
@@ -24846,11 +25494,31 @@ class _MediaStreamList implements JavaScriptIndexingBehavior, List<MediaStream>
MediaStream max([int compare(MediaStream a, MediaStream b)]) => IterableMixinWorkaround.max(this, compare);
MediaStream removeAt(int pos) {
- throw new UnsupportedError("Cannot removeAt on immutable List.");
+ throw new UnsupportedError("Cannot remove from immutable List.");
}
MediaStream removeLast() {
- throw new UnsupportedError("Cannot removeLast on immutable List.");
+ throw new UnsupportedError("Cannot remove from immutable List.");
+ }
+
+ void remove(Object object) {
+ throw new UnsupportedError("Cannot remove from immutable List.");
+ }
+
+ void removeAll(Iterable elements) {
+ throw new UnsupportedError("Cannot remove from immutable List.");
+ }
+
+ void retainAll(Iterable elements) {
+ throw new UnsupportedError("Cannot remove from immutable List.");
+ }
+
+ void removeMatching(bool test(MediaStream element)) {
+ throw new UnsupportedError("Cannot remove from immutable List.");
+ }
+
+ void retainMatching(bool test(MediaStream element)) {
+ throw new UnsupportedError("Cannot remove from immutable List.");
}
void setRange(int start, int rangeLength, List<MediaStream> from, [int startFrom]) {
@@ -25010,11 +25678,31 @@ class _SpeechInputResultList implements JavaScriptIndexingBehavior, List<SpeechI
SpeechInputResult max([int compare(SpeechInputResult a, SpeechInputResult b)]) => IterableMixinWorkaround.max(this, compare);
SpeechInputResult removeAt(int pos) {
- throw new UnsupportedError("Cannot removeAt on immutable List.");
+ throw new UnsupportedError("Cannot remove from immutable List.");
}
SpeechInputResult removeLast() {
- throw new UnsupportedError("Cannot removeLast on immutable List.");
+ throw new UnsupportedError("Cannot remove from immutable List.");
+ }
+
+ void remove(Object object) {
+ throw new UnsupportedError("Cannot remove from immutable List.");
+ }
+
+ void removeAll(Iterable elements) {
+ throw new UnsupportedError("Cannot remove from immutable List.");
+ }
+
+ void retainAll(Iterable elements) {
+ throw new UnsupportedError("Cannot remove from immutable List.");
+ }
+
+ void removeMatching(bool test(SpeechInputResult element)) {
+ throw new UnsupportedError("Cannot remove from immutable List.");
+ }
+
+ void retainMatching(bool test(SpeechInputResult element)) {
+ throw new UnsupportedError("Cannot remove from immutable List.");
}
void setRange(int start, int rangeLength, List<SpeechInputResult> from, [int startFrom]) {
@@ -25174,11 +25862,31 @@ class _SpeechRecognitionResultList implements JavaScriptIndexingBehavior, List<S
SpeechRecognitionResult max([int compare(SpeechRecognitionResult a, SpeechRecognitionResult b)]) => IterableMixinWorkaround.max(this, compare);
SpeechRecognitionResult removeAt(int pos) {
- throw new UnsupportedError("Cannot removeAt on immutable List.");
+ throw new UnsupportedError("Cannot remove from immutable List.");
}
SpeechRecognitionResult removeLast() {
- throw new UnsupportedError("Cannot removeLast on immutable List.");
+ throw new UnsupportedError("Cannot remove from immutable List.");
+ }
+
+ void remove(Object object) {
+ throw new UnsupportedError("Cannot remove from immutable List.");
+ }
+
+ void removeAll(Iterable elements) {
+ throw new UnsupportedError("Cannot remove from immutable List.");
+ }
+
+ void retainAll(Iterable elements) {
+ throw new UnsupportedError("Cannot remove from immutable List.");
+ }
+
+ void removeMatching(bool test(SpeechRecognitionResult element)) {
+ throw new UnsupportedError("Cannot remove from immutable List.");
+ }
+
+ void retainMatching(bool test(SpeechRecognitionResult element)) {
+ throw new UnsupportedError("Cannot remove from immutable List.");
}
void setRange(int start, int rangeLength, List<SpeechRecognitionResult> from, [int startFrom]) {
@@ -25338,11 +26046,31 @@ class _StyleSheetList implements JavaScriptIndexingBehavior, List<StyleSheet> na
StyleSheet max([int compare(StyleSheet a, StyleSheet b)]) => IterableMixinWorkaround.max(this, compare);
StyleSheet removeAt(int pos) {
- throw new UnsupportedError("Cannot removeAt on immutable List.");
+ throw new UnsupportedError("Cannot remove from immutable List.");
}
StyleSheet removeLast() {
- throw new UnsupportedError("Cannot removeLast on immutable List.");
+ throw new UnsupportedError("Cannot remove from immutable List.");
+ }
+
+ void remove(Object object) {
+ throw new UnsupportedError("Cannot remove from immutable List.");
+ }
+
+ void removeAll(Iterable elements) {
+ throw new UnsupportedError("Cannot remove from immutable List.");
+ }
+
+ void retainAll(Iterable elements) {
+ throw new UnsupportedError("Cannot remove from immutable List.");
+ }
+
+ void removeMatching(bool test(StyleSheet element)) {
+ throw new UnsupportedError("Cannot remove from immutable List.");
+ }
+
+ void retainMatching(bool test(StyleSheet element)) {
+ throw new UnsupportedError("Cannot remove from immutable List.");
}
void setRange(int start, int rangeLength, List<StyleSheet> from, [int startFrom]) {
@@ -25783,11 +26511,12 @@ abstract class CssClassSet implements Set<String> {
void add(String value) {
// TODO - figure out if we need to do any validation here
- // or if the browser natively does enough
+ // or if the browser natively does enough.
_modify((s) => s.add(value));
}
- bool remove(String value) {
+ bool remove(Object value) {
+ if (value is! String) return false;
Set<String> s = readClasses();
bool result = s.remove(value);
writeClasses(s);
@@ -25795,7 +26524,7 @@ abstract class CssClassSet implements Set<String> {
}
void addAll(Iterable<String> iterable) {
- // TODO - see comment above about validation
+ // TODO - see comment above about validation.
_modify((s) => s.addAll(iterable));
}
@@ -25803,6 +26532,18 @@ abstract class CssClassSet implements Set<String> {
_modify((s) => s.removeAll(iterable));
}
+ void retainAll(Iterable<String> iterable) {
+ _modify((s) => s.retainAll(iterable));
+ }
+
+ void removeMatching(bool test(String name)) {
+ _modify((s) => s.removeMatching(test));
+ }
+
+ void retainMatching(bool test(String name)) {
+ _modify((s) => s.retainMatching(test));
+ }
+
bool isSubsetOf(Collection<String> collection) =>
readClasses().isSubsetOf(collection);
« no previous file with comments | « sdk/lib/core/set.dart ('k') | sdk/lib/html/dartium/html_dartium.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698