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

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

Issue 11299048: Revert "Add List.first." (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
Download patch
« no previous file with comments | « sdk/lib/html/dart2js/html_dart2js.dart ('k') | sdk/lib/html/src/FilteredElementList.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sdk/lib/html/dartium/html_dartium.dart
diff --git a/sdk/lib/html/dartium/html_dartium.dart b/sdk/lib/html/dartium/html_dartium.dart
index 8e88ebff0dcc1e265e0c4f299359bfa8bdb76e74..b861dc410c589aa6304839e36f9e136a1d10d9d0 100644
--- a/sdk/lib/html/dartium/html_dartium.dart
+++ b/sdk/lib/html/dartium/html_dartium.dart
@@ -7374,8 +7374,6 @@ class DOMMimeTypeArray extends NativeFieldWrapperClass1 implements List<DOMMimeT
return _Lists.lastIndexOf(this, element, start);
}
- DOMMimeType get first => this[0];
-
DOMMimeType get last => this[length - 1];
DOMMimeType removeLast() {
@@ -7537,8 +7535,6 @@ class DOMPluginArray extends NativeFieldWrapperClass1 implements List<DOMPlugin>
return _Lists.lastIndexOf(this, element, start);
}
- DOMPlugin get first => this[0];
-
DOMPlugin get last => this[length - 1];
DOMPlugin removeLast() {
@@ -9259,11 +9255,6 @@ class _ChildrenElementList implements List {
return result;
}
- Element get first {
- return _element.$dom_firstElementChild;
- }
-
-
Element get last {
return _element.$dom_lastElementChild;
}
@@ -9278,6 +9269,10 @@ class _FrozenElementList implements List {
_FrozenElementList._wrap(this._nodeList);
+ Element get first {
+ return _nodeList[0];
+ }
+
bool contains(Element element) {
for (Element el in this) {
if (el == element) return true;
@@ -9386,8 +9381,6 @@ class _FrozenElementList implements List {
throw new UnsupportedError('');
}
- Element get first => _nodeList.first;
-
Element get last => _nodeList.last;
}
@@ -11354,8 +11347,6 @@ class Float32Array extends ArrayBufferView implements List<num> {
return _Lists.lastIndexOf(this, element, start);
}
- num get first => this[0];
-
num get last => this[length - 1];
num removeLast() {
@@ -11487,8 +11478,6 @@ class Float64Array extends ArrayBufferView implements List<num> {
return _Lists.lastIndexOf(this, element, start);
}
- num get first => this[0];
-
num get last => this[length - 1];
num removeLast() {
@@ -12066,8 +12055,6 @@ class HTMLAllCollection extends NativeFieldWrapperClass1 implements List<Node> {
return _Lists.lastIndexOf(this, element, start);
}
- Node get first => this[0];
-
Node get last => this[length - 1];
Node removeLast() {
@@ -12179,8 +12166,6 @@ class HTMLCollection extends NativeFieldWrapperClass1 implements List<Node> {
return _Lists.lastIndexOf(this, element, start);
}
- Node get first => this[0];
-
Node get last => this[length - 1];
Node removeLast() {
@@ -14510,8 +14495,6 @@ class Int16Array extends ArrayBufferView implements List<int> {
return _Lists.lastIndexOf(this, element, start);
}
- int get first => this[0];
-
int get last => this[length - 1];
int removeLast() {
@@ -14643,8 +14626,6 @@ class Int32Array extends ArrayBufferView implements List<int> {
return _Lists.lastIndexOf(this, element, start);
}
- int get first => this[0];
-
int get last => this[length - 1];
int removeLast() {
@@ -14776,8 +14757,6 @@ class Int8Array extends ArrayBufferView implements List<int> {
return _Lists.lastIndexOf(this, element, start);
}
- int get first => this[0];
-
int get last => this[length - 1];
int removeLast() {
@@ -17669,8 +17648,6 @@ class NamedNodeMap extends NativeFieldWrapperClass1 implements List<Node> {
return _Lists.lastIndexOf(this, element, start);
}
- Node get first => this[0];
-
Node get last => this[length - 1];
Node removeLast() {
@@ -18271,8 +18248,6 @@ class _ListWrapper<E> implements List<E> {
E removeLast() => _list.removeLast();
- E get first => _list.first;
-
E get last => _list.last;
List<E> getRange(int start, int rangeLength) =>
@@ -18286,6 +18261,8 @@ class _ListWrapper<E> implements List<E> {
void insertRange(int start, int rangeLength, [E initialValue = null]) =>
_list.insertRange(start, rangeLength, initialValue);
+
+ E get first => _list[0];
}
/**
@@ -20686,8 +20663,6 @@ class SQLResultSetRowList extends NativeFieldWrapperClass1 implements List<Map>
return _Lists.lastIndexOf(this, element, start);
}
- Map get first => this[0];
-
Map get last => this[length - 1];
Map removeLast() {
@@ -21406,8 +21381,6 @@ class SourceBufferList extends EventTarget implements List<SourceBuffer> {
return _Lists.lastIndexOf(this, element, start);
}
- SourceBuffer get first => this[0];
-
SourceBuffer get last => this[length - 1];
SourceBuffer removeLast() {
@@ -21607,8 +21580,6 @@ class SpeechGrammarList extends NativeFieldWrapperClass1 implements List<SpeechG
return _Lists.lastIndexOf(this, element, start);
}
- SpeechGrammar get first => this[0];
-
SpeechGrammar get last => this[length - 1];
SpeechGrammar removeLast() {
@@ -23270,8 +23241,6 @@ class TextTrackCueList extends NativeFieldWrapperClass1 implements List<TextTrac
return _Lists.lastIndexOf(this, element, start);
}
- TextTrackCue get first => this[0];
-
TextTrackCue get last => this[length - 1];
TextTrackCue removeLast() {
@@ -23385,8 +23354,6 @@ class TextTrackList extends EventTarget implements List<TextTrack> {
return _Lists.lastIndexOf(this, element, start);
}
- TextTrack get first => this[0];
-
TextTrack get last => this[length - 1];
TextTrack removeLast() {
@@ -23658,8 +23625,6 @@ class TouchList extends NativeFieldWrapperClass1 implements List<Touch> {
return _Lists.lastIndexOf(this, element, start);
}
- Touch get first => this[0];
-
Touch get last => this[length - 1];
Touch removeLast() {
@@ -24028,8 +23993,6 @@ class Uint16Array extends ArrayBufferView implements List<int> {
return _Lists.lastIndexOf(this, element, start);
}
- int get first => this[0];
-
int get last => this[length - 1];
int removeLast() {
@@ -24161,8 +24124,6 @@ class Uint32Array extends ArrayBufferView implements List<int> {
return _Lists.lastIndexOf(this, element, start);
}
- int get first => this[0];
-
int get last => this[length - 1];
int removeLast() {
@@ -24294,8 +24255,6 @@ class Uint8Array extends ArrayBufferView implements List<int> {
return _Lists.lastIndexOf(this, element, start);
}
- int get first => this[0];
-
int get last => this[length - 1];
int removeLast() {
@@ -26980,8 +26939,6 @@ class _CSSRuleList extends NativeFieldWrapperClass1 implements List<CSSRule> {
return _Lists.lastIndexOf(this, element, start);
}
- CSSRule get first => this[0];
-
CSSRule get last => this[length - 1];
CSSRule removeLast() {
@@ -27085,8 +27042,6 @@ class _CSSValueList extends CSSValue implements List<CSSValue> {
return _Lists.lastIndexOf(this, element, start);
}
- CSSValue get first => this[0];
-
CSSValue get last => this[length - 1];
CSSValue removeLast() {
@@ -27190,8 +27145,6 @@ class _ClientRectList extends NativeFieldWrapperClass1 implements List<ClientRec
return _Lists.lastIndexOf(this, element, start);
}
- ClientRect get first => this[0];
-
ClientRect get last => this[length - 1];
ClientRect removeLast() {
@@ -27303,8 +27256,6 @@ class _DOMStringList extends NativeFieldWrapperClass1 implements List<String> {
return _Lists.lastIndexOf(this, element, start);
}
- String get first => this[0];
-
String get last => this[length - 1];
String removeLast() {
@@ -27861,8 +27812,6 @@ class _EntryArray extends NativeFieldWrapperClass1 implements List<Entry> {
return _Lists.lastIndexOf(this, element, start);
}
- Entry get first => this[0];
-
Entry get last => this[length - 1];
Entry removeLast() {
@@ -27966,8 +27915,6 @@ class _EntryArraySync extends NativeFieldWrapperClass1 implements List<EntrySync
return _Lists.lastIndexOf(this, element, start);
}
- EntrySync get first => this[0];
-
EntrySync get last => this[length - 1];
EntrySync removeLast() {
@@ -28079,8 +28026,6 @@ class _FileList extends NativeFieldWrapperClass1 implements List<File> {
return _Lists.lastIndexOf(this, element, start);
}
- File get first => this[0];
-
File get last => this[length - 1];
File removeLast() {
@@ -28208,8 +28153,6 @@ class _GamepadList extends NativeFieldWrapperClass1 implements List<Gamepad> {
return _Lists.lastIndexOf(this, element, start);
}
- Gamepad get first => this[0];
-
Gamepad get last => this[length - 1];
Gamepad removeLast() {
@@ -28362,8 +28305,6 @@ class _MediaStreamList extends NativeFieldWrapperClass1 implements List<MediaStr
return _Lists.lastIndexOf(this, element, start);
}
- MediaStream get first => this[0];
-
MediaStream get last => this[length - 1];
MediaStream removeLast() {
@@ -28571,8 +28512,6 @@ class _SpeechInputResultList extends NativeFieldWrapperClass1 implements List<Sp
return _Lists.lastIndexOf(this, element, start);
}
- SpeechInputResult get first => this[0];
-
SpeechInputResult get last => this[length - 1];
SpeechInputResult removeLast() {
@@ -28684,8 +28623,6 @@ class _SpeechRecognitionResultList extends NativeFieldWrapperClass1 implements L
return _Lists.lastIndexOf(this, element, start);
}
- SpeechRecognitionResult get first => this[0];
-
SpeechRecognitionResult get last => this[length - 1];
SpeechRecognitionResult removeLast() {
@@ -28789,8 +28726,6 @@ class _StyleSheetList extends NativeFieldWrapperClass1 implements List<StyleShee
return _Lists.lastIndexOf(this, element, start);
}
- StyleSheet get first => this[0];
-
StyleSheet get last => this[length - 1];
StyleSheet removeLast() {
@@ -28902,8 +28837,6 @@ class _WebKitAnimationList extends NativeFieldWrapperClass1 implements List<Anim
return _Lists.lastIndexOf(this, element, start);
}
- Animation get first => this[0];
-
Animation get last => this[length - 1];
Animation removeLast() {
@@ -29242,8 +29175,6 @@ class FilteredElementList implements List {
return _filtered.lastIndexOf(element, start);
}
- Element get first => _filtered.first;
-
Element get last => _filtered.last;
}
// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
« no previous file with comments | « sdk/lib/html/dart2js/html_dart2js.dart ('k') | sdk/lib/html/src/FilteredElementList.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698