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

Side by Side Diff: sdk/lib/svg/dart2js/svg_dart2js.dart

Issue 12036071: Fixing analyzer issues in DOM libs. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « sdk/lib/html/html_common/html_common_dart2js.dart ('k') | sdk/lib/svg/dartium/svg_dartium.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 library svg; 1 library svg;
2 2
3 import 'dart:async'; 3 import 'dart:async';
4 import 'dart:collection'; 4 import 'dart:collection';
5 import 'dart:collection-dev';
5 import 'dart:html'; 6 import 'dart:html';
6 import 'dart:html_common'; 7 import 'dart:html_common';
7 // DO NOT EDIT 8 // DO NOT EDIT
8 // Auto-generated dart:svg library. 9 // Auto-generated dart:svg library.
9 10
10 11
11 12
12 13
13 14
14 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 15 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
(...skipping 3591 matching lines...) Expand 10 before | Expand all | Expand 10 after
3606 // SVG Collections expose numberOfItems rather than length. 3607 // SVG Collections expose numberOfItems rather than length.
3607 int get length => numberOfItems; 3608 int get length => numberOfItems;
3608 dynamic reduce(dynamic initialValue, dynamic combine(dynamic, Length)) { 3609 dynamic reduce(dynamic initialValue, dynamic combine(dynamic, Length)) {
3609 return IterableMixinWorkaround.reduce(this, initialValue, combine); 3610 return IterableMixinWorkaround.reduce(this, initialValue, combine);
3610 } 3611 }
3611 3612
3612 bool contains(Length element) => IterableMixinWorkaround.contains(this, elemen t); 3613 bool contains(Length element) => IterableMixinWorkaround.contains(this, elemen t);
3613 3614
3614 void forEach(void f(Length element)) => IterableMixinWorkaround.forEach(this, f); 3615 void forEach(void f(Length element)) => IterableMixinWorkaround.forEach(this, f);
3615 3616
3616 String join([String separator]) => IterableMixinWorkaround.joinList(this, sepa rator); 3617 String join([String separator]) =>
3618 IterableMixinWorkaround.joinList(this, separator);
3617 3619
3618 List mappedBy(f(Length element)) => IterableMixinWorkaround.mappedByList(this, f); 3620 List mappedBy(f(Length element)) => IterableMixinWorkaround.mappedByList(this, f);
3619 3621
3620 Iterable<Length> where(bool f(Length element)) => IterableMixinWorkaround.wher e(this, f); 3622 Iterable<Length> where(bool f(Length element)) =>
3623 IterableMixinWorkaround.where(this, f);
3621 3624
3622 bool every(bool f(Length element)) => IterableMixinWorkaround.every(this, f); 3625 bool every(bool f(Length element)) => IterableMixinWorkaround.every(this, f);
3623 3626
3624 bool any(bool f(Length element)) => IterableMixinWorkaround.any(this, f); 3627 bool any(bool f(Length element)) => IterableMixinWorkaround.any(this, f);
3625 3628
3626 List<Length> toList() => new List<Length>.from(this); 3629 List<Length> toList() => new List<Length>.from(this);
3627 Set<Length> toSet() => new Set<Length>.from(this); 3630 Set<Length> toSet() => new Set<Length>.from(this);
3628 3631
3629 bool get isEmpty => this.length == 0; 3632 bool get isEmpty => this.length == 0;
3630 3633
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
3670 throw new UnsupportedError("Cannot add to immutable List."); 3673 throw new UnsupportedError("Cannot add to immutable List.");
3671 } 3674 }
3672 3675
3673 // From List<Length>: 3676 // From List<Length>:
3674 void set length(int value) { 3677 void set length(int value) {
3675 throw new UnsupportedError("Cannot resize immutable List."); 3678 throw new UnsupportedError("Cannot resize immutable List.");
3676 } 3679 }
3677 3680
3678 // clear() defined by IDL. 3681 // clear() defined by IDL.
3679 3682
3683 List<Length> get reversed =>
3684 new ReversedListView<Length>(this, 0, null);
Lasse Reichstein Nielsen 2013/01/24 06:55:45 We should probably make the class private, and hav
3685
3680 void sort([int compare(Length a, Length b)]) { 3686 void sort([int compare(Length a, Length b)]) {
3681 throw new UnsupportedError("Cannot sort immutable List."); 3687 throw new UnsupportedError("Cannot sort immutable List.");
3682 } 3688 }
3683 3689
3684 int indexOf(Length element, [int start = 0]) => 3690 int indexOf(Length element, [int start = 0]) =>
3685 Lists.indexOf(this, element, start, this.length); 3691 Lists.indexOf(this, element, start, this.length);
3686 3692
3687 int lastIndexOf(Length element, [int start]) { 3693 int lastIndexOf(Length element, [int start]) {
3688 if (start == null) start = length - 1; 3694 if (start == null) start = length - 1;
3689 return Lists.lastIndexOf(this, element, start); 3695 return Lists.lastIndexOf(this, element, start);
3690 } 3696 }
3691 3697
3692 Length get first { 3698 Length get first {
3693 if (this.length > 0) return this[0]; 3699 if (this.length > 0) return this[0];
3694 throw new StateError("No elements"); 3700 throw new StateError("No elements");
3695 } 3701 }
3696 3702
3697 Length get last { 3703 Length get last {
3698 if (this.length > 0) return this[this.length - 1]; 3704 if (this.length > 0) return this[this.length - 1];
3699 throw new StateError("No elements"); 3705 throw new StateError("No elements");
3700 } 3706 }
3701 3707
3702 Length get single { 3708 Length get single {
3703 if (length == 1) return this[0]; 3709 if (length == 1) return this[0];
3704 if (length == 0) throw new StateError("No elements"); 3710 if (length == 0) throw new StateError("No elements");
3705 throw new StateError("More than one element"); 3711 throw new StateError("More than one element");
3706 } 3712 }
3707 3713
3708 Length min([int compare(Length a, Length b)]) => IterableMixinWorkaround.min(t his, compare); 3714 Length min([int compare(Length a, Length b)]) =>
3715 IterableMixinWorkaround.min(this, compare);
3709 3716
3710 Length max([int compare(Length a, Length b)]) => IterableMixinWorkaround.max(t his, compare); 3717 Length max([int compare(Length a, Length b)]) =>
3718 IterableMixinWorkaround.max(this, compare);
3711 3719
3712 Length removeAt(int pos) { 3720 Length removeAt(int pos) {
3713 throw new UnsupportedError("Cannot remove from immutable List."); 3721 throw new UnsupportedError("Cannot remove from immutable List.");
3714 } 3722 }
3715 3723
3716 Length removeLast() { 3724 Length removeLast() {
3717 throw new UnsupportedError("Cannot remove from immutable List."); 3725 throw new UnsupportedError("Cannot remove from immutable List.");
3718 } 3726 }
3719 3727
3720 void remove(Object object) { 3728 void remove(Object object) {
(...skipping 562 matching lines...) Expand 10 before | Expand all | Expand 10 after
4283 // SVG Collections expose numberOfItems rather than length. 4291 // SVG Collections expose numberOfItems rather than length.
4284 int get length => numberOfItems; 4292 int get length => numberOfItems;
4285 dynamic reduce(dynamic initialValue, dynamic combine(dynamic, Number)) { 4293 dynamic reduce(dynamic initialValue, dynamic combine(dynamic, Number)) {
4286 return IterableMixinWorkaround.reduce(this, initialValue, combine); 4294 return IterableMixinWorkaround.reduce(this, initialValue, combine);
4287 } 4295 }
4288 4296
4289 bool contains(Number element) => IterableMixinWorkaround.contains(this, elemen t); 4297 bool contains(Number element) => IterableMixinWorkaround.contains(this, elemen t);
4290 4298
4291 void forEach(void f(Number element)) => IterableMixinWorkaround.forEach(this, f); 4299 void forEach(void f(Number element)) => IterableMixinWorkaround.forEach(this, f);
4292 4300
4293 String join([String separator]) => IterableMixinWorkaround.joinList(this, sepa rator); 4301 String join([String separator]) =>
4302 IterableMixinWorkaround.joinList(this, separator);
4294 4303
4295 List mappedBy(f(Number element)) => IterableMixinWorkaround.mappedByList(this, f); 4304 List mappedBy(f(Number element)) => IterableMixinWorkaround.mappedByList(this, f);
4296 4305
4297 Iterable<Number> where(bool f(Number element)) => IterableMixinWorkaround.wher e(this, f); 4306 Iterable<Number> where(bool f(Number element)) =>
4307 IterableMixinWorkaround.where(this, f);
4298 4308
4299 bool every(bool f(Number element)) => IterableMixinWorkaround.every(this, f); 4309 bool every(bool f(Number element)) => IterableMixinWorkaround.every(this, f);
4300 4310
4301 bool any(bool f(Number element)) => IterableMixinWorkaround.any(this, f); 4311 bool any(bool f(Number element)) => IterableMixinWorkaround.any(this, f);
4302 4312
4303 List<Number> toList() => new List<Number>.from(this); 4313 List<Number> toList() => new List<Number>.from(this);
4304 Set<Number> toSet() => new Set<Number>.from(this); 4314 Set<Number> toSet() => new Set<Number>.from(this);
4305 4315
4306 bool get isEmpty => this.length == 0; 4316 bool get isEmpty => this.length == 0;
4307 4317
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
4347 throw new UnsupportedError("Cannot add to immutable List."); 4357 throw new UnsupportedError("Cannot add to immutable List.");
4348 } 4358 }
4349 4359
4350 // From List<Number>: 4360 // From List<Number>:
4351 void set length(int value) { 4361 void set length(int value) {
4352 throw new UnsupportedError("Cannot resize immutable List."); 4362 throw new UnsupportedError("Cannot resize immutable List.");
4353 } 4363 }
4354 4364
4355 // clear() defined by IDL. 4365 // clear() defined by IDL.
4356 4366
4367 List<Number> get reversed =>
4368 new ReversedListView<Number>(this, 0, null);
4369
4357 void sort([int compare(Number a, Number b)]) { 4370 void sort([int compare(Number a, Number b)]) {
4358 throw new UnsupportedError("Cannot sort immutable List."); 4371 throw new UnsupportedError("Cannot sort immutable List.");
4359 } 4372 }
4360 4373
4361 int indexOf(Number element, [int start = 0]) => 4374 int indexOf(Number element, [int start = 0]) =>
4362 Lists.indexOf(this, element, start, this.length); 4375 Lists.indexOf(this, element, start, this.length);
4363 4376
4364 int lastIndexOf(Number element, [int start]) { 4377 int lastIndexOf(Number element, [int start]) {
4365 if (start == null) start = length - 1; 4378 if (start == null) start = length - 1;
4366 return Lists.lastIndexOf(this, element, start); 4379 return Lists.lastIndexOf(this, element, start);
4367 } 4380 }
4368 4381
4369 Number get first { 4382 Number get first {
4370 if (this.length > 0) return this[0]; 4383 if (this.length > 0) return this[0];
4371 throw new StateError("No elements"); 4384 throw new StateError("No elements");
4372 } 4385 }
4373 4386
4374 Number get last { 4387 Number get last {
4375 if (this.length > 0) return this[this.length - 1]; 4388 if (this.length > 0) return this[this.length - 1];
4376 throw new StateError("No elements"); 4389 throw new StateError("No elements");
4377 } 4390 }
4378 4391
4379 Number get single { 4392 Number get single {
4380 if (length == 1) return this[0]; 4393 if (length == 1) return this[0];
4381 if (length == 0) throw new StateError("No elements"); 4394 if (length == 0) throw new StateError("No elements");
4382 throw new StateError("More than one element"); 4395 throw new StateError("More than one element");
4383 } 4396 }
4384 4397
4385 Number min([int compare(Number a, Number b)]) => IterableMixinWorkaround.min(t his, compare); 4398 Number min([int compare(Number a, Number b)]) =>
4399 IterableMixinWorkaround.min(this, compare);
4386 4400
4387 Number max([int compare(Number a, Number b)]) => IterableMixinWorkaround.max(t his, compare); 4401 Number max([int compare(Number a, Number b)]) =>
4402 IterableMixinWorkaround.max(this, compare);
4388 4403
4389 Number removeAt(int pos) { 4404 Number removeAt(int pos) {
4390 throw new UnsupportedError("Cannot remove from immutable List."); 4405 throw new UnsupportedError("Cannot remove from immutable List.");
4391 } 4406 }
4392 4407
4393 Number removeLast() { 4408 Number removeLast() {
4394 throw new UnsupportedError("Cannot remove from immutable List."); 4409 throw new UnsupportedError("Cannot remove from immutable List.");
4395 } 4410 }
4396 4411
4397 void remove(Object object) { 4412 void remove(Object object) {
(...skipping 784 matching lines...) Expand 10 before | Expand all | Expand 10 after
5182 // SVG Collections expose numberOfItems rather than length. 5197 // SVG Collections expose numberOfItems rather than length.
5183 int get length => numberOfItems; 5198 int get length => numberOfItems;
5184 dynamic reduce(dynamic initialValue, dynamic combine(dynamic, PathSeg)) { 5199 dynamic reduce(dynamic initialValue, dynamic combine(dynamic, PathSeg)) {
5185 return IterableMixinWorkaround.reduce(this, initialValue, combine); 5200 return IterableMixinWorkaround.reduce(this, initialValue, combine);
5186 } 5201 }
5187 5202
5188 bool contains(PathSeg element) => IterableMixinWorkaround.contains(this, eleme nt); 5203 bool contains(PathSeg element) => IterableMixinWorkaround.contains(this, eleme nt);
5189 5204
5190 void forEach(void f(PathSeg element)) => IterableMixinWorkaround.forEach(this, f); 5205 void forEach(void f(PathSeg element)) => IterableMixinWorkaround.forEach(this, f);
5191 5206
5192 String join([String separator]) => IterableMixinWorkaround.joinList(this, sepa rator); 5207 String join([String separator]) =>
5208 IterableMixinWorkaround.joinList(this, separator);
5193 5209
5194 List mappedBy(f(PathSeg element)) => IterableMixinWorkaround.mappedByList(this , f); 5210 List mappedBy(f(PathSeg element)) => IterableMixinWorkaround.mappedByList(this , f);
5195 5211
5196 Iterable<PathSeg> where(bool f(PathSeg element)) => IterableMixinWorkaround.wh ere(this, f); 5212 Iterable<PathSeg> where(bool f(PathSeg element)) =>
5213 IterableMixinWorkaround.where(this, f);
5197 5214
5198 bool every(bool f(PathSeg element)) => IterableMixinWorkaround.every(this, f); 5215 bool every(bool f(PathSeg element)) => IterableMixinWorkaround.every(this, f);
5199 5216
5200 bool any(bool f(PathSeg element)) => IterableMixinWorkaround.any(this, f); 5217 bool any(bool f(PathSeg element)) => IterableMixinWorkaround.any(this, f);
5201 5218
5202 List<PathSeg> toList() => new List<PathSeg>.from(this); 5219 List<PathSeg> toList() => new List<PathSeg>.from(this);
5203 Set<PathSeg> toSet() => new Set<PathSeg>.from(this); 5220 Set<PathSeg> toSet() => new Set<PathSeg>.from(this);
5204 5221
5205 bool get isEmpty => this.length == 0; 5222 bool get isEmpty => this.length == 0;
5206 5223
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
5246 throw new UnsupportedError("Cannot add to immutable List."); 5263 throw new UnsupportedError("Cannot add to immutable List.");
5247 } 5264 }
5248 5265
5249 // From List<PathSeg>: 5266 // From List<PathSeg>:
5250 void set length(int value) { 5267 void set length(int value) {
5251 throw new UnsupportedError("Cannot resize immutable List."); 5268 throw new UnsupportedError("Cannot resize immutable List.");
5252 } 5269 }
5253 5270
5254 // clear() defined by IDL. 5271 // clear() defined by IDL.
5255 5272
5273 List<PathSeg> get reversed =>
5274 new ReversedListView<PathSeg>(this, 0, null);
5275
5256 void sort([int compare(PathSeg a, PathSeg b)]) { 5276 void sort([int compare(PathSeg a, PathSeg b)]) {
5257 throw new UnsupportedError("Cannot sort immutable List."); 5277 throw new UnsupportedError("Cannot sort immutable List.");
5258 } 5278 }
5259 5279
5260 int indexOf(PathSeg element, [int start = 0]) => 5280 int indexOf(PathSeg element, [int start = 0]) =>
5261 Lists.indexOf(this, element, start, this.length); 5281 Lists.indexOf(this, element, start, this.length);
5262 5282
5263 int lastIndexOf(PathSeg element, [int start]) { 5283 int lastIndexOf(PathSeg element, [int start]) {
5264 if (start == null) start = length - 1; 5284 if (start == null) start = length - 1;
5265 return Lists.lastIndexOf(this, element, start); 5285 return Lists.lastIndexOf(this, element, start);
5266 } 5286 }
5267 5287
5268 PathSeg get first { 5288 PathSeg get first {
5269 if (this.length > 0) return this[0]; 5289 if (this.length > 0) return this[0];
5270 throw new StateError("No elements"); 5290 throw new StateError("No elements");
5271 } 5291 }
5272 5292
5273 PathSeg get last { 5293 PathSeg get last {
5274 if (this.length > 0) return this[this.length - 1]; 5294 if (this.length > 0) return this[this.length - 1];
5275 throw new StateError("No elements"); 5295 throw new StateError("No elements");
5276 } 5296 }
5277 5297
5278 PathSeg get single { 5298 PathSeg get single {
5279 if (length == 1) return this[0]; 5299 if (length == 1) return this[0];
5280 if (length == 0) throw new StateError("No elements"); 5300 if (length == 0) throw new StateError("No elements");
5281 throw new StateError("More than one element"); 5301 throw new StateError("More than one element");
5282 } 5302 }
5283 5303
5284 PathSeg min([int compare(PathSeg a, PathSeg b)]) => IterableMixinWorkaround.mi n(this, compare); 5304 PathSeg min([int compare(PathSeg a, PathSeg b)]) =>
5305 IterableMixinWorkaround.min(this, compare);
5285 5306
5286 PathSeg max([int compare(PathSeg a, PathSeg b)]) => IterableMixinWorkaround.ma x(this, compare); 5307 PathSeg max([int compare(PathSeg a, PathSeg b)]) =>
5308 IterableMixinWorkaround.max(this, compare);
5287 5309
5288 PathSeg removeAt(int pos) { 5310 PathSeg removeAt(int pos) {
5289 throw new UnsupportedError("Cannot remove from immutable List."); 5311 throw new UnsupportedError("Cannot remove from immutable List.");
5290 } 5312 }
5291 5313
5292 PathSeg removeLast() { 5314 PathSeg removeLast() {
5293 throw new UnsupportedError("Cannot remove from immutable List."); 5315 throw new UnsupportedError("Cannot remove from immutable List.");
5294 } 5316 }
5295 5317
5296 void remove(Object object) { 5318 void remove(Object object) {
(...skipping 803 matching lines...) Expand 10 before | Expand all | Expand 10 after
6100 // SVG Collections expose numberOfItems rather than length. 6122 // SVG Collections expose numberOfItems rather than length.
6101 int get length => numberOfItems; 6123 int get length => numberOfItems;
6102 dynamic reduce(dynamic initialValue, dynamic combine(dynamic, String)) { 6124 dynamic reduce(dynamic initialValue, dynamic combine(dynamic, String)) {
6103 return IterableMixinWorkaround.reduce(this, initialValue, combine); 6125 return IterableMixinWorkaround.reduce(this, initialValue, combine);
6104 } 6126 }
6105 6127
6106 bool contains(String element) => IterableMixinWorkaround.contains(this, elemen t); 6128 bool contains(String element) => IterableMixinWorkaround.contains(this, elemen t);
6107 6129
6108 void forEach(void f(String element)) => IterableMixinWorkaround.forEach(this, f); 6130 void forEach(void f(String element)) => IterableMixinWorkaround.forEach(this, f);
6109 6131
6110 String join([String separator]) => IterableMixinWorkaround.joinList(this, sepa rator); 6132 String join([String separator]) =>
6133 IterableMixinWorkaround.joinList(this, separator);
6111 6134
6112 List mappedBy(f(String element)) => IterableMixinWorkaround.mappedByList(this, f); 6135 List mappedBy(f(String element)) => IterableMixinWorkaround.mappedByList(this, f);
6113 6136
6114 Iterable<String> where(bool f(String element)) => IterableMixinWorkaround.wher e(this, f); 6137 Iterable<String> where(bool f(String element)) =>
6138 IterableMixinWorkaround.where(this, f);
6115 6139
6116 bool every(bool f(String element)) => IterableMixinWorkaround.every(this, f); 6140 bool every(bool f(String element)) => IterableMixinWorkaround.every(this, f);
6117 6141
6118 bool any(bool f(String element)) => IterableMixinWorkaround.any(this, f); 6142 bool any(bool f(String element)) => IterableMixinWorkaround.any(this, f);
6119 6143
6120 List<String> toList() => new List<String>.from(this); 6144 List<String> toList() => new List<String>.from(this);
6121 Set<String> toSet() => new Set<String>.from(this); 6145 Set<String> toSet() => new Set<String>.from(this);
6122 6146
6123 bool get isEmpty => this.length == 0; 6147 bool get isEmpty => this.length == 0;
6124 6148
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
6164 throw new UnsupportedError("Cannot add to immutable List."); 6188 throw new UnsupportedError("Cannot add to immutable List.");
6165 } 6189 }
6166 6190
6167 // From List<String>: 6191 // From List<String>:
6168 void set length(int value) { 6192 void set length(int value) {
6169 throw new UnsupportedError("Cannot resize immutable List."); 6193 throw new UnsupportedError("Cannot resize immutable List.");
6170 } 6194 }
6171 6195
6172 // clear() defined by IDL. 6196 // clear() defined by IDL.
6173 6197
6198 List<String> get reversed =>
6199 new ReversedListView<String>(this, 0, null);
6200
6174 void sort([int compare(String a, String b)]) { 6201 void sort([int compare(String a, String b)]) {
6175 throw new UnsupportedError("Cannot sort immutable List."); 6202 throw new UnsupportedError("Cannot sort immutable List.");
6176 } 6203 }
6177 6204
6178 int indexOf(String element, [int start = 0]) => 6205 int indexOf(String element, [int start = 0]) =>
6179 Lists.indexOf(this, element, start, this.length); 6206 Lists.indexOf(this, element, start, this.length);
6180 6207
6181 int lastIndexOf(String element, [int start]) { 6208 int lastIndexOf(String element, [int start]) {
6182 if (start == null) start = length - 1; 6209 if (start == null) start = length - 1;
6183 return Lists.lastIndexOf(this, element, start); 6210 return Lists.lastIndexOf(this, element, start);
6184 } 6211 }
6185 6212
6186 String get first { 6213 String get first {
6187 if (this.length > 0) return this[0]; 6214 if (this.length > 0) return this[0];
6188 throw new StateError("No elements"); 6215 throw new StateError("No elements");
6189 } 6216 }
6190 6217
6191 String get last { 6218 String get last {
6192 if (this.length > 0) return this[this.length - 1]; 6219 if (this.length > 0) return this[this.length - 1];
6193 throw new StateError("No elements"); 6220 throw new StateError("No elements");
6194 } 6221 }
6195 6222
6196 String get single { 6223 String get single {
6197 if (length == 1) return this[0]; 6224 if (length == 1) return this[0];
6198 if (length == 0) throw new StateError("No elements"); 6225 if (length == 0) throw new StateError("No elements");
6199 throw new StateError("More than one element"); 6226 throw new StateError("More than one element");
6200 } 6227 }
6201 6228
6202 String min([int compare(String a, String b)]) => IterableMixinWorkaround.min(t his, compare); 6229 String min([int compare(String a, String b)]) =>
6230 IterableMixinWorkaround.min(this, compare);
6203 6231
6204 String max([int compare(String a, String b)]) => IterableMixinWorkaround.max(t his, compare); 6232 String max([int compare(String a, String b)]) =>
6233 IterableMixinWorkaround.max(this, compare);
6205 6234
6206 String removeAt(int pos) { 6235 String removeAt(int pos) {
6207 throw new UnsupportedError("Cannot remove from immutable List."); 6236 throw new UnsupportedError("Cannot remove from immutable List.");
6208 } 6237 }
6209 6238
6210 String removeLast() { 6239 String removeLast() {
6211 throw new UnsupportedError("Cannot remove from immutable List."); 6240 throw new UnsupportedError("Cannot remove from immutable List.");
6212 } 6241 }
6213 6242
6214 void remove(Object object) { 6243 void remove(Object object) {
(...skipping 1098 matching lines...) Expand 10 before | Expand all | Expand 10 after
7313 // SVG Collections expose numberOfItems rather than length. 7342 // SVG Collections expose numberOfItems rather than length.
7314 int get length => numberOfItems; 7343 int get length => numberOfItems;
7315 dynamic reduce(dynamic initialValue, dynamic combine(dynamic, Transform)) { 7344 dynamic reduce(dynamic initialValue, dynamic combine(dynamic, Transform)) {
7316 return IterableMixinWorkaround.reduce(this, initialValue, combine); 7345 return IterableMixinWorkaround.reduce(this, initialValue, combine);
7317 } 7346 }
7318 7347
7319 bool contains(Transform element) => IterableMixinWorkaround.contains(this, ele ment); 7348 bool contains(Transform element) => IterableMixinWorkaround.contains(this, ele ment);
7320 7349
7321 void forEach(void f(Transform element)) => IterableMixinWorkaround.forEach(thi s, f); 7350 void forEach(void f(Transform element)) => IterableMixinWorkaround.forEach(thi s, f);
7322 7351
7323 String join([String separator]) => IterableMixinWorkaround.joinList(this, sepa rator); 7352 String join([String separator]) =>
7353 IterableMixinWorkaround.joinList(this, separator);
7324 7354
7325 List mappedBy(f(Transform element)) => IterableMixinWorkaround.mappedByList(th is, f); 7355 List mappedBy(f(Transform element)) => IterableMixinWorkaround.mappedByList(th is, f);
7326 7356
7327 Iterable<Transform> where(bool f(Transform element)) => IterableMixinWorkaroun d.where(this, f); 7357 Iterable<Transform> where(bool f(Transform element)) =>
7358 IterableMixinWorkaround.where(this, f);
7328 7359
7329 bool every(bool f(Transform element)) => IterableMixinWorkaround.every(this, f ); 7360 bool every(bool f(Transform element)) => IterableMixinWorkaround.every(this, f );
7330 7361
7331 bool any(bool f(Transform element)) => IterableMixinWorkaround.any(this, f); 7362 bool any(bool f(Transform element)) => IterableMixinWorkaround.any(this, f);
7332 7363
7333 List<Transform> toList() => new List<Transform>.from(this); 7364 List<Transform> toList() => new List<Transform>.from(this);
7334 Set<Transform> toSet() => new Set<Transform>.from(this); 7365 Set<Transform> toSet() => new Set<Transform>.from(this);
7335 7366
7336 bool get isEmpty => this.length == 0; 7367 bool get isEmpty => this.length == 0;
7337 7368
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
7377 throw new UnsupportedError("Cannot add to immutable List."); 7408 throw new UnsupportedError("Cannot add to immutable List.");
7378 } 7409 }
7379 7410
7380 // From List<Transform>: 7411 // From List<Transform>:
7381 void set length(int value) { 7412 void set length(int value) {
7382 throw new UnsupportedError("Cannot resize immutable List."); 7413 throw new UnsupportedError("Cannot resize immutable List.");
7383 } 7414 }
7384 7415
7385 // clear() defined by IDL. 7416 // clear() defined by IDL.
7386 7417
7418 List<Transform> get reversed =>
7419 new ReversedListView<Transform>(this, 0, null);
7420
7387 void sort([int compare(Transform a, Transform b)]) { 7421 void sort([int compare(Transform a, Transform b)]) {
7388 throw new UnsupportedError("Cannot sort immutable List."); 7422 throw new UnsupportedError("Cannot sort immutable List.");
7389 } 7423 }
7390 7424
7391 int indexOf(Transform element, [int start = 0]) => 7425 int indexOf(Transform element, [int start = 0]) =>
7392 Lists.indexOf(this, element, start, this.length); 7426 Lists.indexOf(this, element, start, this.length);
7393 7427
7394 int lastIndexOf(Transform element, [int start]) { 7428 int lastIndexOf(Transform element, [int start]) {
7395 if (start == null) start = length - 1; 7429 if (start == null) start = length - 1;
7396 return Lists.lastIndexOf(this, element, start); 7430 return Lists.lastIndexOf(this, element, start);
7397 } 7431 }
7398 7432
7399 Transform get first { 7433 Transform get first {
7400 if (this.length > 0) return this[0]; 7434 if (this.length > 0) return this[0];
7401 throw new StateError("No elements"); 7435 throw new StateError("No elements");
7402 } 7436 }
7403 7437
7404 Transform get last { 7438 Transform get last {
7405 if (this.length > 0) return this[this.length - 1]; 7439 if (this.length > 0) return this[this.length - 1];
7406 throw new StateError("No elements"); 7440 throw new StateError("No elements");
7407 } 7441 }
7408 7442
7409 Transform get single { 7443 Transform get single {
7410 if (length == 1) return this[0]; 7444 if (length == 1) return this[0];
7411 if (length == 0) throw new StateError("No elements"); 7445 if (length == 0) throw new StateError("No elements");
7412 throw new StateError("More than one element"); 7446 throw new StateError("More than one element");
7413 } 7447 }
7414 7448
7415 Transform min([int compare(Transform a, Transform b)]) => IterableMixinWorkaro und.min(this, compare); 7449 Transform min([int compare(Transform a, Transform b)]) =>
7450 IterableMixinWorkaround.min(this, compare);
7416 7451
7417 Transform max([int compare(Transform a, Transform b)]) => IterableMixinWorkaro und.max(this, compare); 7452 Transform max([int compare(Transform a, Transform b)]) =>
7453 IterableMixinWorkaround.max(this, compare);
7418 7454
7419 Transform removeAt(int pos) { 7455 Transform removeAt(int pos) {
7420 throw new UnsupportedError("Cannot remove from immutable List."); 7456 throw new UnsupportedError("Cannot remove from immutable List.");
7421 } 7457 }
7422 7458
7423 Transform removeLast() { 7459 Transform removeLast() {
7424 throw new UnsupportedError("Cannot remove from immutable List."); 7460 throw new UnsupportedError("Cannot remove from immutable List.");
7425 } 7461 }
7426 7462
7427 void remove(Object object) { 7463 void remove(Object object) {
(...skipping 412 matching lines...) Expand 10 before | Expand all | Expand 10 after
7840 } 7876 }
7841 7877
7842 dynamic reduce(dynamic initialValue, dynamic combine(dynamic, ElementInstance) ) { 7878 dynamic reduce(dynamic initialValue, dynamic combine(dynamic, ElementInstance) ) {
7843 return IterableMixinWorkaround.reduce(this, initialValue, combine); 7879 return IterableMixinWorkaround.reduce(this, initialValue, combine);
7844 } 7880 }
7845 7881
7846 bool contains(ElementInstance element) => IterableMixinWorkaround.contains(thi s, element); 7882 bool contains(ElementInstance element) => IterableMixinWorkaround.contains(thi s, element);
7847 7883
7848 void forEach(void f(ElementInstance element)) => IterableMixinWorkaround.forEa ch(this, f); 7884 void forEach(void f(ElementInstance element)) => IterableMixinWorkaround.forEa ch(this, f);
7849 7885
7850 String join([String separator]) => IterableMixinWorkaround.joinList(this, sepa rator); 7886 String join([String separator]) =>
7887 IterableMixinWorkaround.joinList(this, separator);
7851 7888
7852 List mappedBy(f(ElementInstance element)) => IterableMixinWorkaround.mappedByL ist(this, f); 7889 List mappedBy(f(ElementInstance element)) => IterableMixinWorkaround.mappedByL ist(this, f);
7853 7890
7854 Iterable<ElementInstance> where(bool f(ElementInstance element)) => IterableMi xinWorkaround.where(this, f); 7891 Iterable<ElementInstance> where(bool f(ElementInstance element)) =>
7892 IterableMixinWorkaround.where(this, f);
7855 7893
7856 bool every(bool f(ElementInstance element)) => IterableMixinWorkaround.every(t his, f); 7894 bool every(bool f(ElementInstance element)) => IterableMixinWorkaround.every(t his, f);
7857 7895
7858 bool any(bool f(ElementInstance element)) => IterableMixinWorkaround.any(this, f); 7896 bool any(bool f(ElementInstance element)) => IterableMixinWorkaround.any(this, f);
7859 7897
7860 List<ElementInstance> toList() => new List<ElementInstance>.from(this); 7898 List<ElementInstance> toList() => new List<ElementInstance>.from(this);
7861 Set<ElementInstance> toSet() => new Set<ElementInstance>.from(this); 7899 Set<ElementInstance> toSet() => new Set<ElementInstance>.from(this);
7862 7900
7863 bool get isEmpty => this.length == 0; 7901 bool get isEmpty => this.length == 0;
7864 7902
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
7906 7944
7907 // From List<ElementInstance>: 7945 // From List<ElementInstance>:
7908 void set length(int value) { 7946 void set length(int value) {
7909 throw new UnsupportedError("Cannot resize immutable List."); 7947 throw new UnsupportedError("Cannot resize immutable List.");
7910 } 7948 }
7911 7949
7912 void clear() { 7950 void clear() {
7913 throw new UnsupportedError("Cannot clear immutable List."); 7951 throw new UnsupportedError("Cannot clear immutable List.");
7914 } 7952 }
7915 7953
7954 List<ElementInstance> get reversed =>
7955 new ReversedListView<ElementInstance>(this, 0, null);
7956
7916 void sort([int compare(ElementInstance a, ElementInstance b)]) { 7957 void sort([int compare(ElementInstance a, ElementInstance b)]) {
7917 throw new UnsupportedError("Cannot sort immutable List."); 7958 throw new UnsupportedError("Cannot sort immutable List.");
7918 } 7959 }
7919 7960
7920 int indexOf(ElementInstance element, [int start = 0]) => 7961 int indexOf(ElementInstance element, [int start = 0]) =>
7921 Lists.indexOf(this, element, start, this.length); 7962 Lists.indexOf(this, element, start, this.length);
7922 7963
7923 int lastIndexOf(ElementInstance element, [int start]) { 7964 int lastIndexOf(ElementInstance element, [int start]) {
7924 if (start == null) start = length - 1; 7965 if (start == null) start = length - 1;
7925 return Lists.lastIndexOf(this, element, start); 7966 return Lists.lastIndexOf(this, element, start);
7926 } 7967 }
7927 7968
7928 ElementInstance get first { 7969 ElementInstance get first {
7929 if (this.length > 0) return this[0]; 7970 if (this.length > 0) return this[0];
7930 throw new StateError("No elements"); 7971 throw new StateError("No elements");
7931 } 7972 }
7932 7973
7933 ElementInstance get last { 7974 ElementInstance get last {
7934 if (this.length > 0) return this[this.length - 1]; 7975 if (this.length > 0) return this[this.length - 1];
7935 throw new StateError("No elements"); 7976 throw new StateError("No elements");
7936 } 7977 }
7937 7978
7938 ElementInstance get single { 7979 ElementInstance get single {
7939 if (length == 1) return this[0]; 7980 if (length == 1) return this[0];
7940 if (length == 0) throw new StateError("No elements"); 7981 if (length == 0) throw new StateError("No elements");
7941 throw new StateError("More than one element"); 7982 throw new StateError("More than one element");
7942 } 7983 }
7943 7984
7944 ElementInstance min([int compare(ElementInstance a, ElementInstance b)]) => It erableMixinWorkaround.min(this, compare); 7985 ElementInstance min([int compare(ElementInstance a, ElementInstance b)]) =>
7986 IterableMixinWorkaround.min(this, compare);
7945 7987
7946 ElementInstance max([int compare(ElementInstance a, ElementInstance b)]) => It erableMixinWorkaround.max(this, compare); 7988 ElementInstance max([int compare(ElementInstance a, ElementInstance b)]) =>
7989 IterableMixinWorkaround.max(this, compare);
7947 7990
7948 ElementInstance removeAt(int pos) { 7991 ElementInstance removeAt(int pos) {
7949 throw new UnsupportedError("Cannot remove from immutable List."); 7992 throw new UnsupportedError("Cannot remove from immutable List.");
7950 } 7993 }
7951 7994
7952 ElementInstance removeLast() { 7995 ElementInstance removeLast() {
7953 throw new UnsupportedError("Cannot remove from immutable List."); 7996 throw new UnsupportedError("Cannot remove from immutable List.");
7954 } 7997 }
7955 7998
7956 void remove(Object object) { 7999 void remove(Object object) {
(...skipping 30 matching lines...) Expand all
7987 8030
7988 List<ElementInstance> getRange(int start, int rangeLength) => 8031 List<ElementInstance> getRange(int start, int rangeLength) =>
7989 Lists.getRange(this, start, rangeLength, <ElementInstance>[]); 8032 Lists.getRange(this, start, rangeLength, <ElementInstance>[]);
7990 8033
7991 // -- end List<ElementInstance> mixins. 8034 // -- end List<ElementInstance> mixins.
7992 8035
7993 @DomName('SVGElementInstanceList.item') 8036 @DomName('SVGElementInstanceList.item')
7994 @DocsEditable 8037 @DocsEditable
7995 ElementInstance item(int index) native; 8038 ElementInstance item(int index) native;
7996 } 8039 }
OLDNEW
« no previous file with comments | « sdk/lib/html/html_common/html_common_dart2js.dart ('k') | sdk/lib/svg/dartium/svg_dartium.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698