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

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

Issue 63483002: Fix some users of removed mirror API. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: 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 * **Warning**: this class is experiental and subject to change. 8 * **Warning**: this class is experiental and subject to change.
9 * 9 *
10 * The implementation for the `polymer-element` element. 10 * The implementation for the `polymer-element` element.
(...skipping 204 matching lines...) Expand 10 before | Expand all | Expand 10 after
215 // Potentially remove when spec bug is addressed. 215 // Potentially remove when spec bug is addressed.
216 // https://www.w3.org/Bugs/Public/show_bug.cgi?id=21407 216 // https://www.w3.org/Bugs/Public/show_bug.cgi?id=21407
217 // TODO(jmesserly): resolvePath not ported, see first comment in this class. 217 // TODO(jmesserly): resolvePath not ported, see first comment in this class.
218 218
219 // under ShadowDOMPolyfill, transforms to approximate missing CSS features 219 // under ShadowDOMPolyfill, transforms to approximate missing CSS features
220 _shimShadowDomStyling(templateContent, name, extendee); 220 _shimShadowDomStyling(templateContent, name, extendee);
221 221
222 var cls = reflectClass(type); 222 var cls = reflectClass(type);
223 // TODO(jmesserly): this feels unnatrual in Dart. Since we have convenient 223 // TODO(jmesserly): this feels unnatrual in Dart. Since we have convenient
224 // lazy static initialization, can we get by without it? 224 // lazy static initialization, can we get by without it?
225 var registered = cls.methods[#registerCallback]; 225 var registered = cls.declarations[#registerCallback];
226 if (registered != null && registered.isStatic && 226 if (registered != null &&
227 registered is MethodMirror &&
228 registered.isStatic &&
227 registered.isRegularMethod) { 229 registered.isRegularMethod) {
228 cls.invoke(#registerCallback, [this]); 230 cls.invoke(#registerCallback, [this]);
229 } 231 }
230 } 232 }
231 233
232 void registerType(String name) { 234 void registerType(String name) {
233 var baseTag; 235 var baseTag;
234 var decl = this; 236 var decl = this;
235 while (decl != null) { 237 while (decl != null) {
236 baseTag = decl.attributes['extends']; 238 baseTag = decl.attributes['extends'];
(...skipping 372 matching lines...) Expand 10 before | Expand all | Expand 10 after
609 return map; 611 return map;
610 }(); 612 }();
611 613
612 // Dart note: we need this function because we have additional renames JS does 614 // Dart note: we need this function because we have additional renames JS does
613 // not have. The JS renames are simply case differences, whereas we have ones 615 // not have. The JS renames are simply case differences, whereas we have ones
614 // like doubleclick -> dblclick and stripping the webkit prefix. 616 // like doubleclick -> dblclick and stripping the webkit prefix.
615 String _eventNameFromType(String eventType) { 617 String _eventNameFromType(String eventType) {
616 final result = _reverseEventTranslations[eventType]; 618 final result = _reverseEventTranslations[eventType];
617 return result != null ? result : eventType; 619 return result != null ? result : eventType;
618 } 620 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698