| 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 246 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 257 CssRect get marginEdge; | 257 CssRect get marginEdge; |
| 258 $!STREAM_GETTER_SIGNATURES | 258 $!STREAM_GETTER_SIGNATURES |
| 259 } | 259 } |
| 260 | 260 |
| 261 // Wrapper over an immutable NodeList to make it implement ElementList. | 261 // Wrapper over an immutable NodeList to make it implement ElementList. |
| 262 // | 262 // |
| 263 // Clients are {`Document`, `DocumentFragment`}.`querySelectorAll` which are | 263 // Clients are {`Document`, `DocumentFragment`}.`querySelectorAll` which are |
| 264 // declared to return `ElementList`. This provides all the static analysis | 264 // declared to return `ElementList`. This provides all the static analysis |
| 265 // benefit so there is no need for this class have a constrained type parameter. | 265 // benefit so there is no need for this class have a constrained type parameter. |
| 266 // | 266 // |
| 267 class _FrozenElementList extends ListBase<Element> | 267 class _FrozenElementList extends ListBase |
| 268 implements ElementList<Element>, NodeListWrapper { | 268 implements ElementList, NodeListWrapper { |
| 269 final List<Node> _nodeList; | 269 final List<Node> _nodeList; |
| 270 | 270 |
| 271 $if JSINTEROP | 271 $if JSINTEROP |
| 272 var dartClass_instance; | 272 var dartClass_instance; |
| 273 | 273 |
| 274 _FrozenElementList._wrap(this._nodeList) { | 274 _FrozenElementList._wrap(this._nodeList) { |
| 275 this.dartClass_instance = this._nodeList; | 275 this.dartClass_instance = this._nodeList; |
| 276 } | 276 } |
| 277 $else | 277 $else |
| 278 _FrozenElementList._wrap(this._nodeList); | 278 _FrozenElementList._wrap(this._nodeList); |
| (...skipping 1245 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1524 return result; | 1524 return result; |
| 1525 } | 1525 } |
| 1526 $else | 1526 $else |
| 1527 static String _safeTagName(element) { | 1527 static String _safeTagName(element) { |
| 1528 try { | 1528 try { |
| 1529 // Safe as we plumb directly to a C++ native method. | 1529 // Safe as we plumb directly to a C++ native method. |
| 1530 return element.tagName; | 1530 return element.tagName; |
| 1531 } catch (e) {} | 1531 } catch (e) {} |
| 1532 return 'element tag unavailable'; | 1532 return 'element tag unavailable'; |
| 1533 } | 1533 } |
| 1534 $endif | 1534 $endif |
| 1535 | 1535 |
| 1536 $if DART2JS | 1536 $if DART2JS |
| 1537 @DomName('Element.offsetParent') | 1537 @DomName('Element.offsetParent') |
| 1538 @DocsEditable() | 1538 @DocsEditable() |
| 1539 final Element offsetParent; | 1539 final Element offsetParent; |
| 1540 | 1540 |
| 1541 @DomName('Element.offsetHeight') | 1541 @DomName('Element.offsetHeight') |
| 1542 @DocsEditable() | 1542 @DocsEditable() |
| 1543 int get offsetHeight => JS('num', '#.offsetHeight', this).round(); | 1543 int get offsetHeight => JS('num', '#.offsetHeight', this).round(); |
| 1544 | 1544 |
| (...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1670 const ScrollAlignment._internal(this._value); | 1670 const ScrollAlignment._internal(this._value); |
| 1671 toString() => 'ScrollAlignment.$_value'; | 1671 toString() => 'ScrollAlignment.$_value'; |
| 1672 | 1672 |
| 1673 /// Attempt to align the element to the top of the scrollable area. | 1673 /// Attempt to align the element to the top of the scrollable area. |
| 1674 static const TOP = const ScrollAlignment._internal('TOP'); | 1674 static const TOP = const ScrollAlignment._internal('TOP'); |
| 1675 /// Attempt to center the element in the scrollable area. | 1675 /// Attempt to center the element in the scrollable area. |
| 1676 static const CENTER = const ScrollAlignment._internal('CENTER'); | 1676 static const CENTER = const ScrollAlignment._internal('CENTER'); |
| 1677 /// Attempt to align the element to the bottom of the scrollable area. | 1677 /// Attempt to align the element to the bottom of the scrollable area. |
| 1678 static const BOTTOM = const ScrollAlignment._internal('BOTTOM'); | 1678 static const BOTTOM = const ScrollAlignment._internal('BOTTOM'); |
| 1679 } | 1679 } |
| OLD | NEW |