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 ElementList { | 7 class _ChildrenElementList implements ElementList { |
8 // Raw Element. | 8 // Raw Element. |
9 final _ElementImpl _element; | 9 final _ElementImpl _element; |
10 final _HTMLCollectionImpl _childElements; | 10 final _HTMLCollectionImpl _childElements; |
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
90 | 90 |
91 Element add(_ElementImpl value) { | 91 Element add(_ElementImpl value) { |
92 _element._appendChild(value); | 92 _element._appendChild(value); |
93 return value; | 93 return value; |
94 } | 94 } |
95 | 95 |
96 Element addLast(_ElementImpl value) => add(value); | 96 Element addLast(_ElementImpl value) => add(value); |
97 | 97 |
98 Iterator<Element> iterator() => _toList().iterator(); | 98 Iterator<Element> iterator() => _toList().iterator(); |
99 | 99 |
100 void addAll(Collection<_ElementImpl> collection) { | 100 void addAll(Collection<Element> collection) { |
101 for (_ElementImpl element in collection) { | 101 for (_ElementImpl element in collection) { |
102 _element._appendChild(element); | 102 _element._appendChild(element); |
103 } | 103 } |
104 } | 104 } |
105 | 105 |
106 void sort(int compare(Element a, Element b)) { | 106 void sort(int compare(Element a, Element b)) { |
107 throw const UnsupportedOperationException('TODO(jacobr): should we impl?'); | 107 throw const UnsupportedOperationException('TODO(jacobr): should we impl?'); |
108 } | 108 } |
109 | 109 |
110 void copyFrom(List<Object> src, int srcStart, int dstStart, int count) { | 110 void copyFrom(List<Object> src, int srcStart, int dstStart, int count) { |
(...skipping 421 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
532 return getComputedStyle(''); | 532 return getComputedStyle(''); |
533 } | 533 } |
534 | 534 |
535 Future<CSSStyleDeclaration> getComputedStyle(String pseudoElement) { | 535 Future<CSSStyleDeclaration> getComputedStyle(String pseudoElement) { |
536 return _createMeasurementFuture( | 536 return _createMeasurementFuture( |
537 () => _window._getComputedStyle(this, pseudoElement), | 537 () => _window._getComputedStyle(this, pseudoElement), |
538 new Completer<CSSStyleDeclaration>()); | 538 new Completer<CSSStyleDeclaration>()); |
539 } | 539 } |
540 $!MEMBERS | 540 $!MEMBERS |
541 } | 541 } |
OLD | NEW |