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

Side by Side Diff: tools/dom/templates/html/impl/impl_Node.darttemplate

Issue 1832713002: Optimize dartium dart:html bindings so real world application performance is acceptable. Improves d… (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: update cached patches Created 4 years, 8 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
OLDNEW
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 /** 7 /**
8 * Lazy implementation of the child nodes of an element that does not request 8 * Lazy implementation of the child nodes of an element that does not request
9 * the actual child nodes of an element until strictly necessary greatly 9 * the actual child nodes of an element until strictly necessary greatly
10 * improving performance for the typical cases where it is not required. 10 * improving performance for the typical cases where it is not required.
(...skipping 182 matching lines...) Expand 10 before | Expand all | Expand 10 after
193 List<Node> get rawList => _this.childNodes; 193 List<Node> get rawList => _this.childNodes;
194 } 194 }
195 195
196 196
197 $(ANNOTATIONS)$(NATIVESPEC)$(CLASS_MODIFIERS)class $CLASSNAME$EXTENDS$IMPLEMENTS { 197 $(ANNOTATIONS)$(NATIVESPEC)$(CLASS_MODIFIERS)class $CLASSNAME$EXTENDS$IMPLEMENTS {
198 198
199 // Custom element created callback. 199 // Custom element created callback.
200 $if DART2JS 200 $if DART2JS
201 Node._created() : super._created(); 201 Node._created() : super._created();
202 $else 202 $else
203 Node._created() : super._created() { 203 Node._created() : super._created();
204 // By this point blink_jsObject should be setup if it's not then we weren't
205 // called by the registerElement createdCallback - probably created() was
206 // called directly which is verboten.
207 if (this.blink_jsObject == null) {
208 throw new DomException.jsInterop("the created constructor cannot be called directly");
209 }
210 }
211 $endif 204 $endif
212 205
213 /** 206 /**
214 * A modifiable list of this node's children. 207 * A modifiable list of this node's children.
215 */ 208 */
216 List<Node> get nodes { 209 List<Node> get nodes {
217 return new _ChildNodeListLazy(this); 210 return new _ChildNodeListLazy(this);
218 } 211 }
219 212
220 set nodes(Iterable<Node> value) { 213 set nodes(Iterable<Node> value) {
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
297 /** 290 /**
298 * A list of this node's children. 291 * A list of this node's children.
299 * 292 *
300 * ## Other resources 293 * ## Other resources
301 * 294 *
302 * * [Node.childNodes](https://developer.mozilla.org/en-US/docs/Web/API/Node.c hildNodes) 295 * * [Node.childNodes](https://developer.mozilla.org/en-US/docs/Web/API/Node.c hildNodes)
303 * from MDN. 296 * from MDN.
304 */ 297 */
305 @DomName('Node.childNodes') 298 @DomName('Node.childNodes')
306 @DocsEditable() 299 @DocsEditable()
307 List<Node> get childNodes => wrap_jso(_blink.BlinkNode.instance.childNodes_Get ter_(unwrap_jso(this))); 300 List<Node> get childNodes => _blink.BlinkNode.instance.childNodes_Getter_(this );
308 $else 301 $else
309 /** 302 /**
310 * A list of this node's children. 303 * A list of this node's children.
311 * 304 *
312 * ## Other resources 305 * ## Other resources
313 * 306 *
314 * * [Node.childNodes](https://developer.mozilla.org/en-US/docs/Web/API/Node.c hildNodes) 307 * * [Node.childNodes](https://developer.mozilla.org/en-US/docs/Web/API/Node.c hildNodes)
315 * from MDN. 308 * from MDN.
316 */ 309 */
317 @DomName('Node.childNodes') 310 @DomName('Node.childNodes')
318 @DocsEditable() 311 @DocsEditable()
319 @Returns('NodeList') 312 @Returns('NodeList')
320 @Creates('NodeList') 313 @Creates('NodeList')
321 final List<Node> childNodes; 314 final List<Node> childNodes;
322 315
323 $endif 316 $endif
324 $!MEMBERS 317 $!MEMBERS
325 } 318 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698