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

Unified Diff: tools/dom/templates/html/impl/impl_Element.darttemplate

Issue 1894713002: Strong html (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: ptal Created 4 years, 8 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
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);

Powered by Google App Engine
This is Rietveld 408576698