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

Side by Side Diff: pkg/polymer/lib/src/instance.dart

Issue 50703009: polymer warning clean (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: samples.status Created 7 years, 1 month 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 polymer; 5 part of polymer;
6 6
7 /** 7 /**
8 * Use this annotation to publish a field as an attribute. For example: 8 * Use this annotation to publish a field as an attribute. For example:
9 * 9 *
10 * class MyPlaybackElement extends PolymerElement { 10 * class MyPlaybackElement extends PolymerElement {
(...skipping 563 matching lines...) Expand 10 before | Expand all | Expand 10 after
574 _observeLog.fine('[$localName] observeArrayValue: register observer ' 574 _observeLog.fine('[$localName] observeArrayValue: register observer '
575 '$name'); 575 '$name');
576 } 576 }
577 var sub = (value as ObservableList).changes.listen((changes) { 577 var sub = (value as ObservableList).changes.listen((changes) {
578 invokeMethod(callbackName, [old]); 578 invokeMethod(callbackName, [old]);
579 }); 579 });
580 registerObserver('${MirrorSystem.getName(name)}__array', sub); 580 registerObserver('${MirrorSystem.getName(name)}__array', sub);
581 } 581 }
582 } 582 }
583 583
584 void unbindProperty(String name) => unregisterObserver(name); 584 bool unbindProperty(String name) => unregisterObserver(name);
585 585
586 void unbindAllProperties() { 586 void unbindAllProperties() {
587 if (_propertyObserver != null) { 587 if (_propertyObserver != null) {
588 _propertyObserver.cancel(); 588 _propertyObserver.cancel();
589 _propertyObserver = null; 589 _propertyObserver = null;
590 } 590 }
591 unregisterObservers(); 591 unregisterObservers();
592 } 592 }
593 593
594 /** Bookkeeping observers for memory management. */ 594 /** Bookkeeping observers for memory management. */
(...skipping 303 matching lines...) Expand 10 before | Expand all | Expand 10 after
898 var scope = findStyleController(); 898 var scope = findStyleController();
899 if (scope != null && scopeHasElementStyle(scope, _STYLE_CONTROLLER_SCOPE)) { 899 if (scope != null && scopeHasElementStyle(scope, _STYLE_CONTROLLER_SCOPE)) {
900 // allow inherited controller styles 900 // allow inherited controller styles
901 var decl = _declaration; 901 var decl = _declaration;
902 var cssText = new StringBuffer(); 902 var cssText = new StringBuffer();
903 while (decl != null) { 903 while (decl != null) {
904 cssText.write(decl.cssTextForScope(_STYLE_CONTROLLER_SCOPE)); 904 cssText.write(decl.cssTextForScope(_STYLE_CONTROLLER_SCOPE));
905 decl = decl.superDeclaration; 905 decl = decl.superDeclaration;
906 } 906 }
907 if (cssText.length > 0) { 907 if (cssText.length > 0) {
908 var style = this.element.cssTextToScopeStyle(cssText.toString(), 908 var style = decl.cssTextToScopeStyle(cssText.toString(),
909 _STYLE_CONTROLLER_SCOPE); 909 _STYLE_CONTROLLER_SCOPE);
910 // TODO(sorvell): for now these styles are not shimmed 910 // TODO(sorvell): for now these styles are not shimmed
911 // but we may need to shim them 911 // but we may need to shim them
912 Polymer.applyStyleToScope(style, scope); 912 Polymer.applyStyleToScope(style, scope);
913 } 913 }
914 } 914 }
915 } 915 }
916 916
917 Node findStyleController() { 917 Node findStyleController() {
918 if (js.context != null && js.context['ShadowDOMPolyfill'] != null) { 918 if (js.context != null && js.context['ShadowDOMPolyfill'] != null) {
(...skipping 154 matching lines...) Expand 10 before | Expand all | Expand 10 after
1073 1073
1074 class _PropertyValue { 1074 class _PropertyValue {
1075 Object oldValue, newValue; 1075 Object oldValue, newValue;
1076 _PropertyValue(this.oldValue); 1076 _PropertyValue(this.oldValue);
1077 } 1077 }
1078 1078
1079 class _PolymerExpressionsWithEventDelegate extends PolymerExpressions { 1079 class _PolymerExpressionsWithEventDelegate extends PolymerExpressions {
1080 prepareBinding(String path, name, node) => 1080 prepareBinding(String path, name, node) =>
1081 Polymer.prepareBinding(path, name, node, super.prepareBinding); 1081 Polymer.prepareBinding(path, name, node, super.prepareBinding);
1082 } 1082 }
OLDNEW
« pkg/pkg.status ('K') | « pkg/pkg.status ('k') | pkg/polymer/test/bind_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698