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

Unified Diff: pkg/polymer/lib/src/instance.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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « pkg/polymer/lib/src/events.dart ('k') | pkg/polymer/lib/src/js/polymer/build.log » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/polymer/lib/src/instance.dart
diff --git a/pkg/polymer/lib/src/instance.dart b/pkg/polymer/lib/src/instance.dart
index c9d5adea2d321aad19278e217e974aa89f8c2f79..c089bd2e4d314e8af437655b1bbdff340358b045 100644
--- a/pkg/polymer/lib/src/instance.dart
+++ b/pkg/polymer/lib/src/instance.dart
@@ -352,7 +352,10 @@ abstract class Polymer implements Element, Observable, NodeBindExtension {
'incorrect binding types.');
}
prepareElement();
- if (!isTemplateStagingDocument(ownerDocument)) {
+
+ // TODO(sorvell): replace when ShadowDOMPolyfill issue is corrected
+ // https://github.com/Polymer/ShadowDOM/issues/420
+ if (!isTemplateStagingDocument(ownerDocument) || _hasShadowDomPolyfill) {
makeElementReady();
}
}
@@ -371,6 +374,7 @@ abstract class Polymer implements Element, Observable, NodeBindExtension {
_element = _getDeclaration(_name);
// install property storage
createPropertyObserver();
+ // TODO (sorvell): temporarily open observer when created
openPropertyObserver();
// install boilerplate attributes
copyInstanceAttributes();
@@ -520,6 +524,11 @@ abstract class Polymer implements Element, Observable, NodeBindExtension {
void shadowRootReady(Node root) {
// locate nodes with id and store references to them in this.$ hash
marshalNodeReferences(root);
+
+ // set up polymer gestures
+ if (_PolymerGestures != null) {
+ _PolymerGestures.callMethod('register', [root]);
+ }
}
/// Locate nodes with id and store references to them in [$] hash.
@@ -1017,10 +1026,7 @@ abstract class Polymer implements Element, Observable, NodeBindExtension {
// by default supports 1 thing being bound.
events.forEach((type, methodName) {
// Dart note: the getEventHandler method is on our PolymerExpressions.
- _PolymerGestures.callMethod(
- 'addEventListener',
- [this, type, Zone.current.bindUnaryCallback(
- element.syntax.getEventHandler(this, this, methodName))]);
+ on[type].listen(element.syntax.getEventHandler(this, this, methodName));
});
}
@@ -1167,7 +1173,7 @@ abstract class Polymer implements Element, Observable, NodeBindExtension {
if (scope == null) return;
- if (_hasShadowDomPolyfill) {
+ if (_ShadowCss != null) {
cssText = _shimCssText(cssText, scope is ShadowRoot ? scope.host : null);
}
var style = element.cssTextToScopeStyle(cssText,
« no previous file with comments | « pkg/polymer/lib/src/events.dart ('k') | pkg/polymer/lib/src/js/polymer/build.log » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698