Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(288)

Side by Side Diff: client/html/src/NodeWrappingImplementation.dart

Issue 8330003: Rename cloneNode to clone and move it into the Node interface. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Don't change the benchmark that uses the DOM interface. Created 9 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « client/html/src/Node.dart ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 _ChildrenNodeList implements NodeList { 5 class _ChildrenNodeList implements NodeList {
6 // Raw node. 6 // Raw node.
7 final _node; 7 final _node;
8 final _childNodes; 8 final _childNodes;
9 9
10 _ChildrenNodeList._wrap(var node) 10 _ChildrenNodeList._wrap(var node)
(...skipping 193 matching lines...) Expand 10 before | Expand all | Expand 10 after
204 } 204 }
205 205
206 // TODO(jacobr): remove when/if List supports a method similar to 206 // TODO(jacobr): remove when/if List supports a method similar to
207 // insertBefore or we switch NodeList to implement LinkedList rather than 207 // insertBefore or we switch NodeList to implement LinkedList rather than
208 // array. 208 // array.
209 Node insertBefore(Node newChild, Node refChild) { 209 Node insertBefore(Node newChild, Node refChild) {
210 return LevelDom.wrapNode(_ptr.insertBefore( 210 return LevelDom.wrapNode(_ptr.insertBefore(
211 LevelDom.unwrap(newChild), LevelDom.unwrap(refChild))); 211 LevelDom.unwrap(newChild), LevelDom.unwrap(refChild)));
212 } 212 }
213 213
214 // TODO(jacobr): required for some benchmarks. Added to this class but not Nod e while 214 Node clone(bool deep) {
215 // we decide what to do with it.
216 Node cloneNode(bool deep) {
217 return LevelDom.wrapNode(_ptr.cloneNode(deep)); 215 return LevelDom.wrapNode(_ptr.cloneNode(deep));
218 } 216 }
219 } 217 }
OLDNEW
« no previous file with comments | « client/html/src/Node.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698