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

Unified Diff: third_party/polymer/v1_0/components-chromium/polymer/polymer-micro-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-micro-extracted.js
diff --git a/third_party/polymer/v1_0/components-chromium/polymer/polymer-micro-extracted.js b/third_party/polymer/v1_0/components-chromium/polymer/polymer-micro-extracted.js
index 2a04c660ec079533a6ef214ef9d6277cb7228c10..1927c935f35462f58e7255c370315063f2e222ba 100644
--- a/third_party/polymer/v1_0/components-chromium/polymer/polymer-micro-extracted.js
+++ b/third_party/polymer/v1_0/components-chromium/polymer/polymer-micro-extracted.js
@@ -87,6 +87,38 @@ get: function () {
return (document._currentScript || document.currentScript).ownerDocument;
}
});
+Polymer.RenderStatus = {
+_ready: false,
+_callbacks: [],
+whenReady: function (cb) {
+if (this._ready) {
+cb();
+} else {
+this._callbacks.push(cb);
+}
+},
+_makeReady: function () {
+this._ready = true;
+this._callbacks.forEach(function (cb) {
+cb();
+});
+this._callbacks = [];
+},
+_catchFirstRender: function () {
+requestAnimationFrame(function () {
+Polymer.RenderStatus._makeReady();
+});
+}
+};
+if (window.HTMLImports) {
+HTMLImports.whenReady(function () {
+Polymer.RenderStatus._catchFirstRender();
+});
+} else {
+Polymer.RenderStatus._catchFirstRender();
+}
+Polymer.ImportStatus = Polymer.RenderStatus;
+Polymer.ImportStatus.whenLoaded = Polymer.ImportStatus.whenReady;
Polymer.Base = {
__isPolymerInstance__: true,
_addFeature: function (feature) {
@@ -103,17 +135,22 @@ this._doBehavior('created');
this._initFeatures();
},
attachedCallback: function () {
+Polymer.RenderStatus.whenReady(function () {
this.isAttached = true;
this._doBehavior('attached');
+}.bind(this));
},
detachedCallback: function () {
this.isAttached = false;
this._doBehavior('detached');
},
attributeChangedCallback: function (name) {
-this._setAttributeToProperty(this, name);
+this._attributeChangedImpl(name);
this._doBehavior('attributeChanged', arguments);
},
+_attributeChangedImpl: function (name) {
+this._setAttributeToProperty(this, name);
+},
extend: function (prototype, api) {
if (prototype && api) {
Object.getOwnPropertyNames(api).forEach(function (n) {
@@ -171,6 +208,7 @@ return Boolean(obj && obj.__isPolymerInstance__);
Polymer.telemetry.instanceCount = 0;
(function () {
var modules = {};
+var lcModules = {};
var DomModule = function () {
return document.createElement('dom-module');
};
@@ -185,10 +223,11 @@ var id = id || this.id || this.getAttribute('name') || this.getAttribute('is');
if (id) {
this.id = id;
modules[id] = this;
+lcModules[id.toLowerCase()] = this;
}
},
import: function (id, selector) {
-var m = modules[id];
+var m = modules[id] || lcModules[id.toLowerCase()];
if (!m) {
forceDocumentUpgrade();
m = modules[id];
@@ -226,6 +265,9 @@ var id = module.id || module.getAttribute('name') || module.getAttribute('is');
this.is = id;
}
}
+if (this.is) {
+this.is = this.is.toLowerCase();
+}
}
});
Polymer.Base._addFeature({
@@ -513,7 +555,7 @@ debouncer.stop();
}
}
});
-Polymer.version = '1.0.8';
+Polymer.version = '1.0.9';
Polymer.Base._addFeature({
_registerFeatures: function () {
this._prepIs();

Powered by Google App Engine
This is Rietveld 408576698