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

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

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:
Download patch
« no previous file with comments | « no previous file | 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 5246c4b2265abf93f758f3321a31a95a6933d791..dd3809954ace5f52f3a995c359825f5b8c24a6e6 100644
--- a/sdk/lib/html/dart2js/html_dart2js.dart
+++ b/sdk/lib/html/dart2js/html_dart2js.dart
@@ -6816,6 +6816,9 @@ class DomMimeTypeArray implements JavaScriptIndexingBehavior, List<DomMimeType>
bool any(bool f(DomMimeType element)) => Collections.any(this, f);
+ List<DomMimeType> toList() => new List<DomMimeType>.from(this);
+ Set<DomMimeType> toSet() => new Set<DomMimeType>.from(this);
+
bool get isEmpty => this.length == 0;
List<DomMimeType> take(int n) => new ListView<DomMimeType>(this, 0, n);
@@ -6897,9 +6900,9 @@ class DomMimeTypeArray implements JavaScriptIndexingBehavior, List<DomMimeType>
throw new StateError("More than one element");
}
- DomMimeType min([int compare(DomMimeType a, DomMimeType b)]) => _Collections.minInList(this, compare);
+ DomMimeType min([int compare(DomMimeType a, DomMimeType b)]) => Collections.min(this, compare);
- DomMimeType max([int compare(DomMimeType a, DomMimeType b)]) => _Collections.maxInList(this, compare);
+ DomMimeType max([int compare(DomMimeType a, DomMimeType b)]) => Collections.max(this, compare);
DomMimeType removeAt(int pos) {
throw new UnsupportedError("Cannot removeAt on immutable List.");
@@ -7019,6 +7022,9 @@ class DomPluginArray implements JavaScriptIndexingBehavior, List<DomPlugin> nati
bool any(bool f(DomPlugin element)) => Collections.any(this, f);
+ List<DomPlugin> toList() => new List<DomPlugin>.from(this);
+ Set<DomPlugin> toSet() => new Set<DomPlugin>.from(this);
+
bool get isEmpty => this.length == 0;
List<DomPlugin> take(int n) => new ListView<DomPlugin>(this, 0, n);
@@ -7100,9 +7106,9 @@ class DomPluginArray implements JavaScriptIndexingBehavior, List<DomPlugin> nati
throw new StateError("More than one element");
}
- DomPlugin min([int compare(DomPlugin a, DomPlugin b)]) => _Collections.minInList(this, compare);
+ DomPlugin min([int compare(DomPlugin a, DomPlugin b)]) => Collections.min(this, compare);
- DomPlugin max([int compare(DomPlugin a, DomPlugin b)]) => _Collections.maxInList(this, compare);
+ DomPlugin max([int compare(DomPlugin a, DomPlugin b)]) => Collections.max(this, compare);
DomPlugin removeAt(int pos) {
throw new UnsupportedError("Cannot removeAt on immutable List.");
@@ -7281,6 +7287,9 @@ class DomStringList implements JavaScriptIndexingBehavior, List<String> native "
bool any(bool f(String element)) => Collections.any(this, f);
+ List<String> toList() => new List<String>.from(this);
+ Set<String> toSet() => new Set<String>.from(this);
+
bool get isEmpty => this.length == 0;
List<String> take(int n) => new ListView<String>(this, 0, n);
@@ -7362,9 +7371,9 @@ class DomStringList implements JavaScriptIndexingBehavior, List<String> native "
throw new StateError("More than one element");
}
- String min([int compare(String a, String b)]) => _Collections.minInList(this, compare);
+ String min([int compare(String a, String b)]) => Collections.min(this, compare);
- String max([int compare(String a, String b)]) => _Collections.maxInList(this, compare);
+ String max([int compare(String a, String b)]) => Collections.max(this, compare);
String removeAt(int pos) {
throw new UnsupportedError("Cannot removeAt on immutable List.");
@@ -7453,7 +7462,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]);
}
@@ -7639,11 +7648,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);
}
}
@@ -7698,11 +7707,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);
}
@@ -7710,7 +7722,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);
}
@@ -7807,11 +7819,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);
}
}
@@ -9609,6 +9621,9 @@ class FileList implements JavaScriptIndexingBehavior, List<File> native "*FileLi
bool any(bool f(File element)) => Collections.any(this, f);
+ List<File> toList() => new List<File>.from(this);
+ Set<File> toSet() => new Set<File>.from(this);
+
bool get isEmpty => this.length == 0;
List<File> take(int n) => new ListView<File>(this, 0, n);
@@ -9690,9 +9705,9 @@ class FileList implements JavaScriptIndexingBehavior, List<File> native "*FileLi
throw new StateError("More than one element");
}
- File min([int compare(File a, File b)]) => _Collections.minInList(this, compare);
+ File min([int compare(File a, File b)]) => Collections.min(this, compare);
- File max([int compare(File a, File b)]) => _Collections.maxInList(this, compare);
+ File max([int compare(File a, File b)]) => Collections.max(this, compare);
File removeAt(int pos) {
throw new UnsupportedError("Cannot removeAt on immutable List.");
@@ -10078,6 +10093,9 @@ class Float32Array extends ArrayBufferView implements JavaScriptIndexingBehavior
bool any(bool f(num element)) => Collections.any(this, f);
+ List<num> toList() => new List<num>.from(this);
+ Set<num> toSet() => new Set<num>.from(this);
+
bool get isEmpty => this.length == 0;
List<num> take(int n) => new ListView<num>(this, 0, n);
@@ -10159,9 +10177,9 @@ class Float32Array extends ArrayBufferView implements JavaScriptIndexingBehavior
throw new StateError("More than one element");
}
- num min([int compare(num a, num b)]) => _Collections.minInList(this, compare);
+ num min([int compare(num a, num b)]) => Collections.min(this, compare);
- num max([int compare(num a, num b)]) => _Collections.maxInList(this, compare);
+ num max([int compare(num a, num b)]) => Collections.max(this, compare);
num removeAt(int pos) {
throw new UnsupportedError("Cannot removeAt on immutable List.");
@@ -10249,6 +10267,9 @@ class Float64Array extends ArrayBufferView implements JavaScriptIndexingBehavior
bool any(bool f(num element)) => Collections.any(this, f);
+ List<num> toList() => new List<num>.from(this);
+ Set<num> toSet() => new Set<num>.from(this);
+
bool get isEmpty => this.length == 0;
List<num> take(int n) => new ListView<num>(this, 0, n);
@@ -10330,9 +10351,9 @@ class Float64Array extends ArrayBufferView implements JavaScriptIndexingBehavior
throw new StateError("More than one element");
}
- num min([int compare(num a, num b)]) => _Collections.minInList(this, compare);
+ num min([int compare(num a, num b)]) => Collections.min(this, compare);
- num max([int compare(num a, num b)]) => _Collections.maxInList(this, compare);
+ num max([int compare(num a, num b)]) => Collections.max(this, compare);
num removeAt(int pos) {
throw new UnsupportedError("Cannot removeAt on immutable List.");
@@ -10832,6 +10853,9 @@ class HtmlAllCollection implements JavaScriptIndexingBehavior, List<Node> native
bool any(bool f(Node element)) => Collections.any(this, f);
+ List<Node> toList() => new List<Node>.from(this);
+ Set<Node> toSet() => new Set<Node>.from(this);
+
bool get isEmpty => this.length == 0;
List<Node> take(int n) => new ListView<Node>(this, 0, n);
@@ -10913,9 +10937,9 @@ class HtmlAllCollection implements JavaScriptIndexingBehavior, List<Node> native
throw new StateError("More than one element");
}
- Node min([int compare(Node a, Node b)]) => _Collections.minInList(this, compare);
+ Node min([int compare(Node a, Node b)]) => Collections.min(this, compare);
- Node max([int compare(Node a, Node b)]) => _Collections.maxInList(this, compare);
+ Node max([int compare(Node a, Node b)]) => Collections.max(this, compare);
Node removeAt(int pos) {
throw new UnsupportedError("Cannot removeAt on immutable List.");
@@ -10998,6 +11022,9 @@ class HtmlCollection implements JavaScriptIndexingBehavior, List<Node> native "*
bool any(bool f(Node element)) => Collections.any(this, f);
+ List<Node> toList() => new List<Node>.from(this);
+ Set<Node> toSet() => new Set<Node>.from(this);
+
bool get isEmpty => this.length == 0;
List<Node> take(int n) => new ListView<Node>(this, 0, n);
@@ -11079,9 +11106,9 @@ class HtmlCollection implements JavaScriptIndexingBehavior, List<Node> native "*
throw new StateError("More than one element");
}
- Node min([int compare(Node a, Node b)]) => _Collections.minInList(this, compare);
+ Node min([int compare(Node a, Node b)]) => Collections.min(this, compare);
- Node max([int compare(Node a, Node b)]) => _Collections.maxInList(this, compare);
+ Node max([int compare(Node a, Node b)]) => Collections.max(this, compare);
Node removeAt(int pos) {
throw new UnsupportedError("Cannot removeAt on immutable List.");
@@ -12758,6 +12785,9 @@ class Int16Array extends ArrayBufferView implements JavaScriptIndexingBehavior,
bool any(bool f(int element)) => Collections.any(this, f);
+ List<int> toList() => new List<int>.from(this);
+ Set<int> toSet() => new Set<int>.from(this);
+
bool get isEmpty => this.length == 0;
List<int> take(int n) => new ListView<int>(this, 0, n);
@@ -12839,9 +12869,9 @@ class Int16Array extends ArrayBufferView implements JavaScriptIndexingBehavior,
throw new StateError("More than one element");
}
- int min([int compare(int a, int b)]) => _Collections.minInList(this, compare);
+ int min([int compare(int a, int b)]) => Collections.min(this, compare);
- int max([int compare(int a, int b)]) => _Collections.maxInList(this, compare);
+ int max([int compare(int a, int b)]) => Collections.max(this, compare);
int removeAt(int pos) {
throw new UnsupportedError("Cannot removeAt on immutable List.");
@@ -12929,6 +12959,9 @@ class Int32Array extends ArrayBufferView implements JavaScriptIndexingBehavior,
bool any(bool f(int element)) => Collections.any(this, f);
+ List<int> toList() => new List<int>.from(this);
+ Set<int> toSet() => new Set<int>.from(this);
+
bool get isEmpty => this.length == 0;
List<int> take(int n) => new ListView<int>(this, 0, n);
@@ -13010,9 +13043,9 @@ class Int32Array extends ArrayBufferView implements JavaScriptIndexingBehavior,
throw new StateError("More than one element");
}
- int min([int compare(int a, int b)]) => _Collections.minInList(this, compare);
+ int min([int compare(int a, int b)]) => Collections.min(this, compare);
- int max([int compare(int a, int b)]) => _Collections.maxInList(this, compare);
+ int max([int compare(int a, int b)]) => Collections.max(this, compare);
int removeAt(int pos) {
throw new UnsupportedError("Cannot removeAt on immutable List.");
@@ -13100,6 +13133,9 @@ class Int8Array extends ArrayBufferView implements JavaScriptIndexingBehavior, L
bool any(bool f(int element)) => Collections.any(this, f);
+ List<int> toList() => new List<int>.from(this);
+ Set<int> toSet() => new Set<int>.from(this);
+
bool get isEmpty => this.length == 0;
List<int> take(int n) => new ListView<int>(this, 0, n);
@@ -13181,9 +13217,9 @@ class Int8Array extends ArrayBufferView implements JavaScriptIndexingBehavior, L
throw new StateError("More than one element");
}
- int min([int compare(int a, int b)]) => _Collections.minInList(this, compare);
+ int min([int compare(int a, int b)]) => Collections.min(this, compare);
- int max([int compare(int a, int b)]) => _Collections.maxInList(this, compare);
+ int max([int compare(int a, int b)]) => Collections.max(this, compare);
int removeAt(int pos) {
throw new UnsupportedError("Cannot removeAt on immutable List.");
@@ -14972,6 +15008,9 @@ class NamedNodeMap implements JavaScriptIndexingBehavior, List<Node> native "*Na
bool any(bool f(Node element)) => Collections.any(this, f);
+ List<Node> toList() => new List<Node>.from(this);
+ Set<Node> toSet() => new Set<Node>.from(this);
+
bool get isEmpty => this.length == 0;
List<Node> take(int n) => new ListView<Node>(this, 0, n);
@@ -15053,9 +15092,9 @@ class NamedNodeMap implements JavaScriptIndexingBehavior, List<Node> native "*Na
throw new StateError("More than one element");
}
- Node min([int compare(Node a, Node b)]) => _Collections.minInList(this, compare);
+ Node min([int compare(Node a, Node b)]) => Collections.min(this, compare);
- Node max([int compare(Node a, Node b)]) => _Collections.maxInList(this, compare);
+ Node max([int compare(Node a, Node b)]) => Collections.max(this, compare);
Node removeAt(int pos) {
throw new UnsupportedError("Cannot removeAt on immutable List.");
@@ -15250,11 +15289,11 @@ class _ChildNodeListLazy implements List {
}
Node min([int compare(Node a, Node b)]) {
- return _Collections.minInList(this, compare);
+ return Collections.min(this, compare);
}
Node max([int compare(Node a, Node b)]) {
- return _Collections.maxInList(this, compare);
+ return Collections.max(this, compare);
}
void add(Node value) {
@@ -15323,6 +15362,9 @@ class _ChildNodeListLazy implements List {
bool any(bool f(Node element)) => Collections.any(this, f);
+ List<Node> toList() => new List<Node>.from(this);
+ Set<Node> toSet() => new Set<Node>.from(this);
+
bool get isEmpty => this.length == 0;
// From List<Node>:
@@ -15694,6 +15736,9 @@ class NodeList implements JavaScriptIndexingBehavior, List<Node> native "*NodeLi
bool any(bool f(Node element)) => Collections.any(this, f);
+ List<Node> toList() => new List<Node>.from(this);
+ Set<Node> toSet() => new Set<Node>.from(this);
+
bool get isEmpty => this.length == 0;
List<Node> take(int n) => new ListView<Node>(this, 0, n);
@@ -15775,9 +15820,9 @@ class NodeList implements JavaScriptIndexingBehavior, List<Node> native "*NodeLi
throw new StateError("More than one element");
}
- Node min([int compare(Node a, Node b)]) => _Collections.minInList(this, compare);
+ Node min([int compare(Node a, Node b)]) => Collections.min(this, compare);
- Node max([int compare(Node a, Node b)]) => _Collections.maxInList(this, compare);
+ Node max([int compare(Node a, Node b)]) => Collections.max(this, compare);
Node removeAt(int pos) {
throw new UnsupportedError("Cannot removeAt on immutable List.");
@@ -17635,6 +17680,9 @@ class SourceBufferList extends EventTarget implements JavaScriptIndexingBehavior
bool any(bool f(SourceBuffer element)) => Collections.any(this, f);
+ List<SourceBuffer> toList() => new List<SourceBuffer>.from(this);
+ Set<SourceBuffer> toSet() => new Set<SourceBuffer>.from(this);
+
bool get isEmpty => this.length == 0;
List<SourceBuffer> take(int n) => new ListView<SourceBuffer>(this, 0, n);
@@ -17716,9 +17764,9 @@ class SourceBufferList extends EventTarget implements JavaScriptIndexingBehavior
throw new StateError("More than one element");
}
- SourceBuffer min([int compare(SourceBuffer a, SourceBuffer b)]) => _Collections.minInList(this, compare);
+ SourceBuffer min([int compare(SourceBuffer a, SourceBuffer b)]) => Collections.min(this, compare);
- SourceBuffer max([int compare(SourceBuffer a, SourceBuffer b)]) => _Collections.maxInList(this, compare);
+ SourceBuffer max([int compare(SourceBuffer a, SourceBuffer b)]) => Collections.max(this, compare);
SourceBuffer removeAt(int pos) {
throw new UnsupportedError("Cannot removeAt on immutable List.");
@@ -17859,6 +17907,9 @@ class SpeechGrammarList implements JavaScriptIndexingBehavior, List<SpeechGramma
bool any(bool f(SpeechGrammar element)) => Collections.any(this, f);
+ List<SpeechGrammar> toList() => new List<SpeechGrammar>.from(this);
+ Set<SpeechGrammar> toSet() => new Set<SpeechGrammar>.from(this);
+
bool get isEmpty => this.length == 0;
List<SpeechGrammar> take(int n) => new ListView<SpeechGrammar>(this, 0, n);
@@ -17940,9 +17991,9 @@ class SpeechGrammarList implements JavaScriptIndexingBehavior, List<SpeechGramma
throw new StateError("More than one element");
}
- SpeechGrammar min([int compare(SpeechGrammar a, SpeechGrammar b)]) => _Collections.minInList(this, compare);
+ SpeechGrammar min([int compare(SpeechGrammar a, SpeechGrammar b)]) => Collections.min(this, compare);
- SpeechGrammar max([int compare(SpeechGrammar a, SpeechGrammar b)]) => _Collections.maxInList(this, compare);
+ SpeechGrammar max([int compare(SpeechGrammar a, SpeechGrammar b)]) => Collections.max(this, compare);
SpeechGrammar removeAt(int pos) {
throw new UnsupportedError("Cannot removeAt on immutable List.");
@@ -18329,6 +18380,9 @@ class SqlResultSetRowList implements JavaScriptIndexingBehavior, List<Map> nativ
bool any(bool f(Map element)) => Collections.any(this, f);
+ List<Map> toList() => new List<Map>.from(this);
+ Set<Map> toSet() => new Set<Map>.from(this);
+
bool get isEmpty => this.length == 0;
List<Map> take(int n) => new ListView<Map>(this, 0, n);
@@ -18410,9 +18464,9 @@ class SqlResultSetRowList implements JavaScriptIndexingBehavior, List<Map> nativ
throw new StateError("More than one element");
}
- Map min([int compare(Map a, Map b)]) => _Collections.minInList(this, compare);
+ Map min([int compare(Map a, Map b)]) => Collections.min(this, compare);
- Map max([int compare(Map a, Map b)]) => _Collections.maxInList(this, compare);
+ Map max([int compare(Map a, Map b)]) => Collections.max(this, compare);
Map removeAt(int pos) {
throw new UnsupportedError("Cannot removeAt on immutable List.");
@@ -19191,6 +19245,9 @@ class TextTrackCueList implements List<TextTrackCue>, JavaScriptIndexingBehavior
bool any(bool f(TextTrackCue element)) => Collections.any(this, f);
+ List<TextTrackCue> toList() => new List<TextTrackCue>.from(this);
+ Set<TextTrackCue> toSet() => new Set<TextTrackCue>.from(this);
+
bool get isEmpty => this.length == 0;
List<TextTrackCue> take(int n) => new ListView<TextTrackCue>(this, 0, n);
@@ -19272,9 +19329,9 @@ class TextTrackCueList implements List<TextTrackCue>, JavaScriptIndexingBehavior
throw new StateError("More than one element");
}
- TextTrackCue min([int compare(TextTrackCue a, TextTrackCue b)]) => _Collections.minInList(this, compare);
+ TextTrackCue min([int compare(TextTrackCue a, TextTrackCue b)]) => Collections.min(this, compare);
- TextTrackCue max([int compare(TextTrackCue a, TextTrackCue b)]) => _Collections.maxInList(this, compare);
+ TextTrackCue max([int compare(TextTrackCue a, TextTrackCue b)]) => Collections.max(this, compare);
TextTrackCue removeAt(int pos) {
throw new UnsupportedError("Cannot removeAt on immutable List.");
@@ -19359,6 +19416,9 @@ class TextTrackList extends EventTarget implements JavaScriptIndexingBehavior, L
bool any(bool f(TextTrack element)) => Collections.any(this, f);
+ List<TextTrack> toList() => new List<TextTrack>.from(this);
+ Set<TextTrack> toSet() => new Set<TextTrack>.from(this);
+
bool get isEmpty => this.length == 0;
List<TextTrack> take(int n) => new ListView<TextTrack>(this, 0, n);
@@ -19440,9 +19500,9 @@ class TextTrackList extends EventTarget implements JavaScriptIndexingBehavior, L
throw new StateError("More than one element");
}
- TextTrack min([int compare(TextTrack a, TextTrack b)]) => _Collections.minInList(this, compare);
+ TextTrack min([int compare(TextTrack a, TextTrack b)]) => Collections.min(this, compare);
- TextTrack max([int compare(TextTrack a, TextTrack b)]) => _Collections.maxInList(this, compare);
+ TextTrack max([int compare(TextTrack a, TextTrack b)]) => Collections.max(this, compare);
TextTrack removeAt(int pos) {
throw new UnsupportedError("Cannot removeAt on immutable List.");
@@ -19656,6 +19716,9 @@ class TouchList implements JavaScriptIndexingBehavior, List<Touch> native "*Touc
bool any(bool f(Touch element)) => Collections.any(this, f);
+ List<Touch> toList() => new List<Touch>.from(this);
+ Set<Touch> toSet() => new Set<Touch>.from(this);
+
bool get isEmpty => this.length == 0;
List<Touch> take(int n) => new ListView<Touch>(this, 0, n);
@@ -19737,9 +19800,9 @@ class TouchList implements JavaScriptIndexingBehavior, List<Touch> native "*Touc
throw new StateError("More than one element");
}
- Touch min([int compare(Touch a, Touch b)]) => _Collections.minInList(this, compare);
+ Touch min([int compare(Touch a, Touch b)]) => Collections.min(this, compare);
- Touch max([int compare(Touch a, Touch b)]) => _Collections.maxInList(this, compare);
+ Touch max([int compare(Touch a, Touch b)]) => Collections.max(this, compare);
Touch removeAt(int pos) {
throw new UnsupportedError("Cannot removeAt on immutable List.");
@@ -20009,6 +20072,9 @@ class Uint16Array extends ArrayBufferView implements JavaScriptIndexingBehavior,
bool any(bool f(int element)) => Collections.any(this, f);
+ List<int> toList() => new List<int>.from(this);
+ Set<int> toSet() => new Set<int>.from(this);
+
bool get isEmpty => this.length == 0;
List<int> take(int n) => new ListView<int>(this, 0, n);
@@ -20090,9 +20156,9 @@ class Uint16Array extends ArrayBufferView implements JavaScriptIndexingBehavior,
throw new StateError("More than one element");
}
- int min([int compare(int a, int b)]) => _Collections.minInList(this, compare);
+ int min([int compare(int a, int b)]) => Collections.min(this, compare);
- int max([int compare(int a, int b)]) => _Collections.maxInList(this, compare);
+ int max([int compare(int a, int b)]) => Collections.max(this, compare);
int removeAt(int pos) {
throw new UnsupportedError("Cannot removeAt on immutable List.");
@@ -20180,6 +20246,9 @@ class Uint32Array extends ArrayBufferView implements JavaScriptIndexingBehavior,
bool any(bool f(int element)) => Collections.any(this, f);
+ List<int> toList() => new List<int>.from(this);
+ Set<int> toSet() => new Set<int>.from(this);
+
bool get isEmpty => this.length == 0;
List<int> take(int n) => new ListView<int>(this, 0, n);
@@ -20261,9 +20330,9 @@ class Uint32Array extends ArrayBufferView implements JavaScriptIndexingBehavior,
throw new StateError("More than one element");
}
- int min([int compare(int a, int b)]) => _Collections.minInList(this, compare);
+ int min([int compare(int a, int b)]) => Collections.min(this, compare);
- int max([int compare(int a, int b)]) => _Collections.maxInList(this, compare);
+ int max([int compare(int a, int b)]) => Collections.max(this, compare);
int removeAt(int pos) {
throw new UnsupportedError("Cannot removeAt on immutable List.");
@@ -20351,6 +20420,9 @@ class Uint8Array extends ArrayBufferView implements JavaScriptIndexingBehavior,
bool any(bool f(int element)) => Collections.any(this, f);
+ List<int> toList() => new List<int>.from(this);
+ Set<int> toSet() => new Set<int>.from(this);
+
bool get isEmpty => this.length == 0;
List<int> take(int n) => new ListView<int>(this, 0, n);
@@ -20432,9 +20504,9 @@ class Uint8Array extends ArrayBufferView implements JavaScriptIndexingBehavior,
throw new StateError("More than one element");
}
- int min([int compare(int a, int b)]) => _Collections.minInList(this, compare);
+ int min([int compare(int a, int b)]) => Collections.min(this, compare);
- int max([int compare(int a, int b)]) => _Collections.maxInList(this, compare);
+ int max([int compare(int a, int b)]) => Collections.max(this, compare);
int removeAt(int pos) {
throw new UnsupportedError("Cannot removeAt on immutable List.");
@@ -23596,6 +23668,9 @@ class _ClientRectList implements JavaScriptIndexingBehavior, List<ClientRect> na
bool any(bool f(ClientRect element)) => Collections.any(this, f);
+ List<ClientRect> toList() => new List<ClientRect>.from(this);
+ Set<ClientRect> toSet() => new Set<ClientRect>.from(this);
+
bool get isEmpty => this.length == 0;
List<ClientRect> take(int n) => new ListView<ClientRect>(this, 0, n);
@@ -23677,9 +23752,9 @@ class _ClientRectList implements JavaScriptIndexingBehavior, List<ClientRect> na
throw new StateError("More than one element");
}
- ClientRect min([int compare(ClientRect a, ClientRect b)]) => _Collections.minInList(this, compare);
+ ClientRect min([int compare(ClientRect a, ClientRect b)]) => Collections.min(this, compare);
- ClientRect max([int compare(ClientRect a, ClientRect b)]) => _Collections.maxInList(this, compare);
+ ClientRect max([int compare(ClientRect a, ClientRect b)]) => Collections.max(this, compare);
ClientRect removeAt(int pos) {
throw new UnsupportedError("Cannot removeAt on immutable List.");
@@ -23755,6 +23830,9 @@ class _CssRuleList implements JavaScriptIndexingBehavior, List<CssRule> native "
bool any(bool f(CssRule element)) => Collections.any(this, f);
+ List<CssRule> toList() => new List<CssRule>.from(this);
+ Set<CssRule> toSet() => new Set<CssRule>.from(this);
+
bool get isEmpty => this.length == 0;
List<CssRule> take(int n) => new ListView<CssRule>(this, 0, n);
@@ -23836,9 +23914,9 @@ class _CssRuleList implements JavaScriptIndexingBehavior, List<CssRule> native "
throw new StateError("More than one element");
}
- CssRule min([int compare(CssRule a, CssRule b)]) => _Collections.minInList(this, compare);
+ CssRule min([int compare(CssRule a, CssRule b)]) => Collections.min(this, compare);
- CssRule max([int compare(CssRule a, CssRule b)]) => _Collections.maxInList(this, compare);
+ CssRule max([int compare(CssRule a, CssRule b)]) => Collections.max(this, compare);
CssRule removeAt(int pos) {
throw new UnsupportedError("Cannot removeAt on immutable List.");
@@ -23914,6 +23992,9 @@ class _CssValueList extends CssValue implements List<CssValue>, JavaScriptIndexi
bool any(bool f(CssValue element)) => Collections.any(this, f);
+ List<CssValue> toList() => new List<CssValue>.from(this);
+ Set<CssValue> toSet() => new Set<CssValue>.from(this);
+
bool get isEmpty => this.length == 0;
List<CssValue> take(int n) => new ListView<CssValue>(this, 0, n);
@@ -23995,9 +24076,9 @@ class _CssValueList extends CssValue implements List<CssValue>, JavaScriptIndexi
throw new StateError("More than one element");
}
- CssValue min([int compare(CssValue a, CssValue b)]) => _Collections.minInList(this, compare);
+ CssValue min([int compare(CssValue a, CssValue b)]) => Collections.min(this, compare);
- CssValue max([int compare(CssValue a, CssValue b)]) => _Collections.maxInList(this, compare);
+ CssValue max([int compare(CssValue a, CssValue b)]) => Collections.max(this, compare);
CssValue removeAt(int pos) {
throw new UnsupportedError("Cannot removeAt on immutable List.");
@@ -24073,6 +24154,9 @@ class _EntryArray implements JavaScriptIndexingBehavior, List<Entry> native "*En
bool any(bool f(Entry element)) => Collections.any(this, f);
+ List<Entry> toList() => new List<Entry>.from(this);
+ Set<Entry> toSet() => new Set<Entry>.from(this);
+
bool get isEmpty => this.length == 0;
List<Entry> take(int n) => new ListView<Entry>(this, 0, n);
@@ -24154,9 +24238,9 @@ class _EntryArray implements JavaScriptIndexingBehavior, List<Entry> native "*En
throw new StateError("More than one element");
}
- Entry min([int compare(Entry a, Entry b)]) => _Collections.minInList(this, compare);
+ Entry min([int compare(Entry a, Entry b)]) => Collections.min(this, compare);
- Entry max([int compare(Entry a, Entry b)]) => _Collections.maxInList(this, compare);
+ Entry max([int compare(Entry a, Entry b)]) => Collections.max(this, compare);
Entry removeAt(int pos) {
throw new UnsupportedError("Cannot removeAt on immutable List.");
@@ -24232,6 +24316,9 @@ class _EntryArraySync implements JavaScriptIndexingBehavior, List<EntrySync> nat
bool any(bool f(EntrySync element)) => Collections.any(this, f);
+ List<EntrySync> toList() => new List<EntrySync>.from(this);
+ Set<EntrySync> toSet() => new Set<EntrySync>.from(this);
+
bool get isEmpty => this.length == 0;
List<EntrySync> take(int n) => new ListView<EntrySync>(this, 0, n);
@@ -24313,9 +24400,9 @@ class _EntryArraySync implements JavaScriptIndexingBehavior, List<EntrySync> nat
throw new StateError("More than one element");
}
- EntrySync min([int compare(EntrySync a, EntrySync b)]) => _Collections.minInList(this, compare);
+ EntrySync min([int compare(EntrySync a, EntrySync b)]) => Collections.min(this, compare);
- EntrySync max([int compare(EntrySync a, EntrySync b)]) => _Collections.maxInList(this, compare);
+ EntrySync max([int compare(EntrySync a, EntrySync b)]) => Collections.max(this, compare);
EntrySync removeAt(int pos) {
throw new UnsupportedError("Cannot removeAt on immutable List.");
@@ -24391,6 +24478,9 @@ class _GamepadList implements JavaScriptIndexingBehavior, List<Gamepad> native "
bool any(bool f(Gamepad element)) => Collections.any(this, f);
+ List<Gamepad> toList() => new List<Gamepad>.from(this);
+ Set<Gamepad> toSet() => new Set<Gamepad>.from(this);
+
bool get isEmpty => this.length == 0;
List<Gamepad> take(int n) => new ListView<Gamepad>(this, 0, n);
@@ -24472,9 +24562,9 @@ class _GamepadList implements JavaScriptIndexingBehavior, List<Gamepad> native "
throw new StateError("More than one element");
}
- Gamepad min([int compare(Gamepad a, Gamepad b)]) => _Collections.minInList(this, compare);
+ Gamepad min([int compare(Gamepad a, Gamepad b)]) => Collections.min(this, compare);
- Gamepad max([int compare(Gamepad a, Gamepad b)]) => _Collections.maxInList(this, compare);
+ Gamepad max([int compare(Gamepad a, Gamepad b)]) => Collections.max(this, compare);
Gamepad removeAt(int pos) {
throw new UnsupportedError("Cannot removeAt on immutable List.");
@@ -24550,6 +24640,9 @@ class _MediaStreamList implements JavaScriptIndexingBehavior, List<MediaStream>
bool any(bool f(MediaStream element)) => Collections.any(this, f);
+ List<MediaStream> toList() => new List<MediaStream>.from(this);
+ Set<MediaStream> toSet() => new Set<MediaStream>.from(this);
+
bool get isEmpty => this.length == 0;
List<MediaStream> take(int n) => new ListView<MediaStream>(this, 0, n);
@@ -24631,9 +24724,9 @@ class _MediaStreamList implements JavaScriptIndexingBehavior, List<MediaStream>
throw new StateError("More than one element");
}
- MediaStream min([int compare(MediaStream a, MediaStream b)]) => _Collections.minInList(this, compare);
+ MediaStream min([int compare(MediaStream a, MediaStream b)]) => Collections.min(this, compare);
- MediaStream max([int compare(MediaStream a, MediaStream b)]) => _Collections.maxInList(this, compare);
+ MediaStream max([int compare(MediaStream a, MediaStream b)]) => Collections.max(this, compare);
MediaStream removeAt(int pos) {
throw new UnsupportedError("Cannot removeAt on immutable List.");
@@ -24709,6 +24802,9 @@ class _SpeechInputResultList implements JavaScriptIndexingBehavior, List<SpeechI
bool any(bool f(SpeechInputResult element)) => Collections.any(this, f);
+ List<SpeechInputResult> toList() => new List<SpeechInputResult>.from(this);
+ Set<SpeechInputResult> toSet() => new Set<SpeechInputResult>.from(this);
+
bool get isEmpty => this.length == 0;
List<SpeechInputResult> take(int n) => new ListView<SpeechInputResult>(this, 0, n);
@@ -24790,9 +24886,9 @@ class _SpeechInputResultList implements JavaScriptIndexingBehavior, List<SpeechI
throw new StateError("More than one element");
}
- SpeechInputResult min([int compare(SpeechInputResult a, SpeechInputResult b)]) => _Collections.minInList(this, compare);
+ SpeechInputResult min([int compare(SpeechInputResult a, SpeechInputResult b)]) => Collections.min(this, compare);
- SpeechInputResult max([int compare(SpeechInputResult a, SpeechInputResult b)]) => _Collections.maxInList(this, compare);
+ SpeechInputResult max([int compare(SpeechInputResult a, SpeechInputResult b)]) => Collections.max(this, compare);
SpeechInputResult removeAt(int pos) {
throw new UnsupportedError("Cannot removeAt on immutable List.");
@@ -24868,6 +24964,9 @@ class _SpeechRecognitionResultList implements JavaScriptIndexingBehavior, List<S
bool any(bool f(SpeechRecognitionResult element)) => Collections.any(this, f);
+ List<SpeechRecognitionResult> toList() => new List<SpeechRecognitionResult>.from(this);
+ Set<SpeechRecognitionResult> toSet() => new Set<SpeechRecognitionResult>.from(this);
+
bool get isEmpty => this.length == 0;
List<SpeechRecognitionResult> take(int n) => new ListView<SpeechRecognitionResult>(this, 0, n);
@@ -24949,9 +25048,9 @@ class _SpeechRecognitionResultList implements JavaScriptIndexingBehavior, List<S
throw new StateError("More than one element");
}
- SpeechRecognitionResult min([int compare(SpeechRecognitionResult a, SpeechRecognitionResult b)]) => _Collections.minInList(this, compare);
+ SpeechRecognitionResult min([int compare(SpeechRecognitionResult a, SpeechRecognitionResult b)]) => Collections.min(this, compare);
- SpeechRecognitionResult max([int compare(SpeechRecognitionResult a, SpeechRecognitionResult b)]) => _Collections.maxInList(this, compare);
+ SpeechRecognitionResult max([int compare(SpeechRecognitionResult a, SpeechRecognitionResult b)]) => Collections.max(this, compare);
SpeechRecognitionResult removeAt(int pos) {
throw new UnsupportedError("Cannot removeAt on immutable List.");
@@ -25027,6 +25126,9 @@ class _StyleSheetList implements JavaScriptIndexingBehavior, List<StyleSheet> na
bool any(bool f(StyleSheet element)) => Collections.any(this, f);
+ List<StyleSheet> toList() => new List<StyleSheet>.from(this);
+ Set<StyleSheet> toSet() => new Set<StyleSheet>.from(this);
+
bool get isEmpty => this.length == 0;
List<StyleSheet> take(int n) => new ListView<StyleSheet>(this, 0, n);
@@ -25108,9 +25210,9 @@ class _StyleSheetList implements JavaScriptIndexingBehavior, List<StyleSheet> na
throw new StateError("More than one element");
}
- StyleSheet min([int compare(StyleSheet a, StyleSheet b)]) => _Collections.minInList(this, compare);
+ StyleSheet min([int compare(StyleSheet a, StyleSheet b)]) => Collections.min(this, compare);
- StyleSheet max([int compare(StyleSheet a, StyleSheet b)]) => _Collections.maxInList(this, compare);
+ StyleSheet max([int compare(StyleSheet a, StyleSheet b)]) => Collections.max(this, compare);
StyleSheet removeAt(int pos) {
throw new UnsupportedError("Cannot removeAt on immutable List.");
@@ -25587,6 +25689,29 @@ abstract class CssClassSet implements Set<String> {
Set<String> intersection(Collection<String> other) =>
readClasses().intersection(other);
+ String get first => readClasses().first;
+ String get last => readClasses().last;
+ String get single => readClasses().single;
+ List<String> toList() => readClasses().toList();
+ Set<String> toSet() => readClasses().toSet();
+ String min([int compare(String a, String b)]) =>
+ readClasses().min(compare);
+ String max([int compare(String a, String b)]) =>
+ readClasses().max(compare);
+ Iterable<String> take(int n) => readClasses().take(n);
+ Iterable<String> takeWhile(bool test(String value)) =>
+ readClasses().takeWhile(test);
+ Iterable<String> skip(int n) => readClasses().skip(n);
+ Iterable<String> skipWhile(bool test(String value)) =>
+ readClasses().skipWhile(test);
+ String firstMatching(bool test(String value), { String orElse() }) =>
+ readClasses().firstMatching(test, orElse: orElse);
+ String lastMatching(bool test(String value), {String orElse()}) =>
+ readClasses().lastMatching(test, orElse: orElse);
+ String singleMatching(bool test(String value)) =>
+ readClasses().singleMatching(test);
+ String elementAt(int index) => readClasses().elementAt(index);
+
void clear() {
_modify((s) => s.clear());
}
« no previous file with comments | « no previous file | sdk/lib/html/dartium/html_dartium.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698