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

Side by Side Diff: sdk/lib/html/dart2js/html_dart2js.dart

Issue 11269004: Change List.sort to not have a default parameter value. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Updated to tup of tree. Created 8 years 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
OLDNEW
1 library html; 1 library html;
2 2
3 import 'dart:collection'; 3 import 'dart:collection';
4 import 'dart:html_common'; 4 import 'dart:html_common';
5 import 'dart:indexed_db'; 5 import 'dart:indexed_db';
6 import 'dart:isolate'; 6 import 'dart:isolate';
7 import 'dart:json'; 7 import 'dart:json';
8 import 'dart:svg' as svg; 8 import 'dart:svg' as svg;
9 import 'dart:web_audio' as web_audio; 9 import 'dart:web_audio' as web_audio;
10 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 10 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
(...skipping 5310 matching lines...) Expand 10 before | Expand all | Expand 10 after
5321 Collections.filter(this, <DOMMimeType>[], f); 5321 Collections.filter(this, <DOMMimeType>[], f);
5322 5322
5323 bool every(bool f(DOMMimeType element)) => Collections.every(this, f); 5323 bool every(bool f(DOMMimeType element)) => Collections.every(this, f);
5324 5324
5325 bool some(bool f(DOMMimeType element)) => Collections.some(this, f); 5325 bool some(bool f(DOMMimeType element)) => Collections.some(this, f);
5326 5326
5327 bool get isEmpty => this.length == 0; 5327 bool get isEmpty => this.length == 0;
5328 5328
5329 // From List<DOMMimeType>: 5329 // From List<DOMMimeType>:
5330 5330
5331 void sort([Comparator<DOMMimeType> compare = Comparable.compare]) { 5331 void sort([int compare(DOMMimeType a, DOMMimeType b)]) {
5332 throw new UnsupportedError("Cannot sort immutable List."); 5332 throw new UnsupportedError("Cannot sort immutable List.");
5333 } 5333 }
5334 5334
5335 int indexOf(DOMMimeType element, [int start = 0]) => 5335 int indexOf(DOMMimeType element, [int start = 0]) =>
5336 Lists.indexOf(this, element, start, this.length); 5336 Lists.indexOf(this, element, start, this.length);
5337 5337
5338 int lastIndexOf(DOMMimeType element, [int start]) { 5338 int lastIndexOf(DOMMimeType element, [int start]) {
5339 if (start == null) start = length - 1; 5339 if (start == null) start = length - 1;
5340 return Lists.lastIndexOf(this, element, start); 5340 return Lists.lastIndexOf(this, element, start);
5341 } 5341 }
(...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after
5470 Collections.filter(this, <DOMPlugin>[], f); 5470 Collections.filter(this, <DOMPlugin>[], f);
5471 5471
5472 bool every(bool f(DOMPlugin element)) => Collections.every(this, f); 5472 bool every(bool f(DOMPlugin element)) => Collections.every(this, f);
5473 5473
5474 bool some(bool f(DOMPlugin element)) => Collections.some(this, f); 5474 bool some(bool f(DOMPlugin element)) => Collections.some(this, f);
5475 5475
5476 bool get isEmpty => this.length == 0; 5476 bool get isEmpty => this.length == 0;
5477 5477
5478 // From List<DOMPlugin>: 5478 // From List<DOMPlugin>:
5479 5479
5480 void sort([Comparator<DOMPlugin> compare = Comparable.compare]) { 5480 void sort([int compare(DOMPlugin a, DOMPlugin b)]) {
5481 throw new UnsupportedError("Cannot sort immutable List."); 5481 throw new UnsupportedError("Cannot sort immutable List.");
5482 } 5482 }
5483 5483
5484 int indexOf(DOMPlugin element, [int start = 0]) => 5484 int indexOf(DOMPlugin element, [int start = 0]) =>
5485 Lists.indexOf(this, element, start, this.length); 5485 Lists.indexOf(this, element, start, this.length);
5486 5486
5487 int lastIndexOf(DOMPlugin element, [int start]) { 5487 int lastIndexOf(DOMPlugin element, [int start]) {
5488 if (start == null) start = length - 1; 5488 if (start == null) start = length - 1;
5489 return Lists.lastIndexOf(this, element, start); 5489 return Lists.lastIndexOf(this, element, start);
5490 } 5490 }
(...skipping 552 matching lines...) Expand 10 before | Expand all | Expand 10 after
6043 6043
6044 /// @domName DirectoryReaderSync.readEntries; @docsEditable true 6044 /// @domName DirectoryReaderSync.readEntries; @docsEditable true
6045 @Returns('_EntryArraySync') @Creates('_EntryArraySync') 6045 @Returns('_EntryArraySync') @Creates('_EntryArraySync')
6046 List<EntrySync> readEntries() native; 6046 List<EntrySync> readEntries() native;
6047 } 6047 }
6048 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 6048 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
6049 // for details. All rights reserved. Use of this source code is governed by a 6049 // for details. All rights reserved. Use of this source code is governed by a
6050 // BSD-style license that can be found in the LICENSE file. 6050 // BSD-style license that can be found in the LICENSE file.
6051 6051
6052 6052
6053 /**
6054 * Represents an HTML <div> element.
6055 *
6056 * The [DivElement] is a generic container for content and does not have any
6057 * special significance. It is functionally similar to [SpanElement].
6058 *
6059 * The [DivElement] is a block-level element, as opposed to [SpanElement],
6060 * which is an inline-level element.
6061 *
6062 * Example usage:
6063 *
6064 * DivElement div = new DivElement();
6065 * div.text = 'Here's my new DivElem
6066 * document.body.elements.add(elem);
6067 *
6068 * See also:
6069 *
6070 * * [HTML <div> element](http://www.w3.org/TR/html-markup/div.html) from W3C.
6071 * * [Block-level element](http://www.w3.org/TR/CSS2/visuren.html#block-boxes) f rom W3C.
6072 * * [Inline-level element](http://www.w3.org/TR/CSS2/visuren.html#inline-boxes) from W3C.
6073 */
6074 /// @domName HTMLDivElement; @docsEditable true 6053 /// @domName HTMLDivElement; @docsEditable true
6075 class DivElement extends Element implements Element native "*HTMLDivElement" { 6054 class DivElement extends Element implements Element native "*HTMLDivElement" {
6076 6055
6077 factory DivElement() => document.$dom_createElement("div"); 6056 factory DivElement() => document.$dom_createElement("div");
6078 } 6057 }
6079 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 6058 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
6080 // for details. All rights reserved. Use of this source code is governed by a 6059 // for details. All rights reserved. Use of this source code is governed by a
6081 // BSD-style license that can be found in the LICENSE file. 6060 // BSD-style license that can be found in the LICENSE file.
6082 6061
6083 6062
(...skipping 18 matching lines...) Expand all
6102 /// @domName Document.body; @docsEditable true 6081 /// @domName Document.body; @docsEditable true
6103 @JSName('body') 6082 @JSName('body')
6104 Element $dom_body; 6083 Element $dom_body;
6105 6084
6106 /// @domName Document.charset; @docsEditable true 6085 /// @domName Document.charset; @docsEditable true
6107 String charset; 6086 String charset;
6108 6087
6109 /// @domName Document.cookie; @docsEditable true 6088 /// @domName Document.cookie; @docsEditable true
6110 String cookie; 6089 String cookie;
6111 6090
6112 /// Returns the [Window] associated with the document.
6113 /// @domName Document.defaultView; @docsEditable true 6091 /// @domName Document.defaultView; @docsEditable true
6114 Window get window => _convertNativeToDart_Window(this._window); 6092 Window get window => _convertNativeToDart_Window(this._window);
6115 @JSName('defaultView') 6093 @JSName('defaultView')
6116 @Creates('LocalWindow|=Object') @Returns('LocalWindow|=Object') 6094 @Creates('LocalWindow|=Object') @Returns('LocalWindow|=Object')
6117 final dynamic _window; 6095 final dynamic _window;
6118 6096
6119 /// @domName Document.documentElement; @docsEditable true 6097 /// @domName Document.documentElement; @docsEditable true
6120 final Element documentElement; 6098 final Element documentElement;
6121 6099
6122 /// @domName Document.domain; @docsEditable true 6100 /// @domName Document.domain; @docsEditable true
(...skipping 657 matching lines...) Expand 10 before | Expand all | Expand 10 after
6780 Element addLast(Element value) => add(value); 6758 Element addLast(Element value) => add(value);
6781 6759
6782 Iterator<Element> iterator() => _toList().iterator(); 6760 Iterator<Element> iterator() => _toList().iterator();
6783 6761
6784 void addAll(Collection<Element> collection) { 6762 void addAll(Collection<Element> collection) {
6785 for (Element element in collection) { 6763 for (Element element in collection) {
6786 _element.$dom_appendChild(element); 6764 _element.$dom_appendChild(element);
6787 } 6765 }
6788 } 6766 }
6789 6767
6790 void sort([Comparator<Element> compare = Comparable.compare]) { 6768 void sort([int compare(Element a, Element b)]) {
6791 throw new UnsupportedError('TODO(jacobr): should we impl?'); 6769 throw new UnsupportedError('TODO(jacobr): should we impl?');
6792 } 6770 }
6793 6771
6794 void setRange(int start, int rangeLength, List from, [int startFrom = 0]) { 6772 void setRange(int start, int rangeLength, List from, [int startFrom = 0]) {
6795 throw new UnimplementedError(); 6773 throw new UnimplementedError();
6796 } 6774 }
6797 6775
6798 void removeRange(int start, int rangeLength) { 6776 void removeRange(int start, int rangeLength) {
6799 throw new UnimplementedError(); 6777 throw new UnimplementedError();
6800 } 6778 }
(...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after
6916 void addLast(Element value) { 6894 void addLast(Element value) {
6917 throw new UnsupportedError(''); 6895 throw new UnsupportedError('');
6918 } 6896 }
6919 6897
6920 Iterator<Element> iterator() => new _FrozenElementListIterator(this); 6898 Iterator<Element> iterator() => new _FrozenElementListIterator(this);
6921 6899
6922 void addAll(Collection<Element> collection) { 6900 void addAll(Collection<Element> collection) {
6923 throw new UnsupportedError(''); 6901 throw new UnsupportedError('');
6924 } 6902 }
6925 6903
6926 void sort([Comparator<Element> compare = Comparable.compare]) { 6904 void sort([int compare(Element a, Element b)]) {
6927 throw new UnsupportedError(''); 6905 throw new UnsupportedError('');
6928 } 6906 }
6929 6907
6930 void setRange(int start, int rangeLength, List from, [int startFrom = 0]) { 6908 void setRange(int start, int rangeLength, List from, [int startFrom = 0]) {
6931 throw new UnsupportedError(''); 6909 throw new UnsupportedError('');
6932 } 6910 }
6933 6911
6934 void removeRange(int start, int rangeLength) { 6912 void removeRange(int start, int rangeLength) {
6935 throw new UnsupportedError(''); 6913 throw new UnsupportedError('');
6936 } 6914 }
(...skipping 1346 matching lines...) Expand 10 before | Expand all | Expand 10 after
8283 Collections.filter(this, <File>[], f); 8261 Collections.filter(this, <File>[], f);
8284 8262
8285 bool every(bool f(File element)) => Collections.every(this, f); 8263 bool every(bool f(File element)) => Collections.every(this, f);
8286 8264
8287 bool some(bool f(File element)) => Collections.some(this, f); 8265 bool some(bool f(File element)) => Collections.some(this, f);
8288 8266
8289 bool get isEmpty => this.length == 0; 8267 bool get isEmpty => this.length == 0;
8290 8268
8291 // From List<File>: 8269 // From List<File>:
8292 8270
8293 void sort([Comparator<File> compare = Comparable.compare]) { 8271 void sort([int compare(File a, File b)]) {
8294 throw new UnsupportedError("Cannot sort immutable List."); 8272 throw new UnsupportedError("Cannot sort immutable List.");
8295 } 8273 }
8296 8274
8297 int indexOf(File element, [int start = 0]) => 8275 int indexOf(File element, [int start = 0]) =>
8298 Lists.indexOf(this, element, start, this.length); 8276 Lists.indexOf(this, element, start, this.length);
8299 8277
8300 int lastIndexOf(File element, [int start]) { 8278 int lastIndexOf(File element, [int start]) {
8301 if (start == null) start = length - 1; 8279 if (start == null) start = length - 1;
8302 return Lists.lastIndexOf(this, element, start); 8280 return Lists.lastIndexOf(this, element, start);
8303 } 8281 }
(...skipping 300 matching lines...) Expand 10 before | Expand all | Expand 10 after
8604 Collections.filter(this, <num>[], f); 8582 Collections.filter(this, <num>[], f);
8605 8583
8606 bool every(bool f(num element)) => Collections.every(this, f); 8584 bool every(bool f(num element)) => Collections.every(this, f);
8607 8585
8608 bool some(bool f(num element)) => Collections.some(this, f); 8586 bool some(bool f(num element)) => Collections.some(this, f);
8609 8587
8610 bool get isEmpty => this.length == 0; 8588 bool get isEmpty => this.length == 0;
8611 8589
8612 // From List<num>: 8590 // From List<num>:
8613 8591
8614 void sort([Comparator<num> compare = Comparable.compare]) { 8592 void sort([int compare(num a, num b)]) {
8615 throw new UnsupportedError("Cannot sort immutable List."); 8593 throw new UnsupportedError("Cannot sort immutable List.");
8616 } 8594 }
8617 8595
8618 int indexOf(num element, [int start = 0]) => 8596 int indexOf(num element, [int start = 0]) =>
8619 Lists.indexOf(this, element, start, this.length); 8597 Lists.indexOf(this, element, start, this.length);
8620 8598
8621 int lastIndexOf(num element, [int start]) { 8599 int lastIndexOf(num element, [int start]) {
8622 if (start == null) start = length - 1; 8600 if (start == null) start = length - 1;
8623 return Lists.lastIndexOf(this, element, start); 8601 return Lists.lastIndexOf(this, element, start);
8624 } 8602 }
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after
8723 Collections.filter(this, <num>[], f); 8701 Collections.filter(this, <num>[], f);
8724 8702
8725 bool every(bool f(num element)) => Collections.every(this, f); 8703 bool every(bool f(num element)) => Collections.every(this, f);
8726 8704
8727 bool some(bool f(num element)) => Collections.some(this, f); 8705 bool some(bool f(num element)) => Collections.some(this, f);
8728 8706
8729 bool get isEmpty => this.length == 0; 8707 bool get isEmpty => this.length == 0;
8730 8708
8731 // From List<num>: 8709 // From List<num>:
8732 8710
8733 void sort([Comparator<num> compare = Comparable.compare]) { 8711 void sort([int compare(num a, num b)]) {
8734 throw new UnsupportedError("Cannot sort immutable List."); 8712 throw new UnsupportedError("Cannot sort immutable List.");
8735 } 8713 }
8736 8714
8737 int indexOf(num element, [int start = 0]) => 8715 int indexOf(num element, [int start = 0]) =>
8738 Lists.indexOf(this, element, start, this.length); 8716 Lists.indexOf(this, element, start, this.length);
8739 8717
8740 int lastIndexOf(num element, [int start]) { 8718 int lastIndexOf(num element, [int start]) {
8741 if (start == null) start = length - 1; 8719 if (start == null) start = length - 1;
8742 return Lists.lastIndexOf(this, element, start); 8720 return Lists.lastIndexOf(this, element, start);
8743 } 8721 }
(...skipping 345 matching lines...) Expand 10 before | Expand all | Expand 10 after
9089 Collections.filter(this, <Node>[], f); 9067 Collections.filter(this, <Node>[], f);
9090 9068
9091 bool every(bool f(Node element)) => Collections.every(this, f); 9069 bool every(bool f(Node element)) => Collections.every(this, f);
9092 9070
9093 bool some(bool f(Node element)) => Collections.some(this, f); 9071 bool some(bool f(Node element)) => Collections.some(this, f);
9094 9072
9095 bool get isEmpty => this.length == 0; 9073 bool get isEmpty => this.length == 0;
9096 9074
9097 // From List<Node>: 9075 // From List<Node>:
9098 9076
9099 void sort([Comparator<Node> compare = Comparable.compare]) { 9077 void sort([int compare(Node a, Node b)]) {
9100 throw new UnsupportedError("Cannot sort immutable List."); 9078 throw new UnsupportedError("Cannot sort immutable List.");
9101 } 9079 }
9102 9080
9103 int indexOf(Node element, [int start = 0]) => 9081 int indexOf(Node element, [int start = 0]) =>
9104 Lists.indexOf(this, element, start, this.length); 9082 Lists.indexOf(this, element, start, this.length);
9105 9083
9106 int lastIndexOf(Node element, [int start]) { 9084 int lastIndexOf(Node element, [int start]) {
9107 if (start == null) start = length - 1; 9085 if (start == null) start = length - 1;
9108 return Lists.lastIndexOf(this, element, start); 9086 return Lists.lastIndexOf(this, element, start);
9109 } 9087 }
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after
9203 Collections.filter(this, <Node>[], f); 9181 Collections.filter(this, <Node>[], f);
9204 9182
9205 bool every(bool f(Node element)) => Collections.every(this, f); 9183 bool every(bool f(Node element)) => Collections.every(this, f);
9206 9184
9207 bool some(bool f(Node element)) => Collections.some(this, f); 9185 bool some(bool f(Node element)) => Collections.some(this, f);
9208 9186
9209 bool get isEmpty => this.length == 0; 9187 bool get isEmpty => this.length == 0;
9210 9188
9211 // From List<Node>: 9189 // From List<Node>:
9212 9190
9213 void sort([Comparator<Node> compare = Comparable.compare]) { 9191 void sort([int compare(Node a, Node b)]) {
9214 throw new UnsupportedError("Cannot sort immutable List."); 9192 throw new UnsupportedError("Cannot sort immutable List.");
9215 } 9193 }
9216 9194
9217 int indexOf(Node element, [int start = 0]) => 9195 int indexOf(Node element, [int start = 0]) =>
9218 Lists.indexOf(this, element, start, this.length); 9196 Lists.indexOf(this, element, start, this.length);
9219 9197
9220 int lastIndexOf(Node element, [int start]) { 9198 int lastIndexOf(Node element, [int start]) {
9221 if (start == null) start = length - 1; 9199 if (start == null) start = length - 1;
9222 return Lists.lastIndexOf(this, element, start); 9200 return Lists.lastIndexOf(this, element, start);
9223 } 9201 }
(...skipping 824 matching lines...) Expand 10 before | Expand all | Expand 10 after
10048 Collections.filter(this, <int>[], f); 10026 Collections.filter(this, <int>[], f);
10049 10027
10050 bool every(bool f(int element)) => Collections.every(this, f); 10028 bool every(bool f(int element)) => Collections.every(this, f);
10051 10029
10052 bool some(bool f(int element)) => Collections.some(this, f); 10030 bool some(bool f(int element)) => Collections.some(this, f);
10053 10031
10054 bool get isEmpty => this.length == 0; 10032 bool get isEmpty => this.length == 0;
10055 10033
10056 // From List<int>: 10034 // From List<int>:
10057 10035
10058 void sort([Comparator<int> compare = Comparable.compare]) { 10036 void sort([int compare(int a, int b)]) {
10059 throw new UnsupportedError("Cannot sort immutable List."); 10037 throw new UnsupportedError("Cannot sort immutable List.");
10060 } 10038 }
10061 10039
10062 int indexOf(int element, [int start = 0]) => 10040 int indexOf(int element, [int start = 0]) =>
10063 Lists.indexOf(this, element, start, this.length); 10041 Lists.indexOf(this, element, start, this.length);
10064 10042
10065 int lastIndexOf(int element, [int start]) { 10043 int lastIndexOf(int element, [int start]) {
10066 if (start == null) start = length - 1; 10044 if (start == null) start = length - 1;
10067 return Lists.lastIndexOf(this, element, start); 10045 return Lists.lastIndexOf(this, element, start);
10068 } 10046 }
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after
10167 Collections.filter(this, <int>[], f); 10145 Collections.filter(this, <int>[], f);
10168 10146
10169 bool every(bool f(int element)) => Collections.every(this, f); 10147 bool every(bool f(int element)) => Collections.every(this, f);
10170 10148
10171 bool some(bool f(int element)) => Collections.some(this, f); 10149 bool some(bool f(int element)) => Collections.some(this, f);
10172 10150
10173 bool get isEmpty => this.length == 0; 10151 bool get isEmpty => this.length == 0;
10174 10152
10175 // From List<int>: 10153 // From List<int>:
10176 10154
10177 void sort([Comparator<int> compare = Comparable.compare]) { 10155 void sort([int compare(int a, int b)]) {
10178 throw new UnsupportedError("Cannot sort immutable List."); 10156 throw new UnsupportedError("Cannot sort immutable List.");
10179 } 10157 }
10180 10158
10181 int indexOf(int element, [int start = 0]) => 10159 int indexOf(int element, [int start = 0]) =>
10182 Lists.indexOf(this, element, start, this.length); 10160 Lists.indexOf(this, element, start, this.length);
10183 10161
10184 int lastIndexOf(int element, [int start]) { 10162 int lastIndexOf(int element, [int start]) {
10185 if (start == null) start = length - 1; 10163 if (start == null) start = length - 1;
10186 return Lists.lastIndexOf(this, element, start); 10164 return Lists.lastIndexOf(this, element, start);
10187 } 10165 }
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after
10286 Collections.filter(this, <int>[], f); 10264 Collections.filter(this, <int>[], f);
10287 10265
10288 bool every(bool f(int element)) => Collections.every(this, f); 10266 bool every(bool f(int element)) => Collections.every(this, f);
10289 10267
10290 bool some(bool f(int element)) => Collections.some(this, f); 10268 bool some(bool f(int element)) => Collections.some(this, f);
10291 10269
10292 bool get isEmpty => this.length == 0; 10270 bool get isEmpty => this.length == 0;
10293 10271
10294 // From List<int>: 10272 // From List<int>:
10295 10273
10296 void sort([Comparator<int> compare = Comparable.compare]) { 10274 void sort([int compare(int a, int b)]) {
10297 throw new UnsupportedError("Cannot sort immutable List."); 10275 throw new UnsupportedError("Cannot sort immutable List.");
10298 } 10276 }
10299 10277
10300 int indexOf(int element, [int start = 0]) => 10278 int indexOf(int element, [int start = 0]) =>
10301 Lists.indexOf(this, element, start, this.length); 10279 Lists.indexOf(this, element, start, this.length);
10302 10280
10303 int lastIndexOf(int element, [int start]) { 10281 int lastIndexOf(int element, [int start]) {
10304 if (start == null) start = length - 1; 10282 if (start == null) start = length - 1;
10305 return Lists.lastIndexOf(this, element, start); 10283 return Lists.lastIndexOf(this, element, start);
10306 } 10284 }
(...skipping 1653 matching lines...) Expand 10 before | Expand all | Expand 10 after
11960 final int totalJSHeapSize; 11938 final int totalJSHeapSize;
11961 11939
11962 /// @domName MemoryInfo.usedJSHeapSize; @docsEditable true 11940 /// @domName MemoryInfo.usedJSHeapSize; @docsEditable true
11963 final int usedJSHeapSize; 11941 final int usedJSHeapSize;
11964 } 11942 }
11965 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 11943 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
11966 // for details. All rights reserved. Use of this source code is governed by a 11944 // for details. All rights reserved. Use of this source code is governed by a
11967 // BSD-style license that can be found in the LICENSE file. 11945 // BSD-style license that can be found in the LICENSE file.
11968 11946
11969 11947
11970 /**
11971 * An HTML <menu> element.
11972 *
11973 * A <menu> element represents an unordered list of menu commands.
11974 *
11975 * See also:
11976 *
11977 * * [Menu Element](https://developer.mozilla.org/en-US/docs/HTML/Element/menu) from MDN.
11978 * * [Menu Element](http://www.w3.org/TR/html5/the-menu-element.html#the-menu-e lement) from the W3C.
11979 */
11980 /// @domName HTMLMenuElement; @docsEditable true 11948 /// @domName HTMLMenuElement; @docsEditable true
11981 class MenuElement extends Element implements Element native "*HTMLMenuElement" { 11949 class MenuElement extends Element implements Element native "*HTMLMenuElement" {
11982 11950
11983 factory MenuElement() => document.$dom_createElement("menu"); 11951 factory MenuElement() => document.$dom_createElement("menu");
11984 } 11952 }
11985 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 11953 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
11986 // for details. All rights reserved. Use of this source code is governed by a 11954 // for details. All rights reserved. Use of this source code is governed by a
11987 // BSD-style license that can be found in the LICENSE file. 11955 // BSD-style license that can be found in the LICENSE file.
11988 11956
11989 11957
(...skipping 514 matching lines...) Expand 10 before | Expand all | Expand 10 after
12504 Collections.filter(this, <Node>[], f); 12472 Collections.filter(this, <Node>[], f);
12505 12473
12506 bool every(bool f(Node element)) => Collections.every(this, f); 12474 bool every(bool f(Node element)) => Collections.every(this, f);
12507 12475
12508 bool some(bool f(Node element)) => Collections.some(this, f); 12476 bool some(bool f(Node element)) => Collections.some(this, f);
12509 12477
12510 bool get isEmpty => this.length == 0; 12478 bool get isEmpty => this.length == 0;
12511 12479
12512 // From List<Node>: 12480 // From List<Node>:
12513 12481
12514 void sort([Comparator<Node> compare = Comparable.compare]) { 12482 void sort([int compare(Node a, Node b)]) {
12515 throw new UnsupportedError("Cannot sort immutable List."); 12483 throw new UnsupportedError("Cannot sort immutable List.");
12516 } 12484 }
12517 12485
12518 int indexOf(Node element, [int start = 0]) => 12486 int indexOf(Node element, [int start = 0]) =>
12519 Lists.indexOf(this, element, start, this.length); 12487 Lists.indexOf(this, element, start, this.length);
12520 12488
12521 int lastIndexOf(Node element, [int start]) { 12489 int lastIndexOf(Node element, [int start]) {
12522 if (start == null) start = length - 1; 12490 if (start == null) start = length - 1;
12523 return Lists.lastIndexOf(this, element, start); 12491 return Lists.lastIndexOf(this, element, start);
12524 } 12492 }
(...skipping 227 matching lines...) Expand 10 before | Expand all | Expand 10 after
12752 bool every(bool f(Node element)) => Collections.every(this, f); 12720 bool every(bool f(Node element)) => Collections.every(this, f);
12753 12721
12754 bool some(bool f(Node element)) => Collections.some(this, f); 12722 bool some(bool f(Node element)) => Collections.some(this, f);
12755 12723
12756 bool get isEmpty => this.length == 0; 12724 bool get isEmpty => this.length == 0;
12757 12725
12758 // From List<Node>: 12726 // From List<Node>:
12759 12727
12760 // TODO(jacobr): this could be implemented for child node lists. 12728 // TODO(jacobr): this could be implemented for child node lists.
12761 // The exception we throw here is misleading. 12729 // The exception we throw here is misleading.
12762 void sort([Comparator<Node> compare = Comparable.compare]) { 12730 void sort([int compare(Node a, Node b)]) {
12763 throw new UnsupportedError("Cannot sort immutable List."); 12731 throw new UnsupportedError("Cannot sort immutable List.");
12764 } 12732 }
12765 12733
12766 int indexOf(Node element, [int start = 0]) => 12734 int indexOf(Node element, [int start = 0]) =>
12767 Lists.indexOf(this, element, start, this.length); 12735 Lists.indexOf(this, element, start, this.length);
12768 12736
12769 int lastIndexOf(Node element, [int start = 0]) => 12737 int lastIndexOf(Node element, [int start = 0]) =>
12770 Lists.lastIndexOf(this, element, start); 12738 Lists.lastIndexOf(this, element, start);
12771 12739
12772 // FIXME: implement these. 12740 // FIXME: implement these.
(...skipping 321 matching lines...) Expand 10 before | Expand all | Expand 10 after
13094 Collections.filter(this, <Node>[], f); 13062 Collections.filter(this, <Node>[], f);
13095 13063
13096 bool every(bool f(Node element)) => Collections.every(this, f); 13064 bool every(bool f(Node element)) => Collections.every(this, f);
13097 13065
13098 bool some(bool f(Node element)) => Collections.some(this, f); 13066 bool some(bool f(Node element)) => Collections.some(this, f);
13099 13067
13100 bool get isEmpty => this.length == 0; 13068 bool get isEmpty => this.length == 0;
13101 13069
13102 // From List<Node>: 13070 // From List<Node>:
13103 13071
13104 void sort([Comparator<Node> compare = Comparable.compare]) { 13072 void sort([int compare(Node a, Node b)]) {
13105 throw new UnsupportedError("Cannot sort immutable List."); 13073 throw new UnsupportedError("Cannot sort immutable List.");
13106 } 13074 }
13107 13075
13108 int indexOf(Node element, [int start = 0]) => 13076 int indexOf(Node element, [int start = 0]) =>
13109 Lists.indexOf(this, element, start, this.length); 13077 Lists.indexOf(this, element, start, this.length);
13110 13078
13111 int lastIndexOf(Node element, [int start]) { 13079 int lastIndexOf(Node element, [int start]) {
13112 if (start == null) start = length - 1; 13080 if (start == null) start = length - 1;
13113 return Lists.lastIndexOf(this, element, start); 13081 return Lists.lastIndexOf(this, element, start);
13114 } 13082 }
(...skipping 1584 matching lines...) Expand 10 before | Expand all | Expand 10 after
14699 Collections.filter(this, <Map>[], f); 14667 Collections.filter(this, <Map>[], f);
14700 14668
14701 bool every(bool f(Map element)) => Collections.every(this, f); 14669 bool every(bool f(Map element)) => Collections.every(this, f);
14702 14670
14703 bool some(bool f(Map element)) => Collections.some(this, f); 14671 bool some(bool f(Map element)) => Collections.some(this, f);
14704 14672
14705 bool get isEmpty => this.length == 0; 14673 bool get isEmpty => this.length == 0;
14706 14674
14707 // From List<Map>: 14675 // From List<Map>:
14708 14676
14709 void sort([Comparator<Map> compare = Comparable.compare]) { 14677 void sort([int compare(Map a, Map b)]) {
14710 throw new UnsupportedError("Cannot sort immutable List."); 14678 throw new UnsupportedError("Cannot sort immutable List.");
14711 } 14679 }
14712 14680
14713 int indexOf(Map element, [int start = 0]) => 14681 int indexOf(Map element, [int start = 0]) =>
14714 Lists.indexOf(this, element, start, this.length); 14682 Lists.indexOf(this, element, start, this.length);
14715 14683
14716 int lastIndexOf(Map element, [int start]) { 14684 int lastIndexOf(Map element, [int start]) {
14717 if (start == null) start = length - 1; 14685 if (start == null) start = length - 1;
14718 return Lists.lastIndexOf(this, element, start); 14686 return Lists.lastIndexOf(this, element, start);
14719 } 14687 }
(...skipping 491 matching lines...) Expand 10 before | Expand all | Expand 10 after
15211 Collections.filter(this, <SourceBuffer>[], f); 15179 Collections.filter(this, <SourceBuffer>[], f);
15212 15180
15213 bool every(bool f(SourceBuffer element)) => Collections.every(this, f); 15181 bool every(bool f(SourceBuffer element)) => Collections.every(this, f);
15214 15182
15215 bool some(bool f(SourceBuffer element)) => Collections.some(this, f); 15183 bool some(bool f(SourceBuffer element)) => Collections.some(this, f);
15216 15184
15217 bool get isEmpty => this.length == 0; 15185 bool get isEmpty => this.length == 0;
15218 15186
15219 // From List<SourceBuffer>: 15187 // From List<SourceBuffer>:
15220 15188
15221 void sort([Comparator<SourceBuffer> compare = Comparable.compare]) { 15189 void sort([int compare(SourceBuffer a, SourceBuffer b)]) {
15222 throw new UnsupportedError("Cannot sort immutable List."); 15190 throw new UnsupportedError("Cannot sort immutable List.");
15223 } 15191 }
15224 15192
15225 int indexOf(SourceBuffer element, [int start = 0]) => 15193 int indexOf(SourceBuffer element, [int start = 0]) =>
15226 Lists.indexOf(this, element, start, this.length); 15194 Lists.indexOf(this, element, start, this.length);
15227 15195
15228 int lastIndexOf(SourceBuffer element, [int start]) { 15196 int lastIndexOf(SourceBuffer element, [int start]) {
15229 if (start == null) start = length - 1; 15197 if (start == null) start = length - 1;
15230 return Lists.lastIndexOf(this, element, start); 15198 return Lists.lastIndexOf(this, element, start);
15231 } 15199 }
(...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after
15377 Collections.filter(this, <SpeechGrammar>[], f); 15345 Collections.filter(this, <SpeechGrammar>[], f);
15378 15346
15379 bool every(bool f(SpeechGrammar element)) => Collections.every(this, f); 15347 bool every(bool f(SpeechGrammar element)) => Collections.every(this, f);
15380 15348
15381 bool some(bool f(SpeechGrammar element)) => Collections.some(this, f); 15349 bool some(bool f(SpeechGrammar element)) => Collections.some(this, f);
15382 15350
15383 bool get isEmpty => this.length == 0; 15351 bool get isEmpty => this.length == 0;
15384 15352
15385 // From List<SpeechGrammar>: 15353 // From List<SpeechGrammar>:
15386 15354
15387 void sort([Comparator<SpeechGrammar> compare = Comparable.compare]) { 15355 void sort([int compare(SpeechGrammar a, SpeechGrammar b)]) {
15388 throw new UnsupportedError("Cannot sort immutable List."); 15356 throw new UnsupportedError("Cannot sort immutable List.");
15389 } 15357 }
15390 15358
15391 int indexOf(SpeechGrammar element, [int start = 0]) => 15359 int indexOf(SpeechGrammar element, [int start = 0]) =>
15392 Lists.indexOf(this, element, start, this.length); 15360 Lists.indexOf(this, element, start, this.length);
15393 15361
15394 int lastIndexOf(SpeechGrammar element, [int start]) { 15362 int lastIndexOf(SpeechGrammar element, [int start]) {
15395 if (start == null) start = length - 1; 15363 if (start == null) start = length - 1;
15396 return Lists.lastIndexOf(this, element, start); 15364 return Lists.lastIndexOf(this, element, start);
15397 } 15365 }
(...skipping 1026 matching lines...) Expand 10 before | Expand all | Expand 10 after
16424 Collections.filter(this, <TextTrackCue>[], f); 16392 Collections.filter(this, <TextTrackCue>[], f);
16425 16393
16426 bool every(bool f(TextTrackCue element)) => Collections.every(this, f); 16394 bool every(bool f(TextTrackCue element)) => Collections.every(this, f);
16427 16395
16428 bool some(bool f(TextTrackCue element)) => Collections.some(this, f); 16396 bool some(bool f(TextTrackCue element)) => Collections.some(this, f);
16429 16397
16430 bool get isEmpty => this.length == 0; 16398 bool get isEmpty => this.length == 0;
16431 16399
16432 // From List<TextTrackCue>: 16400 // From List<TextTrackCue>:
16433 16401
16434 void sort([Comparator<TextTrackCue> compare = Comparable.compare]) { 16402 void sort([int compare(TextTrackCue a, TextTrackCue b)]) {
16435 throw new UnsupportedError("Cannot sort immutable List."); 16403 throw new UnsupportedError("Cannot sort immutable List.");
16436 } 16404 }
16437 16405
16438 int indexOf(TextTrackCue element, [int start = 0]) => 16406 int indexOf(TextTrackCue element, [int start = 0]) =>
16439 Lists.indexOf(this, element, start, this.length); 16407 Lists.indexOf(this, element, start, this.length);
16440 16408
16441 int lastIndexOf(TextTrackCue element, [int start]) { 16409 int lastIndexOf(TextTrackCue element, [int start]) {
16442 if (start == null) start = length - 1; 16410 if (start == null) start = length - 1;
16443 return Lists.lastIndexOf(this, element, start); 16411 return Lists.lastIndexOf(this, element, start);
16444 } 16412 }
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after
16538 Collections.filter(this, <TextTrack>[], f); 16506 Collections.filter(this, <TextTrack>[], f);
16539 16507
16540 bool every(bool f(TextTrack element)) => Collections.every(this, f); 16508 bool every(bool f(TextTrack element)) => Collections.every(this, f);
16541 16509
16542 bool some(bool f(TextTrack element)) => Collections.some(this, f); 16510 bool some(bool f(TextTrack element)) => Collections.some(this, f);
16543 16511
16544 bool get isEmpty => this.length == 0; 16512 bool get isEmpty => this.length == 0;
16545 16513
16546 // From List<TextTrack>: 16514 // From List<TextTrack>:
16547 16515
16548 void sort([Comparator<TextTrack> compare = Comparable.compare]) { 16516 void sort([int compare(TextTrack a, TextTrack b)]) {
16549 throw new UnsupportedError("Cannot sort immutable List."); 16517 throw new UnsupportedError("Cannot sort immutable List.");
16550 } 16518 }
16551 16519
16552 int indexOf(TextTrack element, [int start = 0]) => 16520 int indexOf(TextTrack element, [int start = 0]) =>
16553 Lists.indexOf(this, element, start, this.length); 16521 Lists.indexOf(this, element, start, this.length);
16554 16522
16555 int lastIndexOf(TextTrack element, [int start]) { 16523 int lastIndexOf(TextTrack element, [int start]) {
16556 if (start == null) start = length - 1; 16524 if (start == null) start = length - 1;
16557 return Lists.lastIndexOf(this, element, start); 16525 return Lists.lastIndexOf(this, element, start);
16558 } 16526 }
(...skipping 218 matching lines...) Expand 10 before | Expand all | Expand 10 after
16777 Collections.filter(this, <Touch>[], f); 16745 Collections.filter(this, <Touch>[], f);
16778 16746
16779 bool every(bool f(Touch element)) => Collections.every(this, f); 16747 bool every(bool f(Touch element)) => Collections.every(this, f);
16780 16748
16781 bool some(bool f(Touch element)) => Collections.some(this, f); 16749 bool some(bool f(Touch element)) => Collections.some(this, f);
16782 16750
16783 bool get isEmpty => this.length == 0; 16751 bool get isEmpty => this.length == 0;
16784 16752
16785 // From List<Touch>: 16753 // From List<Touch>:
16786 16754
16787 void sort([Comparator<Touch> compare = Comparable.compare]) { 16755 void sort([int compare(Touch a, Touch b)]) {
16788 throw new UnsupportedError("Cannot sort immutable List."); 16756 throw new UnsupportedError("Cannot sort immutable List.");
16789 } 16757 }
16790 16758
16791 int indexOf(Touch element, [int start = 0]) => 16759 int indexOf(Touch element, [int start = 0]) =>
16792 Lists.indexOf(this, element, start, this.length); 16760 Lists.indexOf(this, element, start, this.length);
16793 16761
16794 int lastIndexOf(Touch element, [int start]) { 16762 int lastIndexOf(Touch element, [int start]) {
16795 if (start == null) start = length - 1; 16763 if (start == null) start = length - 1;
16796 return Lists.lastIndexOf(this, element, start); 16764 return Lists.lastIndexOf(this, element, start);
16797 } 16765 }
(...skipping 278 matching lines...) Expand 10 before | Expand all | Expand 10 after
17076 Collections.filter(this, <int>[], f); 17044 Collections.filter(this, <int>[], f);
17077 17045
17078 bool every(bool f(int element)) => Collections.every(this, f); 17046 bool every(bool f(int element)) => Collections.every(this, f);
17079 17047
17080 bool some(bool f(int element)) => Collections.some(this, f); 17048 bool some(bool f(int element)) => Collections.some(this, f);
17081 17049
17082 bool get isEmpty => this.length == 0; 17050 bool get isEmpty => this.length == 0;
17083 17051
17084 // From List<int>: 17052 // From List<int>:
17085 17053
17086 void sort([Comparator<int> compare = Comparable.compare]) { 17054 void sort([int compare(int a, int b)]) {
17087 throw new UnsupportedError("Cannot sort immutable List."); 17055 throw new UnsupportedError("Cannot sort immutable List.");
17088 } 17056 }
17089 17057
17090 int indexOf(int element, [int start = 0]) => 17058 int indexOf(int element, [int start = 0]) =>
17091 Lists.indexOf(this, element, start, this.length); 17059 Lists.indexOf(this, element, start, this.length);
17092 17060
17093 int lastIndexOf(int element, [int start]) { 17061 int lastIndexOf(int element, [int start]) {
17094 if (start == null) start = length - 1; 17062 if (start == null) start = length - 1;
17095 return Lists.lastIndexOf(this, element, start); 17063 return Lists.lastIndexOf(this, element, start);
17096 } 17064 }
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after
17195 Collections.filter(this, <int>[], f); 17163 Collections.filter(this, <int>[], f);
17196 17164
17197 bool every(bool f(int element)) => Collections.every(this, f); 17165 bool every(bool f(int element)) => Collections.every(this, f);
17198 17166
17199 bool some(bool f(int element)) => Collections.some(this, f); 17167 bool some(bool f(int element)) => Collections.some(this, f);
17200 17168
17201 bool get isEmpty => this.length == 0; 17169 bool get isEmpty => this.length == 0;
17202 17170
17203 // From List<int>: 17171 // From List<int>:
17204 17172
17205 void sort([Comparator<int> compare = Comparable.compare]) { 17173 void sort([int compare(int a, int b)]) {
17206 throw new UnsupportedError("Cannot sort immutable List."); 17174 throw new UnsupportedError("Cannot sort immutable List.");
17207 } 17175 }
17208 17176
17209 int indexOf(int element, [int start = 0]) => 17177 int indexOf(int element, [int start = 0]) =>
17210 Lists.indexOf(this, element, start, this.length); 17178 Lists.indexOf(this, element, start, this.length);
17211 17179
17212 int lastIndexOf(int element, [int start]) { 17180 int lastIndexOf(int element, [int start]) {
17213 if (start == null) start = length - 1; 17181 if (start == null) start = length - 1;
17214 return Lists.lastIndexOf(this, element, start); 17182 return Lists.lastIndexOf(this, element, start);
17215 } 17183 }
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after
17314 Collections.filter(this, <int>[], f); 17282 Collections.filter(this, <int>[], f);
17315 17283
17316 bool every(bool f(int element)) => Collections.every(this, f); 17284 bool every(bool f(int element)) => Collections.every(this, f);
17317 17285
17318 bool some(bool f(int element)) => Collections.some(this, f); 17286 bool some(bool f(int element)) => Collections.some(this, f);
17319 17287
17320 bool get isEmpty => this.length == 0; 17288 bool get isEmpty => this.length == 0;
17321 17289
17322 // From List<int>: 17290 // From List<int>:
17323 17291
17324 void sort([Comparator<int> compare = Comparable.compare]) { 17292 void sort([int compare(int a, int b)]) {
17325 throw new UnsupportedError("Cannot sort immutable List."); 17293 throw new UnsupportedError("Cannot sort immutable List.");
17326 } 17294 }
17327 17295
17328 int indexOf(int element, [int start = 0]) => 17296 int indexOf(int element, [int start = 0]) =>
17329 Lists.indexOf(this, element, start, this.length); 17297 Lists.indexOf(this, element, start, this.length);
17330 17298
17331 int lastIndexOf(int element, [int start]) { 17299 int lastIndexOf(int element, [int start]) {
17332 if (start == null) start = length - 1; 17300 if (start == null) start = length - 1;
17333 return Lists.lastIndexOf(this, element, start); 17301 return Lists.lastIndexOf(this, element, start);
17334 } 17302 }
(...skipping 2183 matching lines...) Expand 10 before | Expand all | Expand 10 after
19518 Collections.filter(this, <CSSRule>[], f); 19486 Collections.filter(this, <CSSRule>[], f);
19519 19487
19520 bool every(bool f(CSSRule element)) => Collections.every(this, f); 19488 bool every(bool f(CSSRule element)) => Collections.every(this, f);
19521 19489
19522 bool some(bool f(CSSRule element)) => Collections.some(this, f); 19490 bool some(bool f(CSSRule element)) => Collections.some(this, f);
19523 19491
19524 bool get isEmpty => this.length == 0; 19492 bool get isEmpty => this.length == 0;
19525 19493
19526 // From List<CSSRule>: 19494 // From List<CSSRule>:
19527 19495
19528 void sort([Comparator<CSSRule> compare = Comparable.compare]) { 19496 void sort([int compare(CSSRule a, CSSRule b)]) {
19529 throw new UnsupportedError("Cannot sort immutable List."); 19497 throw new UnsupportedError("Cannot sort immutable List.");
19530 } 19498 }
19531 19499
19532 int indexOf(CSSRule element, [int start = 0]) => 19500 int indexOf(CSSRule element, [int start = 0]) =>
19533 Lists.indexOf(this, element, start, this.length); 19501 Lists.indexOf(this, element, start, this.length);
19534 19502
19535 int lastIndexOf(CSSRule element, [int start]) { 19503 int lastIndexOf(CSSRule element, [int start]) {
19536 if (start == null) start = length - 1; 19504 if (start == null) start = length - 1;
19537 return Lists.lastIndexOf(this, element, start); 19505 return Lists.lastIndexOf(this, element, start);
19538 } 19506 }
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after
19625 Collections.filter(this, <CSSValue>[], f); 19593 Collections.filter(this, <CSSValue>[], f);
19626 19594
19627 bool every(bool f(CSSValue element)) => Collections.every(this, f); 19595 bool every(bool f(CSSValue element)) => Collections.every(this, f);
19628 19596
19629 bool some(bool f(CSSValue element)) => Collections.some(this, f); 19597 bool some(bool f(CSSValue element)) => Collections.some(this, f);
19630 19598
19631 bool get isEmpty => this.length == 0; 19599 bool get isEmpty => this.length == 0;
19632 19600
19633 // From List<CSSValue>: 19601 // From List<CSSValue>:
19634 19602
19635 void sort([Comparator<CSSValue> compare = Comparable.compare]) { 19603 void sort([int compare(CSSValue a, CSSValue b)]) {
19636 throw new UnsupportedError("Cannot sort immutable List."); 19604 throw new UnsupportedError("Cannot sort immutable List.");
19637 } 19605 }
19638 19606
19639 int indexOf(CSSValue element, [int start = 0]) => 19607 int indexOf(CSSValue element, [int start = 0]) =>
19640 Lists.indexOf(this, element, start, this.length); 19608 Lists.indexOf(this, element, start, this.length);
19641 19609
19642 int lastIndexOf(CSSValue element, [int start]) { 19610 int lastIndexOf(CSSValue element, [int start]) {
19643 if (start == null) start = length - 1; 19611 if (start == null) start = length - 1;
19644 return Lists.lastIndexOf(this, element, start); 19612 return Lists.lastIndexOf(this, element, start);
19645 } 19613 }
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after
19732 Collections.filter(this, <ClientRect>[], f); 19700 Collections.filter(this, <ClientRect>[], f);
19733 19701
19734 bool every(bool f(ClientRect element)) => Collections.every(this, f); 19702 bool every(bool f(ClientRect element)) => Collections.every(this, f);
19735 19703
19736 bool some(bool f(ClientRect element)) => Collections.some(this, f); 19704 bool some(bool f(ClientRect element)) => Collections.some(this, f);
19737 19705
19738 bool get isEmpty => this.length == 0; 19706 bool get isEmpty => this.length == 0;
19739 19707
19740 // From List<ClientRect>: 19708 // From List<ClientRect>:
19741 19709
19742 void sort([Comparator<ClientRect> compare = Comparable.compare]) { 19710 void sort([int compare(ClientRect a, ClientRect b)]) {
19743 throw new UnsupportedError("Cannot sort immutable List."); 19711 throw new UnsupportedError("Cannot sort immutable List.");
19744 } 19712 }
19745 19713
19746 int indexOf(ClientRect element, [int start = 0]) => 19714 int indexOf(ClientRect element, [int start = 0]) =>
19747 Lists.indexOf(this, element, start, this.length); 19715 Lists.indexOf(this, element, start, this.length);
19748 19716
19749 int lastIndexOf(ClientRect element, [int start]) { 19717 int lastIndexOf(ClientRect element, [int start]) {
19750 if (start == null) start = length - 1; 19718 if (start == null) start = length - 1;
19751 return Lists.lastIndexOf(this, element, start); 19719 return Lists.lastIndexOf(this, element, start);
19752 } 19720 }
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after
19848 Collections.filter(this, <String>[], f); 19816 Collections.filter(this, <String>[], f);
19849 19817
19850 bool every(bool f(String element)) => Collections.every(this, f); 19818 bool every(bool f(String element)) => Collections.every(this, f);
19851 19819
19852 bool some(bool f(String element)) => Collections.some(this, f); 19820 bool some(bool f(String element)) => Collections.some(this, f);
19853 19821
19854 bool get isEmpty => this.length == 0; 19822 bool get isEmpty => this.length == 0;
19855 19823
19856 // From List<String>: 19824 // From List<String>:
19857 19825
19858 void sort([Comparator<String> compare = Comparable.compare]) { 19826 void sort([int compare(String a, String b)]) {
19859 throw new UnsupportedError("Cannot sort immutable List."); 19827 throw new UnsupportedError("Cannot sort immutable List.");
19860 } 19828 }
19861 19829
19862 int indexOf(String element, [int start = 0]) => 19830 int indexOf(String element, [int start = 0]) =>
19863 Lists.indexOf(this, element, start, this.length); 19831 Lists.indexOf(this, element, start, this.length);
19864 19832
19865 int lastIndexOf(String element, [int start]) { 19833 int lastIndexOf(String element, [int start]) {
19866 if (start == null) start = length - 1; 19834 if (start == null) start = length - 1;
19867 return Lists.lastIndexOf(this, element, start); 19835 return Lists.lastIndexOf(this, element, start);
19868 } 19836 }
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after
19975 Collections.filter(this, <Entry>[], f); 19943 Collections.filter(this, <Entry>[], f);
19976 19944
19977 bool every(bool f(Entry element)) => Collections.every(this, f); 19945 bool every(bool f(Entry element)) => Collections.every(this, f);
19978 19946
19979 bool some(bool f(Entry element)) => Collections.some(this, f); 19947 bool some(bool f(Entry element)) => Collections.some(this, f);
19980 19948
19981 bool get isEmpty => this.length == 0; 19949 bool get isEmpty => this.length == 0;
19982 19950
19983 // From List<Entry>: 19951 // From List<Entry>:
19984 19952
19985 void sort([Comparator<Entry> compare = Comparable.compare]) { 19953 void sort([int compare(Entry a, Entry b)]) {
19986 throw new UnsupportedError("Cannot sort immutable List."); 19954 throw new UnsupportedError("Cannot sort immutable List.");
19987 } 19955 }
19988 19956
19989 int indexOf(Entry element, [int start = 0]) => 19957 int indexOf(Entry element, [int start = 0]) =>
19990 Lists.indexOf(this, element, start, this.length); 19958 Lists.indexOf(this, element, start, this.length);
19991 19959
19992 int lastIndexOf(Entry element, [int start]) { 19960 int lastIndexOf(Entry element, [int start]) {
19993 if (start == null) start = length - 1; 19961 if (start == null) start = length - 1;
19994 return Lists.lastIndexOf(this, element, start); 19962 return Lists.lastIndexOf(this, element, start);
19995 } 19963 }
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after
20082 Collections.filter(this, <EntrySync>[], f); 20050 Collections.filter(this, <EntrySync>[], f);
20083 20051
20084 bool every(bool f(EntrySync element)) => Collections.every(this, f); 20052 bool every(bool f(EntrySync element)) => Collections.every(this, f);
20085 20053
20086 bool some(bool f(EntrySync element)) => Collections.some(this, f); 20054 bool some(bool f(EntrySync element)) => Collections.some(this, f);
20087 20055
20088 bool get isEmpty => this.length == 0; 20056 bool get isEmpty => this.length == 0;
20089 20057
20090 // From List<EntrySync>: 20058 // From List<EntrySync>:
20091 20059
20092 void sort([Comparator<EntrySync> compare = Comparable.compare]) { 20060 void sort([int compare(EntrySync a, EntrySync b)]) {
20093 throw new UnsupportedError("Cannot sort immutable List."); 20061 throw new UnsupportedError("Cannot sort immutable List.");
20094 } 20062 }
20095 20063
20096 int indexOf(EntrySync element, [int start = 0]) => 20064 int indexOf(EntrySync element, [int start = 0]) =>
20097 Lists.indexOf(this, element, start, this.length); 20065 Lists.indexOf(this, element, start, this.length);
20098 20066
20099 int lastIndexOf(EntrySync element, [int start]) { 20067 int lastIndexOf(EntrySync element, [int start]) {
20100 if (start == null) start = length - 1; 20068 if (start == null) start = length - 1;
20101 return Lists.lastIndexOf(this, element, start); 20069 return Lists.lastIndexOf(this, element, start);
20102 } 20070 }
(...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after
20227 Collections.filter(this, <Gamepad>[], f); 20195 Collections.filter(this, <Gamepad>[], f);
20228 20196
20229 bool every(bool f(Gamepad element)) => Collections.every(this, f); 20197 bool every(bool f(Gamepad element)) => Collections.every(this, f);
20230 20198
20231 bool some(bool f(Gamepad element)) => Collections.some(this, f); 20199 bool some(bool f(Gamepad element)) => Collections.some(this, f);
20232 20200
20233 bool get isEmpty => this.length == 0; 20201 bool get isEmpty => this.length == 0;
20234 20202
20235 // From List<Gamepad>: 20203 // From List<Gamepad>:
20236 20204
20237 void sort([Comparator<Gamepad> compare = Comparable.compare]) { 20205 void sort([int compare(Gamepad a, Gamepad b)]) {
20238 throw new UnsupportedError("Cannot sort immutable List."); 20206 throw new UnsupportedError("Cannot sort immutable List.");
20239 } 20207 }
20240 20208
20241 int indexOf(Gamepad element, [int start = 0]) => 20209 int indexOf(Gamepad element, [int start = 0]) =>
20242 Lists.indexOf(this, element, start, this.length); 20210 Lists.indexOf(this, element, start, this.length);
20243 20211
20244 int lastIndexOf(Gamepad element, [int start]) { 20212 int lastIndexOf(Gamepad element, [int start]) {
20245 if (start == null) start = length - 1; 20213 if (start == null) start = length - 1;
20246 return Lists.lastIndexOf(this, element, start); 20214 return Lists.lastIndexOf(this, element, start);
20247 } 20215 }
(...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after
20387 Collections.filter(this, <MediaStream>[], f); 20355 Collections.filter(this, <MediaStream>[], f);
20388 20356
20389 bool every(bool f(MediaStream element)) => Collections.every(this, f); 20357 bool every(bool f(MediaStream element)) => Collections.every(this, f);
20390 20358
20391 bool some(bool f(MediaStream element)) => Collections.some(this, f); 20359 bool some(bool f(MediaStream element)) => Collections.some(this, f);
20392 20360
20393 bool get isEmpty => this.length == 0; 20361 bool get isEmpty => this.length == 0;
20394 20362
20395 // From List<MediaStream>: 20363 // From List<MediaStream>:
20396 20364
20397 void sort([Comparator<MediaStream> compare = Comparable.compare]) { 20365 void sort([int compare(MediaStream a, MediaStream b)]) {
20398 throw new UnsupportedError("Cannot sort immutable List."); 20366 throw new UnsupportedError("Cannot sort immutable List.");
20399 } 20367 }
20400 20368
20401 int indexOf(MediaStream element, [int start = 0]) => 20369 int indexOf(MediaStream element, [int start = 0]) =>
20402 Lists.indexOf(this, element, start, this.length); 20370 Lists.indexOf(this, element, start, this.length);
20403 20371
20404 int lastIndexOf(MediaStream element, [int start]) { 20372 int lastIndexOf(MediaStream element, [int start]) {
20405 if (start == null) start = length - 1; 20373 if (start == null) start = length - 1;
20406 return Lists.lastIndexOf(this, element, start); 20374 return Lists.lastIndexOf(this, element, start);
20407 } 20375 }
(...skipping 239 matching lines...) Expand 10 before | Expand all | Expand 10 after
20647 Collections.filter(this, <SpeechInputResult>[], f); 20615 Collections.filter(this, <SpeechInputResult>[], f);
20648 20616
20649 bool every(bool f(SpeechInputResult element)) => Collections.every(this, f); 20617 bool every(bool f(SpeechInputResult element)) => Collections.every(this, f);
20650 20618
20651 bool some(bool f(SpeechInputResult element)) => Collections.some(this, f); 20619 bool some(bool f(SpeechInputResult element)) => Collections.some(this, f);
20652 20620
20653 bool get isEmpty => this.length == 0; 20621 bool get isEmpty => this.length == 0;
20654 20622
20655 // From List<SpeechInputResult>: 20623 // From List<SpeechInputResult>:
20656 20624
20657 void sort([Comparator<SpeechInputResult> compare = Comparable.compare]) { 20625 void sort([int compare(SpeechInputResult a, SpeechInputResult b)]) {
20658 throw new UnsupportedError("Cannot sort immutable List."); 20626 throw new UnsupportedError("Cannot sort immutable List.");
20659 } 20627 }
20660 20628
20661 int indexOf(SpeechInputResult element, [int start = 0]) => 20629 int indexOf(SpeechInputResult element, [int start = 0]) =>
20662 Lists.indexOf(this, element, start, this.length); 20630 Lists.indexOf(this, element, start, this.length);
20663 20631
20664 int lastIndexOf(SpeechInputResult element, [int start]) { 20632 int lastIndexOf(SpeechInputResult element, [int start]) {
20665 if (start == null) start = length - 1; 20633 if (start == null) start = length - 1;
20666 return Lists.lastIndexOf(this, element, start); 20634 return Lists.lastIndexOf(this, element, start);
20667 } 20635 }
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after
20763 Collections.filter(this, <SpeechRecognitionResult>[], f); 20731 Collections.filter(this, <SpeechRecognitionResult>[], f);
20764 20732
20765 bool every(bool f(SpeechRecognitionResult element)) => Collections.every(this, f); 20733 bool every(bool f(SpeechRecognitionResult element)) => Collections.every(this, f);
20766 20734
20767 bool some(bool f(SpeechRecognitionResult element)) => Collections.some(this, f ); 20735 bool some(bool f(SpeechRecognitionResult element)) => Collections.some(this, f );
20768 20736
20769 bool get isEmpty => this.length == 0; 20737 bool get isEmpty => this.length == 0;
20770 20738
20771 // From List<SpeechRecognitionResult>: 20739 // From List<SpeechRecognitionResult>:
20772 20740
20773 void sort([Comparator<SpeechRecognitionResult> compare = Comparable.compare]) { 20741 void sort([int compare(SpeechRecognitionResult a, SpeechRecognitionResult b)]) {
20774 throw new UnsupportedError("Cannot sort immutable List."); 20742 throw new UnsupportedError("Cannot sort immutable List.");
20775 } 20743 }
20776 20744
20777 int indexOf(SpeechRecognitionResult element, [int start = 0]) => 20745 int indexOf(SpeechRecognitionResult element, [int start = 0]) =>
20778 Lists.indexOf(this, element, start, this.length); 20746 Lists.indexOf(this, element, start, this.length);
20779 20747
20780 int lastIndexOf(SpeechRecognitionResult element, [int start]) { 20748 int lastIndexOf(SpeechRecognitionResult element, [int start]) {
20781 if (start == null) start = length - 1; 20749 if (start == null) start = length - 1;
20782 return Lists.lastIndexOf(this, element, start); 20750 return Lists.lastIndexOf(this, element, start);
20783 } 20751 }
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after
20870 Collections.filter(this, <StyleSheet>[], f); 20838 Collections.filter(this, <StyleSheet>[], f);
20871 20839
20872 bool every(bool f(StyleSheet element)) => Collections.every(this, f); 20840 bool every(bool f(StyleSheet element)) => Collections.every(this, f);
20873 20841
20874 bool some(bool f(StyleSheet element)) => Collections.some(this, f); 20842 bool some(bool f(StyleSheet element)) => Collections.some(this, f);
20875 20843
20876 bool get isEmpty => this.length == 0; 20844 bool get isEmpty => this.length == 0;
20877 20845
20878 // From List<StyleSheet>: 20846 // From List<StyleSheet>:
20879 20847
20880 void sort([Comparator<StyleSheet> compare = Comparable.compare]) { 20848 void sort([int compare(StyleSheet a, StyleSheet b)]) {
20881 throw new UnsupportedError("Cannot sort immutable List."); 20849 throw new UnsupportedError("Cannot sort immutable List.");
20882 } 20850 }
20883 20851
20884 int indexOf(StyleSheet element, [int start = 0]) => 20852 int indexOf(StyleSheet element, [int start = 0]) =>
20885 Lists.indexOf(this, element, start, this.length); 20853 Lists.indexOf(this, element, start, this.length);
20886 20854
20887 int lastIndexOf(StyleSheet element, [int start]) { 20855 int lastIndexOf(StyleSheet element, [int start]) {
20888 if (start == null) start = length - 1; 20856 if (start == null) start = length - 1;
20889 return Lists.lastIndexOf(this, element, start); 20857 return Lists.lastIndexOf(this, element, start);
20890 } 20858 }
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after
21001 Collections.filter(this, <Animation>[], f); 20969 Collections.filter(this, <Animation>[], f);
21002 20970
21003 bool every(bool f(Animation element)) => Collections.every(this, f); 20971 bool every(bool f(Animation element)) => Collections.every(this, f);
21004 20972
21005 bool some(bool f(Animation element)) => Collections.some(this, f); 20973 bool some(bool f(Animation element)) => Collections.some(this, f);
21006 20974
21007 bool get isEmpty => this.length == 0; 20975 bool get isEmpty => this.length == 0;
21008 20976
21009 // From List<Animation>: 20977 // From List<Animation>:
21010 20978
21011 void sort([Comparator<Animation> compare = Comparable.compare]) { 20979 void sort([int compare(Animation a, Animation b)]) {
21012 throw new UnsupportedError("Cannot sort immutable List."); 20980 throw new UnsupportedError("Cannot sort immutable List.");
21013 } 20981 }
21014 20982
21015 int indexOf(Animation element, [int start = 0]) => 20983 int indexOf(Animation element, [int start = 0]) =>
21016 Lists.indexOf(this, element, start, this.length); 20984 Lists.indexOf(this, element, start, this.length);
21017 20985
21018 int lastIndexOf(Animation element, [int start]) { 20986 int lastIndexOf(Animation element, [int start]) {
21019 if (start == null) start = length - 1; 20987 if (start == null) start = length - 1;
21020 return Lists.lastIndexOf(this, element, start); 20988 return Lists.lastIndexOf(this, element, start);
21021 } 20989 }
(...skipping 633 matching lines...) Expand 10 before | Expand all | Expand 10 after
21655 } 21623 }
21656 21624
21657 void addLast(Element value) { 21625 void addLast(Element value) {
21658 add(value); 21626 add(value);
21659 } 21627 }
21660 21628
21661 bool contains(Element element) { 21629 bool contains(Element element) {
21662 return element is Element && _childNodes.contains(element); 21630 return element is Element && _childNodes.contains(element);
21663 } 21631 }
21664 21632
21665 void sort([Comparator<Element> compare = Comparable.compare]) { 21633 void sort([int compare(Element a, Element b)]) {
21666 throw new UnsupportedError('TODO(jacobr): should we impl?'); 21634 throw new UnsupportedError('TODO(jacobr): should we impl?');
21667 } 21635 }
21668 21636
21669 void setRange(int start, int rangeLength, List from, [int startFrom = 0]) { 21637 void setRange(int start, int rangeLength, List from, [int startFrom = 0]) {
21670 throw new UnimplementedError(); 21638 throw new UnimplementedError();
21671 } 21639 }
21672 21640
21673 void removeRange(int start, int rangeLength) { 21641 void removeRange(int start, int rangeLength) {
21674 _filtered.getRange(start, rangeLength).forEach((el) => el.remove()); 21642 _filtered.getRange(start, rangeLength).forEach((el) => el.remove());
21675 } 21643 }
(...skipping 2575 matching lines...) Expand 10 before | Expand all | Expand 10 after
24251 T next() { 24219 T next() {
24252 if (!hasNext) { 24220 if (!hasNext) {
24253 throw new StateError("No more elements"); 24221 throw new StateError("No more elements");
24254 } 24222 }
24255 return _array[_pos++]; 24223 return _array[_pos++];
24256 } 24224 }
24257 24225
24258 final List<T> _array; 24226 final List<T> _array;
24259 int _pos; 24227 int _pos;
24260 } 24228 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698