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

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

Issue 11788023: Type check fixes for Dartium tests. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 11 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
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 html; 5 part of html;
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 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
59 59
60 String join([String separator]) { 60 String join([String separator]) {
61 return Collections.joinList(this, separator); 61 return Collections.joinList(this, separator);
62 } 62 }
63 63
64 List mappedBy(f(Element element)) { 64 List mappedBy(f(Element element)) {
65 return new MappedList<Element, dynamic>(this, f); 65 return new MappedList<Element, dynamic>(this, f);
66 } 66 }
67 67
68 Iterable<Element> where(bool f(Element element)) 68 Iterable<Element> where(bool f(Element element))
69 => new WhereIterable<Element>(this, f); 69 => new WhereIterable(this, f);
70 70
71 bool get isEmpty { 71 bool get isEmpty {
72 return _element.$dom_firstElementChild == null; 72 return _element.$dom_firstElementChild == null;
73 } 73 }
74 74
75 List<Element> take(int n) { 75 List<Element> take(int n) {
76 return new ListView<Element>(this, 0, n); 76 return new ListView<Element>(this, 0, n);
77 } 77 }
78 78
79 Iterable<Element> takeWhile(bool test(Element value)) { 79 Iterable<Element> takeWhile(bool test(Element value)) {
(...skipping 162 matching lines...) Expand 10 before | Expand all | Expand 10 after
242 242
243 String join([String separator]) { 243 String join([String separator]) {
244 return Collections.joinList(this, separator); 244 return Collections.joinList(this, separator);
245 } 245 }
246 246
247 List mappedBy(f(Element element)) { 247 List mappedBy(f(Element element)) {
248 return new MappedList<Element, dynamic>(this, f); 248 return new MappedList<Element, dynamic>(this, f);
249 } 249 }
250 250
251 Iterable<Element> where(bool f(Element element)) 251 Iterable<Element> where(bool f(Element element))
252 => new WhereIterable<Element>(this, f); 252 => new WhereIterable(this, f);
253 253
254 bool every(bool f(Element element)) { 254 bool every(bool f(Element element)) {
255 for(Element element in this) { 255 for(Element element in this) {
256 if (!f(element)) { 256 if (!f(element)) {
257 return false; 257 return false;
258 } 258 }
259 }; 259 };
260 return true; 260 return true;
261 } 261 }
262 262
(...skipping 618 matching lines...) Expand 10 before | Expand all | Expand 10 after
881 $if DART2JS 881 $if DART2JS
882 // Optimization to improve performance until the dart2js compiler inlines this 882 // Optimization to improve performance until the dart2js compiler inlines this
883 // method. 883 // method.
884 static dynamic createElement_tag(String tag) => 884 static dynamic createElement_tag(String tag) =>
885 JS('Element', 'document.createElement(#)', tag); 885 JS('Element', 'document.createElement(#)', tag);
886 $else 886 $else
887 static Element createElement_tag(String tag) => 887 static Element createElement_tag(String tag) =>
888 document.$dom_createElement(tag); 888 document.$dom_createElement(tag);
889 $endif 889 $endif
890 } 890 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698