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

Unified Diff: sdk/lib/html/dartium/html_dartium.dart

Side-by-side diff isn't available for this file because of its large size.
Issue 11348313: Revert "Creating a common library for all DOM types." (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Oddities with upload. Created 8 years 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 | « sdk/lib/html/dart2js/html_dart2js.dart ('k') | sdk/lib/html/docs/svg_docs.json » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sdk/lib/html/dartium/html_dartium.dart
diff --git a/sdk/lib/html/dartium/html_dartium.dart b/sdk/lib/html/dartium/html_dartium.dart
index 29465261dba3e78002fc7dc82496146f8a1943f4..2a6db0a34484992ba05f9ded21a67d0c08ef2232 100644
--- a/sdk/lib/html/dartium/html_dartium.dart
+++ b/sdk/lib/html/dartium/html_dartium.dart
@@ -1,6 +1,5 @@
library html;
-import 'dart:html_common';
import 'dart:isolate';
import 'dart:json';
import 'dart:nativewrappers';
@@ -5972,7 +5971,7 @@ class Clipboard extends NativeFieldWrapperClass1 {
/** @domName Clipboard.files */
- FileList get files native "Clipboard_files_Getter";
+ List<File> get files native "Clipboard_files_Getter";
/** @domName Clipboard.items */
@@ -6626,18 +6625,18 @@ class DOMMimeTypeArray extends NativeFieldWrapperClass1 implements List<DOMMimeT
throw new UnsupportedError("Cannot add to immutable List.");
}
- bool contains(DOMMimeType element) => Collections.contains(this, element);
+ bool contains(DOMMimeType element) => _Collections.contains(this, element);
- void forEach(void f(DOMMimeType element)) => Collections.forEach(this, f);
+ void forEach(void f(DOMMimeType element)) => _Collections.forEach(this, f);
- Collection map(f(DOMMimeType element)) => Collections.map(this, [], f);
+ Collection map(f(DOMMimeType element)) => _Collections.map(this, [], f);
Collection<DOMMimeType> filter(bool f(DOMMimeType element)) =>
- Collections.filter(this, <DOMMimeType>[], f);
+ _Collections.filter(this, <DOMMimeType>[], f);
- bool every(bool f(DOMMimeType element)) => Collections.every(this, f);
+ bool every(bool f(DOMMimeType element)) => _Collections.every(this, f);
- bool some(bool f(DOMMimeType element)) => Collections.some(this, f);
+ bool some(bool f(DOMMimeType element)) => _Collections.some(this, f);
bool get isEmpty => this.length == 0;
@@ -6789,18 +6788,18 @@ class DOMPluginArray extends NativeFieldWrapperClass1 implements List<DOMPlugin>
throw new UnsupportedError("Cannot add to immutable List.");
}
- bool contains(DOMPlugin element) => Collections.contains(this, element);
+ bool contains(DOMPlugin element) => _Collections.contains(this, element);
- void forEach(void f(DOMPlugin element)) => Collections.forEach(this, f);
+ void forEach(void f(DOMPlugin element)) => _Collections.forEach(this, f);
- Collection map(f(DOMPlugin element)) => Collections.map(this, [], f);
+ Collection map(f(DOMPlugin element)) => _Collections.map(this, [], f);
Collection<DOMPlugin> filter(bool f(DOMPlugin element)) =>
- Collections.filter(this, <DOMPlugin>[], f);
+ _Collections.filter(this, <DOMPlugin>[], f);
- bool every(bool f(DOMPlugin element)) => Collections.every(this, f);
+ bool every(bool f(DOMPlugin element)) => _Collections.every(this, f);
- bool some(bool f(DOMPlugin element)) => Collections.some(this, f);
+ bool some(bool f(DOMPlugin element)) => _Collections.some(this, f);
bool get isEmpty => this.length == 0;
@@ -10008,111 +10007,6 @@ class FileException extends NativeFieldWrapperClass1 {
// WARNING: Do not edit - generated code.
-/// @domName FileList
-class FileList extends NativeFieldWrapperClass1 implements List<File> {
- FileList.internal();
-
-
- /** @domName FileList.length */
- int get length native "FileList_length_Getter";
-
- File operator[](int index) native "FileList_item_Callback";
-
- void operator[]=(int index, File value) {
- throw new UnsupportedError("Cannot assign element of immutable List.");
- }
- // -- start List<File> mixins.
- // File is the element type.
-
- // From Iterable<File>:
-
- Iterator<File> iterator() {
- // Note: NodeLists are not fixed size. And most probably length shouldn't
- // be cached in both iterator _and_ forEach method. For now caching it
- // for consistency.
- return new FixedSizeListIterator<File>(this);
- }
-
- // From Collection<File>:
-
- void add(File value) {
- throw new UnsupportedError("Cannot add to immutable List.");
- }
-
- void addLast(File value) {
- throw new UnsupportedError("Cannot add to immutable List.");
- }
-
- void addAll(Collection<File> collection) {
- throw new UnsupportedError("Cannot add to immutable List.");
- }
-
- bool contains(File element) => Collections.contains(this, element);
-
- void forEach(void f(File element)) => Collections.forEach(this, f);
-
- Collection map(f(File element)) => Collections.map(this, [], f);
-
- Collection<File> filter(bool f(File element)) =>
- Collections.filter(this, <File>[], f);
-
- bool every(bool f(File element)) => Collections.every(this, f);
-
- bool some(bool f(File element)) => Collections.some(this, f);
-
- bool get isEmpty => this.length == 0;
-
- // From List<File>:
-
- void sort([Comparator<File> compare = Comparable.compare]) {
- throw new UnsupportedError("Cannot sort immutable List.");
- }
-
- int indexOf(File element, [int start = 0]) =>
- _Lists.indexOf(this, element, start, this.length);
-
- int lastIndexOf(File element, [int start]) {
- if (start == null) start = length - 1;
- return _Lists.lastIndexOf(this, element, start);
- }
-
- File get first => this[0];
-
- File get last => this[length - 1];
-
- File removeLast() {
- throw new UnsupportedError("Cannot removeLast on immutable List.");
- }
-
- void setRange(int start, int rangeLength, List<File> from, [int startFrom]) {
- throw new UnsupportedError("Cannot setRange on immutable List.");
- }
-
- void removeRange(int start, int rangeLength) {
- throw new UnsupportedError("Cannot removeRange on immutable List.");
- }
-
- void insertRange(int start, int rangeLength, [File initialValue]) {
- throw new UnsupportedError("Cannot insertRange on immutable List.");
- }
-
- List<File> getRange(int start, int rangeLength) =>
- _Lists.getRange(this, start, rangeLength, <File>[]);
-
- // -- end List<File> mixins.
-
-
- /** @domName FileList.item */
- File item(int index) native "FileList_item_Callback";
-
-}
-// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-// WARNING: Do not edit - generated code.
-
-
/// @domName FileReader
class FileReader extends EventTarget {
@@ -10432,18 +10326,18 @@ class Float32Array extends ArrayBufferView implements List<num> {
throw new UnsupportedError("Cannot add to immutable List.");
}
- bool contains(num element) => Collections.contains(this, element);
+ bool contains(num element) => _Collections.contains(this, element);
- void forEach(void f(num element)) => Collections.forEach(this, f);
+ void forEach(void f(num element)) => _Collections.forEach(this, f);
- Collection map(f(num element)) => Collections.map(this, [], f);
+ Collection map(f(num element)) => _Collections.map(this, [], f);
Collection<num> filter(bool f(num element)) =>
- Collections.filter(this, <num>[], f);
+ _Collections.filter(this, <num>[], f);
- bool every(bool f(num element)) => Collections.every(this, f);
+ bool every(bool f(num element)) => _Collections.every(this, f);
- bool some(bool f(num element)) => Collections.some(this, f);
+ bool some(bool f(num element)) => _Collections.some(this, f);
bool get isEmpty => this.length == 0;
@@ -10565,18 +10459,18 @@ class Float64Array extends ArrayBufferView implements List<num> {
throw new UnsupportedError("Cannot add to immutable List.");
}
- bool contains(num element) => Collections.contains(this, element);
+ bool contains(num element) => _Collections.contains(this, element);
- void forEach(void f(num element)) => Collections.forEach(this, f);
+ void forEach(void f(num element)) => _Collections.forEach(this, f);
- Collection map(f(num element)) => Collections.map(this, [], f);
+ Collection map(f(num element)) => _Collections.map(this, [], f);
Collection<num> filter(bool f(num element)) =>
- Collections.filter(this, <num>[], f);
+ _Collections.filter(this, <num>[], f);
- bool every(bool f(num element)) => Collections.every(this, f);
+ bool every(bool f(num element)) => _Collections.every(this, f);
- bool some(bool f(num element)) => Collections.some(this, f);
+ bool some(bool f(num element)) => _Collections.some(this, f);
bool get isEmpty => this.length == 0;
@@ -11126,18 +11020,18 @@ class HTMLAllCollection extends NativeFieldWrapperClass1 implements List<Node> {
throw new UnsupportedError("Cannot add to immutable List.");
}
- bool contains(Node element) => Collections.contains(this, element);
+ bool contains(Node element) => _Collections.contains(this, element);
- void forEach(void f(Node element)) => Collections.forEach(this, f);
+ void forEach(void f(Node element)) => _Collections.forEach(this, f);
- Collection map(f(Node element)) => Collections.map(this, [], f);
+ Collection map(f(Node element)) => _Collections.map(this, [], f);
Collection<Node> filter(bool f(Node element)) =>
- Collections.filter(this, <Node>[], f);
+ _Collections.filter(this, <Node>[], f);
- bool every(bool f(Node element)) => Collections.every(this, f);
+ bool every(bool f(Node element)) => _Collections.every(this, f);
- bool some(bool f(Node element)) => Collections.some(this, f);
+ bool some(bool f(Node element)) => _Collections.some(this, f);
bool get isEmpty => this.length == 0;
@@ -11239,18 +11133,18 @@ class HTMLCollection extends NativeFieldWrapperClass1 implements List<Node> {
throw new UnsupportedError("Cannot add to immutable List.");
}
- bool contains(Node element) => Collections.contains(this, element);
+ bool contains(Node element) => _Collections.contains(this, element);
- void forEach(void f(Node element)) => Collections.forEach(this, f);
+ void forEach(void f(Node element)) => _Collections.forEach(this, f);
- Collection map(f(Node element)) => Collections.map(this, [], f);
+ Collection map(f(Node element)) => _Collections.map(this, [], f);
Collection<Node> filter(bool f(Node element)) =>
- Collections.filter(this, <Node>[], f);
+ _Collections.filter(this, <Node>[], f);
- bool every(bool f(Node element)) => Collections.every(this, f);
+ bool every(bool f(Node element)) => _Collections.every(this, f);
- bool some(bool f(Node element)) => Collections.some(this, f);
+ bool some(bool f(Node element)) => _Collections.some(this, f);
bool get isEmpty => this.length == 0;
@@ -13129,11 +13023,11 @@ class InputElement extends _Element_Merged {
/** @domName HTMLInputElement.files */
- FileList get files native "HTMLInputElement_files_Getter";
+ List<File> get files native "HTMLInputElement_files_Getter";
/** @domName HTMLInputElement.files */
- void set files(FileList value) native "HTMLInputElement_files_Setter";
+ void set files(List<File> value) native "HTMLInputElement_files_Setter";
/** @domName HTMLInputElement.form */
@@ -13553,18 +13447,18 @@ class Int16Array extends ArrayBufferView implements List<int> {
throw new UnsupportedError("Cannot add to immutable List.");
}
- bool contains(int element) => Collections.contains(this, element);
+ bool contains(int element) => _Collections.contains(this, element);
- void forEach(void f(int element)) => Collections.forEach(this, f);
+ void forEach(void f(int element)) => _Collections.forEach(this, f);
- Collection map(f(int element)) => Collections.map(this, [], f);
+ Collection map(f(int element)) => _Collections.map(this, [], f);
Collection<int> filter(bool f(int element)) =>
- Collections.filter(this, <int>[], f);
+ _Collections.filter(this, <int>[], f);
- bool every(bool f(int element)) => Collections.every(this, f);
+ bool every(bool f(int element)) => _Collections.every(this, f);
- bool some(bool f(int element)) => Collections.some(this, f);
+ bool some(bool f(int element)) => _Collections.some(this, f);
bool get isEmpty => this.length == 0;
@@ -13686,18 +13580,18 @@ class Int32Array extends ArrayBufferView implements List<int> {
throw new UnsupportedError("Cannot add to immutable List.");
}
- bool contains(int element) => Collections.contains(this, element);
+ bool contains(int element) => _Collections.contains(this, element);
- void forEach(void f(int element)) => Collections.forEach(this, f);
+ void forEach(void f(int element)) => _Collections.forEach(this, f);
- Collection map(f(int element)) => Collections.map(this, [], f);
+ Collection map(f(int element)) => _Collections.map(this, [], f);
Collection<int> filter(bool f(int element)) =>
- Collections.filter(this, <int>[], f);
+ _Collections.filter(this, <int>[], f);
- bool every(bool f(int element)) => Collections.every(this, f);
+ bool every(bool f(int element)) => _Collections.every(this, f);
- bool some(bool f(int element)) => Collections.some(this, f);
+ bool some(bool f(int element)) => _Collections.some(this, f);
bool get isEmpty => this.length == 0;
@@ -13819,18 +13713,18 @@ class Int8Array extends ArrayBufferView implements List<int> {
throw new UnsupportedError("Cannot add to immutable List.");
}
- bool contains(int element) => Collections.contains(this, element);
+ bool contains(int element) => _Collections.contains(this, element);
- void forEach(void f(int element)) => Collections.forEach(this, f);
+ void forEach(void f(int element)) => _Collections.forEach(this, f);
- Collection map(f(int element)) => Collections.map(this, [], f);
+ Collection map(f(int element)) => _Collections.map(this, [], f);
Collection<int> filter(bool f(int element)) =>
- Collections.filter(this, <int>[], f);
+ _Collections.filter(this, <int>[], f);
- bool every(bool f(int element)) => Collections.every(this, f);
+ bool every(bool f(int element)) => _Collections.every(this, f);
- bool some(bool f(int element)) => Collections.some(this, f);
+ bool some(bool f(int element)) => _Collections.some(this, f);
bool get isEmpty => this.length == 0;
@@ -16672,18 +16566,18 @@ class NamedNodeMap extends NativeFieldWrapperClass1 implements List<Node> {
throw new UnsupportedError("Cannot add to immutable List.");
}
- bool contains(Node element) => Collections.contains(this, element);
+ bool contains(Node element) => _Collections.contains(this, element);
- void forEach(void f(Node element)) => Collections.forEach(this, f);
+ void forEach(void f(Node element)) => _Collections.forEach(this, f);
- Collection map(f(Node element)) => Collections.map(this, [], f);
+ Collection map(f(Node element)) => _Collections.map(this, [], f);
Collection<Node> filter(bool f(Node element)) =>
- Collections.filter(this, <Node>[], f);
+ _Collections.filter(this, <Node>[], f);
- bool every(bool f(Node element)) => Collections.every(this, f);
+ bool every(bool f(Node element)) => _Collections.every(this, f);
- bool some(bool f(Node element)) => Collections.some(this, f);
+ bool some(bool f(Node element)) => _Collections.some(this, f);
bool get isEmpty => this.length == 0;
@@ -16935,18 +16829,18 @@ class _ChildNodeListLazy implements List {
// TODO(jacobr): We can implement these methods much more efficiently by
// looking up the nodeList only once instead of once per iteration.
- bool contains(Node element) => Collections.contains(this, element);
+ bool contains(Node element) => _Collections.contains(this, element);
- void forEach(void f(Node element)) => Collections.forEach(this, f);
+ void forEach(void f(Node element)) => _Collections.forEach(this, f);
- Collection map(f(Node element)) => Collections.map(this, [], f);
+ Collection map(f(Node element)) => _Collections.map(this, [], f);
Collection<Node> filter(bool f(Node element)) =>
- Collections.filter(this, <Node>[], f);
+ _Collections.filter(this, <Node>[], f);
- bool every(bool f(Node element)) => Collections.every(this, f);
+ bool every(bool f(Node element)) => _Collections.every(this, f);
- bool some(bool f(Node element)) => Collections.some(this, f);
+ bool some(bool f(Node element)) => _Collections.some(this, f);
bool get isEmpty => this.length == 0;
@@ -19316,18 +19210,18 @@ class SQLResultSetRowList extends NativeFieldWrapperClass1 implements List<Map>
throw new UnsupportedError("Cannot add to immutable List.");
}
- bool contains(Map element) => Collections.contains(this, element);
+ bool contains(Map element) => _Collections.contains(this, element);
- void forEach(void f(Map element)) => Collections.forEach(this, f);
+ void forEach(void f(Map element)) => _Collections.forEach(this, f);
- Collection map(f(Map element)) => Collections.map(this, [], f);
+ Collection map(f(Map element)) => _Collections.map(this, [], f);
Collection<Map> filter(bool f(Map element)) =>
- Collections.filter(this, <Map>[], f);
+ _Collections.filter(this, <Map>[], f);
- bool every(bool f(Map element)) => Collections.every(this, f);
+ bool every(bool f(Map element)) => _Collections.every(this, f);
- bool some(bool f(Map element)) => Collections.some(this, f);
+ bool some(bool f(Map element)) => _Collections.some(this, f);
bool get isEmpty => this.length == 0;
@@ -20007,18 +19901,18 @@ class SourceBufferList extends EventTarget implements List<SourceBuffer> {
throw new UnsupportedError("Cannot add to immutable List.");
}
- bool contains(SourceBuffer element) => Collections.contains(this, element);
+ bool contains(SourceBuffer element) => _Collections.contains(this, element);
- void forEach(void f(SourceBuffer element)) => Collections.forEach(this, f);
+ void forEach(void f(SourceBuffer element)) => _Collections.forEach(this, f);
- Collection map(f(SourceBuffer element)) => Collections.map(this, [], f);
+ Collection map(f(SourceBuffer element)) => _Collections.map(this, [], f);
Collection<SourceBuffer> filter(bool f(SourceBuffer element)) =>
- Collections.filter(this, <SourceBuffer>[], f);
+ _Collections.filter(this, <SourceBuffer>[], f);
- bool every(bool f(SourceBuffer element)) => Collections.every(this, f);
+ bool every(bool f(SourceBuffer element)) => _Collections.every(this, f);
- bool some(bool f(SourceBuffer element)) => Collections.some(this, f);
+ bool some(bool f(SourceBuffer element)) => _Collections.some(this, f);
bool get isEmpty => this.length == 0;
@@ -20208,18 +20102,18 @@ class SpeechGrammarList extends NativeFieldWrapperClass1 implements List<SpeechG
throw new UnsupportedError("Cannot add to immutable List.");
}
- bool contains(SpeechGrammar element) => Collections.contains(this, element);
+ bool contains(SpeechGrammar element) => _Collections.contains(this, element);
- void forEach(void f(SpeechGrammar element)) => Collections.forEach(this, f);
+ void forEach(void f(SpeechGrammar element)) => _Collections.forEach(this, f);
- Collection map(f(SpeechGrammar element)) => Collections.map(this, [], f);
+ Collection map(f(SpeechGrammar element)) => _Collections.map(this, [], f);
Collection<SpeechGrammar> filter(bool f(SpeechGrammar element)) =>
- Collections.filter(this, <SpeechGrammar>[], f);
+ _Collections.filter(this, <SpeechGrammar>[], f);
- bool every(bool f(SpeechGrammar element)) => Collections.every(this, f);
+ bool every(bool f(SpeechGrammar element)) => _Collections.every(this, f);
- bool some(bool f(SpeechGrammar element)) => Collections.some(this, f);
+ bool some(bool f(SpeechGrammar element)) => _Collections.some(this, f);
bool get isEmpty => this.length == 0;
@@ -21867,18 +21761,18 @@ class TextTrackCueList extends NativeFieldWrapperClass1 implements List<TextTrac
throw new UnsupportedError("Cannot add to immutable List.");
}
- bool contains(TextTrackCue element) => Collections.contains(this, element);
+ bool contains(TextTrackCue element) => _Collections.contains(this, element);
- void forEach(void f(TextTrackCue element)) => Collections.forEach(this, f);
+ void forEach(void f(TextTrackCue element)) => _Collections.forEach(this, f);
- Collection map(f(TextTrackCue element)) => Collections.map(this, [], f);
+ Collection map(f(TextTrackCue element)) => _Collections.map(this, [], f);
Collection<TextTrackCue> filter(bool f(TextTrackCue element)) =>
- Collections.filter(this, <TextTrackCue>[], f);
+ _Collections.filter(this, <TextTrackCue>[], f);
- bool every(bool f(TextTrackCue element)) => Collections.every(this, f);
+ bool every(bool f(TextTrackCue element)) => _Collections.every(this, f);
- bool some(bool f(TextTrackCue element)) => Collections.some(this, f);
+ bool some(bool f(TextTrackCue element)) => _Collections.some(this, f);
bool get isEmpty => this.length == 0;
@@ -21980,18 +21874,18 @@ class TextTrackList extends EventTarget implements List<TextTrack> {
throw new UnsupportedError("Cannot add to immutable List.");
}
- bool contains(TextTrack element) => Collections.contains(this, element);
+ bool contains(TextTrack element) => _Collections.contains(this, element);
- void forEach(void f(TextTrack element)) => Collections.forEach(this, f);
+ void forEach(void f(TextTrack element)) => _Collections.forEach(this, f);
- Collection map(f(TextTrack element)) => Collections.map(this, [], f);
+ Collection map(f(TextTrack element)) => _Collections.map(this, [], f);
Collection<TextTrack> filter(bool f(TextTrack element)) =>
- Collections.filter(this, <TextTrack>[], f);
+ _Collections.filter(this, <TextTrack>[], f);
- bool every(bool f(TextTrack element)) => Collections.every(this, f);
+ bool every(bool f(TextTrack element)) => _Collections.every(this, f);
- bool some(bool f(TextTrack element)) => Collections.some(this, f);
+ bool some(bool f(TextTrack element)) => _Collections.some(this, f);
bool get isEmpty => this.length == 0;
@@ -22253,18 +22147,18 @@ class TouchList extends NativeFieldWrapperClass1 implements List<Touch> {
throw new UnsupportedError("Cannot add to immutable List.");
}
- bool contains(Touch element) => Collections.contains(this, element);
+ bool contains(Touch element) => _Collections.contains(this, element);
- void forEach(void f(Touch element)) => Collections.forEach(this, f);
+ void forEach(void f(Touch element)) => _Collections.forEach(this, f);
- Collection map(f(Touch element)) => Collections.map(this, [], f);
+ Collection map(f(Touch element)) => _Collections.map(this, [], f);
Collection<Touch> filter(bool f(Touch element)) =>
- Collections.filter(this, <Touch>[], f);
+ _Collections.filter(this, <Touch>[], f);
- bool every(bool f(Touch element)) => Collections.every(this, f);
+ bool every(bool f(Touch element)) => _Collections.every(this, f);
- bool some(bool f(Touch element)) => Collections.some(this, f);
+ bool some(bool f(Touch element)) => _Collections.some(this, f);
bool get isEmpty => this.length == 0;
@@ -22635,18 +22529,18 @@ class Uint16Array extends ArrayBufferView implements List<int> {
throw new UnsupportedError("Cannot add to immutable List.");
}
- bool contains(int element) => Collections.contains(this, element);
+ bool contains(int element) => _Collections.contains(this, element);
- void forEach(void f(int element)) => Collections.forEach(this, f);
+ void forEach(void f(int element)) => _Collections.forEach(this, f);
- Collection map(f(int element)) => Collections.map(this, [], f);
+ Collection map(f(int element)) => _Collections.map(this, [], f);
Collection<int> filter(bool f(int element)) =>
- Collections.filter(this, <int>[], f);
+ _Collections.filter(this, <int>[], f);
- bool every(bool f(int element)) => Collections.every(this, f);
+ bool every(bool f(int element)) => _Collections.every(this, f);
- bool some(bool f(int element)) => Collections.some(this, f);
+ bool some(bool f(int element)) => _Collections.some(this, f);
bool get isEmpty => this.length == 0;
@@ -22768,18 +22662,18 @@ class Uint32Array extends ArrayBufferView implements List<int> {
throw new UnsupportedError("Cannot add to immutable List.");
}
- bool contains(int element) => Collections.contains(this, element);
+ bool contains(int element) => _Collections.contains(this, element);
- void forEach(void f(int element)) => Collections.forEach(this, f);
+ void forEach(void f(int element)) => _Collections.forEach(this, f);
- Collection map(f(int element)) => Collections.map(this, [], f);
+ Collection map(f(int element)) => _Collections.map(this, [], f);
Collection<int> filter(bool f(int element)) =>
- Collections.filter(this, <int>[], f);
+ _Collections.filter(this, <int>[], f);
- bool every(bool f(int element)) => Collections.every(this, f);
+ bool every(bool f(int element)) => _Collections.every(this, f);
- bool some(bool f(int element)) => Collections.some(this, f);
+ bool some(bool f(int element)) => _Collections.some(this, f);
bool get isEmpty => this.length == 0;
@@ -22901,18 +22795,18 @@ class Uint8Array extends ArrayBufferView implements List<int> {
throw new UnsupportedError("Cannot add to immutable List.");
}
- bool contains(int element) => Collections.contains(this, element);
+ bool contains(int element) => _Collections.contains(this, element);
- void forEach(void f(int element)) => Collections.forEach(this, f);
+ void forEach(void f(int element)) => _Collections.forEach(this, f);
- Collection map(f(int element)) => Collections.map(this, [], f);
+ Collection map(f(int element)) => _Collections.map(this, [], f);
Collection<int> filter(bool f(int element)) =>
- Collections.filter(this, <int>[], f);
+ _Collections.filter(this, <int>[], f);
- bool every(bool f(int element)) => Collections.every(this, f);
+ bool every(bool f(int element)) => _Collections.every(this, f);
- bool some(bool f(int element)) => Collections.some(this, f);
+ bool some(bool f(int element)) => _Collections.some(this, f);
bool get isEmpty => this.length == 0;
@@ -25555,18 +25449,18 @@ class _CSSRuleList extends NativeFieldWrapperClass1 implements List<CSSRule> {
throw new UnsupportedError("Cannot add to immutable List.");
}
- bool contains(CSSRule element) => Collections.contains(this, element);
+ bool contains(CSSRule element) => _Collections.contains(this, element);
- void forEach(void f(CSSRule element)) => Collections.forEach(this, f);
+ void forEach(void f(CSSRule element)) => _Collections.forEach(this, f);
- Collection map(f(CSSRule element)) => Collections.map(this, [], f);
+ Collection map(f(CSSRule element)) => _Collections.map(this, [], f);
Collection<CSSRule> filter(bool f(CSSRule element)) =>
- Collections.filter(this, <CSSRule>[], f);
+ _Collections.filter(this, <CSSRule>[], f);
- bool every(bool f(CSSRule element)) => Collections.every(this, f);
+ bool every(bool f(CSSRule element)) => _Collections.every(this, f);
- bool some(bool f(CSSRule element)) => Collections.some(this, f);
+ bool some(bool f(CSSRule element)) => _Collections.some(this, f);
bool get isEmpty => this.length == 0;
@@ -25660,18 +25554,18 @@ class _CSSValueList extends CSSValue implements List<CSSValue> {
throw new UnsupportedError("Cannot add to immutable List.");
}
- bool contains(CSSValue element) => Collections.contains(this, element);
+ bool contains(CSSValue element) => _Collections.contains(this, element);
- void forEach(void f(CSSValue element)) => Collections.forEach(this, f);
+ void forEach(void f(CSSValue element)) => _Collections.forEach(this, f);
- Collection map(f(CSSValue element)) => Collections.map(this, [], f);
+ Collection map(f(CSSValue element)) => _Collections.map(this, [], f);
Collection<CSSValue> filter(bool f(CSSValue element)) =>
- Collections.filter(this, <CSSValue>[], f);
+ _Collections.filter(this, <CSSValue>[], f);
- bool every(bool f(CSSValue element)) => Collections.every(this, f);
+ bool every(bool f(CSSValue element)) => _Collections.every(this, f);
- bool some(bool f(CSSValue element)) => Collections.some(this, f);
+ bool some(bool f(CSSValue element)) => _Collections.some(this, f);
bool get isEmpty => this.length == 0;
@@ -25765,18 +25659,18 @@ class _ClientRectList extends NativeFieldWrapperClass1 implements List<ClientRec
throw new UnsupportedError("Cannot add to immutable List.");
}
- bool contains(ClientRect element) => Collections.contains(this, element);
+ bool contains(ClientRect element) => _Collections.contains(this, element);
- void forEach(void f(ClientRect element)) => Collections.forEach(this, f);
+ void forEach(void f(ClientRect element)) => _Collections.forEach(this, f);
- Collection map(f(ClientRect element)) => Collections.map(this, [], f);
+ Collection map(f(ClientRect element)) => _Collections.map(this, [], f);
Collection<ClientRect> filter(bool f(ClientRect element)) =>
- Collections.filter(this, <ClientRect>[], f);
+ _Collections.filter(this, <ClientRect>[], f);
- bool every(bool f(ClientRect element)) => Collections.every(this, f);
+ bool every(bool f(ClientRect element)) => _Collections.every(this, f);
- bool some(bool f(ClientRect element)) => Collections.some(this, f);
+ bool some(bool f(ClientRect element)) => _Collections.some(this, f);
bool get isEmpty => this.length == 0;
@@ -25880,16 +25774,16 @@ class _DOMStringList extends NativeFieldWrapperClass1 implements List<String> {
// contains() defined by IDL.
- void forEach(void f(String element)) => Collections.forEach(this, f);
+ void forEach(void f(String element)) => _Collections.forEach(this, f);
- Collection map(f(String element)) => Collections.map(this, [], f);
+ Collection map(f(String element)) => _Collections.map(this, [], f);
Collection<String> filter(bool f(String element)) =>
- Collections.filter(this, <String>[], f);
+ _Collections.filter(this, <String>[], f);
- bool every(bool f(String element)) => Collections.every(this, f);
+ bool every(bool f(String element)) => _Collections.every(this, f);
- bool some(bool f(String element)) => Collections.some(this, f);
+ bool some(bool f(String element)) => _Collections.some(this, f);
bool get isEmpty => this.length == 0;
@@ -26131,18 +26025,18 @@ class _EntryArray extends NativeFieldWrapperClass1 implements List<Entry> {
throw new UnsupportedError("Cannot add to immutable List.");
}
- bool contains(Entry element) => Collections.contains(this, element);
+ bool contains(Entry element) => _Collections.contains(this, element);
- void forEach(void f(Entry element)) => Collections.forEach(this, f);
+ void forEach(void f(Entry element)) => _Collections.forEach(this, f);
- Collection map(f(Entry element)) => Collections.map(this, [], f);
+ Collection map(f(Entry element)) => _Collections.map(this, [], f);
Collection<Entry> filter(bool f(Entry element)) =>
- Collections.filter(this, <Entry>[], f);
+ _Collections.filter(this, <Entry>[], f);
- bool every(bool f(Entry element)) => Collections.every(this, f);
+ bool every(bool f(Entry element)) => _Collections.every(this, f);
- bool some(bool f(Entry element)) => Collections.some(this, f);
+ bool some(bool f(Entry element)) => _Collections.some(this, f);
bool get isEmpty => this.length == 0;
@@ -26236,18 +26130,18 @@ class _EntryArraySync extends NativeFieldWrapperClass1 implements List<EntrySync
throw new UnsupportedError("Cannot add to immutable List.");
}
- bool contains(EntrySync element) => Collections.contains(this, element);
+ bool contains(EntrySync element) => _Collections.contains(this, element);
- void forEach(void f(EntrySync element)) => Collections.forEach(this, f);
+ void forEach(void f(EntrySync element)) => _Collections.forEach(this, f);
- Collection map(f(EntrySync element)) => Collections.map(this, [], f);
+ Collection map(f(EntrySync element)) => _Collections.map(this, [], f);
Collection<EntrySync> filter(bool f(EntrySync element)) =>
- Collections.filter(this, <EntrySync>[], f);
+ _Collections.filter(this, <EntrySync>[], f);
- bool every(bool f(EntrySync element)) => Collections.every(this, f);
+ bool every(bool f(EntrySync element)) => _Collections.every(this, f);
- bool some(bool f(EntrySync element)) => Collections.some(this, f);
+ bool some(bool f(EntrySync element)) => _Collections.some(this, f);
bool get isEmpty => this.length == 0;
@@ -26307,6 +26201,111 @@ class _EventSourceFactoryProvider {
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
+// WARNING: Do not edit - generated code.
+
+
+/// @domName FileList
+class _FileList extends NativeFieldWrapperClass1 implements List<File> {
+ _FileList.internal();
+
+
+ /** @domName FileList.length */
+ int get length native "FileList_length_Getter";
+
+ File operator[](int index) native "FileList_item_Callback";
+
+ void operator[]=(int index, File value) {
+ throw new UnsupportedError("Cannot assign element of immutable List.");
+ }
+ // -- start List<File> mixins.
+ // File is the element type.
+
+ // From Iterable<File>:
+
+ Iterator<File> iterator() {
+ // Note: NodeLists are not fixed size. And most probably length shouldn't
+ // be cached in both iterator _and_ forEach method. For now caching it
+ // for consistency.
+ return new FixedSizeListIterator<File>(this);
+ }
+
+ // From Collection<File>:
+
+ void add(File value) {
+ throw new UnsupportedError("Cannot add to immutable List.");
+ }
+
+ void addLast(File value) {
+ throw new UnsupportedError("Cannot add to immutable List.");
+ }
+
+ void addAll(Collection<File> collection) {
+ throw new UnsupportedError("Cannot add to immutable List.");
+ }
+
+ bool contains(File element) => _Collections.contains(this, element);
+
+ void forEach(void f(File element)) => _Collections.forEach(this, f);
+
+ Collection map(f(File element)) => _Collections.map(this, [], f);
+
+ Collection<File> filter(bool f(File element)) =>
+ _Collections.filter(this, <File>[], f);
+
+ bool every(bool f(File element)) => _Collections.every(this, f);
+
+ bool some(bool f(File element)) => _Collections.some(this, f);
+
+ bool get isEmpty => this.length == 0;
+
+ // From List<File>:
+
+ void sort([Comparator<File> compare = Comparable.compare]) {
+ throw new UnsupportedError("Cannot sort immutable List.");
+ }
+
+ int indexOf(File element, [int start = 0]) =>
+ _Lists.indexOf(this, element, start, this.length);
+
+ int lastIndexOf(File element, [int start]) {
+ if (start == null) start = length - 1;
+ return _Lists.lastIndexOf(this, element, start);
+ }
+
+ File get first => this[0];
+
+ File get last => this[length - 1];
+
+ File removeLast() {
+ throw new UnsupportedError("Cannot removeLast on immutable List.");
+ }
+
+ void setRange(int start, int rangeLength, List<File> from, [int startFrom]) {
+ throw new UnsupportedError("Cannot setRange on immutable List.");
+ }
+
+ void removeRange(int start, int rangeLength) {
+ throw new UnsupportedError("Cannot removeRange on immutable List.");
+ }
+
+ void insertRange(int start, int rangeLength, [File initialValue]) {
+ throw new UnsupportedError("Cannot insertRange on immutable List.");
+ }
+
+ List<File> getRange(int start, int rangeLength) =>
+ _Lists.getRange(this, start, rangeLength, <File>[]);
+
+ // -- end List<File> mixins.
+
+
+ /** @domName FileList.item */
+ File item(int index) native "FileList_item_Callback";
+
+}
+// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
class _FileReaderFactoryProvider {
static FileReader createFileReader() native "FileReader_constructor_Callback";
@@ -26373,18 +26372,18 @@ class _GamepadList extends NativeFieldWrapperClass1 implements List<Gamepad> {
throw new UnsupportedError("Cannot add to immutable List.");
}
- bool contains(Gamepad element) => Collections.contains(this, element);
+ bool contains(Gamepad element) => _Collections.contains(this, element);
- void forEach(void f(Gamepad element)) => Collections.forEach(this, f);
+ void forEach(void f(Gamepad element)) => _Collections.forEach(this, f);
- Collection map(f(Gamepad element)) => Collections.map(this, [], f);
+ Collection map(f(Gamepad element)) => _Collections.map(this, [], f);
Collection<Gamepad> filter(bool f(Gamepad element)) =>
- Collections.filter(this, <Gamepad>[], f);
+ _Collections.filter(this, <Gamepad>[], f);
- bool every(bool f(Gamepad element)) => Collections.every(this, f);
+ bool every(bool f(Gamepad element)) => _Collections.every(this, f);
- bool some(bool f(Gamepad element)) => Collections.some(this, f);
+ bool some(bool f(Gamepad element)) => _Collections.some(this, f);
bool get isEmpty => this.length == 0;
@@ -26527,18 +26526,18 @@ class _MediaStreamList extends NativeFieldWrapperClass1 implements List<MediaStr
throw new UnsupportedError("Cannot add to immutable List.");
}
- bool contains(MediaStream element) => Collections.contains(this, element);
+ bool contains(MediaStream element) => _Collections.contains(this, element);
- void forEach(void f(MediaStream element)) => Collections.forEach(this, f);
+ void forEach(void f(MediaStream element)) => _Collections.forEach(this, f);
- Collection map(f(MediaStream element)) => Collections.map(this, [], f);
+ Collection map(f(MediaStream element)) => _Collections.map(this, [], f);
Collection<MediaStream> filter(bool f(MediaStream element)) =>
- Collections.filter(this, <MediaStream>[], f);
+ _Collections.filter(this, <MediaStream>[], f);
- bool every(bool f(MediaStream element)) => Collections.every(this, f);
+ bool every(bool f(MediaStream element)) => _Collections.every(this, f);
- bool some(bool f(MediaStream element)) => Collections.some(this, f);
+ bool some(bool f(MediaStream element)) => _Collections.some(this, f);
bool get isEmpty => this.length == 0;
@@ -26648,18 +26647,18 @@ class _NodeList extends NativeFieldWrapperClass1 implements List<Node> {
throw new UnsupportedError("Cannot add to immutable List.");
}
- bool contains(Node element) => Collections.contains(this, element);
+ bool contains(Node element) => _Collections.contains(this, element);
- void forEach(void f(Node element)) => Collections.forEach(this, f);
+ void forEach(void f(Node element)) => _Collections.forEach(this, f);
- Collection map(f(Node element)) => Collections.map(this, [], f);
+ Collection map(f(Node element)) => _Collections.map(this, [], f);
Collection<Node> filter(bool f(Node element)) =>
- Collections.filter(this, <Node>[], f);
+ _Collections.filter(this, <Node>[], f);
- bool every(bool f(Node element)) => Collections.every(this, f);
+ bool every(bool f(Node element)) => _Collections.every(this, f);
- bool some(bool f(Node element)) => Collections.some(this, f);
+ bool some(bool f(Node element)) => _Collections.some(this, f);
bool get isEmpty => this.length == 0;
@@ -26841,18 +26840,18 @@ class _SpeechInputResultList extends NativeFieldWrapperClass1 implements List<Sp
throw new UnsupportedError("Cannot add to immutable List.");
}
- bool contains(SpeechInputResult element) => Collections.contains(this, element);
+ bool contains(SpeechInputResult element) => _Collections.contains(this, element);
- void forEach(void f(SpeechInputResult element)) => Collections.forEach(this, f);
+ void forEach(void f(SpeechInputResult element)) => _Collections.forEach(this, f);
- Collection map(f(SpeechInputResult element)) => Collections.map(this, [], f);
+ Collection map(f(SpeechInputResult element)) => _Collections.map(this, [], f);
Collection<SpeechInputResult> filter(bool f(SpeechInputResult element)) =>
- Collections.filter(this, <SpeechInputResult>[], f);
+ _Collections.filter(this, <SpeechInputResult>[], f);
- bool every(bool f(SpeechInputResult element)) => Collections.every(this, f);
+ bool every(bool f(SpeechInputResult element)) => _Collections.every(this, f);
- bool some(bool f(SpeechInputResult element)) => Collections.some(this, f);
+ bool some(bool f(SpeechInputResult element)) => _Collections.some(this, f);
bool get isEmpty => this.length == 0;
@@ -26954,18 +26953,18 @@ class _SpeechRecognitionResultList extends NativeFieldWrapperClass1 implements L
throw new UnsupportedError("Cannot add to immutable List.");
}
- bool contains(SpeechRecognitionResult element) => Collections.contains(this, element);
+ bool contains(SpeechRecognitionResult element) => _Collections.contains(this, element);
- void forEach(void f(SpeechRecognitionResult element)) => Collections.forEach(this, f);
+ void forEach(void f(SpeechRecognitionResult element)) => _Collections.forEach(this, f);
- Collection map(f(SpeechRecognitionResult element)) => Collections.map(this, [], f);
+ Collection map(f(SpeechRecognitionResult element)) => _Collections.map(this, [], f);
Collection<SpeechRecognitionResult> filter(bool f(SpeechRecognitionResult element)) =>
- Collections.filter(this, <SpeechRecognitionResult>[], f);
+ _Collections.filter(this, <SpeechRecognitionResult>[], f);
- bool every(bool f(SpeechRecognitionResult element)) => Collections.every(this, f);
+ bool every(bool f(SpeechRecognitionResult element)) => _Collections.every(this, f);
- bool some(bool f(SpeechRecognitionResult element)) => Collections.some(this, f);
+ bool some(bool f(SpeechRecognitionResult element)) => _Collections.some(this, f);
bool get isEmpty => this.length == 0;
@@ -27059,18 +27058,18 @@ class _StyleSheetList extends NativeFieldWrapperClass1 implements List<StyleShee
throw new UnsupportedError("Cannot add to immutable List.");
}
- bool contains(StyleSheet element) => Collections.contains(this, element);
+ bool contains(StyleSheet element) => _Collections.contains(this, element);
- void forEach(void f(StyleSheet element)) => Collections.forEach(this, f);
+ void forEach(void f(StyleSheet element)) => _Collections.forEach(this, f);
- Collection map(f(StyleSheet element)) => Collections.map(this, [], f);
+ Collection map(f(StyleSheet element)) => _Collections.map(this, [], f);
Collection<StyleSheet> filter(bool f(StyleSheet element)) =>
- Collections.filter(this, <StyleSheet>[], f);
+ _Collections.filter(this, <StyleSheet>[], f);
- bool every(bool f(StyleSheet element)) => Collections.every(this, f);
+ bool every(bool f(StyleSheet element)) => _Collections.every(this, f);
- bool some(bool f(StyleSheet element)) => Collections.some(this, f);
+ bool some(bool f(StyleSheet element)) => _Collections.some(this, f);
bool get isEmpty => this.length == 0;
@@ -27172,18 +27171,18 @@ class _WebKitAnimationList extends NativeFieldWrapperClass1 implements List<Anim
throw new UnsupportedError("Cannot add to immutable List.");
}
- bool contains(Animation element) => Collections.contains(this, element);
+ bool contains(Animation element) => _Collections.contains(this, element);
- void forEach(void f(Animation element)) => Collections.forEach(this, f);
+ void forEach(void f(Animation element)) => _Collections.forEach(this, f);
- Collection map(f(Animation element)) => Collections.map(this, [], f);
+ Collection map(f(Animation element)) => _Collections.map(this, [], f);
Collection<Animation> filter(bool f(Animation element)) =>
- Collections.filter(this, <Animation>[], f);
+ _Collections.filter(this, <Animation>[], f);
- bool every(bool f(Animation element)) => Collections.every(this, f);
+ bool every(bool f(Animation element)) => _Collections.every(this, f);
- bool some(bool f(Animation element)) => Collections.some(this, f);
+ bool some(bool f(Animation element)) => _Collections.some(this, f);
bool get isEmpty => this.length == 0;
@@ -29073,6 +29072,66 @@ get _timerFactoryClosure => (int milliSeconds, void callback(Timer timer), bool
timer = new _Timer(() { canceller(id); });
return timer;
};
+// Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+
+/**
+ * The [Collections] class implements static methods useful when
+ * writing a class that implements [Collection] and the [iterator]
+ * method.
+ */
+class _Collections {
+ static bool contains(Iterable<Object> iterable, Object element) {
+ for (final e in iterable) {
+ if (e == element) return true;
+ }
+ return false;
+ }
+
+ static void forEach(Iterable<Object> iterable, void f(Object o)) {
+ for (final e in iterable) {
+ f(e);
+ }
+ }
+
+ static List map(Iterable<Object> source,
+ List<Object> destination,
+ f(o)) {
+ for (final e in source) {
+ destination.add(f(e));
+ }
+ return destination;
+ }
+
+ static bool some(Iterable<Object> iterable, bool f(Object o)) {
+ for (final e in iterable) {
+ if (f(e)) return true;
+ }
+ return false;
+ }
+
+ static bool every(Iterable<Object> iterable, bool f(Object o)) {
+ for (final e in iterable) {
+ if (!f(e)) return false;
+ }
+ return true;
+ }
+
+ static List filter(Iterable<Object> source,
+ List<Object> destination,
+ bool f(o)) {
+ for (final e in source) {
+ if (f(e)) destination.add(e);
+ }
+ return destination;
+ }
+
+ static bool isEmpty(Iterable<Object> iterable) {
+ return !iterable.iterator().hasNext;
+ }
+}
// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
« no previous file with comments | « sdk/lib/html/dart2js/html_dart2js.dart ('k') | sdk/lib/html/docs/svg_docs.json » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698