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

Unified Diff: lib/html/release/html.dart

Side-by-side diff isn't available for this file because of its large size.
Issue 9994002: Update lib/html/release/html.dart (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: merge Created 8 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/html/release/html.dart
diff --git a/lib/html/release/html.dart b/lib/html/release/html.dart
index 5f34f2bd82788c80975c3863e226dbfb5b860a91..ee95120b16e5b3c7270678b07ac052bede47bee4 100644
--- a/lib/html/release/html.dart
+++ b/lib/html/release/html.dart
@@ -4739,10 +4739,22 @@ class _CanvasPixelArrayImpl extends _DOMTypeBase implements CanvasPixelArray {
int operator[](int index) => _wrap(_ptr[index]);
-
void operator[]=(int index, int value) {
- throw new UnsupportedOperationException("Cannot assign element of immutable List.");
+ return _ptr[index] = _unwrap(value);
}
+ // -- start List<int> mixins.
+ // int is the element type.
+
+ // From Iterable<int>:
+
+ Iterator<int> 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<int>(this);
+ }
+
+ // From Collection<int>:
void add(int value) {
throw new UnsupportedOperationException("Cannot add to immutable List.");
@@ -4756,78 +4768,56 @@ class _CanvasPixelArrayImpl extends _DOMTypeBase implements CanvasPixelArray {
throw new UnsupportedOperationException("Cannot add to immutable List.");
}
- void sort(int compare(int a, int b)) {
- throw new UnsupportedOperationException("Cannot sort immutable List.");
- }
+ void forEach(void f(int element)) => _Collections.forEach(this, f);
- void copyFrom(List<Object> src, int srcStart, int dstStart, int count) {
- throw new UnsupportedOperationException("This object is immutable.");
- }
+ Collection map(f(int element)) => _Collections.map(this, [], f);
- int indexOf(int element, [int start = 0]) {
- return _Lists.indexOf(this, element, start, this.length);
- }
+ Collection<int> filter(bool f(int element)) =>
+ _Collections.filter(this, <int>[], f);
- int lastIndexOf(int element, [int start = null]) {
- if (start === null) start = length - 1;
- return _Lists.lastIndexOf(this, element, start);
- }
+ bool every(bool f(int element)) => _Collections.every(this, f);
- int clear() {
- throw new UnsupportedOperationException("Cannot clear immutable List.");
- }
+ bool some(bool f(int element)) => _Collections.some(this, f);
- int removeLast() {
- throw new UnsupportedOperationException("Cannot removeLast on immutable List.");
- }
+ bool isEmpty() => this.length == 0;
- int last() {
- return this[length - 1];
- }
+ // From List<int>:
- void forEach(void f(int element)) {
- _Collections.forEach(this, f);
+ void sort(int compare(int a, int b)) {
+ throw new UnsupportedOperationException("Cannot sort immutable List.");
}
- Collection map(f(int element)) {
- return _Collections.map(this, [], f);
- }
+ int indexOf(int element, [int start = 0]) =>
+ _Lists.indexOf(this, element, start, this.length);
- Collection<int> filter(bool f(int element)) {
- return _Collections.filter(this, new List<int>(), f);
+ int lastIndexOf(int element, [int start]) {
+ if (start === null) start = length - 1;
+ return _Lists.lastIndexOf(this, element, start);
}
- bool every(bool f(int element)) {
- return _Collections.every(this, f);
- }
+ int last() => this[length - 1];
- bool some(bool f(int element)) {
- return _Collections.some(this, f);
+ int removeLast() {
+ throw new UnsupportedOperationException("Cannot removeLast on immutable List.");
}
- void setRange(int start, int length, List<int> from, [int startFrom]) {
+ // FIXME: implement these.
+ void setRange(int start, int rangeLength, List<int> from, [int startFrom]) {
throw new UnsupportedOperationException("Cannot setRange on immutable List.");
}
- void removeRange(int start, int length) {
+ void removeRange(int start, int rangeLength) {
throw new UnsupportedOperationException("Cannot removeRange on immutable List.");
}
- void insertRange(int start, int length, [int initialValue]) {
+ void insertRange(int start, int rangeLength, [int initialValue]) {
throw new UnsupportedOperationException("Cannot insertRange on immutable List.");
}
- List<int> getRange(int start, int length) {
- throw new NotImplementedException();
- }
+ List<int> getRange(int start, int rangeLength) =>
+ _Lists.getRange(this, start, rangeLength, <int>[]);
- bool isEmpty() {
- return length == 0;
- }
-
- Iterator<int> iterator() {
- return new _FixedSizeListIterator<int>(this);
- }
+ // -- end List<int> mixins.
}
class _CanvasRenderingContextImpl extends _DOMTypeBase implements CanvasRenderingContext {
@@ -7143,15 +7133,15 @@ class FilteredElementList implements ElementList {
throw const NotImplementedException();
}
- void setRange(int start, int length, List from, [int startFrom = 0]) {
+ void setRange(int start, int rangeLength, List from, [int startFrom = 0]) {
throw const NotImplementedException();
}
- void removeRange(int start, int length) {
- _filtered.getRange(start, length).forEach((el) => el.remove());
+ void removeRange(int start, int rangeLength) {
+ _filtered.getRange(start, rangeLength).forEach((el) => el.remove());
}
- void insertRange(int start, int length, [initialValue = null]) {
+ void insertRange(int start, int rangeLength, [initialValue = null]) {
throw const NotImplementedException();
}
@@ -7162,11 +7152,11 @@ class FilteredElementList implements ElementList {
}
Element removeLast() {
- final last = this.last();
- if (last != null) {
- last.remove();
+ final result = this.last();
+ if (result != null) {
+ result.remove();
}
- return last;
+ return result;
}
Collection map(f(Element element)) => _filtered.map(f);
@@ -7177,8 +7167,8 @@ class FilteredElementList implements ElementList {
int get length() => _filtered.length;
Element operator [](int index) => _filtered[index];
Iterator<Element> iterator() => _filtered.iterator();
- List<Element> getRange(int start, int length) =>
- _filtered.getRange(start, length);
+ List<Element> getRange(int start, int rangeLength) =>
+ _filtered.getRange(start, rangeLength);
int indexOf(Element element, [int start = 0]) =>
_filtered.indexOf(element, start);
@@ -7580,20 +7570,20 @@ class _ChildrenElementList implements ElementList {
throw 'Not impl yet. todo(jacobr)';
}
- void setRange(int start, int length, List from, [int startFrom = 0]) {
+ void setRange(int start, int rangeLength, List from, [int startFrom = 0]) {
throw const NotImplementedException();
}
- void removeRange(int start, int length) {
+ void removeRange(int start, int rangeLength) {
throw const NotImplementedException();
}
- void insertRange(int start, int length, [initialValue = null]) {
+ void insertRange(int start, int rangeLength, [initialValue = null]) {
throw const NotImplementedException();
}
- List getRange(int start, int length) =>
- new _FrozenElementList._wrap(_Lists.getRange(this, start, length,
+ List getRange(int start, int rangeLength) =>
+ new _FrozenElementList._wrap(_Lists.getRange(this, start, rangeLength,
<Element>[]));
int indexOf(Element element, [int start = 0]) {
@@ -7611,11 +7601,11 @@ class _ChildrenElementList implements ElementList {
}
Element removeLast() {
- final last = this.last();
- if (last != null) {
- _element.$dom_removeChild(last);
+ final result = this.last();
+ if (result != null) {
+ _element.$dom_removeChild(result);
}
- return last;
+ return result;
}
Element last() {
@@ -7708,20 +7698,20 @@ class _FrozenElementList implements ElementList {
throw const UnsupportedOperationException('');
}
- void setRange(int start, int length, List from, [int startFrom = 0]) {
+ void setRange(int start, int rangeLength, List from, [int startFrom = 0]) {
throw const UnsupportedOperationException('');
}
- void removeRange(int start, int length) {
+ void removeRange(int start, int rangeLength) {
throw const UnsupportedOperationException('');
}
- void insertRange(int start, int length, [initialValue = null]) {
+ void insertRange(int start, int rangeLength, [initialValue = null]) {
throw const UnsupportedOperationException('');
}
- ElementList getRange(int start, int length) =>
- new _FrozenElementList._wrap(_nodeList.getRange(start, length));
+ ElementList getRange(int start, int rangeLength) =>
+ new _FrozenElementList._wrap(_nodeList.getRange(start, rangeLength));
int indexOf(Element element, [int start = 0]) =>
_nodeList.indexOf(element, start);
@@ -7770,8 +7760,8 @@ class _ElementList extends _ListWrapper<Element> implements ElementList {
ElementList filter(bool f(Element element)) =>
new _ElementList(super.filter(f));
- ElementList getRange(int start, int length) =>
- new _ElementList(super.getRange(start, length));
+ ElementList getRange(int start, int rangeLength) =>
+ new _ElementList(super.getRange(start, rangeLength));
}
class _ElementAttributeMap implements AttributeMap {
@@ -9376,10 +9366,22 @@ class _Float32ArrayImpl extends _ArrayBufferViewImpl implements Float32Array, Li
num operator[](int index) => _wrap(_ptr[index]);
-
void operator[]=(int index, num value) {
- throw new UnsupportedOperationException("Cannot assign element of immutable List.");
+ return _ptr[index] = _unwrap(value);
}
+ // -- start List<num> mixins.
+ // num is the element type.
+
+ // From Iterable<num>:
+
+ Iterator<num> 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<num>(this);
+ }
+
+ // From Collection<num>:
void add(num value) {
throw new UnsupportedOperationException("Cannot add to immutable List.");
@@ -9393,78 +9395,56 @@ class _Float32ArrayImpl extends _ArrayBufferViewImpl implements Float32Array, Li
throw new UnsupportedOperationException("Cannot add to immutable List.");
}
- void sort(int compare(num a, num b)) {
- throw new UnsupportedOperationException("Cannot sort immutable List.");
- }
+ void forEach(void f(num element)) => _Collections.forEach(this, f);
- void copyFrom(List<Object> src, int srcStart, int dstStart, int count) {
- throw new UnsupportedOperationException("This object is immutable.");
- }
+ Collection map(f(num element)) => _Collections.map(this, [], f);
- int indexOf(num element, [int start = 0]) {
- return _Lists.indexOf(this, element, start, this.length);
- }
+ Collection<num> filter(bool f(num element)) =>
+ _Collections.filter(this, <num>[], f);
- int lastIndexOf(num element, [int start = null]) {
- if (start === null) start = length - 1;
- return _Lists.lastIndexOf(this, element, start);
- }
+ bool every(bool f(num element)) => _Collections.every(this, f);
- int clear() {
- throw new UnsupportedOperationException("Cannot clear immutable List.");
- }
+ bool some(bool f(num element)) => _Collections.some(this, f);
- num removeLast() {
- throw new UnsupportedOperationException("Cannot removeLast on immutable List.");
- }
+ bool isEmpty() => this.length == 0;
- num last() {
- return this[length - 1];
- }
+ // From List<num>:
- void forEach(void f(num element)) {
- _Collections.forEach(this, f);
+ void sort(int compare(num a, num b)) {
+ throw new UnsupportedOperationException("Cannot sort immutable List.");
}
- Collection map(f(num element)) {
- return _Collections.map(this, [], f);
- }
+ int indexOf(num element, [int start = 0]) =>
+ _Lists.indexOf(this, element, start, this.length);
- Collection<num> filter(bool f(num element)) {
- return _Collections.filter(this, new List<num>(), f);
+ int lastIndexOf(num element, [int start]) {
+ if (start === null) start = length - 1;
+ return _Lists.lastIndexOf(this, element, start);
}
- bool every(bool f(num element)) {
- return _Collections.every(this, f);
- }
+ num last() => this[length - 1];
- bool some(bool f(num element)) {
- return _Collections.some(this, f);
+ num removeLast() {
+ throw new UnsupportedOperationException("Cannot removeLast on immutable List.");
}
- void setRange(int start, int length, List<num> from, [int startFrom]) {
+ // FIXME: implement these.
+ void setRange(int start, int rangeLength, List<num> from, [int startFrom]) {
throw new UnsupportedOperationException("Cannot setRange on immutable List.");
}
- void removeRange(int start, int length) {
+ void removeRange(int start, int rangeLength) {
throw new UnsupportedOperationException("Cannot removeRange on immutable List.");
}
- void insertRange(int start, int length, [num initialValue]) {
+ void insertRange(int start, int rangeLength, [num initialValue]) {
throw new UnsupportedOperationException("Cannot insertRange on immutable List.");
}
- List<num> getRange(int start, int length) {
- throw new NotImplementedException();
- }
-
- bool isEmpty() {
- return length == 0;
- }
+ List<num> getRange(int start, int rangeLength) =>
+ _Lists.getRange(this, start, rangeLength, <num>[]);
- Iterator<num> iterator() {
- return new _FixedSizeListIterator<num>(this);
- }
+ // -- end List<num> mixins.
void setElements(Object array, [int offset = null]) {
if (offset === null) {
@@ -9492,11 +9472,23 @@ class _Float64ArrayImpl extends _ArrayBufferViewImpl implements Float64Array, Li
num operator[](int index) => _wrap(_ptr[index]);
-
void operator[]=(int index, num value) {
- throw new UnsupportedOperationException("Cannot assign element of immutable List.");
+ return _ptr[index] = _unwrap(value);
+ }
+ // -- start List<num> mixins.
+ // num is the element type.
+
+ // From Iterable<num>:
+
+ Iterator<num> 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<num>(this);
}
+ // From Collection<num>:
+
void add(num value) {
throw new UnsupportedOperationException("Cannot add to immutable List.");
}
@@ -9509,78 +9501,56 @@ class _Float64ArrayImpl extends _ArrayBufferViewImpl implements Float64Array, Li
throw new UnsupportedOperationException("Cannot add to immutable List.");
}
- void sort(int compare(num a, num b)) {
- throw new UnsupportedOperationException("Cannot sort immutable List.");
- }
+ void forEach(void f(num element)) => _Collections.forEach(this, f);
- void copyFrom(List<Object> src, int srcStart, int dstStart, int count) {
- throw new UnsupportedOperationException("This object is immutable.");
- }
+ Collection map(f(num element)) => _Collections.map(this, [], f);
- int indexOf(num element, [int start = 0]) {
- return _Lists.indexOf(this, element, start, this.length);
- }
+ Collection<num> filter(bool f(num element)) =>
+ _Collections.filter(this, <num>[], f);
- int lastIndexOf(num element, [int start = null]) {
- if (start === null) start = length - 1;
- return _Lists.lastIndexOf(this, element, start);
- }
+ bool every(bool f(num element)) => _Collections.every(this, f);
- int clear() {
- throw new UnsupportedOperationException("Cannot clear immutable List.");
- }
+ bool some(bool f(num element)) => _Collections.some(this, f);
- num removeLast() {
- throw new UnsupportedOperationException("Cannot removeLast on immutable List.");
- }
+ bool isEmpty() => this.length == 0;
- num last() {
- return this[length - 1];
- }
+ // From List<num>:
- void forEach(void f(num element)) {
- _Collections.forEach(this, f);
+ void sort(int compare(num a, num b)) {
+ throw new UnsupportedOperationException("Cannot sort immutable List.");
}
- Collection map(f(num element)) {
- return _Collections.map(this, [], f);
- }
+ int indexOf(num element, [int start = 0]) =>
+ _Lists.indexOf(this, element, start, this.length);
- Collection<num> filter(bool f(num element)) {
- return _Collections.filter(this, new List<num>(), f);
+ int lastIndexOf(num element, [int start]) {
+ if (start === null) start = length - 1;
+ return _Lists.lastIndexOf(this, element, start);
}
- bool every(bool f(num element)) {
- return _Collections.every(this, f);
- }
+ num last() => this[length - 1];
- bool some(bool f(num element)) {
- return _Collections.some(this, f);
+ num removeLast() {
+ throw new UnsupportedOperationException("Cannot removeLast on immutable List.");
}
- void setRange(int start, int length, List<num> from, [int startFrom]) {
+ // FIXME: implement these.
+ void setRange(int start, int rangeLength, List<num> from, [int startFrom]) {
throw new UnsupportedOperationException("Cannot setRange on immutable List.");
}
- void removeRange(int start, int length) {
+ void removeRange(int start, int rangeLength) {
throw new UnsupportedOperationException("Cannot removeRange on immutable List.");
}
- void insertRange(int start, int length, [num initialValue]) {
+ void insertRange(int start, int rangeLength, [num initialValue]) {
throw new UnsupportedOperationException("Cannot insertRange on immutable List.");
}
- List<num> getRange(int start, int length) {
- throw new NotImplementedException();
- }
+ List<num> getRange(int start, int rangeLength) =>
+ _Lists.getRange(this, start, rangeLength, <num>[]);
- bool isEmpty() {
- return length == 0;
- }
-
- Iterator<num> iterator() {
- return new _FixedSizeListIterator<num>(this);
- }
+ // -- end List<num> mixins.
void setElements(Object array, [int offset = null]) {
if (offset === null) {
@@ -9852,10 +9822,22 @@ class _HTMLCollectionImpl extends _DOMTypeBase implements HTMLCollection {
Node operator[](int index) => _wrap(_ptr[index]);
-
void operator[]=(int index, Node value) {
throw new UnsupportedOperationException("Cannot assign element of immutable List.");
}
+ // -- start List<Node> mixins.
+ // Node is the element type.
+
+ // From Iterable<Node>:
+
+ Iterator<Node> 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<Node>(this);
+ }
+
+ // From Collection<Node>:
void add(Node value) {
throw new UnsupportedOperationException("Cannot add to immutable List.");
@@ -9869,78 +9851,56 @@ class _HTMLCollectionImpl extends _DOMTypeBase implements HTMLCollection {
throw new UnsupportedOperationException("Cannot add to immutable List.");
}
- void sort(int compare(Node a, Node b)) {
- throw new UnsupportedOperationException("Cannot sort immutable List.");
- }
+ void forEach(void f(Node element)) => _Collections.forEach(this, f);
- void copyFrom(List<Object> src, int srcStart, int dstStart, int count) {
- throw new UnsupportedOperationException("This object is immutable.");
- }
+ Collection map(f(Node element)) => _Collections.map(this, [], f);
- int indexOf(Node element, [int start = 0]) {
- return _Lists.indexOf(this, element, start, this.length);
- }
+ Collection<Node> filter(bool f(Node element)) =>
+ _Collections.filter(this, <Node>[], f);
- int lastIndexOf(Node element, [int start = null]) {
- if (start === null) start = length - 1;
- return _Lists.lastIndexOf(this, element, start);
- }
+ bool every(bool f(Node element)) => _Collections.every(this, f);
- int clear() {
- throw new UnsupportedOperationException("Cannot clear immutable List.");
- }
+ bool some(bool f(Node element)) => _Collections.some(this, f);
- Node removeLast() {
- throw new UnsupportedOperationException("Cannot removeLast on immutable List.");
- }
+ bool isEmpty() => this.length == 0;
- Node last() {
- return this[length - 1];
- }
+ // From List<Node>:
- void forEach(void f(Node element)) {
- _Collections.forEach(this, f);
+ void sort(int compare(Node a, Node b)) {
+ throw new UnsupportedOperationException("Cannot sort immutable List.");
}
- Collection map(f(Node element)) {
- return _Collections.map(this, [], f);
- }
+ int indexOf(Node element, [int start = 0]) =>
+ _Lists.indexOf(this, element, start, this.length);
- Collection<Node> filter(bool f(Node element)) {
- return _Collections.filter(this, new List<Node>(), f);
+ int lastIndexOf(Node element, [int start]) {
+ if (start === null) start = length - 1;
+ return _Lists.lastIndexOf(this, element, start);
}
- bool every(bool f(Node element)) {
- return _Collections.every(this, f);
- }
+ Node last() => this[length - 1];
- bool some(bool f(Node element)) {
- return _Collections.some(this, f);
+ Node removeLast() {
+ throw new UnsupportedOperationException("Cannot removeLast on immutable List.");
}
- void setRange(int start, int length, List<Node> from, [int startFrom]) {
+ // FIXME: implement these.
+ void setRange(int start, int rangeLength, List<Node> from, [int startFrom]) {
throw new UnsupportedOperationException("Cannot setRange on immutable List.");
}
- void removeRange(int start, int length) {
+ void removeRange(int start, int rangeLength) {
throw new UnsupportedOperationException("Cannot removeRange on immutable List.");
}
- void insertRange(int start, int length, [Node initialValue]) {
+ void insertRange(int start, int rangeLength, [Node initialValue]) {
throw new UnsupportedOperationException("Cannot insertRange on immutable List.");
}
- List<Node> getRange(int start, int length) {
- throw new NotImplementedException();
- }
-
- bool isEmpty() {
- return length == 0;
- }
+ List<Node> getRange(int start, int rangeLength) =>
+ _Lists.getRange(this, start, rangeLength, <Node>[]);
- Iterator<Node> iterator() {
- return new _FixedSizeListIterator<Node>(this);
- }
+ // -- end List<Node> mixins.
Node item(int index) {
return _wrap(_ptr.item(_unwrap(index)));
@@ -10924,11 +10884,23 @@ class _Int16ArrayImpl extends _ArrayBufferViewImpl implements Int16Array, List<i
int operator[](int index) => _wrap(_ptr[index]);
-
void operator[]=(int index, int value) {
- throw new UnsupportedOperationException("Cannot assign element of immutable List.");
+ return _ptr[index] = _unwrap(value);
+ }
+ // -- start List<int> mixins.
+ // int is the element type.
+
+ // From Iterable<int>:
+
+ Iterator<int> 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<int>(this);
}
+ // From Collection<int>:
+
void add(int value) {
throw new UnsupportedOperationException("Cannot add to immutable List.");
}
@@ -10941,78 +10913,56 @@ class _Int16ArrayImpl extends _ArrayBufferViewImpl implements Int16Array, List<i
throw new UnsupportedOperationException("Cannot add to immutable List.");
}
- void sort(int compare(int a, int b)) {
- throw new UnsupportedOperationException("Cannot sort immutable List.");
- }
+ void forEach(void f(int element)) => _Collections.forEach(this, f);
- void copyFrom(List<Object> src, int srcStart, int dstStart, int count) {
- throw new UnsupportedOperationException("This object is immutable.");
- }
+ Collection map(f(int element)) => _Collections.map(this, [], f);
- int indexOf(int element, [int start = 0]) {
- return _Lists.indexOf(this, element, start, this.length);
- }
+ Collection<int> filter(bool f(int element)) =>
+ _Collections.filter(this, <int>[], f);
- int lastIndexOf(int element, [int start = null]) {
- if (start === null) start = length - 1;
- return _Lists.lastIndexOf(this, element, start);
- }
+ bool every(bool f(int element)) => _Collections.every(this, f);
- int clear() {
- throw new UnsupportedOperationException("Cannot clear immutable List.");
- }
+ bool some(bool f(int element)) => _Collections.some(this, f);
- int removeLast() {
- throw new UnsupportedOperationException("Cannot removeLast on immutable List.");
- }
+ bool isEmpty() => this.length == 0;
- int last() {
- return this[length - 1];
- }
+ // From List<int>:
- void forEach(void f(int element)) {
- _Collections.forEach(this, f);
+ void sort(int compare(int a, int b)) {
+ throw new UnsupportedOperationException("Cannot sort immutable List.");
}
- Collection map(f(int element)) {
- return _Collections.map(this, [], f);
- }
+ int indexOf(int element, [int start = 0]) =>
+ _Lists.indexOf(this, element, start, this.length);
- Collection<int> filter(bool f(int element)) {
- return _Collections.filter(this, new List<int>(), f);
+ int lastIndexOf(int element, [int start]) {
+ if (start === null) start = length - 1;
+ return _Lists.lastIndexOf(this, element, start);
}
- bool every(bool f(int element)) {
- return _Collections.every(this, f);
- }
+ int last() => this[length - 1];
- bool some(bool f(int element)) {
- return _Collections.some(this, f);
+ int removeLast() {
+ throw new UnsupportedOperationException("Cannot removeLast on immutable List.");
}
- void setRange(int start, int length, List<int> from, [int startFrom]) {
+ // FIXME: implement these.
+ void setRange(int start, int rangeLength, List<int> from, [int startFrom]) {
throw new UnsupportedOperationException("Cannot setRange on immutable List.");
}
- void removeRange(int start, int length) {
+ void removeRange(int start, int rangeLength) {
throw new UnsupportedOperationException("Cannot removeRange on immutable List.");
}
- void insertRange(int start, int length, [int initialValue]) {
+ void insertRange(int start, int rangeLength, [int initialValue]) {
throw new UnsupportedOperationException("Cannot insertRange on immutable List.");
}
- List<int> getRange(int start, int length) {
- throw new NotImplementedException();
- }
+ List<int> getRange(int start, int rangeLength) =>
+ _Lists.getRange(this, start, rangeLength, <int>[]);
- bool isEmpty() {
- return length == 0;
- }
-
- Iterator<int> iterator() {
- return new _FixedSizeListIterator<int>(this);
- }
+ // -- end List<int> mixins.
void setElements(Object array, [int offset = null]) {
if (offset === null) {
@@ -11040,10 +10990,22 @@ class _Int32ArrayImpl extends _ArrayBufferViewImpl implements Int32Array, List<i
int operator[](int index) => _wrap(_ptr[index]);
-
void operator[]=(int index, int value) {
- throw new UnsupportedOperationException("Cannot assign element of immutable List.");
+ return _ptr[index] = _unwrap(value);
}
+ // -- start List<int> mixins.
+ // int is the element type.
+
+ // From Iterable<int>:
+
+ Iterator<int> 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<int>(this);
+ }
+
+ // From Collection<int>:
void add(int value) {
throw new UnsupportedOperationException("Cannot add to immutable List.");
@@ -11057,78 +11019,56 @@ class _Int32ArrayImpl extends _ArrayBufferViewImpl implements Int32Array, List<i
throw new UnsupportedOperationException("Cannot add to immutable List.");
}
- void sort(int compare(int a, int b)) {
- throw new UnsupportedOperationException("Cannot sort immutable List.");
- }
+ void forEach(void f(int element)) => _Collections.forEach(this, f);
- void copyFrom(List<Object> src, int srcStart, int dstStart, int count) {
- throw new UnsupportedOperationException("This object is immutable.");
- }
+ Collection map(f(int element)) => _Collections.map(this, [], f);
- int indexOf(int element, [int start = 0]) {
- return _Lists.indexOf(this, element, start, this.length);
- }
+ Collection<int> filter(bool f(int element)) =>
+ _Collections.filter(this, <int>[], f);
- int lastIndexOf(int element, [int start = null]) {
- if (start === null) start = length - 1;
- return _Lists.lastIndexOf(this, element, start);
- }
+ bool every(bool f(int element)) => _Collections.every(this, f);
- int clear() {
- throw new UnsupportedOperationException("Cannot clear immutable List.");
- }
+ bool some(bool f(int element)) => _Collections.some(this, f);
- int removeLast() {
- throw new UnsupportedOperationException("Cannot removeLast on immutable List.");
- }
+ bool isEmpty() => this.length == 0;
- int last() {
- return this[length - 1];
- }
+ // From List<int>:
- void forEach(void f(int element)) {
- _Collections.forEach(this, f);
+ void sort(int compare(int a, int b)) {
+ throw new UnsupportedOperationException("Cannot sort immutable List.");
}
- Collection map(f(int element)) {
- return _Collections.map(this, [], f);
- }
+ int indexOf(int element, [int start = 0]) =>
+ _Lists.indexOf(this, element, start, this.length);
- Collection<int> filter(bool f(int element)) {
- return _Collections.filter(this, new List<int>(), f);
+ int lastIndexOf(int element, [int start]) {
+ if (start === null) start = length - 1;
+ return _Lists.lastIndexOf(this, element, start);
}
- bool every(bool f(int element)) {
- return _Collections.every(this, f);
- }
+ int last() => this[length - 1];
- bool some(bool f(int element)) {
- return _Collections.some(this, f);
+ int removeLast() {
+ throw new UnsupportedOperationException("Cannot removeLast on immutable List.");
}
- void setRange(int start, int length, List<int> from, [int startFrom]) {
+ // FIXME: implement these.
+ void setRange(int start, int rangeLength, List<int> from, [int startFrom]) {
throw new UnsupportedOperationException("Cannot setRange on immutable List.");
}
- void removeRange(int start, int length) {
+ void removeRange(int start, int rangeLength) {
throw new UnsupportedOperationException("Cannot removeRange on immutable List.");
}
- void insertRange(int start, int length, [int initialValue]) {
+ void insertRange(int start, int rangeLength, [int initialValue]) {
throw new UnsupportedOperationException("Cannot insertRange on immutable List.");
}
- List<int> getRange(int start, int length) {
- throw new NotImplementedException();
- }
+ List<int> getRange(int start, int rangeLength) =>
+ _Lists.getRange(this, start, rangeLength, <int>[]);
- bool isEmpty() {
- return length == 0;
- }
-
- Iterator<int> iterator() {
- return new _FixedSizeListIterator<int>(this);
- }
+ // -- end List<int> mixins.
void setElements(Object array, [int offset = null]) {
if (offset === null) {
@@ -11156,11 +11096,23 @@ class _Int8ArrayImpl extends _ArrayBufferViewImpl implements Int8Array, List<int
int operator[](int index) => _wrap(_ptr[index]);
-
void operator[]=(int index, int value) {
- throw new UnsupportedOperationException("Cannot assign element of immutable List.");
+ return _ptr[index] = _unwrap(value);
+ }
+ // -- start List<int> mixins.
+ // int is the element type.
+
+ // From Iterable<int>:
+
+ Iterator<int> 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<int>(this);
}
+ // From Collection<int>:
+
void add(int value) {
throw new UnsupportedOperationException("Cannot add to immutable List.");
}
@@ -11173,78 +11125,56 @@ class _Int8ArrayImpl extends _ArrayBufferViewImpl implements Int8Array, List<int
throw new UnsupportedOperationException("Cannot add to immutable List.");
}
- void sort(int compare(int a, int b)) {
- throw new UnsupportedOperationException("Cannot sort immutable List.");
- }
+ void forEach(void f(int element)) => _Collections.forEach(this, f);
- void copyFrom(List<Object> src, int srcStart, int dstStart, int count) {
- throw new UnsupportedOperationException("This object is immutable.");
- }
+ Collection map(f(int element)) => _Collections.map(this, [], f);
- int indexOf(int element, [int start = 0]) {
- return _Lists.indexOf(this, element, start, this.length);
- }
+ Collection<int> filter(bool f(int element)) =>
+ _Collections.filter(this, <int>[], f);
- int lastIndexOf(int element, [int start = null]) {
- if (start === null) start = length - 1;
- return _Lists.lastIndexOf(this, element, start);
- }
+ bool every(bool f(int element)) => _Collections.every(this, f);
- int clear() {
- throw new UnsupportedOperationException("Cannot clear immutable List.");
- }
+ bool some(bool f(int element)) => _Collections.some(this, f);
- int removeLast() {
- throw new UnsupportedOperationException("Cannot removeLast on immutable List.");
- }
+ bool isEmpty() => this.length == 0;
- int last() {
- return this[length - 1];
- }
+ // From List<int>:
- void forEach(void f(int element)) {
- _Collections.forEach(this, f);
+ void sort(int compare(int a, int b)) {
+ throw new UnsupportedOperationException("Cannot sort immutable List.");
}
- Collection map(f(int element)) {
- return _Collections.map(this, [], f);
- }
+ int indexOf(int element, [int start = 0]) =>
+ _Lists.indexOf(this, element, start, this.length);
- Collection<int> filter(bool f(int element)) {
- return _Collections.filter(this, new List<int>(), f);
+ int lastIndexOf(int element, [int start]) {
+ if (start === null) start = length - 1;
+ return _Lists.lastIndexOf(this, element, start);
}
- bool every(bool f(int element)) {
- return _Collections.every(this, f);
- }
+ int last() => this[length - 1];
- bool some(bool f(int element)) {
- return _Collections.some(this, f);
+ int removeLast() {
+ throw new UnsupportedOperationException("Cannot removeLast on immutable List.");
}
- void setRange(int start, int length, List<int> from, [int startFrom]) {
+ // FIXME: implement these.
+ void setRange(int start, int rangeLength, List<int> from, [int startFrom]) {
throw new UnsupportedOperationException("Cannot setRange on immutable List.");
}
- void removeRange(int start, int length) {
+ void removeRange(int start, int rangeLength) {
throw new UnsupportedOperationException("Cannot removeRange on immutable List.");
}
- void insertRange(int start, int length, [int initialValue]) {
+ void insertRange(int start, int rangeLength, [int initialValue]) {
throw new UnsupportedOperationException("Cannot insertRange on immutable List.");
}
- List<int> getRange(int start, int length) {
- throw new NotImplementedException();
- }
-
- bool isEmpty() {
- return length == 0;
- }
+ List<int> getRange(int start, int rangeLength) =>
+ _Lists.getRange(this, start, rangeLength, <int>[]);
- Iterator<int> iterator() {
- return new _FixedSizeListIterator<int>(this);
- }
+ // -- end List<int> mixins.
void setElements(Object array, [int offset = null]) {
if (offset === null) {
@@ -11831,10 +11761,22 @@ class _MediaListImpl extends _DOMTypeBase implements MediaList {
String operator[](int index) => _wrap(_ptr[index]);
-
void operator[]=(int index, String value) {
throw new UnsupportedOperationException("Cannot assign element of immutable List.");
}
+ // -- start List<String> mixins.
+ // String is the element type.
+
+ // From Iterable<String>:
+
+ Iterator<String> 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<String>(this);
+ }
+
+ // From Collection<String>:
void add(String value) {
throw new UnsupportedOperationException("Cannot add to immutable List.");
@@ -11848,78 +11790,56 @@ class _MediaListImpl extends _DOMTypeBase implements MediaList {
throw new UnsupportedOperationException("Cannot add to immutable List.");
}
- void sort(int compare(String a, String b)) {
- throw new UnsupportedOperationException("Cannot sort immutable List.");
- }
+ void forEach(void f(String element)) => _Collections.forEach(this, f);
- void copyFrom(List<Object> src, int srcStart, int dstStart, int count) {
- throw new UnsupportedOperationException("This object is immutable.");
- }
+ Collection map(f(String element)) => _Collections.map(this, [], f);
- int indexOf(String element, [int start = 0]) {
- return _Lists.indexOf(this, element, start, this.length);
- }
+ Collection<String> filter(bool f(String element)) =>
+ _Collections.filter(this, <String>[], f);
- int lastIndexOf(String element, [int start = null]) {
- if (start === null) start = length - 1;
- return _Lists.lastIndexOf(this, element, start);
- }
+ bool every(bool f(String element)) => _Collections.every(this, f);
- int clear() {
- throw new UnsupportedOperationException("Cannot clear immutable List.");
- }
+ bool some(bool f(String element)) => _Collections.some(this, f);
- String removeLast() {
- throw new UnsupportedOperationException("Cannot removeLast on immutable List.");
- }
+ bool isEmpty() => this.length == 0;
- String last() {
- return this[length - 1];
- }
+ // From List<String>:
- void forEach(void f(String element)) {
- _Collections.forEach(this, f);
+ void sort(int compare(String a, String b)) {
+ throw new UnsupportedOperationException("Cannot sort immutable List.");
}
- Collection map(f(String element)) {
- return _Collections.map(this, [], f);
- }
+ int indexOf(String element, [int start = 0]) =>
+ _Lists.indexOf(this, element, start, this.length);
- Collection<String> filter(bool f(String element)) {
- return _Collections.filter(this, new List<String>(), f);
+ int lastIndexOf(String element, [int start]) {
+ if (start === null) start = length - 1;
+ return _Lists.lastIndexOf(this, element, start);
}
- bool every(bool f(String element)) {
- return _Collections.every(this, f);
- }
+ String last() => this[length - 1];
- bool some(bool f(String element)) {
- return _Collections.some(this, f);
+ String removeLast() {
+ throw new UnsupportedOperationException("Cannot removeLast on immutable List.");
}
- void setRange(int start, int length, List<String> from, [int startFrom]) {
+ // FIXME: implement these.
+ void setRange(int start, int rangeLength, List<String> from, [int startFrom]) {
throw new UnsupportedOperationException("Cannot setRange on immutable List.");
}
- void removeRange(int start, int length) {
+ void removeRange(int start, int rangeLength) {
throw new UnsupportedOperationException("Cannot removeRange on immutable List.");
}
- void insertRange(int start, int length, [String initialValue]) {
+ void insertRange(int start, int rangeLength, [String initialValue]) {
throw new UnsupportedOperationException("Cannot insertRange on immutable List.");
}
- List<String> getRange(int start, int length) {
- throw new NotImplementedException();
- }
+ List<String> getRange(int start, int rangeLength) =>
+ _Lists.getRange(this, start, rangeLength, <String>[]);
- bool isEmpty() {
- return length == 0;
- }
-
- Iterator<String> iterator() {
- return new _FixedSizeListIterator<String>(this);
- }
+ // -- end List<String> mixins.
void appendMedium(String newMedium) {
_ptr.appendMedium(_unwrap(newMedium));
@@ -12299,10 +12219,22 @@ class _NamedNodeMapImpl extends _DOMTypeBase implements NamedNodeMap {
Node operator[](int index) => _wrap(_ptr[index]);
-
void operator[]=(int index, Node value) {
throw new UnsupportedOperationException("Cannot assign element of immutable List.");
}
+ // -- start List<Node> mixins.
+ // Node is the element type.
+
+ // From Iterable<Node>:
+
+ Iterator<Node> 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<Node>(this);
+ }
+
+ // From Collection<Node>:
void add(Node value) {
throw new UnsupportedOperationException("Cannot add to immutable List.");
@@ -12312,82 +12244,60 @@ class _NamedNodeMapImpl extends _DOMTypeBase implements NamedNodeMap {
throw new UnsupportedOperationException("Cannot add to immutable List.");
}
- void addAll(Collection<Node> collection) {
- throw new UnsupportedOperationException("Cannot add to immutable List.");
- }
+ void addAll(Collection<Node> collection) {
+ throw new UnsupportedOperationException("Cannot add to immutable List.");
+ }
+
+ void forEach(void f(Node element)) => _Collections.forEach(this, f);
+
+ Collection map(f(Node element)) => _Collections.map(this, [], f);
+
+ Collection<Node> filter(bool f(Node element)) =>
+ _Collections.filter(this, <Node>[], f);
+
+ bool every(bool f(Node element)) => _Collections.every(this, f);
+
+ bool some(bool f(Node element)) => _Collections.some(this, f);
+
+ bool isEmpty() => this.length == 0;
+
+ // From List<Node>:
void sort(int compare(Node a, Node b)) {
throw new UnsupportedOperationException("Cannot sort immutable List.");
}
- void copyFrom(List<Object> src, int srcStart, int dstStart, int count) {
- throw new UnsupportedOperationException("This object is immutable.");
- }
-
- int indexOf(Node element, [int start = 0]) {
- return _Lists.indexOf(this, element, start, this.length);
- }
+ int indexOf(Node element, [int start = 0]) =>
+ _Lists.indexOf(this, element, start, this.length);
- int lastIndexOf(Node element, [int start = null]) {
+ int lastIndexOf(Node element, [int start]) {
if (start === null) start = length - 1;
return _Lists.lastIndexOf(this, element, start);
}
- int clear() {
- throw new UnsupportedOperationException("Cannot clear immutable List.");
- }
+ Node last() => this[length - 1];
Node removeLast() {
throw new UnsupportedOperationException("Cannot removeLast on immutable List.");
}
- Node last() {
- return this[length - 1];
- }
-
- void forEach(void f(Node element)) {
- _Collections.forEach(this, f);
- }
-
- Collection map(f(Node element)) {
- return _Collections.map(this, [], f);
- }
-
- Collection<Node> filter(bool f(Node element)) {
- return _Collections.filter(this, new List<Node>(), f);
- }
-
- bool every(bool f(Node element)) {
- return _Collections.every(this, f);
- }
-
- bool some(bool f(Node element)) {
- return _Collections.some(this, f);
- }
-
- void setRange(int start, int length, List<Node> from, [int startFrom]) {
+ // FIXME: implement these.
+ void setRange(int start, int rangeLength, List<Node> from, [int startFrom]) {
throw new UnsupportedOperationException("Cannot setRange on immutable List.");
}
- void removeRange(int start, int length) {
+ void removeRange(int start, int rangeLength) {
throw new UnsupportedOperationException("Cannot removeRange on immutable List.");
}
- void insertRange(int start, int length, [Node initialValue]) {
+ void insertRange(int start, int rangeLength, [Node initialValue]) {
throw new UnsupportedOperationException("Cannot insertRange on immutable List.");
}
- List<Node> getRange(int start, int length) {
- throw new NotImplementedException();
- }
-
- bool isEmpty() {
- return length == 0;
- }
+ List<Node> getRange(int start, int rangeLength) =>
+ _Lists.getRange(this, start, rangeLength, <Node>[]);
- Iterator<Node> iterator() {
- return new _FixedSizeListIterator<Node>(this);
- }
+ // -- end List<Node> mixins.
Node getNamedItem(String name) {
return _wrap(_ptr.getNamedItem(_unwrap(name)));
@@ -12515,11 +12425,11 @@ class _ChildNodeListLazy implements NodeList {
}
_NodeImpl removeLast() {
- final last = last();
- if (last != null) {
- _this.$dom_removeChild(last);
+ final result = last();
+ if (result != null) {
+ _this.$dom_removeChild(result);
}
- return last;
+ return result;
}
void clear() {
@@ -12561,21 +12471,21 @@ class _ChildNodeListLazy implements NodeList {
int lastIndexOf(Node element, [int start = 0]) =>
_Lists.lastIndexOf(this, element, start);
- // FIXME: implement thesee.
- void setRange(int start, int length, List<Node> from, [int startFrom]) {
+ // FIXME: implement these.
+ void setRange(int start, int rangeLength, List<Node> from, [int startFrom]) {
throw new UnsupportedOperationException(
"Cannot setRange on immutable List.");
}
- void removeRange(int start, int length) {
+ void removeRange(int start, int rangeLength) {
throw new UnsupportedOperationException(
"Cannot removeRange on immutable List.");
}
- void insertRange(int start, int length, [Node initialValue]) {
+ void insertRange(int start, int rangeLength, [Node initialValue]) {
throw new UnsupportedOperationException(
"Cannot insertRange on immutable List.");
}
- NodeList getRange(int start, int length) =>
- new _NodeListWrapper(_Lists.getRange(this, start, length, <Node>[]));
+ NodeList getRange(int start, int rangeLength) =>
+ new _NodeListWrapper(_Lists.getRange(this, start, rangeLength, <Node>[]));
// -- end List<Node> mixins.
@@ -12762,15 +12672,17 @@ class _ListWrapper<E> implements List<E> {
E last() => _list.last();
- List<E> getRange(int start, int length) => _list.getRange(start, length);
+ List<E> getRange(int start, int rangeLength) =>
+ _list.getRange(start, rangeLength);
- void setRange(int start, int length, List<E> from, [int startFrom = 0]) =>
- _list.setRange(start, length, from, startFrom);
+ void setRange(int start, int rangeLength, List<E> from, [int startFrom = 0])
+ => _list.setRange(start, rangeLength, from, startFrom);
- void removeRange(int start, int length) => _list.removeRange(start, length);
+ void removeRange(int start, int rangeLength) =>
+ _list.removeRange(start, rangeLength);
- void insertRange(int start, int length, [E initialValue = null]) =>
- _list.insertRange(start, length, initialValue);
+ void insertRange(int start, int rangeLength, [E initialValue = null]) =>
+ _list.insertRange(start, rangeLength, initialValue);
E get first() => _list[0];
}
@@ -12785,8 +12697,8 @@ class _NodeListWrapper extends _ListWrapper<Node> implements NodeList {
NodeList filter(bool f(Node element)) =>
new _NodeListWrapper(_list.filter(f));
- NodeList getRange(int start, int length) =>
- new _NodeListWrapper(_list.getRange(start, length));
+ NodeList getRange(int start, int rangeLength) =>
+ new _NodeListWrapper(_list.getRange(start, rangeLength));
}
class _NodeListImpl extends _DOMTypeBase implements NodeList {
@@ -12821,11 +12733,11 @@ class _NodeListImpl extends _DOMTypeBase implements NodeList {
}
_NodeImpl removeLast() {
- final last = this.last();
- if (last != null) {
- _parent.$dom_removeChild(last);
+ final result = this.last();
+ if (result != null) {
+ _parent.$dom_removeChild(result);
}
- return last;
+ return result;
}
void clear() {
@@ -12865,17 +12777,17 @@ class _NodeListImpl extends _DOMTypeBase implements NodeList {
Node get first() => this[0];
// FIXME: implement thesee.
- void setRange(int start, int length, List<Node> from, [int startFrom]) {
+ void setRange(int start, int rangeLength, List<Node> from, [int startFrom]) {
throw new UnsupportedOperationException("Cannot setRange on immutable List.");
}
- void removeRange(int start, int length) {
+ void removeRange(int start, int rangeLength) {
throw new UnsupportedOperationException("Cannot removeRange on immutable List.");
}
- void insertRange(int start, int length, [Node initialValue]) {
+ void insertRange(int start, int rangeLength, [Node initialValue]) {
throw new UnsupportedOperationException("Cannot insertRange on immutable List.");
}
- NodeList getRange(int start, int length) =>
- new _NodeListWrapper(_Lists.getRange(this, start, length, <Node>[]));
+ NodeList getRange(int start, int rangeLength) =>
+ new _NodeListWrapper(_Lists.getRange(this, start, rangeLength, <Node>[]));
// -- end List<Node> mixins.
@@ -12885,7 +12797,6 @@ class _NodeListImpl extends _DOMTypeBase implements NodeList {
Node operator[](int index) => _wrap(_ptr[index]);
-
}
class _NodeSelectorImpl extends _DOMTypeBase implements NodeSelector {
@@ -14408,15 +14319,15 @@ class _SVGElementImpl extends _ElementImpl implements SVGElement {
String get outerHTML() {
final container = new Element.tag("div");
- final SVGElement clone = this.clone(true);
- container.elements.add(clone);
+ final SVGElement cloned = this.clone(true);
+ container.elements.add(cloned);
return container.innerHTML;
}
String get innerHTML() {
final container = new Element.tag("div");
- final SVGElement clone = this.clone(true);
- container.elements.addAll(clone.elements);
+ final SVGElement cloned = this.clone(true);
+ container.elements.addAll(cloned.elements);
return container.innerHTML;
}
@@ -18583,10 +18494,22 @@ class _StyleSheetListImpl extends _DOMTypeBase implements StyleSheetList {
StyleSheet operator[](int index) => _wrap(_ptr[index]);
-
void operator[]=(int index, StyleSheet value) {
throw new UnsupportedOperationException("Cannot assign element of immutable List.");
}
+ // -- start List<StyleSheet> mixins.
+ // StyleSheet is the element type.
+
+ // From Iterable<StyleSheet>:
+
+ Iterator<StyleSheet> 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<StyleSheet>(this);
+ }
+
+ // From Collection<StyleSheet>:
void add(StyleSheet value) {
throw new UnsupportedOperationException("Cannot add to immutable List.");
@@ -18600,78 +18523,56 @@ class _StyleSheetListImpl extends _DOMTypeBase implements StyleSheetList {
throw new UnsupportedOperationException("Cannot add to immutable List.");
}
- void sort(int compare(StyleSheet a, StyleSheet b)) {
- throw new UnsupportedOperationException("Cannot sort immutable List.");
- }
+ void forEach(void f(StyleSheet element)) => _Collections.forEach(this, f);
- void copyFrom(List<Object> src, int srcStart, int dstStart, int count) {
- throw new UnsupportedOperationException("This object is immutable.");
- }
+ Collection map(f(StyleSheet element)) => _Collections.map(this, [], f);
- int indexOf(StyleSheet element, [int start = 0]) {
- return _Lists.indexOf(this, element, start, this.length);
- }
+ Collection<StyleSheet> filter(bool f(StyleSheet element)) =>
+ _Collections.filter(this, <StyleSheet>[], f);
- int lastIndexOf(StyleSheet element, [int start = null]) {
- if (start === null) start = length - 1;
- return _Lists.lastIndexOf(this, element, start);
- }
+ bool every(bool f(StyleSheet element)) => _Collections.every(this, f);
- int clear() {
- throw new UnsupportedOperationException("Cannot clear immutable List.");
- }
+ bool some(bool f(StyleSheet element)) => _Collections.some(this, f);
- StyleSheet removeLast() {
- throw new UnsupportedOperationException("Cannot removeLast on immutable List.");
- }
+ bool isEmpty() => this.length == 0;
- StyleSheet last() {
- return this[length - 1];
- }
+ // From List<StyleSheet>:
- void forEach(void f(StyleSheet element)) {
- _Collections.forEach(this, f);
+ void sort(int compare(StyleSheet a, StyleSheet b)) {
+ throw new UnsupportedOperationException("Cannot sort immutable List.");
}
- Collection map(f(StyleSheet element)) {
- return _Collections.map(this, [], f);
- }
+ int indexOf(StyleSheet element, [int start = 0]) =>
+ _Lists.indexOf(this, element, start, this.length);
- Collection<StyleSheet> filter(bool f(StyleSheet element)) {
- return _Collections.filter(this, new List<StyleSheet>(), f);
+ int lastIndexOf(StyleSheet element, [int start]) {
+ if (start === null) start = length - 1;
+ return _Lists.lastIndexOf(this, element, start);
}
- bool every(bool f(StyleSheet element)) {
- return _Collections.every(this, f);
- }
+ StyleSheet last() => this[length - 1];
- bool some(bool f(StyleSheet element)) {
- return _Collections.some(this, f);
+ StyleSheet removeLast() {
+ throw new UnsupportedOperationException("Cannot removeLast on immutable List.");
}
- void setRange(int start, int length, List<StyleSheet> from, [int startFrom]) {
+ // FIXME: implement these.
+ void setRange(int start, int rangeLength, List<StyleSheet> from, [int startFrom]) {
throw new UnsupportedOperationException("Cannot setRange on immutable List.");
}
- void removeRange(int start, int length) {
+ void removeRange(int start, int rangeLength) {
throw new UnsupportedOperationException("Cannot removeRange on immutable List.");
}
- void insertRange(int start, int length, [StyleSheet initialValue]) {
+ void insertRange(int start, int rangeLength, [StyleSheet initialValue]) {
throw new UnsupportedOperationException("Cannot insertRange on immutable List.");
}
- List<StyleSheet> getRange(int start, int length) {
- throw new NotImplementedException();
- }
-
- bool isEmpty() {
- return length == 0;
- }
+ List<StyleSheet> getRange(int start, int rangeLength) =>
+ _Lists.getRange(this, start, rangeLength, <StyleSheet>[]);
- Iterator<StyleSheet> iterator() {
- return new _FixedSizeListIterator<StyleSheet>(this);
- }
+ // -- end List<StyleSheet> mixins.
StyleSheet item(int index) {
return _wrap(_ptr.item(_unwrap(index)));
@@ -19341,10 +19242,22 @@ class _TouchListImpl extends _DOMTypeBase implements TouchList {
Touch operator[](int index) => _wrap(_ptr[index]);
-
void operator[]=(int index, Touch value) {
throw new UnsupportedOperationException("Cannot assign element of immutable List.");
}
+ // -- start List<Touch> mixins.
+ // Touch is the element type.
+
+ // From Iterable<Touch>:
+
+ Iterator<Touch> 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<Touch>(this);
+ }
+
+ // From Collection<Touch>:
void add(Touch value) {
throw new UnsupportedOperationException("Cannot add to immutable List.");
@@ -19358,78 +19271,56 @@ class _TouchListImpl extends _DOMTypeBase implements TouchList {
throw new UnsupportedOperationException("Cannot add to immutable List.");
}
- void sort(int compare(Touch a, Touch b)) {
- throw new UnsupportedOperationException("Cannot sort immutable List.");
- }
+ void forEach(void f(Touch element)) => _Collections.forEach(this, f);
- void copyFrom(List<Object> src, int srcStart, int dstStart, int count) {
- throw new UnsupportedOperationException("This object is immutable.");
- }
+ Collection map(f(Touch element)) => _Collections.map(this, [], f);
- int indexOf(Touch element, [int start = 0]) {
- return _Lists.indexOf(this, element, start, this.length);
- }
+ Collection<Touch> filter(bool f(Touch element)) =>
+ _Collections.filter(this, <Touch>[], f);
- int lastIndexOf(Touch element, [int start = null]) {
- if (start === null) start = length - 1;
- return _Lists.lastIndexOf(this, element, start);
- }
+ bool every(bool f(Touch element)) => _Collections.every(this, f);
- int clear() {
- throw new UnsupportedOperationException("Cannot clear immutable List.");
- }
+ bool some(bool f(Touch element)) => _Collections.some(this, f);
- Touch removeLast() {
- throw new UnsupportedOperationException("Cannot removeLast on immutable List.");
- }
+ bool isEmpty() => this.length == 0;
- Touch last() {
- return this[length - 1];
- }
+ // From List<Touch>:
- void forEach(void f(Touch element)) {
- _Collections.forEach(this, f);
+ void sort(int compare(Touch a, Touch b)) {
+ throw new UnsupportedOperationException("Cannot sort immutable List.");
}
- Collection map(f(Touch element)) {
- return _Collections.map(this, [], f);
- }
+ int indexOf(Touch element, [int start = 0]) =>
+ _Lists.indexOf(this, element, start, this.length);
- Collection<Touch> filter(bool f(Touch element)) {
- return _Collections.filter(this, new List<Touch>(), f);
+ int lastIndexOf(Touch element, [int start]) {
+ if (start === null) start = length - 1;
+ return _Lists.lastIndexOf(this, element, start);
}
- bool every(bool f(Touch element)) {
- return _Collections.every(this, f);
- }
+ Touch last() => this[length - 1];
- bool some(bool f(Touch element)) {
- return _Collections.some(this, f);
+ Touch removeLast() {
+ throw new UnsupportedOperationException("Cannot removeLast on immutable List.");
}
- void setRange(int start, int length, List<Touch> from, [int startFrom]) {
+ // FIXME: implement these.
+ void setRange(int start, int rangeLength, List<Touch> from, [int startFrom]) {
throw new UnsupportedOperationException("Cannot setRange on immutable List.");
}
- void removeRange(int start, int length) {
+ void removeRange(int start, int rangeLength) {
throw new UnsupportedOperationException("Cannot removeRange on immutable List.");
}
- void insertRange(int start, int length, [Touch initialValue]) {
+ void insertRange(int start, int rangeLength, [Touch initialValue]) {
throw new UnsupportedOperationException("Cannot insertRange on immutable List.");
}
- List<Touch> getRange(int start, int length) {
- throw new NotImplementedException();
- }
-
- bool isEmpty() {
- return length == 0;
- }
+ List<Touch> getRange(int start, int rangeLength) =>
+ _Lists.getRange(this, start, rangeLength, <Touch>[]);
- Iterator<Touch> iterator() {
- return new _FixedSizeListIterator<Touch>(this);
- }
+ // -- end List<Touch> mixins.
Touch item(int index) {
return _wrap(_ptr.item(_unwrap(index)));
@@ -19568,11 +19459,23 @@ class _Uint16ArrayImpl extends _ArrayBufferViewImpl implements Uint16Array, List
int operator[](int index) => _wrap(_ptr[index]);
-
void operator[]=(int index, int value) {
- throw new UnsupportedOperationException("Cannot assign element of immutable List.");
+ return _ptr[index] = _unwrap(value);
+ }
+ // -- start List<int> mixins.
+ // int is the element type.
+
+ // From Iterable<int>:
+
+ Iterator<int> 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<int>(this);
}
+ // From Collection<int>:
+
void add(int value) {
throw new UnsupportedOperationException("Cannot add to immutable List.");
}
@@ -19585,78 +19488,56 @@ class _Uint16ArrayImpl extends _ArrayBufferViewImpl implements Uint16Array, List
throw new UnsupportedOperationException("Cannot add to immutable List.");
}
- void sort(int compare(int a, int b)) {
- throw new UnsupportedOperationException("Cannot sort immutable List.");
- }
+ void forEach(void f(int element)) => _Collections.forEach(this, f);
- void copyFrom(List<Object> src, int srcStart, int dstStart, int count) {
- throw new UnsupportedOperationException("This object is immutable.");
- }
+ Collection map(f(int element)) => _Collections.map(this, [], f);
- int indexOf(int element, [int start = 0]) {
- return _Lists.indexOf(this, element, start, this.length);
- }
+ Collection<int> filter(bool f(int element)) =>
+ _Collections.filter(this, <int>[], f);
- int lastIndexOf(int element, [int start = null]) {
- if (start === null) start = length - 1;
- return _Lists.lastIndexOf(this, element, start);
- }
+ bool every(bool f(int element)) => _Collections.every(this, f);
- int clear() {
- throw new UnsupportedOperationException("Cannot clear immutable List.");
- }
+ bool some(bool f(int element)) => _Collections.some(this, f);
- int removeLast() {
- throw new UnsupportedOperationException("Cannot removeLast on immutable List.");
- }
+ bool isEmpty() => this.length == 0;
- int last() {
- return this[length - 1];
- }
+ // From List<int>:
- void forEach(void f(int element)) {
- _Collections.forEach(this, f);
+ void sort(int compare(int a, int b)) {
+ throw new UnsupportedOperationException("Cannot sort immutable List.");
}
- Collection map(f(int element)) {
- return _Collections.map(this, [], f);
- }
+ int indexOf(int element, [int start = 0]) =>
+ _Lists.indexOf(this, element, start, this.length);
- Collection<int> filter(bool f(int element)) {
- return _Collections.filter(this, new List<int>(), f);
+ int lastIndexOf(int element, [int start]) {
+ if (start === null) start = length - 1;
+ return _Lists.lastIndexOf(this, element, start);
}
- bool every(bool f(int element)) {
- return _Collections.every(this, f);
- }
+ int last() => this[length - 1];
- bool some(bool f(int element)) {
- return _Collections.some(this, f);
+ int removeLast() {
+ throw new UnsupportedOperationException("Cannot removeLast on immutable List.");
}
- void setRange(int start, int length, List<int> from, [int startFrom]) {
+ // FIXME: implement these.
+ void setRange(int start, int rangeLength, List<int> from, [int startFrom]) {
throw new UnsupportedOperationException("Cannot setRange on immutable List.");
}
- void removeRange(int start, int length) {
+ void removeRange(int start, int rangeLength) {
throw new UnsupportedOperationException("Cannot removeRange on immutable List.");
}
- void insertRange(int start, int length, [int initialValue]) {
+ void insertRange(int start, int rangeLength, [int initialValue]) {
throw new UnsupportedOperationException("Cannot insertRange on immutable List.");
}
- List<int> getRange(int start, int length) {
- throw new NotImplementedException();
- }
-
- bool isEmpty() {
- return length == 0;
- }
+ List<int> getRange(int start, int rangeLength) =>
+ _Lists.getRange(this, start, rangeLength, <int>[]);
- Iterator<int> iterator() {
- return new _FixedSizeListIterator<int>(this);
- }
+ // -- end List<int> mixins.
void setElements(Object array, [int offset = null]) {
if (offset === null) {
@@ -19684,11 +19565,23 @@ class _Uint32ArrayImpl extends _ArrayBufferViewImpl implements Uint32Array, List
int operator[](int index) => _wrap(_ptr[index]);
-
void operator[]=(int index, int value) {
- throw new UnsupportedOperationException("Cannot assign element of immutable List.");
+ return _ptr[index] = _unwrap(value);
+ }
+ // -- start List<int> mixins.
+ // int is the element type.
+
+ // From Iterable<int>:
+
+ Iterator<int> 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<int>(this);
}
+ // From Collection<int>:
+
void add(int value) {
throw new UnsupportedOperationException("Cannot add to immutable List.");
}
@@ -19701,78 +19594,56 @@ class _Uint32ArrayImpl extends _ArrayBufferViewImpl implements Uint32Array, List
throw new UnsupportedOperationException("Cannot add to immutable List.");
}
- void sort(int compare(int a, int b)) {
- throw new UnsupportedOperationException("Cannot sort immutable List.");
- }
+ void forEach(void f(int element)) => _Collections.forEach(this, f);
- void copyFrom(List<Object> src, int srcStart, int dstStart, int count) {
- throw new UnsupportedOperationException("This object is immutable.");
- }
+ Collection map(f(int element)) => _Collections.map(this, [], f);
- int indexOf(int element, [int start = 0]) {
- return _Lists.indexOf(this, element, start, this.length);
- }
+ Collection<int> filter(bool f(int element)) =>
+ _Collections.filter(this, <int>[], f);
- int lastIndexOf(int element, [int start = null]) {
- if (start === null) start = length - 1;
- return _Lists.lastIndexOf(this, element, start);
- }
+ bool every(bool f(int element)) => _Collections.every(this, f);
- int clear() {
- throw new UnsupportedOperationException("Cannot clear immutable List.");
- }
+ bool some(bool f(int element)) => _Collections.some(this, f);
- int removeLast() {
- throw new UnsupportedOperationException("Cannot removeLast on immutable List.");
- }
+ bool isEmpty() => this.length == 0;
- int last() {
- return this[length - 1];
- }
+ // From List<int>:
- void forEach(void f(int element)) {
- _Collections.forEach(this, f);
+ void sort(int compare(int a, int b)) {
+ throw new UnsupportedOperationException("Cannot sort immutable List.");
}
- Collection map(f(int element)) {
- return _Collections.map(this, [], f);
- }
+ int indexOf(int element, [int start = 0]) =>
+ _Lists.indexOf(this, element, start, this.length);
- Collection<int> filter(bool f(int element)) {
- return _Collections.filter(this, new List<int>(), f);
+ int lastIndexOf(int element, [int start]) {
+ if (start === null) start = length - 1;
+ return _Lists.lastIndexOf(this, element, start);
}
- bool every(bool f(int element)) {
- return _Collections.every(this, f);
- }
+ int last() => this[length - 1];
- bool some(bool f(int element)) {
- return _Collections.some(this, f);
+ int removeLast() {
+ throw new UnsupportedOperationException("Cannot removeLast on immutable List.");
}
- void setRange(int start, int length, List<int> from, [int startFrom]) {
+ // FIXME: implement these.
+ void setRange(int start, int rangeLength, List<int> from, [int startFrom]) {
throw new UnsupportedOperationException("Cannot setRange on immutable List.");
}
- void removeRange(int start, int length) {
+ void removeRange(int start, int rangeLength) {
throw new UnsupportedOperationException("Cannot removeRange on immutable List.");
}
- void insertRange(int start, int length, [int initialValue]) {
+ void insertRange(int start, int rangeLength, [int initialValue]) {
throw new UnsupportedOperationException("Cannot insertRange on immutable List.");
}
- List<int> getRange(int start, int length) {
- throw new NotImplementedException();
- }
-
- bool isEmpty() {
- return length == 0;
- }
+ List<int> getRange(int start, int rangeLength) =>
+ _Lists.getRange(this, start, rangeLength, <int>[]);
- Iterator<int> iterator() {
- return new _FixedSizeListIterator<int>(this);
- }
+ // -- end List<int> mixins.
void setElements(Object array, [int offset = null]) {
if (offset === null) {
@@ -19800,11 +19671,23 @@ class _Uint8ArrayImpl extends _ArrayBufferViewImpl implements Uint8Array, List<i
int operator[](int index) => _wrap(_ptr[index]);
-
void operator[]=(int index, int value) {
- throw new UnsupportedOperationException("Cannot assign element of immutable List.");
+ return _ptr[index] = _unwrap(value);
+ }
+ // -- start List<int> mixins.
+ // int is the element type.
+
+ // From Iterable<int>:
+
+ Iterator<int> 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<int>(this);
}
+ // From Collection<int>:
+
void add(int value) {
throw new UnsupportedOperationException("Cannot add to immutable List.");
}
@@ -19817,78 +19700,56 @@ class _Uint8ArrayImpl extends _ArrayBufferViewImpl implements Uint8Array, List<i
throw new UnsupportedOperationException("Cannot add to immutable List.");
}
- void sort(int compare(int a, int b)) {
- throw new UnsupportedOperationException("Cannot sort immutable List.");
- }
+ void forEach(void f(int element)) => _Collections.forEach(this, f);
- void copyFrom(List<Object> src, int srcStart, int dstStart, int count) {
- throw new UnsupportedOperationException("This object is immutable.");
- }
+ Collection map(f(int element)) => _Collections.map(this, [], f);
- int indexOf(int element, [int start = 0]) {
- return _Lists.indexOf(this, element, start, this.length);
- }
+ Collection<int> filter(bool f(int element)) =>
+ _Collections.filter(this, <int>[], f);
- int lastIndexOf(int element, [int start = null]) {
- if (start === null) start = length - 1;
- return _Lists.lastIndexOf(this, element, start);
- }
+ bool every(bool f(int element)) => _Collections.every(this, f);
- int clear() {
- throw new UnsupportedOperationException("Cannot clear immutable List.");
- }
+ bool some(bool f(int element)) => _Collections.some(this, f);
- int removeLast() {
- throw new UnsupportedOperationException("Cannot removeLast on immutable List.");
- }
+ bool isEmpty() => this.length == 0;
- int last() {
- return this[length - 1];
- }
+ // From List<int>:
- void forEach(void f(int element)) {
- _Collections.forEach(this, f);
+ void sort(int compare(int a, int b)) {
+ throw new UnsupportedOperationException("Cannot sort immutable List.");
}
- Collection map(f(int element)) {
- return _Collections.map(this, [], f);
- }
+ int indexOf(int element, [int start = 0]) =>
+ _Lists.indexOf(this, element, start, this.length);
- Collection<int> filter(bool f(int element)) {
- return _Collections.filter(this, new List<int>(), f);
+ int lastIndexOf(int element, [int start]) {
+ if (start === null) start = length - 1;
+ return _Lists.lastIndexOf(this, element, start);
}
- bool every(bool f(int element)) {
- return _Collections.every(this, f);
- }
+ int last() => this[length - 1];
- bool some(bool f(int element)) {
- return _Collections.some(this, f);
+ int removeLast() {
+ throw new UnsupportedOperationException("Cannot removeLast on immutable List.");
}
- void setRange(int start, int length, List<int> from, [int startFrom]) {
+ // FIXME: implement these.
+ void setRange(int start, int rangeLength, List<int> from, [int startFrom]) {
throw new UnsupportedOperationException("Cannot setRange on immutable List.");
}
- void removeRange(int start, int length) {
+ void removeRange(int start, int rangeLength) {
throw new UnsupportedOperationException("Cannot removeRange on immutable List.");
}
- void insertRange(int start, int length, [int initialValue]) {
+ void insertRange(int start, int rangeLength, [int initialValue]) {
throw new UnsupportedOperationException("Cannot insertRange on immutable List.");
}
- List<int> getRange(int start, int length) {
- throw new NotImplementedException();
- }
-
- bool isEmpty() {
- return length == 0;
- }
+ List<int> getRange(int start, int rangeLength) =>
+ _Lists.getRange(this, start, rangeLength, <int>[]);
- Iterator<int> iterator() {
- return new _FixedSizeListIterator<int>(this);
- }
+ // -- end List<int> mixins.
void setElements(Object array, [int offset = null]) {
if (offset === null) {
@@ -37491,25 +37352,25 @@ class _TypedArrayFactoryProvider {
static Uint32Array _U32(arg) => _wrap(new dom.Uint32Array(arg));
static Uint8ClampedArray _U8C(arg) => _wrap(new dom.Uint8ClampedArray(arg));
- static Float32Array _F32_2(arg1, arg2) => _wrap(new dom.Float32Array(arg1, arg2));
- static Float64Array _F64_2(arg1, arg2) => _wrap(new dom.Float64Array(arg1, arg2));
- static Int8Array _I8_2(arg1, arg2) => _wrap(new dom.Int8Array(arg1, arg2));
- static Int16Array _I16_2(arg1, arg2) => _wrap(new dom.Int16Array(arg1, arg2));
- static Int32Array _I32_2(arg1, arg2) => _wrap(new dom.Int32Array(arg1, arg2));
- static Uint8Array _U8_2(arg1, arg2) => _wrap(new dom.Uint8Array(arg1, arg2));
- static Uint16Array _U16_2(arg1, arg2) => _wrap(new dom.Uint16Array(arg1, arg2));
- static Uint32Array _U32_2(arg1, arg2) => _wrap(new dom.Uint32Array(arg1, arg2));
- static Uint8ClampedArray _U8C_2(arg1, arg2) => _wrap(new dom.Uint8ClampedArray(arg1, arg2));
-
- static Float32Array _F32_3(arg1, arg2, arg3) => _wrap(new dom.Float32Array(arg1, arg2, arg3));
- static Float64Array _F64_3(arg1, arg2, arg3) => _wrap(new dom.Float64Array(arg1, arg2, arg3));
- static Int8Array _I8_3(arg1, arg2, arg3) => _wrap(new dom.Int8Array(arg1, arg2, arg3));
- static Int16Array _I16_3(arg1, arg2, arg3) => _wrap(new dom.Int16Array(arg1, arg2, arg3));
- static Int32Array _I32_3(arg1, arg2, arg3) => _wrap(new dom.Int32Array(arg1, arg2, arg3));
- static Uint8Array _U8_3(arg1, arg2, arg3) => _wrap(new dom.Uint8Array(arg1, arg2, arg3));
- static Uint16Array _U16_3(arg1, arg2, arg3) => _wrap(new dom.Uint16Array(arg1, arg2, arg3));
- static Uint32Array _U32_3(arg1, arg2, arg3) => _wrap(new dom.Uint32Array(arg1, arg2, arg3));
- static Uint8ClampedArray _U8C_3(arg1, arg2, arg3) => _wrap(new dom.Uint8ClampedArray(arg1, arg2, arg3));
+ static Float32Array _F32_2(buffer, byteOffset) => _wrap(new dom.Float32Array.fromBuffer(_unwrap(buffer), byteOffset));
+ static Float64Array _F64_2(buffer, byteOffset) => _wrap(new dom.Float64Array.fromBuffer(_unwrap(buffer), byteOffset));
+ static Int8Array _I8_2(buffer, byteOffset) => _wrap(new dom.Int8Array.fromBuffer(_unwrap(buffer), byteOffset));
+ static Int16Array _I16_2(buffer, byteOffset) => _wrap(new dom.Int16Array.fromBuffer(_unwrap(buffer), byteOffset));
+ static Int32Array _I32_2(buffer, byteOffset) => _wrap(new dom.Int32Array.fromBuffer(_unwrap(buffer), byteOffset));
+ static Uint8Array _U8_2(buffer, byteOffset) => _wrap(new dom.Uint8Array.fromBuffer(_unwrap(buffer), byteOffset));
+ static Uint16Array _U16_2(buffer, byteOffset) => _wrap(new dom.Uint16Array.fromBuffer(_unwrap(buffer), byteOffset));
+ static Uint32Array _U32_2(buffer, byteOffset) => _wrap(new dom.Uint32Array.fromBuffer(_unwrap(buffer), byteOffset));
+ static Uint8ClampedArray _U8C_2(buffer, byteOffset) => _wrap(new dom.Uint8ClampedArray.fromBuffer(_unwrap(buffer), byteOffset));
+
+ static Float32Array _F32_3(buffer, byteOffset, length) => _wrap(new dom.Float32Array.fromBuffer(_unwrap(buffer), byteOffset, length));
+ static Float64Array _F64_3(buffer, byteOffset, length) => _wrap(new dom.Float64Array.fromBuffer(_unwrap(buffer), byteOffset, length));
+ static Int8Array _I8_3(buffer, byteOffset, length) => _wrap(new dom.Int8Array.fromBuffer(_unwrap(buffer), byteOffset, length));
+ static Int16Array _I16_3(buffer, byteOffset, length) => _wrap(new dom.Int16Array.fromBuffer(_unwrap(buffer), byteOffset, length));
+ static Int32Array _I32_3(buffer, byteOffset, length) => _wrap(new dom.Int32Array.fromBuffer(_unwrap(buffer), byteOffset, length));
+ static Uint8Array _U8_3(buffer, byteOffset, length) => _wrap(new dom.Uint8Array.fromBuffer(_unwrap(buffer), byteOffset, length));
+ static Uint16Array _U16_3(buffer, byteOffset, length) => _wrap(new dom.Uint16Array.fromBuffer(_unwrap(buffer), byteOffset, length));
+ static Uint32Array _U32_3(buffer, byteOffset, length) => _wrap(new dom.Uint32Array.fromBuffer(_unwrap(buffer), byteOffset, length));
+ static Uint8ClampedArray _U8C_3(buffer, byteOffset, length) => _wrap(new dom.Uint8ClampedArray.fromBuffer(_unwrap(buffer), byteOffset, length));
static ensureNative(List list) => list; // TODO: make sure.
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698