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

Unified Diff: pkg/polymer/lib/src/declaration.dart

Issue 33903003: Fixing polymer element registration when extending tag extensions (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Sync to ToT Created 7 years, 2 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « pkg/pkg.status ('k') | pkg/polymer/test/register_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/polymer/lib/src/declaration.dart
diff --git a/pkg/polymer/lib/src/declaration.dart b/pkg/polymer/lib/src/declaration.dart
index 72458c85229f5c59898f7a4a4dc06ba061a2bc7b..7e6be8220decb54022c31c5223e16437a567cd80 100644
--- a/pkg/polymer/lib/src/declaration.dart
+++ b/pkg/polymer/lib/src/declaration.dart
@@ -172,7 +172,7 @@ class PolymerDeclaration extends HtmlElement {
_shimShadowDomStyling(templateContent, name);
// register our custom element
- registerType(name, extendsTag: extendee);
+ registerType(name);
// NOTE: skip in Dart because we don't have mutable global scope.
// reference constructor in a global named by 'constructor' attribute
@@ -234,10 +234,15 @@ class PolymerDeclaration extends HtmlElement {
}
- void registerType(String name, {String extendsTag}) {
+ void registerType(String name) {
Jennifer Messerly 2013/10/22 21:41:47 retroactive question: why don't we pass in "extend
+ var baseTag;
+ var decl = this;
+ while (decl != null) {
+ baseTag = decl.attributes['extends'];
+ decl = decl.superDeclaration;
+ }
// native element must be specified in extends
- var nativeExtends = (extendsTag != null && !extendsTag.contains('-')) ?
- extendsTag : null;
+ var nativeExtends = baseTag;
Siggi Cherem (dart-lang) 2013/10/22 16:44:17 nit: merge baseTag or nativeExtends to use a singl
document.register(name, type, extendsTag: nativeExtends);
}
« no previous file with comments | « pkg/pkg.status ('k') | pkg/polymer/test/register_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698