| 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 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 74 void _filter(bool test(Element element), bool retainMatching) { | 74 void _filter(bool test(Element element), bool retainMatching) { |
| 75 var removed; | 75 var removed; |
| 76 if (retainMatching) { | 76 if (retainMatching) { |
| 77 removed = _element.children.where((e) => !test(e)); | 77 removed = _element.children.where((e) => !test(e)); |
| 78 } else { | 78 } else { |
| 79 removed = _element.children.where(test); | 79 removed = _element.children.where(test); |
| 80 } | 80 } |
| 81 for (var e in removed) e.remove(); | 81 for (var e in removed) e.remove(); |
| 82 } | 82 } |
| 83 | 83 |
| 84 void setRange(int start, int end, Iterable<Element> iterable, | 84 void fillRange(int start, int end, [Element fillValue]) { |
| 85 [int skipCount = 0]) { | |
| 86 throw new UnimplementedError(); | 85 throw new UnimplementedError(); |
| 87 } | 86 } |
| 88 | 87 |
| 89 void replaceRange(int start, int end, Iterable<Element> iterable) { | 88 void replaceRange(int start, int end, Iterable<Element> iterable) { |
| 90 throw new UnimplementedError(); | 89 throw new UnimplementedError(); |
| 91 } | 90 } |
| 92 | 91 |
| 93 void fillRange(int start, int end, [Element fillValue]) { | 92 void removeRange(int start, int end) { |
| 94 throw new UnimplementedError(); | 93 throw new UnimplementedError(); |
| 95 } | 94 } |
| 96 | 95 |
| 96 void setRange(int start, int end, Iterable<Element> iterable, |
| 97 [int skipCount = 0]) { |
| 98 throw new UnimplementedError(); |
| 99 } |
| 100 |
| 97 bool remove(Object object) { | 101 bool remove(Object object) { |
| 98 if (object is Element) { | 102 if (object is Element) { |
| 99 Element element = object; | 103 Element element = object; |
| 100 $if JSINTEROP | 104 $if JSINTEROP |
| 101 // We aren't preserving identity of nodes in JSINTEROP mode | 105 // We aren't preserving identity of nodes in JSINTEROP mode |
| 102 if (element.parentNode == _element) { | 106 if (element.parentNode == _element) { |
| 103 $else | 107 $else |
| 104 if (identical(element.parentNode, _element)) { | 108 if (identical(element.parentNode, _element)) { |
| 105 $endif | 109 $endif |
| 106 _element._removeChild(element); | 110 _element._removeChild(element); |
| (...skipping 1573 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1680 const ScrollAlignment._internal(this._value); | 1684 const ScrollAlignment._internal(this._value); |
| 1681 toString() => 'ScrollAlignment.$_value'; | 1685 toString() => 'ScrollAlignment.$_value'; |
| 1682 | 1686 |
| 1683 /// Attempt to align the element to the top of the scrollable area. | 1687 /// Attempt to align the element to the top of the scrollable area. |
| 1684 static const TOP = const ScrollAlignment._internal('TOP'); | 1688 static const TOP = const ScrollAlignment._internal('TOP'); |
| 1685 /// Attempt to center the element in the scrollable area. | 1689 /// Attempt to center the element in the scrollable area. |
| 1686 static const CENTER = const ScrollAlignment._internal('CENTER'); | 1690 static const CENTER = const ScrollAlignment._internal('CENTER'); |
| 1687 /// Attempt to align the element to the bottom of the scrollable area. | 1691 /// Attempt to align the element to the bottom of the scrollable area. |
| 1688 static const BOTTOM = const ScrollAlignment._internal('BOTTOM'); | 1692 static const BOTTOM = const ScrollAlignment._internal('BOTTOM'); |
| 1689 } | 1693 } |
| OLD | NEW |