Chromium Code Reviews| 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 // TODO(jacobr): use _Lists.dart to remove some of the duplicated | 5 // TODO(jacobr): use _Lists.dart to remove some of the duplicated |
| 6 // functionality. | 6 // functionality. |
| 7 class _ChildrenElementList implements List { | 7 class _ChildrenElementList implements List { |
| 8 // Raw Element. | 8 // Raw Element. |
| 9 final _ElementImpl _element; | 9 final _ElementImpl _element; |
| 10 final _HTMLCollectionImpl _childElements; | 10 final _HTMLCollectionImpl _childElements; |
| (...skipping 688 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 699 dataAttributes[key] = value[key]; | 699 dataAttributes[key] = value[key]; |
| 700 } | 700 } |
| 701 } | 701 } |
| 702 | 702 |
| 703 Future<ElementRect> get rect { | 703 Future<ElementRect> get rect { |
| 704 return _createMeasurementFuture( | 704 return _createMeasurementFuture( |
| 705 () => new _ElementRectImpl(this), | 705 () => new _ElementRectImpl(this), |
| 706 new Completer<ElementRect>()); | 706 new Completer<ElementRect>()); |
| 707 } | 707 } |
| 708 | 708 |
| 709 ClientRect get client => new _SimpleClientRect( | |
|
Jacob
2012/10/03 23:08:53
also go ahead and remove that these are rects. th
blois
2012/10/03 23:36:09
Done.
| |
| 710 this.$dom_clientLeft, | |
| 711 this.$dom_clientTop, | |
| 712 this.$dom_clientWidth, | |
| 713 this.$dom_clientHeight); | |
| 714 | |
| 715 ClientRect get offset => new _SimpleClientRect( | |
| 716 this.$dom_offsetLeft, | |
| 717 this.$dom_offsetTop, | |
| 718 this.$dom_offsetWidth, | |
| 719 this.$dom_offsetHeight); | |
| 720 | |
| 721 ClientRect get scroll => new _SimpleClientRect( | |
| 722 this.$dom_scrollLeft, | |
| 723 this.$dom_scrollTop, | |
| 724 this.$dom_scrollWidth, | |
| 725 this.$dom_scrollHeight); | |
| 726 | |
| 727 ClientRect get boundingClientRect => this.$dom_getBoundingClientRect(); | |
| 728 | |
| 709 Future<CSSStyleDeclaration> get computedStyle { | 729 Future<CSSStyleDeclaration> get computedStyle { |
| 710 // TODO(jacobr): last param should be null, see b/5045788 | 730 // TODO(jacobr): last param should be null, see b/5045788 |
| 711 return getComputedStyle(''); | 731 return getComputedStyle(''); |
| 712 } | 732 } |
| 713 | 733 |
| 714 Future<CSSStyleDeclaration> getComputedStyle(String pseudoElement) { | 734 Future<CSSStyleDeclaration> getComputedStyle(String pseudoElement) { |
| 715 return _createMeasurementFuture( | 735 return _createMeasurementFuture( |
| 716 () => _window.$dom_getComputedStyle(this, pseudoElement), | 736 () => _window.$dom_getComputedStyle(this, pseudoElement), |
| 717 new Completer<CSSStyleDeclaration>()); | 737 new Completer<CSSStyleDeclaration>()); |
| 718 } | 738 } |
| (...skipping 143 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 862 $if DART2JS | 882 $if DART2JS |
| 863 // Optimization to improve performance until the dart2js compiler inlines this | 883 // Optimization to improve performance until the dart2js compiler inlines this |
| 864 // method. | 884 // method. |
| 865 static Element createElement_tag(String tag) | 885 static Element createElement_tag(String tag) |
| 866 native "return document.createElement(tag)"; | 886 native "return document.createElement(tag)"; |
| 867 $else | 887 $else |
| 868 static Element createElement_tag(String tag) => | 888 static Element createElement_tag(String tag) => |
| 869 _document.$dom_createElement(tag); | 889 _document.$dom_createElement(tag); |
| 870 $endif | 890 $endif |
| 871 } | 891 } |
| OLD | NEW |