restore polymer change

This commit is contained in:
Luke Pulverenti 2015-10-29 19:24:44 -04:00
parent 2ffd85b8d0
commit b9344e8d85
2 changed files with 26 additions and 12 deletions

View file

@ -720,7 +720,7 @@ prevent = dy > dx;
prevent = dx > dy; prevent = dx > dy;
} }
if (prevent) { if (prevent) {
ev.preventDefault(); //ev.preventDefault();
} else { } else {
Gestures.prevent('track'); Gestures.prevent('track');
} }

View file

@ -592,7 +592,7 @@ debouncer.stop();
} }
} }
}); });
Polymer.version = '1.2.0'; Polymer.version = '1.2.1';
Polymer.Base._addFeature({ Polymer.Base._addFeature({
_registerFeatures: function () { _registerFeatures: function () {
this._prepIs(); this._prepIs();
@ -999,6 +999,17 @@ DomApi.prototype = {
flush: function () { flush: function () {
Polymer.dom.flush(); Polymer.dom.flush();
}, },
deepContains: function (node) {
if (this.node.contains(node)) {
return true;
}
var n = node;
var wrappedDocument = wrap(document);
while (n && n !== wrappedDocument && n !== this.node) {
n = Polymer.dom(n).parentNode || n.host;
}
return n === this.node;
},
_lazyDistribute: function (host) { _lazyDistribute: function (host) {
if (host.shadyRoot && host.shadyRoot._distributionClean) { if (host.shadyRoot && host.shadyRoot._distributionClean) {
host.shadyRoot._distributionClean = false; host.shadyRoot._distributionClean = false;
@ -3804,7 +3815,7 @@ elt[n] = props[n];
return elt; return elt;
}, },
isLightDescendant: function (node) { isLightDescendant: function (node) {
return this.contains(node) && Polymer.dom(this).getOwnerRoot() === Polymer.dom(node).getOwnerRoot(); return this !== node && this.contains(node) && Polymer.dom(this).getOwnerRoot() === Polymer.dom(node).getOwnerRoot();
}, },
isLocalDescendant: function (node) { isLocalDescendant: function (node) {
return this.root === Polymer.dom(node).getOwnerRoot(); return this.root === Polymer.dom(node).getOwnerRoot();
@ -4402,7 +4413,7 @@ this._handlers = [];
Polymer.Base._addFeature({ Polymer.Base._addFeature({
notifyPath: function (path, value, fromAbove) { notifyPath: function (path, value, fromAbove) {
var info = {}; var info = {};
path = this._get(path, this, info); this._get(path, this, info);
this._notifyPath(info.path, value, fromAbove); this._notifyPath(info.path, value, fromAbove);
}, },
_notifyPath: function (path, value, fromAbove) { _notifyPath: function (path, value, fromAbove) {
@ -4519,9 +4530,9 @@ if (effect.value === path || effect.value.indexOf(path + '.') === 0) {
Polymer.Bind._annotationEffect.call(this, path, value, effect); Polymer.Bind._annotationEffect.call(this, path, value, effect);
} else if (path.indexOf(effect.value + '.') === 0 && !effect.negate) { } else if (path.indexOf(effect.value + '.') === 0 && !effect.negate) {
var node = this._nodes[effect.index]; var node = this._nodes[effect.index];
if (node && node.notifyPath) { if (node && node._notifyPath) {
var p = this._fixPath(effect.name, effect.value, path); var p = this._fixPath(effect.name, effect.value, path);
node.notifyPath(p, value, true); node._notifyPath(p, value, true);
} }
} }
}, },
@ -4561,9 +4572,9 @@ _notifyBoundPaths: function (path, value) {
for (var a in this._boundPaths) { for (var a in this._boundPaths) {
var b = this._boundPaths[a]; var b = this._boundPaths[a];
if (path.indexOf(a + '.') == 0) { if (path.indexOf(a + '.') == 0) {
this.notifyPath(this._fixPath(b, a, path), value); this._notifyPath(this._fixPath(b, a, path), value);
} else if (path.indexOf(b + '.') == 0) { } else if (path.indexOf(b + '.') == 0) {
this.notifyPath(this._fixPath(a, b, path), value); this._notifyPath(this._fixPath(a, b, path), value);
} }
} }
}, },
@ -4831,7 +4842,7 @@ _rx: {
comments: /\/\*[^*]*\*+([^\/*][^*]*\*+)*\//gim, comments: /\/\*[^*]*\*+([^\/*][^*]*\*+)*\//gim,
port: /@import[^;]*;/gim, port: /@import[^;]*;/gim,
customProp: /(?:^|[\s;])--[^;{]*?:[^{};]*?(?:[;\n]|$)/gim, customProp: /(?:^|[\s;])--[^;{]*?:[^{};]*?(?:[;\n]|$)/gim,
mixinProp: /(?:^|[\s;])--[^;{]*?:[^{;]*?{[^}]*?}(?:[;\n]|$)?/gim, mixinProp: /(?:^|[\s;])?--[^;{]*?:[^{;]*?{[^}]*?}(?:[;\n]|$)?/gim,
mixinApply: /@apply[\s]*\([^)]*?\)[\s]*(?:[;\n]|$)?/gim, mixinApply: /@apply[\s]*\([^)]*?\)[\s]*(?:[;\n]|$)?/gim,
varApply: /[^;:]*?:[^;]*var[^;]*(?:[;\n]|$)?/gim, varApply: /[^;:]*?:[^;]*var[^;]*(?:[;\n]|$)?/gim,
keyframesRule: /^@[^\s]*keyframes/ keyframesRule: /^@[^\s]*keyframes/
@ -5534,7 +5545,7 @@ props[i] = v;
} }
}, },
rx: { rx: {
VAR_ASSIGN: /(?:^|[;\n]\s*)(--[\w-]*?):\s*(?:([^;{]*)|{([^}]*)})(?:(?=[;\n])|$)/gi, VAR_ASSIGN: /(?:^|[;\s{]\s*)(--[\w-]*?)\s*:\s*(?:([^;{]*)|{([^}]*)})(?:(?=[;\s}])|$)/gi,
MIXIN_MATCH: /(?:^|\W+)@apply[\s]*\(([^)]*)\)/i, MIXIN_MATCH: /(?:^|\W+)@apply[\s]*\(([^)]*)\)/i,
VAR_MATCH: /(^|\W+)var\([\s]*([^,)]*)[\s]*,?[\s]*((?:[^,)]*)|(?:[^;]*\([^;)]*\)))[\s]*?\)/gi, VAR_MATCH: /(^|\W+)var\([\s]*([^,)]*)[\s]*,?[\s]*((?:[^,)]*)|(?:[^;]*\([^;)]*\)))[\s]*?\)/gi,
VAR_CAPTURE: /\([\s]*(--[^,\s)]*)(?:,[\s]*(--[^,\s)]*))?(?:\)|,)/gi, VAR_CAPTURE: /\([\s]*(--[^,\s)]*)(?:,[\s]*(--[^,\s)]*))?(?:\)|,)/gi,
@ -6069,9 +6080,12 @@ _pathEffectorImpl: function (path, value, fromAbove) {
if (this._forwardParentPath) { if (this._forwardParentPath) {
if (path.indexOf(this._parentPropPrefix) === 0) { if (path.indexOf(this._parentPropPrefix) === 0) {
var subPath = path.substring(this._parentPropPrefix.length); var subPath = path.substring(this._parentPropPrefix.length);
var model = this._modelForPath(subPath);
if (model in this._parentProps) {
this._forwardParentPath(subPath, value); this._forwardParentPath(subPath, value);
} }
} }
}
Polymer.Base._pathEffector.call(this._templatized, path, value, fromAbove); Polymer.Base._pathEffector.call(this._templatized, path, value, fromAbove);
}, },
_constructorImpl: function (model, host) { _constructorImpl: function (model, host) {
@ -19758,7 +19772,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
is: 'paper-item', is: 'paper-item',
hostAttributes: { hostAttributes: {
role: 'listitem', role: 'option',
tabindex: '0' tabindex: '0'
}, },
@ -19798,7 +19812,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
is: 'paper-icon-item', is: 'paper-icon-item',
hostAttributes: { hostAttributes: {
'role': 'listitem', 'role': 'option',
'tabindex': '0' 'tabindex': '0'
}, },