| 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 class _ChildrenElementList extends ListBase<Element> | 7 class _ChildrenElementList extends ListBase<Element> |
| 8 implements NodeListWrapper { | 8 implements NodeListWrapper { |
| 9 // Raw Element. | 9 // Raw Element. |
| 10 final Element _element; | 10 final Element _element; |
| (...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 114 } else { | 114 } else { |
| 115 _element.insertBefore(element, this[index]); | 115 _element.insertBefore(element, this[index]); |
| 116 } | 116 } |
| 117 } | 117 } |
| 118 | 118 |
| 119 void setAll(int index, Iterable<Element> iterable) { | 119 void setAll(int index, Iterable<Element> iterable) { |
| 120 throw new UnimplementedError(); | 120 throw new UnimplementedError(); |
| 121 } | 121 } |
| 122 | 122 |
| 123 void clear() { | 123 void clear() { |
| 124 // It is unclear if we want to keep non element nodes? | 124 _element._clearChildren(); |
| 125 _element.text = ''; | |
| 126 } | 125 } |
| 127 | 126 |
| 128 Element removeAt(int index) { | 127 Element removeAt(int index) { |
| 129 final result = this[index]; | 128 final result = this[index]; |
| 130 if (result != null) { | 129 if (result != null) { |
| 131 _element._removeChild(result); | 130 _element._removeChild(result); |
| 132 } | 131 } |
| 133 return result; | 132 return result; |
| 134 } | 133 } |
| 135 | 134 |
| (...skipping 1204 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1340 const ScrollAlignment._internal(this._value); | 1339 const ScrollAlignment._internal(this._value); |
| 1341 toString() => 'ScrollAlignment.$_value'; | 1340 toString() => 'ScrollAlignment.$_value'; |
| 1342 | 1341 |
| 1343 /// Attempt to align the element to the top of the scrollable area. | 1342 /// Attempt to align the element to the top of the scrollable area. |
| 1344 static const TOP = const ScrollAlignment._internal('TOP'); | 1343 static const TOP = const ScrollAlignment._internal('TOP'); |
| 1345 /// Attempt to center the element in the scrollable area. | 1344 /// Attempt to center the element in the scrollable area. |
| 1346 static const CENTER = const ScrollAlignment._internal('CENTER'); | 1345 static const CENTER = const ScrollAlignment._internal('CENTER'); |
| 1347 /// Attempt to align the element to the bottom of the scrollable area. | 1346 /// Attempt to align the element to the bottom of the scrollable area. |
| 1348 static const BOTTOM = const ScrollAlignment._internal('BOTTOM'); | 1347 static const BOTTOM = const ScrollAlignment._internal('BOTTOM'); |
| 1349 } | 1348 } |
| OLD | NEW |