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

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

Issue 12537009: Rename XMatching to XWhere. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Merge and rebuild dom libraries. Created 7 years, 9 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 | « tools/dom/src/WrappedList.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 implements List { 9 class _ChildrenElementList implements List {
10 // Raw Element. 10 // Raw Element.
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after
92 } 92 }
93 93
94 Iterable<Element> skip(int n) { 94 Iterable<Element> skip(int n) {
95 return IterableMixinWorkaround.skipList(this, n); 95 return IterableMixinWorkaround.skipList(this, n);
96 } 96 }
97 97
98 Iterable<Element> skipWhile(bool test(Element value)) { 98 Iterable<Element> skipWhile(bool test(Element value)) {
99 return IterableMixinWorkaround.skipWhile(this, test); 99 return IterableMixinWorkaround.skipWhile(this, test);
100 } 100 }
101 101
102 Element firstMatching(bool test(Element value), {Element orElse()}) { 102 Element firstWhere(bool test(Element value), {Element orElse()}) {
103 return IterableMixinWorkaround.firstMatching(this, test, orElse); 103 return IterableMixinWorkaround.firstWhere(this, test, orElse);
104 } 104 }
105 105
106 Element lastMatching(bool test(Element value), {Element orElse()}) { 106 Element lastWhere(bool test(Element value), {Element orElse()}) {
107 return IterableMixinWorkaround.lastMatchingInList(this, test, orElse); 107 return IterableMixinWorkaround.lastWhereList(this, test, orElse);
108 } 108 }
109 109
110 Element singleMatching(bool test(Element value)) { 110 Element singleWhere(bool test(Element value)) {
111 return IterableMixinWorkaround.singleMatching(this, test); 111 return IterableMixinWorkaround.singleWhere(this, test);
112 } 112 }
113 113
114 Element elementAt(int index) { 114 Element elementAt(int index) {
115 return this[index]; 115 return this[index];
116 } 116 }
117 117
118 int get length { 118 int get length {
119 return _childElements.length; 119 return _childElements.length;
120 } 120 }
121 121
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
178 } 178 }
179 179
180 void removeAll(Iterable elements) { 180 void removeAll(Iterable elements) {
181 IterableMixinWorkaround.removeAll(this, elements); 181 IterableMixinWorkaround.removeAll(this, elements);
182 } 182 }
183 183
184 void retainAll(Iterable elements) { 184 void retainAll(Iterable elements) {
185 IterableMixinWorkaround.retainAll(this, elements); 185 IterableMixinWorkaround.retainAll(this, elements);
186 } 186 }
187 187
188 void removeMatching(bool test(Element element)) { 188 void removeWhere(bool test(Element element)) {
189 IterableMixinWorkaround.removeMatching(this, test); 189 IterableMixinWorkaround.removeWhere(this, test);
190 } 190 }
191 191
192 void retainMatching(bool test(Element element)) { 192 void retainWhere(bool test(Element element)) {
193 IterableMixinWorkaround.retainMatching(this, test); 193 IterableMixinWorkaround.retainWhere(this, test);
194 } 194 }
195 195
196 void removeRange(int start, int rangeLength) { 196 void removeRange(int start, int rangeLength) {
197 throw new UnimplementedError(); 197 throw new UnimplementedError();
198 } 198 }
199 199
200 void insertRange(int start, int rangeLength, [initialValue = null]) { 200 void insertRange(int start, int rangeLength, [initialValue = null]) {
201 throw new UnimplementedError(); 201 throw new UnimplementedError();
202 } 202 }
203 203
(...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after
335 } 335 }
336 336
337 Iterable<Element> skip(int n) { 337 Iterable<Element> skip(int n) {
338 return IterableMixinWorkaround.skipList(this, n); 338 return IterableMixinWorkaround.skipList(this, n);
339 } 339 }
340 340
341 Iterable<Element> skipWhile(bool test(Element value)) { 341 Iterable<Element> skipWhile(bool test(Element value)) {
342 return IterableMixinWorkaround.skipWhile(this, test); 342 return IterableMixinWorkaround.skipWhile(this, test);
343 } 343 }
344 344
345 Element firstMatching(bool test(Element value), {Element orElse()}) { 345 Element firstWhere(bool test(Element value), {Element orElse()}) {
346 return IterableMixinWorkaround.firstMatching(this, test, orElse); 346 return IterableMixinWorkaround.firstWhere(this, test, orElse);
347 } 347 }
348 348
349 Element lastMatching(bool test(Element value), {Element orElse()}) { 349 Element lastWhere(bool test(Element value), {Element orElse()}) {
350 return IterableMixinWorkaround.lastMatchingInList(this, test, orElse); 350 return IterableMixinWorkaround.lastWhereList(this, test, orElse);
351 } 351 }
352 352
353 Element singleMatching(bool test(Element value)) { 353 Element singleWhere(bool test(Element value)) {
354 return IterableMixinWorkaround.singleMatching(this, test); 354 return IterableMixinWorkaround.singleWhere(this, test);
355 } 355 }
356 356
357 Element elementAt(int index) { 357 Element elementAt(int index) {
358 return this[index]; 358 return this[index];
359 } 359 }
360 360
361 bool get isEmpty => _nodeList.isEmpty; 361 bool get isEmpty => _nodeList.isEmpty;
362 362
363 int get length => _nodeList.length; 363 int get length => _nodeList.length;
364 364
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
437 } 437 }
438 438
439 void removeAll(Iterable elements) { 439 void removeAll(Iterable elements) {
440 throw new UnsupportedError(''); 440 throw new UnsupportedError('');
441 } 441 }
442 442
443 void retainAll(Iterable elements) { 443 void retainAll(Iterable elements) {
444 throw new UnsupportedError(''); 444 throw new UnsupportedError('');
445 } 445 }
446 446
447 void removeMatching(bool test(Element element)) { 447 void removeWhere(bool test(Element element)) {
448 throw new UnsupportedError(''); 448 throw new UnsupportedError('');
449 } 449 }
450 450
451 void retainMatching(bool test(Element element)) { 451 void retainWhere(bool test(Element element)) {
452 throw new UnsupportedError(''); 452 throw new UnsupportedError('');
453 } 453 }
454 454
455 Element get first => _nodeList.first; 455 Element get first => _nodeList.first;
456 456
457 Element get last => _nodeList.last; 457 Element get last => _nodeList.last;
458 458
459 Element get single => _nodeList.single; 459 Element get single => _nodeList.single;
460 460
461 Element min([int compare(Element a, Element b)]) { 461 Element min([int compare(Element a, Element b)]) {
(...skipping 668 matching lines...) Expand 10 before | Expand all | Expand 10 after
1130 const ScrollAlignment._internal(this._value); 1130 const ScrollAlignment._internal(this._value);
1131 toString() => 'ScrollAlignment.$_value'; 1131 toString() => 'ScrollAlignment.$_value';
1132 1132
1133 /// Attempt to align the element to the top of the scrollable area. 1133 /// Attempt to align the element to the top of the scrollable area.
1134 static const TOP = const ScrollAlignment._internal('TOP'); 1134 static const TOP = const ScrollAlignment._internal('TOP');
1135 /// Attempt to center the element in the scrollable area. 1135 /// Attempt to center the element in the scrollable area.
1136 static const CENTER = const ScrollAlignment._internal('CENTER'); 1136 static const CENTER = const ScrollAlignment._internal('CENTER');
1137 /// Attempt to align the element to the bottom of the scrollable area. 1137 /// Attempt to align the element to the bottom of the scrollable area.
1138 static const BOTTOM = const ScrollAlignment._internal('BOTTOM'); 1138 static const BOTTOM = const ScrollAlignment._internal('BOTTOM');
1139 } 1139 }
OLDNEW
« no previous file with comments | « tools/dom/src/WrappedList.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