| 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 143aa7a3426607a1af08b916f726d58ab8a8fd3a..1d21ad135a413f6e01e6e75407e2187471595c17 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
|
| @@ -1,7 +1,80 @@
|
| -Polymer.Base._addFeature({
|
| +(function () {
|
| +function resolveCss(cssText, ownerDocument) {
|
| +return cssText.replace(CSS_URL_RX, function (m, pre, url, post) {
|
| +return pre + '\'' + resolve(url.replace(/["']/g, ''), ownerDocument) + '\'' + post;
|
| +});
|
| +}
|
| +function resolveAttrs(element, ownerDocument) {
|
| +for (var name in URL_ATTRS) {
|
| +var a$ = URL_ATTRS[name];
|
| +for (var i = 0, l = a$.length, a, at, v; i < l && (a = a$[i]); i++) {
|
| +if (name === '*' || element.localName === name) {
|
| +at = element.attributes[a];
|
| +v = at && at.value;
|
| +if (v && v.search(BINDING_RX) < 0) {
|
| +at.value = a === 'style' ? resolveCss(v, ownerDocument) : resolve(v, ownerDocument);
|
| +}
|
| +}
|
| +}
|
| +}
|
| +}
|
| +function resolve(url, ownerDocument) {
|
| +if (url && ABS_URL.test(url)) {
|
| +return url;
|
| +}
|
| +var resolver = getUrlResolver(ownerDocument);
|
| +resolver.href = url;
|
| +return resolver.href || url;
|
| +}
|
| +var tempDoc;
|
| +var tempDocBase;
|
| +function resolveUrl(url, baseUri) {
|
| +if (!tempDoc) {
|
| +tempDoc = document.implementation.createHTMLDocument('temp');
|
| +tempDocBase = tempDoc.createElement('base');
|
| +tempDoc.head.appendChild(tempDocBase);
|
| +}
|
| +tempDocBase.href = baseUri;
|
| +return resolve(url, tempDoc);
|
| +}
|
| +function getUrlResolver(ownerDocument) {
|
| +return ownerDocument.body.__urlResolver || (ownerDocument.body.__urlResolver = ownerDocument.createElement('a'));
|
| +}
|
| +function pathFromUrl(url) {
|
| +return url.substring(0, url.lastIndexOf('/') + 1);
|
| +}
|
| +var CSS_URL_RX = /(url\()([^)]*)(\))/g;
|
| +var URL_ATTRS = {
|
| +'*': [
|
| +'href',
|
| +'src',
|
| +'style',
|
| +'url'
|
| +],
|
| +form: ['action']
|
| +};
|
| +var ABS_URL = /(^\/)|(^#)|(^[\w-\d]*:)/;
|
| +var BINDING_RX = /\{\{|\[\[/;
|
| +Polymer.ResolveUrl = {
|
| +resolveCss: resolveCss,
|
| +resolveAttrs: resolveAttrs,
|
| +resolveUrl: resolveUrl,
|
| +pathFromUrl: pathFromUrl
|
| +};
|
| +Polymer.rootPath = Polymer.Settings.rootPath || pathFromUrl(document.baseURI || window.location.href);
|
| +}());Polymer.Base._addFeature({
|
| _prepTemplate: function () {
|
| +var module;
|
| if (this._template === undefined) {
|
| -this._template = Polymer.DomModule.import(this.is, 'template');
|
| +module = Polymer.DomModule.import(this.is);
|
| +this._template = module && module.querySelector('template');
|
| +}
|
| +if (module) {
|
| +var assetPath = module.getAttribute('assetpath') || '';
|
| +var importURL = Polymer.ResolveUrl.resolveUrl(assetPath, module.ownerDocument.baseURI);
|
| +this._importPath = Polymer.ResolveUrl.pathFromUrl(importURL);
|
| +} else {
|
| +this._importPath = '';
|
| }
|
| 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>.'));
|
|
|