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

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

Issue 482763002: Revert "Roll polymer to 0.3.5" (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 4 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
« no previous file with comments | « pkg/pkg.status ('k') | pkg/polymer/lib/src/events.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 /// *Warning* this class is experimental and subject to change. 7 /// *Warning* this class is experimental and subject to change.
8 /// 8 ///
9 /// The data associated with a polymer-element declaration, if it is backed 9 /// The data associated with a polymer-element declaration, if it is backed
10 /// by a Dart class instead of a JavaScript prototype. 10 /// by a Dart class instead of a JavaScript prototype.
(...skipping 187 matching lines...) Expand 10 before | Expand all | Expand 10 after
198 if (superDecl._publish != null) { 198 if (superDecl._publish != null) {
199 _publish = new Map.from(superDecl._publish); 199 _publish = new Map.from(superDecl._publish);
200 } 200 }
201 if (superDecl._reflect != null) { 201 if (superDecl._reflect != null) {
202 _reflect = new Set.from(superDecl._reflect); 202 _reflect = new Set.from(superDecl._reflect);
203 } 203 }
204 } 204 }
205 205
206 _getPublishedProperties(type); 206 _getPublishedProperties(type);
207 207
208 // merge names from 'attributes' attribute into the '_publish' object 208 // merge names from 'attributes' attribute
209 var attrs = element.attributes['attributes']; 209 var attrs = element.attributes['attributes'];
210 if (attrs != null) { 210 if (attrs != null) {
211 // names='a b c' or names='a,b,c' 211 // names='a b c' or names='a,b,c'
212 // record each name for publishing 212 // record each name for publishing
213 for (var attr in attrs.split(_ATTRIBUTES_REGEX)) { 213 for (var attr in attrs.split(_ATTRIBUTES_REGEX)) {
214 // remove excess ws 214 // remove excess ws
215 attr = attr.trim(); 215 attr = attr.trim();
216 216
217 // if the user hasn't specified a value, we want to use the 217 // if the user hasn't specified a value, we want to use the
218 // default, unless a superclass has already chosen one 218 // default, unless a superclass has already chosen one
(...skipping 263 matching lines...) Expand 10 before | Expand all | Expand 10 after
482 482
483 /// track document.register'ed tag names and their declarations 483 /// track document.register'ed tag names and their declarations
484 final Map _declarations = new Map<String, PolymerDeclaration>(); 484 final Map _declarations = new Map<String, PolymerDeclaration>();
485 485
486 bool _isRegistered(String name) => _declarations.containsKey(name); 486 bool _isRegistered(String name) => _declarations.containsKey(name);
487 PolymerDeclaration _getDeclaration(String name) => _declarations[name]; 487 PolymerDeclaration _getDeclaration(String name) => _declarations[name];
488 488
489 /// Using Polymer's platform/src/ShadowCSS.js passing the style tag's content. 489 /// Using Polymer's platform/src/ShadowCSS.js passing the style tag's content.
490 void _shimShadowDomStyling(DocumentFragment template, String name, 490 void _shimShadowDomStyling(DocumentFragment template, String name,
491 String extendee) { 491 String extendee) {
492 if (template == null || _ShadowCss == null ||!_hasShadowDomPolyfill) return; 492 if (template == null || _ShadowCss == null) return;
493 493
494 _ShadowCss.callMethod('shimStyling', [template, name, extendee]); 494 _ShadowCss.callMethod('shimStyling', [template, name, extendee]);
495 } 495 }
496 496
497 final bool _hasShadowDomPolyfill = js.context.hasProperty('ShadowDOMPolyfill'); 497 final bool _hasShadowDomPolyfill = js.context.hasProperty('ShadowDOMPolyfill');
498 final JsObject _ShadowCss = _Platform != null ? _Platform['ShadowCSS'] : null; 498 final JsObject _ShadowCss = _Platform != null ? _Platform['ShadowCSS'] : null;
499 499
500 const _STYLE_SELECTOR = 'style'; 500 const _STYLE_SELECTOR = 'style';
501 const _SHEET_SELECTOR = 'link[rel=stylesheet]'; 501 const _SHEET_SELECTOR = 'link[rel=stylesheet]';
502 const _STYLE_GLOBAL_SCOPE = 'global'; 502 const _STYLE_GLOBAL_SCOPE = 'global';
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
543 bool _isObserverMethod(Symbol symbol) { 543 bool _isObserverMethod(Symbol symbol) {
544 String name = smoke.symbolToName(symbol); 544 String name = smoke.symbolToName(symbol);
545 if (name == null) return false; 545 if (name == null) return false;
546 return name.endsWith('Changed') && name != 'attributeChanged'; 546 return name.endsWith('Changed') && name != 'attributeChanged';
547 } 547 }
548 548
549 549
550 final _ATTRIBUTES_REGEX = new RegExp(r'\s|,'); 550 final _ATTRIBUTES_REGEX = new RegExp(r'\s|,');
551 551
552 final JsObject _Platform = js.context['Platform']; 552 final JsObject _Platform = js.context['Platform'];
OLDNEW
« no previous file with comments | « pkg/pkg.status ('k') | pkg/polymer/lib/src/events.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698