OLD | NEW |
1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2011, 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 class FilteredElementList implements ElementList { | 5 class FilteredElementList implements ElementList { |
6 final Node _node; | 6 final Node _node; |
7 final NodeList _childNodes; | 7 final NodeList _childNodes; |
8 | 8 |
9 FilteredElementList(Node node): _childNodes = node.nodes, _node = node; | 9 FilteredElementList(Node node): _childNodes = node.nodes, _node = node; |
10 | 10 |
(...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
144 final List<ClientRect> clientRects = const <ClientRect>[]; | 144 final List<ClientRect> clientRects = const <ClientRect>[]; |
145 | 145 |
146 const EmptyElementRect(); | 146 const EmptyElementRect(); |
147 } | 147 } |
148 | 148 |
149 class DocumentFragmentWrappingImplementation extends NodeWrappingImplementation
implements DocumentFragment { | 149 class DocumentFragmentWrappingImplementation extends NodeWrappingImplementation
implements DocumentFragment { |
150 ElementList _elements; | 150 ElementList _elements; |
151 | 151 |
152 DocumentFragmentWrappingImplementation._wrap(ptr) : super._wrap(ptr) {} | 152 DocumentFragmentWrappingImplementation._wrap(ptr) : super._wrap(ptr) {} |
153 | 153 |
| 154 /** @domName Document.createDocumentFragment */ |
154 factory DocumentFragmentWrappingImplementation() { | 155 factory DocumentFragmentWrappingImplementation() { |
155 return new DocumentFragmentWrappingImplementation._wrap( | 156 return new DocumentFragmentWrappingImplementation._wrap( |
156 dom.document.createDocumentFragment()); | 157 dom.document.createDocumentFragment()); |
157 } | 158 } |
158 | 159 |
159 factory DocumentFragmentWrappingImplementation.html(String html) { | 160 factory DocumentFragmentWrappingImplementation.html(String html) { |
160 var fragment = new DocumentFragment(); | 161 var fragment = new DocumentFragment(); |
161 fragment.innerHTML = html; | 162 fragment.innerHTML = html; |
162 return fragment; | 163 return fragment; |
163 } | 164 } |
(...skipping 197 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
361 void set title(String value) { | 362 void set title(String value) { |
362 throw new UnsupportedOperationException( | 363 throw new UnsupportedOperationException( |
363 "Title can't be set for document fragments."); | 364 "Title can't be set for document fragments."); |
364 } | 365 } |
365 | 366 |
366 void set webkitdropzone(String value) { | 367 void set webkitdropzone(String value) { |
367 throw new UnsupportedOperationException( | 368 throw new UnsupportedOperationException( |
368 "WebKit drop zone can't be set for document fragments."); | 369 "WebKit drop zone can't be set for document fragments."); |
369 } | 370 } |
370 } | 371 } |
OLD | NEW |