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

Unified Diff: sdk/lib/svg/dart2js/svg_dart2js.dart

Issue 11817059: Fixes for a number of dart analyzer issues in dart:html. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Syncing to latest. Created 7 years, 11 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « sdk/lib/html/html_common/filtered_element_list.dart ('k') | sdk/lib/svg/dartium/svg_dartium.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sdk/lib/svg/dart2js/svg_dart2js.dart
diff --git a/sdk/lib/svg/dart2js/svg_dart2js.dart b/sdk/lib/svg/dart2js/svg_dart2js.dart
index f6d14d209456e3851b454e09313bdfacea627d72..5241d9175d6d1a2b2e3e21f39f5968ae9a43bccb 100644
--- a/sdk/lib/svg/dart2js/svg_dart2js.dart
+++ b/sdk/lib/svg/dart2js/svg_dart2js.dart
@@ -2985,6 +2985,9 @@ class LengthList implements JavaScriptIndexingBehavior, List<Length> native "*SV
bool any(bool f(Length element)) => Collections.any(this, f);
+ List<Length> toList() => new List<Length>.from(this);
+ Set<Length> toSet() => new Set<Length>.from(this);
+
bool get isEmpty => this.length == 0;
List<Length> take(int n) => new ListView<Length>(this, 0, n);
@@ -3064,9 +3067,9 @@ class LengthList implements JavaScriptIndexingBehavior, List<Length> native "*SV
throw new StateError("More than one element");
}
- Length min([int compare(Length a, Length b)]) => _Collections.minInList(this, compare);
+ Length min([int compare(Length a, Length b)]) => Collections.min(this, compare);
- Length max([int compare(Length a, Length b)]) => _Collections.maxInList(this, compare);
+ Length max([int compare(Length a, Length b)]) => Collections.max(this, compare);
Length removeAt(int pos) {
throw new UnsupportedError("Cannot removeAt on immutable List.");
@@ -3556,6 +3559,9 @@ class NumberList implements JavaScriptIndexingBehavior, List<Number> native "*SV
bool any(bool f(Number element)) => Collections.any(this, f);
+ List<Number> toList() => new List<Number>.from(this);
+ Set<Number> toSet() => new Set<Number>.from(this);
+
bool get isEmpty => this.length == 0;
List<Number> take(int n) => new ListView<Number>(this, 0, n);
@@ -3635,9 +3641,9 @@ class NumberList implements JavaScriptIndexingBehavior, List<Number> native "*SV
throw new StateError("More than one element");
}
- Number min([int compare(Number a, Number b)]) => _Collections.minInList(this, compare);
+ Number min([int compare(Number a, Number b)]) => Collections.min(this, compare);
- Number max([int compare(Number a, Number b)]) => _Collections.maxInList(this, compare);
+ Number max([int compare(Number a, Number b)]) => Collections.max(this, compare);
Number removeAt(int pos) {
throw new UnsupportedError("Cannot removeAt on immutable List.");
@@ -4302,6 +4308,9 @@ class PathSegList implements JavaScriptIndexingBehavior, List<PathSeg> native "*
bool any(bool f(PathSeg element)) => Collections.any(this, f);
+ List<PathSeg> toList() => new List<PathSeg>.from(this);
+ Set<PathSeg> toSet() => new Set<PathSeg>.from(this);
+
bool get isEmpty => this.length == 0;
List<PathSeg> take(int n) => new ListView<PathSeg>(this, 0, n);
@@ -4381,9 +4390,9 @@ class PathSegList implements JavaScriptIndexingBehavior, List<PathSeg> native "*
throw new StateError("More than one element");
}
- PathSeg min([int compare(PathSeg a, PathSeg b)]) => _Collections.minInList(this, compare);
+ PathSeg min([int compare(PathSeg a, PathSeg b)]) => Collections.min(this, compare);
- PathSeg max([int compare(PathSeg a, PathSeg b)]) => _Collections.maxInList(this, compare);
+ PathSeg max([int compare(PathSeg a, PathSeg b)]) => Collections.max(this, compare);
PathSeg removeAt(int pos) {
throw new UnsupportedError("Cannot removeAt on immutable List.");
@@ -5073,6 +5082,9 @@ class StringList implements JavaScriptIndexingBehavior, List<String> native "*SV
bool any(bool f(String element)) => Collections.any(this, f);
+ List<String> toList() => new List<String>.from(this);
+ Set<String> toSet() => new Set<String>.from(this);
+
bool get isEmpty => this.length == 0;
List<String> take(int n) => new ListView<String>(this, 0, n);
@@ -5152,9 +5164,9 @@ class StringList implements JavaScriptIndexingBehavior, List<String> native "*SV
throw new StateError("More than one element");
}
- String min([int compare(String a, String b)]) => _Collections.minInList(this, compare);
+ String min([int compare(String a, String b)]) => Collections.min(this, compare);
- String max([int compare(String a, String b)]) => _Collections.maxInList(this, compare);
+ String max([int compare(String a, String b)]) => Collections.max(this, compare);
String removeAt(int pos) {
throw new UnsupportedError("Cannot removeAt on immutable List.");
@@ -6112,6 +6124,9 @@ class TransformList implements List<Transform>, JavaScriptIndexingBehavior nativ
bool any(bool f(Transform element)) => Collections.any(this, f);
+ List<Transform> toList() => new List<Transform>.from(this);
+ Set<Transform> toSet() => new Set<Transform>.from(this);
+
bool get isEmpty => this.length == 0;
List<Transform> take(int n) => new ListView<Transform>(this, 0, n);
@@ -6191,9 +6206,9 @@ class TransformList implements List<Transform>, JavaScriptIndexingBehavior nativ
throw new StateError("More than one element");
}
- Transform min([int compare(Transform a, Transform b)]) => _Collections.minInList(this, compare);
+ Transform min([int compare(Transform a, Transform b)]) => Collections.min(this, compare);
- Transform max([int compare(Transform a, Transform b)]) => _Collections.maxInList(this, compare);
+ Transform max([int compare(Transform a, Transform b)]) => Collections.max(this, compare);
Transform removeAt(int pos) {
throw new UnsupportedError("Cannot removeAt on immutable List.");
@@ -6563,6 +6578,9 @@ class _ElementInstanceList implements JavaScriptIndexingBehavior, List<ElementIn
bool any(bool f(ElementInstance element)) => Collections.any(this, f);
+ List<ElementInstance> toList() => new List<ElementInstance>.from(this);
+ Set<ElementInstance> toSet() => new Set<ElementInstance>.from(this);
+
bool get isEmpty => this.length == 0;
List<ElementInstance> take(int n) => new ListView<ElementInstance>(this, 0, n);
@@ -6644,9 +6662,9 @@ class _ElementInstanceList implements JavaScriptIndexingBehavior, List<ElementIn
throw new StateError("More than one element");
}
- ElementInstance min([int compare(ElementInstance a, ElementInstance b)]) => _Collections.minInList(this, compare);
+ ElementInstance min([int compare(ElementInstance a, ElementInstance b)]) => Collections.min(this, compare);
- ElementInstance max([int compare(ElementInstance a, ElementInstance b)]) => _Collections.maxInList(this, compare);
+ ElementInstance max([int compare(ElementInstance a, ElementInstance b)]) => Collections.max(this, compare);
ElementInstance removeAt(int pos) {
throw new UnsupportedError("Cannot removeAt on immutable List.");
« no previous file with comments | « sdk/lib/html/html_common/filtered_element_list.dart ('k') | sdk/lib/svg/dartium/svg_dartium.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698