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

Side by Side Diff: lib/html/frog/html_frog.dart

Issue 9963029: Fix some warnings. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Reupload (due to error messages during upload) 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:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « lib/html/dartium/html_dartium.dart ('k') | lib/isolate/frog/isolateimpl.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 #library('html'); 1 #library('html');
2 2
3 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 3 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
4 // for details. All rights reserved. Use of this source code is governed by a 4 // for details. All rights reserved. Use of this source code is governed by a
5 // BSD-style license that can be found in the LICENSE file. 5 // BSD-style license that can be found in the LICENSE file.
6 6
7 // DO NOT EDIT 7 // DO NOT EDIT
8 // Auto-generated dart:html library. 8 // Auto-generated dart:html library.
9 9
10 10
(...skipping 3804 matching lines...) Expand 10 before | Expand all | Expand 10 after
3815 } 3815 }
3816 3816
3817 int indexOf(int element, [int start = 0]) => 3817 int indexOf(int element, [int start = 0]) =>
3818 _Lists.indexOf(this, element, start, this.length); 3818 _Lists.indexOf(this, element, start, this.length);
3819 3819
3820 int lastIndexOf(int element, [int start = 0]) => 3820 int lastIndexOf(int element, [int start = 0]) =>
3821 _Lists.lastIndexOf(this, element, start); 3821 _Lists.lastIndexOf(this, element, start);
3822 3822
3823 int last() => this[length - 1]; 3823 int last() => this[length - 1];
3824 3824
3825 // FIXME: implement thesee. 3825 // FIXME: implement these.
3826 void setRange(int start, int length, List<int> from, [int startFrom]) { 3826 void setRange(int start, int rangeLength, List<int> from, [int startFrom]) {
3827 throw new UnsupportedOperationException("Cannot setRange on immutable List." ); 3827 throw new UnsupportedOperationException("Cannot setRange on immutable List." );
3828 } 3828 }
3829 void removeRange(int start, int length) { 3829 void removeRange(int start, int rangeLength) {
3830 throw new UnsupportedOperationException("Cannot removeRange on immutable Lis t."); 3830 throw new UnsupportedOperationException("Cannot removeRange on immutable Lis t.");
3831 } 3831 }
3832 void insertRange(int start, int length, [int initialValue]) { 3832 void insertRange(int start, int rangeLength, [int initialValue]) {
3833 throw new UnsupportedOperationException("Cannot insertRange on immutable Lis t."); 3833 throw new UnsupportedOperationException("Cannot insertRange on immutable Lis t.");
3834 } 3834 }
3835 List<int> getRange(int start, int length) => 3835 List<int> getRange(int start, int rangeLength) =>
3836 _Lists.getRange(this, start, length, <int>[]); 3836 _Lists.getRange(this, start, rangeLength, <int>[]);
3837 3837
3838 // -- end List<int> mixins. 3838 // -- end List<int> mixins.
3839 } 3839 }
3840 3840
3841 class _CanvasRenderingContextImpl implements CanvasRenderingContext native "*Can vasRenderingContext" { 3841 class _CanvasRenderingContextImpl implements CanvasRenderingContext native "*Can vasRenderingContext" {
3842 3842
3843 final _CanvasElementImpl canvas; 3843 final _CanvasElementImpl canvas;
3844 } 3844 }
3845 3845
3846 class _CanvasRenderingContext2DImpl extends _CanvasRenderingContextImpl implemen ts CanvasRenderingContext2D native "*CanvasRenderingContext2D" { 3846 class _CanvasRenderingContext2DImpl extends _CanvasRenderingContextImpl implemen ts CanvasRenderingContext2D native "*CanvasRenderingContext2D" {
(...skipping 1096 matching lines...) Expand 10 before | Expand all | Expand 10 after
4943 } 4943 }
4944 4944
4945 void sort(int compare(Element a, Element b)) { 4945 void sort(int compare(Element a, Element b)) {
4946 throw const UnsupportedOperationException('TODO(jacobr): should we impl?'); 4946 throw const UnsupportedOperationException('TODO(jacobr): should we impl?');
4947 } 4947 }
4948 4948
4949 void copyFrom(List<Object> src, int srcStart, int dstStart, int count) { 4949 void copyFrom(List<Object> src, int srcStart, int dstStart, int count) {
4950 throw const NotImplementedException(); 4950 throw const NotImplementedException();
4951 } 4951 }
4952 4952
4953 void setRange(int start, int length, List from, [int startFrom = 0]) { 4953 void setRange(int start, int rangeLength, List from, [int startFrom = 0]) {
4954 throw const NotImplementedException(); 4954 throw const NotImplementedException();
4955 } 4955 }
4956 4956
4957 void removeRange(int start, int length) { 4957 void removeRange(int start, int rangeLength) {
4958 _filtered.getRange(start, length).forEach((el) => el.remove()); 4958 _filtered.getRange(start, rangeLength).forEach((el) => el.remove());
4959 } 4959 }
4960 4960
4961 void insertRange(int start, int length, [initialValue = null]) { 4961 void insertRange(int start, int rangeLength, [initialValue = null]) {
4962 throw const NotImplementedException(); 4962 throw const NotImplementedException();
4963 } 4963 }
4964 4964
4965 void clear() { 4965 void clear() {
4966 // Currently, ElementList#clear clears even non-element nodes, so we follow 4966 // Currently, ElementList#clear clears even non-element nodes, so we follow
4967 // that behavior. 4967 // that behavior.
4968 _childNodes.clear(); 4968 _childNodes.clear();
4969 } 4969 }
4970 4970
4971 Element removeLast() { 4971 Element removeLast() {
4972 final last = this.last(); 4972 final result = this.last();
4973 if (last != null) { 4973 if (result != null) {
4974 last.remove(); 4974 result.remove();
4975 } 4975 }
4976 return last; 4976 return result;
4977 } 4977 }
4978 4978
4979 Collection map(f(Element element)) => _filtered.map(f); 4979 Collection map(f(Element element)) => _filtered.map(f);
4980 Collection<Element> filter(bool f(Element element)) => _filtered.filter(f); 4980 Collection<Element> filter(bool f(Element element)) => _filtered.filter(f);
4981 bool every(bool f(Element element)) => _filtered.every(f); 4981 bool every(bool f(Element element)) => _filtered.every(f);
4982 bool some(bool f(Element element)) => _filtered.some(f); 4982 bool some(bool f(Element element)) => _filtered.some(f);
4983 bool isEmpty() => _filtered.isEmpty(); 4983 bool isEmpty() => _filtered.isEmpty();
4984 int get length() => _filtered.length; 4984 int get length() => _filtered.length;
4985 Element operator [](int index) => _filtered[index]; 4985 Element operator [](int index) => _filtered[index];
4986 Iterator<Element> iterator() => _filtered.iterator(); 4986 Iterator<Element> iterator() => _filtered.iterator();
4987 List<Element> getRange(int start, int length) => 4987 List<Element> getRange(int start, int rangeLength) =>
4988 _filtered.getRange(start, length); 4988 _filtered.getRange(start, rangeLength);
4989 int indexOf(Element element, [int start = 0]) => 4989 int indexOf(Element element, [int start = 0]) =>
4990 _filtered.indexOf(element, start); 4990 _filtered.indexOf(element, start);
4991 4991
4992 int lastIndexOf(Element element, [int start = null]) { 4992 int lastIndexOf(Element element, [int start = null]) {
4993 if (start === null) start = length - 1; 4993 if (start === null) start = length - 1;
4994 return _filtered.lastIndexOf(element, start); 4994 return _filtered.lastIndexOf(element, start);
4995 } 4995 }
4996 4996
4997 Element last() => _filtered.last(); 4997 Element last() => _filtered.last();
4998 } 4998 }
(...skipping 375 matching lines...) Expand 10 before | Expand all | Expand 10 after
5374 } 5374 }
5375 5375
5376 void sort(int compare(Element a, Element b)) { 5376 void sort(int compare(Element a, Element b)) {
5377 throw const UnsupportedOperationException('TODO(jacobr): should we impl?'); 5377 throw const UnsupportedOperationException('TODO(jacobr): should we impl?');
5378 } 5378 }
5379 5379
5380 void copyFrom(List<Object> src, int srcStart, int dstStart, int count) { 5380 void copyFrom(List<Object> src, int srcStart, int dstStart, int count) {
5381 throw 'Not impl yet. todo(jacobr)'; 5381 throw 'Not impl yet. todo(jacobr)';
5382 } 5382 }
5383 5383
5384 void setRange(int start, int length, List from, [int startFrom = 0]) { 5384 void setRange(int start, int rangeLength, List from, [int startFrom = 0]) {
5385 throw const NotImplementedException(); 5385 throw const NotImplementedException();
5386 } 5386 }
5387 5387
5388 void removeRange(int start, int length) { 5388 void removeRange(int start, int rangeLength) {
5389 throw const NotImplementedException(); 5389 throw const NotImplementedException();
5390 } 5390 }
5391 5391
5392 void insertRange(int start, int length, [initialValue = null]) { 5392 void insertRange(int start, int rangeLength, [initialValue = null]) {
5393 throw const NotImplementedException(); 5393 throw const NotImplementedException();
5394 } 5394 }
5395 5395
5396 List getRange(int start, int length) => 5396 List getRange(int start, int rangeLength) =>
5397 new _FrozenElementList._wrap(_Lists.getRange(this, start, length, 5397 new _FrozenElementList._wrap(_Lists.getRange(this, start, rangeLength,
5398 <Element>[])); 5398 <Element>[]));
5399 5399
5400 int indexOf(Element element, [int start = 0]) { 5400 int indexOf(Element element, [int start = 0]) {
5401 return _Lists.indexOf(this, element, start, this.length); 5401 return _Lists.indexOf(this, element, start, this.length);
5402 } 5402 }
5403 5403
5404 int lastIndexOf(Element element, [int start = null]) { 5404 int lastIndexOf(Element element, [int start = null]) {
5405 if (start === null) start = length - 1; 5405 if (start === null) start = length - 1;
5406 return _Lists.lastIndexOf(this, element, start); 5406 return _Lists.lastIndexOf(this, element, start);
5407 } 5407 }
5408 5408
5409 void clear() { 5409 void clear() {
5410 // It is unclear if we want to keep non element nodes? 5410 // It is unclear if we want to keep non element nodes?
5411 _element.text = ''; 5411 _element.text = '';
5412 } 5412 }
5413 5413
5414 Element removeLast() { 5414 Element removeLast() {
5415 final last = this.last(); 5415 final result = this.last();
5416 if (last != null) { 5416 if (result != null) {
5417 _element.$dom_removeChild(last); 5417 _element.$dom_removeChild(result);
5418 } 5418 }
5419 return last; 5419 return result;
5420 } 5420 }
5421 5421
5422 Element last() { 5422 Element last() {
5423 return _element.$dom_lastElementChild; 5423 return _element.$dom_lastElementChild;
5424 } 5424 }
5425 } 5425 }
5426 5426
5427 // TODO(jacobr): this is an inefficient implementation but it is hard to see 5427 // TODO(jacobr): this is an inefficient implementation but it is hard to see
5428 // a better option given that we cannot quite force NodeList to be an 5428 // a better option given that we cannot quite force NodeList to be an
5429 // ElementList as there are valid cases where a NodeList JavaScript object 5429 // ElementList as there are valid cases where a NodeList JavaScript object
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
5502 Iterator<Element> iterator() => new _FrozenElementListIterator(this); 5502 Iterator<Element> iterator() => new _FrozenElementListIterator(this);
5503 5503
5504 void addAll(Collection<Element> collection) { 5504 void addAll(Collection<Element> collection) {
5505 throw const UnsupportedOperationException(''); 5505 throw const UnsupportedOperationException('');
5506 } 5506 }
5507 5507
5508 void sort(int compare(Element a, Element b)) { 5508 void sort(int compare(Element a, Element b)) {
5509 throw const UnsupportedOperationException(''); 5509 throw const UnsupportedOperationException('');
5510 } 5510 }
5511 5511
5512 void setRange(int start, int length, List from, [int startFrom = 0]) { 5512 void setRange(int start, int rangeLength, List from, [int startFrom = 0]) {
5513 throw const UnsupportedOperationException(''); 5513 throw const UnsupportedOperationException('');
5514 } 5514 }
5515 5515
5516 void removeRange(int start, int length) { 5516 void removeRange(int start, int rangeLength) {
5517 throw const UnsupportedOperationException(''); 5517 throw const UnsupportedOperationException('');
5518 } 5518 }
5519 5519
5520 void insertRange(int start, int length, [initialValue = null]) { 5520 void insertRange(int start, int rangeLength, [initialValue = null]) {
5521 throw const UnsupportedOperationException(''); 5521 throw const UnsupportedOperationException('');
5522 } 5522 }
5523 5523
5524 ElementList getRange(int start, int length) => 5524 ElementList getRange(int start, int rangeLength) =>
5525 new _FrozenElementList._wrap(_nodeList.getRange(start, length)); 5525 new _FrozenElementList._wrap(_nodeList.getRange(start, rangeLength));
5526 5526
5527 int indexOf(Element element, [int start = 0]) => 5527 int indexOf(Element element, [int start = 0]) =>
5528 _nodeList.indexOf(element, start); 5528 _nodeList.indexOf(element, start);
5529 5529
5530 int lastIndexOf(Element element, [int start = null]) => 5530 int lastIndexOf(Element element, [int start = null]) =>
5531 _nodeList.lastIndexOf(element, start); 5531 _nodeList.lastIndexOf(element, start);
5532 5532
5533 void clear() { 5533 void clear() {
5534 throw const UnsupportedOperationException(''); 5534 throw const UnsupportedOperationException('');
5535 } 5535 }
(...skipping 28 matching lines...) Expand all
5564 */ 5564 */
5565 bool hasNext() => _index < _list.length; 5565 bool hasNext() => _index < _list.length;
5566 } 5566 }
5567 5567
5568 class _ElementList extends _ListWrapper<Element> implements ElementList { 5568 class _ElementList extends _ListWrapper<Element> implements ElementList {
5569 _ElementList(List<Element> list) : super(list); 5569 _ElementList(List<Element> list) : super(list);
5570 5570
5571 ElementList filter(bool f(Element element)) => 5571 ElementList filter(bool f(Element element)) =>
5572 new _ElementList(super.filter(f)); 5572 new _ElementList(super.filter(f));
5573 5573
5574 ElementList getRange(int start, int length) => 5574 ElementList getRange(int start, int rangeLength) =>
5575 new _ElementList(super.getRange(start, length)); 5575 new _ElementList(super.getRange(start, rangeLength));
5576 } 5576 }
5577 5577
5578 class _ElementAttributeMap implements AttributeMap { 5578 class _ElementAttributeMap implements AttributeMap {
5579 5579
5580 final _ElementImpl _element; 5580 final _ElementImpl _element;
5581 5581
5582 _ElementAttributeMap(this._element); 5582 _ElementAttributeMap(this._element);
5583 5583
5584 bool containsValue(String value) { 5584 bool containsValue(String value) {
5585 final attributes = _element.$dom_attributes; 5585 final attributes = _element.$dom_attributes;
(...skipping 935 matching lines...) Expand 10 before | Expand all | Expand 10 after
6521 EventListenerList get open() => _get('open'); 6521 EventListenerList get open() => _get('open');
6522 } 6522 }
6523 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 6523 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
6524 // for details. All rights reserved. Use of this source code is governed by a 6524 // for details. All rights reserved. Use of this source code is governed by a
6525 // BSD-style license that can be found in the LICENSE file. 6525 // BSD-style license that can be found in the LICENSE file.
6526 6526
6527 class _EventsImpl implements Events { 6527 class _EventsImpl implements Events {
6528 /* Raw event target. */ 6528 /* Raw event target. */
6529 // TODO(jacobr): it would be nice if we could specify this as 6529 // TODO(jacobr): it would be nice if we could specify this as
6530 // _EventTargetImpl or EventTarget 6530 // _EventTargetImpl or EventTarget
6531 final var _ptr; 6531 final Dynamic _ptr;
6532 6532
6533 _EventsImpl(this._ptr); 6533 _EventsImpl(this._ptr);
6534 6534
6535 _EventListenerListImpl operator [](String type) => _get(type.toLowerCase()); 6535 _EventListenerListImpl operator [](String type) => _get(type.toLowerCase());
6536 6536
6537 _EventListenerListImpl _get(String type) { 6537 _EventListenerListImpl _get(String type) {
6538 return new _EventListenerListImpl(_ptr, type); 6538 return new _EventListenerListImpl(_ptr, type);
6539 } 6539 }
6540 } 6540 }
6541 6541
6542 class _EventListenerListImpl implements EventListenerList { 6542 class _EventListenerListImpl implements EventListenerList {
6543 6543
6544 // TODO(jacobr): make this _EventTargetImpl 6544 // TODO(jacobr): make this _EventTargetImpl
6545 final var _ptr; 6545 final Dynamic _ptr;
6546 final String _type; 6546 final String _type;
6547 6547
6548 _EventListenerListImpl(this._ptr, this._type); 6548 _EventListenerListImpl(this._ptr, this._type);
6549 6549
6550 // TODO(jacobr): implement equals. 6550 // TODO(jacobr): implement equals.
6551 6551
6552 _EventListenerListImpl add(EventListener listener, 6552 _EventListenerListImpl add(EventListener listener,
6553 [bool useCapture = false]) { 6553 [bool useCapture = false]) {
6554 _add(listener, useCapture); 6554 _add(listener, useCapture);
6555 return this; 6555 return this;
(...skipping 314 matching lines...) Expand 10 before | Expand all | Expand 10 after
6870 } 6870 }
6871 6871
6872 int indexOf(num element, [int start = 0]) => 6872 int indexOf(num element, [int start = 0]) =>
6873 _Lists.indexOf(this, element, start, this.length); 6873 _Lists.indexOf(this, element, start, this.length);
6874 6874
6875 int lastIndexOf(num element, [int start = 0]) => 6875 int lastIndexOf(num element, [int start = 0]) =>
6876 _Lists.lastIndexOf(this, element, start); 6876 _Lists.lastIndexOf(this, element, start);
6877 6877
6878 num last() => this[length - 1]; 6878 num last() => this[length - 1];
6879 6879
6880 // FIXME: implement thesee. 6880 // FIXME: implement these.
6881 void setRange(int start, int length, List<num> from, [int startFrom]) { 6881 void setRange(int start, int rangeLength, List<num> from, [int startFrom]) {
6882 throw new UnsupportedOperationException("Cannot setRange on immutable List." ); 6882 throw new UnsupportedOperationException("Cannot setRange on immutable List." );
6883 } 6883 }
6884 void removeRange(int start, int length) { 6884 void removeRange(int start, int rangeLength) {
6885 throw new UnsupportedOperationException("Cannot removeRange on immutable Lis t."); 6885 throw new UnsupportedOperationException("Cannot removeRange on immutable Lis t.");
6886 } 6886 }
6887 void insertRange(int start, int length, [num initialValue]) { 6887 void insertRange(int start, int rangeLength, [num initialValue]) {
6888 throw new UnsupportedOperationException("Cannot insertRange on immutable Lis t."); 6888 throw new UnsupportedOperationException("Cannot insertRange on immutable Lis t.");
6889 } 6889 }
6890 List<num> getRange(int start, int length) => 6890 List<num> getRange(int start, int rangeLength) =>
6891 _Lists.getRange(this, start, length, <num>[]); 6891 _Lists.getRange(this, start, rangeLength, <num>[]);
6892 6892
6893 // -- end List<num> mixins. 6893 // -- end List<num> mixins.
6894 6894
6895 void setElements(Object array, [int offset = null]) native; 6895 void setElements(Object array, [int offset = null]) native;
6896 6896
6897 _Float32ArrayImpl subarray(int start, [int end = null]) native; 6897 _Float32ArrayImpl subarray(int start, [int end = null]) native;
6898 } 6898 }
6899 6899
6900 class _Float64ArrayImpl extends _ArrayBufferViewImpl implements Float64Array, Li st<num> native "*Float64Array" { 6900 class _Float64ArrayImpl extends _ArrayBufferViewImpl implements Float64Array, Li st<num> native "*Float64Array" {
6901 6901
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
6960 } 6960 }
6961 6961
6962 int indexOf(num element, [int start = 0]) => 6962 int indexOf(num element, [int start = 0]) =>
6963 _Lists.indexOf(this, element, start, this.length); 6963 _Lists.indexOf(this, element, start, this.length);
6964 6964
6965 int lastIndexOf(num element, [int start = 0]) => 6965 int lastIndexOf(num element, [int start = 0]) =>
6966 _Lists.lastIndexOf(this, element, start); 6966 _Lists.lastIndexOf(this, element, start);
6967 6967
6968 num last() => this[length - 1]; 6968 num last() => this[length - 1];
6969 6969
6970 // FIXME: implement thesee. 6970 // FIXME: implement these.
6971 void setRange(int start, int length, List<num> from, [int startFrom]) { 6971 void setRange(int start, int rangeLength, List<num> from, [int startFrom]) {
6972 throw new UnsupportedOperationException("Cannot setRange on immutable List." ); 6972 throw new UnsupportedOperationException("Cannot setRange on immutable List." );
6973 } 6973 }
6974 void removeRange(int start, int length) { 6974 void removeRange(int start, int rangeLength) {
6975 throw new UnsupportedOperationException("Cannot removeRange on immutable Lis t."); 6975 throw new UnsupportedOperationException("Cannot removeRange on immutable Lis t.");
6976 } 6976 }
6977 void insertRange(int start, int length, [num initialValue]) { 6977 void insertRange(int start, int rangeLength, [num initialValue]) {
6978 throw new UnsupportedOperationException("Cannot insertRange on immutable Lis t."); 6978 throw new UnsupportedOperationException("Cannot insertRange on immutable Lis t.");
6979 } 6979 }
6980 List<num> getRange(int start, int length) => 6980 List<num> getRange(int start, int rangeLength) =>
6981 _Lists.getRange(this, start, length, <num>[]); 6981 _Lists.getRange(this, start, rangeLength, <num>[]);
6982 6982
6983 // -- end List<num> mixins. 6983 // -- end List<num> mixins.
6984 6984
6985 void setElements(Object array, [int offset = null]) native; 6985 void setElements(Object array, [int offset = null]) native;
6986 6986
6987 _Float64ArrayImpl subarray(int start, [int end = null]) native; 6987 _Float64ArrayImpl subarray(int start, [int end = null]) native;
6988 } 6988 }
6989 6989
6990 class _FontElementImpl extends _ElementImpl implements FontElement native "*HTML FontElement" { 6990 class _FontElementImpl extends _ElementImpl implements FontElement native "*HTML FontElement" {
6991 6991
(...skipping 197 matching lines...) Expand 10 before | Expand all | Expand 10 after
7189 } 7189 }
7190 7190
7191 int indexOf(Node element, [int start = 0]) => 7191 int indexOf(Node element, [int start = 0]) =>
7192 _Lists.indexOf(this, element, start, this.length); 7192 _Lists.indexOf(this, element, start, this.length);
7193 7193
7194 int lastIndexOf(Node element, [int start = 0]) => 7194 int lastIndexOf(Node element, [int start = 0]) =>
7195 _Lists.lastIndexOf(this, element, start); 7195 _Lists.lastIndexOf(this, element, start);
7196 7196
7197 Node last() => this[length - 1]; 7197 Node last() => this[length - 1];
7198 7198
7199 // FIXME: implement thesee. 7199 // FIXME: implement these.
7200 void setRange(int start, int length, List<Node> from, [int startFrom]) { 7200 void setRange(int start, int rangeLength, List<Node> from, [int startFrom]) {
7201 throw new UnsupportedOperationException("Cannot setRange on immutable List." ); 7201 throw new UnsupportedOperationException("Cannot setRange on immutable List." );
7202 } 7202 }
7203 void removeRange(int start, int length) { 7203 void removeRange(int start, int rangeLength) {
7204 throw new UnsupportedOperationException("Cannot removeRange on immutable Lis t."); 7204 throw new UnsupportedOperationException("Cannot removeRange on immutable Lis t.");
7205 } 7205 }
7206 void insertRange(int start, int length, [Node initialValue]) { 7206 void insertRange(int start, int rangeLength, [Node initialValue]) {
7207 throw new UnsupportedOperationException("Cannot insertRange on immutable Lis t."); 7207 throw new UnsupportedOperationException("Cannot insertRange on immutable Lis t.");
7208 } 7208 }
7209 List<Node> getRange(int start, int length) => 7209 List<Node> getRange(int start, int rangeLength) =>
7210 _Lists.getRange(this, start, length, <Node>[]); 7210 _Lists.getRange(this, start, rangeLength, <Node>[]);
7211 7211
7212 // -- end List<Node> mixins. 7212 // -- end List<Node> mixins.
7213 7213
7214 _NodeImpl item(int index) native; 7214 _NodeImpl item(int index) native;
7215 7215
7216 _NodeImpl namedItem(String name) native; 7216 _NodeImpl namedItem(String name) native;
7217 } 7217 }
7218 7218
7219 class _HTMLOptionsCollectionImpl extends _HTMLCollectionImpl implements HTMLOpti onsCollection native "*HTMLOptionsCollection" { 7219 class _HTMLOptionsCollectionImpl extends _HTMLCollectionImpl implements HTMLOpti onsCollection native "*HTMLOptionsCollection" {
7220 7220
(...skipping 581 matching lines...) Expand 10 before | Expand all | Expand 10 after
7802 } 7802 }
7803 7803
7804 int indexOf(int element, [int start = 0]) => 7804 int indexOf(int element, [int start = 0]) =>
7805 _Lists.indexOf(this, element, start, this.length); 7805 _Lists.indexOf(this, element, start, this.length);
7806 7806
7807 int lastIndexOf(int element, [int start = 0]) => 7807 int lastIndexOf(int element, [int start = 0]) =>
7808 _Lists.lastIndexOf(this, element, start); 7808 _Lists.lastIndexOf(this, element, start);
7809 7809
7810 int last() => this[length - 1]; 7810 int last() => this[length - 1];
7811 7811
7812 // FIXME: implement thesee. 7812 // FIXME: implement these.
7813 void setRange(int start, int length, List<int> from, [int startFrom]) { 7813 void setRange(int start, int rangeLength, List<int> from, [int startFrom]) {
7814 throw new UnsupportedOperationException("Cannot setRange on immutable List." ); 7814 throw new UnsupportedOperationException("Cannot setRange on immutable List." );
7815 } 7815 }
7816 void removeRange(int start, int length) { 7816 void removeRange(int start, int rangeLength) {
7817 throw new UnsupportedOperationException("Cannot removeRange on immutable Lis t."); 7817 throw new UnsupportedOperationException("Cannot removeRange on immutable Lis t.");
7818 } 7818 }
7819 void insertRange(int start, int length, [int initialValue]) { 7819 void insertRange(int start, int rangeLength, [int initialValue]) {
7820 throw new UnsupportedOperationException("Cannot insertRange on immutable Lis t."); 7820 throw new UnsupportedOperationException("Cannot insertRange on immutable Lis t.");
7821 } 7821 }
7822 List<int> getRange(int start, int length) => 7822 List<int> getRange(int start, int rangeLength) =>
7823 _Lists.getRange(this, start, length, <int>[]); 7823 _Lists.getRange(this, start, rangeLength, <int>[]);
7824 7824
7825 // -- end List<int> mixins. 7825 // -- end List<int> mixins.
7826 7826
7827 void setElements(Object array, [int offset = null]) native; 7827 void setElements(Object array, [int offset = null]) native;
7828 7828
7829 _Int16ArrayImpl subarray(int start, [int end = null]) native; 7829 _Int16ArrayImpl subarray(int start, [int end = null]) native;
7830 } 7830 }
7831 7831
7832 class _Int32ArrayImpl extends _ArrayBufferViewImpl implements Int32Array, List<i nt> native "*Int32Array" { 7832 class _Int32ArrayImpl extends _ArrayBufferViewImpl implements Int32Array, List<i nt> native "*Int32Array" {
7833 7833
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
7892 } 7892 }
7893 7893
7894 int indexOf(int element, [int start = 0]) => 7894 int indexOf(int element, [int start = 0]) =>
7895 _Lists.indexOf(this, element, start, this.length); 7895 _Lists.indexOf(this, element, start, this.length);
7896 7896
7897 int lastIndexOf(int element, [int start = 0]) => 7897 int lastIndexOf(int element, [int start = 0]) =>
7898 _Lists.lastIndexOf(this, element, start); 7898 _Lists.lastIndexOf(this, element, start);
7899 7899
7900 int last() => this[length - 1]; 7900 int last() => this[length - 1];
7901 7901
7902 // FIXME: implement thesee. 7902 // FIXME: implement these.
7903 void setRange(int start, int length, List<int> from, [int startFrom]) { 7903 void setRange(int start, int rangeLength, List<int> from, [int startFrom]) {
7904 throw new UnsupportedOperationException("Cannot setRange on immutable List." ); 7904 throw new UnsupportedOperationException("Cannot setRange on immutable List." );
7905 } 7905 }
7906 void removeRange(int start, int length) { 7906 void removeRange(int start, int rangeLength) {
7907 throw new UnsupportedOperationException("Cannot removeRange on immutable Lis t."); 7907 throw new UnsupportedOperationException("Cannot removeRange on immutable Lis t.");
7908 } 7908 }
7909 void insertRange(int start, int length, [int initialValue]) { 7909 void insertRange(int start, int rangeLength, [int initialValue]) {
7910 throw new UnsupportedOperationException("Cannot insertRange on immutable Lis t."); 7910 throw new UnsupportedOperationException("Cannot insertRange on immutable Lis t.");
7911 } 7911 }
7912 List<int> getRange(int start, int length) => 7912 List<int> getRange(int start, int rangeLength) =>
7913 _Lists.getRange(this, start, length, <int>[]); 7913 _Lists.getRange(this, start, rangeLength, <int>[]);
7914 7914
7915 // -- end List<int> mixins. 7915 // -- end List<int> mixins.
7916 7916
7917 void setElements(Object array, [int offset = null]) native; 7917 void setElements(Object array, [int offset = null]) native;
7918 7918
7919 _Int32ArrayImpl subarray(int start, [int end = null]) native; 7919 _Int32ArrayImpl subarray(int start, [int end = null]) native;
7920 } 7920 }
7921 7921
7922 class _Int8ArrayImpl extends _ArrayBufferViewImpl implements Int8Array, List<int > native "*Int8Array" { 7922 class _Int8ArrayImpl extends _ArrayBufferViewImpl implements Int8Array, List<int > native "*Int8Array" {
7923 7923
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
7982 } 7982 }
7983 7983
7984 int indexOf(int element, [int start = 0]) => 7984 int indexOf(int element, [int start = 0]) =>
7985 _Lists.indexOf(this, element, start, this.length); 7985 _Lists.indexOf(this, element, start, this.length);
7986 7986
7987 int lastIndexOf(int element, [int start = 0]) => 7987 int lastIndexOf(int element, [int start = 0]) =>
7988 _Lists.lastIndexOf(this, element, start); 7988 _Lists.lastIndexOf(this, element, start);
7989 7989
7990 int last() => this[length - 1]; 7990 int last() => this[length - 1];
7991 7991
7992 // FIXME: implement thesee. 7992 // FIXME: implement these.
7993 void setRange(int start, int length, List<int> from, [int startFrom]) { 7993 void setRange(int start, int rangeLength, List<int> from, [int startFrom]) {
7994 throw new UnsupportedOperationException("Cannot setRange on immutable List." ); 7994 throw new UnsupportedOperationException("Cannot setRange on immutable List." );
7995 } 7995 }
7996 void removeRange(int start, int length) { 7996 void removeRange(int start, int rangeLength) {
7997 throw new UnsupportedOperationException("Cannot removeRange on immutable Lis t."); 7997 throw new UnsupportedOperationException("Cannot removeRange on immutable Lis t.");
7998 } 7998 }
7999 void insertRange(int start, int length, [int initialValue]) { 7999 void insertRange(int start, int rangeLength, [int initialValue]) {
8000 throw new UnsupportedOperationException("Cannot insertRange on immutable Lis t."); 8000 throw new UnsupportedOperationException("Cannot insertRange on immutable Lis t.");
8001 } 8001 }
8002 List<int> getRange(int start, int length) => 8002 List<int> getRange(int start, int rangeLength) =>
8003 _Lists.getRange(this, start, length, <int>[]); 8003 _Lists.getRange(this, start, rangeLength, <int>[]);
8004 8004
8005 // -- end List<int> mixins. 8005 // -- end List<int> mixins.
8006 8006
8007 void setElements(Object array, [int offset = null]) native; 8007 void setElements(Object array, [int offset = null]) native;
8008 8008
8009 _Int8ArrayImpl subarray(int start, [int end = null]) native; 8009 _Int8ArrayImpl subarray(int start, [int end = null]) native;
8010 } 8010 }
8011 8011
8012 class _JavaScriptAudioNodeImpl extends _AudioNodeImpl implements JavaScriptAudio Node native "*JavaScriptAudioNode" { 8012 class _JavaScriptAudioNodeImpl extends _AudioNodeImpl implements JavaScriptAudio Node native "*JavaScriptAudioNode" {
8013 8013
(...skipping 431 matching lines...) Expand 10 before | Expand all | Expand 10 after
8445 } 8445 }
8446 8446
8447 int indexOf(String element, [int start = 0]) => 8447 int indexOf(String element, [int start = 0]) =>
8448 _Lists.indexOf(this, element, start, this.length); 8448 _Lists.indexOf(this, element, start, this.length);
8449 8449
8450 int lastIndexOf(String element, [int start = 0]) => 8450 int lastIndexOf(String element, [int start = 0]) =>
8451 _Lists.lastIndexOf(this, element, start); 8451 _Lists.lastIndexOf(this, element, start);
8452 8452
8453 String last() => this[length - 1]; 8453 String last() => this[length - 1];
8454 8454
8455 // FIXME: implement thesee. 8455 // FIXME: implement these.
8456 void setRange(int start, int length, List<String> from, [int startFrom]) { 8456 void setRange(int start, int rangeLength, List<String> from, [int startFrom]) {
8457 throw new UnsupportedOperationException("Cannot setRange on immutable List." ); 8457 throw new UnsupportedOperationException("Cannot setRange on immutable List." );
8458 } 8458 }
8459 void removeRange(int start, int length) { 8459 void removeRange(int start, int rangeLength) {
8460 throw new UnsupportedOperationException("Cannot removeRange on immutable Lis t."); 8460 throw new UnsupportedOperationException("Cannot removeRange on immutable Lis t.");
8461 } 8461 }
8462 void insertRange(int start, int length, [String initialValue]) { 8462 void insertRange(int start, int rangeLength, [String initialValue]) {
8463 throw new UnsupportedOperationException("Cannot insertRange on immutable Lis t."); 8463 throw new UnsupportedOperationException("Cannot insertRange on immutable Lis t.");
8464 } 8464 }
8465 List<String> getRange(int start, int length) => 8465 List<String> getRange(int start, int rangeLength) =>
8466 _Lists.getRange(this, start, length, <String>[]); 8466 _Lists.getRange(this, start, rangeLength, <String>[]);
8467 8467
8468 // -- end List<String> mixins. 8468 // -- end List<String> mixins.
8469 8469
8470 void appendMedium(String newMedium) native; 8470 void appendMedium(String newMedium) native;
8471 8471
8472 void deleteMedium(String oldMedium) native; 8472 void deleteMedium(String oldMedium) native;
8473 8473
8474 String item(int index) native; 8474 String item(int index) native;
8475 } 8475 }
8476 8476
(...skipping 285 matching lines...) Expand 10 before | Expand all | Expand 10 after
8762 } 8762 }
8763 8763
8764 int indexOf(Node element, [int start = 0]) => 8764 int indexOf(Node element, [int start = 0]) =>
8765 _Lists.indexOf(this, element, start, this.length); 8765 _Lists.indexOf(this, element, start, this.length);
8766 8766
8767 int lastIndexOf(Node element, [int start = 0]) => 8767 int lastIndexOf(Node element, [int start = 0]) =>
8768 _Lists.lastIndexOf(this, element, start); 8768 _Lists.lastIndexOf(this, element, start);
8769 8769
8770 Node last() => this[length - 1]; 8770 Node last() => this[length - 1];
8771 8771
8772 // FIXME: implement thesee. 8772 // FIXME: implement these.
8773 void setRange(int start, int length, List<Node> from, [int startFrom]) { 8773 void setRange(int start, int rangeLength, List<Node> from, [int startFrom]) {
8774 throw new UnsupportedOperationException("Cannot setRange on immutable List." ); 8774 throw new UnsupportedOperationException("Cannot setRange on immutable List." );
8775 } 8775 }
8776 void removeRange(int start, int length) { 8776 void removeRange(int start, int rangeLength) {
8777 throw new UnsupportedOperationException("Cannot removeRange on immutable Lis t."); 8777 throw new UnsupportedOperationException("Cannot removeRange on immutable Lis t.");
8778 } 8778 }
8779 void insertRange(int start, int length, [Node initialValue]) { 8779 void insertRange(int start, int rangeLength, [Node initialValue]) {
8780 throw new UnsupportedOperationException("Cannot insertRange on immutable Lis t."); 8780 throw new UnsupportedOperationException("Cannot insertRange on immutable Lis t.");
8781 } 8781 }
8782 List<Node> getRange(int start, int length) => 8782 List<Node> getRange(int start, int rangeLength) =>
8783 _Lists.getRange(this, start, length, <Node>[]); 8783 _Lists.getRange(this, start, rangeLength, <Node>[]);
8784 8784
8785 // -- end List<Node> mixins. 8785 // -- end List<Node> mixins.
8786 8786
8787 _NodeImpl getNamedItem(String name) native; 8787 _NodeImpl getNamedItem(String name) native;
8788 8788
8789 _NodeImpl getNamedItemNS(String namespaceURI, String localName) native; 8789 _NodeImpl getNamedItemNS(String namespaceURI, String localName) native;
8790 8790
8791 _NodeImpl item(int index) native; 8791 _NodeImpl item(int index) native;
8792 8792
8793 _NodeImpl removeNamedItem(String name) native; 8793 _NodeImpl removeNamedItem(String name) native;
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after
8873 } 8873 }
8874 8874
8875 8875
8876 void addAll(Collection<_NodeImpl> collection) { 8876 void addAll(Collection<_NodeImpl> collection) {
8877 for (_NodeImpl node in collection) { 8877 for (_NodeImpl node in collection) {
8878 _this.$dom_appendChild(node); 8878 _this.$dom_appendChild(node);
8879 } 8879 }
8880 } 8880 }
8881 8881
8882 _NodeImpl removeLast() { 8882 _NodeImpl removeLast() {
8883 final last = last(); 8883 final result = last();
8884 if (last != null) { 8884 if (result != null) {
8885 _this.$dom_removeChild(last); 8885 _this.$dom_removeChild(result);
8886 } 8886 }
8887 return last; 8887 return result;
8888 } 8888 }
8889 8889
8890 void clear() { 8890 void clear() {
8891 _this.text = ''; 8891 _this.text = '';
8892 } 8892 }
8893 8893
8894 void operator []=(int index, _NodeImpl value) { 8894 void operator []=(int index, _NodeImpl value) {
8895 _this.$dom_replaceChild(value, this[index]); 8895 _this.$dom_replaceChild(value, this[index]);
8896 } 8896 }
8897 8897
(...skipping 21 matching lines...) Expand all
8919 void sort(int compare(Node a, Node b)) { 8919 void sort(int compare(Node a, Node b)) {
8920 throw new UnsupportedOperationException("Cannot sort immutable List."); 8920 throw new UnsupportedOperationException("Cannot sort immutable List.");
8921 } 8921 }
8922 8922
8923 int indexOf(Node element, [int start = 0]) => 8923 int indexOf(Node element, [int start = 0]) =>
8924 _Lists.indexOf(this, element, start, this.length); 8924 _Lists.indexOf(this, element, start, this.length);
8925 8925
8926 int lastIndexOf(Node element, [int start = 0]) => 8926 int lastIndexOf(Node element, [int start = 0]) =>
8927 _Lists.lastIndexOf(this, element, start); 8927 _Lists.lastIndexOf(this, element, start);
8928 8928
8929 // FIXME: implement thesee. 8929 // FIXME: implement these.
8930 void setRange(int start, int length, List<Node> from, [int startFrom]) { 8930 void setRange(int start, int rangeLength, List<Node> from, [int startFrom]) {
8931 throw new UnsupportedOperationException( 8931 throw new UnsupportedOperationException(
8932 "Cannot setRange on immutable List."); 8932 "Cannot setRange on immutable List.");
8933 } 8933 }
8934 void removeRange(int start, int length) { 8934 void removeRange(int start, int rangeLength) {
8935 throw new UnsupportedOperationException( 8935 throw new UnsupportedOperationException(
8936 "Cannot removeRange on immutable List."); 8936 "Cannot removeRange on immutable List.");
8937 } 8937 }
8938 void insertRange(int start, int length, [Node initialValue]) { 8938 void insertRange(int start, int rangeLength, [Node initialValue]) {
8939 throw new UnsupportedOperationException( 8939 throw new UnsupportedOperationException(
8940 "Cannot insertRange on immutable List."); 8940 "Cannot insertRange on immutable List.");
8941 } 8941 }
8942 NodeList getRange(int start, int length) => 8942 NodeList getRange(int start, int rangeLength) =>
8943 new _NodeListWrapper(_Lists.getRange(this, start, length, <Node>[])); 8943 new _NodeListWrapper(_Lists.getRange(this, start, rangeLength, <Node>[]));
8944 8944
8945 // -- end List<Node> mixins. 8945 // -- end List<Node> mixins.
8946 8946
8947 // TODO(jacobr): benchmark whether this is more efficient or whether caching 8947 // TODO(jacobr): benchmark whether this is more efficient or whether caching
8948 // a local copy of $dom_childNodes is more efficient. 8948 // a local copy of $dom_childNodes is more efficient.
8949 int get length() => _this.$dom_childNodes.length; 8949 int get length() => _this.$dom_childNodes.length;
8950 8950
8951 _NodeImpl operator[](int index) => _this.$dom_childNodes[index]; 8951 _NodeImpl operator[](int index) => _this.$dom_childNodes[index];
8952 } 8952 }
8953 8953
(...skipping 208 matching lines...) Expand 10 before | Expand all | Expand 10 after
9162 9162
9163 int lastIndexOf(E element, [int start = 0]) => 9163 int lastIndexOf(E element, [int start = 0]) =>
9164 _list.lastIndexOf(element, start); 9164 _list.lastIndexOf(element, start);
9165 9165
9166 void clear() => _list.clear(); 9166 void clear() => _list.clear();
9167 9167
9168 E removeLast() => _list.removeLast(); 9168 E removeLast() => _list.removeLast();
9169 9169
9170 E last() => _list.last(); 9170 E last() => _list.last();
9171 9171
9172 List<E> getRange(int start, int length) => _list.getRange(start, length); 9172 List<E> getRange(int start, int rangeLength) =>
9173 _list.getRange(start, rangeLength);
9173 9174
9174 void setRange(int start, int length, List<E> from, [int startFrom = 0]) => 9175 void setRange(int start, int rangeLength, List<E> from, [int startFrom = 0])
9175 _list.setRange(start, length, from, startFrom); 9176 => _list.setRange(start, rangeLength, from, startFrom);
9176 9177
9177 void removeRange(int start, int length) => _list.removeRange(start, length); 9178 void removeRange(int start, int rangeLength) =>
9179 _list.removeRange(start, rangeLength);
9178 9180
9179 void insertRange(int start, int length, [E initialValue = null]) => 9181 void insertRange(int start, int rangeLength, [E initialValue = null]) =>
9180 _list.insertRange(start, length, initialValue); 9182 _list.insertRange(start, rangeLength, initialValue);
9181 9183
9182 E get first() => _list[0]; 9184 E get first() => _list[0];
9183 } 9185 }
9184 9186
9185 /** 9187 /**
9186 * This class is used to insure the results of list operations are NodeLists 9188 * This class is used to insure the results of list operations are NodeLists
9187 * instead of lists. 9189 * instead of lists.
9188 */ 9190 */
9189 class _NodeListWrapper extends _ListWrapper<Node> implements NodeList { 9191 class _NodeListWrapper extends _ListWrapper<Node> implements NodeList {
9190 _NodeListWrapper(List list) : super(list); 9192 _NodeListWrapper(List list) : super(list);
9191 9193
9192 NodeList filter(bool f(Node element)) => 9194 NodeList filter(bool f(Node element)) =>
9193 new _NodeListWrapper(_list.filter(f)); 9195 new _NodeListWrapper(_list.filter(f));
9194 9196
9195 NodeList getRange(int start, int length) => 9197 NodeList getRange(int start, int rangeLength) =>
9196 new _NodeListWrapper(_list.getRange(start, length)); 9198 new _NodeListWrapper(_list.getRange(start, rangeLength));
9197 } 9199 }
9198 9200
9199 class _NodeListImpl implements NodeList native "*NodeList" { 9201 class _NodeListImpl implements NodeList native "*NodeList" {
9200 _NodeImpl _parent; 9202 _NodeImpl _parent;
9201 9203
9202 // -- start List<Node> mixins. 9204 // -- start List<Node> mixins.
9203 // Node is the element type. 9205 // Node is the element type.
9204 9206
9205 // From Iterable<Node>: 9207 // From Iterable<Node>:
9206 9208
(...skipping 14 matching lines...) Expand all
9221 _parent.$dom_appendChild(value); 9223 _parent.$dom_appendChild(value);
9222 } 9224 }
9223 9225
9224 void addAll(Collection<_NodeImpl> collection) { 9226 void addAll(Collection<_NodeImpl> collection) {
9225 for (_NodeImpl node in collection) { 9227 for (_NodeImpl node in collection) {
9226 _parent.$dom_appendChild(node); 9228 _parent.$dom_appendChild(node);
9227 } 9229 }
9228 } 9230 }
9229 9231
9230 _NodeImpl removeLast() { 9232 _NodeImpl removeLast() {
9231 final last = this.last(); 9233 final result = this.last();
9232 if (last != null) { 9234 if (result != null) {
9233 _parent.$dom_removeChild(last); 9235 _parent.$dom_removeChild(result);
9234 } 9236 }
9235 return last; 9237 return result;
9236 } 9238 }
9237 9239
9238 void clear() { 9240 void clear() {
9239 _parent.text = ''; 9241 _parent.text = '';
9240 } 9242 }
9241 9243
9242 void operator []=(int index, _NodeImpl value) { 9244 void operator []=(int index, _NodeImpl value) {
9243 _parent.$dom_replaceChild(value, this[index]); 9245 _parent.$dom_replaceChild(value, this[index]);
9244 } 9246 }
9245 9247
(...skipping 19 matching lines...) Expand all
9265 int indexOf(Node element, [int start = 0]) => 9267 int indexOf(Node element, [int start = 0]) =>
9266 _Lists.indexOf(this, element, start, this.length); 9268 _Lists.indexOf(this, element, start, this.length);
9267 9269
9268 int lastIndexOf(Node element, [int start = 0]) => 9270 int lastIndexOf(Node element, [int start = 0]) =>
9269 _Lists.lastIndexOf(this, element, start); 9271 _Lists.lastIndexOf(this, element, start);
9270 9272
9271 Node last() => this[length - 1]; 9273 Node last() => this[length - 1];
9272 Node get first() => this[0]; 9274 Node get first() => this[0];
9273 9275
9274 // FIXME: implement thesee. 9276 // FIXME: implement thesee.
9275 void setRange(int start, int length, List<Node> from, [int startFrom]) { 9277 void setRange(int start, int rangeLength, List<Node> from, [int startFrom]) {
9276 throw new UnsupportedOperationException("Cannot setRange on immutable List." ); 9278 throw new UnsupportedOperationException("Cannot setRange on immutable List." );
9277 } 9279 }
9278 void removeRange(int start, int length) { 9280 void removeRange(int start, int rangeLength) {
9279 throw new UnsupportedOperationException("Cannot removeRange on immutable Lis t."); 9281 throw new UnsupportedOperationException("Cannot removeRange on immutable Lis t.");
9280 } 9282 }
9281 void insertRange(int start, int length, [Node initialValue]) { 9283 void insertRange(int start, int rangeLength, [Node initialValue]) {
9282 throw new UnsupportedOperationException("Cannot insertRange on immutable Lis t."); 9284 throw new UnsupportedOperationException("Cannot insertRange on immutable Lis t.");
9283 } 9285 }
9284 NodeList getRange(int start, int length) => 9286 NodeList getRange(int start, int rangeLength) =>
9285 new _NodeListWrapper(_Lists.getRange(this, start, length, <Node>[])); 9287 new _NodeListWrapper(_Lists.getRange(this, start, rangeLength, <Node>[]));
9286 9288
9287 // -- end List<Node> mixins. 9289 // -- end List<Node> mixins.
9288 9290
9289 9291
9290 final int length; 9292 final int length;
9291 9293
9292 _NodeImpl operator[](int index) native "return this[index];"; 9294 _NodeImpl operator[](int index) native "return this[index];";
9293 9295
9294 } 9296 }
9295 9297
(...skipping 1160 matching lines...) Expand 10 before | Expand all | Expand 10 after
10456 ElementList get elements() => new FilteredElementList(this); 10458 ElementList get elements() => new FilteredElementList(this);
10457 10459
10458 void set elements(Collection<Element> value) { 10460 void set elements(Collection<Element> value) {
10459 final elements = this.elements; 10461 final elements = this.elements;
10460 elements.clear(); 10462 elements.clear();
10461 elements.addAll(value); 10463 elements.addAll(value);
10462 } 10464 }
10463 10465
10464 String get outerHTML() { 10466 String get outerHTML() {
10465 final container = new Element.tag("div"); 10467 final container = new Element.tag("div");
10466 final SVGElement clone = this.clone(true); 10468 final SVGElement cloned = this.clone(true);
10467 container.elements.add(clone); 10469 container.elements.add(cloned);
10468 return container.innerHTML; 10470 return container.innerHTML;
10469 } 10471 }
10470 10472
10471 String get innerHTML() { 10473 String get innerHTML() {
10472 final container = new Element.tag("div"); 10474 final container = new Element.tag("div");
10473 final SVGElement clone = this.clone(true); 10475 final SVGElement cloned = this.clone(true);
10474 container.elements.addAll(clone.elements); 10476 container.elements.addAll(cloned.elements);
10475 return container.innerHTML; 10477 return container.innerHTML;
10476 } 10478 }
10477 10479
10478 void set innerHTML(String svg) { 10480 void set innerHTML(String svg) {
10479 final container = new Element.tag("div"); 10481 final container = new Element.tag("div");
10480 // Wrap the SVG string in <svg> so that SVGElements are created, rather than 10482 // Wrap the SVG string in <svg> so that SVGElements are created, rather than
10481 // HTMLElements. 10483 // HTMLElements.
10482 container.innerHTML = '<svg version="1.1">$svg</svg>'; 10484 container.innerHTML = '<svg version="1.1">$svg</svg>';
10483 this.elements = container.elements.first.elements; 10485 this.elements = container.elements.first.elements;
10484 } 10486 }
(...skipping 3326 matching lines...) Expand 10 before | Expand all | Expand 10 after
13811 } 13813 }
13812 13814
13813 int indexOf(StyleSheet element, [int start = 0]) => 13815 int indexOf(StyleSheet element, [int start = 0]) =>
13814 _Lists.indexOf(this, element, start, this.length); 13816 _Lists.indexOf(this, element, start, this.length);
13815 13817
13816 int lastIndexOf(StyleSheet element, [int start = 0]) => 13818 int lastIndexOf(StyleSheet element, [int start = 0]) =>
13817 _Lists.lastIndexOf(this, element, start); 13819 _Lists.lastIndexOf(this, element, start);
13818 13820
13819 StyleSheet last() => this[length - 1]; 13821 StyleSheet last() => this[length - 1];
13820 13822
13821 // FIXME: implement thesee. 13823 // FIXME: implement these.
13822 void setRange(int start, int length, List<StyleSheet> from, [int startFrom]) { 13824 void setRange(int start, int rangeLength, List<StyleSheet> from, [int startFro m]) {
13823 throw new UnsupportedOperationException("Cannot setRange on immutable List." ); 13825 throw new UnsupportedOperationException("Cannot setRange on immutable List." );
13824 } 13826 }
13825 void removeRange(int start, int length) { 13827 void removeRange(int start, int rangeLength) {
13826 throw new UnsupportedOperationException("Cannot removeRange on immutable Lis t."); 13828 throw new UnsupportedOperationException("Cannot removeRange on immutable Lis t.");
13827 } 13829 }
13828 void insertRange(int start, int length, [StyleSheet initialValue]) { 13830 void insertRange(int start, int rangeLength, [StyleSheet initialValue]) {
13829 throw new UnsupportedOperationException("Cannot insertRange on immutable Lis t."); 13831 throw new UnsupportedOperationException("Cannot insertRange on immutable Lis t.");
13830 } 13832 }
13831 List<StyleSheet> getRange(int start, int length) => 13833 List<StyleSheet> getRange(int start, int rangeLength) =>
13832 _Lists.getRange(this, start, length, <StyleSheet>[]); 13834 _Lists.getRange(this, start, rangeLength, <StyleSheet>[]);
13833 13835
13834 // -- end List<StyleSheet> mixins. 13836 // -- end List<StyleSheet> mixins.
13835 13837
13836 _StyleSheetImpl item(int index) native; 13838 _StyleSheetImpl item(int index) native;
13837 } 13839 }
13838 13840
13839 class _TableCaptionElementImpl extends _ElementImpl implements TableCaptionEleme nt native "*HTMLTableCaptionElement" { 13841 class _TableCaptionElementImpl extends _ElementImpl implements TableCaptionEleme nt native "*HTMLTableCaptionElement" {
13840 13842
13841 String align; 13843 String align;
13842 } 13844 }
(...skipping 418 matching lines...) Expand 10 before | Expand all | Expand 10 after
14261 } 14263 }
14262 14264
14263 int indexOf(Touch element, [int start = 0]) => 14265 int indexOf(Touch element, [int start = 0]) =>
14264 _Lists.indexOf(this, element, start, this.length); 14266 _Lists.indexOf(this, element, start, this.length);
14265 14267
14266 int lastIndexOf(Touch element, [int start = 0]) => 14268 int lastIndexOf(Touch element, [int start = 0]) =>
14267 _Lists.lastIndexOf(this, element, start); 14269 _Lists.lastIndexOf(this, element, start);
14268 14270
14269 Touch last() => this[length - 1]; 14271 Touch last() => this[length - 1];
14270 14272
14271 // FIXME: implement thesee. 14273 // FIXME: implement these.
14272 void setRange(int start, int length, List<Touch> from, [int startFrom]) { 14274 void setRange(int start, int rangeLength, List<Touch> from, [int startFrom]) {
14273 throw new UnsupportedOperationException("Cannot setRange on immutable List." ); 14275 throw new UnsupportedOperationException("Cannot setRange on immutable List." );
14274 } 14276 }
14275 void removeRange(int start, int length) { 14277 void removeRange(int start, int rangeLength) {
14276 throw new UnsupportedOperationException("Cannot removeRange on immutable Lis t."); 14278 throw new UnsupportedOperationException("Cannot removeRange on immutable Lis t.");
14277 } 14279 }
14278 void insertRange(int start, int length, [Touch initialValue]) { 14280 void insertRange(int start, int rangeLength, [Touch initialValue]) {
14279 throw new UnsupportedOperationException("Cannot insertRange on immutable Lis t."); 14281 throw new UnsupportedOperationException("Cannot insertRange on immutable Lis t.");
14280 } 14282 }
14281 List<Touch> getRange(int start, int length) => 14283 List<Touch> getRange(int start, int rangeLength) =>
14282 _Lists.getRange(this, start, length, <Touch>[]); 14284 _Lists.getRange(this, start, rangeLength, <Touch>[]);
14283 14285
14284 // -- end List<Touch> mixins. 14286 // -- end List<Touch> mixins.
14285 14287
14286 _TouchImpl item(int index) native; 14288 _TouchImpl item(int index) native;
14287 } 14289 }
14288 14290
14289 class _TrackElementImpl extends _ElementImpl implements TrackElement native "*HT MLTrackElement" { 14291 class _TrackElementImpl extends _ElementImpl implements TrackElement native "*HT MLTrackElement" {
14290 14292
14291 static final int ERROR = 3; 14293 static final int ERROR = 3;
14292 14294
(...skipping 152 matching lines...) Expand 10 before | Expand all | Expand 10 after
14445 } 14447 }
14446 14448
14447 int indexOf(int element, [int start = 0]) => 14449 int indexOf(int element, [int start = 0]) =>
14448 _Lists.indexOf(this, element, start, this.length); 14450 _Lists.indexOf(this, element, start, this.length);
14449 14451
14450 int lastIndexOf(int element, [int start = 0]) => 14452 int lastIndexOf(int element, [int start = 0]) =>
14451 _Lists.lastIndexOf(this, element, start); 14453 _Lists.lastIndexOf(this, element, start);
14452 14454
14453 int last() => this[length - 1]; 14455 int last() => this[length - 1];
14454 14456
14455 // FIXME: implement thesee. 14457 // FIXME: implement these.
14456 void setRange(int start, int length, List<int> from, [int startFrom]) { 14458 void setRange(int start, int rangeLength, List<int> from, [int startFrom]) {
14457 throw new UnsupportedOperationException("Cannot setRange on immutable List." ); 14459 throw new UnsupportedOperationException("Cannot setRange on immutable List." );
14458 } 14460 }
14459 void removeRange(int start, int length) { 14461 void removeRange(int start, int rangeLength) {
14460 throw new UnsupportedOperationException("Cannot removeRange on immutable Lis t."); 14462 throw new UnsupportedOperationException("Cannot removeRange on immutable Lis t.");
14461 } 14463 }
14462 void insertRange(int start, int length, [int initialValue]) { 14464 void insertRange(int start, int rangeLength, [int initialValue]) {
14463 throw new UnsupportedOperationException("Cannot insertRange on immutable Lis t."); 14465 throw new UnsupportedOperationException("Cannot insertRange on immutable Lis t.");
14464 } 14466 }
14465 List<int> getRange(int start, int length) => 14467 List<int> getRange(int start, int rangeLength) =>
14466 _Lists.getRange(this, start, length, <int>[]); 14468 _Lists.getRange(this, start, rangeLength, <int>[]);
14467 14469
14468 // -- end List<int> mixins. 14470 // -- end List<int> mixins.
14469 14471
14470 void setElements(Object array, [int offset = null]) native; 14472 void setElements(Object array, [int offset = null]) native;
14471 14473
14472 _Uint16ArrayImpl subarray(int start, [int end = null]) native; 14474 _Uint16ArrayImpl subarray(int start, [int end = null]) native;
14473 } 14475 }
14474 14476
14475 class _Uint32ArrayImpl extends _ArrayBufferViewImpl implements Uint32Array, List <int> native "*Uint32Array" { 14477 class _Uint32ArrayImpl extends _ArrayBufferViewImpl implements Uint32Array, List <int> native "*Uint32Array" {
14476 14478
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
14535 } 14537 }
14536 14538
14537 int indexOf(int element, [int start = 0]) => 14539 int indexOf(int element, [int start = 0]) =>
14538 _Lists.indexOf(this, element, start, this.length); 14540 _Lists.indexOf(this, element, start, this.length);
14539 14541
14540 int lastIndexOf(int element, [int start = 0]) => 14542 int lastIndexOf(int element, [int start = 0]) =>
14541 _Lists.lastIndexOf(this, element, start); 14543 _Lists.lastIndexOf(this, element, start);
14542 14544
14543 int last() => this[length - 1]; 14545 int last() => this[length - 1];
14544 14546
14545 // FIXME: implement thesee. 14547 // FIXME: implement these.
14546 void setRange(int start, int length, List<int> from, [int startFrom]) { 14548 void setRange(int start, int rangeLength, List<int> from, [int startFrom]) {
14547 throw new UnsupportedOperationException("Cannot setRange on immutable List." ); 14549 throw new UnsupportedOperationException("Cannot setRange on immutable List." );
14548 } 14550 }
14549 void removeRange(int start, int length) { 14551 void removeRange(int start, int rangeLength) {
14550 throw new UnsupportedOperationException("Cannot removeRange on immutable Lis t."); 14552 throw new UnsupportedOperationException("Cannot removeRange on immutable Lis t.");
14551 } 14553 }
14552 void insertRange(int start, int length, [int initialValue]) { 14554 void insertRange(int start, int rangeLength, [int initialValue]) {
14553 throw new UnsupportedOperationException("Cannot insertRange on immutable Lis t."); 14555 throw new UnsupportedOperationException("Cannot insertRange on immutable Lis t.");
14554 } 14556 }
14555 List<int> getRange(int start, int length) => 14557 List<int> getRange(int start, int rangeLength) =>
14556 _Lists.getRange(this, start, length, <int>[]); 14558 _Lists.getRange(this, start, rangeLength, <int>[]);
14557 14559
14558 // -- end List<int> mixins. 14560 // -- end List<int> mixins.
14559 14561
14560 void setElements(Object array, [int offset = null]) native; 14562 void setElements(Object array, [int offset = null]) native;
14561 14563
14562 _Uint32ArrayImpl subarray(int start, [int end = null]) native; 14564 _Uint32ArrayImpl subarray(int start, [int end = null]) native;
14563 } 14565 }
14564 14566
14565 class _Uint8ArrayImpl extends _ArrayBufferViewImpl implements Uint8Array, List<i nt> native "*Uint8Array" { 14567 class _Uint8ArrayImpl extends _ArrayBufferViewImpl implements Uint8Array, List<i nt> native "*Uint8Array" {
14566 14568
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
14625 } 14627 }
14626 14628
14627 int indexOf(int element, [int start = 0]) => 14629 int indexOf(int element, [int start = 0]) =>
14628 _Lists.indexOf(this, element, start, this.length); 14630 _Lists.indexOf(this, element, start, this.length);
14629 14631
14630 int lastIndexOf(int element, [int start = 0]) => 14632 int lastIndexOf(int element, [int start = 0]) =>
14631 _Lists.lastIndexOf(this, element, start); 14633 _Lists.lastIndexOf(this, element, start);
14632 14634
14633 int last() => this[length - 1]; 14635 int last() => this[length - 1];
14634 14636
14635 // FIXME: implement thesee. 14637 // FIXME: implement these.
14636 void setRange(int start, int length, List<int> from, [int startFrom]) { 14638 void setRange(int start, int rangeLength, List<int> from, [int startFrom]) {
14637 throw new UnsupportedOperationException("Cannot setRange on immutable List." ); 14639 throw new UnsupportedOperationException("Cannot setRange on immutable List." );
14638 } 14640 }
14639 void removeRange(int start, int length) { 14641 void removeRange(int start, int rangeLength) {
14640 throw new UnsupportedOperationException("Cannot removeRange on immutable Lis t."); 14642 throw new UnsupportedOperationException("Cannot removeRange on immutable Lis t.");
14641 } 14643 }
14642 void insertRange(int start, int length, [int initialValue]) { 14644 void insertRange(int start, int rangeLength, [int initialValue]) {
14643 throw new UnsupportedOperationException("Cannot insertRange on immutable Lis t."); 14645 throw new UnsupportedOperationException("Cannot insertRange on immutable Lis t.");
14644 } 14646 }
14645 List<int> getRange(int start, int length) => 14647 List<int> getRange(int start, int rangeLength) =>
14646 _Lists.getRange(this, start, length, <int>[]); 14648 _Lists.getRange(this, start, rangeLength, <int>[]);
14647 14649
14648 // -- end List<int> mixins. 14650 // -- end List<int> mixins.
14649 14651
14650 void setElements(Object array, [int offset = null]) native; 14652 void setElements(Object array, [int offset = null]) native;
14651 14653
14652 _Uint8ArrayImpl subarray(int start, [int end = null]) native; 14654 _Uint8ArrayImpl subarray(int start, [int end = null]) native;
14653 } 14655 }
14654 14656
14655 class _Uint8ClampedArrayImpl extends _Uint8ArrayImpl implements Uint8ClampedArra y, List<int> native "*Uint8ClampedArray" { 14657 class _Uint8ClampedArrayImpl extends _Uint8ArrayImpl implements Uint8ClampedArra y, List<int> native "*Uint8ClampedArray" {
14656 14658
(...skipping 17440 matching lines...) Expand 10 before | Expand all | Expand 10 after
32097 if (length < 0) throw new IllegalArgumentException('length'); 32099 if (length < 0) throw new IllegalArgumentException('length');
32098 if (start < 0) throw new IndexOutOfRangeException(start); 32100 if (start < 0) throw new IndexOutOfRangeException(start);
32099 int end = start + length; 32101 int end = start + length;
32100 if (end > a.length) throw new IndexOutOfRangeException(end); 32102 if (end > a.length) throw new IndexOutOfRangeException(end);
32101 for (int i = start; i < end; i++) { 32103 for (int i = start; i < end; i++) {
32102 accumulator.add(a[i]); 32104 accumulator.add(a[i]);
32103 } 32105 }
32104 return accumulator; 32106 return accumulator;
32105 } 32107 }
32106 } 32108 }
OLDNEW
« no previous file with comments | « lib/html/dartium/html_dartium.dart ('k') | lib/isolate/frog/isolateimpl.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698