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

Side by Side Diff: third_party/polymer/polymer.js

Issue 98583008: Checkout Polymer using bower instead of the raw repository. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 7 years 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « third_party/polymer/platform/platform.js.map ('k') | third_party/polymer/polymer/.bower.json » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright (c) 2012 The Polymer Authors. All rights reserved.
2 //
3 // Redistribution and use in source and binary forms, with or without
4 // modification, are permitted provided that the following conditions are
5 // met:
6 //
7 // * Redistributions of source code must retain the above copyright
8 // notice, this list of conditions and the following disclaimer.
9 // * Redistributions in binary form must reproduce the above
10 // copyright notice, this list of conditions and the following disclaimer
11 // in the documentation and/or other materials provided with the
12 // distribution.
13 // * Neither the name of Google Inc. nor the names of its
14 // contributors may be used to endorse or promote products derived from
15 // this software without specific prior written permission.
16 //
17 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
18 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
19 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
20 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
21 // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
22 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
23 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
24 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
25 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
26 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
27 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
28 // @version: 0.0.20131107
29 Polymer={},"function"==typeof window.Polymer&&(Polymer={}),function(a){function b(){var a=Polymer.veiledElements;if(a)for(var b,d=0,e=a.length;e>d&&(b=a[d]);d++ )c(b)}function c(a){for(var b,c=document.querySelectorAll(a),d=0,f=c.length;f>d& &(b=c[d]);d++)b.classList.add(e)}function d(){requestAnimationFrame(function(){f or(var a,b=document.querySelectorAll("."+e),c=0,d=b.length;d>c&&(a=b[c]);c++)a.c lassList.add(f),a.classList.remove(e);if(b.length){var g=function(){for(var a,c= 0,d=b.length;d>c&&(a=b[c]);c++)a.classList.remove(f);document.body.removeEventLi stener(j,g,!1)};document.body.addEventListener(j,g,!1)}})}a.veiledElements=["bod y"];var e="polymer-veiled",f="polymer-unveil",g=.3,h=document.createElement("sty le");h.textContent="."+e+" { opacity: 0; } \n."+f+"{ -webkit-transition: opacity "+g+"s; transition: opacity "+g+"s; }\n";var i=document.querySelector("head");i .insertBefore(h,i.firstChild);var j=void 0!==document.documentElement.style.webk itTransition?"webkitTransitionEnd":"transitionend";document.addEventListener("DO MContentLoaded",b),window.addEventListener("WebComponentsReady",d),a.unveilEleme nts=d}(Polymer),function(a){function b(a,b){return a&&b&&Object.getOwnPropertyNa mes(b).forEach(function(c){var d=Object.getOwnPropertyDescriptor(b,c);d&&(Object .defineProperty(a,c,d),"function"==typeof d.value&&(d.value.nom=c))}),a}a.extend =b}(Polymer),function(a){function b(a,b,d){return a?a.stop():a=new c(this),a.go( b,d),a}var c=function(a){this.context=a};c.prototype={go:function(a,b){this.call back=a,this.handle=setTimeout(this.complete.bind(this),b)},stop:function(){this. handle&&(clearTimeout(this.handle),this.handle=null)},complete:function(){this.h andle&&(this.stop(),this.callback.call(this.context))}},a.job=b}(Polymer),functi on(){var a={};HTMLElement.register=function(b,c){a[b]=c},HTMLElement.getPrototyp eForTag=function(b){var c=b?a[b]:HTMLElement.prototype;return c||Object.getProto typeOf(document.createElement(b))};var b=Event.prototype.stopPropagation;Event.p rototype.stopPropagation=function(){this.cancelBubble=!0,b.apply(this,arguments) },HTMLImports.importer.preloadSelectors+=", polymer-element link[rel=stylesheet] "}(Polymer),function(a){function b(a){var c=b.caller,g=c.nom,h=c._super;if(h||(g ||(g=c.nom=e.call(this,c)),g||console.warn("called super() on a method not insta lled declaratively (has no .nom property)"),h=d(c,g,f(this))),h){var i=h[g];retu rn i._super||d(i,g,h),i.apply(this,a||[])}}function c(a,b,c){for(;a;){if(a[b]!== c&&a[b])return a;a=f(a)}}function d(a,b,d){return a._super=c(d,b,a),a._super&&(a ._super[b].nom=b),a._super}function e(a){for(var b=this.__proto__;b&&b!==HTMLEle ment.prototype;){for(var c,d=Object.getOwnPropertyNames(b),e=0,f=d.length;f>e&&( c=d[e]);e++){var g=Object.getOwnPropertyDescriptor(b,c);if("function"==typeof g. value&&g.value===a)return c}b=b.__proto__}}function f(a){return a.__proto__}a.su per=b}(Polymer),function(a){function b(a,b){var d=typeof b;return b instanceof D ate&&(d="date"),c[d](a,b)}var c={string:function(a){return a},date:function(a){r eturn new Date(Date.parse(a)||Date.now())},"boolean":function(a){return""===a?!0 :"false"===a?!1:!!a},number:function(a){var b=parseFloat(a);return String(b)===a ?b:a},object:function(a,b){if(null===b)return a;try{return JSON.parse(a.replace( /'/g,'"'))}catch(c){return a}},"function":function(a,b){return b}};a.deserialize Value=b}(Polymer),function(a){var b={};b.declaration={},b.instance={},a.api=b}(P olymer),function(a){var b={async:function(a,b,c){Platform.flush(),b=b&&b.length? b:[b];var d=function(){(this[a]||a).apply(this,b)}.bind(this);return c?setTimeou t(d,c):requestAnimationFrame(d)},fire:function(a,b,c,d){var e=c||this;return e.d ispatchEvent(new CustomEvent(a,{bubbles:void 0!==d?d:!0,detail:b})),b},asyncFire :function(){this.async("fire",arguments)},classFollows:function(a,b,c){b&&b.clas sList.remove(c),a&&a.classList.add(c)}};b.asyncMethod=b.async,a.api.instance.uti ls=b}(Polymer),function(a){function b(a){for(;a.parentNode;)a=a.parentNode;retur n a.host}var c=window.logFlags||{},d="on-",e={EVENT_PREFIX:d,hasEventPrefix:func tion(a){return a&&"o"===a[0]&&"n"===a[1]&&"-"===a[2]},removeEventPrefix:function (a){return a.slice(f)},addHostListeners:function(){var a=this.eventDelegates;c.e vents&&Object.keys(a).length>0&&console.log("[%s] addHostListeners:",this.localN ame,a),this.addNodeListeners(this,a,this.hostEventListener)},addNodeListeners:fu nction(a,b,c){var d;for(var e in b)d||(d=c.bind(this)),this.addNodeListener(a,e, d)},addNodeListener:function(a,b,c){a.addEventListener(b,c)},hostEventListener:f unction(a){if(!a.cancelBubble){c.events&&console.group("[%s]: hostEventListener( %s)",this.localName,a.type);var b=this.findEventDelegate(a);b&&(c.events&&consol e.log("[%s] found host handler name [%s]",this.localName,b),this.dispatchMethod( this,b,[a,a.detail,this])),c.events&&console.groupEnd()}},findEventDelegate:func tion(a){return this.eventDelegates[a.type]},dispatchMethod:function(a,b,d){if(a) {c.events&&console.group("[%s] dispatch [%s]",a.localName,b);var e="function"==t ypeof b?b:a[b];e&&e[d?"apply":"call"](a,d),c.events&&console.groupEnd(),Platform .flush()}},prepareBinding:function(a,d){return e.hasEventPrefix(d)?function(f,g) {c.events&&console.log('event: [%s].%s => [%s].%s()"',g.localName,f.localName,a) ;var h=function(c){var d=b(g);if(d&&d.dispatchMethod){var e=d,h=a;"@"==a[0]&&(e= f,h=Path.get(a.slice(1)).getValueFrom(f)),d.dispatchMethod(e,h,[c,c.detail,g])}} ,i=e.removeEventPrefix(d);return g.addEventListener(i,h,!1),{close:function(){c. events&&console.log('event.remove: [%s].%s => [%s].%s()"',g.localName,d,f.localN ame,a),g.removeEventListener(i,h,!1)}}}:void 0}},f=d.length;a.api.instance.event s=e}(Polymer),function(a){var b={copyInstanceAttributes:function(){var a=this._i nstanceAttributes;for(var b in a)this.hasAttribute(b)||this.setAttribute(b,a[b]) },takeAttributes:function(){if(this._publishLC)for(var a,b=0,c=this.attributes,d =c.length;(a=c[b])&&d>b;b++)this.attributeToProperty(a.name,a.value)},attributeT oProperty:function(b,c){var b=this.propertyForAttribute(b);if(b){if(c&&c.search( a.bindPattern)>=0)return;var d=this[b],c=this.deserializeValue(c,d);c!==d&&(this [b]=c)}},propertyForAttribute:function(a){var b=this._publishLC&&this._publishLC [a];return b},deserializeValue:function(b,c){return a.deserializeValue(b,c)},ser ializeValue:function(a,b){return"boolean"===b?a?"":void 0:"object"!==b&&"functio n"!==b&&void 0!==a?a:void 0},reflectPropertyToAttribute:function(a){var b=typeof this[a],c=this.serializeValue(this[a],b);void 0!==c?this.setAttribute(a,c):"boo lean"===b&&this.removeAttribute(a)}};a.api.instance.attributes=b}(Polymer),funct ion(a){function b(a){return new CompoundPathObserver(a.notifyPropertyChanges,a)} function c(a,b,c,e){d.bind&&console.log(f,c.localName||"object",e,a.localName,b) ;var g=Path.get(e),h=g.getValueFrom(c);return(null===h||void 0===h)&&g.setValueF rom(c,a[b]),PathObserver.defineProperty(a,b,c,e)}var d=window.logFlags||{},e={ob serveProperties:function(){var a=this._observeNames,c=this._publishNames;if(a&&a .length||c&&c.length){for(var d,e=this._propertyObserver=b(this),f=0,g=a.length; g>f&&(d=a[f]);f++){e.addPath(this,d);var h=Object.getOwnPropertyDescriptor(this. __proto__,d);h&&h.value&&this.observeArrayValue(d,h.value,null)}for(var d,f=0,g= c.length;g>f&&(d=c[f]);f++)this.observe&&void 0!==this.observe[d]||e.addPath(thi s,d);e.start()}},notifyPropertyChanges:function(a,b,c,d){for(var e,f,g={},h=0,i= c.length;i>h;h++)c[h]&&(e=d[2*h+1],void 0!==this.publish[e]&&this.reflectPropert yToAttribute(e),f=this.observe[e],f&&(this.observeArrayValue(e,a[h],b[h]),g[f]|| (g[f]=!0,this.invokeMethod(f,[b[h],a[h],arguments]))))},observeArrayValue:functi on(a,b,c){var e=this.observe[a];if(e&&(Array.isArray(c)&&(d.observe&&console.log ("[%s] observeArrayValue: unregister observer [%s]",this.localName,a),this.unreg isterObserver(a+"__array")),Array.isArray(b))){d.observe&&console.log("[%s] obse rveArrayValue: register observer [%s]",this.localName,a,b);var f=this,g=new Arra yObserver(b,function(a,b){f.invokeMethod(e,[b])});this.registerObserver(a+"__arr ay",g)}},bindProperty:function(a,b,d){return c(this,a,b,d)},unbindAllProperties: function(){this._propertyObserver&&this._propertyObserver.close(),this.unregiste rObservers()},unbindProperty:function(a){return this.unregisterObserver(a)},invo keMethod:function(a,b){var c=this[a]||a;"function"==typeof c&&c.apply(this,b)},r egisterObserver:function(a,b){var c=this._observers||(this._observers={});c[a]=b },unregisterObserver:function(a){var b=this._observers;return b&&b[a]?(b[a].clos e(),b[a]=null,!0):void 0},unregisterObservers:function(){if(this._observers){for (var a,b,c=Object.keys(this._observers),d=0,e=c.length;e>d&&(a=c[d]);d++)b=this. _observers[a],b.close();this._observers={}}}},f="[%s]: bindProperties: [%s] to [ %s].[%s]";a.api.instance.properties=e}(Polymer),function(a){function b(a){d(a,c) }function c(a){a.unbindAll()}function d(a,b){if(a){b(a);for(var c=a.firstChild;c ;c=c.nextSibling)d(c,b)}}var e=window.logFlags||0,f=a.api.instance.events,g=new PolymerExpressions,h=g.prepareBinding;g.prepareBinding=function(a,b,c){return f. prepareBinding(a,b,c)||h.call(this,a,b,c)};var i={syntax:g,instanceTemplate:func tion(a){return a.createInstance(this,this.syntax)},bind:function(a,b,c){this._el ementPrepared||this.prepareElement();var d=this.propertyForAttribute(a);if(d){th is.unbind(a);var e=this.bindProperty(d,b,c);return e.path=c,this.reflectProperty ToAttribute(d),this.bindings[a]=e}return this.super(arguments)},asyncUnbindAll:f unction(){this._unbound||(e.unbind&&console.log("[%s] asyncUnbindAll",this.local Name),this._unbindAllJob=this.job(this._unbindAllJob,this.unbindAll,0))},unbindA ll:function(){if(!this._unbound){this.unbindAllProperties(),this.super();for(var a=this.shadowRoot;a;)b(a),a=a.olderShadowRoot;this._unbound=!0}},cancelUnbindAl l:function(a){return this._unbound?(e.unbind&&console.warn("[%s] already unbound , cannot cancel unbindAll",this.localName),void 0):(e.unbind&&console.log("[%s] cancelUnbindAll",this.localName),this._unbindAllJob&&(this._unbindAllJob=this._u nbindAllJob.stop()),a||d(this.shadowRoot,function(a){a.cancelUnbindAll&&a.cancel UnbindAll()}),void 0)}},j=/\{\{([^{}]*)}}/;a.bindPattern=j,a.api.instance.mdv=i} (Polymer),function(a){function b(a){return a.hasOwnProperty("PolymerBase")}funct ion c(){}var d=0,e={PolymerBase:!0,job:Polymer.job,"super":Polymer.super,created :function(){},ready:function(){},createdCallback:function(){this.created(),(this .ownerDocument.defaultView||this.alwaysPrepare||d>0)&&this.prepareElement()},pre pareElement:function(){this._elementPrepared=!0,this.observeProperties(),this.co pyInstanceAttributes(),this.takeAttributes(),this.addHostListeners(),d++,this.pa rseDeclarations(this.__proto__),d--,this.ready()},enteredViewCallback:function() {this._elementPrepared||this.prepareElement(),this.cancelUnbindAll(!0),this.ente redView&&this.enteredView()},leftViewCallback:function(){this.preventDispose||th is.asyncUnbindAll(),this.leftView&&this.leftView()},enteredDocumentCallback:func tion(){this.enteredViewCallback()},leftDocumentCallback:function(){this.leftView Callback()},parseDeclarations:function(a){a&&a.element&&(this.parseDeclarations( a.__proto__),a.parseDeclaration.call(this,a.element))},parseDeclaration:function (a){var b=this.fetchTemplate(a);b&&(this.element.hasAttribute("lightdom")?this.l ightFromTemplate(b):this.shadowFromTemplate(b))},fetchTemplate:function(a){retur n a.querySelector("template")},shadowFromTemplate:function(a){if(a){var b=(this. shadowRoot,this.createShadowRoot());b.applyAuthorStyles=this.applyAuthorStyles,b .resetStyleInheritance=this.resetStyleInheritance;var c=this.instanceTemplate(a) ;return b.appendChild(c),this.shadowRootReady(b,a),b}},lightFromTemplate:functio n(a){if(a){var b=this.instanceTemplate(a);return this.appendChild(b),this.shadow RootReady(this,a),b}},shadowRootReady:function(a){this.marshalNodeReferences(a), PointerGestures.register(a)},marshalNodeReferences:function(a){var b=this.$=this .$||{};if(a)for(var c,d=a.querySelectorAll("[id]"),e=0,f=d.length;f>e&&(c=d[e]); e++)b[c.id]=c},attributeChangedCallback:function(a){"class"!==a&&"style"!==a&&th is.attributeToProperty(a,this.getAttribute(a)),this.attributeChanged&&this.attri buteChanged.apply(this,arguments)},onMutation:function(a,b){var c=new MutationOb server(function(a){b.call(this,c,a),c.disconnect()}.bind(this));c.observe(a,{chi ldList:!0,subtree:!0})}};c.prototype=e,e.constructor=c,a.Base=c,a.isBase=b,a.api .instance.base=e}(Polymer),function(a){function b(a){return a.__proto__}var c=(w indow.logFlags||{},"element"),d="controller",e={STYLE_SCOPE_ATTRIBUTE:c,installC ontrollerStyles:function(){var a=this.findStyleController();if(a&&!this.scopeHas ElementStyle(a,d)){for(var c=b(this),e="";c&&c.element;)e+=c.element.cssTextForS cope(d),c=b(c);if(e){var f=this.element.cssTextToScopeStyle(e,d);Polymer.applySt yleToScope(f,a)}}},findStyleController:function(){if(window.ShadowDOMPolyfill)re turn wrap(document.head);for(var a=this;a.parentNode;)a=a.parentNode;return a=== document?document.head:a},scopeHasElementStyle:function(a,b){var d=c+"="+this.lo calName+"-"+b;return a.querySelector("style["+d+"]")}};a.api.instance.styles=e}( Polymer),function(a){var b={addResolvePathApi:function(){var a=this.elementPath( ),b=this.getAttribute("assetpath")||"",c=this.relPath;this.prototype.resolvePath =function(d){var e=d;if(b){var f=b.slice(0,-1);e=c(f,e)}return a+b+e}},elementPa th:function(){return this.urlToPath(HTMLImports.getDocumentUrl(this.ownerDocumen t))},relPath:function(a,b){for(var c=a.split("/"),d=b.split("/"),e=!1;c.length&& d.length&&c[0]===d[0];)c.shift(),d.shift(),e=!0;if(e)for(var f=0;f<c.length;f++) d.unshift("..");return d.join("/")},urlToPath:function(a){if(a){var b=a.split("/ ");return b.pop(),b.push(""),b.join("/")}return""}};a.api.declaration.path=b}(Po lymer),function(a){function b(a,b){if(a){var d=c(a.textContent),e=a.getAttribute (g);e&&d.setAttribute(g,e),b.appendChild(d)}}function c(a){var b=document.create Element("style");return b.textContent=a,b}function d(a){return a&&a.__resource|| ""}function e(a,b){return n?n.call(a,b):void 0}var f=(window.logFlags||{},a.api. instance.styles),g=f.STYLE_SCOPE_ATTRIBUTE,h="style",i="[rel=stylesheet]",j="glo bal",k="polymer-scope",l={installSheets:function(){this.cacheSheets(),this.cache Styles(),this.installLocalSheets(),this.installGlobalStyles()},cacheSheets:funct ion(){this.sheets=this.findNodes(i),this.sheets.forEach(function(a){a.parentNode &&a.parentNode.removeChild(a)})},cacheStyles:function(){this.styles=this.findNod es(h+"["+k+"]"),this.styles.forEach(function(a){a.parentNode&&a.parentNode.remov eChild(a)})},installLocalSheets:function(){var a=this.sheets.filter(function(a){ return!a.hasAttribute(k)}),b=this.templateContent();if(b){var e="";a.forEach(fun ction(a){e+=d(a)+"\n"}),e&&b.insertBefore(c(e),b.firstChild)}},findNodes:functio n(a,b){var c=this.querySelectorAll(a).array(),d=this.templateContent();if(d){var e=d.querySelectorAll(a).array();c=c.concat(e)}return b?c.filter(b):c},templateC ontent:function(){var a=this.querySelector("template");return a&&templateContent (a)},installGlobalStyles:function(){var a=this.styleForScope(j);b(a,document.hea d)},cssTextForScope:function(a){var b="",c="["+k+"="+a+"]",f=function(a){return e(a,c)},g=this.sheets.filter(f);g.forEach(function(a){b+=d(a)+"\n\n"});var h=thi s.styles.filter(f);return h.forEach(function(a){b+=a.textContent+"\n\n"}),b},sty leForScope:function(a){var b=this.cssTextForScope(a);return this.cssTextToScopeS tyle(b,a)},cssTextToScopeStyle:function(a,b){if(a){var d=c(a);return d.setAttrib ute(g,this.getAttribute("name")+"-"+b),d}}},m=HTMLElement.prototype,n=m.matches| |m.matchesSelector||m.webkitMatchesSelector||m.mozMatchesSelector;a.api.declarat ion.styles=l,a.applyStyleToScope=b}(Polymer),function(a){var b=a.api.instance.ev ents,c=(window.logFlags||{},{parseHostEvents:function(){var a=this.prototype.eve ntDelegates;this.addAttributeDelegates(a)},addAttributeDelegates:function(a){for (var c,d=0;c=this.attributes[d];d++)b.hasEventPrefix(c.name)&&(a[b.removeEventPr efix(c.name)]=c.value.replace("{{","").replace("}}","").trim())},event_translati ons:{webkitanimationstart:"webkitAnimationStart",webkitanimationend:"webkitAnima tionEnd",webkittransitionend:"webkitTransitionEnd",domfocusout:"DOMFocusOut",dom focusin:"DOMFocusIn"}});a.api.declaration.events=c}(Polymer),function(a){var b={ inferObservers:function(a){var b,c=a.observe;for(var d in a)"Changed"===d.slice( -7)&&(c||(c=a.observe={}),b=d.slice(0,-7),c[b]=c[b]||d)},optimizePropertyMaps:fu nction(a){if(a.observe){var b=a._observeNames=[];for(var c in a.observe)b.push(c )}if(a.publish){var b=a._publishNames=[];for(var c in a.publish)b.push(c)}},publ ishProperties:function(a,b){var c=a.publish;c&&(this.requireProperties(c,a,b),a. _publishLC=this.lowerCaseMap(c))},requireProperties:function(a,b,c){for(var d in a)void 0===b[d]&&void 0===c[d]&&(b[d]=a[d])},lowerCaseMap:function(a){var b={}; for(var c in a)b[c.toLowerCase()]=c;return b}};a.api.declaration.properties=b}(P olymer),function(a){var b="attributes",c={inheritAttributesObjects:function(a){t his.inheritObject(a,"publishLC"),this.inheritObject(a,"_instanceAttributes")},pu blishAttributes:function(a,c){var d=this.getAttribute(b);if(d)for(var e,f=a.publ ish||(a.publish={}),g=d.split(d.indexOf(",")>=0?",":" "),h=0,i=g.length;i>h;h++) e=g[h].trim(),e&&void 0===f[e]&&void 0===c[e]&&(f[e]=null)},accumulateInstanceAt tributes:function(){for(var a,b=this.prototype._instanceAttributes,c=this.attrib utes,d=0,e=c.length;e>d&&(a=c[d]);d++)this.isInstanceAttribute(a.name)&&(b[a.nam e]=a.value)},isInstanceAttribute:function(a){return!this.blackList[a]&&"on-"!==a .slice(0,3)},blackList:{name:1,"extends":1,constructor:1,noscript:1}};c.blackLis t[b]=1,a.api.declaration.attributes=c}(Polymer),function(a){function b(a){if(!Ob ject.__proto__){var b=Object.getPrototypeOf(a);a.__proto__=b,d(b)&&(b.__proto__= Object.getPrototypeOf(b))}}var c=a.api,d=a.isBase,e=a.extend,f={register:functio n(a,b){this.prototype=this.buildPrototype(a,b),this.prototype.element=this,this. desugar(a,b),this.registerPrototype(a,b),this.publishConstructor()},buildPrototy pe:function(c,d){var e=a.getRegisteredPrototype(c),f=this.generateBasePrototype( d);return this.publishAttributes(e,f),this.publishProperties(e,f),this.inferObse rvers(e),this.inheritMetaData(e,f),e=this.chainObject(e,f),this.optimizeProperty Maps(e),b(e),e},inheritMetaData:function(a,b){this.inheritObject("observe",a,b), this.inheritObject("publish",a,b),this.inheritObject("_publishLC",a,b),this.inhe ritObject("_instanceAttributes",a,b),this.inheritObject("eventDelegates",a,b)},d esugar:function(a,b){this.accumulateInstanceAttributes(),this.parseHostEvents(), this.installSheets(),this.adjustShadowElement(),this.addResolvePathApi(),window. ShadowDOMPolyfill&&Platform.ShadowCSS.shimStyling(this.templateContent(),a,b),th is.prototype.registerCallback&&this.prototype.registerCallback(this)},adjustShad owElement:function(){if(!window.ShadowDOMPolyfill){var a=this.templateContent(); if(a)for(var b,c=a.querySelectorAll("shadow"),d=0,e=c.length;e>d&&(b=c[d]);d++)b .children.length||b.appendChild(document.createElement("content"))}},publishCons tructor:function(){var a=this.getAttribute("constructor");a&&(window[a]=this.cto r)},generateBasePrototype:function(a){var b=this.findBasePrototype(a);if(!b){var b=HTMLElement.getPrototypeForTag(a);b=this.ensureBaseApi(b),memoizedBases[a]=b} return b},findBasePrototype:function(a){return memoizedBases[a]},ensureBaseApi:f unction(a){if(!a.PolymerBase){a=Object.create(a);for(var b in c.instance)e(a,c.i nstance[b])}return a},inheritObject:function(a,b,c){var d=b[a]||{};b[a]=this.cha inObject(d,c[a])},registerPrototype:function(a,b){var c={prototype:this.prototyp e},d=this.findTypeExtension(b);d&&(c.extends=d),this.ctor=document.register(a,c) ,this.prototype.constructor=this.ctor,HTMLElement.register(a,this.prototype)},fi ndTypeExtension:function(a){if(a&&a.indexOf("-")<0)return a;var b=this.findBaseP rototype(a);return b.element?this.findTypeExtension(b.element.extends):void 0}}; f.chainObject=Object.__proto__?function(a,b){return a&&b&&a!==b&&(a.__proto__=b) ,a}:function(a,b){if(a&&b&&a!==b){var c=Object.create(b);a=e(c,a)}return a},memo izedBases={},c.declaration.prototype=f}(Polymer),function(a){function b(a,b){k[a ]=b||{},d(a)}function c(a){return k[a]}function d(a){l[a]&&(l[a].registerWhenRea dy(),delete l[a])}function e(a){n[a]=!0;var b=m[a];b&&(b.forEach(function(a){a.r egisterWhenReady()}),delete m[a])}function f(a){return n[a]}function g(a){window .HTMLImports&&!HTMLImports.readyTime?addEventListener("HTMLImportsLoaded",a):a() }var h=a.extend,i=a.api.declaration,j=h(Object.create(HTMLElement.prototype),{cr eatedCallback:function(){this.name=this.getAttribute("name"),this.extends=this.g etAttribute("extends"),this.registerWhenReady()},registerWhenReady:function(){if (!this.waitingForPrototype(this.name)){var a=this.extends;this.waitingForExtende e(a)||(document.contains(this)?g(function(){this._register(a)}.bind(this)):this. _register(a))}},_register:function(a){this.register(this.name,a),e(this.name)},w aitingForPrototype:function(a){if(!c(a)){if(l[a]=this,this.hasAttribute("noscrip t"))if(window.CustomElements&&!CustomElements.useNative)b(a);else{var d=document .createElement("script");d.textContent="Polymer('"+a+"');",this.appendChild(d)}r eturn!0}},waitingForExtendee:function(a){return a&&a.indexOf("-")>=0&&!f(a)?((m[ a]=m[a]||[]).push(this),!0):void 0}});Object.keys(i).forEach(function(a){h(j,i[a ])});var k={},l={},m={},n={};a.getRegisteredPrototype=c,h(b,a),window.Polymer=b, document.register("polymer-element",{prototype:j})}(Polymer);
30 //# sourceMappingURL=polymer.js.map
OLDNEW
« no previous file with comments | « third_party/polymer/platform/platform.js.map ('k') | third_party/polymer/polymer/.bower.json » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698