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 // Raw Element. | 8 // Raw Element. |
9 final Element _element; | 9 final Element _element; |
10 final HtmlCollection _childElements; | 10 final HtmlCollection _childElements; |
(...skipping 648 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
659 if (pseudoElement == null) { | 659 if (pseudoElement == null) { |
660 pseudoElement = ''; | 660 pseudoElement = ''; |
661 } | 661 } |
662 // TODO(jacobr): last param should be null, see b/5045788 | 662 // TODO(jacobr): last param should be null, see b/5045788 |
663 return window._getComputedStyle(this, pseudoElement); | 663 return window._getComputedStyle(this, pseudoElement); |
664 } | 664 } |
665 | 665 |
666 /** | 666 /** |
667 * Gets the position of this element relative to the client area of the page. | 667 * Gets the position of this element relative to the client area of the page. |
668 */ | 668 */ |
669 Rect get client => new Rect(clientLeft, clientTop, clientWidth, clientHeight); | 669 Rectangle get client => new Rectangle(clientLeft, clientTop, clientWidth, |
| 670 clientHeight); |
670 | 671 |
671 /** | 672 /** |
672 * Gets the offset of this element relative to its offsetParent. | 673 * Gets the offset of this element relative to its offsetParent. |
673 */ | 674 */ |
674 Rect get offset => new Rect(offsetLeft, offsetTop, offsetWidth, offsetHeight); | 675 Rectangle get offset => new Rectangle(offsetLeft, offsetTop, offsetWidth, |
| 676 offsetHeight); |
675 | 677 |
676 /** | 678 /** |
677 * Adds the specified text after the last child of this element. | 679 * Adds the specified text after the last child of this element. |
678 */ | 680 */ |
679 void appendText(String text) { | 681 void appendText(String text) { |
680 this.insertAdjacentText('beforeend', text); | 682 this.insertAdjacentText('beforeend', text); |
681 } | 683 } |
682 | 684 |
683 /** | 685 /** |
684 * Parses the specified text as HTML and adds the resulting node after the | 686 * Parses the specified text as HTML and adds the resulting node after the |
(...skipping 714 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1399 const ScrollAlignment._internal(this._value); | 1401 const ScrollAlignment._internal(this._value); |
1400 toString() => 'ScrollAlignment.$_value'; | 1402 toString() => 'ScrollAlignment.$_value'; |
1401 | 1403 |
1402 /// Attempt to align the element to the top of the scrollable area. | 1404 /// Attempt to align the element to the top of the scrollable area. |
1403 static const TOP = const ScrollAlignment._internal('TOP'); | 1405 static const TOP = const ScrollAlignment._internal('TOP'); |
1404 /// Attempt to center the element in the scrollable area. | 1406 /// Attempt to center the element in the scrollable area. |
1405 static const CENTER = const ScrollAlignment._internal('CENTER'); | 1407 static const CENTER = const ScrollAlignment._internal('CENTER'); |
1406 /// Attempt to align the element to the bottom of the scrollable area. | 1408 /// Attempt to align the element to the bottom of the scrollable area. |
1407 static const BOTTOM = const ScrollAlignment._internal('BOTTOM'); | 1409 static const BOTTOM = const ScrollAlignment._internal('BOTTOM'); |
1408 } | 1410 } |
OLD | NEW |