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

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

Issue 524673002: call shimStyling even if we have no template, because our extendee might have one (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 3 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 | « no previous file | no next file » | 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 474 matching lines...) Expand 10 before | Expand all | Expand 10 after
485 485
486 /// track document.register'ed tag names and their declarations 486 /// track document.register'ed tag names and their declarations
487 final Map _declarations = new Map<String, PolymerDeclaration>(); 487 final Map _declarations = new Map<String, PolymerDeclaration>();
488 488
489 bool _isRegistered(String name) => _declarations.containsKey(name); 489 bool _isRegistered(String name) => _declarations.containsKey(name);
490 PolymerDeclaration _getDeclaration(String name) => _declarations[name]; 490 PolymerDeclaration _getDeclaration(String name) => _declarations[name];
491 491
492 /// Using Polymer's platform/src/ShadowCSS.js passing the style tag's content. 492 /// Using Polymer's platform/src/ShadowCSS.js passing the style tag's content.
493 void _shimShadowDomStyling(DocumentFragment template, String name, 493 void _shimShadowDomStyling(DocumentFragment template, String name,
494 String extendee) { 494 String extendee) {
495 if (template == null || _ShadowCss == null ||!_hasShadowDomPolyfill) return; 495 if (_ShadowCss == null ||!_hasShadowDomPolyfill) return;
496 496
497 _ShadowCss.callMethod('shimStyling', [template, name, extendee]); 497 _ShadowCss.callMethod('shimStyling', [template, name, extendee]);
498 } 498 }
499 499
500 final bool _hasShadowDomPolyfill = js.context.hasProperty('ShadowDOMPolyfill'); 500 final bool _hasShadowDomPolyfill = js.context.hasProperty('ShadowDOMPolyfill');
501 final JsObject _ShadowCss = _Platform != null ? _Platform['ShadowCSS'] : null; 501 final JsObject _ShadowCss = _Platform != null ? _Platform['ShadowCSS'] : null;
502 502
503 const _STYLE_SELECTOR = 'style'; 503 const _STYLE_SELECTOR = 'style';
504 const _SHEET_SELECTOR = 'link[rel=stylesheet]'; 504 const _SHEET_SELECTOR = 'link[rel=stylesheet]';
505 const _STYLE_GLOBAL_SCOPE = 'global'; 505 const _STYLE_GLOBAL_SCOPE = 'global';
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
546 bool _isObserverMethod(Symbol symbol) { 546 bool _isObserverMethod(Symbol symbol) {
547 String name = smoke.symbolToName(symbol); 547 String name = smoke.symbolToName(symbol);
548 if (name == null) return false; 548 if (name == null) return false;
549 return name.endsWith('Changed') && name != 'attributeChanged'; 549 return name.endsWith('Changed') && name != 'attributeChanged';
550 } 550 }
551 551
552 552
553 final _ATTRIBUTES_REGEX = new RegExp(r'\s|,'); 553 final _ATTRIBUTES_REGEX = new RegExp(r'\s|,');
554 554
555 final JsObject _Platform = js.context['Platform']; 555 final JsObject _Platform = js.context['Platform'];
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698