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

Side by Side Diff: tools/dom/src/TemplateBindings.dart

Issue 16050007: Fixing broken tests because of mismatch of suppressed warnings. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 6 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
OLDNEW
1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, 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 html; 5 part of html;
6 6
7 // This code is a port of Model-Driven-Views: 7 // This code is a port of Model-Driven-Views:
8 // https://github.com/polymer-project/mdv 8 // https://github.com/polymer-project/mdv
9 // The code mostly comes from src/template_element.js 9 // The code mostly comes from src/template_element.js
10 10
(...skipping 593 matching lines...) Expand 10 before | Expand all | Expand 10 after
604 static void _removeAllBindingsRecursively(Node node) { 604 static void _removeAllBindingsRecursively(Node node) {
605 _nodeOrCustom(node).unbindAll(); 605 _nodeOrCustom(node).unbindAll();
606 for (var c = node.$dom_firstChild; c != null; c = c.nextNode) { 606 for (var c = node.$dom_firstChild; c != null; c = c.nextNode) {
607 _removeAllBindingsRecursively(c); 607 _removeAllBindingsRecursively(c);
608 } 608 }
609 } 609 }
610 610
611 static void _removeChild(Node parent, Node child) { 611 static void _removeChild(Node parent, Node child) {
612 child._templateInstance = null; 612 child._templateInstance = null;
613 if (child is Element && (child as Element).isTemplate) { 613 if (child is Element && (child as Element).isTemplate) {
614 Element childElement = child;
614 // Make sure we stop observing when we remove an element. 615 // Make sure we stop observing when we remove an element.
615 var templateIterator = child._templateIterator; 616 var templateIterator = childElement._templateIterator;
616 if (templateIterator != null) { 617 if (templateIterator != null) {
617 templateIterator.abandon(); 618 templateIterator.abandon();
618 child._templateIterator = null; 619 childElement._templateIterator = null;
619 } 620 }
620 } 621 }
621 child.remove(); 622 child.remove();
622 _removeAllBindingsRecursively(child); 623 _removeAllBindingsRecursively(child);
623 } 624 }
624 } 625 }
625 626
626 class _BindingToken { 627 class _BindingToken {
627 final String value; 628 final String value;
628 final bool isBinding; 629 final bool isBinding;
(...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after
779 _sub.cancel(); 780 _sub.cancel();
780 _sub = null; 781 _sub = null;
781 } 782 }
782 783
783 void abandon() { 784 void abandon() {
784 unobserve(); 785 unobserve();
785 _valueBinding.cancel(); 786 _valueBinding.cancel();
786 inputs.dispose(); 787 inputs.dispose();
787 } 788 }
788 } 789 }
OLDNEW
« no previous file with comments | « tests/compiler/dart2js/analyze_api_test.dart ('k') | tools/dom/templates/html/impl/impl_WheelEvent.darttemplate » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698