Index: tools/dom/templates/html/impl/impl_Element.darttemplate |
diff --git a/tools/dom/templates/html/impl/impl_Element.darttemplate b/tools/dom/templates/html/impl/impl_Element.darttemplate |
index fd4fae2f01c9926ff9870dad31e7663ed70c4a46..599eaf896458b524d153375fec5a1f0640d756f6 100644 |
--- a/tools/dom/templates/html/impl/impl_Element.darttemplate |
+++ b/tools/dom/templates/html/impl/impl_Element.darttemplate |
@@ -71,7 +71,7 @@ class _ChildrenElementList extends ListBase<Element> |
_filter(test, true); |
} |
- void _filter(bool test(var element), bool retainMatching) { |
+ void _filter(bool test(Element element), bool retainMatching) { |
var removed; |
if (retainMatching) { |
removed = _element.children.where((e) => !test(e)); |
@@ -593,7 +593,7 @@ $endif |
set children(List<Element> value) { |
// Copy list first since we don't want liveness during iteration. |
- List copy = new List.from(value); |
+ var copy = value.toList(); |
var children = this.children; |
children.clear(); |
children.addAll(copy); |
@@ -828,19 +828,18 @@ $endif |
throw new ArgumentError("The frames parameter should be a List of Maps " |
"with frame information"); |
} |
- var convertedFrames = frames; |
- if (convertedFrames is Iterable) { |
+ var convertedFrames; |
+ if (frames is Iterable) { |
$if DART2JS |
convertedFrames = frames.map(convertDartToNative_Dictionary).toList(); |
$else |
convertedFrames = convertDartToNative_List( |
frames.map(convertDartToNative_Dictionary).toList()); |
$endif |
+ } else { |
+ convertedFrames = frames; |
} |
- var convertedTiming = timing; |
- if (convertedTiming is Map) { |
- convertedTiming = convertDartToNative_Dictionary(convertedTiming); |
- } |
+ var convertedTiming = timing is Map ? convertDartToNative_Dictionary(timing) : timing; |
return convertedTiming == null |
? _animate(convertedFrames) |
: _animate(convertedFrames, convertedTiming); |