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

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

Issue 10941047: Don't generate FooList if it behaves like List<Foo> exactly. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 3 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 | lib/html/dartium/html_dartium.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/html/dart2js/html_dart2js.dart
===================================================================
--- lib/html/dart2js/html_dart2js.dart (revision 12656)
+++ lib/html/dart2js/html_dart2js.dart (working copy)
@@ -1836,7 +1836,7 @@
abstract class CSSKeyframesRule implements CSSRule {
/** @domName WebKitCSSKeyframesRule.cssRules */
- abstract CSSRuleList get cssRules;
+ abstract List<CSSRule> get cssRules;
/** @domName WebKitCSSKeyframesRule.name */
String name;
@@ -2052,7 +2052,7 @@
abstract class CSSMediaRule implements CSSRule {
/** @domName CSSMediaRule.cssRules */
- abstract CSSRuleList get cssRules;
+ abstract List<CSSRule> get cssRules;
/** @domName CSSMediaRule.media */
abstract MediaList get media;
@@ -2332,24 +2332,9 @@
final int type;
}
-// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-// WARNING: Do not edit - generated code.
+class _CSSRuleListImpl implements List<CSSRule>, JavaScriptIndexingBehavior native "*CSSRuleList" {
-/// @domName CSSRuleList
-abstract class CSSRuleList implements List<CSSRule> {
-
- /** @domName CSSRuleList.length */
- abstract int get length;
-
- /** @domName CSSRuleList.item */
- CSSRule item(int index);
-}
-
-class _CSSRuleListImpl implements CSSRuleList, JavaScriptIndexingBehavior native "*CSSRuleList" {
-
final int length;
_CSSRuleImpl operator[](int index) native "return this[index];";
@@ -2416,7 +2401,6 @@
throw const UnsupportedOperationException("Cannot removeLast on immutable List.");
}
- // FIXME: implement these.
void setRange(int start, int rangeLength, List<CSSRule> from, [int startFrom]) {
throw const UnsupportedOperationException("Cannot setRange on immutable List.");
}
@@ -7173,13 +7157,13 @@
abstract class CSSStyleSheet implements StyleSheet {
/** @domName CSSStyleSheet.cssRules */
- abstract CSSRuleList get cssRules;
+ abstract List<CSSRule> get cssRules;
/** @domName CSSStyleSheet.ownerRule */
abstract CSSRule get ownerRule;
/** @domName CSSStyleSheet.rules */
- abstract CSSRuleList get rules;
+ abstract List<CSSRule> get rules;
/** @domName CSSStyleSheet.addRule */
int addRule(String selector, String style, [int index]);
@@ -7217,7 +7201,7 @@
// WARNING: Do not edit - generated code.
/// @domName WebKitCSSTransformValue
-abstract class CSSTransformValue implements CSSValueList {
+abstract class CSSTransformValue implements List<CSSValue> {
static const int CSS_MATRIX = 11;
@@ -7361,24 +7345,9 @@
final int cssValueType;
}
-// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-// WARNING: Do not edit - generated code.
+class _CSSValueListImpl extends _CSSValueImpl implements List<CSSValue>, JavaScriptIndexingBehavior native "*CSSValueList" {
-/// @domName CSSValueList
-abstract class CSSValueList implements CSSValue, List<CSSValue> {
-
- /** @domName CSSValueList.length */
- abstract int get length;
-
- /** @domName CSSValueList.item */
- CSSValue item(int index);
-}
-
-class _CSSValueListImpl extends _CSSValueImpl implements CSSValueList, JavaScriptIndexingBehavior native "*CSSValueList" {
-
final int length;
_CSSValueImpl operator[](int index) native "return this[index];";
@@ -7445,7 +7414,6 @@
throw const UnsupportedOperationException("Cannot removeLast on immutable List.");
}
- // FIXME: implement these.
void setRange(int start, int rangeLength, List<CSSValue> from, [int startFrom]) {
throw const UnsupportedOperationException("Cannot setRange on immutable List.");
}
@@ -8046,24 +8014,9 @@
final num width;
}
-// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-// WARNING: Do not edit - generated code.
+class _ClientRectListImpl implements List<ClientRect>, JavaScriptIndexingBehavior native "*ClientRectList" {
-/// @domName ClientRectList
-abstract class ClientRectList implements List<ClientRect> {
-
- /** @domName ClientRectList.length */
- abstract int get length;
-
- /** @domName ClientRectList.item */
- ClientRect item(int index);
-}
-
-class _ClientRectListImpl implements ClientRectList, JavaScriptIndexingBehavior native "*ClientRectList" {
-
final int length;
_ClientRectImpl operator[](int index) native "return this[index];";
@@ -8130,7 +8083,6 @@
throw const UnsupportedOperationException("Cannot removeLast on immutable List.");
}
- // FIXME: implement these.
void setRange(int start, int rangeLength, List<ClientRect> from, [int startFrom]) {
throw const UnsupportedOperationException("Cannot setRange on immutable List.");
}
@@ -8166,7 +8118,7 @@
String effectAllowed;
/** @domName Clipboard.files */
- abstract FileList get files;
+ abstract List<File> get files;
/** @domName Clipboard.items */
abstract DataTransferItemList get items;
@@ -9019,7 +8971,6 @@
throw const UnsupportedOperationException("Cannot removeLast on immutable List.");
}
- // FIXME: implement these.
void setRange(int start, int rangeLength, List<DOMMimeType> from, [int startFrom]) {
throw const UnsupportedOperationException("Cannot setRange on immutable List.");
}
@@ -9188,7 +9139,6 @@
throw const UnsupportedOperationException("Cannot removeLast on immutable List.");
}
- // FIXME: implement these.
void setRange(int start, int rangeLength, List<DOMPlugin> from, [int startFrom]) {
throw const UnsupportedOperationException("Cannot setRange on immutable List.");
}
@@ -9473,7 +9423,6 @@
throw const UnsupportedOperationException("Cannot removeLast on immutable List.");
}
- // FIXME: implement these.
void setRange(int start, int rangeLength, List<String> from, [int startFrom]) {
throw const UnsupportedOperationException("Cannot setRange on immutable List.");
}
@@ -10122,7 +10071,7 @@
abstract class DirectoryReaderSync {
/** @domName DirectoryReaderSync.readEntries */
- EntryArraySync readEntries();
+ List<EntrySync> readEntries();
}
class _DirectoryReaderSyncImpl implements DirectoryReaderSync native "*DirectoryReaderSync" {
@@ -10201,7 +10150,7 @@
String selectedStylesheetSet;
/** @domName Document.styleSheets */
- abstract StyleSheetList get styleSheets;
+ abstract List<StyleSheet> get styleSheets;
/** @domName Document.title */
String title;
@@ -11431,7 +11380,7 @@
ClientRect $dom_getBoundingClientRect();
/** @domName Element.getClientRects */
- ClientRectList $dom_getClientRects();
+ List<ClientRect> $dom_getClientRects();
/** @domName Element.getElementsByClassName */
NodeList $dom_getElementsByClassName(String name);
@@ -12845,24 +12794,9 @@
/** @domName Entry.toURL */
String toURL();
}
-// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-// WARNING: Do not edit - generated code.
+class _EntryArrayImpl implements List<Entry>, JavaScriptIndexingBehavior native "*EntryArray" {
-/// @domName EntryArray
-abstract class EntryArray implements List<Entry> {
-
- /** @domName EntryArray.length */
- abstract int get length;
-
- /** @domName EntryArray.item */
- Entry item(int index);
-}
-
-class _EntryArrayImpl implements EntryArray, JavaScriptIndexingBehavior native "*EntryArray" {
-
final int length;
_EntryImpl operator[](int index) native "return this[index];";
@@ -12929,7 +12863,6 @@
throw const UnsupportedOperationException("Cannot removeLast on immutable List.");
}
- // FIXME: implement these.
void setRange(int start, int rangeLength, List<Entry> from, [int startFrom]) {
throw const UnsupportedOperationException("Cannot setRange on immutable List.");
}
@@ -12949,24 +12882,9 @@
_EntryImpl item(int index) native;
}
-// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-// WARNING: Do not edit - generated code.
+class _EntryArraySyncImpl implements List<EntrySync>, JavaScriptIndexingBehavior native "*EntryArraySync" {
-/// @domName EntryArraySync
-abstract class EntryArraySync implements List<EntrySync> {
-
- /** @domName EntryArraySync.length */
- abstract int get length;
-
- /** @domName EntryArraySync.item */
- EntrySync item(int index);
-}
-
-class _EntryArraySyncImpl implements EntryArraySync, JavaScriptIndexingBehavior native "*EntryArraySync" {
-
final int length;
_EntrySyncImpl operator[](int index) native "return this[index];";
@@ -13033,7 +12951,6 @@
throw const UnsupportedOperationException("Cannot removeLast on immutable List.");
}
- // FIXME: implement these.
void setRange(int start, int rangeLength, List<EntrySync> from, [int startFrom]) {
throw const UnsupportedOperationException("Cannot setRange on immutable List.");
}
@@ -13883,24 +13800,9 @@
final String webkitRelativePath;
}
-// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-// WARNING: Do not edit - generated code.
+class _FileListImpl implements List<File>, JavaScriptIndexingBehavior native "*FileList" {
-/// @domName FileList
-abstract class FileList implements List<File> {
-
- /** @domName FileList.length */
- abstract int get length;
-
- /** @domName FileList.item */
- File item(int index);
-}
-
-class _FileListImpl implements FileList, JavaScriptIndexingBehavior native "*FileList" {
-
final int length;
_FileImpl operator[](int index) native "return this[index];";
@@ -13967,7 +13869,6 @@
throw const UnsupportedOperationException("Cannot removeLast on immutable List.");
}
- // FIXME: implement these.
void setRange(int start, int rangeLength, List<File> from, [int startFrom]) {
throw const UnsupportedOperationException("Cannot setRange on immutable List.");
}
@@ -14408,7 +14309,6 @@
throw const UnsupportedOperationException("Cannot removeLast on immutable List.");
}
- // FIXME: implement these.
void setRange(int start, int rangeLength, List<num> from, [int startFrom]) {
throw const UnsupportedOperationException("Cannot setRange on immutable List.");
}
@@ -14528,7 +14428,6 @@
throw const UnsupportedOperationException("Cannot removeLast on immutable List.");
}
- // FIXME: implement these.
void setRange(int start, int rangeLength, List<num> from, [int startFrom]) {
throw const UnsupportedOperationException("Cannot setRange on immutable List.");
}
@@ -14888,24 +14787,9 @@
final int timestamp;
}
-// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-// WARNING: Do not edit - generated code.
+class _GamepadListImpl implements List<Gamepad>, JavaScriptIndexingBehavior native "*GamepadList" {
-/// @domName GamepadList
-abstract class GamepadList implements List<Gamepad> {
-
- /** @domName GamepadList.length */
- abstract int get length;
-
- /** @domName GamepadList.item */
- Gamepad item(int index);
-}
-
-class _GamepadListImpl implements GamepadList, JavaScriptIndexingBehavior native "*GamepadList" {
-
final int length;
_GamepadImpl operator[](int index) native "return this[index];";
@@ -14972,7 +14856,6 @@
throw const UnsupportedOperationException("Cannot removeLast on immutable List.");
}
- // FIXME: implement these.
void setRange(int start, int rangeLength, List<Gamepad> from, [int startFrom]) {
throw const UnsupportedOperationException("Cannot setRange on immutable List.");
}
@@ -15165,7 +15048,6 @@
throw const UnsupportedOperationException("Cannot removeLast on immutable List.");
}
- // FIXME: implement these.
void setRange(int start, int rangeLength, List<Node> from, [int startFrom]) {
throw const UnsupportedOperationException("Cannot setRange on immutable List.");
}
@@ -15276,7 +15158,6 @@
throw const UnsupportedOperationException("Cannot removeLast on immutable List.");
}
- // FIXME: implement these.
void setRange(int start, int rangeLength, List<Node> from, [int startFrom]) {
throw const UnsupportedOperationException("Cannot setRange on immutable List.");
}
@@ -17262,7 +17143,7 @@
bool disabled;
/** @domName HTMLInputElement.files */
- FileList files;
+ List<File> files;
/** @domName HTMLInputElement.form */
abstract FormElement get form;
@@ -17364,7 +17245,7 @@
num valueAsNumber;
/** @domName HTMLInputElement.webkitEntries */
- abstract EntryArray get webkitEntries;
+ abstract List<Entry> get webkitEntries;
/** @domName HTMLInputElement.webkitGrammar */
bool webkitGrammar;
@@ -17624,7 +17505,6 @@
throw const UnsupportedOperationException("Cannot removeLast on immutable List.");
}
- // FIXME: implement these.
void setRange(int start, int rangeLength, List<int> from, [int startFrom]) {
throw const UnsupportedOperationException("Cannot setRange on immutable List.");
}
@@ -17744,7 +17624,6 @@
throw const UnsupportedOperationException("Cannot removeLast on immutable List.");
}
- // FIXME: implement these.
void setRange(int start, int rangeLength, List<int> from, [int startFrom]) {
throw const UnsupportedOperationException("Cannot setRange on immutable List.");
}
@@ -17864,7 +17743,6 @@
throw const UnsupportedOperationException("Cannot removeLast on immutable List.");
}
- // FIXME: implement these.
void setRange(int start, int rangeLength, List<int> from, [int startFrom]) {
throw const UnsupportedOperationException("Cannot setRange on immutable List.");
}
@@ -18300,6 +18178,219 @@
// WARNING: Do not edit - generated code.
+/// @domName CSSRuleList
+abstract class List<CSSRule> implements List<CSSRule> {
vsm 2012/09/21 15:17:33 This looks broken - it's basically redeclaring Lis
Emily Fortuna 2012/09/21 18:32:15 No, this was an accident I uploaded this. This was
+
+ /** @domName CSSRuleList.length */
+ abstract int get length;
+
+ /** @domName CSSRuleList.item */
+ CSSRule item(int index);
+}
+// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+// WARNING: Do not edit - generated code.
+
+/// @domName CSSValueList
+abstract class List<CSSValue> implements CSSValue, List<CSSValue> {
+
+ /** @domName CSSValueList.length */
+ abstract int get length;
+
+ /** @domName CSSValueList.item */
+ CSSValue item(int index);
+}
+// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+// WARNING: Do not edit - generated code.
+
+/// @domName ClientRectList
+abstract class List<ClientRect> implements List<ClientRect> {
+
+ /** @domName ClientRectList.length */
+ abstract int get length;
+
+ /** @domName ClientRectList.item */
+ ClientRect item(int index);
+}
+// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+// WARNING: Do not edit - generated code.
+
+/// @domName EntryArray
+abstract class List<Entry> implements List<Entry> {
+
+ /** @domName EntryArray.length */
+ abstract int get length;
+
+ /** @domName EntryArray.item */
+ Entry item(int index);
+}
+// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+// WARNING: Do not edit - generated code.
+
+/// @domName EntryArraySync
+abstract class List<EntrySync> implements List<EntrySync> {
+
+ /** @domName EntryArraySync.length */
+ abstract int get length;
+
+ /** @domName EntryArraySync.item */
+ EntrySync item(int index);
+}
+// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+// WARNING: Do not edit - generated code.
+
+/// @domName FileList
+abstract class List<File> implements List<File> {
+
+ /** @domName FileList.length */
+ abstract int get length;
+
+ /** @domName FileList.item */
+ File item(int index);
+}
+// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+// WARNING: Do not edit - generated code.
+
+/// @domName GamepadList
+abstract class List<Gamepad> implements List<Gamepad> {
+
+ /** @domName GamepadList.length */
+ abstract int get length;
+
+ /** @domName GamepadList.item */
+ Gamepad item(int index);
+}
+// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+// WARNING: Do not edit - generated code.
+
+/// @domName MediaStreamList
+abstract class List<MediaStream> implements List<MediaStream> {
+
+ /** @domName MediaStreamList.length */
+ abstract int get length;
+
+ /** @domName MediaStreamList.item */
+ MediaStream item(int index);
+}
+// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+// WARNING: Do not edit - generated code.
+
+/// @domName SVGElementInstanceList
+abstract class List<SVGElementInstance> implements List<SVGElementInstance> {
+
+ /** @domName SVGElementInstanceList.length */
+ abstract int get length;
+
+ /** @domName SVGElementInstanceList.item */
+ SVGElementInstance item(int index);
+}
+// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+// WARNING: Do not edit - generated code.
+
+/// @domName SVGPathSegList
+abstract class List<SVGPathSeg> implements List<SVGPathSeg> {
+
+ /** @domName SVGPathSegList.numberOfItems */
+ abstract int get numberOfItems;
+
+ /** @domName SVGPathSegList.appendItem */
+ SVGPathSeg appendItem(SVGPathSeg newItem);
+
+ /** @domName SVGPathSegList.clear */
+ void clear();
+
+ /** @domName SVGPathSegList.getItem */
+ SVGPathSeg getItem(int index);
+
+ /** @domName SVGPathSegList.initialize */
+ SVGPathSeg initialize(SVGPathSeg newItem);
+
+ /** @domName SVGPathSegList.insertItemBefore */
+ SVGPathSeg insertItemBefore(SVGPathSeg newItem, int index);
+
+ /** @domName SVGPathSegList.removeItem */
+ SVGPathSeg removeItem(int index);
+
+ /** @domName SVGPathSegList.replaceItem */
+ SVGPathSeg replaceItem(SVGPathSeg newItem, int index);
+}
+// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+// WARNING: Do not edit - generated code.
+
+/// @domName SpeechInputResultList
+abstract class List<SpeechInputResult> implements List<SpeechInputResult> {
+
+ /** @domName SpeechInputResultList.length */
+ abstract int get length;
+
+ /** @domName SpeechInputResultList.item */
+ SpeechInputResult item(int index);
+}
+// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+// WARNING: Do not edit - generated code.
+
+/// @domName SpeechRecognitionResultList
+abstract class List<SpeechRecognitionResult> implements List<SpeechRecognitionResult> {
+
+ /** @domName SpeechRecognitionResultList.length */
+ abstract int get length;
+
+ /** @domName SpeechRecognitionResultList.item */
+ SpeechRecognitionResult item(int index);
+}
+// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+// WARNING: Do not edit - generated code.
+
+/// @domName StyleSheetList
+abstract class List<StyleSheet> implements List<StyleSheet> {
+
+ /** @domName StyleSheetList.length */
+ abstract int get length;
+
+ /** @domName StyleSheetList.item */
+ StyleSheet item(int index);
+}
+// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+// WARNING: Do not edit - generated code.
+
/// @domName LocalMediaStream
abstract class LocalMediaStream implements MediaStream, EventTarget {
@@ -19103,7 +19194,7 @@
// WARNING: Do not edit - generated code.
/// @domName MediaList
-abstract class MediaList implements List<String> {
+abstract class MediaList {
/** @domName MediaList.length */
abstract int get length;
@@ -19121,94 +19212,12 @@
String item(int index);
}
-class _MediaListImpl implements MediaList, JavaScriptIndexingBehavior native "*MediaList" {
+class _MediaListImpl implements MediaList native "*MediaList" {
final int length;
String mediaText;
- String operator[](int index) native "return this[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 const UnsupportedOperationException("Cannot add to immutable List.");
- }
-
- void addLast(String value) {
- throw const UnsupportedOperationException("Cannot add to immutable List.");
- }
-
- void addAll(Collection<String> collection) {
- throw const UnsupportedOperationException("Cannot add to immutable List.");
- }
-
- void forEach(void f(String element)) => _Collections.forEach(this, f);
-
- Collection map(f(String element)) => _Collections.map(this, [], f);
-
- Collection<String> filter(bool f(String element)) =>
- _Collections.filter(this, <String>[], f);
-
- bool every(bool f(String element)) => _Collections.every(this, f);
-
- bool some(bool f(String element)) => _Collections.some(this, f);
-
- bool isEmpty() => this.length == 0;
-
- // From List<String>:
-
- void sort(int compare(String a, String b)) {
- throw const UnsupportedOperationException("Cannot sort immutable List.");
- }
-
- int indexOf(String element, [int start = 0]) =>
- _Lists.indexOf(this, element, start, this.length);
-
- int lastIndexOf(String element, [int start]) {
- if (start === null) start = length - 1;
- return _Lists.lastIndexOf(this, element, start);
- }
-
- String last() => this[length - 1];
-
- String removeLast() {
- throw const UnsupportedOperationException("Cannot removeLast on immutable List.");
- }
-
- // FIXME: implement these.
- void setRange(int start, int rangeLength, List<String> from, [int startFrom]) {
- throw const UnsupportedOperationException("Cannot setRange on immutable List.");
- }
-
- void removeRange(int start, int rangeLength) {
- throw const UnsupportedOperationException("Cannot removeRange on immutable List.");
- }
-
- void insertRange(int start, int rangeLength, [String initialValue]) {
- throw const UnsupportedOperationException("Cannot insertRange on immutable List.");
- }
-
- List<String> getRange(int start, int rangeLength) =>
- _Lists.getRange(this, start, rangeLength, <String>[]);
-
- // -- end List<String> mixins.
-
void appendMedium(String newMedium) native;
void deleteMedium(String oldMedium) native;
@@ -19433,24 +19442,9 @@
EventListenerList get ended => this['ended'];
}
-// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-// WARNING: Do not edit - generated code.
+class _MediaStreamListImpl implements List<MediaStream>, JavaScriptIndexingBehavior native "*MediaStreamList" {
-/// @domName MediaStreamList
-abstract class MediaStreamList implements List<MediaStream> {
-
- /** @domName MediaStreamList.length */
- abstract int get length;
-
- /** @domName MediaStreamList.item */
- MediaStream item(int index);
-}
-
-class _MediaStreamListImpl implements MediaStreamList, JavaScriptIndexingBehavior native "*MediaStreamList" {
-
final int length;
_MediaStreamImpl operator[](int index) native "return this[index];";
@@ -19517,7 +19511,6 @@
throw const UnsupportedOperationException("Cannot removeLast on immutable List.");
}
- // FIXME: implement these.
void setRange(int start, int rangeLength, List<MediaStream> from, [int startFrom]) {
throw const UnsupportedOperationException("Cannot setRange on immutable List.");
}
@@ -20505,7 +20498,6 @@
throw const UnsupportedOperationException("Cannot removeLast on immutable List.");
}
- // FIXME: implement these.
void setRange(int start, int rangeLength, List<Node> from, [int startFrom]) {
throw const UnsupportedOperationException("Cannot setRange on immutable List.");
}
@@ -20601,7 +20593,7 @@
bool javaEnabled();
/** @domName Navigator.webkitGetGamepads */
- GamepadList webkitGetGamepads();
+ List<Gamepad> webkitGetGamepads();
/** @domName Navigator.webkitGetUserMedia */
void webkitGetUserMedia(Map options, NavigatorUserMediaSuccessCallback successCallback, [NavigatorUserMediaErrorCallback errorCallback]);
@@ -22208,7 +22200,7 @@
abstract SessionDescription get localDescription;
/** @domName PeerConnection00.localStreams */
- abstract MediaStreamList get localStreams;
+ abstract List<MediaStream> get localStreams;
/** @domName PeerConnection00.readyState */
abstract int get readyState;
@@ -22217,7 +22209,7 @@
abstract SessionDescription get remoteDescription;
/** @domName PeerConnection00.remoteStreams */
- abstract MediaStreamList get remoteStreams;
+ abstract List<MediaStream> get remoteStreams;
/** @domName PeerConnection00.addEventListener */
void $dom_addEventListener(String type, EventListener listener, [bool useCapture]);
@@ -22901,7 +22893,7 @@
abstract RTCSessionDescription get localDescription;
/** @domName RTCPeerConnection.localStreams */
- abstract MediaStreamList get localStreams;
+ abstract List<MediaStream> get localStreams;
/** @domName RTCPeerConnection.readyState */
abstract String get readyState;
@@ -22910,7 +22902,7 @@
abstract RTCSessionDescription get remoteDescription;
/** @domName RTCPeerConnection.remoteStreams */
- abstract MediaStreamList get remoteStreams;
+ abstract List<MediaStream> get remoteStreams;
/** @domName RTCPeerConnection.addEventListener */
void $dom_addEventListener(String type, EventListener listener, [bool useCapture]);
@@ -23154,7 +23146,6 @@
throw const UnsupportedOperationException("Cannot removeLast on immutable List.");
}
- // FIXME: implement these.
void setRange(int start, int rangeLength, List<Node> from, [int startFrom]) {
throw const UnsupportedOperationException("Cannot setRange on immutable List.");
}
@@ -23249,7 +23240,7 @@
ClientRect getBoundingClientRect();
/** @domName Range.getClientRects */
- ClientRectList getClientRects();
+ List<ClientRect> getClientRects();
/** @domName Range.insertNode */
void insertNode(Node newNode);
@@ -24155,7 +24146,6 @@
throw const UnsupportedOperationException("Cannot removeLast on immutable List.");
}
- // FIXME: implement these.
void setRange(int start, int rangeLength, List<SVGAnimatedLength> from, [int startFrom]) {
throw const UnsupportedOperationException("Cannot setRange on immutable List.");
}
@@ -24281,7 +24271,6 @@
throw const UnsupportedOperationException("Cannot removeLast on immutable List.");
}
- // FIXME: implement these.
void setRange(int start, int rangeLength, List<SVGAnimatedNumber> from, [int startFrom]) {
throw const UnsupportedOperationException("Cannot setRange on immutable List.");
}
@@ -24451,7 +24440,6 @@
throw const UnsupportedOperationException("Cannot removeLast on immutable List.");
}
- // FIXME: implement these.
void setRange(int start, int rangeLength, List<SVGAnimateTransformElement> from, [int startFrom]) {
throw const UnsupportedOperationException("Cannot setRange on immutable List.");
}
@@ -25043,7 +25031,7 @@
SVGElementInstanceEvents get on;
/** @domName SVGElementInstance.childNodes */
- abstract SVGElementInstanceList get childNodes;
+ abstract List<SVGElementInstance> get childNodes;
/** @domName SVGElementInstance.correspondingElement */
abstract SVGElement get correspondingElement;
@@ -25255,24 +25243,9 @@
EventListenerList get unload => this['unload'];
}
-// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-// WARNING: Do not edit - generated code.
+class _SVGElementInstanceListImpl implements List<SVGElementInstance>, JavaScriptIndexingBehavior native "*SVGElementInstanceList" {
-/// @domName SVGElementInstanceList
-abstract class SVGElementInstanceList implements List<SVGElementInstance> {
-
- /** @domName SVGElementInstanceList.length */
- abstract int get length;
-
- /** @domName SVGElementInstanceList.item */
- SVGElementInstance item(int index);
-}
-
-class _SVGElementInstanceListImpl implements SVGElementInstanceList, JavaScriptIndexingBehavior native "*SVGElementInstanceList" {
-
final int length;
_SVGElementInstanceImpl operator[](int index) native "return this[index];";
@@ -25339,7 +25312,6 @@
throw const UnsupportedOperationException("Cannot removeLast on immutable List.");
}
- // FIXME: implement these.
void setRange(int start, int rangeLength, List<SVGElementInstance> from, [int startFrom]) {
throw const UnsupportedOperationException("Cannot setRange on immutable List.");
}
@@ -27468,7 +27440,6 @@
throw const UnsupportedOperationException("Cannot removeLast on immutable List.");
}
- // FIXME: implement these.
void setRange(int start, int rangeLength, List<SVGLength> from, [int startFrom]) {
throw const UnsupportedOperationException("Cannot setRange on immutable List.");
}
@@ -28075,7 +28046,6 @@
throw const UnsupportedOperationException("Cannot removeLast on immutable List.");
}
- // FIXME: implement these.
void setRange(int start, int rangeLength, List<SVGNumber> from, [int startFrom]) {
throw const UnsupportedOperationException("Cannot setRange on immutable List.");
}
@@ -28189,19 +28159,19 @@
abstract class SVGPathElement implements SVGElement, SVGTests, SVGLangSpace, SVGExternalResourcesRequired, SVGStylable, SVGTransformable {
/** @domName SVGPathElement.animatedNormalizedPathSegList */
- abstract SVGPathSegList get animatedNormalizedPathSegList;
+ abstract List<SVGPathSeg> get animatedNormalizedPathSegList;
/** @domName SVGPathElement.animatedPathSegList */
- abstract SVGPathSegList get animatedPathSegList;
+ abstract List<SVGPathSeg> get animatedPathSegList;
/** @domName SVGPathElement.normalizedPathSegList */
- abstract SVGPathSegList get normalizedPathSegList;
+ abstract List<SVGPathSeg> get normalizedPathSegList;
/** @domName SVGPathElement.pathLength */
abstract SVGAnimatedNumber get pathLength;
/** @domName SVGPathElement.pathSegList */
- abstract SVGPathSegList get pathSegList;
+ abstract List<SVGPathSeg> get pathSegList;
/** @domName SVGPathElement.createSVGPathSegArcAbs */
SVGPathSegArcAbs createSVGPathSegArcAbs(num x, num y, num r1, num r2, num angle, bool largeArcFlag, bool sweepFlag);
@@ -28949,42 +28919,9 @@
num y;
}
-// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-// WARNING: Do not edit - generated code.
+class _SVGPathSegListImpl implements List<SVGPathSeg>, JavaScriptIndexingBehavior native "*SVGPathSegList" {
-/// @domName SVGPathSegList
-abstract class SVGPathSegList implements List<SVGPathSeg> {
-
- /** @domName SVGPathSegList.numberOfItems */
- abstract int get numberOfItems;
-
- /** @domName SVGPathSegList.appendItem */
- SVGPathSeg appendItem(SVGPathSeg newItem);
-
- /** @domName SVGPathSegList.clear */
- void clear();
-
- /** @domName SVGPathSegList.getItem */
- SVGPathSeg getItem(int index);
-
- /** @domName SVGPathSegList.initialize */
- SVGPathSeg initialize(SVGPathSeg newItem);
-
- /** @domName SVGPathSegList.insertItemBefore */
- SVGPathSeg insertItemBefore(SVGPathSeg newItem, int index);
-
- /** @domName SVGPathSegList.removeItem */
- SVGPathSeg removeItem(int index);
-
- /** @domName SVGPathSegList.replaceItem */
- SVGPathSeg replaceItem(SVGPathSeg newItem, int index);
-}
-
-class _SVGPathSegListImpl implements SVGPathSegList, JavaScriptIndexingBehavior native "*SVGPathSegList" {
-
final int numberOfItems;
_SVGPathSegImpl operator[](int index) native "return this[index];";
@@ -29051,7 +28988,6 @@
throw const UnsupportedOperationException("Cannot removeLast on immutable List.");
}
- // FIXME: implement these.
void setRange(int start, int rangeLength, List<SVGPathSeg> from, [int startFrom]) {
throw const UnsupportedOperationException("Cannot setRange on immutable List.");
}
@@ -30123,7 +30059,6 @@
throw const UnsupportedOperationException("Cannot removeLast on immutable List.");
}
- // FIXME: implement these.
void setRange(int start, int rangeLength, List<String> from, [int startFrom]) {
throw const UnsupportedOperationException("Cannot setRange on immutable List.");
}
@@ -30809,7 +30744,6 @@
throw const UnsupportedOperationException("Cannot removeLast on immutable List.");
}
- // FIXME: implement these.
void setRange(int start, int rangeLength, List<SVGTransform> from, [int startFrom]) {
throw const UnsupportedOperationException("Cannot setRange on immutable List.");
}
@@ -31735,7 +31669,6 @@
throw const UnsupportedOperationException("Cannot removeLast on immutable List.");
}
- // FIXME: implement these.
void setRange(int start, int rangeLength, List<SourceBuffer> from, [int startFrom]) {
throw const UnsupportedOperationException("Cannot setRange on immutable List.");
}
@@ -31920,7 +31853,6 @@
throw const UnsupportedOperationException("Cannot removeLast on immutable List.");
}
- // FIXME: implement these.
void setRange(int start, int rangeLength, List<SpeechGrammar> from, [int startFrom]) {
throw const UnsupportedOperationException("Cannot setRange on immutable List.");
}
@@ -31954,7 +31886,7 @@
abstract class SpeechInputEvent implements Event {
/** @domName SpeechInputEvent.results */
- abstract SpeechInputResultList get results;
+ abstract List<SpeechInputResult> get results;
}
class _SpeechInputEventImpl extends _EventImpl implements SpeechInputEvent native "*SpeechInputEvent" {
@@ -31983,24 +31915,9 @@
final String utterance;
}
-// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-// WARNING: Do not edit - generated code.
+class _SpeechInputResultListImpl implements List<SpeechInputResult>, JavaScriptIndexingBehavior native "*SpeechInputResultList" {
-/// @domName SpeechInputResultList
-abstract class SpeechInputResultList implements List<SpeechInputResult> {
-
- /** @domName SpeechInputResultList.length */
- abstract int get length;
-
- /** @domName SpeechInputResultList.item */
- SpeechInputResult item(int index);
-}
-
-class _SpeechInputResultListImpl implements SpeechInputResultList, JavaScriptIndexingBehavior native "*SpeechInputResultList" {
-
final int length;
_SpeechInputResultImpl operator[](int index) native "return this[index];";
@@ -32067,7 +31984,6 @@
throw const UnsupportedOperationException("Cannot removeLast on immutable List.");
}
- // FIXME: implement these.
void setRange(int start, int rangeLength, List<SpeechInputResult> from, [int startFrom]) {
throw const UnsupportedOperationException("Cannot setRange on immutable List.");
}
@@ -32253,7 +32169,7 @@
abstract SpeechRecognitionResult get result;
/** @domName SpeechRecognitionEvent.resultHistory */
- abstract SpeechRecognitionResultList get resultHistory;
+ abstract List<SpeechRecognitionResult> get resultHistory;
/** @domName SpeechRecognitionEvent.resultIndex */
abstract int get resultIndex;
@@ -32353,24 +32269,9 @@
_SpeechRecognitionAlternativeImpl item(int index) native;
}
-// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-// WARNING: Do not edit - generated code.
+class _SpeechRecognitionResultListImpl implements List<SpeechRecognitionResult>, JavaScriptIndexingBehavior native "*SpeechRecognitionResultList" {
-/// @domName SpeechRecognitionResultList
-abstract class SpeechRecognitionResultList implements List<SpeechRecognitionResult> {
-
- /** @domName SpeechRecognitionResultList.length */
- abstract int get length;
-
- /** @domName SpeechRecognitionResultList.item */
- SpeechRecognitionResult item(int index);
-}
-
-class _SpeechRecognitionResultListImpl implements SpeechRecognitionResultList, JavaScriptIndexingBehavior native "*SpeechRecognitionResultList" {
-
final int length;
_SpeechRecognitionResultImpl operator[](int index) native "return this[index];";
@@ -32437,7 +32338,6 @@
throw const UnsupportedOperationException("Cannot removeLast on immutable List.");
}
- // FIXME: implement these.
void setRange(int start, int rangeLength, List<SpeechRecognitionResult> from, [int startFrom]) {
throw const UnsupportedOperationException("Cannot setRange on immutable List.");
}
@@ -32757,24 +32657,9 @@
final String type;
}
-// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-// WARNING: Do not edit - generated code.
+class _StyleSheetListImpl implements List<StyleSheet>, JavaScriptIndexingBehavior native "*StyleSheetList" {
-/// @domName StyleSheetList
-abstract class StyleSheetList implements List<StyleSheet> {
-
- /** @domName StyleSheetList.length */
- abstract int get length;
-
- /** @domName StyleSheetList.item */
- StyleSheet item(int index);
-}
-
-class _StyleSheetListImpl implements StyleSheetList, JavaScriptIndexingBehavior native "*StyleSheetList" {
-
final int length;
_StyleSheetImpl operator[](int index) native "return this[index];";
@@ -32841,7 +32726,6 @@
throw const UnsupportedOperationException("Cannot removeLast on immutable List.");
}
- // FIXME: implement these.
void setRange(int start, int rangeLength, List<StyleSheet> from, [int startFrom]) {
throw const UnsupportedOperationException("Cannot setRange on immutable List.");
}
@@ -33721,7 +33605,6 @@
throw const UnsupportedOperationException("Cannot removeLast on immutable List.");
}
- // FIXME: implement these.
void setRange(int start, int rangeLength, List<TextTrackCue> from, [int startFrom]) {
throw const UnsupportedOperationException("Cannot setRange on immutable List.");
}
@@ -33883,7 +33766,6 @@
throw const UnsupportedOperationException("Cannot removeLast on immutable List.");
}
- // FIXME: implement these.
void setRange(int start, int rangeLength, List<TextTrack> from, [int startFrom]) {
throw const UnsupportedOperationException("Cannot setRange on immutable List.");
}
@@ -34171,7 +34053,6 @@
throw const UnsupportedOperationException("Cannot removeLast on immutable List.");
}
- // FIXME: implement these.
void setRange(int start, int rangeLength, List<Touch> from, [int startFrom]) {
throw const UnsupportedOperationException("Cannot setRange on immutable List.");
}
@@ -34553,7 +34434,6 @@
throw const UnsupportedOperationException("Cannot removeLast on immutable List.");
}
- // FIXME: implement these.
void setRange(int start, int rangeLength, List<int> from, [int startFrom]) {
throw const UnsupportedOperationException("Cannot setRange on immutable List.");
}
@@ -34673,7 +34553,6 @@
throw const UnsupportedOperationException("Cannot removeLast on immutable List.");
}
- // FIXME: implement these.
void setRange(int start, int rangeLength, List<int> from, [int startFrom]) {
throw const UnsupportedOperationException("Cannot setRange on immutable List.");
}
@@ -34793,7 +34672,6 @@
throw const UnsupportedOperationException("Cannot removeLast on immutable List.");
}
- // FIXME: implement these.
void setRange(int start, int rangeLength, List<int> from, [int startFrom]) {
throw const UnsupportedOperationException("Cannot setRange on immutable List.");
}
@@ -37323,7 +37201,7 @@
// WARNING: Do not edit - generated code.
/// @domName WebKitCSSFilterValue
-abstract class WebKitCSSFilterValue implements CSSValueList {
+abstract class WebKitCSSFilterValue implements List<CSSValue> {
static const int CSS_FILTER_BLUR = 10;
@@ -37846,7 +37724,7 @@
CSSStyleDeclaration $dom_getComputedStyle(Element element, String pseudoElement);
/** @domName DOMWindow.getMatchedCSSRules */
- CSSRuleList getMatchedCSSRules(Element element, String pseudoElement);
+ List<CSSRule> getMatchedCSSRules(Element element, String pseudoElement);
/** @domName DOMWindow.getSelection */
DOMSelection getSelection();
@@ -41270,14 +41148,11 @@
}
if (e is _FileListImpl) return e;
- if (e is FileList) {
- throw const NotImplementedException('structured clone of FileList');
- }
// TODO(sra): Firefox: How to convert _TypedImageData on the other end?
if (e is _ImageDataImpl) return e;
if (e is ImageData) {
- throw const NotImplementedException('structured clone of FileList');
+ throw const NotImplementedException('structured clone of ImageData');
}
if (e is _ArrayBufferImpl) return e;
« no previous file with comments | « no previous file | lib/html/dartium/html_dartium.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698