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

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

Issue 12829007: Fixing dart2js size regression introduced by Node.model. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 9 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 | « sdk/lib/html/dart2js/html_dart2js.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) 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 320 matching lines...) Expand 10 before | Expand all | Expand 10 after
331 } else { 331 } else {
332 for (var node in newNodes) { 332 for (var node in newNodes) {
333 this.insertBefore(node, refChild); 333 this.insertBefore(node, refChild);
334 } 334 }
335 } 335 }
336 } 336 }
337 337
338 // Note that this may either be the locally set model or a cached value 338 // Note that this may either be the locally set model or a cached value
339 // of the inherited model. This is cached to minimize model change 339 // of the inherited model. This is cached to minimize model change
340 // notifications. 340 // notifications.
341 $if DART2JS
342 @Creates('Null')
343 $endif
341 var _model; 344 var _model;
342 bool _hasLocalModel; 345 bool _hasLocalModel;
343 StreamController<Node> _modelChangedStream; 346 StreamController<Node> _modelChangedStream;
344 347
345 /** 348 /**
346 * The data model which is inherited through the tree. 349 * The data model which is inherited through the tree.
347 * 350 *
348 * Setting this will propagate the value to all descendant nodes. If the 351 * Setting this will propagate the value to all descendant nodes. If the
349 * model is not set on this node then it will be inherited from ancestor 352 * model is not set on this node then it will be inherited from ancestor
350 * nodes. 353 * nodes.
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
410 if (_modelChangedStream == null) { 413 if (_modelChangedStream == null) {
411 // Ensure the model is cached locally to minimize change notifications. 414 // Ensure the model is cached locally to minimize change notifications.
412 _model = model; 415 _model = model;
413 _modelChangedStream = new StreamController.broadcast(); 416 _modelChangedStream = new StreamController.broadcast();
414 } 417 }
415 return _modelChangedStream.stream; 418 return _modelChangedStream.stream;
416 } 419 }
417 420
418 $!MEMBERS 421 $!MEMBERS
419 } 422 }
OLDNEW
« no previous file with comments | « sdk/lib/html/dart2js/html_dart2js.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698