| OLD | NEW |
| 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 917 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 928 } | 928 } |
| 929 } | 929 } |
| 930 } | 930 } |
| 931 | 931 |
| 932 Node findStyleController() { | 932 Node findStyleController() { |
| 933 if (js.context != null && js.context['ShadowDOMPolyfill'] != null) { | 933 if (js.context != null && js.context['ShadowDOMPolyfill'] != null) { |
| 934 return document.querySelector('head'); // get wrapped <head>. | 934 return document.querySelector('head'); // get wrapped <head>. |
| 935 } else { | 935 } else { |
| 936 // find the shadow root that contains this element | 936 // find the shadow root that contains this element |
| 937 var n = this; | 937 var n = this; |
| 938 while (n.parentNode) { | 938 while (n.parentNode != null) { |
| 939 n = n.parentNode; | 939 n = n.parentNode; |
| 940 } | 940 } |
| 941 return identical(n, document) ? document.head : n; | 941 return identical(n, document) ? document.head : n; |
| 942 } | 942 } |
| 943 } | 943 } |
| 944 | 944 |
| 945 bool scopeHasElementStyle(scope, descriptor) { | 945 bool scopeHasElementStyle(scope, descriptor) { |
| 946 var rule = '$_STYLE_SCOPE_ATTRIBUTE=$localName-$descriptor'; | 946 var rule = '$_STYLE_SCOPE_ATTRIBUTE=$localName-$descriptor'; |
| 947 return scope.querySelector('style[$rule]') != null; | 947 return scope.querySelector('style[$rule]') != null; |
| 948 } | 948 } |
| (...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1088 | 1088 |
| 1089 class _PropertyValue { | 1089 class _PropertyValue { |
| 1090 Object oldValue, newValue; | 1090 Object oldValue, newValue; |
| 1091 _PropertyValue(this.oldValue); | 1091 _PropertyValue(this.oldValue); |
| 1092 } | 1092 } |
| 1093 | 1093 |
| 1094 class _PolymerExpressionsWithEventDelegate extends PolymerExpressions { | 1094 class _PolymerExpressionsWithEventDelegate extends PolymerExpressions { |
| 1095 prepareBinding(String path, name, node) => | 1095 prepareBinding(String path, name, node) => |
| 1096 Polymer.prepareBinding(path, name, node, super.prepareBinding); | 1096 Polymer.prepareBinding(path, name, node, super.prepareBinding); |
| 1097 } | 1097 } |
| OLD | NEW |