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

Side by Side Diff: tools/dom/templates/html/impl/impl_Element.darttemplate

Issue 14425003: Make List.remove return boolean. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « tests/corelib/queue_test.dart ('k') | tools/dom/templates/html/impl/impl_Node.darttemplate » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 extends ListBase<Element> { 9 class _ChildrenElementList extends ListBase<Element> {
10 // Raw Element. 10 // Raw Element.
(...skipping 161 matching lines...) Expand 10 before | Expand all | Expand 10 after
172 } 172 }
173 173
174 void replaceRange(int start, int end, Iterable<Element> iterable) { 174 void replaceRange(int start, int end, Iterable<Element> iterable) {
175 throw new UnimplementedError(); 175 throw new UnimplementedError();
176 } 176 }
177 177
178 void fillRange(int start, int end, [Element fillValue]) { 178 void fillRange(int start, int end, [Element fillValue]) {
179 throw new UnimplementedError(); 179 throw new UnimplementedError();
180 } 180 }
181 181
182 void remove(Object object) { 182 bool remove(Object object) {
183 if (object is Element) { 183 if (object is Element) {
184 Element element = object; 184 Element element = object;
185 if (identical(element.parentNode, _element)) { 185 if (identical(element.parentNode, _element)) {
186 _element.$dom_removeChild(element); 186 _element.$dom_removeChild(element);
187 return true;
187 } 188 }
188 } 189 }
190 return false;
189 } 191 }
190 192
191 void removeWhere(bool test(Element element)) { 193 void removeWhere(bool test(Element element)) {
192 _childElements.removeWhere(test); 194 _childElements.removeWhere(test);
193 } 195 }
194 196
195 void retainWhere(bool test(Element element)) { 197 void retainWhere(bool test(Element element)) {
196 _childElements.retainWhere(test); 198 _childElements.retainWhere(test);
197 } 199 }
198 200
(...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after
339 } 341 }
340 342
341 Element removeAt(int index) { 343 Element removeAt(int index) {
342 throw new UnsupportedError(''); 344 throw new UnsupportedError('');
343 } 345 }
344 346
345 Element removeLast() { 347 Element removeLast() {
346 throw new UnsupportedError(''); 348 throw new UnsupportedError('');
347 } 349 }
348 350
349 void remove(Object element) { 351 bool remove(Object element) {
350 throw new UnsupportedError(''); 352 throw new UnsupportedError('');
351 } 353 }
352 354
353 void removeWhere(bool test(Element element)) { 355 void removeWhere(bool test(Element element)) {
354 throw new UnsupportedError(''); 356 throw new UnsupportedError('');
355 } 357 }
356 358
357 void retainWhere(bool test(Element element)) { 359 void retainWhere(bool test(Element element)) {
358 throw new UnsupportedError(''); 360 throw new UnsupportedError('');
359 } 361 }
(...skipping 617 matching lines...) Expand 10 before | Expand all | Expand 10 after
977 const ScrollAlignment._internal(this._value); 979 const ScrollAlignment._internal(this._value);
978 toString() => 'ScrollAlignment.$_value'; 980 toString() => 'ScrollAlignment.$_value';
979 981
980 /// Attempt to align the element to the top of the scrollable area. 982 /// Attempt to align the element to the top of the scrollable area.
981 static const TOP = const ScrollAlignment._internal('TOP'); 983 static const TOP = const ScrollAlignment._internal('TOP');
982 /// Attempt to center the element in the scrollable area. 984 /// Attempt to center the element in the scrollable area.
983 static const CENTER = const ScrollAlignment._internal('CENTER'); 985 static const CENTER = const ScrollAlignment._internal('CENTER');
984 /// Attempt to align the element to the bottom of the scrollable area. 986 /// Attempt to align the element to the bottom of the scrollable area.
985 static const BOTTOM = const ScrollAlignment._internal('BOTTOM'); 987 static const BOTTOM = const ScrollAlignment._internal('BOTTOM');
986 } 988 }
OLDNEW
« no previous file with comments | « tests/corelib/queue_test.dart ('k') | tools/dom/templates/html/impl/impl_Node.darttemplate » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698