| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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 } |
| OLD | NEW |