Chromium Code Reviews| Index: lib/html/dartium/html_dartium.dart |
| diff --git a/lib/html/dartium/html_dartium.dart b/lib/html/dartium/html_dartium.dart |
| index 6535ef4ae3497d4ba34891369d0c9873d2a3789b..2a6effbfef90e3aa263030a6301edf25484caedb 100644 |
| --- a/lib/html/dartium/html_dartium.dart |
| +++ b/lib/html/dartium/html_dartium.dart |
| @@ -2818,6 +2818,8 @@ class _CSSRuleListImpl extends NativeFieldWrapperClass1 implements List<CSSRule> |
| throw const UnsupportedOperationException("Cannot add to immutable List."); |
| } |
| + bool contains(CSSRule element) => _Collections.contains(this, element); |
|
sra1
2012/10/16 18:52:52
See lib/html/dart2js/html_dart2js.dart
|
| + |
| void forEach(void f(CSSRule element)) => _Collections.forEach(this, f); |
| Collection map(f(CSSRule element)) => _Collections.map(this, [], f); |
| @@ -7832,6 +7834,8 @@ class _CSSValueListImpl extends _CSSValueImpl implements List<CSSValue> { |
| throw const UnsupportedOperationException("Cannot add to immutable List."); |
| } |
| + bool contains(CSSValue element) => _Collections.contains(this, element); |
| + |
| void forEach(void f(CSSValue element)) => _Collections.forEach(this, f); |
| Collection map(f(CSSValue element)) => _Collections.map(this, [], f); |
| @@ -8821,6 +8825,8 @@ class _ClientRectListImpl extends NativeFieldWrapperClass1 implements List<Clien |
| throw const UnsupportedOperationException("Cannot add to immutable List."); |
| } |
| + bool contains(ClientRect element) => _Collections.contains(this, element); |
| + |
| void forEach(void f(ClientRect element)) => _Collections.forEach(this, f); |
| Collection map(f(ClientRect element)) => _Collections.map(this, [], f); |
| @@ -9773,6 +9779,8 @@ class _DOMMimeTypeArrayImpl extends NativeFieldWrapperClass1 implements DOMMimeT |
| throw const UnsupportedOperationException("Cannot add to immutable List."); |
| } |
| + bool contains(DOMMimeType element) => _Collections.contains(this, element); |
| + |
| void forEach(void f(DOMMimeType element)) => _Collections.forEach(this, f); |
| Collection map(f(DOMMimeType element)) => _Collections.map(this, [], f); |
| @@ -9959,6 +9967,8 @@ class _DOMPluginArrayImpl extends NativeFieldWrapperClass1 implements DOMPluginA |
| throw const UnsupportedOperationException("Cannot add to immutable List."); |
| } |
| + bool contains(DOMPlugin element) => _Collections.contains(this, element); |
| + |
| void forEach(void f(DOMPlugin element)) => _Collections.forEach(this, f); |
| Collection map(f(DOMPlugin element)) => _Collections.map(this, [], f); |
| @@ -10269,6 +10279,8 @@ class _DOMStringListImpl extends NativeFieldWrapperClass1 implements DOMStringLi |
| throw const UnsupportedOperationException("Cannot add to immutable List."); |
| } |
| + bool contains(String element) => _Collections.contains(this, element); |
| + |
| void forEach(void f(String element)) => _Collections.forEach(this, f); |
| Collection map(f(String element)) => _Collections.map(this, [], f); |
| @@ -11524,6 +11536,10 @@ class _FilteredElementList implements List { |
| List<Element> get _filtered => |
| new List.from(_childNodes.filter((n) => n is Element)); |
| + bool contains(Element element) { |
| + _filtered.contains(element); |
| + } |
| + |
| void forEach(void f(Element element)) { |
| _filtered.forEach(f); |
| } |
| @@ -11992,7 +12008,7 @@ class _DocumentImpl extends _NodeImpl implements Document |
| void webkitExitPointerLock() native "Document_webkitExitPointerLock_Callback"; |
| - // TODO(jacobr): implement all Element methods not on Document. |
| + // TODO(jacobr): implement all Element methods not on Document. |
| _ElementImpl query(String selectors) { |
| // It is fine for our RegExp to detect element id query selectors to have |
| @@ -12690,6 +12706,13 @@ class _ChildrenElementList implements List { |
| return output; |
| } |
| + bool contains(Element element) { |
| + for (_ElementImpl child in _childElements) { |
| + if (child == element) return true; |
| + } |
| + return false; |
| + } |
| + |
| void forEach(void f(Element element)) { |
| for (_ElementImpl element in _childElements) { |
| f(element); |
| @@ -12697,7 +12720,7 @@ class _ChildrenElementList implements List { |
| } |
| List<Element> filter(bool f(Element element)) { |
| - final output = []; |
| + final output = <Element>[]; |
| forEach((Element element) { |
| if (f(element)) { |
| output.add(element); |
| @@ -12725,7 +12748,7 @@ class _ChildrenElementList implements List { |
| } |
| Collection map(f(Element element)) { |
| - final out = []; |
| + final out = <Element>[]; |
| for (Element el in this) { |
| out.add(f(el)); |
| } |
| @@ -12828,6 +12851,13 @@ class _FrozenElementList implements List { |
| return _nodeList[0]; |
| } |
| + bool contains(Element element) { |
| + for (Element el in this) { |
| + if (el == element) return true; |
| + } |
| + return false; |
| + } |
| + |
| void forEach(void f(Element element)) { |
| for (Element el in this) { |
| f(el); |
| @@ -12835,7 +12865,7 @@ class _FrozenElementList implements List { |
| } |
| Collection map(f(Element element)) { |
| - final out = []; |
| + final out = <Element>[]; |
| for (Element el in this) { |
| out.add(f(el)); |
| } |
| @@ -12843,7 +12873,7 @@ class _FrozenElementList implements List { |
| } |
| List<Element> filter(bool f(Element element)) { |
| - final out = []; |
| + final out = <Element>[]; |
| for (Element el in this) { |
| if (f(el)) out.add(el); |
| } |
| @@ -13134,9 +13164,10 @@ class _CssClassSet implements CSSClassSet { |
| // interface Iterable - END |
| // interface Collection - BEGIN |
| - void forEach(void f(String element)) { |
| - _read().forEach(f); |
| - } |
| + |
| + bool contains(String element) => _read.contains(element); |
| + |
| + void forEach(void f(String element)) => _read().forEach(f); |
| Collection map(f(String element)) => _read().map(f); |
| @@ -13990,6 +14021,8 @@ class _EntryArrayImpl extends NativeFieldWrapperClass1 implements List<Entry> { |
| throw const UnsupportedOperationException("Cannot add to immutable List."); |
| } |
| + bool contains(Entry element) => _Collections.contains(this, element); |
| + |
| void forEach(void f(Entry element)) => _Collections.forEach(this, f); |
| Collection map(f(Entry element)) => _Collections.map(this, [], f); |
| @@ -14084,6 +14117,8 @@ class _EntryArraySyncImpl extends NativeFieldWrapperClass1 implements List<Entry |
| throw const UnsupportedOperationException("Cannot add to immutable List."); |
| } |
| + bool contains(EntrySync element) => _Collections.contains(this, element); |
| + |
| void forEach(void f(EntrySync element)) => _Collections.forEach(this, f); |
| Collection map(f(EntrySync element)) => _Collections.map(this, [], f); |
| @@ -15007,6 +15042,8 @@ class _FileListImpl extends NativeFieldWrapperClass1 implements List<File> { |
| throw const UnsupportedOperationException("Cannot add to immutable List."); |
| } |
| + bool contains(File element) => _Collections.contains(this, element); |
| + |
| void forEach(void f(File element)) => _Collections.forEach(this, f); |
| Collection map(f(File element)) => _Collections.map(this, [], f); |
| @@ -15429,7 +15466,7 @@ abstract class Float32Array implements ArrayBufferView, List<num> { |
| factory Float32Array.fromList(List<num> list) => |
| _TypedArrayFactoryProvider.createFloat32Array_fromList(list); |
| - factory Float32Array.fromBuffer(ArrayBuffer buffer, [int byteOffset, int length]) => |
| + factory Float32Array.fromBuffer(ArrayBuffer buffer, [int byteOffset, int length]) => |
| _TypedArrayFactoryProvider.createFloat32Array_fromBuffer(buffer, byteOffset, length); |
| static const int BYTES_PER_ELEMENT = 4; |
| @@ -15482,6 +15519,8 @@ class _Float32ArrayImpl extends _ArrayBufferViewImpl implements Float32Array { |
| throw const UnsupportedOperationException("Cannot add to immutable List."); |
| } |
| + bool contains(num element) => _Collections.contains(this, element); |
| + |
| void forEach(void f(num element)) => _Collections.forEach(this, f); |
| Collection map(f(num element)) => _Collections.map(this, [], f); |
| @@ -15561,7 +15600,7 @@ abstract class Float64Array implements ArrayBufferView, List<num> { |
| factory Float64Array.fromList(List<num> list) => |
| _TypedArrayFactoryProvider.createFloat64Array_fromList(list); |
| - factory Float64Array.fromBuffer(ArrayBuffer buffer, [int byteOffset, int length]) => |
| + factory Float64Array.fromBuffer(ArrayBuffer buffer, [int byteOffset, int length]) => |
| _TypedArrayFactoryProvider.createFloat64Array_fromBuffer(buffer, byteOffset, length); |
| static const int BYTES_PER_ELEMENT = 8; |
| @@ -15614,6 +15653,8 @@ class _Float64ArrayImpl extends _ArrayBufferViewImpl implements Float64Array { |
| throw const UnsupportedOperationException("Cannot add to immutable List."); |
| } |
| + bool contains(num element) => _Collections.contains(this, element); |
| + |
| void forEach(void f(num element)) => _Collections.forEach(this, f); |
| Collection map(f(num element)) => _Collections.map(this, [], f); |
| @@ -16135,6 +16176,8 @@ class _GamepadListImpl extends NativeFieldWrapperClass1 implements List<Gamepad> |
| throw const UnsupportedOperationException("Cannot add to immutable List."); |
| } |
| + bool contains(Gamepad element) => _Collections.contains(this, element); |
| + |
| void forEach(void f(Gamepad element)) => _Collections.forEach(this, f); |
| Collection map(f(Gamepad element)) => _Collections.map(this, [], f); |
| @@ -16359,6 +16402,8 @@ class _HTMLAllCollectionImpl extends NativeFieldWrapperClass1 implements HTMLAll |
| throw const UnsupportedOperationException("Cannot add to immutable List."); |
| } |
| + bool contains(Node element) => _Collections.contains(this, element); |
| + |
| void forEach(void f(Node element)) => _Collections.forEach(this, f); |
| Collection map(f(Node element)) => _Collections.map(this, [], f); |
| @@ -16475,6 +16520,8 @@ class _HTMLCollectionImpl extends NativeFieldWrapperClass1 implements HTMLCollec |
| throw const UnsupportedOperationException("Cannot add to immutable List."); |
| } |
| + bool contains(Node element) => _Collections.contains(this, element); |
| + |
| void forEach(void f(Node element)) => _Collections.forEach(this, f); |
| Collection map(f(Node element)) => _Collections.map(this, [], f); |
| @@ -19015,7 +19062,7 @@ abstract class Int16Array implements ArrayBufferView, List<int> { |
| factory Int16Array.fromList(List<int> list) => |
| _TypedArrayFactoryProvider.createInt16Array_fromList(list); |
| - factory Int16Array.fromBuffer(ArrayBuffer buffer, [int byteOffset, int length]) => |
| + factory Int16Array.fromBuffer(ArrayBuffer buffer, [int byteOffset, int length]) => |
| _TypedArrayFactoryProvider.createInt16Array_fromBuffer(buffer, byteOffset, length); |
| static const int BYTES_PER_ELEMENT = 2; |
| @@ -19068,6 +19115,8 @@ class _Int16ArrayImpl extends _ArrayBufferViewImpl implements Int16Array { |
| throw const UnsupportedOperationException("Cannot add to immutable List."); |
| } |
| + bool contains(int element) => _Collections.contains(this, element); |
| + |
| void forEach(void f(int element)) => _Collections.forEach(this, f); |
| Collection map(f(int element)) => _Collections.map(this, [], f); |
| @@ -19147,7 +19196,7 @@ abstract class Int32Array implements ArrayBufferView, List<int> { |
| factory Int32Array.fromList(List<int> list) => |
| _TypedArrayFactoryProvider.createInt32Array_fromList(list); |
| - factory Int32Array.fromBuffer(ArrayBuffer buffer, [int byteOffset, int length]) => |
| + factory Int32Array.fromBuffer(ArrayBuffer buffer, [int byteOffset, int length]) => |
| _TypedArrayFactoryProvider.createInt32Array_fromBuffer(buffer, byteOffset, length); |
| static const int BYTES_PER_ELEMENT = 4; |
| @@ -19200,6 +19249,8 @@ class _Int32ArrayImpl extends _ArrayBufferViewImpl implements Int32Array { |
| throw const UnsupportedOperationException("Cannot add to immutable List."); |
| } |
| + bool contains(int element) => _Collections.contains(this, element); |
| + |
| void forEach(void f(int element)) => _Collections.forEach(this, f); |
| Collection map(f(int element)) => _Collections.map(this, [], f); |
| @@ -19279,7 +19330,7 @@ abstract class Int8Array implements ArrayBufferView, List<int> { |
| factory Int8Array.fromList(List<int> list) => |
| _TypedArrayFactoryProvider.createInt8Array_fromList(list); |
| - factory Int8Array.fromBuffer(ArrayBuffer buffer, [int byteOffset, int length]) => |
| + factory Int8Array.fromBuffer(ArrayBuffer buffer, [int byteOffset, int length]) => |
| _TypedArrayFactoryProvider.createInt8Array_fromBuffer(buffer, byteOffset, length); |
| static const int BYTES_PER_ELEMENT = 1; |
| @@ -19332,6 +19383,8 @@ class _Int8ArrayImpl extends _ArrayBufferViewImpl implements Int8Array { |
| throw const UnsupportedOperationException("Cannot add to immutable List."); |
| } |
| + bool contains(int element) => _Collections.contains(this, element); |
| + |
| void forEach(void f(int element)) => _Collections.forEach(this, f); |
| Collection map(f(int element)) => _Collections.map(this, [], f); |
| @@ -22037,6 +22090,8 @@ class _MediaStreamListImpl extends NativeFieldWrapperClass1 implements List<Medi |
| throw const UnsupportedOperationException("Cannot add to immutable List."); |
| } |
| + bool contains(MediaStream element) => _Collections.contains(this, element); |
| + |
| void forEach(void f(MediaStream element)) => _Collections.forEach(this, f); |
| Collection map(f(MediaStream element)) => _Collections.map(this, [], f); |
| @@ -23096,6 +23151,8 @@ class _NamedNodeMapImpl extends NativeFieldWrapperClass1 implements NamedNodeMap |
| throw const UnsupportedOperationException("Cannot add to immutable List."); |
| } |
| + bool contains(Node element) => _Collections.contains(this, element); |
| + |
| void forEach(void f(Node element)) => _Collections.forEach(this, f); |
| Collection map(f(Node element)) => _Collections.map(this, [], f); |
| @@ -23548,6 +23605,8 @@ class _ChildNodeListLazy implements List { |
| // TODO(jacobr): We can implement these methods much more efficiently by |
| // looking up the nodeList only once instead of once per iteration. |
| + bool contains(Node element) => _Collections.contains(this, element); |
| + |
| void forEach(void f(Node element)) => _Collections.forEach(this, f); |
| Collection map(f(Node element)) => _Collections.map(this, [], f); |
| @@ -23772,8 +23831,12 @@ class _ListWrapper<E> implements List<E> { |
| _ListWrapper(List this._list); |
| + bool contains(E element) => _list.contains(element); |
| + |
| Iterator<E> iterator() => _list.iterator(); |
| + bool contains(E element)) => _list.contains(element); |
| + |
| void forEach(void f(E element)) => _list.forEach(f); |
| Collection map(f(E element)) => _list.map(f); |
| @@ -23889,6 +23952,8 @@ class _NodeListImpl extends NativeFieldWrapperClass1 implements NodeList { |
| _parent.$dom_replaceChild(value, this[index]); |
| } |
| + bool contains(Node element) => _Collections.contains(this, element); |
| + |
| void forEach(void f(Node element)) => _Collections.forEach(this, f); |
| Collection map(f(Node element)) => _Collections.map(this, [], f); |
| @@ -26503,6 +26568,8 @@ class _SQLResultSetRowListImpl extends NativeFieldWrapperClass1 implements SQLRe |
| throw const UnsupportedOperationException("Cannot add to immutable List."); |
| } |
| + bool contains(Map element) => _Collections.contains(element); |
| + |
| void forEach(void f(Map element)) => _Collections.forEach(this, f); |
| Collection map(f(Map element)) => _Collections.map(this, [], f); |
| @@ -27110,6 +27177,8 @@ class _SVGAnimatedLengthListImpl extends NativeFieldWrapperClass1 implements SVG |
| throw const UnsupportedOperationException("Cannot add to immutable List."); |
| } |
| + bool contains(SVGAnimatedLength element) => _Collections.contains(this, element); |
| + |
| void forEach(void f(SVGAnimatedLength element)) => _Collections.forEach(this, f); |
| Collection map(f(SVGAnimatedLength element)) => _Collections.map(this, [], f); |
| @@ -27249,6 +27318,8 @@ class _SVGAnimatedNumberListImpl extends NativeFieldWrapperClass1 implements SVG |
| throw const UnsupportedOperationException("Cannot add to immutable List."); |
| } |
| + bool contains(SVGAnimatedNumber element) => _Collections.contains(this, element); |
| + |
| void forEach(void f(SVGAnimatedNumber element)) => _Collections.forEach(this, f); |
| Collection map(f(SVGAnimatedNumber element)) => _Collections.map(this, [], f); |
| @@ -27444,6 +27515,8 @@ class _SVGAnimatedTransformListImpl extends NativeFieldWrapperClass1 implements |
| throw const UnsupportedOperationException("Cannot add to immutable List."); |
| } |
| + bool contains(SVGAnimateTransformElement element) => _Collections.contains(this, element); |
| + |
| void forEach(void f(SVGAnimateTransformElement element)) => _Collections.forEach(this, f); |
| Collection map(f(SVGAnimateTransformElement element)) => _Collections.map(this, [], f); |
| @@ -28323,6 +28396,8 @@ class _SVGElementInstanceListImpl extends NativeFieldWrapperClass1 implements Li |
| throw const UnsupportedOperationException("Cannot add to immutable List."); |
| } |
| + bool contains(SVGElementInstance element) => _Collections.contains(this, element); |
| + |
| void forEach(void f(SVGElementInstance element)) => _Collections.forEach(this, f); |
| Collection map(f(SVGElementInstance element)) => _Collections.map(this, [], f); |
| @@ -30477,6 +30552,8 @@ class _SVGLengthListImpl extends NativeFieldWrapperClass1 implements SVGLengthLi |
| throw const UnsupportedOperationException("Cannot add to immutable List."); |
| } |
| + bool contains(SVGLength element) => _Collections,contains(this, element); |
| + |
| void forEach(void f(SVGLength element)) => _Collections.forEach(this, f); |
| Collection map(f(SVGLength element)) => _Collections.map(this, [], f); |
| @@ -31122,6 +31199,8 @@ class _SVGNumberListImpl extends NativeFieldWrapperClass1 implements SVGNumberLi |
| throw const UnsupportedOperationException("Cannot add to immutable List."); |
| } |
| + bool contains(SVGNumber element) => _Collections.contains(this, element); |
| + |
| void forEach(void f(SVGNumber element)) => _Collections.forEach(this, f); |
| Collection map(f(SVGNumber element)) => _Collections.map(this, [], f); |
| @@ -32262,6 +32341,8 @@ class _SVGPathSegListImpl extends NativeFieldWrapperClass1 implements SVGPathSeg |
| throw const UnsupportedOperationException("Cannot add to immutable List."); |
| } |
| + bool contains(SCGPathSeg element) => _Collections.contains(this, element); |
| + |
| void forEach(void f(SVGPathSeg element)) => _Collections.forEach(this, f); |
| Collection map(f(SVGPathSeg element)) => _Collections.map(this, [], f); |
| @@ -33375,6 +33456,8 @@ class _SVGStringListImpl extends NativeFieldWrapperClass1 implements SVGStringLi |
| throw const UnsupportedOperationException("Cannot add to immutable List."); |
| } |
| + bool contains(String element) => _Collections.contains(this, element); |
| + |
| void forEach(void f(String element)) => _Collections.forEach(this, f); |
| Collection map(f(String element)) => _Collections.map(this, [], f); |
| @@ -34079,6 +34162,8 @@ class _SVGTransformListImpl extends NativeFieldWrapperClass1 implements SVGTrans |
| throw const UnsupportedOperationException("Cannot add to immutable List."); |
| } |
| + bool contains(SVGTransform element) => _Collections.contains(this, element); |
| + |
| void forEach(void f(SVGTransform element)) => _Collections.forEach(this, f); |
| Collection map(f(SVGTransform element)) => _Collections.map(this, [], f); |
| @@ -35133,6 +35218,8 @@ class _SourceBufferListImpl extends NativeFieldWrapperClass1 implements SourceBu |
| throw const UnsupportedOperationException("Cannot add to immutable List."); |
| } |
| + bool contains(SourceBuffer element) => _Collections.contains(this, element); |
| + |
| void forEach(void f(SourceBuffer element)) => _Collections.forEach(this, f); |
| Collection map(f(SourceBuffer element)) => _Collections.map(this, [], f); |
| @@ -35351,6 +35438,8 @@ class _SpeechGrammarListImpl extends NativeFieldWrapperClass1 implements SpeechG |
| throw const UnsupportedOperationException("Cannot add to immutable List."); |
| } |
| + bool contains(SpeechGrammar element) => _Collections.contains(this, element); |
| + |
| void forEach(void f(SpeechGrammar element)) => _Collections.forEach(this, f); |
| Collection map(f(SpeechGrammar element)) => _Collections.map(this, [], f); |
| @@ -35520,6 +35609,8 @@ class _SpeechInputResultListImpl extends NativeFieldWrapperClass1 implements Lis |
| throw const UnsupportedOperationException("Cannot add to immutable List."); |
| } |
| + bool contains(SpeechInputResult element) => _CollectionscontainsEach(this, element); |
| + |
| void forEach(void f(SpeechInputResult element)) => _Collections.forEach(this, f); |
| Collection map(f(SpeechInputResult element)) => _Collections.map(this, [], f); |
| @@ -35900,6 +35991,8 @@ class _SpeechRecognitionResultListImpl extends NativeFieldWrapperClass1 implemen |
| throw const UnsupportedOperationException("Cannot add to immutable List."); |
| } |
| + bool contains(SpeechRecognitionResult element) => _Collections.contains(this, element); |
| + |
| void forEach(void f(SpeechRecognitionResult element)) => _Collections.forEach(this, f); |
| Collection map(f(SpeechRecognitionResult element)) => _Collections.map(this, [], f); |
| @@ -36065,13 +36158,13 @@ class _StorageImpl extends NativeFieldWrapperClass1 implements Storage { |
| } |
| Collection<String> getKeys() { |
| - final keys = []; |
| + final keys = <String>[]; |
| forEach((k, v) => keys.add(k)); |
| return keys; |
| } |
| Collection<String> getValues() { |
| - final values = []; |
| + final values = <String>[]; |
| forEach((k, v) => values.add(v)); |
| return values; |
| } |
| @@ -36330,6 +36423,8 @@ class _StyleSheetListImpl extends NativeFieldWrapperClass1 implements List<Style |
| throw const UnsupportedOperationException("Cannot add to immutable List."); |
| } |
| + bool contains(StyleSheet element) => _Collections.contains(this, element); |
| + |
| void forEach(void f(StyleSheet element)) => _Collections.forEach(this, f); |
| Collection map(f(StyleSheet element)) => _Collections.map(this, [], f); |
| @@ -37427,6 +37522,8 @@ class _TextTrackCueListImpl extends NativeFieldWrapperClass1 implements TextTrac |
| throw const UnsupportedOperationException("Cannot add to immutable List."); |
| } |
| + bool contains(TextTrackCue element) => _Collections.contains(this, element); |
| + |
| void forEach(void f(TextTrackCue element)) => _Collections.forEach(this, f); |
| Collection map(f(TextTrackCue element)) => _Collections.map(this, [], f); |
| @@ -37602,6 +37699,8 @@ class _TextTrackListImpl extends NativeFieldWrapperClass1 implements TextTrackLi |
| throw const UnsupportedOperationException("Cannot add to immutable List."); |
| } |
| + bool contains(TextTrack element) => _Collections.contains(this, element); |
| + |
| void forEach(void f(TextTrack element)) => _Collections.forEach(this, f); |
| Collection map(f(TextTrack element)) => _Collections.map(this, [], f); |
| @@ -37919,6 +38018,8 @@ class _TouchListImpl extends NativeFieldWrapperClass1 implements TouchList { |
| throw const UnsupportedOperationException("Cannot add to immutable List."); |
| } |
| + bool contains(Touch element) => _Collections.contains(this, element); |
| + |
| void forEach(void f(Touch element)) => _Collections.forEach(this, f); |
| Collection map(f(Touch element)) => _Collections.map(this, [], f); |
| @@ -38293,7 +38394,7 @@ abstract class Uint16Array implements ArrayBufferView, List<int> { |
| factory Uint16Array.fromList(List<int> list) => |
| _TypedArrayFactoryProvider.createUint16Array_fromList(list); |
| - factory Uint16Array.fromBuffer(ArrayBuffer buffer, [int byteOffset, int length]) => |
| + factory Uint16Array.fromBuffer(ArrayBuffer buffer, [int byteOffset, int length]) => |
| _TypedArrayFactoryProvider.createUint16Array_fromBuffer(buffer, byteOffset, length); |
| static const int BYTES_PER_ELEMENT = 2; |
| @@ -38346,6 +38447,8 @@ class _Uint16ArrayImpl extends _ArrayBufferViewImpl implements Uint16Array { |
| throw const UnsupportedOperationException("Cannot add to immutable List."); |
| } |
| + bool contains(int element) => _Collections.contains(this, element); |
| + |
| void forEach(void f(int element)) => _Collections.forEach(this, f); |
| Collection map(f(int element)) => _Collections.map(this, [], f); |
| @@ -38425,7 +38528,7 @@ abstract class Uint32Array implements ArrayBufferView, List<int> { |
| factory Uint32Array.fromList(List<int> list) => |
| _TypedArrayFactoryProvider.createUint32Array_fromList(list); |
| - factory Uint32Array.fromBuffer(ArrayBuffer buffer, [int byteOffset, int length]) => |
| + factory Uint32Array.fromBuffer(ArrayBuffer buffer, [int byteOffset, int length]) => |
| _TypedArrayFactoryProvider.createUint32Array_fromBuffer(buffer, byteOffset, length); |
| static const int BYTES_PER_ELEMENT = 4; |
| @@ -38478,6 +38581,8 @@ class _Uint32ArrayImpl extends _ArrayBufferViewImpl implements Uint32Array { |
| throw const UnsupportedOperationException("Cannot add to immutable List."); |
| } |
| + bool contains(int element) => _Collections.contains(this, element); |
| + |
| void forEach(void f(int element)) => _Collections.forEach(this, f); |
| Collection map(f(int element)) => _Collections.map(this, [], f); |
| @@ -38557,7 +38662,7 @@ abstract class Uint8Array implements ArrayBufferView, List<int> { |
| factory Uint8Array.fromList(List<int> list) => |
| _TypedArrayFactoryProvider.createUint8Array_fromList(list); |
| - factory Uint8Array.fromBuffer(ArrayBuffer buffer, [int byteOffset, int length]) => |
| + factory Uint8Array.fromBuffer(ArrayBuffer buffer, [int byteOffset, int length]) => |
| _TypedArrayFactoryProvider.createUint8Array_fromBuffer(buffer, byteOffset, length); |
| static const int BYTES_PER_ELEMENT = 1; |
| @@ -38610,6 +38715,8 @@ class _Uint8ArrayImpl extends _ArrayBufferViewImpl implements Uint8Array { |
| throw const UnsupportedOperationException("Cannot add to immutable List."); |
| } |
| + bool contains(int element) => _Collections.contains(this, element); |
| + |
| void forEach(void f(int element)) => _Collections.forEach(this, f); |
| Collection map(f(int element)) => _Collections.map(this, [], f); |
| @@ -38689,7 +38796,7 @@ abstract class Uint8ClampedArray implements Uint8Array { |
| factory Uint8ClampedArray.fromList(List<int> list) => |
| _TypedArrayFactoryProvider.createUint8ClampedArray_fromList(list); |
| - factory Uint8ClampedArray.fromBuffer(ArrayBuffer buffer, [int byteOffset, int length]) => |
| + factory Uint8ClampedArray.fromBuffer(ArrayBuffer buffer, [int byteOffset, int length]) => |
| _TypedArrayFactoryProvider.createUint8ClampedArray_fromBuffer(buffer, byteOffset, length); |
| /** @domName Uint8ClampedArray.length */ |
| @@ -40805,6 +40912,8 @@ class _WebKitAnimationListImpl extends NativeFieldWrapperClass1 implements List< |
| throw const UnsupportedOperationException("Cannot add to immutable List."); |
| } |
| + bool contains(Animation element) => _Collections.contains(this, element); |
| + |
| void forEach(void f(Animation element)) => _Collections.forEach(this, f); |
| Collection map(f(Animation element)) => _Collections.map(this, [], f); |
| @@ -43393,7 +43502,7 @@ class _RemoteSendPortSync implements SendPortSync { |
| } |
| static _call(int isolateId, int portId, var message) { |
| - var target = 'dart-port-$isolateId-$portId'; |
| + var target = 'dart-port-$isolateId-$portId'; |
| // TODO(vsm): Make this re-entrant. |
| // TODO(vsm): Set this up set once, on the first call. |
| var source = '$target-result'; |
| @@ -43458,13 +43567,13 @@ class ReceivePortSync { |
| static int get _isolateId { |
| // TODO(vsm): Make this coherent with existing isolate code. |
| if (_cachedIsolateId == null) { |
| - _cachedIsolateId = _getNewIsolateId(); |
| + _cachedIsolateId = _getNewIsolateId(); |
| } |
| return _cachedIsolateId; |
| } |
| static String _getListenerName(isolateId, portId) => |
| - 'dart-port-$isolateId-$portId'; |
| + 'dart-port-$isolateId-$portId'; |
| String get _listenerName => _getListenerName(_isolateId, _portId); |
| void receive(callback(var message)) { |