| Index: third_party/polymer/components/polymer/polymer-micro.html
|
| diff --git a/third_party/polymer/components/polymer/polymer-micro.html b/third_party/polymer/components/polymer/polymer-micro.html
|
| index cd3b5ea5251817e410d6e988537adb74eba44b22..2445d3fb9040723a9449b3365ae722150fb199b4 100644
|
| --- a/third_party/polymer/components/polymer/polymer-micro.html
|
| +++ b/third_party/polymer/components/polymer/polymer-micro.html
|
| @@ -6,11 +6,7 @@ The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
|
| The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
|
| Code distributed by Google as part of the polymer project is also
|
| subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
| --->
|
| -
|
| -
|
| -
|
| -<script>(function () {
|
| +--><script>(function () {
|
| function resolve() {
|
| document.body.removeAttribute('unresolved');
|
| }
|
| @@ -23,8 +19,7 @@ resolve();
|
| addEventListener('DOMContentLoaded', resolve);
|
| }
|
| }
|
| -}());
|
| -window.Polymer = {
|
| +}());window.Polymer = {
|
| Settings: function () {
|
| var settings = window.Polymer || {};
|
| var parts = location.search.slice(1).split('&');
|
| @@ -41,10 +36,11 @@ settings.useNativeImports = settings.hasNativeImports;
|
| settings.useNativeCustomElements = !window.CustomElements || window.CustomElements.useNative;
|
| settings.useNativeShadow = settings.useShadow && settings.nativeShadow;
|
| settings.usePolyfillProto = !settings.useNativeCustomElements && !Object.__proto__;
|
| +settings.hasNativeCSSProperties = !navigator.userAgent.match('AppleWebKit/601') && window.CSS && CSS.supports && CSS.supports('box-shadow', '0 0 0 var(--foo)');
|
| +settings.useNativeCSSProperties = settings.hasNativeCSSProperties && settings.lazyRegister && settings.useNativeCSSProperties;
|
| return settings;
|
| }()
|
| -};
|
| -(function () {
|
| +};(function () {
|
| var userPolymer = window.Polymer;
|
| window.Polymer = function (prototype) {
|
| if (typeof prototype === 'function') {
|
| @@ -91,15 +87,13 @@ Polymer.log && this._regLog(prototype);
|
| dumpRegistrations: function () {
|
| this.registrations.forEach(this._regLog);
|
| }
|
| -};
|
| -Object.defineProperty(window, 'currentImport', {
|
| +};Object.defineProperty(window, 'currentImport', {
|
| enumerable: true,
|
| configurable: true,
|
| get: function () {
|
| return (document._currentScript || document.currentScript).ownerDocument;
|
| }
|
| -});
|
| -Polymer.RenderStatus = {
|
| +});Polymer.RenderStatus = {
|
| _ready: false,
|
| _callbacks: [],
|
| whenReady: function (cb) {
|
| @@ -131,6 +125,9 @@ fn,
|
| args
|
| ]);
|
| },
|
| +hasRendered: function () {
|
| +return this._ready;
|
| +},
|
| _watchNextRender: function () {
|
| if (!this._waitingNextRender) {
|
| this._waitingNextRender = true;
|
| @@ -167,8 +164,7 @@ Polymer.RenderStatus._catchFirstRender();
|
| Polymer.RenderStatus._catchFirstRender();
|
| }
|
| Polymer.ImportStatus = Polymer.RenderStatus;
|
| -Polymer.ImportStatus.whenLoaded = Polymer.ImportStatus.whenReady;
|
| -(function () {
|
| +Polymer.ImportStatus.whenLoaded = Polymer.ImportStatus.whenReady;(function () {
|
| 'use strict';
|
| var settings = Polymer.Settings;
|
| Polymer.Base = {
|
| @@ -203,6 +199,9 @@ if (proto._finishRegisterFeatures) {
|
| proto._finishRegisterFeatures();
|
| }
|
| proto._doBehavior('registered');
|
| +if (settings.usePolyfillProto && proto !== this) {
|
| +proto.extend(this, proto);
|
| +}
|
| }
|
| },
|
| attachedCallback: function () {
|
| @@ -213,8 +212,11 @@ self._doBehavior('attached');
|
| });
|
| },
|
| detachedCallback: function () {
|
| -this.isAttached = false;
|
| -this._doBehavior('detached');
|
| +var self = this;
|
| +Polymer.RenderStatus.whenReady(function () {
|
| +self.isAttached = false;
|
| +self._doBehavior('detached');
|
| +});
|
| },
|
| attributeChangedCallback: function (name, oldValue, newValue) {
|
| this._attributeChangedImpl(name);
|
| @@ -248,15 +250,36 @@ if (pd) {
|
| Object.defineProperty(target, name, pd);
|
| }
|
| },
|
| -_log: console.log.apply.bind(console.log, console),
|
| -_warn: console.warn.apply.bind(console.warn, console),
|
| -_error: console.error.apply.bind(console.error, console),
|
| +_logger: function (level, args) {
|
| +if (args.length === 1 && Array.isArray(args[0])) {
|
| +args = args[0];
|
| +}
|
| +switch (level) {
|
| +case 'log':
|
| +case 'warn':
|
| +case 'error':
|
| +console[level].apply(console, args);
|
| +break;
|
| +}
|
| +},
|
| +_log: function () {
|
| +var args = Array.prototype.slice.call(arguments, 0);
|
| +this._logger('log', args);
|
| +},
|
| +_warn: function () {
|
| +var args = Array.prototype.slice.call(arguments, 0);
|
| +this._logger('warn', args);
|
| +},
|
| +_error: function () {
|
| +var args = Array.prototype.slice.call(arguments, 0);
|
| +this._logger('error', args);
|
| +},
|
| _logf: function () {
|
| -return this._logPrefix.concat([this.is]).concat(Array.prototype.slice.call(arguments, 0));
|
| +return this._logPrefix.concat(this.is).concat(Array.prototype.slice.call(arguments, 0));
|
| }
|
| };
|
| Polymer.Base._logPrefix = function () {
|
| -var color = window.chrome || /firefox/i.test(navigator.userAgent);
|
| +var color = window.chrome && !/edge/i.test(navigator.userAgent) || /firefox/i.test(navigator.userAgent);
|
| return color ? [
|
| '%c[%s::%s]:',
|
| 'font-weight: bold; background-color:#EEEE00;'
|
| @@ -283,8 +306,7 @@ Polymer.isInstance = function (obj) {
|
| return Boolean(obj && obj.__isPolymerInstance__);
|
| };
|
| Polymer.telemetry.instanceCount = 0;
|
| -}());
|
| -(function () {
|
| +}());(function () {
|
| var modules = {};
|
| var lcModules = {};
|
| var findModule = function (id) {
|
| @@ -337,8 +359,7 @@ CustomElements.upgrade(m);
|
| }
|
| }
|
| }
|
| -}());
|
| -Polymer.Base._addFeature({
|
| +}());Polymer.Base._addFeature({
|
| _prepIs: function () {
|
| if (!this.is) {
|
| var module = (document._currentScript || document.currentScript).parentNode;
|
| @@ -351,8 +372,7 @@ if (this.is) {
|
| this.is = this.is.toLowerCase();
|
| }
|
| }
|
| -});
|
| -Polymer.Base._addFeature({
|
| +});Polymer.Base._addFeature({
|
| behaviors: [],
|
| _desugarBehaviors: function () {
|
| if (this.behaviors.length) {
|
| @@ -433,8 +453,7 @@ attached: true,
|
| detached: true,
|
| attributeChanged: true,
|
| ready: true
|
| -};
|
| -Polymer.Base._addFeature({
|
| +};Polymer.Base._addFeature({
|
| _getExtendedPrototype: function (tag) {
|
| return this._getExtendedNativePrototype(tag);
|
| },
|
| @@ -451,8 +470,7 @@ return p;
|
| getNativePrototype: function (tag) {
|
| return Object.getPrototypeOf(document.createElement(tag));
|
| }
|
| -});
|
| -Polymer.Base._addFeature({
|
| +});Polymer.Base._addFeature({
|
| _prepConstructor: function () {
|
| this._factoryArgs = this.extends ? [
|
| this.extends,
|
| @@ -478,8 +496,7 @@ this.factoryImpl.apply(elt, args);
|
| }
|
| return elt;
|
| }
|
| -});
|
| -Polymer.nob = Object.create(null);
|
| +});Polymer.nob = Object.create(null);
|
| Polymer.Base._addFeature({
|
| properties: {},
|
| getPropertyInfo: function (property) {
|
| @@ -538,8 +555,7 @@ t.readOnly = s.readOnly;
|
| }
|
| }
|
| }
|
| -});
|
| -Polymer.CaseMap = {
|
| +});Polymer.CaseMap = {
|
| _caseMap: {},
|
| _rx: {
|
| dashToCamel: /-[a-z]/g,
|
| @@ -553,8 +569,7 @@ return m[1].toUpperCase();
|
| camelToDashCase: function (camel) {
|
| return this._caseMap[camel] || (this._caseMap[camel] = camel.replace(this._rx.camelToDash, '-$1').toLowerCase());
|
| }
|
| -};
|
| -Polymer.Base._addFeature({
|
| +};Polymer.Base._addFeature({
|
| _addHostAttributes: function (attributes) {
|
| if (!this._aggregatedAttributes) {
|
| this._aggregatedAttributes = {};
|
| @@ -664,9 +679,7 @@ default:
|
| return value != null ? value : undefined;
|
| }
|
| }
|
| -});
|
| -Polymer.version = '1.4.0';
|
| -Polymer.Base._addFeature({
|
| +});Polymer.version = '1.6.0';Polymer.Base._addFeature({
|
| _registerFeatures: function () {
|
| this._prepIs();
|
| this._prepBehaviors();
|
| @@ -682,4 +695,21 @@ _initFeatures: function () {
|
| this._marshalHostAttributes();
|
| this._marshalBehaviors();
|
| }
|
| -});</script>
|
| +});</script>
|
| +
|
| +
|
| +
|
| +
|
| +
|
| +
|
| +
|
| +
|
| +
|
| +
|
| +
|
| +
|
| +
|
| +
|
| +
|
| +
|
| +
|
|
|