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

Unified Diff: third_party/polymer/v1_0/components-chromium/polymer/polymer-mini-extracted.js

Issue 1287713002: [MD settings] merge polymer 1.0.11; hack for settings checkbox (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 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
Index: third_party/polymer/v1_0/components-chromium/polymer/polymer-mini-extracted.js
diff --git a/third_party/polymer/v1_0/components-chromium/polymer/polymer-mini-extracted.js b/third_party/polymer/v1_0/components-chromium/polymer/polymer-mini-extracted.js
index 54ad11045a388cf890ba8c6f41feda6c3e258cd4..d1083c107ac0f51da8e3a8f4a930d0bb51847c47 100644
--- a/third_party/polymer/v1_0/components-chromium/polymer/polymer-mini-extracted.js
+++ b/third_party/polymer/v1_0/components-chromium/polymer/polymer-mini-extracted.js
@@ -4,6 +4,10 @@ this._template = this._template || Polymer.DomModule.import(this.is, 'template')
if (this._template && this._template.hasAttribute('is')) {
this._warn(this._logf('_prepTemplate', 'top-level Polymer template ' + 'must not be a type-extension, found', this._template, 'Move inside simple <template>.'));
}
+if (this._template && !this._template.content && HTMLTemplateElement.bootstrap) {
+HTMLTemplateElement.decorate(this._template);
+HTMLTemplateElement.bootstrap(this._template.content);
+}
},
_stampTemplate: function () {
if (this._template) {
@@ -424,6 +428,14 @@ if (this.patch) {
this.patch();
}
};
+if (window.wrap && Settings.useShadow && !Settings.useNativeShadow) {
+DomApi = function (node) {
+this.node = wrap(node);
+if (this.patch) {
+this.patch();
+}
+};
+}
DomApi.prototype = {
flush: function () {
Polymer.dom.flush();
@@ -497,6 +509,9 @@ this.insertBefore(node, ref_node);
this.removeChild(ref_node);
return node;
},
+_hasCachedOwnerRoot: function (node) {
+return Boolean(node._ownerShadyRoot !== undefined);
+},
getOwnerRoot: function () {
return this._ownerShadyRootForNode(this.node);
},
@@ -635,8 +650,7 @@ children.splice(index, 1);
node._lightParent = null;
},
_removeOwnerShadyRoot: function (node) {
-var hasCachedRoot = factory(node).getOwnerRoot() !== undefined;
-if (hasCachedRoot) {
+if (this._hasCachedOwnerRoot(node)) {
var c$ = factory(node).childNodes;
for (var i = 0, l = c$.length, n; i < l && (n = c$[i]); i++) {
this._removeOwnerShadyRoot(n);

Powered by Google App Engine
This is Rietveld 408576698