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

Unified Diff: sdk/lib/html/dart2js/html_dart2js.dart

Side-by-side diff isn't available for this file because of its large size.
Issue 12271004: Fixing node.nodes.addAll to accept node lists. (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:
Download patch
« no previous file with comments | « no previous file | sdk/lib/html/dartium/html_dartium.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sdk/lib/html/dart2js/html_dart2js.dart
diff --git a/sdk/lib/html/dart2js/html_dart2js.dart b/sdk/lib/html/dart2js/html_dart2js.dart
index cbf24a1339b732208523ca1c0cfd9b61e6d1e7bb..0d019a93dedd8ba40f9a480e778ae30f4d4d7bdd 100644
--- a/sdk/lib/html/dart2js/html_dart2js.dart
+++ b/sdk/lib/html/dart2js/html_dart2js.dart
@@ -8156,6 +8156,10 @@ class _ChildrenElementList implements List {
Iterator<Element> get iterator => toList().iterator;
void addAll(Iterable<Element> iterable) {
+ if (iterable is _ChildNodeListLazy) {
+ iterable = new List.from(iterable);
+ }
+
for (Element element in iterable) {
_element.$dom_appendChild(element);
}
@@ -17028,6 +17032,9 @@ class _ChildNodeListLazy implements List {
void addAll(Iterable<Node> iterable) {
+ if (iterable is _ChildNodeListLazy) {
+ iterable = new List.from(iterable);
+ }
for (Node node in iterable) {
_this.$dom_appendChild(node);
}
« no previous file with comments | « no previous file | sdk/lib/html/dartium/html_dartium.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698