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

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

Issue 50263004: Make sure that classes in dart:html do not implement both List and List<E>. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 1 month 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/scripts/htmldartgenerator.py ('k') | no next file » | 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 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 241 matching lines...) Expand 10 before | Expand all | Expand 10 after
252 @Experimental() 252 @Experimental()
253 CssRect get marginEdge; 253 CssRect get marginEdge;
254 $!STREAM_GETTER_SIGNATURES 254 $!STREAM_GETTER_SIGNATURES
255 } 255 }
256 256
257 // TODO(jacobr): this is an inefficient implementation but it is hard to see 257 // TODO(jacobr): this is an inefficient implementation but it is hard to see
258 // a better option given that we cannot quite force NodeList to be an 258 // a better option given that we cannot quite force NodeList to be an
259 // ElementList as there are valid cases where a NodeList JavaScript object 259 // ElementList as there are valid cases where a NodeList JavaScript object
260 // contains Node objects that are not Elements. 260 // contains Node objects that are not Elements.
261 class _FrozenElementList<T extends Element> extends ListBase<T> 261 class _FrozenElementList<T extends Element> extends ListBase<T>
262 implements ElementList, NodeListWrapper { 262 implements ElementList<T>, NodeListWrapper {
263 final List<Node> _nodeList; 263 final List<Node> _nodeList;
264 // The subset of _nodeList that are Elements. 264 // The subset of _nodeList that are Elements.
265 List<Element> _elementList; 265 List<Element> _elementList;
266 266
267 _FrozenElementList._wrap(this._nodeList) { 267 _FrozenElementList._wrap(this._nodeList) {
268 _elementList = _nodeList.where((e) => e is Element).toList(); 268 _elementList = _nodeList.where((e) => e is Element).toList();
269 } 269 }
270 270
271 int get length => _nodeList.length; 271 int get length => _nodeList.length;
272 272
(...skipping 1016 matching lines...) Expand 10 before | Expand all | Expand 10 after
1289 const ScrollAlignment._internal(this._value); 1289 const ScrollAlignment._internal(this._value);
1290 toString() => 'ScrollAlignment.$_value'; 1290 toString() => 'ScrollAlignment.$_value';
1291 1291
1292 /// Attempt to align the element to the top of the scrollable area. 1292 /// Attempt to align the element to the top of the scrollable area.
1293 static const TOP = const ScrollAlignment._internal('TOP'); 1293 static const TOP = const ScrollAlignment._internal('TOP');
1294 /// Attempt to center the element in the scrollable area. 1294 /// Attempt to center the element in the scrollable area.
1295 static const CENTER = const ScrollAlignment._internal('CENTER'); 1295 static const CENTER = const ScrollAlignment._internal('CENTER');
1296 /// Attempt to align the element to the bottom of the scrollable area. 1296 /// Attempt to align the element to the bottom of the scrollable area.
1297 static const BOTTOM = const ScrollAlignment._internal('BOTTOM'); 1297 static const BOTTOM = const ScrollAlignment._internal('BOTTOM');
1298 } 1298 }
OLDNEW
« no previous file with comments | « tools/dom/scripts/htmldartgenerator.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698