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

Side by Side Diff: client/html/src/DocumentFragmentWrappingImplementation.dart

Issue 9315061: Specify the types for Element.classes, Element.elements and Node.nodes (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Fixed dynamic type error issue with VM. Created 8 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 | « client/html/release/html.dart ('k') | client/html/src/Node.dart » ('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) 2011, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2011, 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 class FilteredElementList implements ElementList { 5 class FilteredElementList implements ElementList {
6 final Node _node; 6 final Node _node;
7 final NodeList _childNodes; 7 final NodeList _childNodes;
8 8
9 FilteredElementList(Node node): _childNodes = node.nodes, _node = node; 9 FilteredElementList(Node node): _childNodes = node.nodes, _node = node;
10 10
(...skipping 175 matching lines...) Expand 10 before | Expand all | Expand 10 after
186 return fragment; 186 return fragment;
187 } 187 }
188 188
189 ElementList get elements() { 189 ElementList get elements() {
190 if (_elements == null) { 190 if (_elements == null) {
191 _elements = new FilteredElementList(this); 191 _elements = new FilteredElementList(this);
192 } 192 }
193 return _elements; 193 return _elements;
194 } 194 }
195 195
196 // TODO: The type of value should be Collection<Element>. See http://b/5392897 196 void set elements(Collection<Element> value) {
197 void set elements(value) {
198 // Copy list first since we don't want liveness during iteration. 197 // Copy list first since we don't want liveness during iteration.
199 List copy = new List.from(value); 198 List copy = new List.from(value);
200 final elements = this.elements; 199 final elements = this.elements;
201 elements.clear(); 200 elements.clear();
202 elements.addAll(copy); 201 elements.addAll(copy);
203 } 202 }
204 203
205 String get innerHTML() { 204 String get innerHTML() {
206 var e = new Element.tag("div"); 205 var e = new Element.tag("div");
207 e.nodes.add(this.clone(true)); 206 e.nodes.add(this.clone(true));
(...skipping 181 matching lines...) Expand 10 before | Expand all | Expand 10 after
389 "Title can't be set for document fragments."); 388 "Title can't be set for document fragments.");
390 } 389 }
391 390
392 void set webkitdropzone(String value) { 391 void set webkitdropzone(String value) {
393 throw new UnsupportedOperationException( 392 throw new UnsupportedOperationException(
394 "WebKit drop zone can't be set for document fragments."); 393 "WebKit drop zone can't be set for document fragments.");
395 } 394 }
396 395
397 DocumentFragment clone(bool deep) => super.clone(deep); 396 DocumentFragment clone(bool deep) => super.clone(deep);
398 } 397 }
OLDNEW
« no previous file with comments | « client/html/release/html.dart ('k') | client/html/src/Node.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698