| OLD | NEW |
| 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
| 2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
| 3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
| 4 | 4 |
| 5 part of $LIBRARYNAME; | 5 part of $LIBRARYNAME; |
| 6 | 6 |
| 7 // TODO(jacobr): use _Lists.dart to remove some of the duplicated | 7 // TODO(jacobr): use _Lists.dart to remove some of the duplicated |
| 8 // functionality. | 8 // functionality. |
| 9 class _ChildrenElementList implements List { | 9 class _ChildrenElementList implements List { |
| 10 // Raw Element. | 10 // Raw Element. |
| (...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 133 Element add(Element value) { | 133 Element add(Element value) { |
| 134 _element.$dom_appendChild(value); | 134 _element.$dom_appendChild(value); |
| 135 return value; | 135 return value; |
| 136 } | 136 } |
| 137 | 137 |
| 138 Element addLast(Element value) => add(value); | 138 Element addLast(Element value) => add(value); |
| 139 | 139 |
| 140 Iterator<Element> get iterator => toList().iterator; | 140 Iterator<Element> get iterator => toList().iterator; |
| 141 | 141 |
| 142 void addAll(Iterable<Element> iterable) { | 142 void addAll(Iterable<Element> iterable) { |
| 143 if (iterable is _ChildNodeListLazy) { |
| 144 iterable = new List.from(iterable); |
| 145 } |
| 146 |
| 143 for (Element element in iterable) { | 147 for (Element element in iterable) { |
| 144 _element.$dom_appendChild(element); | 148 _element.$dom_appendChild(element); |
| 145 } | 149 } |
| 146 } | 150 } |
| 147 | 151 |
| 148 List<Element> get reversed { | 152 List<Element> get reversed { |
| 149 return IterableMixinWorkaround.reversedList(this); | 153 return IterableMixinWorkaround.reversedList(this); |
| 150 } | 154 } |
| 151 | 155 |
| 152 void sort([int compare(Element a, Element b)]) { | 156 void sort([int compare(Element a, Element b)]) { |
| (...skipping 959 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1112 const ScrollAlignment._internal(this._value); | 1116 const ScrollAlignment._internal(this._value); |
| 1113 toString() => 'ScrollAlignment.$_value'; | 1117 toString() => 'ScrollAlignment.$_value'; |
| 1114 | 1118 |
| 1115 /// Attempt to align the element to the top of the scrollable area. | 1119 /// Attempt to align the element to the top of the scrollable area. |
| 1116 static const TOP = const ScrollAlignment._internal('TOP'); | 1120 static const TOP = const ScrollAlignment._internal('TOP'); |
| 1117 /// Attempt to center the element in the scrollable area. | 1121 /// Attempt to center the element in the scrollable area. |
| 1118 static const CENTER = const ScrollAlignment._internal('CENTER'); | 1122 static const CENTER = const ScrollAlignment._internal('CENTER'); |
| 1119 /// Attempt to align the element to the bottom of the scrollable area. | 1123 /// Attempt to align the element to the bottom of the scrollable area. |
| 1120 static const BOTTOM = const ScrollAlignment._internal('BOTTOM'); | 1124 static const BOTTOM = const ScrollAlignment._internal('BOTTOM'); |
| 1121 } | 1125 } |
| OLD | NEW |