diff options
author | Mathieu Perreault <mathp@chromium.org> | 2014-09-21 11:59:37 -0400 |
---|---|---|
committer | Mathieu Perreault <mathp@chromium.org> | 2014-09-21 16:00:40 +0000 |
commit | d39674ab554a7f368da402eccbd540ae66eebab8 (patch) | |
tree | c7214812c99cdb8c6e0ae2925ebe23cefc03539d /third_party | |
parent | 6a836d0d0bf7758a5a786d921dba50ac750097c7 (diff) | |
download | chromium_src-d39674ab554a7f368da402eccbd540ae66eebab8.zip chromium_src-d39674ab554a7f368da402eccbd540ae66eebab8.tar.gz chromium_src-d39674ab554a7f368da402eccbd540ae66eebab8.tar.bz2 |
Revert "Polymer elements added to third_party/polymer."
Broke check_licenses step http://build.chromium.org/p/chromium/builders/Linux/builds/53652/steps/check_licenses/logs/stdio
This reverts commit 7c33f44244bcafb889a0cc9e0aafe08141c28109.
R=dzhioev@chromium.org
BUG=
Review URL: https://codereview.chromium.org/592603004
Cr-Commit-Position: refs/heads/master@{#295903}
Diffstat (limited to 'third_party')
725 files changed, 103 insertions, 67861 deletions
diff --git a/third_party/polymer/.bowerrc b/third_party/polymer/.bowerrc index 1d83b67..cdcad8a 100644 --- a/third_party/polymer/.bowerrc +++ b/third_party/polymer/.bowerrc @@ -1,3 +1,3 @@ { - "directory:" : "components" + "directory:" : "." } diff --git a/third_party/polymer/LICENSE.polymer b/third_party/polymer/LICENSE index 92d60b0..92d60b0 100644 --- a/third_party/polymer/LICENSE.polymer +++ b/third_party/polymer/LICENSE diff --git a/third_party/polymer/PRESUBMIT.py b/third_party/polymer/PRESUBMIT.py deleted file mode 100644 index 04f37bd..0000000 --- a/third_party/polymer/PRESUBMIT.py +++ /dev/null @@ -1,52 +0,0 @@ -# Copyright 2014 The Chromium Authors. All rights reserved. -# Use of this source code is governed by a BSD-style license that can be -# found in the LICENSE file. - -"""Chromium presubmit script for third_party/polymer. - -See http://dev.chromium.org/developers/how-tos/depottools/presubmit-scripts -for more details on the presubmit API built into gcl. -""" - -import os -import json - -def _CheckBowerDependencies(input_api, output_api): - os_path = input_api.os_path - cwd = input_api.PresubmitLocalPath() - components_dir = os_path.join(cwd, 'components') - bower_json_path = os_path.join(cwd, 'bower.json') - - for f in input_api.AffectedFiles(include_dirs=True): - p = f.AbsoluteLocalPath() - if p == bower_json_path or p.startswith(components_dir): - break - else: - return [] - - bower_dependencies = \ - set(json.load(open(bower_json_path))['dependencies'].keys()) - installed_components = set(p for p in os.listdir(components_dir)) - if bower_dependencies == installed_components: - return [] - - problems = [] - - if installed_components - bower_dependencies: - problems.append(output_api.PresubmitError( - 'Found components that are not listed in bower.json.', - items = list(installed_components - bower_dependencies))) - - if bower_dependencies - installed_components: - problems.append(output_api.PresubmitError( - 'Some of the Bower dependencies are not installed.', - items = list(bower_dependencies - installed_components))) - - return problems - -def CheckChangeOnUpload(input_api, output_api): - return _CheckBowerDependencies(input_api, output_api) - - -def CheckChangeOnCommit(input_api, output_api): - return _CheckBowerDependencies(input_api, output_api) diff --git a/third_party/polymer/README.chromium b/third_party/polymer/README.chromium index 7e25541..9a8d6d4 100644 --- a/third_party/polymer/README.chromium +++ b/third_party/polymer/README.chromium @@ -2,18 +2,9 @@ Name: Polymer Short Name: polymer URL: http://www.polymer-project.org Version: 0.3.5 -Revision: (See components/<component>/.bower.json) +Revision: (See <component>/.bower.json) License: BSD -License File: LICENSE.polymer -Security Critical: no - -Name: Web Animations JS -Short Name: web-animations-js -URL: https://github.com/web-animations/web-animations-js -Version: NA -Revision: (See components/web-animations-js/.bower.json) -License: Apache 2.0 -License File: components/web-animations-js/COPYING +License File: LICENSE Security Critical: no Description: @@ -21,9 +12,11 @@ This directory contains a copy of the following components which are a part of the Polymer project: -polymer -platform --all core elements and their dependencies --all paper elements and their dependencies -See bower.json for a full list of components. + +The directory can be updated by running "bower update". A now component can be +installed by running "bower install Polymer/<component>". Be sure to add the +.bower.json file to the repository as it includes the revision information of +the polymer component. The version can be found in header of polymer/polymer.js. The license can be found in polymer/LICENSE. @@ -38,17 +31,3 @@ browsers begin to implement these new primitives, the polyfill platform layer becomes smaller and better over time. 2. A next-generation web application framework built upon these core technologies called the Polymer. - -Also this directory contains a copy of Web Animations JS library, which is -used by polymer "core-animation" element. - -Note on Bower: -The directory can be updated by running "bower update". A new component can be -installed by running "bower install -S Polymer/<component>#version". Be sure to -add the .bower.json file to the repository as it includes the revision -information of the polymer component. -Also be sure that you listed all the added packages and **all their -dependencies** in bower.json, and specified **exact** versions of every package -explicitly. That is needed because Bower can't handle recursive dependencies -correctly (see http://stackoverflow.com/q/25899532). - diff --git a/third_party/polymer/bower.json b/third_party/polymer/bower.json index 9b8a138..e802b88 100644 --- a/third_party/polymer/bower.json +++ b/third_party/polymer/bower.json @@ -2,74 +2,6 @@ "name": "chromium", "private": true, "dependencies": { - "polymer": "Polymer/polymer#0.3.5", - "platform": "Polymer/platform#0.3.5", - - "core-ajax": "Polymer/core-ajax#0.3.5", - "core-animated-pages": "Polymer/core-animated-pages#0.3.5", - "core-animation": "Polymer/core-animation#0.3.5", - "core-collapse": "Polymer/core-collapse#0.3.5", - "core-component-page": "Polymer/core-component-page#0.3.5", - "core-drag-drop": "Polymer/core-drag-drop#0.3.5", - "core-drawer-panel": "Polymer/core-drawer-panel#0.3.5", - "core-dropdown": "Polymer/core-dropdown#0.3.5", - "core-field": "Polymer/core-field#0.3.5", - "core-header-panel": "Polymer/core-header-panel#0.3.5", - "core-icon-button": "Polymer/core-icon-button#0.3.5", - "core-icon": "Polymer/core-icon#0.3.5", - "core-icons": "Polymer/core-icons#0.3.5", - "core-iconset": "Polymer/core-iconset#0.3.5", - "core-iconset-svg": "Polymer/core-iconset#0.3.5", - "core-input": "Polymer/core-input#0.3.5", - "core-item": "Polymer/core-item#0.3.5", - "core-layout-grid": "Polymer/core-layout-grid#0.3.5", - "core-layout": "Polymer/core-layout#0.3.5", - "core-layout-trbl": "Polymer/core-layout-trbl#0.3.5", - "core-list": "Polymer/core-list#0.3.5", - "core-localstorage": "Polymer/core-localstorage#0.3.5", - "core-media-query": "Polymer/core-media-query#0.3.5", - "core-menu-button": "Polymer/core-menu-button#0.3.5", - "core-menu": "Polymer/core-menu#0.3.5", - "core-meta": "Polymer/core-meta#0.3.5", - "core-overlay": "Polymer/core-overlay#0.3.5", - "core-pages": "Polymer/core-pages#0.3.5", - "core-range": "Polymer/core-range#0.3.5", - "core-scaffold": "Polymer/core-scaffold#0.3.5", - "core-scroll-header-panel": "Polymer/core-scroll-header-panel#0.3.5", - "core-selection": "Polymer/core-selection#0.3.5", - "core-selector": "Polymer/core-selector#0.3.5", - "core-shared-lib": "Polymer/core-shared-lib#0.3.5", - "core-signals": "Polymer/core-signals#0.3.5", - "core-splitter": "Polymer/core-splitter#0.3.5", - "core-style": "Polymer/core-style#0.3.5", - "core-toolbar": "Polymer/core-toolbar#0.3.5", - "core-tooltip": "Polymer/core-tooltip#0.3.5", - "core-transition": "Polymer/core-transition#0.3.5", - - "font-roboto": "Polymer/font-roboto#0.3.5", - - "paper-button": "Polymer/paper-button#0.3.5", - "paper-focusable": "Polymer/paper-focusable#0.3.5", - "paper-checkbox": "Polymer/paper-checkbox#0.3.5", - "paper-dialog": "Polymer/paper-dialog#0.3.5", - "paper-fab": "Polymer/paper-fab#0.3.5", - "paper-icon-button": "Polymer/paper-icon-button#0.3.5", - "paper-input": "Polymer/paper-input#0.3.5", - "paper-item": "Polymer/paper-item#0.3.5", - "paper-menu-button": "Polymer/paper-menu-button#0.3.5", - "paper-progress": "Polymer/paper-progress#0.3.5", - "paper-radio-button": "Polymer/paper-radio-button#0.3.5", - "paper-radio-group": "Polymer/paper-radio-group#0.3.5", - "paper-ripple": "Polymer/paper-ripple#0.3.5", - "paper-shadow": "Polymer/paper-shadow#0.3.5", - "paper-slider": "Polymer/paper-slider#0.3.5", - "paper-tabs": "Polymer/paper-tabs#0.3.5", - "paper-toast": "Polymer/paper-toast#0.3.5", - "paper-toggle-button": "Polymer/paper-toggle-button#0.3.5", - - "web-animations-js": "web-animations/web-animations-js#7605c531e22b9a61b4d708c0bc17793bac1cd7ff" - }, - "resolutions": { - "web-animations-js": "7605c531e22b9a61b4d708c0bc17793bac1cd7ff" + "polymer": "Polymer/polymer#0.3.5" } } diff --git a/third_party/polymer/components/core-ajax/.bower.json b/third_party/polymer/components/core-ajax/.bower.json deleted file mode 100644 index 149a36e..0000000 --- a/third_party/polymer/components/core-ajax/.bower.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "name": "core-ajax", - "private": true, - "dependencies": { - "polymer": "Polymer/polymer#>=0.3.0 <1.0.0" - }, - "homepage": "https://github.com/Polymer/core-ajax", - "version": "0.3.5", - "_release": "0.3.5", - "_resolution": { - "type": "version", - "tag": "0.3.5", - "commit": "c77d87791086fdd96f860d15f9ca3d8261d80d5a" - }, - "_source": "git://github.com/Polymer/core-ajax.git", - "_target": "0.3.5", - "_originalSource": "Polymer/core-ajax" -}
\ No newline at end of file diff --git a/third_party/polymer/components/core-ajax/README.md b/third_party/polymer/components/core-ajax/README.md deleted file mode 100644 index a0a4145..0000000 --- a/third_party/polymer/components/core-ajax/README.md +++ /dev/null @@ -1,4 +0,0 @@ -core-ajax -========= - -See the [component page](http://polymer-project.org/docs/elements/core-elements.html#core-ajax) for more information. diff --git a/third_party/polymer/components/core-ajax/bower.json b/third_party/polymer/components/core-ajax/bower.json deleted file mode 100644 index a9cd764..0000000 --- a/third_party/polymer/components/core-ajax/bower.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "name": "core-ajax", - "private": true, - "dependencies": { - "polymer": "Polymer/polymer#>=0.3.0 <1.0.0" - } -}
\ No newline at end of file diff --git a/third_party/polymer/components/core-ajax/core-ajax.html b/third_party/polymer/components/core-ajax/core-ajax.html deleted file mode 100644 index db841dc..0000000 --- a/third_party/polymer/components/core-ajax/core-ajax.html +++ /dev/null @@ -1,323 +0,0 @@ -<!-- -Copyright (c) 2014 The Polymer Project Authors. All rights reserved. -This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt -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 ---> - -<!-- -@group Polymer Core Elements - -The `core-ajax` element exposes `XMLHttpRequest` functionality. - - <core-ajax - auto - url="http://gdata.youtube.com/feeds/api/videos/" - params='{"alt":"json", "q":"chrome"}' - handleAs="json" - on-core-response="{{handleResponse}}"></core-ajax> - -With `auto` set to `true`, the element performs a request whenever -its `url` or `params` properties are changed. - -Note: The `params` attribute must be double quoted JSON. - -You can trigger a request explicitly by calling `go` on the -element. - -@element core-ajax -@status beta -@homepage github.io ---> -<link rel="import" href="core-xhr.html"> -<polymer-element name="core-ajax" hidden attributes="url handleAs auto params response method headers body contentType withCredentials"> -<script> - - Polymer('core-ajax', { - /** - * Fired when a response is received. - * - * @event core-response - */ - - /** - * Fired when an error is received. - * - * @event core-error - */ - - /** - * Fired whenever a response or an error is received. - * - * @event core-complete - */ - - /** - * The URL target of the request. - * - * @attribute url - * @type string - * @default '' - */ - url: '', - - /** - * Specifies what data to store in the `response` property, and - * to deliver as `event.response` in `response` events. - * - * One of: - * - * `text`: uses `XHR.responseText`. - * - * `xml`: uses `XHR.responseXML`. - * - * `json`: uses `XHR.responseText` parsed as JSON. - * - * `arraybuffer`: uses `XHR.response`. - * - * `blob`: uses `XHR.response`. - * - * `document`: uses `XHR.response`. - * - * @attribute handleAs - * @type string - * @default 'text' - */ - handleAs: '', - - /** - * If true, automatically performs an Ajax request when either `url` or `params` changes. - * - * @attribute auto - * @type boolean - * @default false - */ - auto: false, - - /** - * Parameters to send to the specified URL, as JSON. - * - * @attribute params - * @type string (JSON) - * @default '' - */ - params: '', - - /** - * Returns the response object. - * - * @attribute response - * @type Object - * @default null - */ - response: null, - - /** - * The HTTP method to use such as 'GET', 'POST', 'PUT', or 'DELETE'. - * Default is 'GET'. - * - * @attribute method - * @type string - * @default '' - */ - method: '', - - /** - * HTTP request headers to send. - * - * Example: - * - * <core-ajax - * auto - * url="http://somesite.com" - * headers='{"X-Requested-With": "XMLHttpRequest"}' - * handleAs="json" - * on-core-response="{{handleResponse}}"></core-ajax> - * - * @attribute headers - * @type Object - * @default null - */ - headers: null, - - /** - * Optional raw body content to send when method === "POST". - * - * Example: - * - * <core-ajax method="POST" auto url="http://somesite.com" - * body='{"foo":1, "bar":2}'> - * </core-ajax> - * - * @attribute body - * @type Object - * @default null - */ - body: null, - - /** - * Content type to use when sending data. - * - * @attribute contentType - * @type string - * @default 'application/x-www-form-urlencoded' - */ - contentType: 'application/x-www-form-urlencoded', - - /** - * Set the withCredentials flag on the request. - * - * @attribute withCredentials - * @type boolean - * @default false - */ - withCredentials: false, - - /** - * Additional properties to send to core-xhr. - * - * Can be set to an object containing default properties - * to send as arguments to the `core-xhr.request()` method - * which implements the low-level communication. - * - * @property xhrArgs - * @type Object - * @default null - */ - xhrArgs: null, - - ready: function() { - this.xhr = document.createElement('core-xhr'); - }, - - receive: function(response, xhr) { - if (this.isSuccess(xhr)) { - this.processResponse(xhr); - } else { - this.error(xhr); - } - this.complete(xhr); - }, - - isSuccess: function(xhr) { - var status = xhr.status || 0; - return !status || (status >= 200 && status < 300); - }, - - processResponse: function(xhr) { - var response = this.evalResponse(xhr); - this.response = response; - this.fire('core-response', {response: response, xhr: xhr}); - }, - - error: function(xhr) { - var response = xhr.status + ': ' + xhr.responseText; - this.fire('core-error', {response: response, xhr: xhr}); - }, - - complete: function(xhr) { - this.fire('core-complete', {response: xhr.status, xhr: xhr}); - }, - - evalResponse: function(xhr) { - return this[(this.handleAs || 'text') + 'Handler'](xhr); - }, - - xmlHandler: function(xhr) { - return xhr.responseXML; - }, - - textHandler: function(xhr) { - return xhr.responseText; - }, - - jsonHandler: function(xhr) { - var r = xhr.responseText; - try { - return JSON.parse(r); - } catch (x) { - console.warn('core-ajax caught an exception trying to parse reponse as JSON:'); - console.warn('url:', this.url); - console.warn(x); - return r; - } - }, - - documentHandler: function(xhr) { - return xhr.response; - }, - - blobHandler: function(xhr) { - return xhr.response; - }, - - arraybufferHandler: function(xhr) { - return xhr.response; - }, - - urlChanged: function() { - if (!this.handleAs) { - var ext = String(this.url).split('.').pop(); - switch (ext) { - case 'json': - this.handleAs = 'json'; - break; - } - } - this.autoGo(); - }, - - paramsChanged: function() { - this.autoGo(); - }, - - autoChanged: function() { - this.autoGo(); - }, - - // TODO(sorvell): multiple side-effects could call autoGo - // during one micro-task, use a job to have only one action - // occur - autoGo: function() { - if (this.auto) { - this.goJob = this.job(this.goJob, this.go, 0); - } - }, - - /** - * Performs an Ajax request to the specified URL. - * - * @method go - */ - go: function() { - var args = this.xhrArgs || {}; - // TODO(sjmiles): we may want XHR to default to POST if body is set - args.body = this.body || args.body; - args.params = this.params || args.params; - if (args.params && typeof(args.params) == 'string') { - args.params = JSON.parse(args.params); - } - args.headers = this.headers || args.headers || {}; - if (args.headers && typeof(args.headers) == 'string') { - args.headers = JSON.parse(args.headers); - } - if (this.contentType) { - args.headers['content-type'] = this.contentType; - } - if (this.handleAs === 'arraybuffer' || this.handleAs === 'blob' || - this.handleAs === 'document') { - args.responseType = this.handleAs; - } - args.withCredentials = this.withCredentials; - args.callback = this.receive.bind(this); - args.url = this.url; - args.method = this.method; - return args.url && this.xhr.request(args); - } - - }); - -</script> -</polymer-element> diff --git a/third_party/polymer/components/core-ajax/core-xhr.html b/third_party/polymer/components/core-ajax/core-xhr.html deleted file mode 100644 index 8557aec..0000000 --- a/third_party/polymer/components/core-ajax/core-xhr.html +++ /dev/null @@ -1,115 +0,0 @@ -<!-- -Copyright (c) 2014 The Polymer Project Authors. All rights reserved. -This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt -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 ---> -<!-- -/** - * @group Polymer Core Elements - * - * core-xhr can be used to perform XMLHttpRequests. - * - * <core-xhr id="xhr"></core-xhr> - * ... - * this.$.xhr.request({url: url, params: params, callback: callback}); - * - * @element core-xhr - */ ---> - -<link rel="import" href="../polymer/polymer.html"> - -<polymer-element name="core-xhr" hidden> - - <script> - - Polymer('core-xhr', { - - /** - * Sends a HTTP request to the server and returns the XHR object. - * - * @method request - * @param {Object} inOptions - * @param {String} inOptions.url The url to which the request is sent. - * @param {String} inOptions.method The HTTP method to use, default is GET. - * @param {boolean} inOptions.sync By default, all requests are sent asynchronously. To send synchronous requests, set to true. - * @param {Object} inOptions.params Data to be sent to the server. - * @param {Object} inOptions.body The content for the request body for POST method. - * @param {Object} inOptions.headers HTTP request headers. - * @param {String} inOptions.responseType The response type. Default is 'text'. - * @param {boolean} inOptions.withCredentials Whether or not to send credentials on the request. Default is false. - * @param {Object} inOptions.callback Called when request is completed. - * @returns {Object} XHR object. - */ - request: function(options) { - var xhr = new XMLHttpRequest(); - var url = options.url; - var method = options.method || 'GET'; - var async = !options.sync; - // - var params = this.toQueryString(options.params); - if (params && method == 'GET') { - url += (url.indexOf('?') > 0 ? '&' : '?') + params; - } - var xhrParams = this.isBodyMethod(method) ? (options.body || params) : null; - // - xhr.open(method, url, async); - if (options.responseType) { - xhr.responseType = options.responseType; - } - if (options.withCredentials) { - xhr.withCredentials = true; - } - this.makeReadyStateHandler(xhr, options.callback); - this.setRequestHeaders(xhr, options.headers); - xhr.send(xhrParams); - if (!async) { - xhr.onreadystatechange(xhr); - } - return xhr; - }, - - toQueryString: function(params) { - var r = []; - for (var n in params) { - var v = params[n]; - n = encodeURIComponent(n); - r.push(v == null ? n : (n + '=' + encodeURIComponent(v))); - } - return r.join('&'); - }, - - isBodyMethod: function(method) { - return this.bodyMethods[(method || '').toUpperCase()]; - }, - - bodyMethods: { - POST: 1, - PUT: 1, - DELETE: 1 - }, - - makeReadyStateHandler: function(xhr, callback) { - xhr.onreadystatechange = function() { - if (xhr.readyState == 4) { - callback && callback.call(null, xhr.response, xhr); - } - }; - }, - - setRequestHeaders: function(xhr, headers) { - if (headers) { - for (var name in headers) { - xhr.setRequestHeader(name, headers[name]); - } - } - } - - }); - - </script> - -</polymer-element> diff --git a/third_party/polymer/components/core-ajax/demo.html b/third_party/polymer/components/core-ajax/demo.html deleted file mode 100644 index b42221d..0000000 --- a/third_party/polymer/components/core-ajax/demo.html +++ /dev/null @@ -1,43 +0,0 @@ -<!doctype html> -<!-- -Copyright (c) 2014 The Polymer Project Authors. All rights reserved. -This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt -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 ---> -<html> -<head> - - <title>core-ajax</title> - - <script src="../platform/platform.js"></script> - <link rel="import" href="core-ajax.html"> - -</head> -<body> - - <core-ajax auto url="http://gdata.youtube.com/feeds/api/videos/" - params='{"alt":"json", "q":"chrome"}' - handleAs="json"></core-ajax> - - <template repeat="{{response.feed.entry}}"> - <div>{{title.$t}}</div> - </template> - - <script> - document.addEventListener('polymer-ready', function() { - var ajax = document.querySelector("core-ajax"); - ajax.addEventListener("core-response", - function(e) { - document.querySelector('template').model = { - response: e.detail.response - }; - } - ); - }); - </script> - -</body> -</html> diff --git a/third_party/polymer/components/core-animated-pages/.bower.json b/third_party/polymer/components/core-animated-pages/.bower.json deleted file mode 100644 index 9d0932d..0000000 --- a/third_party/polymer/components/core-animated-pages/.bower.json +++ /dev/null @@ -1,21 +0,0 @@ -{ - "name": "core-animated-pages", - "private": true, - "dependencies": { - "polymer": "Polymer/polymer#>=0.3.0 <1.0.0", - "core-selector": "Polymer/core-selector#>=0.3.0 <1.0.0", - "core-style": "Polymer/core-style#>=0.3.0 <1.0.0", - "core-transition": "Polymer/core-transition#>=0.3.0 <1.0.0" - }, - "homepage": "https://github.com/Polymer/core-animated-pages", - "version": "0.3.5", - "_release": "0.3.5", - "_resolution": { - "type": "version", - "tag": "0.3.5", - "commit": "0886640a0d87926a01d8efd3dbc2f58b1eac514f" - }, - "_source": "git://github.com/Polymer/core-animated-pages.git", - "_target": "0.3.5", - "_originalSource": "Polymer/core-animated-pages" -}
\ No newline at end of file diff --git a/third_party/polymer/components/core-animated-pages/README.md b/third_party/polymer/components/core-animated-pages/README.md deleted file mode 100644 index 3b8f2b19..0000000 --- a/third_party/polymer/components/core-animated-pages/README.md +++ /dev/null @@ -1,4 +0,0 @@ -core-animated-pages -=================== - -See the [component page](http://polymer-project.org/docs/elements/core-elements.html#core-animated-pages) for more information. diff --git a/third_party/polymer/components/core-animated-pages/bower.json b/third_party/polymer/components/core-animated-pages/bower.json deleted file mode 100644 index c950d15..0000000 --- a/third_party/polymer/components/core-animated-pages/bower.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "name": "core-animated-pages", - "private": true, - "dependencies": { - "polymer": "Polymer/polymer#>=0.3.0 <1.0.0", - "core-selector": "Polymer/core-selector#>=0.3.0 <1.0.0", - "core-style": "Polymer/core-style#>=0.3.0 <1.0.0", - "core-transition": "Polymer/core-transition#>=0.3.0 <1.0.0" - } -}
\ No newline at end of file diff --git a/third_party/polymer/components/core-animated-pages/core-animated-pages.css b/third_party/polymer/components/core-animated-pages/core-animated-pages.css deleted file mode 100644 index 9a41b54..0000000 --- a/third_party/polymer/components/core-animated-pages/core-animated-pages.css +++ /dev/null @@ -1,18 +0,0 @@ -:host { - display: block; - position: relative; -} - -polyfill-next-selector { content: ':host > *'; } -::content > * { - position: absolute; - top: 0; - right: 0; - bottom: 0; - left: 0; -} - -polyfill-next-selector { content: ':host > *:not(.core-selected):not([animate])'; } -::content > *:not(.core-selected):not([animate]) { - display: none !important; -} diff --git a/third_party/polymer/components/core-animated-pages/core-animated-pages.html b/third_party/polymer/components/core-animated-pages/core-animated-pages.html deleted file mode 100644 index bef086d..0000000 --- a/third_party/polymer/components/core-animated-pages/core-animated-pages.html +++ /dev/null @@ -1,427 +0,0 @@ -<link href="../core-selector/core-selector.html" rel="import"> - -<link href="transitions/hero-transition.html" rel="import"> -<link href="transitions/cross-fade.html" rel="import"> - -<!-- - -`core-animated-pages` selects one of its children "pages" to show and runs a transition -when switching between them. The transitions are designed to be pluggable, and can -accept any object that is an instance of a `core-transition-pages`. Transitions to run -are specified in the `transitions` attribute as a space-delimited string of `id`s of -transition elements. Several transitions are available with `core-animated-pages` by -default, including `hero-transition`, `cross-fade`, and `tile-cascade`. - -Example: - - <style> - #hero1 { - position: absolute; - top: 0; - left: 0; - width: 300px; - height: 300px; - background-color: orange; - } - #hero2 { - position: absolute; - top: 200px; - left: 300px; - width: 300px; - height: 300px; - background-color: orange; - } - #bottom1, #bottom2 { - position: absolute; - bottom: 0; - top: 0; - left: 0; - height: 50px; - } - #bottom1 { - background-color: blue; - } - #bottom2 { - background-color: green; - } - </style> - // hero-transition and cross-fade are declared elsewhere - <core-animated-pages transitions="hero-transition cross-fade"> - <section id="page1"> - <div id="hero1" hero-id="hero" hero></div> - <div id="bottom1" cross-fade></div> - </section> - <section id="page2"> - <div id="hero2" hero-id="hero" hero></div> - <div id="bottom2" cross-fade></div> - </section> - </core-animated-pages> - -In the above example, two transitions (`hero-transition` and `cross-fade`) are run when switching -between `page1` and `page2`. `hero-transition` transforms elements with the same `hero-id` such -that they appear to be shared across different pages. `cross-fade` fades out the elements marked -`cross-fade` in the outgoing page, and fades in those in the incoming page. See the individual -transition's documentation for specific details. - -Finding elements to transition ------------------------------- - -In general, a transition is applied to elements marked with a certain attribute. For example, -`hero-transition` applies the transition on elements with the `hero` and `hero-id` attribute. -Among the transitions included with `core-animated-pages`, script-based transitions such as -`hero-transition` generally look for elements up to one level of shadowRoot from the -`core-animated-pages` element, and CSS-based transitions such as `cross-fade` look for elements -within any shadowRoot within the `core-animated-pages` element. This means you can use -custom elements as pages and mark elements in their shadowRoots as heroes, or mark -elements in deeper shadowRoots with other transitions. - -Example: - - <polymer-element name="x-el" noscript> - <template> - <style> - #hero { - position: absolute; - top: 0; - right: 0; - width: 50px; - height: 300px; - background-color: blue; - } - </style> - <div id="hero" hero-id="bar" hero></div> - </template> - </polymer-element> - - <polymer-element name="x-page-1" noscript> - <template> - <style> - #hero1 { - position: absolute; - top: 0; - left: 0; - width: 300px; - height: 300px; - background-color: orange; - } - </style> - <div id="hero1" hero-id="foo" hero></div> - <div id="hero2" hero-id="bar" hero></div> - </template> - </polymer-element> - - <polymer-element name="x-page-2" noscript> - <template> - <style> - #hero1 { - position: absolute; - top: 200px; - left: 300px; - width: 300px; - height: 300px; - background-color: orange; - } - #hero2 { - background-color: blue; - height: 150px; - width: 400px; - } - </style> - // The below element is one level of shadow from the core-animated-pages and will - // be transitioned. - <div id="hero1" hero-id="foo" hero></div> - // The below element contains a hero inside its shadowRoot making it two levels away - // from the core-animated-pages, and will not be transitioned. - <x-el></x-el> - </template> - </polymer-element> - - <core-animated-pages transitions="hero-transition"> - <x-page-1></x-page-1> - <x-page-2></x-page-2> - </core-animated-pages> - -Note that the container element of the page does not participate in the transition. - - // This does not work - <core-animated-pages transitions="cross-fade"> - <section cross-fade></section> - <section cross-fade></section> - </core-animated-pages> - - // This works - <core-animated-pages transitions="cross-fade"> - <section> - <div cross-fade></div> - </section> - <section> - <div cross-fade></div> - </section> - </core-animated-pages> - -Dynamically setting up transitions ----------------------------------- - -An easy way to dynamically set up transitions dynamically is to use property binding on -the transition attributes. - -Example: - - <core-animated-pages selected="{{selected}}"> - <section id="page1"> - <div hero-id="hero" hero></div> - </section> - <section id="page2"> - <div id="foo" hero-id="hero" hero?="{{selected === 1 || selected === 0}}" cross-fade="{{selected === 2}}"></div> - </section> - <section id="page3"> - </section> - </core-animated-pages> - -In the above example, the "foo" element only behaves as a hero element if transitioning between -`#page1` and `#page2`. It gets cross-faded when transition to or from `#page3`. - -Nesting pages -------------- - -It is possible to nest core-animated-pages elements for organization. Excessive nesting is -not encouraged, however, since it makes setting up the transition more complex. - -To nest core-animated-pages, the page containing the nested core-animated-pages element should -have a `selectedItem` property bound to the `selectedItem` property of the nested element. This -will allow the outer core-animated-pages to know which nested page it is actually transitioning -to. - -Example: - - <polymer-element name="nested-page" attributes="selectedItem"> - <template> - <core-animated-pages selectedItem="{{selectedItem}}"> - ... - </core-animated-pages> - </template> - </polymer-element> - - <core-animated-pages> - <section id="page1"></section> - <nested-page id="page2"></section> - </core-animated-pages> - -@element core-animated-pages -@extends core-selector -@status beta -@homepage github.io ---> -<!-- -Fired before a page transition occurs. Both pages involved in the transition are visible when -this event fires. This is useful if there is something the client needs to do when a page becomes -visible. - -@event core-animated-pages-transition-prepare ---> -<!-- -Fired when a page transition completes. - -@event core-animated-pages-transition-end ---> -<polymer-element name="core-animated-pages" extends="core-selector" notap attributes="transitions"> - -<template> - - <link href="core-animated-pages.css" rel="stylesheet"> - - <shadow></shadow> - -</template> - -<script> - - Polymer({ - - eventDelegates: { - 'core-transitionend': 'transitionEnd' - }, - - /** - * A space-delimited string of transitions to use when switching between pages in this element. - * The strings are `id`s of `core-transition-pages` elements included elsewhere. See the - * individual transition's document for specific details. - * - * @attribute transitions - * @type string - * @default '' - */ - transitions: '', - - selected: 0, - - /** - * The last page selected. This property is useful to dynamically set transitions based - * on incoming and outgoing pages. - * - * @attribute lastSelected - * @type Object - * @default null - */ - lastSelected: null, - - registerCallback: function() { - this.tmeta = document.createElement('core-transition'); - }, - - created: function() { - this._transitions = []; - this.transitioning = []; - }, - - transitionsChanged: function() { - this._transitions = this.transitions.split(' '); - }, - - _transitionsChanged: function(old) { - if (this._transitionElements) { - this._transitionElements.forEach(function(t) { - t.teardown(this); - }, this); - } - this._transitionElements = []; - this._transitions.forEach(function(transitionId) { - var t = this.getTransition(transitionId); - if (t) { - this._transitionElements.push(t); - t.setup(this); - } - }, this); - }, - - getTransition: function(transitionId) { - return this.tmeta.byId(transitionId); - }, - - selectionSelect: function(e, detail) { - this.updateSelectedItem(); - // Wait to call applySelection when we run the transition - }, - - applyTransition: function(src, dst) { - if (this.animating) { - this.cancelAsync(this.animating); - this.animating = null; - } - - Platform.flush(); - - if (this.transitioning.indexOf(src) === -1) { - this.transitioning.push(src); - } - if (this.transitioning.indexOf(dst) === -1) { - this.transitioning.push(dst); - } - // force src, dst to display - src.setAttribute('animate', ''); - dst.setAttribute('animate', ''); - // - var options = { - src: src, - dst: dst, - easing: 'cubic-bezier(0.4, 0, 0.2, 1)' - } - - // fire an event so clients have a chance to do something when the - // new page becomes visible but before it draws. - this.fire('core-animated-pages-transition-prepare'); - - // - // prepare transition - this._transitionElements.forEach(function(transition) { - transition.prepare(this, options); - }, this); - // - // force layout! - src.offsetTop; - - // - // apply selection - this.applySelection(dst, true); - this.applySelection(src, false); - // - // start transition - this._transitionElements.forEach(function(transition) { - transition.go(this, options); - }, this); - - if (!this._transitionElements.length) { - this.complete(); - } else { - this.animating = this.async(this.complete.bind(this), null, 5000); - } - }, - - complete: function() { - if (this.animating) { - this.cancelAsync(this.animating); - this.animating = null; - } - - this.transitioning.forEach(function(t) { - t.removeAttribute('animate'); - }); - this.transitioning = []; - - this._transitionElements.forEach(function(transition) { - transition.ensureComplete(this); - }, this); - - this.fire('core-animated-pages-transition-end'); - }, - - transitionEnd: function(e) { - if (this.transitioning.length) { - var completed = true; - this._transitionElements.forEach(function(transition) { - if (!transition.completed) { - completed = false; - } - }); - if (completed) { - this.job('transitionWatch', function() { - this.complete(); - }, 100); - } - } - }, - - selectedChanged: function(old) { - this.lastSelected = old; - this.super(arguments); - }, - - selectedItemChanged: function(oldItem) { - this.super(arguments); - - if (!oldItem) { - this.applySelection(this.selectedItem, true); - return; - } - - if (this.hasAttribute('no-transition') || !this._transitionElements || !this._transitionElements.length) { - this.applySelection(oldItem, false); - this.applySelection(this.selectedItem, true); - return; - } - - if (oldItem && this.selectedItem) { - // TODO(sorvell): allow bindings to update first? - var self = this; - Platform.flush(); - Platform.endOfMicrotask(function() { - self.applyTransition(oldItem, self.selectedItem); - }); - } - } - - }); - -</script> - -</polymer-element> diff --git a/third_party/polymer/components/core-animated-pages/demo.html b/third_party/polymer/components/core-animated-pages/demo.html deleted file mode 100644 index 3d949b5..0000000 --- a/third_party/polymer/components/core-animated-pages/demo.html +++ /dev/null @@ -1,14 +0,0 @@ -<a href="demos/simple.html">pluggable transitions</a> -<br> -<a href="demos/news.html">icon to top bar</a> -<br> -<a href="demos/music.html">chip to card</a> -<br> -<a href="demos/list.html">list reorder</a> -<br> -<a href="demos/grid.html">grid to full screen</a> -<br> -<a href="demos/nested.html">nested core-animated-pages</a> -<br> -<a href="demos/quiz1.html">quiz: category to splash to question</a> -<br> diff --git a/third_party/polymer/components/core-animated-pages/demos/grid.html b/third_party/polymer/components/core-animated-pages/demos/grid.html deleted file mode 100644 index f7b0e96..0000000 --- a/third_party/polymer/components/core-animated-pages/demos/grid.html +++ /dev/null @@ -1,104 +0,0 @@ -<!doctype html> -<html> -<head> - - <script src="../../platform/platform.js"></script> - - <link href="../../core-icons/core-icons.html" rel="import"> - <link href="../../core-icon-button/core-icon-button.html" rel="import"> - <link href="../../core-toolbar/core-toolbar.html" rel="import"> - <link href="../core-animated-pages.html" rel="import"> - - <style> - body { - font-family: sans-serif; - } - - .toolbar { - background-color: steelblue; - } - - #container { - overflow: auto; - } - - .card { - position: relative; - height: 150px; - width: 150px; - font-size: 50px; - margin: 8px; - background-color: tomato; - border-radius: 4px; - cursor: default; - } - - .view { - font-size: 250px; - background-color: tomato; - } - - </style> - -</head> -<body unresolved fullbleed vertical layout> - <template is="auto-binding"> - <core-toolbar class="toolbar"> - <core-icon-button icon="{{$.pages.selected != 0 ? 'arrow-back' : 'menu'}}" on-tap="{{back}}"></core-icon-button> - <div flex>Stuff</div> - <core-icon-button icon="more-vert"></core-icon-button> - </core-toolbar> - <core-animated-pages id="pages" flex selected="0" on-core-animated-pages-transition-end="{{transitionend}}" transitions="cross-fade-all hero-transition"> - - <section vertical layout> - - <div id="container" flex horizontal wrap around-justified layout hero-p> - <template repeat="{{item in items}}"> - <div class="card" vertical center center-justified layout hero-id="item-{{item}}" hero?="{{$.pages.selected === item + 1 || lastSelected === item + 1}}" on-tap="{{selectView}}"><span cross-fade>{{item}}</span></div> - </template> - </div> - - </section> - - <template repeat="{{item in items}}"> - <section vertical layout> - <div class="view" flex vertical center center-justified layout hero-id="item-{{item}}" hero?="{{$.pages.selected === item + 1 || $.pages.selected === 0}}"><span cross-fade>{{item}}</span></div> - </section> - </template> - - </core-animated-pages> - </template> - - <script> - - addEventListener('template-bound', function(e) { - var scope = e.target; - var items = [], count=50; - for (var i=0; i < count; i++) { - items.push(i); - } - - scope.items = items; - - scope.selectView = function(e) { - var i = e.target.templateInstance.model.item; - this.$.pages.selected = i+1; - } - - scope.back = function() { - this.lastSelected = this.$.pages.selected; - console.log(this.lastSelected); - this.$.pages.selected = 0; - } - - scope.transitionend = function() { - if (this.lastSelected) { - this.lastSelected = null; - } - } - }) - - </script> - -</body> -</html> diff --git a/third_party/polymer/components/core-animated-pages/demos/list.html b/third_party/polymer/components/core-animated-pages/demos/list.html deleted file mode 100644 index 90ed8a3..0000000 --- a/third_party/polymer/components/core-animated-pages/demos/list.html +++ /dev/null @@ -1,117 +0,0 @@ -<!doctype html> -<html> -<head> - - <script src="../../platform/platform.js"></script> - <link href="../core-animated-pages.html" rel="import"> - - <style> - body { - font-family: Roboto, 'Helvetica Neue', Helvetica, Arial, sans-serif; - margin: 0; - } - - </style> - -</head> -<body unresolved> - - <polymer-element name="list-demo"> - <template> - - <style> - p { - margin: 8px; - } - - .item { - background: #e7e7e7; - padding: 16px; - margin: 8px; - border-radius: 3px; - box-sizing: border-box; - position: relative; - } - </style> - - <p>Tap to move to top</p> - - <core-animated-pages id="pages" on-tap="{{reorder}}" selected="{{selected}}" on-core-animated-pages-transition-end="{{done}}" transitions="hero-transition"> - - <section> - <template repeat="{{items}}"> - <div hero-id="{{h}}" hero class="item">{{v}}</div> - </template> - </section> - - <section> - <template repeat="{{items2}}"> - <div hero-id="{{h}}" hero class="item">{{v}}</div> - </template> - </section> - - </core-animated-pages> - - </template> - - <script> - - Polymer('list-demo', { - - selected: 0, - - items: [ - {h: 'matt', v: 'Matt McNulty'}, - {h: 'scott', v: 'Scott Miles'}, - {h: 'steve', v: 'Steve Orvell'}, - {h: 'frankie', v: 'Frankie Fu'}, - {h: 'daniel', v: 'Daniel Freedman'}, - {h: 'yvonne', v: 'Yvonne Yip'}, - ], - - items2: [ - {h: 'matt', v: 'Matt McNulty'}, - {h: 'scott', v: 'Scott Miles'}, - {h: 'steve', v: 'Steve Orvell'}, - {h: 'frankie', v: 'Frankie Fu'}, - {h: 'daniel', v: 'Daniel Freedman'}, - {h: 'yvonne', v: 'Yvonne Yip'}, - ], - - reorder: function(e) { - if (this.$.pages.transitioning.length) { - return; - } - - this.lastMoved = e.target; - this.lastMoved.style.zIndex = 10005; - var item = e.target.templateInstance.model; - var items = this.selected ? this.items : this.items2; - var i = this.selected ? this.items2.indexOf(item) : this.items.indexOf(item); - if (i != 0) { - items.splice(0, 0, item); - items.splice(i + 1, 1); - } - - this.lastIndex = i; - this.selected = this.selected ? 0 : 1; - }, - - done: function() { - var i = this.lastIndex; - var items = this.selected ? this.items : this.items2; - var item = items[i]; - items.splice(0, 0, item); - items.splice(i + 1, 1); - this.lastMoved.style.zIndex = null; - } - }); - - </script> - - </polymer-element> - - <list-demo></list-demo> - -</body> -</html>
\ No newline at end of file diff --git a/third_party/polymer/components/core-animated-pages/demos/music.html b/third_party/polymer/components/core-animated-pages/demos/music.html deleted file mode 100644 index 8cb66e0..0000000 --- a/third_party/polymer/components/core-animated-pages/demos/music.html +++ /dev/null @@ -1,173 +0,0 @@ -<!doctype html> -<html> -<head> - <title>core-animated-pages</title> - - <script src="../../platform/platform.js"></script> - <link href="../core-animated-pages.html" rel="import"> - - <style> - body { - font-family: 'Roboto 2', 'Helvetica Neue', Helvetica, Arial, sans-serif; - margin: 0; - background: #f1f1f1; - } - - .green { - position: absolute; - top: 0; - right: 0; - left: 0; - height: 350px; - background: #70c26f; - } - </style> -</head> -<body> - - <polymer-element name="music-demo"> - <template> - - <style> - .chip-container { - position: absolute; - top: 275px; - right: 0; - left: 0; - text-align: center; - } - - .chip { - display: inline-block; - position: relative; - border-radius: 3px; - margin: 4px; - overflow: hidden; - text-align: start; - background-color: #fff; - box-shadow: 0 2px 10px 0 rgba(0, 0, 0, 0.16); - } - - .chip-top { - width: 200px; - height: 200px; - } - - .chip-bottom { - padding: 8px; - line-height: 1.5; - } - - .chip-album-title { - font-weight: bold; - } - - #details { - padding: 200px 10% 0; - } - - .card { - height: 400px; - border-radius: 3px; - text-align: start; - overflow: hidden; - background: #fff; - box-shadow: 0 6px 20px 0 rgba(0, 0, 0, 0.19); - } - - .card-left { - width: 400px; - } - - .card-right { - padding: 24px; - } - - .card-icon { - border-radius: 50%; - width: 60px; - height: 60px; - margin-right: 16px; - } - - .card-album-title { - font-size: 2em; - } - </style> - - <core-animated-pages selected="{{page}}" transitions="hero-transition" on-core-animated-pages-transition-end="{{complete}}"> - - <section> - - <div class="chip-container" hero-p on-tap="{{transition}}"> - - <template repeat="{{items as item}}"> - - <div class="chip" hero-id="{{item.artist}}-{{item.album}}" hero?="{{selectedAlbum === item }}"> - <div class="chip-top" style="background:{{item.color}};" hero-id="{{item.artist}}-{{item.album}}-art" hero?="{{selectedAlbum === item}}"></div> - <div class="chip-bottom"> - <div class="chip-album-title">{{item.album}}</div> - <div class="chip-artist">{{item.artist}}</div> - </div> - </div> - - </template> - - </div> - </section> - - <section id="details"> - - <div class="card" layout horizontal hero-id="{{selectedAlbum.artist}}-{{selectedAlbum.album}}" hero on-tap="{{transition}}"> - <div class="card-left" style="background:{{selectedAlbum.color}};" hero-id="{{selectedAlbum.artist}}-{{selectedAlbum.album}}-art" hero></div> - <div class="card-right" flex> - <div layout horizontal center> - <div> - <div class="card-icon" style="background:{{selectedAlbum.color}};"></div> - </div> - <div flex> - <div class="card-album-title">{{selectedAlbum.album}}</div> - <div class="card-album-artist">{{selectedAlbum.artist}}</div> - </div> - </div> - </div> - </div> - - </section> - - </core-animated-pages> - - </template> - <script> - - Polymer('music-demo', { - - page: 0, - - items: [ - { artist: 'Tycho', album: 'Fragments', color: '#f4db33' }, - { artist: 'Tycho', album: 'Past Prologue', color: '#972ff8' }, - { artist: 'Tycho', album: 'Spectre', color: '#7dd6fe' }, - { artist: 'Tycho', album: 'Awake', color: '#dc3c84' } - ], - - selectedAlbum: null, - - transition: function(e) { - if (this.page === 0 && e.target.templateInstance.model.item) { - this.selectedAlbum = e.target.templateInstance.model.item; - this.page = 1; - } else { - this.page = 0; - } - } - }); - - </script> - </polymer-element> - - <div class="green"></div> - - <music-demo></music-demo> -</body> -</html> diff --git a/third_party/polymer/components/core-animated-pages/demos/nested-animated-pages.html b/third_party/polymer/components/core-animated-pages/demos/nested-animated-pages.html deleted file mode 100644 index afe3c3f..0000000 --- a/third_party/polymer/components/core-animated-pages/demos/nested-animated-pages.html +++ /dev/null @@ -1,104 +0,0 @@ -<link href="../../core-icons/core-icons.html" rel="import"> -<link href="../../core-icon-button/core-icon-button.html" rel="import"> -<link href="../core-animated-pages.html" rel="import"> - -<polymer-element name="nested-animated-pages"> -<template> - <style> - :host { - display: block; - position: relative; - } - - core-animated-pages { - position: absolute; - top: 0; - left: 0; - right: 0; - bottom: 0; - } - - .tall-toolbar { - box-sizing: border-box; - height: 240px; - } - - .tall-toolbar.colored { - fill: #fff; - color: #fff; - } - - .tall-toolbar [flex] { - font-size: 1.5em; - } - - core-icon-button { - margin: 16px; - } - - .body { - background-color: #f1f1f1; - } - - .square { - position: absolute; - width: 150px; - height: 150px; - left: 16px; - top: 175px; - } - - </style> - <core-animated-pages id="pages" selected="{{page}}" selectedItem="{{selectedItem}}" transitions="hero-transition" no-transition?="{{noTransition}}"> - - <section id="page1" cross-fade> - <div class="tall-toolbar colored" style="background-color:orange;" layout vertical hero-id="thing" hero?="{{page === 0 || !noTransition}}"> - <div layout horizontal center> - <core-icon-button icon="clear" on-tap="{{back}}"></core-icon-button> - <div flex>One</div> - <core-icon-button icon="arrow-forward" on-tap="{{transition}}"></core-icon-button> - </div> - <div flex></div> - </div> - <div flex class="body"></div> - </section> - - <section layout vertical id="page2" cross-fade> - <div class="tall-toolbar" layout vertical> - <div layout horizontal center> - <core-icon-button icon="clear" on-tap="{{back}}"></core-icon-button> - <div flex>Two</div> - <core-icon-button icon="arrow-forward" on-tap="{{transition}}"></core-icon-button> - </div> - <div flex></div> - </div> - <div flex class="body"></div> - <div class="square" style="background-color:orange;" hero-id="thing" hero?="{{page === 1 || !noTransition}}"></div> - </section> - - </core-animated-pages> -</template> -<script> - - Polymer({ - - publish: { - page: {value: 0} - }, - - selectedItem: null, - noTransition: true, - - back: function() { - this.noTransition = true; - this.fire('nested-back'); - }, - - transition: function() { - this.noTransition = false; - this.page = this.page === 0 ? 1 : 0; - } - - }); -</script> -</polymer-element> diff --git a/third_party/polymer/components/core-animated-pages/demos/nested.html b/third_party/polymer/components/core-animated-pages/demos/nested.html deleted file mode 100644 index 6d08bd2..0000000 --- a/third_party/polymer/components/core-animated-pages/demos/nested.html +++ /dev/null @@ -1,103 +0,0 @@ -<!doctype html> -<html> -<head> - <title>core-animated-pages</title> - <script src="../../platform/platform.js"></script> - <link href="nested-animated-pages.html" rel="import"> - - <style> - body { - font-family: 'Roboto 2', 'Helvetica Neue', Helvetica, Arial, sans-serif; - margin: 0; - background: #f1f1f1; - } - - nested-demo { - display: block; - position: absolute; - top: 0; - left: 0; - bottom: 0; - right: 0; - } - </style> -</head> -<body> - - <polymer-element name="nested-demo"> - <template> - - <style> - - core-animated-pages { - display: block; - position: absolute; - top: 0; - left: 0; - bottom: 0; - right: 0; - } - - section { - text-align: center; - padding-top: 250px; - } - - .square { - display: inline-block; - margin: 8px; - padding: 8px; - width: 200px; - height: 200px; - background-color: orange; - color: #fff; - } - </style> - - <core-animated-pages selected="{{page}}" transitions="hero-transition cross-fade"> - - <section on-tap="{{transition}}" layout horizontal center-justified> - - <div class="square" id="thing1" hero-id="thing" hero?="{{subpage === 0}}" cross-fade?="{{subpage !== 0}}">thing 1</div> - <div class="square" id="thing2" hero-id="thing" hero?="{{subpage === 1}}" cross-fade?="{{subpage !== 1}}">thing 2</div> - - </section> - - <nested-animated-pages page="{{subpage}}" on-nested-back="{{back}}"></nested-animated-pages> - - </core-animated-pages> - </template> - <script> - - Polymer('nested-demo', { - - page: 0, - subpage: 0, - - transition: function(e) { - - var el = e.target; - if (el.id === "thing1") { - this.subpage = 0; - } else { - this.subpage = 1; - } - - setTimeout(function() { - this.page = 1; - }.bind(this), 200); - }, - - back: function() { - this.page = 0; - } - - }); - - </script> - </polymer-element> - - <nested-demo></nested-demo> - -</body> -</html> diff --git a/third_party/polymer/components/core-animated-pages/demos/news.html b/third_party/polymer/components/core-animated-pages/demos/news.html deleted file mode 100644 index 1ba5086..0000000 --- a/third_party/polymer/components/core-animated-pages/demos/news.html +++ /dev/null @@ -1,246 +0,0 @@ -<!doctype html> -<html> -<head> - - <script src="../../platform/platform.js"></script> - - <link href="../../core-icons/core-icons.html" rel="import"> - <link href="../../core-icons/social-icons.html" rel="import"> - <link href="../../core-toolbar/core-toolbar.html" rel="import"> - - <link href="../../paper-shadow/paper-shadow.html" rel="import"> - - <link href="../core-animated-pages.html" rel="import"> - - <style shim-shadowdom> - body { - font-family: Roboto, 'Helvetica Neue', Helvetica, Arial, sans-serif; - margin: 0; - } - - .fit { - position: absolute; - top: 0; - right: 0; - bottom: 0; - left: 0; - width: 420px; - } - - .toolbar { - background: #8d3efc; - /* FIXME */ - color: #fff !important; - fill: #fff; - } - - .toolbar-2 { - position: absolute; - top: 0; - left: 0; - background: #000; - color: #fff; - text-align: center; - font-size: 48px; - } - - body /deep/ .toolbar-2 { - position: absolute; - top: 0; - left: 0; - margin: 0; - width: 420px; - background: #000; - color: #fff; - text-align: center; - font-size: 48px; - } - - .container { - background-color: #e7e7e7; - padding: 16px; - } - - .card { - position: relative; - background-color: #fff; - border-radius: 2px; - } - - .card-top { - background: #f2da2f; - height: 240px; - } - - .card-top-2 { - background: #99f8b7; - height: 240px; - } - - .card-bottom { - padding: 24px; - } - - .headline { - font-size: 24px; - overflow: hidden; - text-overflow: ellipsis; - white-space: nowrap; - } - - .icon { - position: relative; - background: #000; - color: #fff; - width: 40px; - height: 40px; - border-radius: 50%; - } - - .icon::after { - content: 'T'; - font-size: 24px; - position: absolute; - top: 7px; - left: 13px; - } - - .source-container { - margin-top: 16px; - } - - .two-lines { - margin-left: 16px; - } - - .source { - font-size: 14px; - } - - .time { - color: rgba(0, 0, 0, 0.54); - font-size: 12px; - } - - .tiles-container { - margin-top: 16px; - } - - .tile { - position: relative; - display: inline-block; - width: 85px; - height: 85px; - background: #fff; - border-radius: 2px; - } - - </style> - -</head> -<body unresolved> - - <polymer-element name="shadow-div" noscript> - <template> - <style> - :host { - display: block; - } - </style> - <paper-shadow target="{{}}" z="1"></paper-shadow> - <content></content> - </template> - </polymer-element> - - <core-animated-pages class="fit" selected="0" transitions="cross-fade-all hero-transition"> - - <section id="first"> - - <core-toolbar class="tall toolbar"> - <core-icon icon="menu"></core-icon> - <div flex>Highlights</div> - <core-icon icon="social:share"></core-icon> - <core-icon icon="bookmark"></core-icon> - <core-icon icon="more-vert"></core-icon> - </core-toolbar> - - <div class="container" hero-p> - - <shadow-div class="card" hero-p onclick="stuff()"> - <div class="card-top"></div> - <div class="card-bottom" hero-p> - <div class="headline">Google's Craziest Offices</div> - <div class="source-container" hero-p layout horizontal center> - <div class="icon" hero-id="icon-header" hero></div> - <div class="two-lines"> - <div class="source">The New York Times</div> - <div class="time">36 minutes ago</div> - </div> - </div> - </div> - </shadow-div> - - <div class="tiles-container" layout horizontal justified> - - <shadow-div class="tile"></shadow-div> - <shadow-div class="tile"></shadow-div> - <shadow-div class="tile"></shadow-div> - <shadow-div class="tile"></shadow-div> - - </div> - - </div> - - </section> - - <section id="second"> - - <core-toolbar class="tall" hero-p> - - <core-toolbar class="tall toolbar-2" hero-id="icon-header" hero> - <div flex class="middle">T</div> - </core-toolbar> - </core-toolbar> - - <div class="container"> - - <shadow-div class="card" onclick="stuff()"> - <div class="card-top-2"></div> - <div class="card-bottom"> - <div class="headline">Some long overflowing headline</div> - <div class="source-container" layout horizontal center> - <div class="icon" style="background:red;"></div> - <div class="two-lines"> - <div class="source">The New York Times</div> - <div class="time">36 minutes ago</div> - </div> - </div> - </div> - </shadow-div> - - <div class="tiles-container" layout horizontal justified> - - <shadow-div class="tile"></shadow-div> - <shadow-div class="tile"></shadow-div> - <shadow-div class="tile"></shadow-div> - <shadow-div class="tile"></shadow-div> - - </div> - - </div> - - </section> - - </core-animated-pages> - - <script> - - function stuff(e) { - var p = document.querySelector('core-animated-pages'); - p.selected = p.selected ? 0 : 1; - } - - </script> - -</body> -</html> diff --git a/third_party/polymer/components/core-animated-pages/demos/quiz1-intro.png b/third_party/polymer/components/core-animated-pages/demos/quiz1-intro.png Binary files differdeleted file mode 100644 index 8c172a0..0000000 --- a/third_party/polymer/components/core-animated-pages/demos/quiz1-intro.png +++ /dev/null diff --git a/third_party/polymer/components/core-animated-pages/demos/quiz1.html b/third_party/polymer/components/core-animated-pages/demos/quiz1.html deleted file mode 100644 index 358c7a2..0000000 --- a/third_party/polymer/components/core-animated-pages/demos/quiz1.html +++ /dev/null @@ -1,254 +0,0 @@ -<!doctype html> -<html> -<head> - <title>core-animated-pages</title> - - <script src="../../platform/platform.js"></script> - <link href="../../core-icons/av-icons.html" rel="import"> - <link href="../../paper-fab/paper-fab.html" rel="import"> - - <link href="../core-animated-pages.html" rel="import"> - <link href="../transitions/slide-up.html" rel="import"> - <link href="../transitions/list-cascade.html" rel="import"> - - <style> - body { - font-family: 'Roboto 2', 'Helvetica Neue', Helvetica, Arial, sans-serif; - margin: 0; - background: #f1f1f1; - } - - quiz-demo { - display: block; - position: absolute; - top: 0; - left: 0; - bottom: 0; - right: 0; - } - </style> -</head> -<body> - - <polymer-element name="quiz-demo"> - <template> - - <style> - core-animated-pages { - height: 100%; - } - - section { - overflow: hidden; - } - - .fab { - position: absolute; - fill: #fff; - } - - .fab-0 { - bottom: 50px; - right: 24px; - } - - .fab-1 { - top: 210px; - right: 24px; - } - - paper-fab { - background-color: #ff4081; - } - - .top { - background-color: #ffff8d; - } - - .top-image { - background: url(quiz1-intro.png); - height: 287px; - width: 202px; - } - - .bottom { - box-sizing: border-box; - position: relative; - height: 80px; - background-color: #ffeb3b; - padding: 24px; - color: #fff; - font-size: 32px; - } - - .tall-toolbar { - box-sizing: border-box; - height: 240px; - position: relative; - color: #fff; - padding: 48px; - font-size: 48px; - } - - .tall-toolbar.categories { - background-color: #00bbd3; - margin-bottom: 2px; - } - - .tall-toolbar.questions { - background-color: #ffeb3b; - } - - .middle { - background-color: #fafafa; - color: #3f3f3f; - padding: 24px 48px; - font-size: 24px; - line-height: 1.5; - } - - .footer { - height: 80px; - } - - .avatar { - height: 80px; - width: 80px; - background-color: #ff80ab; - } - - .footer-right, .score { - border-top: 1px solid #ccc; - background-color: #fff; - padding: 30px; - } - - .tile { - box-sizing: border-box; - float: left; - height: 200px; - width: 49%; - margin: 3px; - } - - .tile-bottom { - padding: 8px; - color: #fff; - } - </style> - - <core-animated-pages selected="{{page}}" transitions="hero-transition slide-up slide-down cross-fade list-cascade" on-core-animated-pages-transition-end="{{complete}}"> - - <section layout vertical> - - <div class="tall-toolbar categories" slide-down> - <span>Your name here</span> - </div> - - <div class="tiles-container"> - <div class="tile" style="background-color:#ccc;" layout vertical> - <div class="tile-top" flex></div> - <div class="tile-bottom" style="background-color:#aaa;"> - Leaderboard - </div> - </div> - <div class="tile" hero-id="category-image" hero style="background-color:#ffff8d;" layout vertical on-tap="{{transition}}"> - <div class="tile-top" flex></div> - <div class="tile-bottom" hero-id="footer" hero style="background-color:#ffeb3b;"> - General Knowledge - </div> - </div> - <div class="tile" style="background-color:#b9f6ca;" layout vertical> - <div class="tile-top" flex></div> - <div class="tile-bottom" style="background-color:#0f9d58;"> - Category 2 - </div> - </div> - <div class="tile" style="background-color:#ff8a80;" layout vertical> - <div class="tile-top" flex></div> - <div class="tile-bottom" style="background-color:#db4437;"> - Category 3 - </div> - </div> - <div class="tile" style="background-color:#82b1ff;" layout vertical> - <div class="tile-top" flex></div> - <div class="tile-bottom" style="background-color:#4285f4;"> - Category 4 - </div> - </div> - <div class="tile" style="background-color:#b388ff;" layout vertical> - <div class="tile-top" flex></div> - <div class="tile-bottom" style="background-color:#7e57c2;"> - Category 5 - </div> - </div> - </div> - - </section> - - <section layout vertical> - - <div class="top" hero-id="category-image" hero flex layout horizontal center center-justified> - <div class="top-image" cross-fade></div> - </div> - <div class="bottom" hero-id="footer" hero cross-fade> - <span cross-fade>General Knowledge</span> - </div> - <div class="fab fab-0" hero-id="fab" hero> - <paper-fab icon="av:play-arrow" on-tap="{{transition}}" hero></paper-fab> - </div> - </section> - - <section layout vertical> - - <div class="tall-toolbar questions" hero-id="footer" hero> - <span cross-fade>Question here</span> - </div> - <div class="fab fab-1" hero-id="fab" hero> - <paper-fab icon="av:play-arrow" on-tap="{{transition}}" hero></paper-fab> - </div> - - <div flex class="middle" slide-up list-cascade> - <p>Option 1</p> - <p>Option 2</p> - <p>Option 3</p> - <p>Option 4</p> - <p>Option 5</p> - </div> - - <div class="footer" layout horizontal slide-up> - <div class="avatar"></div> - <div class="footer-right" flex> - some text here - </div> - <div class="score"> - 32 pts - </div> - </div> - - </section> - - </core-animated-pages> - - </template> - <script> - - Polymer('quiz-demo', { - - page: 0, - - transition: function(e) { - if (this.page === 2) { - this.page = 0; - } else { - this.page += 1; - } - } - }); - - </script> - </polymer-element> - - <quiz-demo></quiz-demo> -</body> -</html> diff --git a/third_party/polymer/components/core-animated-pages/demos/shadow.html b/third_party/polymer/components/core-animated-pages/demos/shadow.html deleted file mode 100644 index 549c004..0000000 --- a/third_party/polymer/components/core-animated-pages/demos/shadow.html +++ /dev/null @@ -1,133 +0,0 @@ -<!doctype html> -<html> -<head> - - <script src="../../platform/platform.js"></script> - - <link href="../../core-icons/core-icons.html" rel="import"> - <link href="../../core-icon-button/core-icon-button.html" rel="import"> - <link href="../../core-toolbar/core-toolbar.html" rel="import"> - <link href="../core-animated-pages.html" rel="import"> - - <style> - body { - font-family: sans-serif; - } - - .toolbar { - background-color: steelblue; - } - - </style> - -</head> -<body unresolved fullbleed vertical layout> - - <polymer-element name="grid-toc" attributes="items selected"> - <template> - <style> - #container { - overflow: auto; - } - - .card { - position: relative; - height: 150px; - width: 150px; - font-size: 50px; - margin: 8px; - background-color: tomato; - border-radius: 4px; - cursor: default; - } - </style> - <div id="container" on-tap="{{selectView}}" flex horizontal wrap around-justified layout hero-p> - <template repeat="{{item in items}}"> - <div class="card" vertical center center-justified layout hero-id="item-{{item}}" hero?="{{selected === item + 1 || lastSelected === item + 1}}"><span cross-fade>{{item}}</span></div> - </template> - </div> - </template> - <script> - Polymer('grid-toc', { - selectedChanged: function(old) { - this.lastSelected = old; - }, - selectView: function(e) { - var item = e.target.templateInstance.model.item; - if (item !== undefined) { - this.fire('grid-toc-select', {item: item}); - } - } - }); - </script> - </polymer-element> - - <polymer-element name="grid-item" attributes="item isHero"> - <template> - <style> - .view { - font-size: 250px; - background-color: tomato; - } - </style> - <div class="view" flex vertical center center-justified layout hero-id="item-{{item}}" hero?="{{isHero}}"> - <span cross-fade>{{item}}</span> - </div> - </template> - <script> - Polymer('grid-item', { - isSelected: false - }) - </script> - </polymer-element> - - - <template is="auto-binding"> - <core-toolbar class="toolbar"> - <core-icon-button icon="{{$.pages.selected != 0 ? 'arrow-back' : 'menu'}}" on-tap="{{back}}"></core-icon-button> - <div flex>Stuff</div> - <core-icon-button icon="more-vert"></core-icon-button> - </core-toolbar> - <core-animated-pages id="pages" flex selected="0" on-core-animated-pages-transition-end="{{transitionend}}" transitions="cross-fade-all hero-transition"> - - <grid-toc vertical id="toc" layout selected="{{$.pages.selected}}" items="{{items}}" hero-p on-grid-toc-select="{{selectView}}"></grid-toc> - - <template repeat="{{item in items}}"> - <grid-item vertical layout item="{{item}}" hero-p isHero="{{$.pages.selected === item + 1 || $.pages.selected === 0}}"></grid-item> - </template> - - </core-animated-pages> - </template> - - <script> - - addEventListener('template-bound', function(e) { - var scope = e.target; - var items = [], count=50; - for (var i=0; i < count; i++) { - items.push(i); - } - - scope.items = items; - - scope.selectView = function(e, detail) { - var i = detail.item; - this.$.pages.selected = i+1; - } - - scope.back = function() { - this.lastSelected = this.$.pages.selected; - this.$.pages.selected = 0; - } - - scope.transitionend = function() { - if (this.lastSelected) { - this.lastSelected = null; - } - } - }) - - </script> - -</body> -</html> diff --git a/third_party/polymer/components/core-animated-pages/demos/simple.html b/third_party/polymer/components/core-animated-pages/demos/simple.html deleted file mode 100644 index a28846e..0000000 --- a/third_party/polymer/components/core-animated-pages/demos/simple.html +++ /dev/null @@ -1,89 +0,0 @@ -<!doctype html> -<html> -<head> - - <script src="../../platform/platform.js"></script> - <link href="../core-animated-pages.html" rel="import"> - <link href="../transitions/cross-fade.html" rel="import"> - <link href="../transitions/slide-from-right.html" rel="import"> - - <style> - body { - font-family: Roboto, 'Helvetica Neue', Helvetica, Arial, sans-serif; - margin: 0; - } - - core-animated-pages { - position: absolute; - top: 50px; - right: 0; - bottom: 0; - left: 0; - font-size: 72px; - overflow: hidden; - } - - section > div { - height: 100%; - color: white; - } - - </style> - -</head> -<body unresolved> - <select onchange="change();"> - <option value="cross-fade-all" selected>cross-fade-all</option> - <option value="slide-from-right">slide-from-right</option> - </select> - - <core-animated-pages onclick="stuff();" transitions="cross-fade-all"> - <section> - <div layout vertical center center-justified style="background:red;"> - <div>1</div> - </div> - </section> - <section> - <div layout vertical center center-justified style="background:blue;"> - <div>2</div> - </div> - </section> - <section> - <div layout vertical center center-justified style="background:purple;"> - <div>3</div> - </div> - </section> - <section> - <div layout vertical center center-justified style="background:orange;"> - <div>4</div> - </div> - </section> - <section> - <div layout vertical center center-justified style="background:green;"> - <div>5</div> - </div> - </section> - </core-animated-pages> - - <script> - function change() { - var s = document.querySelector('select'); - document.querySelector('core-animated-pages').transitions = document.querySelector('select').options[s.selectedIndex].value; - } - - var up = true; - var max = 4; - function stuff() { - var p = document.querySelector('core-animated-pages'); - if (up && p.selected === max || !up && p.selected === 0) { - up = !up; - } - if (up) { - p.selected += 1; - } else { - p.selected -= 1; - } - } - </script> -</body> -</html>
\ No newline at end of file diff --git a/third_party/polymer/components/core-animated-pages/index.html b/third_party/polymer/components/core-animated-pages/index.html deleted file mode 100644 index af0fe860..0000000 --- a/third_party/polymer/components/core-animated-pages/index.html +++ /dev/null @@ -1,22 +0,0 @@ -<!doctype html> -<!-- -Copyright (c) 2014 The Polymer Project Authors. All rights reserved. -This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE -The complete set of authors may be found at http://polymer.github.io/AUTHORS -The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS -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 ---> -<html> -<head> - - <script src="../platform/platform.js"></script> - <link rel="import" href="../core-component-page/core-component-page.html"> - -</head> -<body unresolved> - - <core-component-page sources='["core-animated-pages.html","transitions/core-transition-pages","transitions/hero-transition.html","transitions/cross-fade.html","transitions/cascade-transition.html","transitions/slide-up.html","transitions/slide-down.html"]'></core-component-page> - -</body> -</html> diff --git a/third_party/polymer/components/core-animated-pages/metadata.html b/third_party/polymer/components/core-animated-pages/metadata.html deleted file mode 100644 index 5756eee..0000000 --- a/third_party/polymer/components/core-animated-pages/metadata.html +++ /dev/null @@ -1,29 +0,0 @@ -<x-meta id="core-animated-pages" label="Animated Pages" group="Core" isContainer> - <!-- - TODO(sorvell): - - can't transition without contents; must document or fix. - - transitions syntax awkward: should be space separated - - hero-transition should be renamed `hero` - - hero and cross-fade-all should be always enabled. - --> - <template> - <core-animated-pages style="width:420px;height:582px;overflow:hidden;background-color:#eee;"> - <section layout horizontal center center-justified> - </section> - <section> - </section> - <section> - </section> - </core-animated-pages> - </template> - - <template id="imports"> - <link rel="import" href="core-animated-pages.html"> - <link rel="import" href="transitions/hero-transition.html"> - <link rel="import" href="transitions/cross-fade.html"> - <link rel="import" href="transitions/slide-down.html"> - <link rel="import" href="transitions/slide-up.html"> - <link rel="import" href="transitions/tile-cascade.html"> - </template> - -</x-meta>
\ No newline at end of file diff --git a/third_party/polymer/components/core-animated-pages/transitions/cascade-transition.html b/third_party/polymer/components/core-animated-pages/transitions/cascade-transition.html deleted file mode 100644 index ed3e25b..0000000 --- a/third_party/polymer/components/core-animated-pages/transitions/cascade-transition.html +++ /dev/null @@ -1,138 +0,0 @@ -<!-- -Copyright (c) 2014 The Polymer Project Authors. All rights reserved. -This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt -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 ---> - -<link href="core-transition-pages.html" rel="import"> - -<core-style id="cascade-transition"> - polyfill-next-selector { content: ':host(.cascade) > * [cascade] > div'; } - :host(.cascade) ::content > * /deep/ [cascade] > div { - -webkit-transition: -webkit-transform {{g.transitions.cascadeDuration || g.transitions.duration}} cubic-bezier(0.4, 0, 0.2, 1), opacity {{g.transitions.cascadeFadeDuration || g.transitions.duration}} cubic-bezier(0.4, 0, 0.2, 1); - transition: transform {{g.transitions.cascadeDuration || g.transitions.duration}} cubic-bezier(0.4, 0, 0.2, 1), opacity {{g.transitions.cascadeFadeDuration || g.transitions.duration}} cubic-bezier(0.4, 0, 0.2, 1); - } - - polyfill-next-selector { content: ':host(.cascade) > * [cascade] > div:nth-of-type(2)'; } - :host(.cascade) ::content > * /deep/ [cascade] > div:nth-of-type(2) { - -webkit-transition-delay: 0.05s; - transition-delay: 0.05s; - } - - polyfill-next-selector { content: ':host(.cascade) > * [cascade] > div:nth-of-type(3)'; } - :host(.cascade) ::content > * /deep/ [cascade] > div:nth-of-type(3) { - -webkit-transition-delay: 0.1s; - transition-delay: 0.1s; - } - - polyfill-next-selector { content: ':host(.cascade) > * [cascade] > div:nth-of-type(4)'; } - :host(.cascade) ::content > * /deep/ [cascade] > div:nth-of-type(4) { - -webkit-transition-delay: 0.15s; - transition-delay: 0.15s; - } - - polyfill-next-selector { content: ':host(.cascade) > * [cascade] > div:nth-of-type(5)'; } - :host(.cascade) ::content > * /deep/ [cascade] > div:nth-of-type(5) { - -webkit-transition-delay: 0.2s; - transition-delay: 0.2s; - } - - polyfill-next-selector { content: ':host(.cascade) > * [cascade] > div:nth-of-type(6)'; } - :host(.cascade) ::content > * /deep/ [cascade] > div:nth-of-type(6) { - -webkit-transition-delay: 0.25s; - transition-delay: 0.25s; - } - - polyfill-next-selector { content: ':host(.cascade) > * [cascade] > div:nth-of-type(7)'; } - :host(.cascade) ::content > * /deep/ [cascade] > div:nth-of-type(7) { - -webkit-transition-delay: 0.3s; - transition-delay: 0.3s; - } - - polyfill-next-selector { content: ':host(.cascade) > * [cascade] > div:nth-of-type(8)'; } - :host(.cascade) ::content > * /deep/ [cascade] > div:nth-of-type(8) { - -webkit-transition-delay: 0.35s; - transition-delay: 0.35s; - } - - polyfill-next-selector { content: ':host(.cascade) > * [cascade] > div:nth-of-type(9)'; } - :host(.cascade) ::content > * /deep/ [cascade] > div:nth-of-type(9) { - -webkit-transition-delay: 0.4s; - transition-delay: 0.4s; - } - - polyfill-next-selector { content: ':host(.cascade) > * [cascade] > div:nth-of-type(10)'; } - :host(.cascade) ::content > * /deep/ [cascade] > div:nth-of-type(10) { - -webkit-transition-delay: 0.45s; - transition-delay: 0.45s; - } - - polyfill-next-selector { content: ':host(.cascade) > * [cascade] > div:nth-of-type(11)'; } - :host(.cascade) ::content > * /deep/ [cascade] > div:nth-of-type(11) { - -webkit-transition-delay: 0.5s; - transition-delay: 0.5s; - } - - polyfill-next-selector { content: ':host(.cascade) > * [cascade] > div:nth-of-type(12)'; } - :host(.cascade) ::content > * /deep/ [cascade] > div:nth-of-type(12) { - -webkit-transition-delay: 0.55s; - transition-delay: 0.55s; - } - - polyfill-next-selector { content: '.core-selected [cascade] > div'; } - ::content > .core-selected /deep/ [cascade] > div { - } - - polyfill-next-selector { content: '[animate]:not(.core-selected) [cascade] > div'; } - ::content > [animate]:not(.core-selected) /deep/ [cascade] > div { - -webkit-transform: translateY(100%); - transform: translateY(100%); - } - - polyfill-next-selector { content: '[animate]:not(.core-selected) [cascade][fade] > div'; } - ::content > [animate]:not(.core-selected) /deep/ [cascade][fade] > div { - opacity: 0; - } -</core-style> - -<!-- - -`cascade-transition` slides the children of a container up in sequence, creating a -reverse waterfall effect. It works well with both grids and lists. Configure the -duration of the transition with the global variable `CoreStyle.g.transitions.cascadeDuration`. - -Example: - - <core-animated-pages transition="cascade-transition"> - <section> - <div id="container" cascade> - <div>item 1</div> - <div>item 2</div> - <div>item 3</div> - <div>item 4</div> - <div>item 5</div> - <div>item 6</div> - <div>item 7</div> - </div> - </section> - <section></section> - </core-animated-pages> - -In the above example, the immediate children of `#container` will slide up in -sequence when the page transitions from 0 to 1. - -The items can optionally fade in as they slide. Add the `fade` attribute to -the container to do that and configure the duration of the opacity transition with -the global variable `CoreStyle.g.transitions.cascadeFadeDuration`. - -@class cascade-transition -@extends core-transition-pages -@status beta -@homepage github.io - ---> - -<core-transition-pages id="cascade-transition" activeClass="cascade" transitionProperty="transform"></core-transition-pages>
\ No newline at end of file diff --git a/third_party/polymer/components/core-animated-pages/transitions/core-transition-pages.html b/third_party/polymer/components/core-animated-pages/transitions/core-transition-pages.html deleted file mode 100644 index 281d438..0000000 --- a/third_party/polymer/components/core-animated-pages/transitions/core-transition-pages.html +++ /dev/null @@ -1,175 +0,0 @@ -<!-- -Copyright (c) 2014 The Polymer Project Authors. All rights reserved. -This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt -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 ---> - -<link href="../../polymer/polymer.html" rel="import"> -<link href="../../core-style/core-style.html" rel="import"> -<link href="../../core-transition/core-transition.html" rel="import"> - -<!-- - -`core-transition-pages` represents a page transition, which may include CSS and/or -script. It will look for a `core-style` element with the same `id` to install in the -scope of the `core-animated-pages` that's using the transition. - -Example: - - <core-style id="fooTransition"> - // some CSS here - </core-style> - <core-transition-pages id="fooTransition"></core-transition-pages> - -There are three stages to a page transition: - -1. `prepare`: Called to set up the incoming and outgoing pages to the "before" state, - e.g. setting the incoming page to `opacity: 0` for `cross-fade` or find and - measure hero elements for `hero-transition`. - -2. `go`: Called to run the transition. For CSS-based transitions, this generally - applies a CSS `transition` property. - -3. `complete`: Called when the elements are finished transitioning. - -See the individual transition documentation for specific details. - -@element core-transition-pages -@extends core-transition -@status beta -@homepage github.io ---> -<!-- -Fired when the transition completes. - -@event core-transitionend ---> -<polymer-element name="core-transition-pages" extends="core-transition"> -<script> - -(function () { - -// create some basic transition styling data. -var transitions = CoreStyle.g.transitions = CoreStyle.g.transitions || {}; -transitions.duration = '500ms'; -transitions.heroDelay = '50ms'; -transitions.scaleDelay = '500ms'; -transitions.cascadeFadeDuration = '250ms'; - -Polymer({ - - publish: { - /** - * This class will be applied to the scope element in the `prepare` function. - * It is removed in the `complete` function. Used to activate a set of CSS - * rules that need to apply before the transition runs, e.g. a default opacity - * or transform for the non-active pages. - * - * @attribute scopeClass - * @type string - * @default '' - */ - scopeClass: '', - - /** - * This class will be applied to the scope element in the `go` function. It is - * remoived in the `complete' function. Generally used to apply a CSS transition - * rule only during the transition. - * - * @attribute activeClass - * @type string - * @default '' - */ - activeClass: '', - - /** - * Specifies which CSS property to look for when it receives a `transitionEnd` event - * to determine whether the transition is complete. If not specified, the first - * transitionEnd event received will complete the transition. - * - * @attribute transitionProperty - * @type string - * @default '' - */ - transitionProperty: '' - }, - - /** - * True if this transition is complete. - * - * @attribute completed - * @type boolean - * @default false - */ - completed: false, - - prepare: function(scope, options) { - this.boundCompleteFn = this.complete.bind(this, scope); - if (this.scopeClass) { - scope.classList.add(this.scopeClass); - } - }, - - go: function(scope, options) { - this.completed = false; - if (this.activeClass) { - scope.classList.add(this.activeClass); - } - scope.addEventListener('transitionend', this.boundCompleteFn, false); - }, - - setup: function(scope) { - if (!scope._pageTransitionStyles) { - scope._pageTransitionStyles = {}; - } - - var name = this.calcStyleName(); - - if (!scope._pageTransitionStyles[name]) { - this.installStyleInScope(scope, name); - scope._pageTransitionStyles[name] = true; - } - }, - - calcStyleName: function() { - return this.id || this.localName; - }, - - installStyleInScope: function(scope, id) { - if (!scope.shadowRoot) { - scope.createShadowRoot().innerHTML = '<content></content>'; - } - var root = scope.shadowRoot; - var scopeStyle = document.createElement('core-style'); - root.insertBefore(scopeStyle, root.firstChild); - scopeStyle.applyRef(id); - }, - - complete: function(scope, e) { - // TODO(yvonne): hack, need to manage completion better - if (e.propertyName !== 'box-shadow' && (!this.transitionProperty || e.propertyName.indexOf(this.transitionProperty) !== -1)) { - this.completed = true; - this.fire('core-transitionend', this, scope); - } - }, - - // TODO(sorvell): ideally we do this in complete. - ensureComplete: function(scope) { - scope.removeEventListener('transitionend', this.boundCompleteFn, false); - if (this.scopeClass) { - scope.classList.remove(this.scopeClass); - } - if (this.activeClass) { - scope.classList.remove(this.activeClass); - } - } - -}); - -})(); - -</script> -</polymer-element> diff --git a/third_party/polymer/components/core-animated-pages/transitions/cross-fade.html b/third_party/polymer/components/core-animated-pages/transitions/cross-fade.html deleted file mode 100644 index 4bfdf02..0000000 --- a/third_party/polymer/components/core-animated-pages/transitions/cross-fade.html +++ /dev/null @@ -1,173 +0,0 @@ -<!-- -Copyright (c) 2014 The Polymer Project Authors. All rights reserved. -This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt -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 ---> - -<link href="core-transition-pages.html" rel="import"> - -<core-style id="cross-fade"> - polyfill-next-selector { content: ':host > * [cross-fade]'; } - ::content > * /deep/ [cross-fade] { - -webkit-transition: opacity {{g.transitions.xfadeDuration || g.transitions.duration}} cubic-bezier(0.4, 0, 0.2, 1); - transition: opacity {{g.transitions.xfadeDuration || g.transitions.duration}} cubic-bezier(0.4, 0, 0.2, 1); - } - - polyfill-next-selector { content: ':host > * [cross-fade][bg]'; } - ::content > * /deep/ [cross-fade][bg] { - -webkit-transition: background-color {{g.transitions.xfadeDuration || g.transitions.duration}} cubic-bezier(0.4, 0, 0.2, 1); - transition: background-color {{g.transitions.xfadeDuration || g.transitions.duration}} cubic-bezier(0.4, 0, 0.2, 1); - } - - polyfill-next-selector { content: ':host > * [cross-fade][hero-p]'; } - ::content > * /deep/ [cross-fade][hero-p] { - -webkit-transition: background-color {{g.transitions.xfadeDuration || g.transitions.duration}} cubic-bezier(0.4, 0, 0.2, 1); - transition: background-color {{g.transitions.xfadeDuration || g.transitions.duration}} cubic-bezier(0.4, 0, 0.2, 1); - } - - polyfill-next-selector { content: ':host > .core-selected [cross-fade]'; } - ::content > .core-selected /deep/ [cross-fade] { - opacity: 1; - } - - polyfill-next-selector { content: ':host > [animate]:not(.core-selected) [cross-fade]:not([hero-p]):not([bg])'; } - ::content > [animate]:not(.core-selected) /deep/ [cross-fade]:not([hero-p]):not([bg]) { - opacity: 0; - } - - polyfill-next-selector { content: ':host > [animate]:not(.core-selected) [cross-fade][bg]'; } - ::content > [animate]:not(.core-selected) /deep/ [cross-fade][bg] { - background-color: rgba(0, 0, 0, 0); - } - - polyfill-next-selector { content: ':host > [animate]:not(.core-selected) [cross-fade][hero-p]'; } - ::content > [animate]:not(.core-selected) /deep/ [cross-fade][hero-p] { - background-color: rgba(0, 0, 0, 0); - } -</core-style> - -<core-style id="cross-fade-delayed"> - polyfill-next-selector { content: ':host > * [cross-fade-delayed]'; } - ::content > * /deep/ [cross-fade-delayed] { - -webkit-transition: opacity {{g.transitions.xfadeDuration || g.transitions.duration}} ease-out; - transition: opacity {{g.transitions.xfadeDuration || g.transitions.duration}} ease-out; - } - - polyfill-next-selector { content: ':host > .core-selected [cross-fade-delayed]'; } - ::content > .core-selected /deep/ [cross-fade-delayed] { - -webkit-transition: opacity {{g.transitions.xfadeDuration || g.transitions.duration}} ease-out {{g.transitions.xfadeDelay || g.transitions.xfadeDuration || g.transitions.duration}}; - transition: opacity {{g.transitions.xfadeDuration || g.transitions.duration}} ease-out {{g.transitions.xfadeDelay || g.transitions.xfadeDuration || g.transitions.duration}}; - } - - polyfill-next-selector { content: ':host > [animate]:not(.core-selected) [cross-fade-delayed]'; } - ::content > [animate]:not(.core-selected) /deep/ [cross-fade-delayed] { - opacity: 0; - } - - polyfill-next-selector { content: ':host > .core-selected [cross-fade-delayed]'; } - ::content > .core-selected /deep/ [cross-fade-delayed] { - opacity: 1; - } - -</core-style> - -<core-style id="cross-fade-all"> - /* cross-fade-all: cross fade everything except for heroes and their parents */ - polyfill-next-selector { content: ':host(.cross-fade-all) > * *:not([hero]):not([hero-p]):not([cross-fade])'; } - :host(.cross-fade-all) ::content > * /deep/ *:not([hero]):not([hero-p]):not([cross-fade]) { - -webkit-transition: opacity {{g.transitions.xfadeDuration || g.transitions.duration}} ease-out; - transition: opacity {{g.transitions.xfadeDuration || g.transitions.duration}} ease-out; - } - - polyfill-next-selector { content: ':host(.cross-fade-all) > [animate]:not(.core-selected) *:not([hero]):not([hero-p]):not([cross-fade])'; } - :host(.cross-fade-all) ::content > [animate]:not(.core-selected) /deep/ *:not([hero]):not([hero-p]):not([cross-fade]) { - opacity: 0; - } - - polyfill-next-selector { content: ':host(.cross-fade-all) > .core-selected *:not([hero])'; } - .host(.cross-fade-all) ::content > .core-selected /deep/ * { - opacity: 1; - } - - /* Only background-color is allowed for the hero's parents, no opacity transitions */ - polyfill-next-selector { content: ':host(.cross-fade-all) > * [hero-p]'; } - :host(.cross-fade-all) ::content > * /deep/ [hero-p] { - -webkit-transition: background-color {{g.transitions.xfadeDuration || g.transitions.duration}} ease-out; - transition: background-color {{g.transitions.xfadeDuration || g.transitions.duration}} ease-out; - opacity: 1; - } - - polyfill-next-selector { content: ':host(.cross-fade-all) > [animate]:not(.core-selected) [hero-p]'; } - :host(.cross-fade-all) ::content > [animate]:not(.core-selected) /deep/ [hero-p] { - background-color: rgba(0, 0, 0, 0); - } -</core-style> - -<!-- - -`cross-fade` fades out elements in the outgoing page and fades in elements in the -incoming page during a page transition. You can configure the duration of the -transition with the global variable `CoreStyle.g.transitions.xfadeDuration`. - -Example: - - <core-animated-pages transition="cross-fade"> - <section> - <div id="div1" cross-fade></div> - </section> - <section> - <div id="div2" cross-fade bg> - <div id="div3" cross-fade></div> - <div id="div4"></div> - </div> - </section> - </core-animated-pages> - -In the above example, `#div1` and `#div3` has the `cross-fade` attribute. `#div1` -will fade out and `#div3` will fade in with opacity transitions when the page switches -from 0 to 1. Sometimes, you may want to only fade the background color of an element -but not its children, and you can use the `bg` attribute along with the `#div1` -attribute as in `#div2`. - -@class cross-fade -@extends core-transition-pages -@status beta -@homepage github.io - ---> - -<!-- - -`cross-fade-delayed` performs a cross-fade after some delay, either specified in -the global variable `CoreStyle.g.transitions.xfadeDelay` or the duration of the -transition. - -Example: - - <core-animated-pages transition="hero-transition cross-fade-delayed"> - <section> - <div id="div1" hero-id hero></div> - </section> - <section> - <div id="div2" hero-id hero> - <div id="div3" cross-fade-delayed></div> - </div> - </section> - </core-animated-pages> - -In the above example, `#div3` fades in after the hero transition from `#div1` to -`#div2` completes. - -@class cross-fade-delayed -@extends core-transition-pages -@status beta -@homepage github.io - ---> - -<core-transition-pages id="cross-fade"></core-transition-pages> -<core-transition-pages id="cross-fade-delayed"></core-transition-pages> -<core-transition-pages id="cross-fade-all" scopeClass="cross-fade-all"></core-transition-pages> diff --git a/third_party/polymer/components/core-animated-pages/transitions/hero-transition.css b/third_party/polymer/components/core-animated-pages/transitions/hero-transition.css deleted file mode 100644 index 093b9cb..0000000 --- a/third_party/polymer/components/core-animated-pages/transitions/hero-transition.css +++ /dev/null @@ -1,12 +0,0 @@ -/* Hide heroes that are not currently transitioning */ -polyfill-next-selector { content: ':host > [animate] [hero]'; } -::content > [animate] /deep/ [hero], ::content > [animate]::shadow [hero] { - visibility: hidden; -} - -polyfill-next-selector { content: ':host > .core-selected[animate] [hero]'; } -::content > .core-selected[animate] /deep/ [hero], -::content > .core-selected[animate]::shadow [hero] { - visibility: visible; - z-index: 10000; -} diff --git a/third_party/polymer/components/core-animated-pages/transitions/hero-transition.html b/third_party/polymer/components/core-animated-pages/transitions/hero-transition.html deleted file mode 100644 index 46aedf2..0000000 --- a/third_party/polymer/components/core-animated-pages/transitions/hero-transition.html +++ /dev/null @@ -1,267 +0,0 @@ -<!-- -Copyright (c) 2014 The Polymer Project Authors. All rights reserved. -This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt -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 ---> - -<link href="core-transition-pages.html" rel="import"> - -<core-style id="hero-transition"> - /* Hide heroes that are not currently transitioning */ - polyfill-next-selector { content: ':host > [animate]:not(.core-selected) [hero]'; } - ::content > [animate]:not(.core-selected) /deep/ [hero] { - opacity: 0; - } - - polyfill-next-selector { content: ':host > .core-selected[animate] [hero]'; } - ::content > .core-selected[animate] /deep/ [hero] { - opacity: 1; - z-index: 10000; - } - - polyfill-next-selector { content: ':host > * [hero-p]'; } - ::content > * /deep/ [hero-p] { - -webkit-transition: box-shadow 100ms ease-out; - transition: box-shadow 100ms ease-out; - } - - polyfill-next-selector { content: ':host > [animate] [hero-p]'; } - ::content > [animate] /deep/ [hero-p] { - box-shadow: none !important; - } -</core-style> - - -<!-- - -`hero-transition` transforms two elements in different pages such that they appear -to be shared across the pages. - -Example: - - <core-animated-pages transition="hero-transition"> - <section layout horizontal> - <div id="div1" flex></div> - <div id="div2" flex hero-id="shared" hero></div> - </section> - <section> - <section layout horizontal> - <div id="div3" flex hero-id="shared" hero></div> - <div id="div4" flex></div> - </section> - </section> - </core-animated-pages> - -In the above example, the elements `#div2` and `#div3` shares the same `hero-id` -attribute and a single element appears to translate and scale smoothly between -the two positions during a page transition. - -Both elements from the source and destination pages must share the same `hero-id` -and must both contain the `hero` attribute to trigger the transition. The separate -`hero` attribute allows you to use binding to configure the transition: - -Example: - - <core-animated-pages transition="hero-transition"> - <section layout horizontal> - <div id="div1" flex hero-id="shared" hero?="{{selected == 0}}"></div> - <div id="div2" flex hero-id="shared" hero?="{{selected == 1}}"></div> - </section> - <section> - <section layout horizontal> - <div id="div3" flex hero-id="shared" hero></div> - </section> - </section> - </core-animated-pages> - -In the above example, either `#div1` or `#div2` scales to `#div3` during a page transition, -depending on the value of `selected`. - -Because it is common to share elements with different `border-radius` values, by default -this transition will also animate the `border-radius` property. - -You can configure the duration of the hero transition with the global variable -`CoreStyle.g.transitions.heroDuration`. - -@class hero-transition -@extends core-transition-pages -@status beta -@homepage github.io ---> -<polymer-element name="hero-transition" extends="core-transition-pages"> -<script> -(function() { - - var webkitStyles = '-webkit-transition' in document.documentElement.style - var TRANSITION_CSSNAME = webkitStyles ? '-webkit-transition' : 'transition'; - var TRANSFORM_CSSNAME = webkitStyles ? '-webkit-transform' : 'transform'; - var TRANSITION_NAME = webkitStyles ? 'webkitTransition' : 'transition'; - var TRANSFORM_NAME = webkitStyles ? 'webkitTransform' : 'transform'; - - var hasShadowDOMPolyfill = window.ShadowDOMPolyfill; - - Polymer({ - - go: function(scope, options) { - var props = [ - 'border-radius', - 'width', - 'height', - TRANSFORM_CSSNAME - ]; - - var duration = options && options.duration || - (CoreStyle.g.transitions.heroDuration || - CoreStyle.g.transitions.duration); - - scope._heroes.forEach(function(h) { - var d = h.h0.hasAttribute('hero-delayed') ? CoreStyle.g.transitions.heroDelay : ''; - var wt = []; - props.forEach(function(p) { - wt.push(p + ' ' + duration + ' ' + options.easing + ' ' + d); - }); - - h.h1.style[TRANSITION_NAME] = wt.join(', '); - h.h1.style.borderRadius = h.r1; - h.h1.style[TRANSFORM_NAME] = 'none'; - }); - - this.super(arguments); - - if (!scope._heroes.length) { - this.completed = true; - } - }, - - prepare: function(scope, options) { - this.super(arguments); - var src = options.src, dst = options.dst; - - if (scope._heroes && scope._heroes.length) { - this.ensureComplete(scope); - } else { - scope._heroes = []; - } - - // FIXME(yvonne): basic support for nested pages. - // Look for heroes in the light DOM and one level of shadow DOM of the src and dst, - // and also in src.selectedItem or dst.selectedItem, then transform the dst hero to src - var ss = '[hero]'; - var h$ = this.findAllInShadows(src, ss); - if (src.selectedItem) { - hs$ = this.findAllInShadows(src.selectedItem, ss); - hsa$ = []; - // De-duplicate items - Array.prototype.forEach.call(hs$, function(hs) { - if (h$.indexOf(hs) === -1) { - hsa$.push(hs); - } - }) - h$ = h$.concat(hsa$); - } - - for (var i=0, h0; h0=h$[i]; i++) { - var v = h0.getAttribute('hero-id'); - var ds = '[hero][hero-id="' + v + '"]'; - var h1 = this.findInShadows(dst, ds); - - if (!h1 && dst.selectedItem) { - h1 = this.findInShadows(dst.selectedItem, ds); - } - - // console.log('src', src); - // console.log('dst', dst, dst.selectedItem); - // console.log(v, h0, h1); - if (v && h1) { - var c0 = getComputedStyle(h0); - var c1 = getComputedStyle(h1); - var h = { - h0: h0, - b0: h0.getBoundingClientRect(), - r0: c0.borderRadius, - h1: h1, - b1: h1.getBoundingClientRect(), - r1: c1.borderRadius - }; - - var dl = h.b0.left - h.b1.left; - var dt = h.b0.top - h.b1.top; - var sw = h.b0.width / h.b1.width; - var sh = h.b0.height / h.b1.height; - - // h.scaley = h.h0.hasAttribute('scaley'); - // if (!h.scaley && (sw !== 1 || sh !== 1)) { - // sw = sh = 1; - // h.h1.style.width = h.b0.width + 'px'; - // h.h1.style.height = h.b0.height + 'px'; - // } - - // Also animate the border-radius for the circle-to-square transition - if (h.r0 !== h.r1) { - h.h1.style.borderRadius = h.r0; - } - - // console.log(h); - - h.h1.style[TRANSFORM_NAME] = 'translate(' + dl + 'px,' + dt + 'px)' + ' scale(' + sw + ',' + sh + ')'; - h.h1.style[TRANSFORM_NAME + 'Origin'] = '0 0'; - - scope._heroes.push(h); - } - } - - }, - - // carefully look into ::shadow with polyfill specific hack - findInShadows: function(node, selector) { - return node.querySelector(selector) || (hasShadowDOMPolyfill ? - Platform.queryAllShadows(node, selector) : - node.querySelector('::shadow ' + selector)); - }, - - findAllInShadows: function(node, selector) { - if (hasShadowDOMPolyfill) { - var nodes = node.querySelectorAll(selector).array(); - var shadowNodes = Platform.queryAllShadows(node, selector, true); - return nodes.concat(shadowNodes); - } else { - return node.querySelectorAll(selector).array().concat(node.shadowRoot ? node.shadowRoot.querySelectorAll(selector).array() : []); - } - }, - - ensureComplete: function(scope) { - this.super(arguments); - if (scope._heroes) { - scope._heroes.forEach(function(h) { - h.h1.style[TRANSITION_NAME] = null; - h.h1.style[TRANSFORM_NAME] = null; - }); - scope._heroes = []; - } - }, - - complete: function(scope, e) { - // if (e.propertyName === TRANSFORM_CSSNAME) { - var done = false; - scope._heroes.forEach(function(h) { - if (h.h1 === e.path[0]) { - done = true; - } - }); - - if (done) { - this.super(arguments); - } - // } - } - - }); - -})(); -</script> -</polymer-element> - -<hero-transition id="hero-transition"></hero-transition> diff --git a/third_party/polymer/components/core-animated-pages/transitions/list-cascade.html b/third_party/polymer/components/core-animated-pages/transitions/list-cascade.html deleted file mode 100644 index 986e017..0000000 --- a/third_party/polymer/components/core-animated-pages/transitions/list-cascade.html +++ /dev/null @@ -1,58 +0,0 @@ -<!-- -Copyright (c) 2014 The Polymer Project Authors. All rights reserved. -This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt -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 ---> - -<link href="core-transition-pages.html" rel="import"> - - -<core-style id="list-cascade"> - polyfill-next-selector { content: ':host.list-cascade > * [list-cascade]'; } - :host(.list-cascade) ::content > * [list-cascade] * { - -webkit-transition: -webkit-transform 1s cubic-bezier(0.4, 0, 0.2, 1), opacity {{g.transitions.cascade || g.transitions.duration}} cubic-bezier(0.4, 0, 0.2, 1); - transition: transform 1s cubic-bezier(0.4, 0, 0.2, 1), opacity {{g.transitions.cascade || g.transitions.duration}} cubic-bezier(0.4, 0, 0.2, 1); - } - - polyfill-next-selector { content: ':host > .core-selected [list-cascade] *'; } - ::content > .core-selected [list-cascade] * { - -webkit-transform: none; - transform: none; - } - - polyfill-next-selector { content: ':host > *:not(.core-selected) [list-cascade] *'; } - ::content > *:not(.core-selected) [list-cascade] * { - -webkit-transform: translateY(200%); - transform: translateY(200%); - opacity: 0.2; - } - - polyfill-next-selector { content: ':host > .core-selected [list-cascade] *:nth-child(2)'; } - ::content > .core-selected [list-cascade] *:nth-child(2) { - -webkit-transition-delay: 0.1s; - transition-delay: 0.1s; - } - - polyfill-next-selector { content: ':host > .core-selected [list-cascade] *:nth-child(3)'; } - ::content > .core-selected [list-cascade] *:nth-child(3) { - -webkit-transition-delay: 0.2s; - transition-delay: 0.2s; - } - - polyfill-next-selector { content: ':host > .core-selected [list-cascade] *:nth-child(4)'; } - ::content > .core-selected [list-cascade] *:nth-child(4) { - -webkit-transition-delay: 0.3s; - transition-delay: 0.3s; - } - - polyfill-next-selector { content: ':host > .core-selected [list-cascade] *:nth-child(5)'; } - ::content > .core-selected [list-cascade] *:nth-child(5) { - -webkit-transition-delay: 0.4s; - transition-delay: 0.4s; - } -</core-style> - -<core-transition-pages id="list-cascade" activeClass="list-cascade"></core-transition-pages>
\ No newline at end of file diff --git a/third_party/polymer/components/core-animated-pages/transitions/scale-up.html b/third_party/polymer/components/core-animated-pages/transitions/scale-up.html deleted file mode 100644 index 9724285..0000000 --- a/third_party/polymer/components/core-animated-pages/transitions/scale-up.html +++ /dev/null @@ -1,37 +0,0 @@ -<!-- -Copyright (c) 2014 The Polymer Project Authors. All rights reserved. -This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt -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 ---> - -<link href="core-transition-pages.html" rel="import"> - -<core-style id="scale-up"> - polyfill-next-selector { content: ':host > * [scale-up]'; } - ::content > * /deep/ [scale-up] { - -webkit-transition: -webkit-transform {{g.transitions.scaleDuration || g.transitions.duration}} cubic-bezier(0.4, 0, 0.2, 1) {{g.transitions.scaleDelay || g.transitions.delay}} !important; - transition: transform {{g.transitions.scaleDuration || g.transitions.duration}} cubic-bezier(0.4, 0, 0.2, 1) {{g.transitions.scaleDelay || g.transitions.delay}} !important; - } - - polyfill-next-selector { content: ':host > .core-selected [scale-up]'; } - ::content > .core-selected /deep/ [scale-up] { - -webkit-transform: none; - transform: none; - } - - polyfill-next-selector { content: ':host > [animate]:not(.core-selected) [scale-up]'; } - ::content > [animate]:not(.core-selected) /deep/ [scale-up] { - -webkit-transform: scale(0); - transform: scale(0); - } - - polyfill-next-selector { content: ':host > .core-selected[animate] [scale-up]'; } - ::content > .core-selected[animate] /deep/ [scale-up] { - z-index: 1000; - } -</core-style> - -<core-transition-pages id="scale-up"></core-transition-pages> diff --git a/third_party/polymer/components/core-animated-pages/transitions/slide-down.html b/third_party/polymer/components/core-animated-pages/transitions/slide-down.html deleted file mode 100644 index 025f71c..0000000 --- a/third_party/polymer/components/core-animated-pages/transitions/slide-down.html +++ /dev/null @@ -1,55 +0,0 @@ -<!-- -Copyright (c) 2014 The Polymer Project Authors. All rights reserved. -This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt -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 ---> - -<link href="core-transition-pages.html" rel="import"> - -<core-style id="slide-down"> - polyfill-next-selector { content: ':host.slide-down > * [slide-down]'; } - :host(.slide-down) ::content > * /deep/ [slide-down] { - -webkit-transition: -webkit-transform {{g.transitions.slideDuration || g.transitions.duration}} cubic-bezier(0.4, 0, 0.2, 1); - transition: transform {{g.transitions.slideDuration || g.transitions.duration}} cubic-bezier(0.4, 0, 0.2, 1); - } - - polyfill-next-selector { content: ':host > .core-selected [slide-down]'; } - ::content > .core-selected /deep/ [slide-down] { - -webkit-transform: none; - transform: none; - } - - polyfill-next-selector { content: ':host > [animate]:not(.core-selected) [slide-down]'; } - ::content > [animate]:not(.core-selected) /deep/ [slide-down] { - -webkit-transform: translateY(-100%); - transform: translateY(-100%); - } -</core-style> - -<!-- - -`slide-down` slides an element in the outgoing page from the top of the window and -slides in an element in the incoming page from the top of the window during a page -transition. You can configure the duration of the transition with the global variable -`CoreStyle.g.transitions.slideDuration`. - -Example: - - <core-animated-pages transition="slide-down"> - <section> - <div id="div1" slide-down></div> - </section> - <section></section> - </core-animated-pages> - -@class slide-down -@extends core-transition-pages -@status beta -@homepage github.io - ---> - -<core-transition-pages id="slide-down" activeClass="slide-down"></core-transition-pages> diff --git a/third_party/polymer/components/core-animated-pages/transitions/slide-from-bottom.html b/third_party/polymer/components/core-animated-pages/transitions/slide-from-bottom.html deleted file mode 100644 index 50a090b..0000000 --- a/third_party/polymer/components/core-animated-pages/transitions/slide-from-bottom.html +++ /dev/null @@ -1,38 +0,0 @@ -<!-- -Copyright (c) 2014 The Polymer Project Authors. All rights reserved. -This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt -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 ---> - -<link href="core-transition-pages.html" rel="import"> - -<core-style id="slide-from-bottom"> - polyfill-next-selector { content: ':host(.slide-from-bottom) > *'; } - :host(.slide-from-bottom) ::content > * { - -webkit-transition: -webkit-transform {{g.transitions.slideDuration || g.transitions.duration}} cubic-bezier(0.4, 0, 0.2, 1); - transition: transform {{g.transitions.slideDuration || g.transitions.duration}} cubic-bezier(0.4, 0, 0.2, 1); - } - - polyfill-next-selector { content: ':host(.slide-from-bottom) > .core-selected ~ [animate]:not(.core-selected)'; } - :host(.slide-from-bottom) ::content > .core-selected ~ [animate]:not(.core-selected) { - -webkit-transform: translateY(100%); - transform: translateY(100%); - } - - polyfill-next-selector { content: ':host(.slide-from-bottom) > [animate]:not(.core-selected)'; } - :host(.slide-from-bottom) ::content > [animate]:not(.core-selected) { - -webkit-transform: translateY(-100%); - transform: translateY(-100%); - } - - polyfill-next-selector { content: ':host(.slide-from-bottom) > .core-selected'; } - :host(.slide-from-bottom) ::content > .core-selected { - -webkit-transform: none; - transform: none; - } -</core-style> - -<core-transition-pages id="slide-from-bottom" scopeClass="slide-from-bottom"></core-transition-pages> diff --git a/third_party/polymer/components/core-animated-pages/transitions/slide-from-right.html b/third_party/polymer/components/core-animated-pages/transitions/slide-from-right.html deleted file mode 100644 index 9a847d2..0000000 --- a/third_party/polymer/components/core-animated-pages/transitions/slide-from-right.html +++ /dev/null @@ -1,43 +0,0 @@ -<!-- -Copyright (c) 2014 The Polymer Project Authors. All rights reserved. -This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt -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 ---> - -<link href="core-transition-pages.html" rel="import"> - -<!-- -Warning: This transition does not work well in combination with other transitions, because -it operates on the page rather than the page's children. ---> - -<core-style id="slide-from-right"> - polyfill-next-selector { content: ':host(.slide-from-right) > *'; } - :host(.slide-from-right) ::content > * { - -webkit-transition: -webkit-transform {{g.transitions.slideDuration || g.transitions.duration}} cubic-bezier(0.4, 0, 0.2, 1); - transition: transform {{g.transitions.slideDuration || g.transitions.duration}} cubic-bezier(0.4, 0, 0.2, 1); - } - - polyfill-next-selector { content: ':host(.slide-from-right) > .core-selected ~ [animate]:not(.core-selected)'; } - :host(.slide-from-right) ::content > .core-selected ~ [animate]:not(.core-selected) { - -webkit-transform: translateX(100%); - transform: translateX(100%); - } - - polyfill-next-selector { content: ':host(.slide-from-right) > [animate]:not(.core-selected)'; } - :host(.slide-from-right) ::content > [animate]:not(.core-selected) { - -webkit-transform: translateX(-100%); - transform: translateX(-100%); - } - - polyfill-next-selector { content: ':host(.slide-from-right) > .core-selected'; } - :host(.slide-from-right) ::content > .core-selected { - -webkit-transform: none; - transform: none; - } -</core-style> - -<core-transition-pages id="slide-from-right" scopeClass="slide-from-right"></core-transition-pages> diff --git a/third_party/polymer/components/core-animated-pages/transitions/slide-up.html b/third_party/polymer/components/core-animated-pages/transitions/slide-up.html deleted file mode 100644 index 33533cf..0000000 --- a/third_party/polymer/components/core-animated-pages/transitions/slide-up.html +++ /dev/null @@ -1,82 +0,0 @@ -<!-- -Copyright (c) 2014 The Polymer Project Authors. All rights reserved. -This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt -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 ---> - -<link href="core-transition-pages.html" rel="import"> - -<core-style id="slide-up"> - polyfill-next-selector { content: ':host.slide-up > * [slide-up]'; } - :host(.slide-up) ::content > * /deep/ [slide-up] { - -webkit-transition: -webkit-transform {{g.transitions.slideDuration || g.transitions.duration}} cubic-bezier(0.4, 0, 0.2, 1); - transition: transform {{g.transitions.slideDuration || g.transitions.duration}} cubic-bezier(0.4, 0, 0.2, 1); - } - - polyfill-next-selector { content: ':host > .core-selected [slide-up]'; } - ::content > .core-selected /deep/ [slide-up] { - -webkit-transform: none; - transform: none; - } - - polyfill-next-selector { content: ':host > [animate]:not(.core-selected) [slide-up]'; } - ::content > [animate]:not(.core-selected) /deep/ [slide-up] { - -webkit-transform: translateY(150%); - transform: translateY(150%); - } -</core-style> - -<core-style id="slide-up-offscreen"> - polyfill-next-selector { content: ':host.slide-up-offscreen > * [slide-up-offscreen]'; } - :host(.slide-up-offscreen) ::content > * /deep/ [slide-up-offscreen] { - -webkit-transition: -webkit-transform {{g.transitions.slideDuration || g.transitions.duration}} cubic-bezier(0.4, 0, 0.2, 1); - transition: transform {{g.transitions.slideDuration || g.transitions.duration}} cubic-bezier(0.4, 0, 0.2, 1); - } - - polyfill-next-selector { content: ':host > .core-selected [slide-up-offscreen]'; } - ::content > .core-selected /deep/ [slide-up-offscreen] { - -webkit-transform: none; - transform: none; - } - - polyfill-next-selector { content: ':host > [animate]:not(.core-selected) [slide-up-offscreen]'; } - ::content > [animate]:not(.core-selected) /deep/ [slide-up-offscreen] { - -webkit-transform: translateY(100vh); - transform: translateY(100vh); - z-index: -1; - } - - polyfill-rule { - content: ':host > [animate]:not(.core-selected) [slide-up-offscreen]'; - -webkit-transform: translateY(1000px); - } -</core-style> - -<!-- - -`slide-up` slides an element in the outgoing page from the bottom of the window -and slides in an element in the incoming page from the bottom of the window during -a page transition. You can configure the duration of the transition with the global -variable `CoreStyle.g.transitions.slideDuration`. - -Example: - - <core-animated-pages transition="slide-up"> - <section> - <div id="div1" slide-up></div> - </section> - <section></section> - </core-animated-pages> - -@class slide-up -@extends core-transition-pages -@status beta -@homepage github.io - ---> - -<core-transition-pages id="slide-up" activeClass="slide-up"></core-transition-pages> -<core-transition-pages id="slide-up-offscreen" activeClass="slide-up-offscreen"></core-transition-pages> diff --git a/third_party/polymer/components/core-animated-pages/transitions/tile-cascade.html b/third_party/polymer/components/core-animated-pages/transitions/tile-cascade.html deleted file mode 100644 index 63756f1..0000000 --- a/third_party/polymer/components/core-animated-pages/transitions/tile-cascade.html +++ /dev/null @@ -1,101 +0,0 @@ -<!-- -Copyright (c) 2014 The Polymer Project Authors. All rights reserved. -This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt -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 ---> - -<link href="core-transition-pages.html" rel="import"> - -<core-style id="tile-cascade"> - polyfill-next-selector { content: ':host(.tile-cascade) > * [tile-cascade] > div'; } - :host(.tile-cascade) ::content > * /deep/ [tile-cascade] > div { - -webkit-transition: -webkit-transform {{g.transitions.cascadeDuration || g.transitions.duration}} cubic-bezier(0.4, 0, 0.2, 1), opacity {{g.transitions.cascadeFadeDuration || g.transitions.duration}} cubic-bezier(0.4, 0, 0.2, 1); - transition: transform {{g.transitions.cascadeDuration || g.transitions.duration}} cubic-bezier(0.4, 0, 0.2, 1), opacity {{g.transitions.cascadeFadeDuration || g.transitions.duration}} cubic-bezier(0.4, 0, 0.2, 1); - } - - polyfill-next-selector { content: ':host(.tile-cascade) > * [tile-cascade] > div:nth-of-type(2)'; } - :host(.tile-cascade) ::content > * /deep/ [tile-cascade] > div:nth-of-type(2) { - -webkit-transition-delay: 0.05s; - transition-delay: 0.05s; - } - - polyfill-next-selector { content: ':host(.tile-cascade) > * [tile-cascade] > div:nth-of-type(3)'; } - :host(.tile-cascade) ::content > * /deep/ [tile-cascade] > div:nth-of-type(3) { - -webkit-transition-delay: 0.1s; - transition-delay: 0.1s; - } - - polyfill-next-selector { content: ':host(.tile-cascade) > * [tile-cascade] > div:nth-of-type(4)'; } - :host(.tile-cascade) ::content > * /deep/ [tile-cascade] > div:nth-of-type(4) { - -webkit-transition-delay: 0.15s; - transition-delay: 0.15s; - } - - polyfill-next-selector { content: ':host(.tile-cascade) > * [tile-cascade] > div:nth-of-type(5)'; } - :host(.tile-cascade) ::content > * /deep/ [tile-cascade] > div:nth-of-type(5) { - -webkit-transition-delay: 0.2s; - transition-delay: 0.2s; - } - - polyfill-next-selector { content: ':host(.tile-cascade) > * [tile-cascade] > div:nth-of-type(6)'; } - :host(.tile-cascade) ::content > * /deep/ [tile-cascade] > div:nth-of-type(6) { - -webkit-transition-delay: 0.25s; - transition-delay: 0.25s; - } - - polyfill-next-selector { content: ':host(.tile-cascade) > * [tile-cascade] > div:nth-of-type(7)'; } - :host(.tile-cascade) ::content > * /deep/ [tile-cascade] > div:nth-of-type(7) { - -webkit-transition-delay: 0.3s; - transition-delay: 0.3s; - } - - polyfill-next-selector { content: ':host(.tile-cascade) > * [tile-cascade] > div:nth-of-type(8)'; } - :host(.tile-cascade) ::content > * /deep/ [tile-cascade] > div:nth-of-type(8) { - -webkit-transition-delay: 0.35s; - transition-delay: 0.35s; - } - - polyfill-next-selector { content: ':host(.tile-cascade) > * [tile-cascade] > div:nth-of-type(9)'; } - :host(.tile-cascade) ::content > * /deep/ [tile-cascade] > div:nth-of-type(9) { - -webkit-transition-delay: 0.4s; - transition-delay: 0.4s; - } - - polyfill-next-selector { content: ':host(.tile-cascade) > * [tile-cascade] > div:nth-of-type(10)'; } - :host(.tile-cascade) ::content > * /deep/ [tile-cascade] > div:nth-of-type(10) { - -webkit-transition-delay: 0.45s; - transition-delay: 0.45s; - } - - polyfill-next-selector { content: ':host(.tile-cascade) > * [tile-cascade] > div:nth-of-type(11)'; } - :host(.tile-cascade) ::content > * /deep/ [tile-cascade] > div:nth-of-type(11) { - -webkit-transition-delay: 0.5s; - transition-delay: 0.5s; - } - - polyfill-next-selector { content: ':host(.tile-cascade) > * [tile-cascade] > div:nth-of-type(12)'; } - :host(.tile-cascade) ::content > * /deep/ [tile-cascade] > div:nth-of-type(12) { - -webkit-transition-delay: 0.55s; - transition-delay: 0.55s; - } - - polyfill-next-selector { content: '.core-selected [tile-cascade] > div'; } - ::content > .core-selected /deep/ [tile-cascade] > div { - } - - polyfill-next-selector { content: '[animate]:not(.core-selected) [tile-cascade] > div'; } - ::content > [animate]:not(.core-selected) /deep/ [tile-cascade] > div { - -webkit-transform: translateY(100%); - transform: translateY(100%); - } - - polyfill-next-selector { content: '[animate]:not(.core-selected) [tile-cascade][fade] > div'; } - ::content > [animate]:not(.core-selected) /deep/ [tile-cascade][fade] > div { - opacity: 0; - } -</core-style> - -<core-transition-pages id="tile-cascade" activeClass="tile-cascade" transitionProperty="transform"></core-transition-pages>
\ No newline at end of file diff --git a/third_party/polymer/components/core-animation/.bower.json b/third_party/polymer/components/core-animation/.bower.json deleted file mode 100644 index 1a84d62..0000000 --- a/third_party/polymer/components/core-animation/.bower.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "name": "core-animation", - "private": true, - "dependencies": { - "polymer": "Polymer/polymer#>=0.3.0 <1.0.0", - "web-animations-js": "web-animations/web-animations-js#master" - }, - "homepage": "https://github.com/Polymer/core-animation", - "version": "0.3.5", - "_release": "0.3.5", - "_resolution": { - "type": "version", - "tag": "0.3.5", - "commit": "b89817863f78706fa8d9b8289ada65b8551a66cd" - }, - "_source": "git://github.com/Polymer/core-animation.git", - "_target": "0.3.5", - "_originalSource": "Polymer/core-animation" -}
\ No newline at end of file diff --git a/third_party/polymer/components/core-animation/README.md b/third_party/polymer/components/core-animation/README.md deleted file mode 100644 index 809db5e..0000000 --- a/third_party/polymer/components/core-animation/README.md +++ /dev/null @@ -1,4 +0,0 @@ -core-animation -============== - -See the [component page](http://polymer-project.org/docs/elements/core-elements.html#core-animation) for more information. diff --git a/third_party/polymer/components/core-animation/bower.json b/third_party/polymer/components/core-animation/bower.json deleted file mode 100644 index aedb555..0000000 --- a/third_party/polymer/components/core-animation/bower.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "name": "core-animation", - "private": true, - "dependencies": { - "polymer": "Polymer/polymer#>=0.3.0 <1.0.0", - "web-animations-js": "web-animations/web-animations-js#master" - } -}
\ No newline at end of file diff --git a/third_party/polymer/components/core-animation/core-animation-group.html b/third_party/polymer/components/core-animation/core-animation-group.html deleted file mode 100644 index 773cffd..0000000 --- a/third_party/polymer/components/core-animation/core-animation-group.html +++ /dev/null @@ -1,169 +0,0 @@ -<!-- -Copyright (c) 2014 The Polymer Project Authors. All rights reserved. -This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt -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 ---> - -<link rel="import" href="../polymer/polymer.html"> -<link rel="import" href="core-animation.html"> - -<!-- -@group Polymer Core Elements - -`core-animation-group` combines `core-animation` or `core-animation-group` elements to -create a grouped web animation. The group may be parallel (type is `par`) or sequential -(type is `seq`). Parallel groups play all the children elements simultaneously, and -sequential groups play the children one after another. - -Example of an animation group to rotate and then fade an element: - - <core-animation-group type="seq"> - <core-animation id="fadeout" duration="500"> - <core-animation-keyframe> - <core-animation-prop name="transform" value="rotate(0deg)"></core-animation-prop> - <core-animation-prop name="transform" value="rotate(45deg)"></core-animation-prop> - </core-animation-keyframe> - </core-animation> - <core-animation id="fadeout" duration="500"> - <core-animation-keyframe> - <core-animation-prop name="opacity" value="1"></core-animation-prop> - </core-animation-keyframe> - <core-animation-keyframe> - <core-animation-prop name="opacity" value="0"></core-animation-prop> - </core-animation-keyframe> - </core-animation> - </core-animation-group> - -@element core-animation-group -@status beta -@homepage github.io ---> -<polymer-element name="core-animation-group" constructor="CoreAnimationGroup" extends="core-animation" attributes="type"> - <script> - (function() { - - var ANIMATION_GROUPS = { - 'par': AnimationGroup, - 'seq': AnimationSequence - }; - - Polymer({ - - publish: { - /** - * If target is set, any children without a target will be assigned the group's - * target when this property is set. - * - * @property target - * @type HTMLElement|Node|Array|Array<HTMLElement|Node> - */ - - /** - * For a `core-animation-group`, a duration of "auto" means the duration should - * be the specified duration of its children. If set to anything other than - * "auto", any children without a set duration will be assigned the group's duration. - * - * @property duration - * @type number - * @default "auto" - */ - duration: {value: 'auto', reflect: true}, - - /** - * The type of the animation group. 'par' creates a parallel group and 'seq' creates - * a sequential group. - * - * @property type - * @type String - * @default 'par' - */ - type: {value: 'par', reflect: true} - }, - - typeChanged: function() { - this.apply(); - }, - - targetChanged: function() { - // Only propagate target to children animations if it's defined. - if (this.target) { - this.doOnChildren(function(c) { - c.target = this.target; - }.bind(this)); - } - }, - - durationChanged: function() { - if (this.duration && this.duration !== 'auto') { - this.doOnChildren(function(c) { - // Propagate to children that is not a group and has no - // duration specified. - if (!c.type && (!c.duration || c.duration === 'auto')) { - c.duration = this.duration; - } - }.bind(this)); - } - }, - - doOnChildren: function(inFn) { - var children = this.children; - if (!children.length) { - children = this.shadowRoot ? this.shadowRoot.childNodes : []; - } - Array.prototype.forEach.call(children, function(c) { - // TODO <template> in the way - c.apply && inFn(c); - }, this); - }, - - makeAnimation: function() { - return new ANIMATION_GROUPS[this.type](this.childAnimations, this.timingProps); - }, - - hasTarget: function() { - var ht = this.target !== null; - if (!ht) { - this.doOnChildren(function(c) { - ht = ht || c.hasTarget(); - }.bind(this)); - } - return ht; - }, - - apply: function() { - // Propagate target and duration to child animations first. - this.durationChanged(); - this.targetChanged(); - this.doOnChildren(function(c) { - c.apply(); - }); - return this.super(); - }, - - get childAnimationElements() { - var list = []; - this.doOnChildren(function(c) { - if (c.makeAnimation) { - list.push(c); - } - }); - return list; - }, - - get childAnimations() { - var list = []; - this.doOnChildren(function(c) { - if (c.animation) { - list.push(c.animation); - } - }); - return list; - } - }); - - })(); - </script> -</polymer-element> diff --git a/third_party/polymer/components/core-animation/core-animation.html b/third_party/polymer/components/core-animation/core-animation.html deleted file mode 100644 index b480402..0000000 --- a/third_party/polymer/components/core-animation/core-animation.html +++ /dev/null @@ -1,524 +0,0 @@ -<!-- -Copyright (c) 2014 The Polymer Project Authors. All rights reserved. -This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt -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 ---> - -<link rel="import" href="../polymer/polymer.html"> -<link rel="import" href="web-animations.html"> - -<!-- -@group Polymer Core Elements - -`core-animation` is a convenience element to use web animations with Polymer elements. It -allows you to create a web animation declaratively. You can extend this class to create -new types of animations and combine them with `core-animation-group`. - -Example to create animation to fade out an element over 500ms: - - <core-animation id="fadeout" duration="500"> - <core-animation-keyframe> - <core-animation-prop name="opacity" value="1"></core-animation-prop> - </core-animation-keyframe> - <core-animation-keyframe> - <core-animation-prop name="opacity" value="0"></core-animation-prop> - </core-animation-keyframe> - </core-animation> - - <div id="el">Fade me out</div> - - <script> - var animation = document.getElementById('fadeout'); - animation.target = document.getElementById('el'); - animation.play(); - </script> - -Or do the same imperatively: - - var animation = new CoreAnimation(); - animation.duration = 500; - animation.keyframes = [ - {opacity: 1}, - {opacity: 0} - ]; - animation.target = document.getElementById('el'); - animation.play(); - -You can also provide a javascript function instead of keyframes to the animation. This -behaves essentially the same as `requestAnimationFrame`: - - var animation = new CoreAnimation(); - animation.customEffect = function(timeFraction, target, animation) { - // do something custom - }; - animation.play(); - -Elements that are targets to a `core-animation` are given the `core-animation-target` class. - -@element core-animation -@status beta -@homepage github.io ---> -<polymer-element name="core-animation" constructor="CoreAnimation" attributes="target keyframes sample composite duration fill easing iterationStart iterationCount delay direction autoplay targetSelector"> - <script> - (function() { - - function toNumber(value, allowInfinity) { - return (allowInfinity && value === 'Infinity') ? Number.POSITIVE_INFINITY : Number(value); - }; - - Polymer({ - /** - * Fired when the animation completes. - * - * @event core-animation-finish - */ - - /** - * - * Fired when the web animation object changes. - * - * @event core-animation-change - */ - - publish: { - - /** - * One or more nodes to animate. - * - * @property target - * @type HTMLElement|Node|Array<HTMLElement|Node> - */ - target: {value: null, reflect: true}, - - /** - * Animation keyframes specified as an array of dictionaries of - * <css properties>:<array of values> pairs. For example, - * - * @property keyframes - * @type Object - */ - keyframes: {value: null, reflect: true}, - - /** - * A custom animation function. Either provide this or `keyframes`. The signature - * of the callback is `EffectsCallback(timeFraction, target, animation)` - * - * @property customEffect - * @type Function(number, Object, Object) - */ - customEffect: {value: null, reflect: true}, - - /** - * Controls the composition behavior. If set to "replace", the effect overrides - * the underlying value for the target. If set the "add", the effect is added to - * the underlying value for the target. If set to "accumulate", the effect is - * accumulated to the underlying value for the target. - * - * In cases such as numbers or lengths, "add" and "accumulate" produce the same - * value. In list values, "add" is appending to the list, while "accumulate" is - * adding the individual components of the list. - * - * For example, adding `translateX(10px)` and `translateX(25px)` produces - * `translateX(10px) translateX(25px)` and accumulating produces `translateX(35px)`. - * - * @property composite - * @type "replace"|"add"|"accumulate" - * @default "replace" - */ - composite: {value: 'replace', reflect: true}, - - /** - * Animation duration in milliseconds, "Infinity", or "auto". "auto" is - * equivalent to 0. - * - * @property duration - * @type number|"Infinity" - * @default "auto" - */ - duration: {value: 'auto', reflect: true}, - - /** - * Controls the effect the animation has on the target when it's not playing. - * The possible values are "none", "forwards", "backwards", "both" or "auto". - * - * "none" means the animation has no effect when it's not playing. - * - * "forward" applies the value at the end of the animation after it's finished. - * - * "backwards" applies the value at the start of the animation to the target - * before it starts playing and has no effect when the animation finishes. - * - * "both" means "forwards" and "backwards". "auto" is equivalent to "none". - * - * @property fill - * @type "none"|"forwards"|"backwards"|"both"|"auto" - * @default "auto" - */ - fill: {value: 'auto', reflect: true}, - - /** - * A transition timing function. The values are equivalent to the CSS - * counterparts. - * - * @property easing - * @type string - * @default "linear" - */ - easing: {value: 'linear', reflect: true}, - - /** - * The number of milliseconds to delay before beginning the animation. - * - * @property delay - * @type Number - * @default 0 - */ - delay: {value: 0, reflect: true}, - - /** - * The number of milliseconds to wait after the animation finishes. This is - * useful, for example, in an animation group to wait for some time before - * beginning the next item in the animation group. - * - * @property endDelay - * @type number - * @default 0 - */ - endDelay: {value: 0, reflect: true}, - - /** - * The number of iterations this animation should run for. - * - * @property iterations - * @type Number|'Infinity' - * @default 1 - */ - iterations: {value: 1, reflect: true}, - - /** - * Number of iterations into the animation in which to begin the effect. - * For example, setting this property to 0.5 and `iterations` to 2 will - * cause the animation to begin halfway through the first iteration but still - * run twice. - * - * @property iterationStart - * @type Number - * @default 0 - */ - iterationStart: {value: 0, reflect: true}, - - /** - * (not working in web animations polyfill---do not use) - * - * Controls the iteration composition behavior. If set to "replace", the effect for - * every iteration is independent of each other. If set to "accumulate", the effect - * for iterations of the animation will build upon the value in the previous iteration. - * - * Example: - * - * // Moves the target 50px on the x-axis over 5 iterations. - * <core-animation iterations="5" iterationComposite="accumulate"> - * <core-animation-keyframe> - * <core-animation-prop name="transform" value="translateX(10px)"></core-animation-prop> - * </core-animation-keyframe> - * </core-animation> - * - * @property iterationComposite - * @type "replace"|"accumulate" - * @default false - */ - iterationComposite: {value: 'replace', reflect: true}, - - /** - * The playback direction of the animation. "normal" plays the animation in the - * normal direction. "reverse" plays it in the reverse direction. "alternate" - * alternates the playback direction every iteration such that even iterations are - * played normally and odd iterations are reversed. "alternate-reverse" plays - * even iterations in the reverse direction and odd iterations in the normal - * direction. - * - * @property direction - * @type "normal"|"reverse"|"alternate"|"alternate-reverse" - * @default "normal" - */ - direction: {value: 'normal', reflect: true}, - - /** - * A multiplier to the playback rate to the animation. - * - * @property playbackRate - * @type number - * @default 1 - */ - playbackRate: {value: 1, reflect: true}, - - /** - * If set to true, play the animation when it is created or a property is updated. - * - * @property autoplay - * @type boolean - * @default false - */ - autoplay: {value: false, reflect: true} - - }, - - animation: false, - - observe: { - target: 'apply', - keyframes: 'apply', - customEffect: 'apply', - composite: 'apply', - duration: 'apply', - fill: 'apply', - easing: 'apply', - iterations: 'apply', - iterationStart: 'apply', - iterationComposite: 'apply', - delay: 'apply', - endDelay: 'apply', - direction: 'apply', - playbackRate: 'apply', - autoplay: 'apply' - }, - - ready: function() { - this.apply(); - }, - - /** - * Plays the animation. If the animation is currently paused, seeks the animation - * to the beginning before starting playback. - * - * @method play - * @return AnimationPlayer The animation player. - */ - play: function() { - this.apply(); - if (this.animation && !this.autoplay) { - this.player = document.timeline.play(this.animation); - this.player.onfinish = this.animationFinishHandler.bind(this); - return this.player; - } - }, - - /** - * Stops the animation and clears all effects on the target. - * - * @method cancel - */ - cancel: function() { - if (this.player) { - this.player.cancel(); - } - }, - - /** - * Seeks the animation to the end. - * - * @method finish - */ - finish: function() { - if (this.player) { - this.player.finish(); - } - }, - - /** - * Pauses the animation. - * - * @method pause - */ - pause: function() { - if (this.player) { - this.player.pause(); - } - }, - - /** - * @method hasTarget - * @return boolean True if `target` is defined. - */ - hasTarget: function() { - return this.target !== null; - }, - - /** - * Creates a web animations object based on this object's properties, and - * plays it if autoplay is true. - * - * @method apply - * @return Object A web animation. - */ - apply: function() { - this.animation = this.makeAnimation(); - if (this.autoplay && this.animation) { - this.play(); - } - return this.animation; - }, - - makeSingleAnimation: function(target) { - // XXX(yvonne): for selecting all the animated elements. - target.classList.add('core-animation-target'); - return new Animation(target, this.animationEffect, this.timingProps); - }, - - makeAnimation: function() { - if (!this.target) { - return null; - } - var animation; - if (Array.isArray(this.target)) { - var array = []; - this.target.forEach(function(t) { - array.push(this.makeSingleAnimation(t)); - }.bind(this)); - animation = new AnimationGroup(array); - } else { - animation = this.makeSingleAnimation(this.target); - } - return animation; - }, - - animationChanged: function() { - // Sending 'this' with the event so you can always get the animation object - // that fired the event, due to event retargetting in shadow DOM. - this.fire('core-animation-change', this); - }, - - targetChanged: function(old) { - if (old) { - old.classList.remove('core-animation-target'); - } - }, - - get timingProps() { - var props = {}; - var timing = { - delay: {isNumber: true}, - endDelay: {isNumber: true}, - fill: {}, - iterationStart: {isNumber: true}, - iterations: {isNumber: true, allowInfinity: true}, - duration: {isNumber: true}, - playbackRate: {isNumber: true}, - direction: {}, - easing: {} - }; - for (t in timing) { - if (this[t] !== null) { - var name = timing[t].property || t; - props[name] = timing[t].isNumber && this[t] !== 'auto' ? - toNumber(this[t], timing[t].allowInfinity) : this[t]; - } - } - return props; - }, - - get animationEffect() { - var props = {}; - var frames = []; - var effect; - if (this.keyframes) { - frames = this.keyframes; - } else if (!this.customEffect) { - var children = this.querySelectorAll('core-animation-keyframe'); - if (children.length === 0) { - children = this.shadowRoot.querySelectorAll('core-animation-keyframe'); - } - Array.prototype.forEach.call(children, function(c) { - frames.push(c.properties); - }); - } - if (this.customEffect) { - effect = this.customEffect; - } else { - effect = new KeyframeEffect(frames, this.composite); - } - return effect; - }, - - animationFinishHandler: function() { - this.fire('core-animation-finish'); - } - - }); - })(); - </script> -</polymer-element> - -<!-- -`core-animation-keyframe` represents a keyframe in a `core-animation`. Use them as children of -`core-animation` elements to create web animations declaratively. If the `offset` property is -unset, the keyframes will be distributed evenly within the animation duration. Use -`core-animation-prop` elements as children of this element to specify the CSS properties for -the animation. - -@element core-animation-keyframe -@status beta -@homepage github.io ---> -<polymer-element name="core-animation-keyframe" attributes="offset"> - <script> - Polymer({ - publish: { - /** - * An offset from 0 to 1. - * - * @property offset - * @type Number - */ - offset: {value: null, reflect: true} - }, - get properties() { - var props = {}; - var children = this.querySelectorAll('core-animation-prop'); - Array.prototype.forEach.call(children, function(c) { - props[c.name] = c.value; - }); - if (this.offset !== null) { - props.offset = this.offset; - } - return props; - } - }); - </script> -</polymer-element> - -<!-- -`core-animation-prop` represents a CSS property and value pair to use with -`core-animation-keyframe`. - -@element core-animation-prop -@status beta -@homepage github.io ---> -<polymer-element name="core-animation-prop" attributes="name value"> - <script> - Polymer({ - publish: { - /** - * A CSS property name. - * - * @property name - * @type string - */ - name: {value: '', reflect: true}, - - /** - * The value for the CSS property. - * - * @property value - * @type string|number - */ - value: {value: '', reflect: true} - } - }); - </script> -</polymer-element> diff --git a/third_party/polymer/components/core-animation/demo.html b/third_party/polymer/components/core-animation/demo.html deleted file mode 100644 index b9a1038..0000000 --- a/third_party/polymer/components/core-animation/demo.html +++ /dev/null @@ -1,140 +0,0 @@ -<!DOCTYPE html> -<html> - <head> - <title>core-animation</title> - <script src="../platform/platform.js"></script> - <link rel="import" href="core-animation.html"> - <link rel="import" href="core-animation-group.html"> - -<!-- <link rel="import" href="polymer-blink.html"> - <link rel="import" href="polymer-bounce.html"> - <link rel="import" href="polymer-fadein.html"> - <link rel="import" href="polymer-fadeout.html"> - <link rel="import" href="polymer-flip.html"> - <link rel="import" href="polymer-shake.html"> - --> - <style> - body { - text-align: center; - font-family: Helvetica, sans-serif; - } - div#target { - display: inline-block; - background-color: dimgrey; - border-radius: 5px; - padding: 5px 10px; - margin: 50px; - font-size: 30px; - color: white; - } - div.animations > * { - display: inline-block; - background-color: darkgrey; - border-radius: 5px; - padding: 5px 10px; - margin: 5px; - color: white; - } - </style> - </head> - <body> - - <div id="target">animated!</div> - - <div class="animations"> - - <core-animation id="raw" duration="1000"> - raw - <core-animation-keyframe> - <core-animation-prop name="opacity" value="1"> - </core-animation-prop> - </core-animation-keyframe> - <core-animation-keyframe> - <core-animation-prop name="opacity" value="0.3"> - </core-animation-prop> - </core-animation-keyframe> - <core-animation-keyframe> - <core-animation-prop name="opacity" value="1"> - </core-animation-prop> - </core-animation-keyframe> - </core-animation> - - <core-animation-group type="seq"> - raw group - <core-animation duration="300"> - <core-animation-keyframe> - <core-animation-prop name="opacity" value="1"> - </core-animation-prop> - </core-animation-keyframe> - <core-animation-keyframe> - <core-animation-prop name="opacity" value="0.3"> - </core-animation-prop> - </core-animation-keyframe> - <core-animation-keyframe> - <core-animation-prop name="opacity" value="1"> - </core-animation-prop> - </core-animation-keyframe> - </core-animation> - <core-animation duration="300"> - <core-animation-keyframe> - <core-animation-prop name="transform" value="scale(1)"> - </core-animation-prop> - </core-animation-keyframe> - <core-animation-keyframe> - <core-animation-prop name="transform" value="scale(1.2)"> - </core-animation-prop> - </core-animation-keyframe> - <core-animation-keyframe> - <core-animation-prop name="transform" value="scale(1)"> - </core-animation-prop> - </core-animation-keyframe> - </core-animation> - </core-animation-group> - - <core-animation id="custom-animation" duration="500">custom</core-animation> - - <core-animation duration="1000" iterations="Infinity" direction="alternate"> - infinite - <core-animation-keyframe> - <core-animation-prop name="opacity" value="1"> - </core-animation-prop> - </core-animation-keyframe> - <core-animation-keyframe> - <core-animation-prop name="opacity" value="0.3"> - </core-animation-prop> - </core-animation-keyframe> - </core-animation> -<!-- <polymer-bounce duration="1000">bounce</polymer-bounce> - <polymer-shake>shake</polymer-shake> - <polymer-flip>flip X</polymer-flip> - <polymer-flip axis="y">flip Y</polymer-flip> - <polymer-blink>blink</polymer-blink> - <polymer-fadein>fade in</polymer-fadein> - --> </div> - <script> - var customAnimationFn = function(timeFraction, target) { - if (timeFraction < 1) { - target.textContent = timeFraction; - } else { - target.textContent = 'animated!'; - } - }; - - document.addEventListener('polymer-ready', function() { - document.querySelector('.animations').addEventListener('click', - function(e) { - var animation = e.target; - if (animation.id === 'custom-animation') { - animation.customEffect = customAnimationFn; - } - animation.target = target; - animation.play(); - }); - document.getElementById('raw').addEventListener( - 'core-animation-finish', function(e) { - console.log('finish!'); - }); - }); - </script> - </body> -</html> diff --git a/third_party/polymer/components/core-animation/index.html b/third_party/polymer/components/core-animation/index.html deleted file mode 100644 index 6693d17..0000000 --- a/third_party/polymer/components/core-animation/index.html +++ /dev/null @@ -1,22 +0,0 @@ -<!doctype html> -<!-- -Copyright (c) 2014 The Polymer Project Authors. All rights reserved. -This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE -The complete set of authors may be found at http://polymer.github.io/AUTHORS -The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS -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 ---> -<html> -<head> - - <script src="../platform/platform.js"></script> - <link rel="import" href="../core-component-page/core-component-page.html"> - -</head> -<body unresolved> - - <core-component-page sources='["core-animation.html", "core-animation-group.html"]'></core-component-page> - -</body> -</html> diff --git a/third_party/polymer/components/core-animation/web-animations.html b/third_party/polymer/components/core-animation/web-animations.html deleted file mode 100644 index 4cdb1d2..0000000 --- a/third_party/polymer/components/core-animation/web-animations.html +++ /dev/null @@ -1 +0,0 @@ -<script src="../web-animations-js/web-animations.js"></script>
\ No newline at end of file diff --git a/third_party/polymer/components/core-collapse/.bower.json b/third_party/polymer/components/core-collapse/.bower.json deleted file mode 100644 index 87a0f81..0000000 --- a/third_party/polymer/components/core-collapse/.bower.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "name": "core-collapse", - "private": true, - "dependencies": { - "polymer": "Polymer/polymer#>=0.3.0 <1.0.0" - }, - "homepage": "https://github.com/Polymer/core-collapse", - "version": "0.3.5", - "_release": "0.3.5", - "_resolution": { - "type": "version", - "tag": "0.3.5", - "commit": "7a0b808dcfaf4c117dbc1bf0d02fa2b2d5c8e1e8" - }, - "_source": "git://github.com/Polymer/core-collapse.git", - "_target": "0.3.5", - "_originalSource": "Polymer/core-collapse" -}
\ No newline at end of file diff --git a/third_party/polymer/components/core-collapse/README.md b/third_party/polymer/components/core-collapse/README.md deleted file mode 100644 index bf0a159..0000000 --- a/third_party/polymer/components/core-collapse/README.md +++ /dev/null @@ -1,4 +0,0 @@ -core-collapse -============= - -See the [component page](http://polymer-project.org/docs/elements/core-elements.html#core-collapse) for more information. diff --git a/third_party/polymer/components/core-collapse/bower.json b/third_party/polymer/components/core-collapse/bower.json deleted file mode 100644 index 6aee2d1..0000000 --- a/third_party/polymer/components/core-collapse/bower.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "name": "core-collapse", - "private": true, - "dependencies": { - "polymer": "Polymer/polymer#>=0.3.0 <1.0.0" - } -}
\ No newline at end of file diff --git a/third_party/polymer/components/core-collapse/core-collapse.css b/third_party/polymer/components/core-collapse/core-collapse.css deleted file mode 100644 index 5e946ff..0000000 --- a/third_party/polymer/components/core-collapse/core-collapse.css +++ /dev/null @@ -1,16 +0,0 @@ -/* -Copyright (c) 2014 The Polymer Project Authors. All rights reserved. -This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt -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 -*/ - -html /deep/ core-collapse { - display: block; -} - -html /deep/ .core-collapse-closed { - display: none; -} diff --git a/third_party/polymer/components/core-collapse/core-collapse.html b/third_party/polymer/components/core-collapse/core-collapse.html deleted file mode 100644 index 494f764..0000000 --- a/third_party/polymer/components/core-collapse/core-collapse.html +++ /dev/null @@ -1,250 +0,0 @@ -<!-- -Copyright (c) 2014 The Polymer Project Authors. All rights reserved. -This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt -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 ---> - -<!-- -`core-collapse` creates a collapsible block of content. By default, the content -will be collapsed. Use `opened` to show/hide the content. - - <button on-click="{{toggle}}">toggle collapse</button> - - <core-collapse id="collapse"> - ... - </core-collapse> - - ... - - toggle: function() { - this.$.collapse.toggle(); - } - -@group Polymer Core Elements -@element core-collapse ---> - -<link rel="import" href="../polymer/polymer.html"> - -<link rel="stylesheet" href="core-collapse.css" shim-shadowdom> - -<polymer-element name="core-collapse" attributes="target horizontal opened duration fixedSize"> -<template> - - <content></content> - -</template> -<script> - - Polymer('core-collapse', { - /** - * Fired when the target element has been resized as a result of the opened - * state changing. - * - * @event core-resize - */ - - /** - * The target element. - * - * @attribute target - * @type object - * @default null - */ - target: null, - - /** - * If true, the orientation is horizontal; otherwise is vertical. - * - * @attribute horizontal - * @type boolean - * @default false - */ - horizontal: false, - - /** - * Set opened to true to show the collapse element and to false to hide it. - * - * @attribute opened - * @type boolean - * @default false - */ - opened: false, - - /** - * Collapsing/expanding animation duration in second. - * - * @attribute duration - * @type number - * @default 0.33 - */ - duration: 0.33, - - /** - * If true, the size of the target element is fixed and is set - * on the element. Otherwise it will try to - * use auto to determine the natural size to use - * for collapsing/expanding. - * - * @attribute fixedSize - * @type boolean - * @default false - */ - fixedSize: false, - - created: function() { - this.transitionEndListener = this.transitionEnd.bind(this); - }, - - ready: function() { - this.target = this.target || this; - }, - - domReady: function() { - this.async(function() { - this.afterInitialUpdate = true; - }); - }, - - detached: function() { - if (this.target) { - this.removeListeners(this.target); - } - }, - - targetChanged: function(old) { - if (old) { - this.removeListeners(old); - } - if (!this.target) { - return; - } - this.isTargetReady = !!this.target; - this.classList.toggle('core-collapse-closed', this.target !== this); - this.target.style.overflow = 'hidden'; - this.horizontalChanged(); - this.addListeners(this.target); - // set core-collapse-closed class initially to hide the target - this.toggleClosedClass(true); - this.update(); - }, - - addListeners: function(node) { - node.addEventListener('transitionend', this.transitionEndListener); - }, - - removeListeners: function(node) { - node.removeEventListener('transitionend', this.transitionEndListener); - }, - - horizontalChanged: function() { - this.dimension = this.horizontal ? 'width' : 'height'; - }, - - openedChanged: function() { - this.update(); - }, - - /** - * Toggle the opened state. - * - * @method toggle - */ - toggle: function() { - this.opened = !this.opened; - }, - - setTransitionDuration: function(duration) { - var s = this.target.style; - s.transition = duration ? (this.dimension + ' ' + duration + 's') : null; - if (duration === 0) { - this.async('transitionEnd'); - } - }, - - transitionEnd: function() { - if (this.opened && !this.fixedSize) { - this.updateSize('auto', null); - } - this.setTransitionDuration(null); - this.toggleClosedClass(!this.opened); - this.asyncFire('core-resize', null, this.target); - }, - - toggleClosedClass: function(closed) { - this.hasClosedClass = closed; - this.target.classList.toggle('core-collapse-closed', closed); - }, - - updateSize: function(size, duration, forceEnd) { - this.setTransitionDuration(duration); - this.calcSize(); - var s = this.target.style; - var nochange = s[this.dimension] === size; - s[this.dimension] = size; - // transitonEnd will not be called if the size has not changed - if (forceEnd && nochange) { - this.transitionEnd(); - } - }, - - update: function() { - if (!this.target) { - return; - } - if (!this.isTargetReady) { - this.targetChanged(); - } - this.horizontalChanged(); - this[this.opened ? 'show' : 'hide'](); - }, - - calcSize: function() { - return this.target.getBoundingClientRect()[this.dimension] + 'px'; - }, - - getComputedSize: function() { - return getComputedStyle(this.target)[this.dimension]; - }, - - show: function() { - this.toggleClosedClass(false); - // for initial update, skip the expanding animation to optimize - // performance e.g. skip calcSize - if (!this.afterInitialUpdate) { - this.transitionEnd(); - return; - } - if (!this.fixedSize) { - this.updateSize('auto', null); - var s = this.calcSize(); - this.updateSize(0, null); - } - this.async(function() { - this.updateSize(this.size || s, this.duration, true); - }); - }, - - hide: function() { - // don't need to do anything if it's already hidden - if (this.hasClosedClass && !this.fixedSize) { - return; - } - if (this.fixedSize) { - // save the size before hiding it - this.size = this.getComputedSize(); - } else { - this.updateSize(this.calcSize(), null); - } - this.async(function() { - this.updateSize(0, this.duration); - }); - } - - }); - -</script> -</polymer-element> diff --git a/third_party/polymer/components/core-collapse/demo.html b/third_party/polymer/components/core-collapse/demo.html deleted file mode 100644 index 8aec94d..0000000 --- a/third_party/polymer/components/core-collapse/demo.html +++ /dev/null @@ -1,84 +0,0 @@ -<!doctype html> -<html> -<head> - - <title>core-collapse</title> - - <script src="../platform/platform.js"></script> - - <link rel="import" href="core-collapse.html"> - - <style> - body { - overflow: auto; - margin: 8px 24px; - } - - - .box { - background: #eee; - } - - .content { - margin: 10px; - } - - section { - padding: 10px; - } - - </style> - -</head> -<body unresolved> - - <section style="background: steelblue;"> - - <button onclick="document.querySelector('#collapse1').toggle()">toggle collapse</button> - - <core-collapse id="collapse1" fixedSize class="box" style="height: 300px;"> - <div class="content">Forma temperiemque cornua sidera dissociata cornua recessit innabilis ligavit: solidumque coeptis nullus caelum sponte phoebe di regat mentisque tanta austro capacius amphitrite sui quin postquam semina fossae liquidum umor galeae coeptis caligine liberioris quin liquidum matutinis invasit posset: flexi glomeravit radiis certis invasit oppida postquam onerosior inclusum dominari opifex terris pace finxit quam aquae nunc sine altae auroram quam habentem homo totidemque scythiam in pondus ensis tegit caecoque poena lapidosos humanas coeperunt poena aetas totidem nec natura aethera locavit caelumque distinxit animalibus phoebe cingebant moderantum porrexerat terrae possedit sua sole diu summaque obliquis melioris orbem</div> - </core-collapse> - - </section> - - <section style="background: seagreen;"> - - <button onclick="document.querySelector('#collapse2').toggle()">toggle collapse</button> - - <core-collapse id="collapse2" class="box"> - - <div class="content">Coercuit iunctarum vix sic aberant spisso imagine litem cetera nubes ambitae tanta usu circumfuso fulminibus umentia rectumque iuga pluviaque meis semina regat ne campoque meis coeperunt nix cura iunctarum ligavit: secant ventos seductaque permisit sic iunctarum locoque his coeptis tum terras animalia recepta aethera cornua invasit tollere videre tonitrua humanas otia tuba alta dissociata sanctius adsiduis inclusum caesa ita onus sine pluviaque litem manebat fixo extendi ubi inposuit cum sublime membra undas orba forma deducite aethera turba coercuit retinebat obliquis bracchia nisi mentisque origine peregrinum manebat</div> - - <section style="background: lightgreen;"> - - <button onclick="document.querySelector('#collapse3').toggle()">toggle collapse</button> - - <core-collapse id="collapse3" class="box" opened> - - <div class="content">Forma temperiemque cornua sidera dissociata cornua recessit innabilis ligavit: solidumque coeptis nullus caelum sponte phoebe di regat mentisque tanta austro capacius amphitrite sui quin postquam semina fossae liquidum umor galeae coeptis caligine liberioris quin liquidum matutinis invasit posset: flexi glomeravit radiis certis invasit oppida postquam onerosior inclusum dominari opifex terris pace finxit quam aquae nunc sine altae auroram quam habentem homo totidemque scythiam in pondus ensis tegit caecoque poena lapidosos humanas coeperunt poena aetas totidem nec natura aethera locavit caelumque distinxit animalibus phoebe cingebant moderantum porrexerat terrae possedit sua sole diu summaque obliquis melioris orbem</div> - - <section style="background: #00FF99;"> - - <button onclick="document.querySelector('#collapse4').toggle()">toggle collapse</button> - - <core-collapse id="collapse4" class="box"> - - <div class="content">Forma temperiemque cornua sidera dissociata cornua recessit innabilis ligavit: solidumque coeptis nullus caelum sponte phoebe di regat mentisque tanta austro capacius amphitrite sui quin postquam semina fossae liquidum umor galeae coeptis caligine liberioris quin liquidum matutinis invasit posset: flexi glomeravit radiis certis invasit oppida postquam onerosior inclusum dominari opifex terris pace finxit quam aquae nunc sine altae auroram quam habentem homo totidemque scythiam in pondus ensis tegit caecoque poena lapidosos humanas coeperunt poena aetas totidem nec natura aethera locavit caelumque distinxit animalibus phoebe cingebant moderantum porrexerat terrae possedit sua sole diu summaque obliquis melioris orbem</div> - - </core-collapse> - - </section> - - </core-collapse> - - </section> - - <div class="content">Obstabatque cingebant nitidis rapidisque cepit moderantum discordia habentia frigore solidumque fert inter caecoque sine coeperunt corpore quarum fluminaque coercuit vultus animal austro quem os sectamque animus origo solidumque quoque melioris adspirate recepta utramque rapidisque caelumque orba unus pluviaque erant mutastis gravitate illic quisque alta calidis speciem mixtam ante contraria duae</div> - - </core-collapse> - - </section> - -</body> -</html> diff --git a/third_party/polymer/components/core-collapse/index.html b/third_party/polymer/components/core-collapse/index.html deleted file mode 100644 index 58856f3..0000000 --- a/third_party/polymer/components/core-collapse/index.html +++ /dev/null @@ -1,22 +0,0 @@ -<!doctype html> -<!-- -Copyright (c) 2014 The Polymer Project Authors. All rights reserved. -This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE -The complete set of authors may be found at http://polymer.github.io/AUTHORS -The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS -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 ---> -<html> -<head> - - <script src="../platform/platform.js"></script> - <link rel="import" href="../core-component-page/core-component-page.html"> - -</head> -<body unresolved> - - <core-component-page></core-component-page> - -</body> -</html> diff --git a/third_party/polymer/components/core-component-page/bowager-logo.png b/third_party/polymer/components/core-component-page/bowager-logo.png Binary files differdeleted file mode 100644 index 76be9fb..0000000 --- a/third_party/polymer/components/core-component-page/bowager-logo.png +++ /dev/null diff --git a/third_party/polymer/components/core-component-page/index.html b/third_party/polymer/components/core-component-page/index.html deleted file mode 100644 index 58856f3..0000000 --- a/third_party/polymer/components/core-component-page/index.html +++ /dev/null @@ -1,22 +0,0 @@ -<!doctype html> -<!-- -Copyright (c) 2014 The Polymer Project Authors. All rights reserved. -This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE -The complete set of authors may be found at http://polymer.github.io/AUTHORS -The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS -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 ---> -<html> -<head> - - <script src="../platform/platform.js"></script> - <link rel="import" href="../core-component-page/core-component-page.html"> - -</head> -<body unresolved> - - <core-component-page></core-component-page> - -</body> -</html> diff --git a/third_party/polymer/components/core-drag-drop/.bower.json b/third_party/polymer/components/core-drag-drop/.bower.json deleted file mode 100644 index 3769671..0000000 --- a/third_party/polymer/components/core-drag-drop/.bower.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "name": "core-drag-drop", - "homepage": "https://github.com/Polymer/core-drag-drop", - "version": "0.3.5", - "_release": "0.3.5", - "_resolution": { - "type": "version", - "tag": "0.3.5", - "commit": "972d6d04eaa25f38ab206392271a4a8988217e47" - }, - "_source": "git://github.com/Polymer/core-drag-drop.git", - "_target": "0.3.5", - "_originalSource": "Polymer/core-drag-drop" -}
\ No newline at end of file diff --git a/third_party/polymer/components/core-drag-drop/core-drag-drop.html b/third_party/polymer/components/core-drag-drop/core-drag-drop.html deleted file mode 100644 index ec3a3cd..0000000 --- a/third_party/polymer/components/core-drag-drop/core-drag-drop.html +++ /dev/null @@ -1,110 +0,0 @@ -<!-- -Copyright (c) 2014 The Polymer Project Authors. All rights reserved. -This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt -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 ---> - -<link rel="import" href="../polymer/polymer.html"> - -<style> - core-drag-avatar { - position: fixed; - left: 0; - top: 0; - display: block; - pointer-events: none; - } -</style> - -<!-- -@group Polymer Core Elements -@element core-drag-drop -@homepage github.io ---> - -<polymer-element name="core-drag-drop"> -<script> - - Polymer('core-drag-drop', { - - observe: { - 'x y': 'coordinatesChanged' - }, - - ready: function() { - if (!this.__proto__.avatar) { - this.__proto__.avatar = document.createElement('core-drag-avatar'); - document.body.appendChild(this.avatar); - } - this.dragging = false; - }, - - draggingChanged: function() { - this.avatar.style.display = this.dragging ? '' : 'none'; - }, - - coordinatesChanged: function() { - var x = this.x, y = this.y; - this.avatar.style.transform = - this.avatar.style.webkitTransform = - 'translate(' + x + 'px, ' + y + 'px)'; - }, - - attached: function() { - var listen = function(event, handler) { - Polymer.addEventListener(this.parentNode, event, this[handler].bind(this)); - }.bind(this); - // - listen('trackstart', 'trackStart'); - listen('track', 'track'); - listen('trackend', 'trackEnd'); - // - var host = this.parentNode.host || this.parentNode; - host.style.cssText += '; user-select: none; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none;'; - }, - - trackStart: function(event) { - this.avatar.style.cssText = ''; - this.dragInfo = { - event: event, - avatar: this.avatar - }; - this.fire('drag-start', this.dragInfo); - // flaw #1: what if user doesn't need `drag()`? - this.dragging = Boolean(this.dragInfo.drag); - }, - - track: function(event) { - if (this.dragging) { - this.x = event.pageX; - this.y = event.pageY; - this.dragInfo.event = event; - this.dragInfo.p = {x : this.x, y: this.y}; - this.dragInfo.drag(this.dragInfo); - } - }, - - trackEnd: function(event) { - if (this.dragging) { - this.dragging = false; - if (this.dragInfo.drop) { - this.dragInfo.framed = this.framed(event.relatedTarget); - this.dragInfo.event = event; - this.dragInfo.drop(this.dragInfo); - } - } - this.dragInfo = null; - }, - - framed: function(node) { - var local = node.getBoundingClientRect(); - return {x: this.x - local.left, y: this.y - local.top}; - } - - }); - -</script> -</polymer-element> diff --git a/third_party/polymer/components/core-drag-drop/demo.html b/third_party/polymer/components/core-drag-drop/demo.html deleted file mode 100644 index 387430e..0000000 --- a/third_party/polymer/components/core-drag-drop/demo.html +++ /dev/null @@ -1,93 +0,0 @@ -<!doctype html> -<html lang="en"> -<head> - - <meta charset="utf-8"> - <meta name="viewport" content="width=device-width, user-scalable=no"> - - <title>Core Drag Drop</title> - - <script src="../platform/platform.js"></script> - - <link rel="import" href="core-drag-drop.html"> - - <style> - - html { - font-family: 'Helvetica Neue', 'Roboto', 'Arial', sans-serif; - }
-
- body {
- height: 100vh;
- margin: 0;
- -webkit-user-select: none;
- -moz-user-select: none;
- -ms-user-select: none;
- } - - .box {
- display: inline-block;
- width: 100px;
- height: 100px;
- margin: 16px;
- } - - .dropped {
- position: absolute;
- border: 1px solid black;
- width: 5px;
- height: 5px;
- } - - </style> - -</head> -<body unresolved> - - <div style="border: 1px dotted silver;"> - - <core-drag-drop></core-drag-drop> - - <div class="box" style="background-color: lightblue;" draggable="false"></div> - - <div class="box" style="background-color: orange;" draggable="false"></div> - - <div class="box" style="background-color: lightgreen;" draggable="false"></div> - - <div id="hello">Hello World</div> - - </div> - - <br><br><br><br><br><br> - - <div id="drop" class="box" style="border: 3px solid silver; position: relative; width: 300px; height: 300px;" draggable="false"></div> - - <script> - addEventListener('drag-start', function(e) { - var dragInfo = e.detail; - // flaw #2: e vs dragInfo.event - var color = dragInfo.event.target.style.backgroundColor; - dragInfo.avatar.style.cssText = 'border: 3px solid ' + color + '; width: 32px; height: 32px; border-radius: 32px; background-color: whitesmoke'; - e.detail.avatar.appendChild(document.querySelector('#hello')); - dragInfo.drag = function() {}; - dragInfo.drop = drop; - }); - // - function drop(dragInfo) { - var color = dragInfo.avatar.style.borderColor; - var dropTarget = dragInfo.event.relatedTarget; - if (color && dropTarget.id === 'drop') { - var f = dragInfo.framed; - var d = document.createElement('div'); - d.className = 'dropped'; - d.style.left = f.x - 4 + 'px'; - d.style.top = f.y - 4 + 'px'; - d.style.backgroundColor = color; - dropTarget.appendChild(d); - dropTarget.style.backgroundColor = color; - } - } - </script> - -</body> -</html> diff --git a/third_party/polymer/components/core-drag-drop/index.html b/third_party/polymer/components/core-drag-drop/index.html deleted file mode 100644 index 58856f3..0000000 --- a/third_party/polymer/components/core-drag-drop/index.html +++ /dev/null @@ -1,22 +0,0 @@ -<!doctype html> -<!-- -Copyright (c) 2014 The Polymer Project Authors. All rights reserved. -This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE -The complete set of authors may be found at http://polymer.github.io/AUTHORS -The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS -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 ---> -<html> -<head> - - <script src="../platform/platform.js"></script> - <link rel="import" href="../core-component-page/core-component-page.html"> - -</head> -<body unresolved> - - <core-component-page></core-component-page> - -</body> -</html> diff --git a/third_party/polymer/components/core-drawer-panel/.bower.json b/third_party/polymer/components/core-drawer-panel/.bower.json deleted file mode 100644 index 0811395..0000000 --- a/third_party/polymer/components/core-drawer-panel/.bower.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "name": "core-drawer-panel", - "private": true, - "dependencies": { - "core-selector": "Polymer/core-selector#>=0.3.0 <1.0.0", - "core-media-query": "Polymer/core-media-query#>=0.3.0 <1.0.0" - }, - "homepage": "https://github.com/Polymer/core-drawer-panel", - "version": "0.3.5", - "_release": "0.3.5", - "_resolution": { - "type": "version", - "tag": "0.3.5", - "commit": "1ddf02182a57786bb97764dcabf05dee7fcac288" - }, - "_source": "git://github.com/Polymer/core-drawer-panel.git", - "_target": "0.3.5", - "_originalSource": "Polymer/core-drawer-panel" -}
\ No newline at end of file diff --git a/third_party/polymer/components/core-drawer-panel/README.md b/third_party/polymer/components/core-drawer-panel/README.md deleted file mode 100644 index 16ee436..0000000 --- a/third_party/polymer/components/core-drawer-panel/README.md +++ /dev/null @@ -1,4 +0,0 @@ -core-drawer-panel -================== - -See the [component page](http://polymer-project.org/docs/elements/core-elements.html#core-drawer-panel) for more information. diff --git a/third_party/polymer/components/core-drawer-panel/bower.json b/third_party/polymer/components/core-drawer-panel/bower.json deleted file mode 100644 index a53e2a7..0000000 --- a/third_party/polymer/components/core-drawer-panel/bower.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "name": "core-drawer-panel", - "private": true, - "dependencies": { - "core-selector": "Polymer/core-selector#>=0.3.0 <1.0.0", - "core-media-query": "Polymer/core-media-query#>=0.3.0 <1.0.0" - } -}
\ No newline at end of file diff --git a/third_party/polymer/components/core-drawer-panel/core-drawer-panel.css b/third_party/polymer/components/core-drawer-panel/core-drawer-panel.css deleted file mode 100644 index 62cf44b..0000000 --- a/third_party/polymer/components/core-drawer-panel/core-drawer-panel.css +++ /dev/null @@ -1,146 +0,0 @@ -/* -Copyright (c) 2014 The Polymer Project Authors. All rights reserved. -This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt -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 -*/ - -:host { - display: block; - position: absolute; - top: 0; - left: 0; - width: 100%; - height: 100%; - overflow: hidden; -} - -#drawer { - position: absolute; - top: 0; - left: 0; - height: 100%; - box-sizing: border-box; - -mox-box-sizing: border-box; -} - -.transition #drawer { - transition: -webkit-transform ease-in-out 0.3s, width ease-in-out 0.3s; - transition: transform ease-in-out 0.3s, width ease-in-out 0.3s; -} - -/* -right-drawer: make drawer on the right side -*/ -.right-drawer #drawer { - left: auto; - right: 0; -} - -.right-drawer.transition #drawer { - transition: -webkit-transform ease-in-out 0.3s, width ease-in-out 0.3s; - transition: transform ease-in-out 0.3s, width ease-in-out 0.3s; -} - -polyfill-next-selector { content: ':host [drawer]'; } -::content[select="[drawer]"] > * { - position: absolute; - top: 0; - left: 0; - width: 100%; - height: 100%; - box-sizing: border-box; - -moz-box-sizing: border-box; -} - -#main { - position: absolute; - top: 0; - right: 0; - bottom: 0; -} - -.transition #main { - transition: left ease-in-out 0.3s, padding ease-in-out 0.3s; -} - -.right-drawer #main { - left: 0; -} - -.right-drawer.transition #main { - transition: right ease-in-out 0.3s, padding ease-in-out 0.3s; -} - -polyfill-next-selector { content: '#main > [main]'; } -::content[select="[main]"] > * { - height: 100%; -} - -#scrim { - position: absolute; - top: 0; - right: 0; - bottom: 0; - left: 0; - background-color: rgba(0, 0, 0, 0.3); - visibility: hidden; - opacity: 0; - transition: opacity ease-in-out 0.38s, visibility ease-in-out 0.38s; -} - -/* -narrow layout -*/ -.narrow-layout > #drawer.core-selected { - box-shadow: 2px 2px 4px rgba(0, 0, 0, 0.15); -} - -.right-drawer.narrow-layout > #drawer.core-selected { - box-shadow: -2px 2px 4px rgba(0, 0, 0, 0.15); -} - -polyfill-next-selector { content: ':host .narrow-layout > #drawer > [drawer]'; } -.narrow-layout > #drawer > ::content[select="[drawer]"] > * { - border: 0; -} - -.narrow-layout > #drawer:not(.core-selected) { - -webkit-transform: translate3d(-100%, 0, 0); - transform: translate3d(-100%, 0, 0); -} - -.right-drawer.narrow-layout > #drawer:not(.core-selected) { - left: auto; - -webkit-transform: translate3d(100%, 0, 0); - transform: translate3d(100%, 0, 0); -} - -.narrow-layout > #main { - left: 0 !important; - padding: 0; -} - -.right-drawer.narrow-layout > #main { - left: 0; - right: 0; - padding: 0; -} - -.narrow-layout > #main:not(.core-selected) #scrim, -.dragging #scrim { - visibility: visible; - opacity: 1; -} - -polyfill-next-selector { content: ':host .narrow-layout > #main > [main]'; } -.narrow-layout > #main > ::content[select="[main]"] > * { - margin: 0; - min-height: 100%; - left: 0; - right: 0; - box-sizing: border-box; - -moz-box-sizing: border-box; -} diff --git a/third_party/polymer/components/core-drawer-panel/core-drawer-panel.html b/third_party/polymer/components/core-drawer-panel/core-drawer-panel.html deleted file mode 100644 index bd68d94..0000000 --- a/third_party/polymer/components/core-drawer-panel/core-drawer-panel.html +++ /dev/null @@ -1,273 +0,0 @@ -<!-- -Copyright (c) 2014 The Polymer Project Authors. All rights reserved. -This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt -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 ---> - -<!-- -`core-drawer-panel` contains a drawer panel and a main panel. The drawer -and the main panel are side-by-side with drawer on the left. When browser -window size is smaller than the `responsiveWidth`, `core-drawer-panel` -changes to narrow layout. In narrow layout, the drawer will be stacked on top -of the main panel. The drawer will be slided in/out to hide/reveal the main -panel. - -Use the attribute `drawer` to indicate the element is a drawer panel and -`main` to indicate is a main panel. - -Example: - - <core-drawer-panel> - <div drawer> Drawer panel... </div> - <div main> Main panel... </div> - </core-drawer-panel> - -The drawer and the main panels are not scrollable. You can set CSS overflow -property on the elements to make them scrollable or use `core-header-panel`. - -Example: - - <core-drawer-panel> - <core-header-panel drawer> - <core-toolbar></core-toolbar> - <div> Drawer content... </div> - </core-header-panel> - <core-header-panel main> - <core-toolbar></core-toolbar> - <div> Main content... </div> - </core-header-panel> - </core-drawer-panel> - -To position the drawer to the right, add `rightDrawer` attribute. - - <core-drawer-panel rightDrawer> - <div drawer> Drawer panel... </div> - <div main> Main panel... </div> - </core-drawer-panel> - -@group Polymer Core Elements -@element core-drawer-panel -@homepage github.io ---> - -<link rel="import" href="../core-media-query/core-media-query.html"> -<link rel="import" href="../core-selector/core-selector.html"> - -<polymer-element name="core-drawer-panel" touch-action="auto"> -<template> - - <link rel="stylesheet" href="core-drawer-panel.css"> - - <core-media-query query="max-width: {{responsiveWidth}}" queryMatches="{{queryMatches}}"></core-media-query> - - <core-selector class="{{ {'narrow-layout' : queryMatches, transition : transition, dragging : dragging, 'right-drawer': rightDrawer} | tokenList }}" valueattr="id" selected="{{selected}}"> - - <div id="main" _style="left: {{ narrow || rightDrawer ? '0' : drawerWidth }}; right: {{ rightDrawer ? (narrow ? '' : drawerWidth) : '' }};"> - <content select="[main]"></content> - <div id="scrim" on-tap="{{togglePanel}}"></div> - </div> - - <div id="drawer" _style="width: {{ drawerWidth }}"> - <content select="[drawer]"></content> - </div> - - </core-selector> - -</template> -<script> - - Polymer('core-drawer-panel', { - /** - * Fired when the narrow layout changes. - * - * @event core-responsive-change - * @param {Object} detail - * @param {boolean} detail.narrow true if the panel is in narrow layout. - */ - - publish: { - - /** - * Width of the drawer panel. - * - * @attribute drawerWidth - * @type string - * @default '256px' - */ - drawerWidth: '256px', - - /** - * Max-width when the panel changes to narrow layout. - * - * @attribute responsiveWidth - * @type string - * @default '640px' - */ - responsiveWidth: '640px', - - /** - * The panel that is being selected. `drawer` for the drawer panel and - * `main` for the main panel. - * - * @attribute selected - * @type string - * @default null - */ - selected: {value: null, reflect: true}, - - /** - * The panel to be selected when `core-drawer-panel` changes to narrow - * layout. - * - * @attribute defaultSelected - * @type string - * @default 'main' - */ - defaultSelected: 'main', - - /** - * Returns true if the panel is in narrow layout. This is useful if you - * need to show/hide elements based on the layout. - * - * @attribute narrow - * @type boolean - * @default false - */ - narrow: {value: false, reflect: true}, - - /** - * If true, position the drawer to the right. - * - * @attribute rightDrawer - * @type boolean - * @default false - */ - rightDrawer: false, - - /** - * If true, swipe to open/close the drawer is disabled. - * - * @attribute disableSwipe - * @type boolean - * @default false - */ - disableSwipe: false - }, - - eventDelegates: { - trackstart: 'trackStart', - trackx: 'trackx', - trackend: 'trackEnd' - }, - - transition: false, - - edgeSwipeSensitivity : 15, - - dragging : false, - - domReady: function() { - // to avoid transition at the beginning e.g. page loads - // NOTE: domReady is already raf delayed and delaying another frame - // ensures a layout has occurred. - this.async(function() { - this.transition = true; - }); - }, - - /** - * Toggles the panel open and closed. - * - * @method togglePanel - */ - togglePanel: function() { - this.selected = this.selected === 'main' ? 'drawer' : 'main'; - }, - - /** - * Opens the drawer. - * - * @method openDrawer - */ - openDrawer: function() { - this.selected = 'drawer'; - }, - - /** - * Closes the drawer. - * - * @method closeDrawer - */ - closeDrawer: function() { - this.selected = 'main'; - }, - - queryMatchesChanged: function() { - if (this.queryMatches) { - this.selected = this.defaultSelected; - } - this.narrow = this.queryMatches; - this.setAttribute('touch-action', - this.narrow && !this.disableSwipe ? 'pan-y' : ''); - this.fire('core-responsive-change', {narrow: this.narrow}); - }, - - // swipe support for the drawer, inspired by - // https://github.com/Polymer/core-drawer-panel/pull/6 - trackStart : function(e) { - if (this.narrow && !this.disableSwipe) { - this.dragging = true; - - if (this.selected === 'main') { - this.dragging = this.rightDrawer ? - e.pageX >= this.offsetWidth - this.edgeSwipeSensitivity : - e.pageX <= this.edgeSwipeSensitivity; - } - - if (this.dragging) { - this.width = this.$.drawer.offsetWidth; - this.transition = false; - e.preventTap(); - } - } - }, - - trackx : function(e) { - if (this.dragging) { - var x; - if (this.rightDrawer) { - x = Math.max(0, (this.selected === 'main') ? this.width + e.dx : e.dx); - } else { - x = Math.min(0, (this.selected === 'main') ? e.dx - this.width : e.dx); - } - this.moveDrawer(x); - } - }, - - trackEnd : function(e) { - if (this.dragging) { - this.dragging = false; - this.transition = true; - this.moveDrawer(null); - - if (this.rightDrawer) { - this.selected = e.xDirection > 0 ? 'main' : 'drawer'; - } else { - this.selected = e.xDirection > 0 ? 'drawer' : 'main'; - } - } - }, - - moveDrawer: function(translateX) { - var s = this.$.drawer.style; - s.webkitTransform = s.transform = - translateX === null ? '' : 'translate3d(' + translateX + 'px, 0, 0)'; - } - - }); - -</script> -</polymer-element> diff --git a/third_party/polymer/components/core-drawer-panel/demo.html b/third_party/polymer/components/core-drawer-panel/demo.html deleted file mode 100644 index b35febf..0000000 --- a/third_party/polymer/components/core-drawer-panel/demo.html +++ /dev/null @@ -1,73 +0,0 @@ -<!doctype html> -<!-- -Copyright (c) 2014 The Polymer Project Authors. All rights reserved. -This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt -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 ---> -<html> - <head> - <title>core-drawer-panel</title> - - <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0"> - <meta name="mobile-web-app-capable" content="yes"> - <meta name="apple-mobile-web-app-capable" content="yes"> - - <script src="../platform/platform.js"></script> - - <link rel="import" href="core-drawer-panel.html"> - - <style> - - html, body { - height: 100%; - } - - body { - font-family: sans-serif; - color: #FFF; - margin: 0; - } - - [drawer] { - background-color: #B99588; - border-right: 1px solid #ccc; - } - - [main] { - height: 100%; - background-color: #4F7DC9; - } - - button { - display: none; - width: 160px; - height: 40px; - font-size: 16px; - margin: 8px; - } - - core-drawer-panel[narrow] button { - display: inline-block - } - - </style> - - </head> - - <body unresolved> - - <core-drawer-panel> - - <div drawer></div> - - <div main> - <button onclick="document.querySelector('core-drawer-panel').togglePanel();">toggle drawer</button> - </div> - - </core-drawer-panel> - - </body> -</html> diff --git a/third_party/polymer/components/core-drawer-panel/index.html b/third_party/polymer/components/core-drawer-panel/index.html deleted file mode 100644 index 58856f3..0000000 --- a/third_party/polymer/components/core-drawer-panel/index.html +++ /dev/null @@ -1,22 +0,0 @@ -<!doctype html> -<!-- -Copyright (c) 2014 The Polymer Project Authors. All rights reserved. -This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE -The complete set of authors may be found at http://polymer.github.io/AUTHORS -The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS -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 ---> -<html> -<head> - - <script src="../platform/platform.js"></script> - <link rel="import" href="../core-component-page/core-component-page.html"> - -</head> -<body unresolved> - - <core-component-page></core-component-page> - -</body> -</html> diff --git a/third_party/polymer/components/core-drawer-panel/metadata.html b/third_party/polymer/components/core-drawer-panel/metadata.html deleted file mode 100644 index 086d2db..0000000 --- a/third_party/polymer/components/core-drawer-panel/metadata.html +++ /dev/null @@ -1,28 +0,0 @@ -<x-meta id="section" label="Section" isContainer group="Core"> - - <template> - - <section style="width: 200px; height: 300px;" layout vertical></section> - - </template> - -</x-meta> - -<x-meta id="core-drawer-panel" label="Drawer Panel" isContainer group="Core"> - - <template> - - <core-drawer-panel style="position: absolute; top: 0; right: 0; bottom: 0; left: 0;"> - <section drawer style="background-color: #fafafa; box-shadow: rgba(0, 0, 0, 0.098) 0px 2px 4px, rgba(0, 0, 0, 0.098) 0px 0px 3px;"></section> - <section main style="height: 100%; box-sizing: border-box; background-color: #ddd"></section> - </core-drawer-panel> - - </template> - - <template id="imports"> - - <link rel="import" href="core-drawer-panel.html"> - - </template> - -</x-meta>
\ No newline at end of file diff --git a/third_party/polymer/components/core-dropdown/.bower.json b/third_party/polymer/components/core-dropdown/.bower.json deleted file mode 100644 index 7f671db..0000000 --- a/third_party/polymer/components/core-dropdown/.bower.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "name": "core-dropdown", - "private": false, - "dependencies": { - "polymer": "Polymer/polymer#>=0.3.0 <1.0.0", - "core-icon": "Polymer/core-icon#>=0.3.0 <1.0.0", - "core-icons": "Polymer/core-icon#>=0.3.0 <1.0.0", - "core-item": "Polymer/core-item#>=0.3.0 <1.0.0", - "core-menu": "Polymer/core-menu#>=0.3.0 <1.0.0", - "core-overlay": "Polymer/core-overlay" - }, - "homepage": "https://github.com/Polymer/core-dropdown", - "version": "0.3.5", - "_release": "0.3.5", - "_resolution": { - "type": "version", - "tag": "0.3.5", - "commit": "9fff79ebe5f462917fc466a2d9bc7eeb403b9bb3" - }, - "_source": "git://github.com/Polymer/core-dropdown.git", - "_target": "0.3.5", - "_originalSource": "Polymer/core-dropdown" -}
\ No newline at end of file diff --git a/third_party/polymer/components/core-dropdown/README.md b/third_party/polymer/components/core-dropdown/README.md deleted file mode 100644 index 8344443..0000000 --- a/third_party/polymer/components/core-dropdown/README.md +++ /dev/null @@ -1,6 +0,0 @@ -core-dropdown -============= - -owner: @morethanreal - -See the [component page](http://polymer-project.org/docs/elements/core-elements.html#core-dropdown) for more information. diff --git a/third_party/polymer/components/core-dropdown/bower.json b/third_party/polymer/components/core-dropdown/bower.json deleted file mode 100644 index cd36db2..0000000 --- a/third_party/polymer/components/core-dropdown/bower.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "name": "core-dropdown", - "private": false, - "dependencies": { - "polymer": "Polymer/polymer#>=0.3.0 <1.0.0", - "core-icon": "Polymer/core-icon#>=0.3.0 <1.0.0", - "core-icons": "Polymer/core-icon#>=0.3.0 <1.0.0", - "core-item": "Polymer/core-item#>=0.3.0 <1.0.0", - "core-menu": "Polymer/core-menu#>=0.3.0 <1.0.0", - "core-overlay": "Polymer/core-overlay" - } -}
\ No newline at end of file diff --git a/third_party/polymer/components/core-dropdown/core-dropdown.css b/third_party/polymer/components/core-dropdown/core-dropdown.css deleted file mode 100644 index ea2a6e3..0000000 --- a/third_party/polymer/components/core-dropdown/core-dropdown.css +++ /dev/null @@ -1,36 +0,0 @@ -:host { - position: relative; - display: inline-block; - background-color: #fff; -} - -#control core-item { - margin-left: 12px; - max-width: inherit; -} - -#control core-item::shadow #label { - overflow: hidden; - /* FIXME not working for some reason */ - white-space: nowrap; - text-overflow: ellipsis; -} - -#arrow { - margin: 0 12px; -} - -#menu { - position: absolute; - left: 0; - margin: 0; - padding: 0 12px; - overflow: scroll; - -webkit-overflow-scrolling: touch; - background-color: #fff; -} - -:host([halign="right"]) #menu { - left: auto; - right: 0; -} diff --git a/third_party/polymer/components/core-dropdown/core-dropdown.html b/third_party/polymer/components/core-dropdown/core-dropdown.html deleted file mode 100644 index 1c5ecb7..0000000 --- a/third_party/polymer/components/core-dropdown/core-dropdown.html +++ /dev/null @@ -1,204 +0,0 @@ -<!-- -Copyright (c) 2014 The Polymer Project Authors. All rights reserved. -This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt -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 ---> - -<!-- - -`core-dropdown` is a control where the user can choose from an array of options in a drop-down -menu. The currently selected option is displayed in the control. - -Example: - - <core-dropdown selected="Financier" valueattr="label"> - <core-item label="Croissant"></core-item> - <core-item label="Donut"></core-item> - <core-item label="Financier"></core-item> - <core-item label="Madeleine"></core-item> - </core-dropdown> - -This example renders a drop-down menu with 4 options, with the option `Financier` pre-selected. - -Theming -------- - -Style the drop-down menu with the `core-dropdown::shadow #menu` selector. - -Example: - - core-dropdown::shadow #menu { - background-color: #eee; - border: 1px solid #ccc; - } - -@group Polymer Core Elements -@element core-dropdown -@status beta -@homepage github.io ---> - -<!-- -Fired when an item's selection state is changed. This event is fired both -when an item is selected or deselected. The `isSelected` detail property -contains the selection state. - -@event core-select -@param {Object} detail - @param {boolean} detail.isSelected true for selection and false for deselection - @param {Object} detail.item the item element ---> -<link href="../polymer/polymer.html" rel="import"> -<link href="../core-icon/core-icon.html" rel="import"> -<link href="../core-icons/core-icons.html" rel="import"> -<link href="../core-item/core-item.html" rel="import"> -<link href="../core-menu/core-menu.html" rel="import"> -<link href="../core-overlay/core-overlay.html" rel="import"> - -<polymer-element name="core-dropdown"> -<template> - - <link href="core-dropdown.css" rel="stylesheet"> - - <div id="control" layout horizontal center on-tap="{{toggle}}"> - <core-item flex src="{{selectedItem.src}}" icon="{{selectedItem.icon}}" label="{{selectedItem ? selectedItem.label : label}}"></core-item> - <core-icon id="arrow" icon="{{opened ? 'arrow-drop-up' : 'arrow-drop-down'}}"></core-icon> - </div> - - <core-overlay target="{{$.menu}}" opened="{{opened}}" on-core-overlay-open="{{openAction}}"></core-overlay> - - <core-menu id="menu" selected="{{selected}}" selectedItem="{{selectedItem}}" selectedClass="{{selectedClass}}" valueattr="{{valueattr}}" selectedProperty="{{selectedProperty}}" selectedAttribute="{{selectedAttribute}}" on-core-select="{{selectAction}}"> - <content select="*"></content> - </core-menu> - -</template> -<script> - - Polymer({ - - publish: { - - /** - * True if the menu is open. - * - * @attribute opened - * @type boolean - * @default false - */ - opened: false, - - /** - * A label for the control. The label is displayed if no item is selected. - * - * @attribute label - * @type string - * @default 'Select an item' - */ - label: 'Select an item', - - /** - * The currently selected element. By default this is the index of the item element. - * If you want a specific attribute value of the element to be used instead of the - * index, set `valueattr` to that attribute name. - * - * @attribute selected - * @type Object - * @default null - */ - selected: null, - - /** - * Specifies the attribute to be used for "selected" attribute. - * - * @attribute valueattr - * @type string - * @default 'name' - */ - valueattr: 'name', - - /** - * Specifies the CSS class to be used to add to the selected element. - * - * @attribute selectedClass - * @type string - * @default 'core-selected' - */ - selectedClass: 'core-selected', - - /** - * Specifies the property to be used to set on the selected element - * to indicate its active state. - * - * @attribute selectedProperty - * @type string - * @default '' - */ - selectedProperty: '', - - /** - * Specifies the attribute to set on the selected element to indicate - * its active state. - * - * @attribute selectedAttribute - * @type string - * @default 'active' - */ - selectedAttribute: 'selected', - - /** - * The currently selected element. - * - * @attribute selectedItem - * @type Object - * @default null - */ - selectedItem: null, - - /** - * Horizontally align the overlay with the control. - * @attribute halign - * @type "left"|"right" - * @default "left" - */ - halign: {value: 'left', reflect: true}, - - /** - * Vertically align the dropdown menu with the control. - * @attribute valign - * @type "top"|"bottom" - * @default "bottom" - */ - valign: {value: 'bottom', reflect: true} - - }, - - toggle: function() { - this.opened = !this.opened; - }, - - openAction: function(e) { - if (e.detail) { - var rect = this.$.control.getBoundingClientRect(); - if (this.valign === 'top') { - this.$.menu.style.top = 'auto'; - this.$.menu.style.bottom = rect.height + 'px'; - this.$.menu.style.maxHeight = (window.innerHeight - (window.innerHeight - rect.top) - 12) + 'px'; - } else { - this.$.menu.style.top = rect.height + 'px'; - this.$.menu.style.bottom = 'auto'; - this.$.menu.style.maxHeight = (window.innerHeight - rect.height - rect.top - 12) + 'px'; - } - this.$.menu.style.minWidth = rect.width + 'px'; - } - }, - - selectAction: function() { - this.opened = false; - } - }); - -</script> -</polymer-element>
\ No newline at end of file diff --git a/third_party/polymer/components/core-dropdown/demo.html b/third_party/polymer/components/core-dropdown/demo.html deleted file mode 100644 index 2892df4..0000000 --- a/third_party/polymer/components/core-dropdown/demo.html +++ /dev/null @@ -1,349 +0,0 @@ -<!doctype html> -<!-- -Copyright 2013 The Polymer Authors. All rights reserved. -Use of this source code is governed by a BSD-style -license that can be found in the LICENSE file. ---> -<html> -<head> - - <meta charset="utf-8"> - <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> - <meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no"> - - <title>core-dropdown</title> - - <script src="../platform/platform.js"></script> - - <link href="core-dropdown.html" rel="import"> - - <style shim-shadowdom> - html, body { - height: 100%; - } - - dropdown-demo { - display: block; - } - - dropdown-demo::shadow > section { - padding: 12px; - } - - body /deep/ core-dropdown { - background-color: #eee; - } - - body /deep/ core-dropdown.narrow { - max-width: 100px; - } - - body /deep/ core-dropdown::shadow #menu { - background-color: #eee; - border: 1px solid #ccc; - } - </style> - -</head> -<body unresolved> - - <polymer-element name="dropdown-demo"> - <template> - <section layout vertical fit> - <section layout horizontal> - - <core-dropdown> - <template repeat="{{countries}}"> - <core-item label="{{name}}"></core-item> - </template> - </core-dropdown> - - <div style="margin:0 12px;"> - narrow: - <core-dropdown class="narrow"> - <template repeat="{{countries}}"> - <core-item label="{{name}}"></core-item> - </template> - </core-dropdown> - </div> - - <div flex></div> - - <core-dropdown halign="right"> - <template repeat="{{countries}}"> - <core-item label="{{name}}"></core-item> - </template> - </core-dropdown> - - </section> - - <div flex></div> - - <section> - drop-up: - <core-dropdown valign="top" valueattr="label" selected="Donut"> - <core-item label="Croissant"></core-item> - <core-item label="Donut"></core-item> - <core-item label="Financier"></core-item> - <core-item label="Madeleine"></core-item> - </core-dropdown> - </section> - - </section> - - </template> - <script> - Polymer('dropdown-demo', { - countries: [ - {name: 'Afghanistan', code: 'AF'}, - {name: 'Ã…land Islands', code: 'AX'}, - {name: 'Albania', code: 'AL'}, - {name: 'Algeria', code: 'DZ'}, - {name: 'American Samoa', code: 'AS'}, - {name: 'Andorra', code: 'AD'}, - {name: 'Angola', code: 'AO'}, - {name: 'Anguilla', code: 'AI'}, - {name: 'Antarctica', code: 'AQ'}, - {name: 'Antigua and Barbuda', code: 'AG'}, - {name: 'Argentina', code: 'AR'}, - {name: 'Armenia', code: 'AM'}, - {name: 'Aruba', code: 'AW'}, - {name: 'Australia', code: 'AU'}, - {name: 'Austria', code: 'AT'}, - {name: 'Azerbaijan', code: 'AZ'}, - {name: 'Bahamas', code: 'BS'}, - {name: 'Bahrain', code: 'BH'}, - {name: 'Bangladesh', code: 'BD'}, - {name: 'Barbados', code: 'BB'}, - {name: 'Belarus', code: 'BY'}, - {name: 'Belgium', code: 'BE'}, - {name: 'Belize', code: 'BZ'}, - {name: 'Benin', code: 'BJ'}, - {name: 'Bermuda', code: 'BM'}, - {name: 'Bhutan', code: 'BT'}, - {name: 'Bolivia', code: 'BO'}, - {name: 'Bosnia and Herzegovina', code: 'BA'}, - {name: 'Botswana', code: 'BW'}, - {name: 'Bouvet Island', code: 'BV'}, - {name: 'Brazil', code: 'BR'}, - {name: 'British Indian Ocean Territory', code: 'IO'}, - {name: 'Brunei Darussalam', code: 'BN'}, - {name: 'Bulgaria', code: 'BG'}, - {name: 'Burkina Faso', code: 'BF'}, - {name: 'Burundi', code: 'BI'}, - {name: 'Cambodia', code: 'KH'}, - {name: 'Cameroon', code: 'CM'}, - {name: 'Canada', code: 'CA'}, - {name: 'Cape Verde', code: 'CV'}, - {name: 'Cayman Islands', code: 'KY'}, - {name: 'Central African Republic', code: 'CF'}, - {name: 'Chad', code: 'TD'}, - {name: 'Chile', code: 'CL'}, - {name: 'China', code: 'CN'}, - {name: 'Christmas Island', code: 'CX'}, - {name: 'Cocos (Keeling) Islands', code: 'CC'}, - {name: 'Colombia', code: 'CO'}, - {name: 'Comoros', code: 'KM'}, - {name: 'Congo', code: 'CG'}, - {name: 'Congo, The Democratic Republic of the', code: 'CD'}, - {name: 'Cook Islands', code: 'CK'}, - {name: 'Costa Rica', code: 'CR'}, - {name: 'Cote D\'Ivoire', code: 'CI'}, - {name: 'Croatia', code: 'HR'}, - {name: 'Cuba', code: 'CU'}, - {name: 'Cyprus', code: 'CY'}, - {name: 'Czech Republic', code: 'CZ'}, - {name: 'Denmark', code: 'DK'}, - {name: 'Djibouti', code: 'DJ'}, - {name: 'Dominica', code: 'DM'}, - {name: 'Dominican Republic', code: 'DO'}, - {name: 'Ecuador', code: 'EC'}, - {name: 'Egypt', code: 'EG'}, - {name: 'El Salvador', code: 'SV'}, - {name: 'Equatorial Guinea', code: 'GQ'}, - {name: 'Eritrea', code: 'ER'}, - {name: 'Estonia', code: 'EE'}, - {name: 'Ethiopia', code: 'ET'}, - {name: 'Falkland Islands (Malvinas)', code: 'FK'}, - {name: 'Faroe Islands', code: 'FO'}, - {name: 'Fiji', code: 'FJ'}, - {name: 'Finland', code: 'FI'}, - {name: 'France', code: 'FR'}, - {name: 'French Guiana', code: 'GF'}, - {name: 'French Polynesia', code: 'PF'}, - {name: 'French Southern Territories', code: 'TF'}, - {name: 'Gabon', code: 'GA'}, - {name: 'Gambia', code: 'GM'}, - {name: 'Georgia', code: 'GE'}, - {name: 'Germany', code: 'DE'}, - {name: 'Ghana', code: 'GH'}, - {name: 'Gibraltar', code: 'GI'}, - {name: 'Greece', code: 'GR'}, - {name: 'Greenland', code: 'GL'}, - {name: 'Grenada', code: 'GD'}, - {name: 'Guadeloupe', code: 'GP'}, - {name: 'Guam', code: 'GU'}, - {name: 'Guatemala', code: 'GT'}, - {name: 'Guernsey', code: 'GG'}, - {name: 'Guinea', code: 'GN'}, - {name: 'Guinea-Bissau', code: 'GW'}, - {name: 'Guyana', code: 'GY'}, - {name: 'Haiti', code: 'HT'}, - {name: 'Heard Island and Mcdonald Islands', code: 'HM'}, - {name: 'Holy See (Vatican City State)', code: 'VA'}, - {name: 'Honduras', code: 'HN'}, - {name: 'Hong Kong', code: 'HK'}, - {name: 'Hungary', code: 'HU'}, - {name: 'Iceland', code: 'IS'}, - {name: 'India', code: 'IN'}, - {name: 'Indonesia', code: 'ID'}, - {name: 'Iran, Islamic Republic Of', code: 'IR'}, - {name: 'Iraq', code: 'IQ'}, - {name: 'Ireland', code: 'IE'}, - {name: 'Isle of Man', code: 'IM'}, - {name: 'Israel', code: 'IL'}, - {name: 'Italy', code: 'IT'}, - {name: 'Jamaica', code: 'JM'}, - {name: 'Japan', code: 'JP'}, - {name: 'Jersey', code: 'JE'}, - {name: 'Jordan', code: 'JO'}, - {name: 'Kazakhstan', code: 'KZ'}, - {name: 'Kenya', code: 'KE'}, - {name: 'Kiribati', code: 'KI'}, - {name: 'Korea, Democratic People\'S Republic of', code: 'KP'}, - {name: 'Korea, Republic of', code: 'KR'}, - {name: 'Kuwait', code: 'KW'}, - {name: 'Kyrgyzstan', code: 'KG'}, - {name: 'Lao People\'S Democratic Republic', code: 'LA'}, - {name: 'Latvia', code: 'LV'}, - {name: 'Lebanon', code: 'LB'}, - {name: 'Lesotho', code: 'LS'}, - {name: 'Liberia', code: 'LR'}, - {name: 'Libyan Arab Jamahiriya', code: 'LY'}, - {name: 'Liechtenstein', code: 'LI'}, - {name: 'Lithuania', code: 'LT'}, - {name: 'Luxembourg', code: 'LU'}, - {name: 'Macao', code: 'MO'}, - {name: 'Macedonia, The Former Yugoslav Republic of', code: 'MK'}, - {name: 'Madagascar', code: 'MG'}, - {name: 'Malawi', code: 'MW'}, - {name: 'Malaysia', code: 'MY'}, - {name: 'Maldives', code: 'MV'}, - {name: 'Mali', code: 'ML'}, - {name: 'Malta', code: 'MT'}, - {name: 'Marshall Islands', code: 'MH'}, - {name: 'Martinique', code: 'MQ'}, - {name: 'Mauritania', code: 'MR'}, - {name: 'Mauritius', code: 'MU'}, - {name: 'Mayotte', code: 'YT'}, - {name: 'Mexico', code: 'MX'}, - {name: 'Micronesia, Federated States of', code: 'FM'}, - {name: 'Moldova, Republic of', code: 'MD'}, - {name: 'Monaco', code: 'MC'}, - {name: 'Mongolia', code: 'MN'}, - {name: 'Montserrat', code: 'MS'}, - {name: 'Morocco', code: 'MA'}, - {name: 'Mozambique', code: 'MZ'}, - {name: 'Myanmar', code: 'MM'}, - {name: 'Namibia', code: 'NA'}, - {name: 'Nauru', code: 'NR'}, - {name: 'Nepal', code: 'NP'}, - {name: 'Netherlands', code: 'NL'}, - {name: 'Netherlands Antilles', code: 'AN'}, - {name: 'New Caledonia', code: 'NC'}, - {name: 'New Zealand', code: 'NZ'}, - {name: 'Nicaragua', code: 'NI'}, - {name: 'Niger', code: 'NE'}, - {name: 'Nigeria', code: 'NG'}, - {name: 'Niue', code: 'NU'}, - {name: 'Norfolk Island', code: 'NF'}, - {name: 'Northern Mariana Islands', code: 'MP'}, - {name: 'Norway', code: 'NO'}, - {name: 'Oman', code: 'OM'}, - {name: 'Pakistan', code: 'PK'}, - {name: 'Palau', code: 'PW'}, - {name: 'Palestinian Territory, Occupied', code: 'PS'}, - {name: 'Panama', code: 'PA'}, - {name: 'Papua New Guinea', code: 'PG'}, - {name: 'Paraguay', code: 'PY'}, - {name: 'Peru', code: 'PE'}, - {name: 'Philippines', code: 'PH'}, - {name: 'Pitcairn', code: 'PN'}, - {name: 'Poland', code: 'PL'}, - {name: 'Portugal', code: 'PT'}, - {name: 'Puerto Rico', code: 'PR'}, - {name: 'Qatar', code: 'QA'}, - {name: 'Reunion', code: 'RE'}, - {name: 'Romania', code: 'RO'}, - {name: 'Russian Federation', code: 'RU'}, - {name: 'RWANDA', code: 'RW'}, - {name: 'Saint Helena', code: 'SH'}, - {name: 'Saint Kitts and Nevis', code: 'KN'}, - {name: 'Saint Lucia', code: 'LC'}, - {name: 'Saint Pierre and Miquelon', code: 'PM'}, - {name: 'Saint Vincent and the Grenadines', code: 'VC'}, - {name: 'Samoa', code: 'WS'}, - {name: 'San Marino', code: 'SM'}, - {name: 'Sao Tome and Principe', code: 'ST'}, - {name: 'Saudi Arabia', code: 'SA'}, - {name: 'Senegal', code: 'SN'}, - {name: 'Serbia and Montenegro', code: 'CS'}, - {name: 'Seychelles', code: 'SC'}, - {name: 'Sierra Leone', code: 'SL'}, - {name: 'Singapore', code: 'SG'}, - {name: 'Slovakia', code: 'SK'}, - {name: 'Slovenia', code: 'SI'}, - {name: 'Solomon Islands', code: 'SB'}, - {name: 'Somalia', code: 'SO'}, - {name: 'South Africa', code: 'ZA'}, - {name: 'South Georgia and the South Sandwich Islands', code: 'GS'}, - {name: 'Spain', code: 'ES'}, - {name: 'Sri Lanka', code: 'LK'}, - {name: 'Sudan', code: 'SD'}, - {name: 'Suriname', code: 'SR'}, - {name: 'Svalbard and Jan Mayen', code: 'SJ'}, - {name: 'Swaziland', code: 'SZ'}, - {name: 'Sweden', code: 'SE'}, - {name: 'Switzerland', code: 'CH'}, - {name: 'Syrian Arab Republic', code: 'SY'}, - {name: 'Taiwan, Province of China', code: 'TW'}, - {name: 'Tajikistan', code: 'TJ'}, - {name: 'Tanzania, United Republic of', code: 'TZ'}, - {name: 'Thailand', code: 'TH'}, - {name: 'Timor-Leste', code: 'TL'}, - {name: 'Togo', code: 'TG'}, - {name: 'Tokelau', code: 'TK'}, - {name: 'Tonga', code: 'TO'}, - {name: 'Trinidad and Tobago', code: 'TT'}, - {name: 'Tunisia', code: 'TN'}, - {name: 'Turkey', code: 'TR'}, - {name: 'Turkmenistan', code: 'TM'}, - {name: 'Turks and Caicos Islands', code: 'TC'}, - {name: 'Tuvalu', code: 'TV'}, - {name: 'Uganda', code: 'UG'}, - {name: 'Ukraine', code: 'UA'}, - {name: 'United Arab Emirates', code: 'AE'}, - {name: 'United Kingdom', code: 'GB'}, - {name: 'United States', code: 'US'}, - {name: 'United States Minor Outlying Islands', code: 'UM'}, - {name: 'Uruguay', code: 'UY'}, - {name: 'Uzbekistan', code: 'UZ'}, - {name: 'Vanuatu', code: 'VU'}, - {name: 'Venezuela', code: 'VE'}, - {name: 'Viet Nam', code: 'VN'}, - {name: 'Virgin Islands, British', code: 'VG'}, - {name: 'Virgin Islands, U.S.', code: 'VI'}, - {name: 'Wallis and Futuna', code: 'WF'}, - {name: 'Western Sahara', code: 'EH'}, - {name: 'Yemen', code: 'YE'}, - {name: 'Zambia', code: 'ZM'}, - {name: 'Zimbabwe', code: 'ZW'} - ] - }); - </script> - </polymer-element> - - <dropdown-demo fit></dropdown-demo> - -</body> -</html>
\ No newline at end of file diff --git a/third_party/polymer/components/core-dropdown/index.html b/third_party/polymer/components/core-dropdown/index.html deleted file mode 100644 index 58856f3..0000000 --- a/third_party/polymer/components/core-dropdown/index.html +++ /dev/null @@ -1,22 +0,0 @@ -<!doctype html> -<!-- -Copyright (c) 2014 The Polymer Project Authors. All rights reserved. -This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE -The complete set of authors may be found at http://polymer.github.io/AUTHORS -The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS -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 ---> -<html> -<head> - - <script src="../platform/platform.js"></script> - <link rel="import" href="../core-component-page/core-component-page.html"> - -</head> -<body unresolved> - - <core-component-page></core-component-page> - -</body> -</html> diff --git a/third_party/polymer/components/core-field/.bower.json b/third_party/polymer/components/core-field/.bower.json deleted file mode 100644 index d6b1c36..0000000 --- a/third_party/polymer/components/core-field/.bower.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "name": "core-field", - "private": true, - "dependencies": { - "polymer": "Polymer/polymer#>=0.3.0 <1.0.0" - }, - "homepage": "https://github.com/Polymer/core-field", - "version": "0.3.5", - "_release": "0.3.5", - "_resolution": { - "type": "version", - "tag": "0.3.5", - "commit": "bf6b093a3af4fc12e3dd78db910a614fe7a6d631" - }, - "_source": "git://github.com/Polymer/core-field.git", - "_target": "0.3.5", - "_originalSource": "Polymer/core-field" -}
\ No newline at end of file diff --git a/third_party/polymer/components/core-field/README.md b/third_party/polymer/components/core-field/README.md deleted file mode 100644 index 786008c..0000000 --- a/third_party/polymer/components/core-field/README.md +++ /dev/null @@ -1,4 +0,0 @@ -core-field -========== - -See the [component landing page](http://polymer-project.org/docs/elements/core-elements.html#core-field) for more information. diff --git a/third_party/polymer/components/core-field/bower.json b/third_party/polymer/components/core-field/bower.json deleted file mode 100644 index 5c006b0..0000000 --- a/third_party/polymer/components/core-field/bower.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "name": "core-field", - "private": true, - "dependencies": { - "polymer": "Polymer/polymer#>=0.3.0 <1.0.0" - } -}
\ No newline at end of file diff --git a/third_party/polymer/components/core-field/core-field.css b/third_party/polymer/components/core-field/core-field.css deleted file mode 100644 index ff597c2..0000000 --- a/third_party/polymer/components/core-field/core-field.css +++ /dev/null @@ -1,38 +0,0 @@ -/* Copyright (c) 2014 The Polymer Project Authors. All rights reserved. -This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt -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 */ - - -:host { - display: block; - color: #333; - font-size: 14px; -} - -polyfill-next-selector { content: ':host > core-icon'; } -::content > core-icon { - margin: 8px; -} - -polyfill-next-selector { content: ':host input'; } -::content input { - background: transparent; - border: 0; - padding: 0; - margin: 0 4px; - color: #333; - font-size: 14px; -} - -polyfill-next-selector { content: ':host input:focus'; } -::content input:focus { - outline: none; -} - -polyfill-next-selector { content: ':host input::placeholder'; } -::content input::placeholder { - color: #b3b3b3; -}
\ No newline at end of file diff --git a/third_party/polymer/components/core-field/core-field.html b/third_party/polymer/components/core-field/core-field.html deleted file mode 100644 index d7fc345..0000000 --- a/third_party/polymer/components/core-field/core-field.html +++ /dev/null @@ -1,35 +0,0 @@ -<!-- -Copyright (c) 2014 The Polymer Project Authors. All rights reserved. -This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt -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 ---> - -<link rel="import" href="../polymer/polymer.html"> - -<!-- -The `core-field` supplies a horizontal layout, anticipating an input. - -Example: - - <core-field> - <core-icon icon="menu"></core-icon> - <label>I'm a label!</label> - <input placeholder="I have a label" flex> - </core-field> - -@group Polymer Core Elements -@element core-field -@homepage github.io ---> -<polymer-element name="core-field" noscript center horizontal layout> -<template> - - <link rel="stylesheet" href="core-field.css"> - - <content select="*"></content> - -</template> -</polymer-element> diff --git a/third_party/polymer/components/core-field/demo.html b/third_party/polymer/components/core-field/demo.html deleted file mode 100644 index 886654a..0000000 --- a/third_party/polymer/components/core-field/demo.html +++ /dev/null @@ -1,58 +0,0 @@ -<!doctype html> -<html lang="en"> -<head> - - <meta charset="UTF-8"> - <title>Core Field</title> - - <script src="../platform/platform.js"></script> - - <link rel="import" href="core-field.html"> - - <style> - html { - font-family: 'Helvetica Neue', 'Roboto', 'Arial', sans-serif; - font-size: 14px; - } - - core-field { - border: 1px solid #ddd; - margin: 10px; - height: 40px; - } - - div.icon { - display: inline-block; - width: 32px; - height: 32px; - background-repeat: no-repeat; - background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAACXBIWXMAAAsTAAALEwEAmpwYAAAKT2lDQ1BQaG90b3Nob3AgSUNDIHByb2ZpbGUAAHjanVNnVFPpFj333vRCS4iAlEtvUhUIIFJCi4AUkSYqIQkQSoghodkVUcERRUUEG8igiAOOjoCMFVEsDIoK2AfkIaKOg6OIisr74Xuja9a89+bN/rXXPues852zzwfACAyWSDNRNYAMqUIeEeCDx8TG4eQuQIEKJHAAEAizZCFz/SMBAPh+PDwrIsAHvgABeNMLCADATZvAMByH/w/qQplcAYCEAcB0kThLCIAUAEB6jkKmAEBGAYCdmCZTAKAEAGDLY2LjAFAtAGAnf+bTAICd+Jl7AQBblCEVAaCRACATZYhEAGg7AKzPVopFAFgwABRmS8Q5ANgtADBJV2ZIALC3AMDOEAuyAAgMADBRiIUpAAR7AGDIIyN4AISZABRG8lc88SuuEOcqAAB4mbI8uSQ5RY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hqCdoJFCGSnEFZWMu8ei70Lbye72R12IYV5cFmYmffuuWfOPXPXJOE6F3HN6wbADYBO84KZAQB6vd6+pL1VJDGz96enp+8AoNl1UxnY2tq6I2kfQF5FxFlciAEA5u5G0gAw53zJKEjCzAggxaUsyd390mEpJYvkFqG5AM7Pz4fdbrczYmySs0jekfQ15/wpkjwxswdmVjdBSLIAykg+FwACKYtNE5VL+nZ2dvaquPej2+0+M7P7JJtMlAy07gJrhpmlnPMRgBrARUSdcz4yszRtT6sumJK8SSkBDALAuFSamc/YcyUItql+LKKU0l4kHyvdST4NvVgbFlox4O4g6SR3t7e3X0j6AOCPmR0A2HX32t1bMTATgCSzsSs1lrtnM3sI4FGo3CXlGYksnmkPIDZPOORY0ZLKg1n0uJeO13iu1SuYsGeSDLH9cvfP7v6z3++fAMDGxsYOyXskH5O8OyLJfZFhZ64Gxskl/c05v6yq6qSoVAAQQL4D+Li+vr6TUnpO8nYYwkq6ILn7YVVVx0X/1424AFBXVXXs7ofhfst3AUmTxH6//yUS5bL6KY6XhsPh8draGuO1YVU+UFabmz4QvzWAejAY/F6ZD7i7SGpzc/NtyxnAwzeWAyAJ7u4kW83voybQ8gzE97z9rDeqHPM00LmCwjeSDlY0kr2eea9pFsWkcysALju4etGmWZLPY0CFqrEiALNadyYAFd97WxJA6ZpaVAM+bYBcEoQW0sB/98/o3wDaEFXSD7l9+QAAAABJRU5ErkJggg==); - } - </style> - -</head> -<body theme="core-light-theme" unresolved> - - <core-field> - <div class="icon"></div> - <input placeholder="hi!" flex> - </core-field> - - <core-field> - <div class="icon"></div> - <input placeholder="Search" flex> - <icon></icon> - </core-field> - - <core-field> - <div class="icon"></div> - <label>I'm a label!</label> - <input placeholder="I have a label" flex> - </core-field> - - <core-field> - <input placeholder="I have no icon" flex> - </core-field> - -</body> -</html> diff --git a/third_party/polymer/components/core-field/index.html b/third_party/polymer/components/core-field/index.html deleted file mode 100644 index 4b2f63c..0000000 --- a/third_party/polymer/components/core-field/index.html +++ /dev/null @@ -1,22 +0,0 @@ -<!doctype html> -<!-- -Copyright (c) 2014 The Polymer Project Authors. All rights reserved. -This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt -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 ---> -<html> -<head> - - <script src="../platform/platform.js"></script> - <link rel="import" href="../core-component-page/core-component-page.html"> - -</head> -<body unresolved> - - <core-component-page></core-component-page> - -</body> -</html> diff --git a/third_party/polymer/components/core-field/metadata.html b/third_party/polymer/components/core-field/metadata.html deleted file mode 100644 index e8f9649..0000000 --- a/third_party/polymer/components/core-field/metadata.html +++ /dev/null @@ -1,17 +0,0 @@ -<x-meta id="core-field" label="Field" group="Core" isContainer> - - <template> - <core-field icon="search" theme="core-light-theme"> - <core-icon icon="search"></core-icon> - <core-input placeholder="text input" flex></core-input> - </core-field> - </template> - - <template id="imports"> - <link rel="import" href="core-field.html"> - <link rel="import" href="../core-icon/core-icon.html"> - <link rel="import" href="../core-input/core-input.html"> - </template> - -</x-meta> - diff --git a/third_party/polymer/components/core-header-panel/.bower.json b/third_party/polymer/components/core-header-panel/.bower.json deleted file mode 100644 index bc8dfbe..0000000 --- a/third_party/polymer/components/core-header-panel/.bower.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "name": "core-header-panel", - "private": true, - "dependencies": { - "polymer": "Polymer/polymer#>=0.3.0 <1.0.0" - }, - "homepage": "https://github.com/Polymer/core-header-panel", - "version": "0.3.5", - "_release": "0.3.5", - "_resolution": { - "type": "version", - "tag": "0.3.5", - "commit": "3f93b1618d1dff853ac631d9bb0506d2be05666c" - }, - "_source": "git://github.com/Polymer/core-header-panel.git", - "_target": "0.3.5", - "_originalSource": "Polymer/core-header-panel" -}
\ No newline at end of file diff --git a/third_party/polymer/components/core-header-panel/README.md b/third_party/polymer/components/core-header-panel/README.md deleted file mode 100644 index 8bc73e9..0000000 --- a/third_party/polymer/components/core-header-panel/README.md +++ /dev/null @@ -1,4 +0,0 @@ -core-header-panel -=================== - -See the [component page](http://polymer-project.org/docs/elements/core-elements.html#core-header-panel) for more information. diff --git a/third_party/polymer/components/core-header-panel/bower.json b/third_party/polymer/components/core-header-panel/bower.json deleted file mode 100644 index 8a6e840..0000000 --- a/third_party/polymer/components/core-header-panel/bower.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "name": "core-header-panel", - "private": true, - "dependencies": { - "polymer": "Polymer/polymer#>=0.3.0 <1.0.0" - } -}
\ No newline at end of file diff --git a/third_party/polymer/components/core-header-panel/core-header-panel.css b/third_party/polymer/components/core-header-panel/core-header-panel.css deleted file mode 100644 index 31dcce5..0000000 --- a/third_party/polymer/components/core-header-panel/core-header-panel.css +++ /dev/null @@ -1,75 +0,0 @@ -/* -Copyright (c) 2014 The Polymer Project Authors. All rights reserved. -This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt -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 -*/ - -:host { - display: block; - position: relative; -} - -#outerContainer { - position: absolute; - top: 0; - right: 0; - bottom: 0; - left: 0; - overflow-y: auto; - overflow-x: hidden; - -webkit-overflow-scrolling: touch; -} - -#mainPanel { - position: relative; -} - -#mainContainer { - position: relative; - overflow-y: auto; - overflow-x: hidden; - -webkit-overflow-scrolling: touch; -} - -#dropShadow { - position: absolute; - top: 0; - left: 0; - right: 0; - height: 6px; - box-shadow: inset 0px 5px 6px -3px rgba(0, 0, 0, 0.4); -} - -#dropShadow.hidden { - display: none; -} - -/* -mode: scroll -*/ -:host([mode=scroll]) #mainContainer { - overflow: visible; -} - -/* -mode: cover -*/ -:host([mode=cover]) #mainPanel { - position: static; -} - -:host([mode=cover]) #mainContainer { - position: absolute; - top: 0; - right: 0; - bottom: 0; - left: 0; -} - -:host([mode=cover]) #dropShadow { - position: static; - width: 100%; -} diff --git a/third_party/polymer/components/core-header-panel/core-header-panel.html b/third_party/polymer/components/core-header-panel/core-header-panel.html deleted file mode 100644 index a48605c..0000000 --- a/third_party/polymer/components/core-header-panel/core-header-panel.html +++ /dev/null @@ -1,225 +0,0 @@ -<!-- -Copyright (c) 2014 The Polymer Project Authors. All rights reserved. -This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt -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 ---> - -<!-- -`core-header-panel` contains a header section and a content panel section. - -__Important:__ The `core-header-panel` will not display if its parent does not have a height. - -Using [layout attributes](http://www.polymer-project.org/docs/polymer/layout-attrs.html), you can easily make the `core-header-panel` fill the screen - - <body fullbleed layout vertical> - <core-header-panel flex> - <core-toolbar> - <div>Hello World!</div> - </core-toolbar> - </core-header-panel> - </body> - -or, if you would prefer to do it in CSS, just give `html`, `body`, and `core-header-panel` a height of 100%: - - html, body { - height: 100%; - margin: 0; - } - core-header-panel { - height: 100%; - } - -Special support is provided for scrolling modes when one uses a core-toolbar or equivalent -for the header section. - -Example: - - <core-header-panel> - <core-toolbar>Header</core-toolbar> - <div>Content goes here...</div> - </core-header-panel> - -If you want to use other than `core-toolbar` for the header, add -`core-header` class to that element. - -Example: - - <core-header-panel> - <div class="core-header">Header</div> - <div>Content goes here...</div> - </core-header-panel> - -To have the content fits to the main area, use `fit` attribute. - - <core-header-panel> - <div class="core-header">standard</div> - <div class="content" fit>content fits 100% below the header</div> - </core-header-panel> - -Use `mode` to control the header and scrolling behavior. - -@group Polymer Core Elements -@element core-header-panel -@homepage github.io ---> - -<link rel="import" href="../polymer/polymer.html"> - -<polymer-element name="core-header-panel"> -<template> - - <link rel="stylesheet" href="core-header-panel.css"> - - <div id="outerContainer" on-scroll="{{scroll}}" vertical layout> - - <content id="headerContent" select="core-toolbar, .core-header"></content> - - <div id="mainPanel" flex vertical layout> - - <div id="mainContainer" flex?="{{mode !== 'cover'}}" on-scroll="{{scroll}}"> - <content id="mainContent" select="*"></content> - </div> - - <div id="dropShadow"></div> - - </div> - - </div> - -</template> -<script> - - Polymer('core-header-panel', { - - /** - * Fired when the content has been scrolled. `details.target` returns - * the scrollable element which you can use to access scroll info such as - * `scrollTop`. - * - * @event scroll - */ - - publish: { - /** - * Controls header and scrolling behavior. Options are - * `standard`, `seamed`, `waterfall`, `waterfall-tall`, - * `waterfall-medium-tall`, `scroll` and `cover`. - * Default is `standard`. - * - * `standard`: The header is a step above the panel. The header will consume the - * panel at the point of entry, preventing it from passing through to the - * opposite side. - * - * `seamed`: The header is presented as seamed with the panel. - * - * `waterfall`: Similar to standard mode, but header is initially presented as - * seamed with panel, but then separates to form the step. - * - * `waterfall-tall`: The header is initially taller (`tall` class is added to - * the header). As the user scrolls, the header separates (forming an edge) - * while condensing (`tall` class is removed from the header). - * - * `scroll`: The header keeps its seam with the panel, and is pushed off screen. - * - * `cover`: The panel covers the whole `core-header-panel` including the - * header. This allows user to style the panel in such a way that the panel is - * partially covering the header. - * - * <style> - * core-header-panel[mode=cover]::shadow #mainContainer { - * left: 80px; - * } - * .content { - * margin: 60px 60px 60px 0; - * } - * </style> - * - * <core-header-panel mode="cover"> - * <core-appbar class="tall"> - * <core-icon-button icon="menu"></core-icon-button> - * </core-appbar> - * <div class="content"></div> - * </core-header-panel> - * - * @attribute mode - * @type string - * @default '' - */ - mode: {value: '', reflect: true}, - - /** - * The class used in waterfall-tall mode. Change this if the header - * accepts a different class for toggling height, e.g. "medium-tall" - * - * @attribute tallClass - * @type string - * @default 'tall' - */ - tallClass: 'tall', - - /** - * If true, the drop-shadow is always shown no matter what mode is set to. - * - * @attribute shadow - * @type boolean - * @default false - */ - shadow: false - }, - - domReady: function() { - this.async('scroll'); - }, - - modeChanged: function() { - this.scroll(); - }, - - get header() { - return this.$.headerContent.getDistributedNodes()[0]; - }, - - /** - * Returns the scrollable element. - * - * @property scroller - * @type Object - */ - get scroller() { - return this.mode === 'scroll' ? - this.$.outerContainer : this.$.mainContainer; - }, - - scroll: function() { - var shadowMode = {'waterfall': 1, 'waterfall-tall': 1}; - var noShadow = {'seamed': 1, 'cover': 1, 'scroll': 1}; - var tallMode = {'waterfall-tall': 1}; - - var main = this.$.mainContainer; - var header = this.header; - - var sTop = main.scrollTop; - var atTop = sTop === 0; - - if (header) { - this.$.dropShadow.classList.toggle('hidden', !this.shadow && - (atTop && shadowMode[this.mode] || noShadow[this.mode])); - - if (tallMode[this.mode]) { - header.classList.toggle(this.tallClass, atTop || - main.scrollHeight < this.$.outerContainer.offsetHeight); - } - - header.classList.toggle('animate', tallMode[this.mode]); - } - - this.fire('scroll', {target: this.scroller}, this, false); - } - - }); - -</script> -</polymer-element> diff --git a/third_party/polymer/components/core-header-panel/demo.html b/third_party/polymer/components/core-header-panel/demo.html deleted file mode 100644 index 69854d6..0000000 --- a/third_party/polymer/components/core-header-panel/demo.html +++ /dev/null @@ -1,100 +0,0 @@ -<!doctype html> -<!-- -Copyright (c) 2014 The Polymer Project Authors. All rights reserved. -This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt -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 ---> -<html> -<head> - <title>core-header-panel</title> - - <script src="../platform/platform.js"></script> - - <link rel="import" href="core-header-panel.html"> - - <style shim-shadowdom> - - body { - font-family: sans-serif; - } - - core-header-panel { - float: left; - width: 360px; - height: 400px; - margin: 5px; - } - - core-header-panel[mode=cover]::shadow #mainContainer { - left: 70px; - } - - .core-header { - height: 60px; - line-height: 60px; - font-size: 18px; - padding: 0 10px; - background-color: #4F7DC9; - color: #FFF; - transition: height 0.2s; - } - - .core-header.tall { - height: 180px; - } - - .core-header.medium-tall { - height: 120px; - } - - .content { - height: 2000px; - background: linear-gradient(rgb(214, 227, 231), lightblue); - } - - </style> - -</head> - -<body unresolved> - - <core-header-panel> - <div class="core-header">standard</div> - <div class="content"></div> - </core-header-panel> - - <core-header-panel mode="seamed"> - <div class="core-header">seamed</div> - <div class="content"></div> - </core-header-panel> - - <core-header-panel mode="waterfall"> - <div class="core-header">waterfall</div> - <div class="content"></div> - </core-header-panel> - - <core-header-panel mode="waterfall-tall"> - <div class="core-header">waterfall-tall</div> - <div class="content"></div> - </core-header-panel> - - <core-header-panel mode="waterfall-tall" tallClass="medium-tall"> - <div class="core-header">waterfall-tall (tallClass: medium-tall)</div> - <div class="content"></div> - </core-header-panel> - - <core-header-panel mode="scroll"> - <div class="core-header">scroll</div> - <div class="content"></div> - </core-header-panel> - - <core-header-panel mode="cover"> - <div class="core-header tall">cover</div> - <div class="content" style="margin: 60px 60px 60px 0;"></div> - </core-header-panel> - -</body> -</html> diff --git a/third_party/polymer/components/core-header-panel/index.html b/third_party/polymer/components/core-header-panel/index.html deleted file mode 100644 index 85106b5..0000000 --- a/third_party/polymer/components/core-header-panel/index.html +++ /dev/null @@ -1,23 +0,0 @@ -<!doctype html> -<!-- -Copyright (c) 2014 The Polymer Project Authors. All rights reserved. -This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE -The complete set of authors may be found at http://polymer.github.io/AUTHORS -The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS -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 ---> -<html> -<head> - - <script src="../platform/platform.js"></script> - <link rel="import" href="../polymer/polymer.html"> - <link rel="import" href="../core-component-page/core-component-page.html"> - -</head> -<body unresolved> - - <core-component-page></core-component-page> - -</body> -</html> diff --git a/third_party/polymer/components/core-header-panel/metadata.html b/third_party/polymer/components/core-header-panel/metadata.html deleted file mode 100644 index a218634..0000000 --- a/third_party/polymer/components/core-header-panel/metadata.html +++ /dev/null @@ -1,28 +0,0 @@ -<x-meta id="core-header-panel" label="Header Panel" isContainer group="Core"> - - <property name="mode" kind="select" options="standard, waterfall, waterfall-tall, scroll, cover"></property> - - <template> - - <core-header-panel mode="standard" style="width: 300px; height: 400px;"> - - <core-toolbar style="background-color: #4F7DC9; color: #FFF;"> - <core-icon-button icon="menu"></core-icon-button> - <div>Header</div> - </core-toolbar> - - <section style="height: 1000px; background: linear-gradient(rgb(214, 227, 231), lightblue);"></section> - - </core-header-panel> - - </template> - - <template id="imports"> - - <link rel="import" href="../core-icon-button/core-icon-button.html"> - <link rel="import" href="../core-toolbar/core-toolbar.html"> - <link rel="import" href="core-header-panel.html"> - - </template> - -</x-meta>
\ No newline at end of file diff --git a/third_party/polymer/components/core-icon-button/.bower.json b/third_party/polymer/components/core-icon-button/.bower.json deleted file mode 100644 index 90de207..0000000 --- a/third_party/polymer/components/core-icon-button/.bower.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "name": "core-icon-button", - "private": true, - "dependencies": { - "core-icons": "Polymer/core-icons#>=0.3.0 <1.0.0" - }, - "homepage": "https://github.com/Polymer/core-icon-button", - "version": "0.3.5", - "_release": "0.3.5", - "_resolution": { - "type": "version", - "tag": "0.3.5", - "commit": "8cba0cc3afb550c9d51400c5f2ce2532d104b13d" - }, - "_source": "git://github.com/Polymer/core-icon-button.git", - "_target": "0.3.5", - "_originalSource": "Polymer/core-icon-button" -}
\ No newline at end of file diff --git a/third_party/polymer/components/core-icon-button/README.md b/third_party/polymer/components/core-icon-button/README.md deleted file mode 100644 index 25e957f..0000000 --- a/third_party/polymer/components/core-icon-button/README.md +++ /dev/null @@ -1,4 +0,0 @@ -core-icon-button -================ - -See the [component page](http://polymer-project.org/docs/elements/core-elements.html#core-icon-button) for more information. diff --git a/third_party/polymer/components/core-icon-button/bower.json b/third_party/polymer/components/core-icon-button/bower.json deleted file mode 100644 index db94a26..0000000 --- a/third_party/polymer/components/core-icon-button/bower.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "name": "core-icon-button", - "private": true, - "dependencies": { - "core-icons": "Polymer/core-icons#>=0.3.0 <1.0.0" - } -}
\ No newline at end of file diff --git a/third_party/polymer/components/core-icon-button/core-icon-button.css b/third_party/polymer/components/core-icon-button/core-icon-button.css deleted file mode 100644 index 60202c3..0000000 --- a/third_party/polymer/components/core-icon-button/core-icon-button.css +++ /dev/null @@ -1,75 +0,0 @@ -/* -Copyright (c) 2014 The Polymer Project Authors. All rights reserved. -This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE -The complete set of authors may be found at http://polymer.github.io/AUTHORS -The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS -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 -*/ - -:host { - display: inline-block; - box-sizing: border-box; - -moz-box-sizing: border-box; - user-select: none; - -moz-user-select: none; - -webkit-user-select: none; - border-radius: 2px; - padding: 7px; - margin: 2px; - vertical-align: middle; - font-size: 1rem; - cursor: pointer; -} - -:host([disabled]) { - opacity: 0.6; - pointer-events: none; -} - -:host(.outline) { - box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.1); -} - -:host(:hover:not([disabled])) { - box-shadow: 0 1px 0 0 rgba(0, 0, 0, 0.12), 0 0 0 1px rgba(0, 0, 0, 0.1); -} - -:host(.selected:not([disabled])) { - background-color: rgba(0, 0, 0, 0.05); - box-shadow: inset 0 1px 0 0 rgba(0, 0, 0, 0.05), 0 0 0 1px rgba(0, 0, 0, 0.12); -} - -:host(:active:not([disabled]), .selected:active:not([disabled])) { - background-color: rgba(0, 0, 0, 0.05); - box-shadow: inset 0 1px 0 0 rgba(0, 0, 0, 0.1), 0 0 0 1px rgba(0, 0, 0, 0.12); -} - -:host(.core-dark-theme.outline) { - background-color: rgba(200, 200, 200, 0.05); - box-shadow: 0 0 0 1px rgba(200, 200, 200, 0.1); -} - -:host(.core-dark-theme:hover) { - background-color: rgba(200, 200, 200, 0.05); - box-shadow: 0 1px 0 0 rgba(200, 200, 200, 0.12), 0 0 0 1px rgba(200, 200, 200, 0.1); -} - -:host(.core-dark-theme.selected) { - background-color: rgba(220, 220, 220, 0.05); - box-shadow: inset 0 1px 0 0 rgba(200, 200, 200, 0.05), 0 0 0 1px rgba(200, 200, 200, 0.12); -} - -:host(.core-dark-theme:active, .core-dark-theme.selected:active) { - background-color: rgba(200, 200, 200, 0.05); - box-shadow: inset 0 1px 0 0 rgba(200, 200, 200, 0.1), 0 0 0 1px rgba(200, 200, 200, 0.12); -} - -core-icon { - pointer-events: none; -} - -/* note: this is a polyfill aware selector */ -:host ::content > :not(core-icon) { - margin-left: 4px; -} diff --git a/third_party/polymer/components/core-icon-button/core-icon-button.html b/third_party/polymer/components/core-icon-button/core-icon-button.html deleted file mode 100644 index 18e4971..0000000 --- a/third_party/polymer/components/core-icon-button/core-icon-button.html +++ /dev/null @@ -1,81 +0,0 @@ -<!-- -Copyright (c) 2014 The Polymer Project Authors. All rights reserved. -This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt -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 ---> - -<!-- -`core-icon-button` is an icon with button behaviors. - - <core-icon-button src="star.png"></core-icon-button> - -`core-icon-button` includes a default icon set. Use `icon` to specify -which icon from the icon set to use. - - <core-icon-button icon="menu"></core-icon-button> - -See [`core-iconset`](#core-iconset) for more information about -how to use a custom icon set. - -@group Polymer Core Elements -@element core-icon-button -@homepage github.io ---> - -<link rel="import" href="../core-icon/core-icon.html"> -<link rel="import" href="../core-icons/core-icons.html"> - -<polymer-element name="core-icon-button" attributes="src icon active"> - - <template> - <link rel="stylesheet" href="core-icon-button.css"> - <core-icon src="{{src}}" icon="{{icon}}"></core-icon><content></content> - </template> - - <script> - - Polymer('core-icon-button', { - - /** - * The URL of an image for the icon. Should not use `icon` property - * if you are using this property. - * - * @attribute src - * @type string - * @default '' - */ - src: '', - - /** - * If true, border is placed around the button to indicate it's - * active state. - * - * @attribute active - * @type boolean - * @default false - */ - active: false, - - /** - * Specifies the icon name or index in the set of icons available in - * the icon set. Should not use `src` property if you are using this - * property. - * - * @attribute icon - * @type string - * @default '' - */ - icon: '', - - activeChanged: function() { - this.classList.toggle('selected', this.active); - } - - }); - - </script> - -</polymer-element> diff --git a/third_party/polymer/components/core-icon-button/demo.html b/third_party/polymer/components/core-icon-button/demo.html deleted file mode 100644 index becd7fb..0000000 --- a/third_party/polymer/components/core-icon-button/demo.html +++ /dev/null @@ -1,35 +0,0 @@ -<!doctype html> -<!-- -Copyright (c) 2014 The Polymer Project Authors. All rights reserved. -This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE -The complete set of authors may be found at http://polymer.github.io/AUTHORS -The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS -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 ---> -<html> -<head> - <title>core-icon-button</title> - - <script src="../platform/platform.js"></script> - - <link rel="import" href="core-icon-button.html"> - <style> - </style> - -</head> - -<body unresolved> - - -<template is="auto-binding"> - <template repeat="{{icon in $.meta.metaData.icons.iconNames}}"> - <core-icon-button icon="{{icon}}" title="{{icon}}"></core-icon-button> - </template> - <core-icon-button icon="menu"><span>label</span></core-icon-button> - </div> - <core-iconset id="meta"></core-iconset> -</template> - -</body> -</html> diff --git a/third_party/polymer/components/core-icon-button/index.html b/third_party/polymer/components/core-icon-button/index.html deleted file mode 100644 index 58856f3..0000000 --- a/third_party/polymer/components/core-icon-button/index.html +++ /dev/null @@ -1,22 +0,0 @@ -<!doctype html> -<!-- -Copyright (c) 2014 The Polymer Project Authors. All rights reserved. -This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE -The complete set of authors may be found at http://polymer.github.io/AUTHORS -The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS -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 ---> -<html> -<head> - - <script src="../platform/platform.js"></script> - <link rel="import" href="../core-component-page/core-component-page.html"> - -</head> -<body unresolved> - - <core-component-page></core-component-page> - -</body> -</html> diff --git a/third_party/polymer/components/core-icon-button/metadata.html b/third_party/polymer/components/core-icon-button/metadata.html deleted file mode 100644 index 85478c7..0000000 --- a/third_party/polymer/components/core-icon-button/metadata.html +++ /dev/null @@ -1,11 +0,0 @@ -<x-meta id="core-icon-button" label="Icon Button" group="Core"> - - <template> - <core-icon-button icon="menu" theme="core-light-theme"></core-icon-button> - </template> - - <template id="imports"> - <link rel="import" href="core-icon-button.html"> - </template> - -</x-meta> diff --git a/third_party/polymer/components/core-icon/.bower.json b/third_party/polymer/components/core-icon/.bower.json deleted file mode 100644 index bc0f698..0000000 --- a/third_party/polymer/components/core-icon/.bower.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "name": "core-icon", - "private": true, - "dependencies": { - "core-iconset": "Polymer/core-iconset#>=0.3.0 <1.0.0", - "core-icons": "Polymer/core-icons#>=0.3.0 <1.0.0" - }, - "homepage": "https://github.com/Polymer/core-icon", - "version": "0.3.5", - "_release": "0.3.5", - "_resolution": { - "type": "version", - "tag": "0.3.5", - "commit": "f01e69e95abbfdb54bf0a782bfbde21d743d1a37" - }, - "_source": "git://github.com/Polymer/core-icon.git", - "_target": "0.3.5", - "_originalSource": "Polymer/core-icon" -}
\ No newline at end of file diff --git a/third_party/polymer/components/core-icon/README.md b/third_party/polymer/components/core-icon/README.md deleted file mode 100644 index 65d93fb..0000000 --- a/third_party/polymer/components/core-icon/README.md +++ /dev/null @@ -1,4 +0,0 @@ -core-icon -========= - -See the [component page](http://polymer-project.org/docs/elements/core-elements.html#core-icon) for more information. diff --git a/third_party/polymer/components/core-icon/bower.json b/third_party/polymer/components/core-icon/bower.json deleted file mode 100644 index f0ab05e..0000000 --- a/third_party/polymer/components/core-icon/bower.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "name": "core-icon", - "private": true, - "dependencies": { - "core-iconset": "Polymer/core-iconset#>=0.3.0 <1.0.0", - "core-icons": "Polymer/core-icons#>=0.3.0 <1.0.0" - } -}
\ No newline at end of file diff --git a/third_party/polymer/components/core-icon/core-icon.css b/third_party/polymer/components/core-icon/core-icon.css deleted file mode 100644 index 168a5b5..0000000 --- a/third_party/polymer/components/core-icon/core-icon.css +++ /dev/null @@ -1,16 +0,0 @@ -/* Copyright (c) 2014 The Polymer Project Authors. All rights reserved. -This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt -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 */ - -html /deep/ core-icon { - display: inline-block; - vertical-align: middle; - background-repeat: no-repeat; - fill: currentcolor; - position: relative; - height: 24px; - width: 24px; -}
\ No newline at end of file diff --git a/third_party/polymer/components/core-icon/core-icon.html b/third_party/polymer/components/core-icon/core-icon.html deleted file mode 100644 index 3a0b344..0000000 --- a/third_party/polymer/components/core-icon/core-icon.html +++ /dev/null @@ -1,189 +0,0 @@ -<!-- -Copyright (c) 2014 The Polymer Project Authors. All rights reserved. -This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt -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 ---> -<!-- - -The `core-icon` element displays an icon. By default an icon renders as 24px square. - -Example using src: - - <core-icon src="star.png"></core-icon> - -Example setting size to 32px x 32px: - - <core-icon class="big" src="big_star.png"></core-icon> - - <style> - .big { - height: 32px; - width: 32px; - } - </style> - -Example using icon from default iconset: - - <core-icon icon="menu"></core-icon> - -Example using icon `cherry` from custom iconset `fruit`: - - <core-icon icon="fruit:cherry"></core-icon> - -See [core-iconset](#core-iconset) and [core-iconset-svg](#core-iconset-svg) for more information about -how to use a custom iconset. - -See [core-icons](http://www.polymer-project.org/components/core-icons/demo.html) for the default set of icons. To use the default set of icons you'll need to include an import for `core-icons.html`. To use a different built-in set of icons, you'll need to include an import for `core-icons/iconsets/<iconset>.html`. - -@group Polymer Core Elements -@element core-icon -@homepage polymer.github.io ---> -<link rel="import" href="../core-iconset/core-iconset.html"> - -<link rel="stylesheet" href="core-icon.css" shim-shadowdom> - -<polymer-element name="core-icon" attributes="src icon alt"> -<script> -(function() { - - // mono-state - var meta; - - Polymer('core-icon', { - - /** - * The URL of an image for the icon. If the src property is specified, - * the icon property should not be. - * - * @attribute src - * @type string - * @default '' - */ - src: '', - - /** - * Specifies the icon name or index in the set of icons available in - * the icon's icon set. If the icon property is specified, - * the src property should not be. - * - * @attribute icon - * @type string - * @default '' - */ - icon: '', - - /** - * Alternative text content for accessibility support. - * If alt is present and not empty, it will set the element's role to img and add an aria-label whose content matches alt. - * If alt is present and is an empty string, '', it will hide the element from the accessibility layer - * If alt is not present, it will set the element's role to img and the element will fallback to using the icon attribute for its aria-label. - * - * @attribute alt - * @type string - * @default '' - */ - alt: null, - - observe: { - 'icon': 'updateIcon', - 'alt': 'updateAlt' - }, - - defaultIconset: 'icons', - - ready: function() { - if (!meta) { - meta = document.createElement('core-iconset'); - } - - // Allow user-provided `aria-label` in preference to any other text alternative. - if (this.hasAttribute('aria-label')) { - // Set `role` if it has not been overridden. - if (!this.hasAttribute('role')) { - this.setAttribute('role', 'img'); - } - return; - } - this.updateAlt(); - }, - - srcChanged: function() { - var icon = this._icon || document.createElement('div'); - icon.textContent = ''; - icon.setAttribute('fit', ''); - icon.style.backgroundImage = 'url(' + this.src + ')'; - icon.style.backgroundPosition = 'center'; - icon.style.backgroundSize = '100%'; - if (!icon.parentNode) { - this.appendChild(icon); - } - this._icon = icon; - }, - - getIconset: function(name) { - return meta.byId(name || this.defaultIconset); - }, - - updateIcon: function(oldVal, newVal) { - if (!this.icon) { - this.updateAlt(); - return; - } - var parts = String(this.icon).split(':'); - var icon = parts.pop(); - if (icon) { - var set = this.getIconset(parts.pop()); - if (set) { - this._icon = set.applyIcon(this, icon); - if (this._icon) { - this._icon.setAttribute('fit', ''); - } - } - } - // Check to see if we're using the old icon's name for our a11y fallback - if (oldVal) { - if (oldVal.split(':').pop() == this.getAttribute('aria-label')) { - this.updateAlt(); - } - } - }, - - updateAlt: function() { - // Respect the user's decision to remove this element from - // the a11y tree - if (this.getAttribute('aria-hidden')) { - return; - } - - // Remove element from a11y tree if `alt` is empty, otherwise - // use `alt` as `aria-label`. - if (this.alt === '') { - this.setAttribute('aria-hidden', 'true'); - if (this.hasAttribute('role')) { - this.removeAttribute('role'); - } - if (this.hasAttribute('aria-label')) { - this.removeAttribute('aria-label'); - } - } else { - this.setAttribute('aria-label', this.alt || - this.icon.split(':').pop()); - if (!this.hasAttribute('role')) { - this.setAttribute('role', 'img'); - } - if (this.hasAttribute('aria-hidden')) { - this.removeAttribute('aria-hidden'); - } - } - } - - }); - -})(); -</script> - -</polymer-element> diff --git a/third_party/polymer/components/core-icon/demo.html b/third_party/polymer/components/core-icon/demo.html deleted file mode 100644 index 2bcefbb..0000000 --- a/third_party/polymer/components/core-icon/demo.html +++ /dev/null @@ -1,44 +0,0 @@ -<!doctype html> -<!-- -Copyright (c) 2014 The Polymer Project Authors. All rights reserved. -This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt -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 ---> -<html> -<head> - <title>core-icon</title> - <script src="../platform/platform.js"></script> - <link rel="import" href="../core-icons/core-icons.html"> - <link rel="import" href="core-icon.html"> - - <style> - segment { - min-width: 200px; - } - - core-icon.big { - height: 128px; - width: 128px; - } - </style> -</head> -<body unresolved> - -<template is="auto-binding"> - <div wrap horizontal layout> - <template repeat="{{icon in $.meta.metaData.icons.iconNames}}"> - <segment><core-icon icon="{{icon}}"></core-icon> {{icon}}</segment> - </template> - </div> - <core-iconset id="meta"></core-iconset> - <div hidden?="{{!$.meta.metaData.icons.iconNames}}"> - Sized icon: - <core-icon class="big" icon="accessibility"></core-icon> - </div> -</template> - -</body> -</html> diff --git a/third_party/polymer/components/core-icon/index.html b/third_party/polymer/components/core-icon/index.html deleted file mode 100644 index 58856f3..0000000 --- a/third_party/polymer/components/core-icon/index.html +++ /dev/null @@ -1,22 +0,0 @@ -<!doctype html> -<!-- -Copyright (c) 2014 The Polymer Project Authors. All rights reserved. -This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE -The complete set of authors may be found at http://polymer.github.io/AUTHORS -The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS -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 ---> -<html> -<head> - - <script src="../platform/platform.js"></script> - <link rel="import" href="../core-component-page/core-component-page.html"> - -</head> -<body unresolved> - - <core-component-page></core-component-page> - -</body> -</html> diff --git a/third_party/polymer/components/core-icon/metadata.html b/third_party/polymer/components/core-icon/metadata.html deleted file mode 100644 index bb4c828..0000000 --- a/third_party/polymer/components/core-icon/metadata.html +++ /dev/null @@ -1,12 +0,0 @@ -<x-meta id="core-icon" label="Icon" group="Core" hideSubtree> - - <template> - <core-icon icon="search"></core-icon> - </template> - - <template id="imports"> - <link rel="import" href="../core-icons/core-icons.html"> - <link rel="import" href="core-icon.html"> - </template> - -</x-meta> diff --git a/third_party/polymer/components/core-icons/.bower.json b/third_party/polymer/components/core-icons/.bower.json deleted file mode 100644 index 4740787..0000000 --- a/third_party/polymer/components/core-icons/.bower.json +++ /dev/null @@ -1,20 +0,0 @@ -{ - "name": "core-icons", - "private": true, - "dependencies": { - "core-icon": "Polymer/core-icon#>=0.3.0 <1.0.0", - "core-iconset-svg": "Polymer/core-iconset-svg#>=0.3.0 <1.0.0", - "polymer": "Polymer/polymer#>=0.3.0 <1.0.0" - }, - "homepage": "https://github.com/Polymer/core-icons", - "version": "0.3.5", - "_release": "0.3.5", - "_resolution": { - "type": "version", - "tag": "0.3.5", - "commit": "2adbba45904ad2aa7ce885a55204ec1fb0866a5b" - }, - "_source": "git://github.com/Polymer/core-icons.git", - "_target": "0.3.5", - "_originalSource": "Polymer/core-icons" -}
\ No newline at end of file diff --git a/third_party/polymer/components/core-icons/README.md b/third_party/polymer/components/core-icons/README.md deleted file mode 100644 index 195925f..0000000 --- a/third_party/polymer/components/core-icons/README.md +++ /dev/null @@ -1,4 +0,0 @@ -core-icons -========= - -See the [component page](http://polymer-project.org/docs/elements/core-elements.html#core-icons) for more information. diff --git a/third_party/polymer/components/core-icons/av-icons.html b/third_party/polymer/components/core-icons/av-icons.html deleted file mode 100644 index 1638abf..0000000 --- a/third_party/polymer/components/core-icons/av-icons.html +++ /dev/null @@ -1,46 +0,0 @@ -<!-- -Copyright (c) 2014 The Polymer Project Authors. All rights reserved. -This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt -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 ---> - -<link rel="import" href="../core-icon/core-icon.html"> -<link rel="import" href="../core-iconset-svg/core-iconset-svg.html"> -<core-iconset-svg id="av" iconSize="24"> -<svg><defs> -<g id="closed-caption"><path d="M19,4H5C3.9,4,3,4.9,3,6v12c0,1.1,0.9,2,2,2h14c1.1,0,2-0.9,2-2V6C21,4.9,20.1,4,19,4z M11,11H9.5v-0.5h-2v3h2V13H11v1c0,0.6-0.4,1-1,1H7c-0.6,0-1-0.4-1-1v-4c0-0.6,0.4-1,1-1h3c0.6,0,1,0.4,1,1V11z M18,11h-1.5v-0.5h-2v3h2V13H18v1c0,0.6-0.4,1-1,1h-3c-0.6,0-1-0.4-1-1v-4c0-0.6,0.4-1,1-1h3c0.6,0,1,0.4,1,1V11z"/></g> -<g id="fast-forward"><path d="M4,18l8.5-6L4,6V18z M13,6v12l8.5-6L13,6z"/></g> -<g id="fast-rewind"><path d="M11,18V6l-8.5,6L11,18z M11.5,12l8.5,6V6L11.5,12z"/></g> -<g id="games"><path d="M15,7.5V2H9v5.5l3,3L15,7.5z M7.5,9H2v6h5.5l3-3L7.5,9z M9,16.5V22h6v-5.5l-3-3L9,16.5z M16.5,9l-3,3l3,3H22V9H16.5z"/></g> -<g id="high-quality"><path d="M19,4H5C3.9,4,3,4.9,3,6v12c0,1.1,0.9,2,2,2h14c1.1,0,2-0.9,2-2V6C21,4.9,20.1,4,19,4z M11,15H9.5v-2h-2v2H6V9h1.5v2.5h2V9H11V15z M18,14c0,0.6-0.4,1-1,1h-0.8v1.5h-1.5V15H14c-0.6,0-1-0.4-1-1v-4c0-0.6,0.4-1,1-1h3c0.6,0,1,0.4,1,1V14z M14.5,13.5h2v-3h-2V13.5z"/></g> -<g id="loop"><path d="M12,4V1L8,5l4,4V6c3.3,0,6,2.7,6,6c0,1-0.3,2-0.7,2.8l1.5,1.5C19.5,15,20,13.6,20,12C20,7.6,16.4,4,12,4z M12,18c-3.3,0-6-2.7-6-6c0-1,0.3-2,0.7-2.8L5.2,7.7C4.5,9,4,10.4,4,12c0,4.4,3.6,8,8,8v3l4-4l-4-4V18z"/></g> -<g id="mic"><path d="M12,14c1.7,0,3-1.3,3-3l0-6c0-1.7-1.3-3-3-3c-1.7,0-3,1.3-3,3v6C9,12.7,10.3,14,12,14z M17.3,11c0,3-2.5,5.1-5.3,5.1c-2.8,0-5.3-2.1-5.3-5.1H5c0,3.4,2.7,6.2,6,6.7V21h2v-3.3c3.3-0.5,6-3.3,6-6.7H17.3z"/></g> -<g id="mic-none"><path d="M12,14c1.7,0,3-1.3,3-3l0-6c0-1.7-1.3-3-3-3c-1.7,0-3,1.3-3,3v6C9,12.7,10.3,14,12,14z M10.8,4.9c0-0.7,0.5-1.2,1.2-1.2c0.7,0,1.2,0.5,1.2,1.2l0,6.2c0,0.7-0.5,1.2-1.2,1.2c-0.7,0-1.2-0.5-1.2-1.2V4.9z M17.3,11c0,3-2.5,5.1-5.3,5.1c-2.8,0-5.3-2.1-5.3-5.1H5c0,3.4,2.7,6.2,6,6.7V21h2v-3.3c3.3-0.5,6-3.3,6-6.7H17.3z"/></g> -<g id="mic-off"><path d="M19,11h-1.7c0,0.7-0.2,1.4-0.4,2l1.2,1.2C18.7,13.3,19,12.2,19,11z"/><path d="M15,11.2c0-0.1,0-0.1,0-0.2V5c0-1.7-1.3-3-3-3c-1.7,0-3,1.3-3,3v0.2L15,11.2z"/><path d="M4.3,3L3,4.3l6,6L9,11c0,1.7,1.3,3,3,3c0.2,0,0.4,0,0.7-0.1l1.7,1.7c-0.7,0.3-1.5,0.5-2.3,0.5c-2.8,0-5.3-2.1-5.3-5.1H5c0,3.4,2.7,6.2,6,6.7V21h2v-3.3c0.9-0.1,1.8-0.5,2.5-0.9l4.2,4.2l1.3-1.3L4.3,3z"/></g> -<g id="movie"><path d="M18,4l2,4h-3l-2-4h-2l2,4h-3l-2-4H8l2,4H7L5,4H4C2.9,4,2,4.9,2,6l0,12c0,1.1,0.9,2,2,2h16c1.1,0,2-0.9,2-2V4H18z"/></g> -<g id="news"><path d="M20.3,4.7L18.7,3L17,4.7L15.3,3l-1.7,1.7L12,3l-1.7,1.7L8.7,3L7,4.7L5.3,3L3.7,4.7L2,3v16c0,1.1,0.9,2,2,2h16c1.1,0,2-0.9,2-2l0-16L20.3,4.7z M12,19H4v-7h8V19z M20,19h-7v-1h7V19z M20,17h-7v-1h7V17z M20,15h-7v-1h7V15z M20,13h-7v-1h7V13z M20,11H4V8h16V11z"/></g> -<g id="pause"><path d="M6,19h4V5H6V19z M14,5v14h4V5H14z"/></g> -<g id="pause-circle-fill"><path d="M12,2C6.5,2,2,6.5,2,12s4.5,10,10,10c5.5,0,10-4.5,10-10S17.5,2,12,2z M11,16H9V8h2V16z M15,16h-2V8h2V16z"/></g> -<g id="pause-circle-outline"><path d="M9,16h2V8H9V16z M12,2C6.5,2,2,6.5,2,12s4.5,10,10,10c5.5,0,10-4.5,10-10S17.5,2,12,2z M12,20c-4.4,0-8-3.6-8-8s3.6-8,8-8c4.4,0,8,3.6,8,8S16.4,20,12,20z M13,16h2V8h-2V16z"/></g> -<g id="play-arrow"><polygon points="8,5 8,19 19,12 "/></g> -<g id="play-circle-fill"><path d="M12,2C6.5,2,2,6.5,2,12s4.5,10,10,10c5.5,0,10-4.5,10-10S17.5,2,12,2z M10,16.5v-9l6,4.5L10,16.5z"/></g> -<g id="play-circle-outline"><path d="M10,16.5l6-4.5l-6-4.5V16.5z M12,2C6.5,2,2,6.5,2,12s4.5,10,10,10c5.5,0,10-4.5,10-10S17.5,2,12,2z M12,20c-4.4,0-8-3.6-8-8s3.6-8,8-8c4.4,0,8,3.6,8,8S16.4,20,12,20z"/></g> -<g id="queue"><path d="M3,5H1v16c0,1.1,0.9,2,2,2h16v-2H3V5z M21,1H7C5.9,1,5,1.9,5,3v14c0,1.1,0.9,2,2,2h14c1.1,0,2-0.9,2-2V3C23,1.9,22.1,1,21,1z M19,11h-4v4h-2v-4H9V9h4V5h2v4h4V11z"/></g> -<g id="replay"><path d="M12,5V1L7,6l5,5V7c3.3,0,6,2.7,6,6s-2.7,6-6,6c-3.3,0-6-2.7-6-6H4c0,4.4,3.6,8,8,8c4.4,0,8-3.6,8-8S16.4,5,12,5z"/></g> -<g id="shuffle"><path d="M10.6,9.2L5.4,4L4,5.4l5.2,5.2L10.6,9.2z M14.5,4l2,2L4,18.6L5.4,20L18,7.5l2,2V4H14.5z M14.8,13.4l-1.4,1.4l3.1,3.1l-2,2H20v-5.5l-2,2L14.8,13.4z"/></g> -<g id="skip-next"><path d="M6,18l8.5-6L6,6V18z M16,6v12h2V6H16z"/></g> -<g id="skip-previous"><rect x="6" y="6" width="2" height="12"/><polygon points="9.5,12 18,18 18,6 "/></g> -<g id="stop"><rect x="6" y="6" width="12" height="12"/></g> -<g id="videocam"><path d="M17,10.5V7c0-0.6-0.4-1-1-1H4C3.4,6,3,6.4,3,7v10c0,0.6,0.4,1,1,1h12c0.6,0,1-0.4,1-1v-3.5l4,4v-11L17,10.5z"/></g> -<g id="videocam-off"><path d="M21,6.5l-4,4V7c0-0.6-0.4-1-1-1H9.8L21,17.2V6.5z M3.3,2L2,3.3L4.7,6H4C3.4,6,3,6.4,3,7v10c0,0.6,0.4,1,1,1h12c0.2,0,0.4-0.1,0.5-0.2l3.2,3.2l1.3-1.3L3.3,2z"/></g> -<g id="video-youtube"><path d="M20,4.4C19.4,4.2,15.7,4,12,4C8.3,4,4.6,4.2,4,4.4c-1.6,0.5-2,4-2,7.6s0.4,7.1,2,7.6c0.6,0.2,4.3,0.4,8,0.4c3.7,0,7.4-0.2,8-0.4c1.6-0.5,2-4,2-7.6S21.6,4.9,20,4.4z M10,16.5v-9l6,4.5L10,16.5z"/></g> -<g id="volume-down"><path d="M18.5,12c0-1.8-1-3.3-2.5-4V16C17.5,15.3,18.5,13.8,18.5,12z M5,9c0,0,0,6,0,6h4l5,5V4L9,9H5z"/></g> -<g id="volume-mute"><path d="M7,9c0,0,0,6,0,6h4l5,5V4l-5,5H7z"/></g> -<g id="volume-off"><path d="M16.5,12c0-1.8-1-3.3-2.5-4v2.2l2.5,2.5C16.5,12.4,16.5,12.2,16.5,12z M19,12c0,0.9-0.2,1.8-0.5,2.6l1.5,1.5c0.7-1.2,1-2.7,1-4.2c0-4.3-3-7.9-7-8.8v2.1C16.9,6.2,19,8.8,19,12z M4.3,3L3,4.3L7.7,9H3c0,0,0,6,0,6h4l5,5v-6.7l4.3,4.3c-0.7,0.5-1.4,0.9-2.3,1.2v2.1c1.4-0.3,2.6-0.9,3.7-1.8l2,2l1.3-1.3l-9-9L4.3,3z M12,4L9.9,6.1L12,8.2V4z"/></g> -<g id="volume-up"><path d="M3,9c0,0,0,6,0,6h4l5,5V4L7,9H3z M16.5,12c0-1.8-1-3.3-2.5-4V16C15.5,15.3,16.5,13.8,16.5,12z M14,3.2v2.1c2.9,0.9,5,3.5,5,6.7s-2.1,5.8-5,6.7v2.1c4-0.9,7-4.5,7-8.8S18,4.1,14,3.2z"/></g> -<g id="web"><path d="M20,4H4C2.9,4,2,4.9,2,6l0,12c0,1.1,0.9,2,2,2h16c1.1,0,2-0.9,2-2V6C22,4.9,21.1,4,20,4z M15,18H4v-4h11V18z M15,13H4V9h11V13z M20,18h-4V9h4V18z"/></g> -</defs></svg> -</core-iconset-svg> diff --git a/third_party/polymer/components/core-icons/bower.json b/third_party/polymer/components/core-icons/bower.json deleted file mode 100644 index 72efca9..0000000 --- a/third_party/polymer/components/core-icons/bower.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "name": "core-icons", - "private": true, - "dependencies": { - "core-icon": "Polymer/core-icon#>=0.3.0 <1.0.0", - "core-iconset-svg": "Polymer/core-iconset-svg#>=0.3.0 <1.0.0", - "polymer": "Polymer/polymer#>=0.3.0 <1.0.0" - } -}
\ No newline at end of file diff --git a/third_party/polymer/components/core-icons/communication-icons.html b/third_party/polymer/components/core-icons/communication-icons.html deleted file mode 100644 index 32191cc..0000000 --- a/third_party/polymer/components/core-icons/communication-icons.html +++ /dev/null @@ -1,55 +0,0 @@ -<!-- -Copyright (c) 2014 The Polymer Project Authors. All rights reserved. -This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt -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 ---> - -<link rel="import" href="../core-icon/core-icon.html"> -<link rel="import" href="../core-iconset-svg/core-iconset-svg.html"> -<core-iconset-svg id="communication" iconSize="24"> -<svg><defs> -<g id="call"><path d="M6.6,10.8c1.4,2.8,3.8,5.1,6.6,6.6l2.2-2.2c0.3-0.3,0.7-0.4,1-0.2c1.1,0.4,2.3,0.6,3.6,0.6c0.6,0,1,0.4,1,1V20c0,0.6-0.4,1-1,1C10.6,21,3,13.4,3,4c0-0.6,0.4-1,1-1h3.5c0.6,0,1,0.4,1,1c0,1.2,0.2,2.4,0.6,3.6c0.1,0.3,0,0.7-0.2,1L6.6,10.8z"/></g> -<g id="call-end"><path d="M12,9c-1.6,0-3.1,0.3-4.6,0.7l0,3.1c0,0.4-0.2,0.7-0.6,0.9c-1,0.5-1.9,1.1-2.7,1.9c-0.2,0.2-0.4,0.3-0.7,0.3c-0.3,0-0.5-0.1-0.7-0.3l-2.5-2.5C0.1,12.9,0,12.7,0,12.4c0-0.3,0.1-0.5,0.3-0.7C3.3,8.8,7.5,7,12,7s8.7,1.8,11.7,4.7c0.2,0.2,0.3,0.4,0.3,0.7c0,0.3-0.1,0.5-0.3,0.7l-2.5,2.5c-0.2,0.2-0.4,0.3-0.7,0.3c-0.3,0-0.5-0.1-0.7-0.3c-0.8-0.7-1.7-1.4-2.7-1.9c-0.3-0.2-0.6-0.5-0.6-0.9l0-3.1C15.1,9.3,13.6,9,12,9z"/></g> -<g id="call-made"><polygon points="9,5 9,7 15.6,7 3,19.6 4.4,21 17,8.4 17,15 19,15 19,5 "/></g> -<g id="call-merge"><path d="M17,20.4l1.4-1.4L15,15.6L13.6,17L17,20.4z M7.5,8H11v5.6L5.6,19L7,20.4l6-6V8h3.5L12,3.5L7.5,8z"/></g> -<g id="call-missed"><polygon points="19.6,7 12,14.6 6.4,9 11,9 11,7 3,7 3,15 5,15 5,10.4 12,17.4 21,8.4 "/></g> -<g id="call-received"><polygon points="21,4.4 19.6,3 7,15.6 7,9 5,9 5,19 15,19 15,17 8.4,17 "/></g> -<g id="call-split"><polygon points="14,4 16.3,6.3 13.4,9.2 14.8,10.6 17.7,7.7 20,10 20,4 "/><polygon points="10,4 4,4 4,10 6.3,7.7 11,12.4 11,20 13,20 13,11.6 7.7,6.3 "/></g> -<g id="chat"><path d="M20,2H4C2.9,2,2,2.9,2,4l0,18l4-4h14c1.1,0,2-0.9,2-2V4C22,2.9,21.1,2,20,2z M6,9h12v2H6V9z M14,14H6v-2h8V14z M18,8H6V6h12V8z"/></g> -<g id="clear-all"><path d="M5,13h14v-2H5V13z M3,17h14v-2H3V17z M7,7v2h14V7H7z"/></g> -<g id="comment"><path d="M22,4c0-1.1-0.9-2-2-2H4C2.9,2,2,2.9,2,4v12c0,1.1,0.9,2,2,2h14l4,4L22,4z M18,14H6v-2h12V14z M18,11H6V9h12V11z M18,8H6V6h12V8z"/></g> -<g id="contacts"><path d="M20,4H4C2.9,4,2,4.9,2,6v12c0,1.1,0.9,2,2,2h16c1.1,0,2-0.9,2-2V6C22,4.9,21.1,4,20,4z M12,6.8c1.2,0,2.2,1,2.2,2.2c0,1.2-1,2.2-2.2,2.2s-2.2-1-2.2-2.2C9.8,7.8,10.8,6.8,12,6.8z M17,17H7v-1.5c0-1.7,3.3-2.5,5-2.5s5,0.8,5,2.5V17z M18,0H6C4.9,0,4,0.9,4,2h16C20,0.9,19.1,0,18,0z M6,24h12c1.1,0,2-0.9,2-2H4C4,23.1,4.9,24,6,24z"/></g> -<g id="dialpad"><path d="M12,19c-1.1,0-2,0.9-2,2c0,1.1,0.9,2,2,2s2-0.9,2-2C14,19.9,13.1,19,12,19z M6,1C4.9,1,4,1.9,4,3c0,1.1,0.9,2,2,2s2-0.9,2-2C8,1.9,7.1,1,6,1z M6,7C4.9,7,4,7.9,4,9c0,1.1,0.9,2,2,2s2-0.9,2-2C8,7.9,7.1,7,6,7z M6,13c-1.1,0-2,0.9-2,2c0,1.1,0.9,2,2,2s2-0.9,2-2C8,13.9,7.1,13,6,13z M18,5c1.1,0,2-0.9,2-2c0-1.1-0.9-2-2-2s-2,0.9-2,2C16,4.1,16.9,5,18,5z M12,13c-1.1,0-2,0.9-2,2c0,1.1,0.9,2,2,2s2-0.9,2-2C14,13.9,13.1,13,12,13z M18,13c-1.1,0-2,0.9-2,2c0,1.1,0.9,2,2,2s2-0.9,2-2C20,13.9,19.1,13,18,13z M18,7c-1.1,0-2,0.9-2,2c0,1.1,0.9,2,2,2s2-0.9,2-2C20,7.9,19.1,7,18,7z M12,7c-1.1,0-2,0.9-2,2c0,1.1,0.9,2,2,2s2-0.9,2-2C14,7.9,13.1,7,12,7z M12,1c-1.1,0-2,0.9-2,2c0,1.1,0.9,2,2,2s2-0.9,2-2C14,1.9,13.1,1,12,1z"/></g> -<g id="dnd-on"><path d="M12,2C6.5,2,2,6.5,2,12c0,5.5,4.5,10,10,10c5.5,0,10-4.5,10-10C22,6.5,17.5,2,12,2z M12,20c-4.4,0-8-3.6-8-8c0-1.8,0.6-3.5,1.7-4.9l11.2,11.2C15.5,19.4,13.8,20,12,20z M18.3,16.9L7.1,5.7C8.5,4.6,10.2,4,12,4c4.4,0,8,3.6,8,8C20,13.8,19.4,15.5,18.3,16.9z"/></g> -<g id="email"><path d="M20,4H4C2.9,4,2,4.9,2,6l0,12c0,1.1,0.9,2,2,2h16c1.1,0,2-0.9,2-2V6C22,4.9,21.1,4,20,4z M20,8l-8,5L4,8V6l8,5l8-5V8z"/></g> -<g id="forum"><path d="M21,6h-2v9H6v2c0,0.6,0.4,1,1,1h11l4,4V7C22,6.4,21.6,6,21,6z M17,12V3c0-0.6-0.4-1-1-1H3C2.4,2,2,2.4,2,3v14l4-4h10C16.6,13,17,12.6,17,12z"/></g> -<g id="gmail"><path d="M20,4H4C2.9,4,2,4.9,2,6l0,12c0,1.1,0.9,2,2,2h16c1.1,0,2-0.9,2-2V6C22,4.9,21.1,4,20,4z M20,18h-2V9.2L12,13L6,9.2V18H4V6h1.2l6.8,4.2L18.8,6H20V18z"/></g> -<g id="hangout"><path d="M11.5,2C6.8,2,3,5.8,3,10.5S6.8,19,11.5,19H12v3.5c4.9-2.3,8-7.5,8-12C20,5.8,16.2,2,11.5,2z M11,11l-1,2H8.5l1-2H8V8h3V11z M15,11l-1,2h-1.5l1-2H12V8h3V11z"/></g> -<g id="hangout-video"><path d="M20,4H4C2.9,4,2,4.9,2,6v12c0,1.1,0.9,2,2,2h16c1.1,0,2-0.9,2-2V6C22,4.9,21.1,4,20,4z M18,16l-4-3.2V16H6V8h8v3.2L18,8V16z"/></g> -<g id="hangout-video-off"><path d="M20,4H7.8l4,4H14v2.2l0.6,0.6L18,8v6.2l4,4c0-0.1,0-0.1,0-0.2V6C22,4.9,21.1,4,20,4z M2.3,1L1,2.3l2,2C2.4,4.6,2,5.3,2,6v12c0,1.1,0.9,2,2,2h14.7l2,2l1.3-1.3L2.3,1z M6,8h0.7l7.3,7.3V16H6V8z"/></g> -<g id="import-export"><path d="M9,3L5,7h3v7h2V7h3L9,3z M16,17v-7h-2v7h-3l4,4l4-4H16z"/></g> -<g id="invert-colors-off"><path d="M20.6,20.9l-2.4-2.4L12,12.2L8.4,8.7L7,7.2L4.3,4.5L3,5.8l2.8,2.8c-2.5,3.1-2.4,7.8,0.6,10.7c1.6,1.6,3.6,2.3,5.7,2.3c1.8,0,3.6-0.6,5-1.8l2.7,2.7l1.3-1.3L20.6,20.9z M12,19.6c-1.6,0-3.1-0.6-4.2-1.8C6.6,16.7,6,15.2,6,13.6C6,12.3,6.4,11,7.2,10l4.8,4.8V19.6z M12,5.1v4.6l7.3,7.3c1.4-3,0.8-6.6-1.6-9L12,2.3l0,0v0L8.3,6l1.4,1.4L12,5.1z"/></g> -<g id="invert-colors-on"><path d="M17.7,7.9L12,2.3l0,0v0L6.3,7.9c-3.1,3.1-3.1,8.2,0,11.3c1.6,1.6,3.6,2.3,5.7,2.3s4.1-0.8,5.7-2.3C20.8,16.1,20.8,11.1,17.7,7.9z M12,19.6L12,19.6c-1.6,0-3.1-0.6-4.2-1.8C6.6,16.7,6,15.2,6,13.6s0.6-3.1,1.8-4.2L12,5.1L12,19.6z"/></g> -<g id="live-help"><path d="M19,2H5C3.9,2,3,2.9,3,4v14c0,1.1,0.9,2,2,2h4l3,3l3-3h4c1.1,0,2-0.9,2-2V4C21,2.9,20.1,2,19,2z M13,18h-2v-2h2V18z M15.1,10.3l-0.9,0.9C13.4,11.9,13,12.5,13,14h-2v-0.5c0-1.1,0.4-2.1,1.2-2.8l1.2-1.3C13.8,9.1,14,8.6,14,8c0-1.1-0.9-2-2-2c-1.1,0-2,0.9-2,2H8c0-2.2,1.8-4,4-4s4,1.8,4,4C16,8.9,15.6,9.7,15.1,10.3z"/></g> -<g id="location-off"><polygon points="11.7,11.5 11.7,11.5 11.6,11.4 "/><path d="M12,6.5c1.4,0,2.5,1.1,2.5,2.5c0,0.7-0.3,1.4-0.8,1.9l3.6,3.6c1-1.9,1.7-3.8,1.7-5.5c0-3.9-3.1-7-7-7c-2,0-3.8,0.8-5,2.1l3.2,3.2C10.6,6.8,11.3,6.5,12,6.5z M16.4,16.1l-4.6-4.6l-0.1-0.1L3.3,3L2,4.3l3.2,3.2C5.1,8,5,8.5,5,9c0,5.2,7,13,7,13s1.7-1.9,3.4-4.4l3.4,3.4l1.3-1.3L16.4,16.1z"/></g> -<g id="location-on"><path d="M12,2C8.1,2,5,5.1,5,9c0,5.2,7,13,7,13s7-7.8,7-13C19,5.1,15.9,2,12,2z M12,11.5c-1.4,0-2.5-1.1-2.5-2.5s1.1-2.5,2.5-2.5c1.4,0,2.5,1.1,2.5,2.5S13.4,11.5,12,11.5z"/></g> -<g id="message"><path d="M20,2H4C2.9,2,2,2.9,2,4l0,18l4-4h14c1.1,0,2-0.9,2-2V4C22,2.9,21.1,2,20,2z M18,14H6v-2h12V14z M18,11H6V9h12V11z M18,8H6V6h12V8z"/></g> -<g id="messenger"><path d="M20,2H4C2.9,2,2,2.9,2,4v18l4-4h14c1.1,0,2-0.9,2-2V4C22,2.9,21.1,2,20,2z"/></g> -<g id="no-sim"><path d="M19,5c0-1.1-0.9-2-2-2h-7L7.7,5.3L19,16.7L19,5z M3.7,3.9L2.4,5.2L5,7.8V19c0,1.1,0.9,2,2,2h10c0.4,0,0.7-0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0,0.5-0.1,0.7-0.3c0.8-0.7,1.7-1.4,2.7-1.9c0.3-0.2,0.6-0.5,0.6-0.9l0-3.1c1.4-0.5,3-0.7,4.6-0.7s3.1,0.3,4.6,0.7l0,3.1c0,0.4,0.2,0.7,0.6,0.9c1,0.5,1.9,1.1,2.7,1.9c0.2,0.2,0.4,0.3,0.7,0.3c0.3,0,0.5-0.1,0.7-0.3l2.5-2.5c0.2-0.2,0.3-0.4,0.3-0.7C24,17.1,23.9,16.9,23.7,16.7z M21.2,6.3l-1.4-1.4l-3.6,3.6l1.4,1.4C17.6,9.8,21,6.3,21.2,6.3z M13,2h-2v5h2V2z M6.4,9.8l1.4-1.4L4.3,4.8L2.8,6.3C3,6.3,6.4,9.8,6.4,9.8z"/></g> -<g id="search-hands-free"><path d="M12,2C6.5,2,2,6.5,2,12s4.5,10,10,10s10-4.5,10-10S17.5,2,12,2z M11,19.9c-3.6-0.5-6.5-3.3-6.9-6.9h3c0.4,2,1.9,3.5,3.9,3.9V19.9z M10,8l-3,3H4.1C4.6,7.1,7.9,4,12,4s7.4,3.1,7.9,7H17l-3-3H10z M13,19.9v-3c2-0.4,3.5-1.9,3.9-3.9h3C19.5,16.6,16.6,19.5,13,19.9z"/></g> -<g id="stay-current-landscape"><path d="M1,7l0,10c0,1.1,0.9,2,2,2h18c1.1,0,2-0.9,2-2V7c0-1.1-0.9-2-2-2H3C1.9,5,1,5.9,1,7z M19,7v10H5V7H19z"/></g> -<g id="stay-current-portrait"><path d="M17,1L7,1C5.9,1,5,1.9,5,3v18c0,1.1,0.9,2,2,2h10c1.1,0,2-0.9,2-2V3C19,1.9,18.1,1,17,1z M17,19H7V5h10V19z"/></g> -<g id="stay-primary-landscape"><path d="M1,7l0,10c0,1.1,0.9,2,2,2h18c1.1,0,2-0.9,2-2V7c0-1.1-0.9-2-2-2H3C1.9,5,1,5.9,1,7z M19,7v10H5V7H19z"/></g> -<g id="stay-primary-portrait"><path d="M17,1L7,1C5.9,1,5,1.9,5,3v18c0,1.1,0.9,2,2,2h10c1.1,0,2-0.9,2-2V3C19,1.9,18.1,1,17,1z M17,19H7V5h10V19z"/></g> -<g id="swap-calls"><path d="M18,4l-4,4h3v7c0,1.1-0.9,2-2,2s-2-0.9-2-2V8c0-2.2-1.8-4-4-4S5,5.8,5,8v7H2l4,4l4-4H7V8c0-1.1,0.9-2,2-2s2,0.9,2,2v7c0,2.2,1.8,4,4,4s4-1.8,4-4V8h3L18,4z"/></g> -<g id="textsms"><path d="M20,2H4C2.9,2,2,2.9,2,4l0,18l4-4h14c1.1,0,2-0.9,2-2V4C22,2.9,21.1,2,20,2z M9,11H7V9h2V11z M13,11h-2V9h2V11z M17,11h-2V9h2V11z"/></g> -<g id="voicemail"><path d="M18.5,6c-3,0-5.5,2.5-5.5,5.5c0,1.3,0.5,2.5,1.3,3.5H9.7c0.8-1,1.3-2.2,1.3-3.5C11,8.5,8.5,6,5.5,6S0,8.5,0,11.5S2.5,17,5.5,17h13c3,0,5.5-2.5,5.5-5.5S21.5,6,18.5,6z M5.5,15C3.6,15,2,13.4,2,11.5C2,9.6,3.6,8,5.5,8C7.4,8,9,9.6,9,11.5C9,13.4,7.4,15,5.5,15z M18.5,15c-1.9,0-3.5-1.6-3.5-3.5C15,9.6,16.6,8,18.5,8c1.9,0,3.5,1.6,3.5,3.5C22,13.4,20.4,15,18.5,15z"/></g> -<g id="vpn"><path d="M12.7,10c-0.8-2.3-3-4-5.7-4c-3.3,0-6,2.7-6,6s2.7,6,6,6c2.6,0,4.8-1.7,5.7-4H17v4h4v-4h2v-4H12.7z M7,14c-1.1,0-2-0.9-2-2c0-1.1,0.9-2,2-2s2,0.9,2,2C9,13.1,8.1,14,7,14z"/></g> -</defs></svg> -</core-iconset-svg> diff --git a/third_party/polymer/components/core-icons/core-icons.html b/third_party/polymer/components/core-icons/core-icons.html deleted file mode 100644 index 0395946..0000000 --- a/third_party/polymer/components/core-icons/core-icons.html +++ /dev/null @@ -1,226 +0,0 @@ -<!-- -Copyright (c) 2014 The Polymer Project Authors. All rights reserved. -This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt -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 ---> - -<link rel="import" href="../core-icon/core-icon.html"> -<link rel="import" href="../core-iconset-svg/core-iconset-svg.html"> -<core-iconset-svg id="icons" iconSize="24"> -<svg><defs> -<g id="accessibility"><path d="M12,2c1.1,0,2,0.9,2,2s-0.9,2-2,2s-2-0.9-2-2S10.9,2,12,2z M21,9h-6v13h-2v-6h-2v6H9V9H3V7h18V9z"/></g> -<g id="account-balance"><path d="M4,10v7h3v-7H4z M10,10v7h3v-7H10z M2,22h19v-3H2V22z M16,10v7h3v-7H16z M11.5,1L2,6v2h19V6L11.5,1z"/></g> -<g id="account-box"><path d="M3,5l0,14c0,1.1,0.9,2,2,2h14c1.1,0,2-0.9,2-2V5c0-1.1-0.9-2-2-2H5C3.9,3,3,3.9,3,5z M15,9c0,1.7-1.3,3-3,3c-1.7,0-3-1.3-3-3c0-1.7,1.3-3,3-3C13.7,6,15,7.3,15,9z M6,17c0-2,4-3.1,6-3.1s6,1.1,6,3.1v1H6V17z"/></g> -<g id="account-circle"><path d="M12,2C6.5,2,2,6.5,2,12s4.5,10,10,10c5.5,0,10-4.5,10-10S17.5,2,12,2z M12,5c1.7,0,3,1.3,3,3c0,1.7-1.3,3-3,3c-1.7,0-3-1.3-3-3C9,6.3,10.3,5,12,5z M12,19.2c-2.5,0-4.7-1.3-6-3.2c0-2,4-3.1,6-3.1c2,0,6,1.1,6,3.1C16.7,17.9,14.5,19.2,12,19.2z"/></g> -<g id="add"><path d="M19,13h-6v6h-2v-6H5v-2h6V5h2v6h6V13z"/></g> -<g id="add-box"><path d="M19,3H5C3.9,3,3,3.9,3,5v14c0,1.1,0.9,2,2,2h14c1.1,0,2-0.9,2-2V5C21,3.9,20.1,3,19,3z M17,13h-4v4h-2v-4H7v-2h4V7h2v4h4V13z"/></g> -<g id="add-circle"><path d="M12,2C6.5,2,2,6.5,2,12s4.5,10,10,10c5.5,0,10-4.5,10-10S17.5,2,12,2z M17,13h-4v4h-2v-4H7v-2h4V7h2v4h4V13z"/></g> -<g id="add-circle-outline"><path d="M13,7h-2v4H7v2h4v4h2v-4h4v-2h-4V7z M12,2C6.5,2,2,6.5,2,12s4.5,10,10,10c5.5,0,10-4.5,10-10S17.5,2,12,2z M12,20c-4.4,0-8-3.6-8-8s3.6-8,8-8c4.4,0,8,3.6,8,8S16.4,20,12,20z"/></g> -<g id="add-shopping-cart"><polygon points="18.3,6 18.3,6 15.6,11 "/><path d="M11,9h2V6h3V4h-3V1h-2v3H8v2h3V9z M7,18c-1.1,0-2,0.9-2,2s0.9,2,2,2s2-0.9,2-2S8.1,18,7,18z M17,18c-1.1,0-2,0.9-2,2s0.9,2,2,2s2-0.9,2-2S18.1,18,17,18z M7.2,14.8c0,0,0-0.1,0-0.1L8.1,13h7.4c0.8,0,1.4-0.4,1.7-1l3.9-7l-1.7-1h0l-1.1,2l-2.8,5h-7l-0.1-0.3L6.2,6L5.2,4L4.3,2H1v2h2l3.6,7.6L5.2,14C5.1,14.3,5,14.7,5,15c0,1.1,0.9,2,2,2h12v-2H7.4C7.3,15,7.2,14.9,7.2,14.8z"/></g> -<g id="android"><path d="M6,18c0,0.6,0.4,1,1,1h1v3.5C8,23.3,8.7,24,9.5,24c0.8,0,1.5-0.7,1.5-1.5V19h2v3.5c0,0.8,0.7,1.5,1.5,1.5c0.8,0,1.5-0.7,1.5-1.5V19h1c0.6,0,1-0.4,1-1V8H6V18z M3.5,8C2.7,8,2,8.7,2,9.5v7C2,17.3,2.7,18,3.5,18C4.3,18,5,17.3,5,16.5v-7C5,8.7,4.3,8,3.5,8z M20.5,8C19.7,8,19,8.7,19,9.5v7c0,0.8,0.7,1.5,1.5,1.5c0.8,0,1.5-0.7,1.5-1.5v-7C22,8.7,21.3,8,20.5,8z M15.5,2.2l1.3-1.3c0.2-0.2,0.2-0.5,0-0.7c-0.2-0.2-0.5-0.2-0.7,0l-1.5,1.5C13.9,1.2,13,1,12,1c-1,0-1.9,0.2-2.7,0.6L7.9,0.1C7.7,0,7.3,0,7.1,0.1C7,0.3,7,0.7,7.1,0.9l1.3,1.3C7,3.3,6,5,6,7h12C18,5,17,3.2,15.5,2.2z M10,5H9V4h1V5z M15,5h-1V4h1V5z"/></g> -<g id="apps"><path d="M4,8h4V4H4V8z M10,20h4v-4h-4V20z M4,20h4v-4H4V20z M4,14h4v-4H4V14z M10,14h4v-4h-4V14z M16,4v4h4V4H16z M10,8h4V4h-4V8z M16,14h4v-4h-4V14z M16,20h4v-4h-4V20z"/></g> -<g id="archive"><path d="M20.5,5.2l-1.4-1.7C18.9,3.2,18.5,3,18,3H6C5.5,3,5.1,3.2,4.8,3.5L3.5,5.2C3.2,5.6,3,6,3,6.5V19c0,1.1,0.9,2,2,2h14c1.1,0,2-0.9,2-2V6.5C21,6,20.8,5.6,20.5,5.2z M12,17.5L6.5,12H10v-2h4v2h3.5L12,17.5z M5.1,5l0.8-1h12l0.9,1H5.1z"/></g> -<g id="arrow-back"><path d="M20,11H7.8l5.6-5.6L12,4l-8,8l8,8l1.4-1.4L7.8,13H20V11z"/></g> -<g id="arrow-drop-down"><polygon points="7,10 12,15 17,10 "/></g> -<g id="arrow-drop-down-circle"><path d="M12,2C6.5,2,2,6.5,2,12s4.5,10,10,10c5.5,0,10-4.5,10-10S17.5,2,12,2z M12,14l-4-4h8L12,14z"/></g> -<g id="arrow-drop-up"><polygon points="7,14 12,9 17,14 "/></g> -<g id="arrow-forward"><polygon points="12,4 10.6,5.4 16.2,11 4,11 4,13 16.2,13 10.6,18.6 12,20 20,12 "/></g> -<g id="aspect-ratio"><path d="M19,12h-2v3h-3v2h5V12z M7,9h3V7H5v5h2V9z M21,3H3C1.9,3,1,3.9,1,5v14c0,1.1,0.9,2,2,2h18c1.1,0,2-0.9,2-2V5C23,3.9,22.1,3,21,3z M21,19H3V5h18V19z"/></g> -<g id="attachment"><path d="M7.5,18c-3,0-5.5-2.5-5.5-5.5S4.5,7,7.5,7H18c2.2,0,4,1.8,4,4s-1.8,4-4,4H9.5C8.1,15,7,13.9,7,12.5S8.1,10,9.5,10H17v1.5H9.5c-0.6,0-1,0.4-1,1s0.4,1,1,1H18c1.4,0,2.5-1.1,2.5-2.5S19.4,8.5,18,8.5H7.5c-2.2,0-4,1.8-4,4s1.8,4,4,4H17V18H7.5z"/></g> -<g id="backspace"><path d="M22,3H7C6.3,3,5.8,3.3,5.4,3.9L0,12l5.4,8.1C5.8,20.6,6.3,21,7,21h15c1.1,0,2-0.9,2-2V5C24,3.9,23.1,3,22,3z M19,15.6L17.6,17L14,13.4L10.4,17L9,15.6l3.6-3.6L9,8.4L10.4,7l3.6,3.6L17.6,7L19,8.4L15.4,12L19,15.6z"/></g> -<g id="backup"><path d="M19.4,10c-0.7-3.4-3.7-6-7.4-6C9.1,4,6.6,5.6,5.4,8C2.3,8.4,0,10.9,0,14c0,3.3,2.7,6,6,6h13c2.8,0,5-2.2,5-5C24,12.4,21.9,10.2,19.4,10z M14,13v4h-4v-4H7l5-5l5,5H14z"/></g> -<g id="block"><path d="M12,2C6.5,2,2,6.5,2,12s4.5,10,10,10c5.5,0,10-4.5,10-10S17.5,2,12,2z M4,12c0-4.4,3.6-8,8-8c1.8,0,3.5,0.6,4.9,1.7L5.7,16.9C4.6,15.5,4,13.8,4,12z M12,20c-1.8,0-3.5-0.6-4.9-1.7L18.3,7.1C19.4,8.5,20,10.2,20,12C20,16.4,16.4,20,12,20z"/></g> -<g id="book"><path d="M18,22c1.1,0,2-0.9,2-2V4c0-1.1-0.9-2-2-2h-6v7L9.5,7.5L7,9V2H6C4.9,2,4,2.9,4,4v16c0,1.1,0.9,2,2,2H18z"/></g> -<g id="bookmark"><path d="M17,3H7C5.9,3,5,3.9,5,5l0,16l7-3l7,3V5C19,3.9,18.1,3,17,3z"/></g> -<g id="bookmark-outline"><path d="M17,3H7C5.9,3,5,3.9,5,5l0,16l7-3l7,3V5C19,3.9,18.1,3,17,3z M17,18l-5-2.2L7,18V5h10V18z"/></g> -<g id="bug-report"><path d="M20,8h-2.8c-0.5-0.8-1.1-1.5-1.8-2L17,4.4L15.6,3l-2.2,2.2C13,5.1,12.5,5,12,5s-1,0.1-1.4,0.2L8.4,3L7,4.4L8.6,6C7.9,6.5,7.3,7.2,6.8,8H4v2h2.1C6,10.3,6,10.7,6,11v1H4v2h2v1c0,0.3,0,0.7,0.1,1H4v2h2.8c1,1.8,3,3,5.2,3s4.2-1.2,5.2-3H20v-2h-2.1c0.1-0.3,0.1-0.7,0.1-1v-1h2v-2h-2v-1c0-0.3,0-0.7-0.1-1H20V8z M14,16h-4v-2h4V16z M14,12h-4v-2h4V12z"/></g> -<g id="cancel"><path d="M12,2C6.5,2,2,6.5,2,12s4.5,10,10,10c5.5,0,10-4.5,10-10S17.5,2,12,2z M17,15.6L15.6,17L12,13.4L8.4,17L7,15.6l3.6-3.6L7,8.4L8.4,7l3.6,3.6L15.6,7L17,8.4L13.4,12L17,15.6z"/></g> -<g id="check"><polygon points="9,16.2 4.8,12 3.4,13.4 9,19 21,7 19.6,5.6 "/></g> -<g id="check-box"><path d="M19,3H5C3.9,3,3,3.9,3,5v14c0,1.1,0.9,2,2,2h14c1.1,0,2-0.9,2-2V5C21,3.9,20.1,3,19,3z M10,17l-5-5l1.4-1.4l3.6,3.6l7.6-7.6L19,8L10,17z"/></g> -<g id="check-box-blank"><path d="M19,3H5C3.9,3,3,3.9,3,5l0,14c0,1.1,0.9,2,2,2h14c1.1,0,2-0.9,2-2V5C21,3.9,20.1,3,19,3z"/></g> -<g id="check-box-outline"><path d="M7.9,10.1l-1.4,1.4L11,16L21,6l-1.4-1.4L11,13.2L7.9,10.1z M19,19L5,19V5h10V3H5C3.9,3,3,3.9,3,5v14c0,1.1,0.9,2,2,2h14c1.1,0,2-0.9,2-2v-8h-2V19z"/></g> -<g id="check-box-outline-blank"><path d="M19,5v14L5,19V5H19 M19,3H5C3.9,3,3,3.9,3,5v14c0,1.1,0.9,2,2,2h14c1.1,0,2-0.9,2-2V5C21,3.9,20.1,3,19,3L19,3z"/></g> -<g id="check-circle"><path d="M12,2C6.5,2,2,6.5,2,12c0,5.5,4.5,10,10,10c5.5,0,10-4.5,10-10C22,6.5,17.5,2,12,2z M10,17l-5-5l1.4-1.4l3.6,3.6l7.6-7.6L19,8L10,17z"/></g> -<g id="check-circle-blank"><path d="M12,2C6.5,2,2,6.5,2,12c0,5.5,4.5,10,10,10c5.5,0,10-4.5,10-10C22,6.5,17.5,2,12,2z"/></g> -<g id="check-circle-outline"><path d="M7.9,10.1l-1.4,1.4L11,16L21,6l-1.4-1.4L11,13.2L7.9,10.1z M20,12c0,4.4-3.6,8-8,8s-8-3.6-8-8s3.6-8,8-8c0.8,0,1.5,0.1,2.2,0.3l1.6-1.6C14.6,2.3,13.3,2,12,2C6.5,2,2,6.5,2,12s4.5,10,10,10s10-4.5,10-10H20z"/></g> -<g id="check-circle-outline-blank"><path d="M12,2C6.5,2,2,6.5,2,12s4.5,10,10,10c5.5,0,10-4.5,10-10S17.5,2,12,2z M12,20c-4.4,0-8-3.6-8-8s3.6-8,8-8c4.4,0,8,3.6,8,8S16.4,20,12,20z"/></g> -<g id="chevron-left"><polygon points="15.4,7.4 14,6 8,12 14,18 15.4,16.6 10.8,12 "/></g> -<g id="chevron-right"><polygon points="10,6 8.6,7.4 13.2,12 8.6,16.6 10,18 16,12 "/></g> -<g id="clear"><polygon points="19,6.4 17.6,5 12,10.6 6.4,5 5,6.4 10.6,12 5,17.6 6.4,19 12,13.4 17.6,19 19,17.6 13.4,12 "/></g> -<g id="close"><polygon points="19,6.4 17.6,5 12,10.6 6.4,5 5,6.4 10.6,12 5,17.6 6.4,19 12,13.4 17.6,19 19,17.6 13.4,12 "/></g> -<g id="cloud"><path d="M19.4,10c-0.7-3.4-3.7-6-7.4-6C9.1,4,6.6,5.6,5.4,8C2.3,8.4,0,10.9,0,14c0,3.3,2.7,6,6,6h13c2.8,0,5-2.2,5-5C24,12.4,21.9,10.2,19.4,10z"/></g> -<g id="cloud-circle"><path d="M12,2C6.5,2,2,6.5,2,12c0,5.5,4.5,10,10,10c5.5,0,10-4.5,10-10C22,6.5,17.5,2,12,2z M16.5,16c0,0-8.5,0-8.5,0c-1.7,0-3-1.3-3-3s1.3-3,3-3c0,0,0.1,0,0.1,0c0.4-1.7,2-3,3.9-3c2.2,0,4,1.8,4,4h0.5c1.4,0,2.5,1.1,2.5,2.5C19,14.9,17.9,16,16.5,16z"/></g> -<g id="cloud-done"><path d="M19.4,10c-0.7-3.4-3.7-6-7.4-6C9.1,4,6.6,5.6,5.4,8C2.3,8.4,0,10.9,0,14c0,3.3,2.7,6,6,6h13c2.8,0,5-2.2,5-5C24,12.4,21.9,10.2,19.4,10z M10,17l-3.5-3.5l1.4-1.4l2.1,2.1L15.2,9l1.4,1.4L10,17z"/></g> -<g id="cloud-download"><path d="M19.4,10c-0.7-3.4-3.7-6-7.4-6C9.1,4,6.6,5.6,5.4,8C2.3,8.4,0,10.9,0,14c0,3.3,2.7,6,6,6h13c2.8,0,5-2.2,5-5C24,12.4,21.9,10.2,19.4,10z M17,13l-5,5l-5-5h3V9h4v4H17z"/></g> -<g id="cloud-off"><path d="M19.4,10c-0.7-3.4-3.7-6-7.4-6c-1.5,0-2.9,0.4-4,1.2l1.5,1.5C10.2,6.2,11.1,6,12,6c3,0,5.5,2.5,5.5,5.5V12H19c1.7,0,3,1.3,3,3c0,1.1-0.6,2.1-1.6,2.6l1.5,1.5c1.3-0.9,2.1-2.4,2.1-4.1C24,12.4,21.9,10.2,19.4,10z M3,5.3L5.8,8C2.6,8.2,0,10.8,0,14c0,3.3,2.7,6,6,6h11.7l2,2l1.3-1.3L4.3,4L3,5.3z M7.7,10l8,8H6c-2.2,0-4-1.8-4-4c0-2.2,1.8-4,4-4H7.7z"/></g> -<g id="cloud-queue"><path d="M19.4,10c-0.7-3.4-3.7-6-7.4-6C9.1,4,6.6,5.6,5.4,8C2.3,8.4,0,10.9,0,14c0,3.3,2.7,6,6,6h13c2.8,0,5-2.2,5-5C24,12.4,21.9,10.2,19.4,10z M19,18H6c-2.2,0-4-1.8-4-4c0-2.2,1.8-4,4-4h0.7C7.4,7.7,9.5,6,12,6c3,0,5.5,2.5,5.5,5.5V12H19c1.7,0,3,1.3,3,3S20.7,18,19,18z"/></g> -<g id="cloud-upload"><path d="M19.4,10c-0.7-3.4-3.7-6-7.4-6C9.1,4,6.6,5.6,5.4,8C2.3,8.4,0,10.9,0,14c0,3.3,2.7,6,6,6h13c2.8,0,5-2.2,5-5C24,12.4,21.9,10.2,19.4,10z M14,13v4h-4v-4H7l5-5l5,5H14z"/></g> -<g id="content-copy"><path d="M16,1H4C2.9,1,2,1.9,2,3v14h2V3h12V1z M19,5H8C6.9,5,6,5.9,6,7v14c0,1.1,0.9,2,2,2h11c1.1,0,2-0.9,2-2V7C21,5.9,20.1,5,19,5z M19,21H8V7h11V21z"/></g> -<g id="content-cut"><path d="M10,6c0-2.2-1.8-4-4-4S2,3.8,2,6c0,2.2,1.8,4,4,4c0.6,0,1.1-0.1,1.6-0.4L10,12l-2.4,2.4C7.1,14.1,6.6,14,6,14c-2.2,0-4,1.8-4,4c0,2.2,1.8,4,4,4s4-1.8,4-4c0-0.6-0.1-1.1-0.4-1.6L12,14l7,7h4L9.6,7.6C9.9,7.1,10,6.6,10,6z M6,8C4.9,8,4,7.1,4,6s0.9-2,2-2c1.1,0,2,0.9,2,2S7.1,8,6,8z M6,20c-1.1,0-2-0.9-2-2s0.9-2,2-2c1.1,0,2,0.9,2,2S7.1,20,6,20z M12,11.5c0.3,0,0.5,0.2,0.5,0.5c0,0.3-0.2,0.5-0.5,0.5c-0.3,0-0.5-0.2-0.5-0.5C11.5,11.7,11.7,11.5,12,11.5z M23,3h-4l-6,6l2,2L23,3z"/></g> -<g id="content-paste"><path d="M19,2h-4.2c-0.4-1.2-1.5-2-2.8-2c-1.3,0-2.4,0.8-2.8,2H5C3.9,2,3,2.9,3,4v16c0,1.1,0.9,2,2,2h14c1.1,0,2-0.9,2-2V4C21,2.9,20.1,2,19,2z M12,2c0.6,0,1,0.4,1,1s-0.4,1-1,1c-0.6,0-1-0.4-1-1S11.4,2,12,2z M19,20H5V4h2v3h10V4h2V20z"/></g> -<g id="create"><path d="M3,17.2V21h3.8L17.8,9.9l-3.8-3.8L3,17.2z M20.7,7c0.4-0.4,0.4-1,0-1.4l-2.3-2.3c-0.4-0.4-1-0.4-1.4,0l-1.8,1.8l3.8,3.8L20.7,7z"/></g> -<g id="credit-card"><path d="M20,4H4C2.9,4,2,4.9,2,6v12c0,1.1,0.9,2,2,2h16c1.1,0,2-0.9,2-2V6C22,4.9,21.1,4,20,4z M20,18H4v-6h16V18z M20,8H4V6h16V8z"/></g> -<g id="delete"><path d="M6,19c0,1.1,0.9,2,2,2h8c1.1,0,2-0.9,2-2V7H6V19z M19,4h-3.5l-1-1h-5l-1,1H5v2h14V4z"/></g> -<g id="developer-mode-tv"><path d="M4,5h16v2h2l0-2c0-1.1-0.9-2-2-2H4C2.9,3,2,3.9,2,5v2h2V5z M7.6,13.8L4.7,11l2.8-2.8L6.1,6.8L1.9,11l4.2,4.2L7.6,13.8z M20,17H4v-2H2v2c0,1.1,0.9,2,2,2h4v2h8v-2h4c1.1,0,2-0.9,2-2l0-2h-2V17z M22,11l-4.2-4.2l-1.4,1.4l2.8,2.8l-2.8,2.8l1.4,1.4L22,11L22,11L22,11L22,11L22,11z"/></g> -<g id="done"><polygon points="9,16.2 4.8,12 3.4,13.4 9,19 21,7 19.6,5.6 "/></g> -<g id="done-all"><path d="M18,7l-1.4-1.4l-6.3,6.3l1.4,1.4L18,7z M22.2,5.6L11.7,16.2L7.5,12l-1.4,1.4l5.6,5.6l12-12L22.2,5.6z M0.4,13.4L6,19l1.4-1.4L1.8,12L0.4,13.4z"/></g> -<g id="drafts"><path d="M22,8c0-0.7-0.4-1.3-0.9-1.7L12,1L2.9,6.3C2.4,6.7,2,7.3,2,8v10c0,1.1,0.9,2,2,2h16c1.1,0,2-0.9,2-2L22,8z M12,13L3.7,7.8L12,3l8.3,4.8L12,13z"/></g> -<g id="drawer"><path d="M12,8c1.1,0,2-0.9,2-2s-0.9-2-2-2c-1.1,0-2,0.9-2,2S10.9,8,12,8z M12,10c-1.1,0-2,0.9-2,2s0.9,2,2,2c1.1,0,2-0.9,2-2S13.1,10,12,10z M12,16c-1.1,0-2,0.9-2,2s0.9,2,2,2c1.1,0,2-0.9,2-2S13.1,16,12,16z"/></g> -<g id="drive"><path d="M22.3,14L15.4,2H8.6l0,0l6.9,12H22.3z M9.7,15l-3.4,6h13.1l3.4-6H9.7z M7.7,3.5L1.2,15l3.4,6l6.6-11.5L7.7,3.5z"/></g> -<g id="drive-audio"><path d="M19,3H5C3.9,3,3,3.9,3,5v14c0,1.1,0.9,2,2,2h14c1.1,0,2-0.9,2-2V5C21,3.9,20.1,3,19,3z M7.2,18C6.5,18,6,17.5,6,16.8v-3.6V12c0-3.3,2.7-6,6-6s6,2.7,6,6v1.2v3.6c0,0.7-0.5,1.2-1.2,1.2H14v-4h2v-2c0-2.2-1.8-4-4-4s-4,1.8-4,4v2h2v4H7.2z"/></g> -<g id="drive-chart"><path d="M19,3H5C3.9,3,3,3.9,3,5v14c0,1.1,0.9,2,2,2h14c1.1,0,2-0.9,2-2V5C21,3.9,20.1,3,19,3z M9,17H7v-7h2V17z M13,17h-2V7h2V17z M17,17h-2v-4h2V17z"/></g> -<g id="drive-document"><path d="M19,3H5C3.9,3,3,3.9,3,5v14c0,1.1,0.9,2,2,2h14c1.1,0,2-0.9,2-2V5C21,3.9,20.1,3,19,3z M17,9H7V7h10V9z M17,13H7v-2h10V13z M14,17H7v-2h7V17z"/></g> -<g id="drive-drawing"><path d="M19,3H5C3.9,3,3,3.9,3,5v14c0,1.1,0.9,2,2,2h14c1.1,0,2-0.9,2-2V5C21,3.9,20.1,3,19,3z M18,18h-6v-5.8c-0.7,0.6-1.5,1-2.5,1c-2,0-3.7-1.7-3.7-3.7s1.7-3.7,3.7-3.7c2,0,3.7,1.7,3.7,3.7c0,1-0.4,1.8-1,2.5H18V18z"/></g> -<g id="drive-file"><path d="M6,2C4.9,2,4,2.9,4,4l0,16c0,1.1,0.9,2,2,2h12c1.1,0,2-0.9,2-2V8l-6-6H6z M13,9V3.5L18.5,9H13z"/></g> -<g id="drive-file-move"><path d="M20,6h-8l-2-2H4C2.9,4,2,4.9,2,6v12c0,1.1,0.9,2,2,2h16c1.1,0,2-0.9,2-2V8C22,6.9,21.1,6,20,6z M9,18v-3H5v-4h4V8l5,5L9,18z"/></g> -<g id="drive-file-rename"><path d="M19,3H5C3.9,3,3,3.9,3,5v14c0,1.1,0.9,2,2,2h14c1.1,0,2-0.9,2-2V5C21,3.9,20.1,3,19,3z M6,17v-2.5l7.9-7.9c0.2-0.2,0.5-0.2,0.7,0l1.8,1.8c0.2,0.2,0.2,0.5,0,0.7L8.5,17H6z M18,17h-7.5l2-2H18V17z"/></g> -<g id="drive-form"><path d="M19,3H5C3.9,3,3,3.9,3,5v14c0,1.1,0.9,2,2,2h14c1.1,0,2-0.9,2-2V5C21,3.9,20.1,3,19,3z M9,17H7v-2h2V17z M9,13H7v-2h2V13z M9,9H7V7h2V9z M17,17h-7v-2h7V17z M17,13h-7v-2h7V13z M17,9h-7V7h7V9z"/></g> -<g id="drive-fusiontable"><path d="M19,3H5C3.9,3,3,3.9,3,5v14c0,1.1,0.9,2,2,2h14c1.1,0,2-0.9,2-2V5C21,3.9,20.1,3,19,3z M19,10.2L13,17l-4-4l-4,4v-3l4-4l4,4l6-6.8V10.2z"/></g> -<g id="drive-image"><path d="M21,19V5c0-1.1-0.9-2-2-2H5C3.9,3,3,3.9,3,5v14c0,1.1,0.9,2,2,2h14C20.1,21,21,20.1,21,19z M8.5,13.5l2.5,3l3.5-4.5l4.5,6H5L8.5,13.5z"/></g> -<g id="drive-keep"><path d="M9,21c0,0.6,0.4,1,1,1h4c0.6,0,1-0.4,1-1v-1H9V21z M12,2C8.1,2,5,5.1,5,9c0,2.4,1.2,4.5,3,5.7V17c0,0.6,0.4,1,1,1h6c0.6,0,1-0.4,1-1v-2.3c1.8-1.3,3-3.4,3-5.7C19,5.1,15.9,2,12,2z"/></g> -<g id="drive-ms-excel"><path d="M19,3H5C3.9,3,3,3.9,3,5v14c0,1.1,0.9,2,2,2h14c1.1,0,2-0.9,2-2V5C21,3.9,20.1,3,19,3z M16.2,17h-2L12,13.2L9.8,17h-2l3.2-5L7.8,7h2l2.2,3.8L14.2,7h2L13,12L16.2,17z"/></g> -<g id="drive-ms-powerpoint"><path d="M19,3H5C3.9,3,3,3.9,3,5v14c0,1.1,0.9,2,2,2h14c1.1,0,2-0.9,2-2V5C21,3.9,20.1,3,19,3z M9.8,13.4V17H8V7h4.3c1.5,0,2.2,0.3,2.8,0.9c0.7,0.6,0.9,1.4,0.9,2.3c0,1-0.3,1.8-0.9,2.3c-0.6,0.5-1.3,0.8-2.8,0.8H9.8z"/><path d="M9.8,12V8.4h2.3c0.7,0,1.2,0.2,1.5,0.6c0.3,0.4,0.5,0.7,0.5,1.2c0,0.6-0.2,0.9-0.5,1.3c-0.3,0.3-0.7,0.5-1.4,0.5H9.8z"/></g> -<g id="drive-ms-word"><path d="M19,3H5C3.9,3,3,3.9,3,5v14c0,1.1,0.9,2,2,2h14c1.1,0,2-0.9,2-2V5C21,3.9,20.1,3,19,3z M15.5,17H14l-2-7.5L10,17H8.5L6.1,7h1.7l1.5,7.5l2-7.5h1.4l2,7.5L16.2,7h1.7L15.5,17z"/></g> -<g id="drive-pdf"><path d="M11.3,8.6L11.3,8.6C11.4,8.6,11.4,8.6,11.3,8.6c0.1-0.4,0.2-0.6,0.2-0.9l0-0.2c0.1-0.5,0.1-0.9,0-1c0,0,0,0,0-0.1l-0.1-0.1c0,0,0,0,0,0c0,0,0,0,0,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0.2,0.7-0.6,1.5-1,2.4c-0.2,0.4-0.4,0.7-0.6,1.1c0,0,0.1,0,0.1,0l0.1,0v0c1.3-0.5,2.5-0.8,3.3-0.9c-0.2-0.1-0.3-0.2-0.4-0.3C12.4,12.6,11.8,11.8,11.4,10.9z"/></g> -<g id="drive-presentation"><path d="M19,3H5C3.9,3,3,3.9,3,5v14c0,1.1,0.9,2,2,2h14c1.1,0,2-0.9,2-2V5C21,3.9,20.1,3,19,3z M19,16H5V8h14V16z"/></g> -<g id="drive-script"><path d="M19,3H5C3.9,3,3,3.9,3,5l0,4h0v6h0l0,4c0,1.1,0.9,2,2,2h14c1.1,0,2-0.9,2-2V5C21,3.9,20.1,3,19,3z M11,17v-3H5v-4h6V7l5,5L11,17z"/></g> -<g id="drive-site"><path d="M19,4H5C3.9,4,3,4.9,3,6l0,12c0,1.1,0.9,2,2,2h14c1.1,0,2-0.9,2-2V6C21,4.9,20.1,4,19,4z M14,18H5v-4h9V18z M14,13H5V9h9V13z M19,18h-4V9h4V18z"/></g> -<g id="drive-spreadsheet"><path d="M19,3H5C3.9,3,3,3.9,3,5l0,3h0v11c0,1.1,0.9,2,2,2h14c1.1,0,2-0.9,2-2V5C21,3.9,20.1,3,19,3z M19,11h-8v8H9v-8H5V9h4V5h2v4h8V11z"/></g> -<g id="drive-text"><path d="M14,2H6C4.9,2,4,2.9,4,4l0,16c0,1.1,0.9,2,2,2h12c1.1,0,2-0.9,2-2V8L14,2z M16,18H8v-2h8V18z M16,14H8v-2h8V14z M13,9V3.5L18.5,9H13z"/></g> -<g id="drive-video"><path d="M18,4l2,4h-3l-2-4h-2l2,4h-3l-2-4H8l2,4H7L5,4H4C2.9,4,2,4.9,2,6l0,12c0,1.1,0.9,2,2,2h16c1.1,0,2-0.9,2-2V4H18z"/></g> -<g id="drive-zip"><path d="M19,3H5C3.9,3,3,3.9,3,5v14c0,1.1,0.9,2,2,2h14c1.1,0,2-0.9,2-2V5C21,3.9,20.1,3,19,3z M14,9h-2v2h2v2h-2v-2h-2V9h2V7h-2V5h2v2h2V9z M14,17h-2v-2h-2v-2h2v2h2V17z"/></g> -<g id="error"><path d="M12,2C6.5,2,2,6.5,2,12s4.5,10,10,10c5.5,0,10-4.5,10-10S17.5,2,12,2z M13,17h-2v-2h2V17z M13,13h-2V7h2V13z"/></g> -<g id="event"><path d="M17,12h-5v5h5V12z M16,1v2H8V1H6v2H5C3.9,3,3,3.9,3,5l0,14c0,1.1,0.9,2,2,2h14c1.1,0,2-0.9,2-2V5c0-1.1-0.9-2-2-2h-1V1H16z M19,19H5V8h14V19z"/></g> -<g id="exit-to-app"><path d="M10.1,15.6l1.4,1.4l5-5l-5-5l-1.4,1.4l2.6,2.6H3v2h9.7L10.1,15.6z M19,3H5C3.9,3,3,3.9,3,5v4h2V5h14v14H5v-4H3v4c0,1.1,0.9,2,2,2h14c1.1,0,2-0.9,2-2V5C21,3.9,20.1,3,19,3z"/></g> -<g id="expand-less"><polygon points="12,8 6,14 7.4,15.4 12,10.8 16.6,15.4 18,14 "/></g> -<g id="expand-more"><polygon points="16.6,8.6 12,13.2 7.4,8.6 6,10 12,16 18,10 "/></g> -<g id="explore"><path d="M12,10.9c-0.6,0-1.1,0.5-1.1,1.1s0.5,1.1,1.1,1.1c0.6,0,1.1-0.5,1.1-1.1S12.6,10.9,12,10.9z M12,2C6.5,2,2,6.5,2,12c0,5.5,4.5,10,10,10c5.5,0,10-4.5,10-10C22,6.5,17.5,2,12,2z M14.2,14.2L6,18l3.8-8.2L18,6L14.2,14.2z"/></g> -<g id="extension"><path d="M20.5,11H19V7c0-1.1-0.9-2-2-2h-4V3.5C13,2.1,11.9,1,10.5,1C9.1,1,8,2.1,8,3.5V5H4C2.9,5,2,5.9,2,7l0,3.8h1.5c1.5,0,2.7,1.2,2.7,2.7S5,16.2,3.5,16.2H2L2,20c0,1.1,0.9,2,2,2h3.8v-1.5c0-1.5,1.2-2.7,2.7-2.7c1.5,0,2.7,1.2,2.7,2.7V22H17c1.1,0,2-0.9,2-2v-4h1.5c1.4,0,2.5-1.1,2.5-2.5S21.9,11,20.5,11z"/></g> -<g id="favorite"><path d="M12,21.4L10.6,20C5.4,15.4,2,12.3,2,8.5C2,5.4,4.4,3,7.5,3c1.7,0,3.4,0.8,4.5,2.1C13.1,3.8,14.8,3,16.5,3C19.6,3,22,5.4,22,8.5c0,3.8-3.4,6.9-8.6,11.5L12,21.4z"/></g> -<g id="favorite-outline"><path d="M16.5,3c-1.7,0-3.4,0.8-4.5,2.1C10.9,3.8,9.2,3,7.5,3C4.4,3,2,5.4,2,8.5c0,3.8,3.4,6.9,8.6,11.5l1.4,1.3l1.4-1.3c5.1-4.7,8.6-7.8,8.6-11.5C22,5.4,19.6,3,16.5,3z M12.1,18.6L12,18.6l-0.1-0.1C7.1,14.2,4,11.4,4,8.5C4,6.5,5.5,5,7.5,5c1.5,0,3,1,3.6,2.4h1.9C13.5,6,15,5,16.5,5c2,0,3.5,1.5,3.5,3.5C20,11.4,16.9,14.2,12.1,18.6z"/></g> -<g id="file-download"><path d="M19,9h-4V3H9v6H5l7,7L19,9z M5,18v2h14v-2H5z"/></g> -<g id="file-upload"><polygon points="9,16 15,16 15,10 19,10 12,3 5,10 9,10 "/><rect x="5" y="18" width="14" height="2"/></g> -<g id="filter"><path d="M10,18h4v-2h-4V18z M3,6v2h18V6H3z M6,13h12v-2H6V13z"/></g> -<g id="flag"><polygon points="14.4,6 14,4 5,4 5,21 7,21 7,14 12.6,14 13,16 20,16 20,6 "/></g> -<g id="flip-to-back"><path d="M9,7H7l0,2h2V7z M9,11H7v2h2V11z M9,3C7.9,3,7,3.9,7,5h2V3z M13,15h-2v2h2V15z M19,3v2h2C21,3.9,20.1,3,19,3z M13,3h-2v2h2V3z M9,17v-2H7C7,16.1,7.9,17,9,17z M19,13h2v-2h-2V13z M19,9h2V7h-2V9z M19,17c1.1,0,2-0.9,2-2h-2V17z M5,7H3v2h0l0,10c0,1.1,0.9,2,2,2h12v-2H5V7z M15,5h2V3h-2V5z M15,17h2v-2h-2V17z"/></g> -<g id="flip-to-front"><path d="M3,13h2v-2H3L3,13z M3,17h2v-2H3V17z M5,21v-2H3C3,20.1,3.9,21,5,21z M3,9h2V7H3V9z M15,21h2v-2h-2V21z M19,3H9C7.9,3,7,3.9,7,5v2h0v2v6c0,1.1,0.9,2,2,2h5h4h1c1.1,0,2-0.9,2-2V5C21,3.9,20.1,3,19,3z M19,15H9V5h10V15z M11,21h2v-2h-2V21z M7,21h2v-2H7V21z"/></g> -<g id="folder"><path d="M10,4H4C2.9,4,2,4.9,2,6l0,12c0,1.1,0.9,2,2,2h16c1.1,0,2-0.9,2-2V8c0-1.1-0.9-2-2-2h-8L10,4z"/></g> -<g id="folder-mydrive"><path d="M20,6h-8l-2-2H4C2.9,4,2,4.9,2,6l0,12c0,1.1,0.9,2,2,2h16c1.1,0,2-0.9,2-2V8C22,6.9,21.1,6,20,6z M11.5,17l-1.1-2.1l2.8-5l1.5,2.7L12.3,17H11.5z M18.3,17h-5.5l1.4-2.5h5.1l0.3,0.5L18.3,17z M13.8,9h2.4l2.8,5H16l-2.6-4.5L13.8,9z"/></g> -<g id="folder-open"><path d="M20,6h-8l-2-2H4C2.9,4,2,4.9,2,6l0,12c0,1.1,0.9,2,2,2h16c1.1,0,2-0.9,2-2V8C22,6.9,21.1,6,20,6z M20,18H4V8h16V18z"/></g> -<g id="folder-shared"><path d="M20,6h-8l-2-2H4C2.9,4,2,4.9,2,6l0,12c0,1.1,0.9,2,2,2h16c1.1,0,2-0.9,2-2V8C22,6.9,21.1,6,20,6z M15,9c1.1,0,2,0.9,2,2c0,1.1-0.9,2-2,2c-1.1,0-2-0.9-2-2C13,9.9,13.9,9,15,9z M19,17h-8v-1c0-1.3,2.7-2,4-2c1.3,0,4,0.7,4,2V17z"/></g> -<g id="forward"><polygon points="12,8 12,4 20,12 12,20 12,16 4,16 4,8 "/></g> -<g id="fullscreen"><path d="M7,14H5v5h5v-2H7V14z M5,10h2V7h3V5H5V10z M17,17h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-1.3C13.8,10.1,14,9.6,14,9c0-1.1-0.9-2-2-2c-1.1,0-2,0.9-2,2H8c0-2.2,1.8-4,4-4c2.2,0,4,1.8,4,4C16,9.9,15.6,10.7,15.1,11.3z"/></g> -<g id="history"><path opacity="0.9" d="M12.5,2C9,2,5.9,3.9,4.3,6.8L2,4.5V11h6.5L5.7,8.2C7,5.7,9.5,4,12.5,4c4.1,0,7.5,3.4,7.5,7.5c0,4.1-3.4,7.5-7.5,7.5c-3.3,0-6-2.1-7.1-5H3.3c1.1,4,4.8,7,9.2,7c5.3,0,9.5-4.3,9.5-9.5S17.7,2,12.5,2z M11,7v5.1l4.7,2.8l0.8-1.3l-4-2.4V7H11z"/></g> -<g id="home"><polygon points="10,20 10,14 14,14 14,20 19,20 19,12 22,12 12,3 2,12 5,12 5,20 "/></g> -<g id="https"><path d="M18,8h-1V6c0-2.8-2.2-5-5-5C9.2,1,7,3.2,7,6v2H6c-1.1,0-2,0.9-2,2v10c0,1.1,0.9,2,2,2h12c1.1,0,2-0.9,2-2V10C20,8.9,19.1,8,18,8z M12,17c-1.1,0-2-0.9-2-2s0.9-2,2-2c1.1,0,2,0.9,2,2S13.1,17,12,17z M15.1,8H8.9V6c0-1.7,1.4-3.1,3.1-3.1c1.7,0,3.1,1.4,3.1,3.1V8z"/></g> -<g id="inbox"><path d="M19,3H5C3.9,3,3,3.9,3,5l0,14c0,1.1,0.9,2,2,2h14c1.1,0,2-0.9,2-2V5C21,3.9,20.1,3,19,3z M19,15h-4c0,1.7-1.3,3-3,3c-1.7,0-3-1.3-3-3H5V5h14V15z M16,10h-2V7h-4v3H8l4,4L16,10z"/></g> -<g id="info"><path d="M12,2C6.5,2,2,6.5,2,12s4.5,10,10,10c5.5,0,10-4.5,10-10S17.5,2,12,2z M13,17h-2v-6h2V17z M13,9h-2V7h2V9z"/></g> -<g id="info-outline"><path d="M11,17h2v-6h-2V17z M12,2C6.5,2,2,6.5,2,12s4.5,10,10,10c5.5,0,10-4.5,10-10S17.5,2,12,2z M12,20c-4.4,0-8-3.6-8-8s3.6-8,8-8c4.4,0,8,3.6,8,8S16.4,20,12,20z M11,9h2V7h-2V9z"/></g> -<g id="input"><path d="M21,3H3C1.9,3,1,3.9,1,5v4h2V5h18v14H3v-4H1v4c0,1.1,0.9,2,2,2h18c1.1,0,2-0.9,2-2V5C23,3.9,22.1,3,21,3z M11,16l4-4l-4-4v3H1v2h10V16z"/></g> -<g id="invert-colors"><path d="M17.7,7.9L12,2.3l0,0v0L6.3,7.9c-3.1,3.1-3.1,8.2,0,11.3c1.6,1.6,3.6,2.3,5.7,2.3c2,0,4.1-0.8,5.7-2.3C20.8,16.1,20.8,11.1,17.7,7.9z M12,19.6L12,19.6c-1.6,0-3.1-0.6-4.2-1.8C6.6,16.7,6,15.2,6,13.6c0-1.6,0.6-3.1,1.8-4.2L12,5.1L12,19.6z"/></g> -<g id="keep"><path d="M16,12V4h1V2H7v2h1v8l-2,2v2h5.2v6h1.6v-6H18v-2L16,12z"/></g> -<g id="label"><path d="M17.6,5.8C17.3,5.3,16.7,5,16,5L5,5C3.9,5,3,5.9,3,7v10c0,1.1,0.9,2,2,2l11,0c0.7,0,1.3-0.3,1.6-0.8L22,12L17.6,5.8z"/></g> -<g id="label-outline"><path d="M17.6,5.8C17.3,5.3,16.7,5,16,5L5,5C3.9,5,3,5.9,3,7v10c0,1.1,0.9,2,2,2l11,0c0.7,0,1.3-0.3,1.6-0.8L22,12L17.6,5.8z M16,17H5V7h11l3.5,5L16,17z"/></g> -<g id="language"><path d="M12,2C6.5,2,2,6.5,2,12s4.5,10,10,10c5.5,0,10-4.5,10-10S17.5,2,12,2z M18.9,8H16c-0.3-1.3-0.8-2.4-1.4-3.6C16.4,5.1,18,6.3,18.9,8z M12,4c0.8,1.2,1.5,2.5,1.9,4h-3.8C10.5,6.6,11.2,5.2,12,4z M4.3,14C4.1,13.4,4,12.7,4,12s0.1-1.4,0.3-2h3.4c-0.1,0.7-0.1,1.3-0.1,2s0.1,1.3,0.1,2H4.3z M5.1,16H8c0.3,1.3,0.8,2.4,1.4,3.6C7.6,18.9,6,17.7,5.1,16z M8,8H5.1c1-1.7,2.5-2.9,4.3-3.6C8.8,5.6,8.3,6.7,8,8z M12,20c-0.8-1.2-1.5-2.5-1.9-4h3.8C13.5,17.4,12.8,18.8,12,20z M14.3,14H9.7c-0.1-0.7-0.2-1.3-0.2-2s0.1-1.3,0.2-2h4.7c0.1,0.7,0.2,1.3,0.2,2S14.4,13.3,14.3,14z M14.6,19.6c0.6-1.1,1.1-2.3,1.4-3.6h2.9C18,17.7,16.4,18.9,14.6,19.6z M16.4,14c0.1-0.7,0.1-1.3,0.1-2s-0.1-1.3-0.1-2h3.4c0.2,0.6,0.3,1.3,0.3,2s-0.1,1.4-0.3,2H16.4z"/></g> -<g id="launch"><path d="M19,19H5V5h7V3H5C3.9,3,3,3.9,3,5v14c0,1.1,0.9,2,2,2h14c1.1,0,2-0.9,2-2v-7h-2V19z M14,3v2h3.6l-9.8,9.8l1.4,1.4L19,6.4V10h2V3H14z"/></g> -<g id="link"><path d="M8,13h8v-2H8V13z M3.9,12c0-2.3,1.8-4.1,4.1-4.1h3V6H8c-3.3,0-6,2.7-6,6s2.7,6,6,6h3v-1.9H8C5.7,16.1,3.9,14.3,3.9,12z M16,6h-3v1.9h3c2.3,0,4.1,1.8,4.1,4.1c0,2.3-1.8,4.1-4.1,4.1h-3V18h3c3.3,0,6-2.7,6-6S19.3,6,16,6z"/></g> -<g id="list"><path d="M3,13h2v-2H3V13z M3,17h2v-2H3V17z M3,9h2V7H3V9z M7,13h14v-2H7V13z M7,17h14v-2H7V17z M7,7v2h14V7H7z"/></g> -<g id="lock"><path d="M18,8h-1V6c0-2.8-2.2-5-5-5C9.2,1,7,3.2,7,6v2H6c-1.1,0-2,0.9-2,2v10c0,1.1,0.9,2,2,2h12c1.1,0,2-0.9,2-2V10C20,8.9,19.1,8,18,8z M12,17c-1.1,0-2-0.9-2-2s0.9-2,2-2c1.1,0,2,0.9,2,2S13.1,17,12,17z M15.1,8H8.9V6c0-1.7,1.4-3.1,3.1-3.1c1.7,0,3.1,1.4,3.1,3.1V8z"/></g> -<g id="lock-open"><path d="M12,17c1.1,0,2-0.9,2-2s-0.9-2-2-2c-1.1,0-2,0.9-2,2S10.9,17,12,17z M18,8h-1V6c0-2.8-2.2-5-5-5C9.2,1,7,3.2,7,6h1.9c0-1.7,1.4-3.1,3.1-3.1c1.7,0,3.1,1.4,3.1,3.1v2H6c-1.1,0-2,0.9-2,2v10c0,1.1,0.9,2,2,2h12c1.1,0,2-0.9,2-2V10C20,8.9,19.1,8,18,8z M18,20H6V10h12V20z"/></g> -<g id="lock-outline"><path d="M18,8h-1V6c0-2.8-2.2-5-5-5C9.2,1,7,3.2,7,6v2H6c-1.1,0-2,0.9-2,2v10c0,1.1,0.9,2,2,2h12c1.1,0,2-0.9,2-2V10C20,8.9,19.1,8,18,8z M12,2.9c1.7,0,3.1,1.4,3.1,3.1v2H9V6H8.9C8.9,4.3,10.3,2.9,12,2.9z M18,20H6V10h12V20z M12,17c1.1,0,2-0.9,2-2s-0.9-2-2-2c-1.1,0-2,0.9-2,2S10.9,17,12,17z"/></g> -<g id="loyalty"><path d="M21.4,11.6l-9-9C12.1,2.2,11.6,2,11,2H4C2.9,2,2,2.9,2,4v7c0,0.6,0.2,1.1,0.6,1.4l9,9c0.4,0.4,0.9,0.6,1.4,0.6c0.6,0,1.1-0.2,1.4-0.6l7-7c0.4-0.4,0.6-0.9,0.6-1.4C22,12.4,21.8,11.9,21.4,11.6z M5.5,7C4.7,7,4,6.3,4,5.5S4.7,4,5.5,4S7,4.7,7,5.5S6.3,7,5.5,7z M17.3,15.3L13,19.5l-4.3-4.3l0,0C8.3,14.8,8,14.2,8,13.5c0-1.4,1.1-2.5,2.5-2.5c0.7,0,1.3,0.3,1.8,0.7l0.7,0.7l0.7-0.7c0.5-0.5,1.1-0.7,1.8-0.7c1.4,0,2.5,1.1,2.5,2.5C18,14.2,17.7,14.8,17.3,15.3L17.3,15.3z"/></g> -<g id="mail"><path d="M20,4H4C2.9,4,2,4.9,2,6l0,12c0,1.1,0.9,2,2,2h16c1.1,0,2-0.9,2-2V6C22,4.9,21.1,4,20,4z M20,8l-8,5L4,8V6l8,5l8-5V8z"/></g> -<g id="markunread"><path d="M22,6l2-2l-2-2l-2,2l-2-2l-2,2l-2-2l-2,2l-2-2L8,4L6,2L4,4L2,2L0,4l2,2L0,8l2,2l-2,2l2,2l-2,2l2,2l-2,2l2,2l2-2l2,2l2-2l2,2l2-2l2,2l2-2l2,2l2-2l2,2l2-2l-2-2l2-2l-2-2l2-2l-2-2l2-2L22,6z M20,8l-8,5L4,8V6l8,5l8-5V8z"/></g> -<g id="menu"><path d="M3,18h18v-2H3V18z M3,13h18v-2H3V13z M3,6v2h18V6H3z"/></g> -<g id="more-horiz"><path d="M6,10c-1.1,0-2,0.9-2,2s0.9,2,2,2c1.1,0,2-0.9,2-2S7.1,10,6,10z M18,10c-1.1,0-2,0.9-2,2s0.9,2,2,2c1.1,0,2-0.9,2-2S19.1,10,18,10z M12,10c-1.1,0-2,0.9-2,2s0.9,2,2,2c1.1,0,2-0.9,2-2S13.1,10,12,10z"/></g> -<g id="more-vert"><path d="M12,8c1.1,0,2-0.9,2-2s-0.9-2-2-2c-1.1,0-2,0.9-2,2S10.9,8,12,8z M12,10c-1.1,0-2,0.9-2,2s0.9,2,2,2c1.1,0,2-0.9,2-2S13.1,10,12,10z M12,16c-1.1,0-2,0.9-2,2s0.9,2,2,2c1.1,0,2-0.9,2-2S13.1,16,12,16z"/></g> -<g id="payment"><path d="M20,4H4C2.9,4,2,4.9,2,6l0,12c0,1.1,0.9,2,2,2h16c1.1,0,2-0.9,2-2V6C22,4.9,21.1,4,20,4z M20,18H4v-6h16V18z M20,8H4V6h16V8z"/></g> -<g id="picture-in-picture"><path d="M19,7h-8v6h8V7z M21,3H3C1.9,3,1,3.9,1,5v14c0,1.1,0.9,2,2,2h18c1.1,0,2-0.9,2-2V5C23,3.9,22.1,3,21,3z M21,19H3V5h18V19z"/></g> -<g id="polymer"><polygon points="19,4 15,4 7.1,16.6 4.5,12 9,4 5,4 0.5,12 5,20 9,20 16.9,7.4 19.5,12 15,20 19,20 23.5,12 "/></g> -<g id="print"><path d="M19,8H5c-1.7,0-3,1.3-3,3v6h4v4h12v-4h4v-6C22,9.3,20.7,8,19,8z M16,19H8v-5h8V19z M19,12c-0.6,0-1-0.4-1-1s0.4-1,1-1c0.6,0,1,0.4,1,1S19.6,12,19,12z M18,3H6v4h12V3z"/></g> -<g id="radio-button-off"><path d="M12,2C6.5,2,2,6.5,2,12s4.5,10,10,10c5.5,0,10-4.5,10-10S17.5,2,12,2z M12,20c-4.4,0-8-3.6-8-8s3.6-8,8-8c4.4,0,8,3.6,8,8S16.4,20,12,20z"/></g> -<g id="radio-button-on"><path d="M12,7c-2.8,0-5,2.2-5,5s2.2,5,5,5c2.8,0,5-2.2,5-5S14.8,7,12,7z M12,2C6.5,2,2,6.5,2,12s4.5,10,10,10c5.5,0,10-4.5,10-10S17.5,2,12,2z M12,20c-4.4,0-8-3.6-8-8s3.6-8,8-8c4.4,0,8,3.6,8,8S16.4,20,12,20z"/></g> -<g id="receipt"><path d="M18,17H6v-2h12V17z M18,13H6v-2h12V13z M18,9H6V7h12V9z M3,22l1.5-1.5L6,22l1.5-1.5L9,22l1.5-1.5L12,22l1.5-1.5L15,22l1.5-1.5L18,22l1.5-1.5L21,22V2l-1.5,1.5L18,2l-1.5,1.5L15,2l-1.5,1.5L12,2l-1.5,1.5L9,2L7.5,3.5L6,2L4.5,3.5L3,2V22z"/></g> -<g id="refresh"><path d="M17.6,6.4C16.2,4.9,14.2,4,12,4c-4.4,0-8,3.6-8,8s3.6,8,8,8c3.7,0,6.8-2.6,7.7-6h-2.1c-0.8,2.3-3,4-5.6,4c-3.3,0-6-2.7-6-6s2.7-6,6-6c1.7,0,3.1,0.7,4.2,1.8L13,11h7V4L17.6,6.4z"/></g> -<g id="reminder"><path d="M16.9,13c1.3-1.3,2.1-3,2.1-5c0-3.9-3.1-7-7-7C8.1,1,5,4.1,5,8c0,2,0.8,3.7,2.1,5l0,0l3.5,3.5L6,21.1l1.4,1.4L16.9,13z M15.5,11.5L15.5,11.5L12,15.1l-3.5-3.5l0,0l0,0C7.6,10.6,7,9.4,7,8c0-2.8,2.2-5,5-5c2.8,0,5,2.2,5,5C17,9.4,16.4,10.6,15.5,11.5L15.5,11.5z M13.4,19.3l3.2,3.2l1.4-1.4l-3.2-3.2L13.4,19.3z"/></g> -<g id="remove"><path d="M19,13H5v-2h14V13z"/></g> -<g id="remove-circle"><path d="M12,2C6.5,2,2,6.5,2,12s4.5,10,10,10c5.5,0,10-4.5,10-10S17.5,2,12,2z M17,13H7v-2h10V13z"/></g> -<g id="remove-circle-outline"><path d="M7,11v2h10v-2H7z M12,2C6.5,2,2,6.5,2,12s4.5,10,10,10c5.5,0,10-4.5,10-10S17.5,2,12,2z M12,20c-4.4,0-8-3.6-8-8s3.6-8,8-8c4.4,0,8,3.6,8,8S16.4,20,12,20z"/></g> -<g id="reply"><path d="M10,9V5l-7,7l7,7v-4.1c5,0,8.5,1.6,11,5.1C20,15,17,10,10,9z"/></g> -<g id="reply-all"><path d="M7,8V5l-7,7l7,7v-3l-4-4L7,8z M13,9V5l-7,7l7,7v-4.1c5,0,8.5,1.6,11,5.1C23,15,20,10,13,9z"/></g> -<g id="report"><path d="M15.7,3H8.3L3,8.3v7.5L8.3,21h7.5l5.3-5.3V8.3L15.7,3z M12,17.3c-0.7,0-1.3-0.6-1.3-1.3c0-0.7,0.6-1.3,1.3-1.3c0.7,0,1.3,0.6,1.3,1.3C13.3,16.7,12.7,17.3,12,17.3z M13,13h-2V7h2V13z"/></g> -<g id="rotate-left"><path d="M7.1,8.5L5.7,7.1C4.8,8.3,4.2,9.6,4.1,11h2C6.2,10.1,6.6,9.3,7.1,8.5z M6.1,13h-2c0.2,1.4,0.7,2.7,1.6,3.9l1.4-1.4C6.6,14.7,6.2,13.9,6.1,13z M7.1,18.3c1.2,0.9,2.5,1.4,3.9,1.6v-2c-0.9-0.1-1.7-0.5-2.5-1L7.1,18.3z M13,4.1V1L8.5,5.5L13,10V6.1c2.8,0.5,5,2.9,5,5.9s-2.2,5.4-5,5.9v2c3.9-0.5,7-3.9,7-7.9S16.9,4.6,13,4.1z"/></g> -<g id="rotate-right"><path d="M15.5,5.5L11,1v3.1C7.1,4.6,4,7.9,4,12s3.1,7.4,7,7.9v-2C8.2,17.4,6,15,6,12s2.2-5.4,5-5.9V10L15.5,5.5z M19.9,11c-0.2-1.4-0.7-2.7-1.6-3.9l-1.4,1.4c0.5,0.8,0.9,1.6,1,2.5H19.9z M13,17.9v2c1.4-0.2,2.7-0.7,3.9-1.6l-1.4-1.4C14.7,17.4,13.9,17.8,13,17.9z M16.9,15.5l1.4,1.4c0.9-1.2,1.5-2.5,1.6-3.9h-2C17.8,13.9,17.4,14.7,16.9,15.5z"/></g> -<g id="save"><path d="M17,3H5C3.9,3,3,3.9,3,5l0,14c0,1.1,0.9,2,2,2h14c1.1,0,2-0.9,2-2V7L17,3z M12,19c-1.7,0-3-1.3-3-3s1.3-3,3-3c1.7,0,3,1.3,3,3S13.7,19,12,19z M15,9H5V5h10V9z"/></g> -<g id="schedule"><path fill-opacity="0.9" d="M12,2C6.5,2,2,6.5,2,12s4.5,10,10,10c5.5,0,10-4.5,10-10S17.5,2,12,2z M12,20c-4.4,0-8-3.6-8-8s3.6-8,8-8c4.4,0,8,3.6,8,8S16.4,20,12,20z"/><polygon fill-opacity="0.9" points="12.5,7 11,7 11,13 16.2,16.2 17,14.9 12.5,12.2 "/></g> -<g id="search"><path d="M15.5,14h-0.8l-0.3-0.3c1-1.1,1.6-2.6,1.6-4.2C16,5.9,13.1,3,9.5,3C5.9,3,3,5.9,3,9.5S5.9,16,9.5,16c1.6,0,3.1-0.6,4.2-1.6l0.3,0.3v0.8l5,5l1.5-1.5L15.5,14z M9.5,14C7,14,5,12,5,9.5S7,5,9.5,5C12,5,14,7,14,9.5S12,14,9.5,14z"/></g> -<g id="select-all"><path d="M3,5h2V3C3.9,3,3,3.9,3,5z M3,13h2v-2H3V13z M7,21h2v-2H7V21z M3,9h2V7H3V9z M13,3h-2v2h2V3z M19,3v2h2C21,3.9,20.1,3,19,3z M5,21v-2H3C3,20.1,3.9,21,5,21z M3,17h2v-2H3V17z M9,3H7v2h2V3z M11,21h2v-2h-2V21z M19,13h2v-2h-2V13z M19,21c1.1,0,2-0.9,2-2h-2V21z M19,9h2V7h-2V9z M19,17h2v-2h-2V17z M15,21h2v-2h-2V21z M15,5h2V3h-2V5z M7,17h10V7H7V17z M9,9h6v6H9V9z"/></g> -<g id="send"><polygon points="2,21 23,12 2,3 2,10 17,12 2,14 "/></g> -<g id="send-money"><path d="M2,12c0-2.6,1.7-4.8,4-5.7V4.3c-3.4,0.9-6,4-6,7.7s2.6,6.8,6,7.7v-2.1C3.7,16.8,2,14.6,2,12z M24,12l-4-4v3h-7v2h7v3L24,12z M14,18c-3.3,0-6-2.7-6-6s2.7-6,6-6c1.7,0,3.2,0.7,4.2,1.8l1.4-1.4C18.2,4.9,16.2,4,14,4c-4.4,0-8,3.6-8,8s3.6,8,8,8c2.2,0,4.2-0.9,5.7-2.3l-1.4-1.4C17.2,17.3,15.7,18,14,18z"/></g> -<g id="settings"><path d="M19.4,13c0-0.3,0.1-0.6,0.1-1s0-0.7-0.1-1l2.1-1.7c0.2-0.2,0.2-0.4,0.1-0.6l-2-3.5C19.5,5.1,19.3,5,19,5.1l-2.5,1c-0.5-0.4-1.1-0.7-1.7-1l-0.4-2.6C14.5,2.2,14.2,2,14,2h-4C9.8,2,9.5,2.2,9.5,2.4L9.1,5.1C8.5,5.3,8,5.7,7.4,6.1L5,5.1C4.7,5,4.5,5.1,4.3,5.3l-2,3.5C2.2,8.9,2.3,9.2,2.5,9.4L4.6,11c0,0.3-0.1,0.6-0.1,1s0,0.7,0.1,1l-2.1,1.7c-0.2,0.2-0.2,0.4-0.1,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g> -<g id="settings-backup-restore"><path d="M14,12c0-1.1-0.9-2-2-2s-2,0.9-2,2s0.9,2,2,2S14,13.1,14,12z M12,3c-5,0-9,4-9,9H0l4,4l4-4H5c0-3.9,3.1-7,7-7s7,3.1,7,7s-3.1,7-7,7c-1.5,0-2.9-0.5-4.1-1.3l-1.4,1.4C8,20.3,9.9,21,12,21c5,0,9-4,9-9S17,3,12,3z"/></g> -<g id="settings-bluetooth"><path d="M11,24h2v-2h-2V24z M7,24h2v-2H7V24z M15,24h2v-2h-2V24z M17.7,5.7L12,0h-1v7.6L6.4,3L5,4.4l5.6,5.6L5,15.6L6.4,17l4.6-4.6V20h1l5.7-5.7L13.4,10L17.7,5.7z M13,3.8l1.9,1.9L13,7.6V3.8z M14.9,14.3L13,16.2v-3.8L14.9,14.3z"/></g> -<g id="settings-cell"><path d="M7,24h2v-2H7V24z M11,24h2v-2h-2V24z M15,24h2v-2h-2V24z M16,0L8,0C6.9,0,6,0.9,6,2v16c0,1.1,0.9,2,2,2h8c1.1,0,2-0.9,2-2V2C18,0.9,17.1,0,16,0z M16,16H8V4h8V16z"/></g> -<g id="settings-display"><path d="M21,19H3V5h18V19z M21,3H3C1.9,3,1,3.9,1,5v14c0,1.1,0.9,2,2,2h18c1.1,0,2-0.9,2-2V5C23,3.9,22.1,3,21,3L21,3z"/><path d="M10,12c0-1.1,0.9-2,2-2V8c0.3,0,0.7,0.1,1,0.1V6h-2v2.1c-0.4,0.1-0.7,0.2-1,0.4L8.5,7.1L7.1,8.5L8.6,10c-0.2,0.3-0.3,0.7-0.4,1H6v2h2.1c0.1,0.4,0.2,0.7,0.4,1l-1.5,1.5l1.4,1.4l1.5-1.5c0.3,0.2,0.7,0.3,1,0.4V18h2v-2.1c-0.3,0.1-0.7,0.1-1,0.1v-2C10.9,14,10,13.1,10,12z M15.4,10l1.5-1.5l-1.4-1.4L14,8.6C14.6,8.9,15.1,9.4,15.4,10z M14,15.4l1.5,1.5l1.4-1.4L15.4,14C15.1,14.6,14.6,15.1,14,15.4z M12,10v4c1.1,0,2-0.9,2-2C14,10.9,13.1,10,12,10z M15.9,11c0.1,0.3,0.1,0.7,0.1,1s-0.1,0.7-0.1,1H18v-2H15.9z"/></g> -<g id="settings-ethernet"><path d="M7.8,6.8L6.2,5.5L0.8,12l5.4,6.5l1.5-1.3L3.4,12L7.8,6.8z M7,13h2v-2H7V13z M17,11h-2v2h2V11z M11,13h2v-2h-2V13z M17.8,5.5l-1.5,1.3l4.3,5.2l-4.3,5.2l1.5,1.3l5.4-6.5L17.8,5.5z"/></g> -<g id="settings-input-antenna"><path d="M12,5c-3.9,0-7,3.1-7,7h2c0-2.8,2.2-5,5-5s5,2.2,5,5h2C19,8.1,15.9,5,12,5z M13,14.3c0.9-0.4,1.5-1.3,1.5-2.3c0-1.4-1.1-2.5-2.5-2.5S9.5,10.6,9.5,12c0,1,0.6,1.9,1.5,2.3v3.3L7.6,21L9,22.4l3-3l3,3l1.4-1.4L13,17.6V14.3z M12,1C5.9,1,1,5.9,1,12h2c0-5,4-9,9-9s9,4,9,9h2C23,5.9,18.1,1,12,1z"/></g> -<g id="settings-input-component"><path d="M5,2c0-0.6-0.4-1-1-1S3,1.4,3,2v4H1v6h6V6H5V2z M9,16c0,1.3,0.8,2.4,2,2.8V23h2v-4.2c1.2-0.4,2-1.5,2-2.8v-2H9V16z M1,16c0,1.3,0.8,2.4,2,2.8V23h2v-4.2c1.2-0.4,2-1.5,2-2.8v-2H1V16z M21,6V2c0-0.6-0.4-1-1-1s-1,0.4-1,1v4h-2v6h6V6H21z M13,2c0-0.6-0.4-1-1-1s-1,0.4-1,1v4H9v6h6V6h-2V2z M17,16c0,1.3,0.8,2.4,2,2.8V23h2v-4.2c1.2-0.4,2-1.5,2-2.8v-2h-6V16z"/></g> -<g id="settings-input-composite"><path d="M5,2c0-0.6-0.4-1-1-1S3,1.4,3,2v4H1v6h6V6H5V2z M9,16c0,1.3,0.8,2.4,2,2.8V23h2v-4.2c1.2-0.4,2-1.5,2-2.8v-2H9V16z M1,16c0,1.3,0.8,2.4,2,2.8V23h2v-4.2c1.2-0.4,2-1.5,2-2.8v-2H1V16z M21,6V2c0-0.6-0.4-1-1-1s-1,0.4-1,1v4h-2v6h6V6H21z M13,2c0-0.6-0.4-1-1-1s-1,0.4-1,1v4H9v6h6V6h-2V2z M17,16c0,1.3,0.8,2.4,2,2.8V23h2v-4.2c1.2-0.4,2-1.5,2-2.8v-2h-6V16z"/></g> -<g id="settings-input-hdmi"><path d="M18,7V4c0-1.1-0.9-2-2-2H8C6.9,2,6,2.9,6,4v3H5v6l3,6v3h8v-3l3-6V7H18z M8,4h8v3h-2V5h-1v2h-2V5h-1v2H8V4z"/></g> -<g id="settings-input-svideo"><path d="M8,11.5C8,10.7,7.3,10,6.5,10S5,10.7,5,11.5S5.7,13,6.5,13S8,12.3,8,11.5z M15,6.5C15,5.7,14.3,5,13.5,5h-3C9.7,5,9,5.7,9,6.5S9.7,8,10.5,8h3C14.3,8,15,7.3,15,6.5z M8.5,15C7.7,15,7,15.7,7,16.5S7.7,18,8.5,18s1.5-0.7,1.5-1.5S9.3,15,8.5,15z M12,1C5.9,1,1,5.9,1,12s4.9,11,11,11s11-4.9,11-11S18.1,1,12,1z M12,21c-5,0-9-4-9-9s4-9,9-9s9,4,9,9S17,21,12,21z M17.5,10c-0.8,0-1.5,0.7-1.5,1.5s0.7,1.5,1.5,1.5s1.5-0.7,1.5-1.5S18.3,10,17.5,10z M15.5,15c-0.8,0-1.5,0.7-1.5,1.5s0.7,1.5,1.5,1.5s1.5-0.7,1.5-1.5S16.3,15,15.5,15z"/></g> -<g id="settings-overscan"><path d="M12,5.5L10,8h4L12,5.5z M18,10v4l2.5-2L18,10z M6,10l-2.5,2L6,14V10z M14,16h-4l2,2.5L14,16z M21,3H3C1.9,3,1,3.9,1,5v14c0,1.1,0.9,2,2,2h18c1.1,0,2-0.9,2-2V5C23,3.9,22.1,3,21,3z M21,19H3V5h18V19z"/></g> -<g id="settings-phone"><path d="M13,9h-2v2h2V9z M17,9h-2v2h2V9z M20,15.5c-1.2,0-2.4-0.2-3.6-0.6c-0.3-0.1-0.7,0-1,0.2l-2.2,2.2c-2.8-1.4-5.1-3.8-6.6-6.6l2.2-2.2c0.3-0.3,0.4-0.7,0.2-1C8.7,6.4,8.5,5.2,8.5,4c0-0.6-0.4-1-1-1H4C3.4,3,3,3.4,3,4c0,9.4,7.6,17,17,17c0.6,0,1-0.4,1-1v-3.5C21,15.9,20.6,15.5,20,15.5z M19,9v2h2V9H19z"/></g> -<g id="settings-power"><path d="M7,24h2v-2H7V24z M11,24h2v-2h-2V24z M13,2h-2v10h2V2z M16.6,4.4l-1.4,1.4C16.8,6.9,18,8.8,18,11c0,3.3-2.7,6-6,6c-3.3,0-6-2.7-6-6c0-2.2,1.2-4.1,2.9-5.1L7.4,4.4C5.4,5.9,4,8.3,4,11c0,4.4,3.6,8,8,8c4.4,0,8-3.6,8-8C20,8.3,18.6,5.9,16.6,4.4z M15,24h2v-2h-2V24z"/></g> -<g id="settings-remote"><path d="M15,9H9c-0.6,0-1,0.4-1,1v12c0,0.6,0.4,1,1,1h6c0.6,0,1-0.4,1-1V10C16,9.4,15.6,9,15,9z M12,15c-1.1,0-2-0.9-2-2s0.9-2,2-2s2,0.9,2,2S13.1,15,12,15z M7.1,6.1l1.4,1.4C9.4,6.6,10.6,6,12,6s2.6,0.6,3.5,1.5l1.4-1.4C15.7,4.8,13.9,4,12,4S8.3,4.8,7.1,6.1z M12,0C9,0,6.2,1.2,4.2,3.2l1.4,1.4C7.3,3,9.5,2,12,2s4.7,1,6.4,2.6l1.4-1.4C17.8,1.2,15,0,12,0z"/></g> -<g id="settings-voice"><path d="M7,24h2v-2H7V24z M12,13c1.7,0,3-1.3,3-3l0-6c0-1.7-1.3-3-3-3c-1.7,0-3,1.3-3,3v6C9,11.7,10.3,13,12,13z M11,24h2v-2h-2V24z M15,24h2v-2h-2V24z M19,10h-1.7c0,3-2.5,5.1-5.3,5.1c-2.8,0-5.3-2.1-5.3-5.1H5c0,3.4,2.7,6.2,6,6.7V20h2v-3.3C16.3,16.2,19,13.4,19,10z"/></g> -<g id="shopping-basket"><path d="M17.2,9l-4.4-6.6C12.6,2.2,12.3,2,12,2c-0.3,0-0.6,0.1-0.8,0.4L6.8,9H2c-0.6,0-1,0.4-1,1c0,0.1,0,0.2,0,0.3l2.5,9.3c0.2,0.8,1,1.5,1.9,1.5h13c0.9,0,1.7-0.6,1.9-1.5l2.5-9.3c0-0.1,0-0.2,0-0.3c0-0.6-0.4-1-1-1H17.2z M9,9l3-4.4L15,9H9z M12,17c-1.1,0-2-0.9-2-2s0.9-2,2-2c1.1,0,2,0.9,2,2S13.1,17,12,17z"/></g> -<g id="shopping-cart"><path d="M7,18c-1.1,0-2,0.9-2,2s0.9,2,2,2c1.1,0,2-0.9,2-2S8.1,18,7,18z M1,2v2h2l3.6,7.6L5.2,14C5.1,14.3,5,14.7,5,15c0,1.1,0.9,2,2,2h12v-2H7.4c-0.1,0-0.2-0.1-0.2-0.2c0,0,0-0.1,0-0.1L8.1,13h7.4c0.8,0,1.4-0.4,1.7-1l3.6-6.5C21,5.3,21,5.2,21,5c0-0.6-0.4-1-1-1H5.2L4.3,2H1z M17,18c-1.1,0-2,0.9-2,2s0.9,2,2,2c1.1,0,2-0.9,2-2S18.1,18,17,18z"/></g> -<g id="sort"><path d="M3,18h6v-2H3V18z M3,6v2h18V6H3z M3,13h12v-2H3V13z"/></g> -<g id="star"><polygon points="12,17.273 18.18,21 16.545,13.971 22,9.244 14.809,8.627 12,2 9.191,8.627 2,9.244 7.455,13.971 5.82,21 "/></g> -<g id="star-half"><path d="M22,9.744l-7.191-0.617L12,2.5L9.191,9.127L2,9.744v0l0,0l5.455,4.727L5.82,21.5L12,17.772l0,0l6.18,3.727l-1.635-7.029L22,9.744z M12,15.896V6.595l1.71,4.036l4.38,0.376l-3.322,2.878l0.996,4.281L12,15.896z"/></g> -<g id="star-outline"><path d="M22,9.244l-7.191-0.617L12,2L9.191,8.627L2,9.244l5.455,4.727L5.82,21L12,17.272L18.18,21l-1.635-7.029L22,9.244z M12,15.396l-3.763,2.27l0.996-4.281L5.91,10.507l4.38-0.376L12,6.095l1.71,4.036l4.38,0.376l-3.322,2.878l0.996,4.281L12,15.396z"/></g> -<g id="star-rate"><polygon points="12,14.3 15.7,17 14.3,12.6 18,10 13.5,10 12,5.5 10.5,10 6,10 9.7,12.6 8.3,17 "/></g> -<g id="store"><path d="M20,4H4v2h16V4z M21,14v-2l-1-5H4l-1,5v2h1v6h10v-6h4v6h2v-6H21z M12,18H6v-4h6V18z"/></g> -<g id="swap-driving-apps"><circle cx="6.5" cy="15.5" r="1.5"/><circle cx="17.5" cy="15.5" r="1.5"/><path d="M18.9,7c-0.2-0.6-0.8-1-1.4-1H16H6V4L3,7l2,2l1,1V8h11.7l1.3,4H3v9c0,0.6,0.4,1,1,1h1c0.6,0,1-0.4,1-1v-1h12v1c0,0.6,0.4,1,1,1h1c0.6,0,1-0.4,1-1v-8L18.9,7z M6.5,17C5.7,17,5,16.3,5,15.5S5.7,14,6.5,14C7.3,14,8,14.7,8,15.5S7.3,17,6.5,17z M17.5,17c-0.8,0-1.5-0.7-1.5-1.5s0.7-1.5,1.5-1.5c0.8,0,1.5,0.7,1.5,1.5S18.3,17,17.5,17z M16,0v2H8v2h8v2l3-3L16,0z"/></g> -<g id="swap-driving-apps-wheel"><path d="M14.4,6.1c-0.5-0.2-1.1,0-1.3,0.6L11.7,10c-1,0.1-1.7,1-1.7,2c0,1.1,0.9,2,2,2s2-0.9,2-2c0-0.5-0.2-0.9-0.4-1.2l1.4-3.4C15.1,6.9,14.9,6.3,14.4,6.1z M7,9c-0.6,0-1,0.4-1,1c0,0.6,0.4,1,1,1s1-0.4,1-1C8,9.4,7.6,9,7,9z M11,7c0-0.6-0.4-1-1-1S9,6.4,9,7c0,0.6,0.4,1,1,1S11,7.6,11,7z M17,9c-0.6,0-1,0.4-1,1c0,0.6,0.4,1,1,1s1-0.4,1-1C18,9.4,17.6,9,17,9z M12,2C6.5,2,2,6.5,2,12s4.5,10,10,10s10-4.5,10-10S17.5,2,12,2z M17.3,18c-1.4-1.2-3.2-2-5.3-2s-3.9,0.8-5.3,2C5.1,16.5,4,14.4,4,12c0-4.4,3.6-8,8-8s8,3.6,8,8C20,14.4,18.9,16.5,17.3,18z"/></g> -<g id="swap-horiz"><path d="M7,11l-4,4l4,4v-3h7v-2H7V11z M21,9l-4-4v3h-7v2h7v3L21,9z"/></g> -<g id="swap-vert"><path d="M16,17v-7h-2v7h-3l4,4l4-4H16z M9,3L5,7h3v7h2V7h3L9,3z"/></g> -<g id="swap-vert-circle"><path d="M12,2C6.5,2,2,6.5,2,12s4.5,10,10,10c5.5,0,10-4.5,10-10S17.5,2,12,2z M6.5,9L10,5.5L13.5,9H11v4H9V9H6.5z M17.5,15L14,18.5L10.5,15H13v-4h2v4H17.5z"/></g> -<g id="system-update-tv"><path d="M12,15l4-4h-3V3h-2v8H8L12,15z M20,3h-5v2h5v12H4V5h5V3H4C2.9,3,2,3.9,2,5v12c0,1.1,0.9,2,2,2h4v2h8v-2h4c1.1,0,2-0.9,2-2l0-12C22,3.9,21.1,3,20,3z"/></g> -<g id="tab"><path d="M19,3H5C3.9,3,3,3.9,3,5v14c0,1.1,0.9,2,2,2h14c1.1,0,2-0.9,2-2V5C21,3.9,20.1,3,19,3z M19,19L5,19V5h7v4h7V19z"/></g> -<g id="tab-unselected"><path d="M3,9h2V7H3V9z M3,13h2v-2H3V13z M3,5h2V3C3.9,3,3,3.9,3,5z M7,21h2v-2l-2,0V21z M3,17h2v-2H3V17z M5,21v-2H3C3,20.1,3.9,21,5,21z M19,3h-8v6h10V5C21,3.9,20.1,3,19,3z M19,17h2v-2h-2V17z M7,5h2V3H7V5z M19,21c1.1,0,2-0.9,2-2h-2V21z M19,13h2v-2h-2V13z M11,21h2v-2l-2,0V21z M15,21h2v-2l-2,0V21z"/></g> -<g id="text-format"><path d="M5,17v2h14v-2H5z M9.5,12.8h5l0.9,2.2h2.1L12.8,4h-1.5L6.5,15h2.1L9.5,12.8z M12,6l1.9,5h-3.7L12,6z"/></g> -<g id="theaters"><path d="M18,3v2h-2V3H8v2H6V3H4v18h2v-2h2v2h8v-2h2v2h2V3H18z M8,17H6v-2h2V17z M8,13H6v-2h2V13z M8,9H6V7h2V9z M18,17h-2v-2h2V17z M18,13h-2v-2h2V13z M18,9h-2V7h2V9z"/></g> -<g id="three-d-rotation"><path d="M11,14v-1c0-0.6-0.4-1-1-1c0.6,0,1-0.4,1-1v-1c0-1.1-0.9-2-2-2H6v2h3v1H7v2h2v1l0,0l0,0v0h0H6v2h3C10.1,16,11,15.1,11,14z M15,8h-3v8h3c1.7,0,3-1.3,3-3v-2C18,9.3,16.7,8,15,8z M16,13c0,0.6-0.4,1-1,1h-1v-4h1c0.6,0,1,0.4,1,1V13z M12,0c-0.2,0-0.4,0-0.7,0l3.8,3.8l1.3-1.3c3.3,1.5,5.6,4.7,6,8.5h1.5C23.4,4.8,18.3,0,12,0z M7.5,21.5c-3.3-1.5-5.6-4.7-6-8.5H0.1C0.6,19.2,5.7,24,12,24c0.2,0,0.4,0,0.7,0l-3.8-3.8L7.5,21.5z"/></g> -<g id="thumb-down"><path d="M15,3H6C5.2,3,4.5,3.5,4.2,4.2l-3,7.1C1.1,11.5,1,11.7,1,12v1.9l0,0c0,0,0,0.1,0,0.1c0,1.1,0.9,2,2,2h6.3l-1,4.6c0,0.1,0,0.2,0,0.3c0,0.4,0.2,0.8,0.4,1.1L9.8,23l6.6-6.6c0.4-0.4,0.6-0.9,0.6-1.4V5C17,3.9,16.1,3,15,3z M19,3v12h4V3H19z"/></g> -<g id="thumb-up"><path d="M1,21h4V9H1V21z M23,10c0-1.1-0.9-2-2-2h-6.3l1-4.6c0-0.1,0-0.2,0-0.3c0-0.4-0.2-0.8-0.4-1.1L14.2,1L7.6,7.6C7.2,7.9,7,8.4,7,9v10c0,1.1,0.9,2,2,2h9c0.8,0,1.5-0.5,1.8-1.2l3-7.1c0.1-0.2,0.1-0.5,0.1-0.7V10L23,10C23,10.1,23,10,23,10z"/></g> -<g id="today"><path d="M19,3h-1V1h-2v2H8V1H6v2H5C3.9,3,3,3.9,3,5l0,14c0,1.1,0.9,2,2,2h14c1.1,0,2-0.9,2-2V5C21,3.9,20.1,3,19,3z M19,19H5V8h14V19z"/><rect x="7" y="10" width="5" height="5"/></g> -<g id="translate"><path d="M3,17.2V21h3.8L17.8,9.9l-3.8-3.8L3,17.2z M20.7,7c0.4-0.4,0.4-1,0-1.4l-2.3-2.3c-0.4-0.4-1-0.4-1.4,0l-1.8,1.8l3.8,3.8L20.7,7z M12,19l-2,2h13v-2H12z"/></g> -<g id="trending-down"><polygon points="16,18 18.3,15.7 13.4,10.8 9.4,14.8 2,7.4 3.4,6 9.4,12 13.4,8 19.7,14.3 22,12 22,18 "/></g> -<g id="trending-neutral"><polygon points="22,12 18,8 18,11 3,11 3,13 18,13 18,16 "/></g> -<g id="trending-up"><polygon points="16,6 18.3,8.3 13.4,13.2 9.4,9.2 2,16.6 3.4,18 9.4,12 13.4,16 19.7,9.7 22,12 22,6 "/></g> -<g id="undo"><path d="M12,5V1.5l-5,5l5,5V7c3.3,0,6,2.7,6,6s-2.7,6-6,6c-3.3,0-6-2.7-6-6H4c0,4.4,3.6,8,8,8c4.4,0,8-3.6,8-8S16.4,5,12,5z"/></g> -<g id="unfold-less"><path d="M7.4,18.6L8.8,20l3.2-3.2l3.2,3.2l1.4-1.4L12,14L7.4,18.6z M16.6,5.4L15.2,4L12,7.2L8.8,4L7.4,5.4L12,10L16.6,5.4z"/></g> -<g id="unfold-more"><path d="M12,5.8L15.2,9l1.4-1.4L12,3L7.4,7.6L8.8,9L12,5.8z M12,18.2L8.8,15l-1.4,1.4L12,21l4.6-4.6L15.2,15L12,18.2z"/></g> -<g id="view-array"><path d="M4,18h3V5H4V18z M18,5v13h3V5H18z M8,18h9V5H8V18z"/></g> -<g id="view-column"><path d="M10,18h5V5h-5V18z M4,18h5V5H4V18z M16,5v13h5V5H16z"/></g> -<g id="view-headline"><path d="M4,15h17v-2H4V15z M4,19h17v-2H4V19z M4,11h17V9H4V11z M4,5v2h17V5H4z"/></g> -<g id="view-list"><path d="M4,14h4v-4H4V14z M4,19h4v-4H4V19z M4,9h4V5H4V9z M9,14h12v-4H9V14z M9,19h12v-4H9V19z M9,5v4h12V5H9z"/></g> -<g id="view-module"><path d="M4,11h5V5H4V11z M4,18h5v-6H4V18z M10,18h5v-6h-5V18z M16,18h5v-6h-5V18z M10,11h5V5h-5V11z M16,5v6h5V5H16z"/></g> -<g id="view-quilt"><path d="M10,18h5v-6h-5V18z M4,18h5V5H4V18z M16,18h5v-6h-5V18z M10,5v6h11V5H10z"/></g> -<g id="view-stream"><path d="M4,18h17v-6H4V18z M4,5v6h17V5H4z"/></g> -<g id="visibility"><path d="M12,4.5C7,4.5,2.7,7.6,1,12c1.7,4.4,6,7.5,11,7.5c5,0,9.3-3.1,11-7.5C21.3,7.6,17,4.5,12,4.5z M12,17c-2.8,0-5-2.2-5-5s2.2-5,5-5c2.8,0,5,2.2,5,5S14.8,17,12,17z M12,9c-1.7,0-3,1.3-3,3s1.3,3,3,3c1.7,0,3-1.3,3-3S13.7,9,12,9z"/></g> -<g id="visibility-off"><path d="M12,7c2.8,0,5,2.2,5,5c0,0.6-0.1,1.3-0.4,1.8l2.9,2.9c1.5-1.3,2.7-2.9,3.4-4.7c-1.7-4.4-6-7.5-11-7.5c-1.4,0-2.7,0.3-4,0.7l2.2,2.2C10.7,7.1,11.4,7,12,7z M2,4.3l2.3,2.3L4.7,7c-1.7,1.3-3,3-3.7,5c1.7,4.4,6,7.5,11,7.5c1.5,0,3-0.3,4.4-0.8l0.4,0.4l2.9,2.9l1.3-1.3L3.3,3L2,4.3z M7.5,9.8l1.5,1.5C9,11.6,9,11.8,9,12c0,1.7,1.3,3,3,3c0.2,0,0.4,0,0.7-0.1l1.5,1.5C13.5,16.8,12.8,17,12,17c-2.8,0-5-2.2-5-5C7,11.2,7.2,10.5,7.5,9.8z M11.8,9l3.1,3.1c0-0.1,0-0.1,0-0.2c0-1.7-1.3-3-3-3C11.9,9,11.9,9,11.8,9z"/></g> -<g id="warning"><path d="M1,21h22L12,2L1,21z M13,18h-2v-2h2V18z M13,14h-2v-4h2V14z"/></g> -<g id="work"><path d="M20,6h-4V4l-2-2h-4L8,4v2H4C2.9,6,2,6.9,2,8l0,11c0,1.1,0.9,2,2,2h16c1.1,0,2-0.9,2-2V8C22,6.9,21.1,6,20,6z M14,6h-4V4h4V6z"/></g> -</defs></svg> -</core-iconset-svg> diff --git a/third_party/polymer/components/core-icons/demo.html b/third_party/polymer/components/core-icons/demo.html deleted file mode 100644 index ea91b45..0000000 --- a/third_party/polymer/components/core-icons/demo.html +++ /dev/null @@ -1,96 +0,0 @@ -<!doctype html> -<!-- -Copyright (c) 2014 The Polymer Project Authors. All rights reserved. -This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt -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 ---> - -<html> -<head> - - <title>core-icons</title> - <script src="../platform/platform.js"></script> - <!-- load default set --> - <link rel="import" href="core-icons.html"> - <!-- load the rest --> - <link rel="import" href="av-icons.html"> - <link rel="import" href="communication-icons.html"> - <link rel="import" href="device-icons.html"> - <link rel="import" href="editor-icons.html"> - <link rel="import" href="hardware-icons.html"> - <link rel="import" href="image-icons.html"> - <link rel="import" href="maps-icons.html"> - <link rel="import" href="notification-icons.html"> - <link rel="import" href="social-icons.html"> - <style> - body { - font-family: 'Helvetica Neue', Helvetica, Arial; - } - - h2 { - text-transform: capitalize; - } - - core-icon { - transition: all 0.2s; - -webkit-transition: all 0.2s; - } - - core-icon:hover { - fill: #fb8c00; - } - - .set { - padding: 1em 0; - border-bottom: 1px solid silver; - } - - .set:nth-of-type(4n-3) { - color: #656565; - } - - .set:nth-of-type(4n-2) { - color: #FDD835; - } - - .set:nth-of-type(4n-1) { - color: #0D904F; - } - - .set:nth-of-type(4n) { - color: #3B78E7; - } - - .container { - min-width: 10em; - padding: 1em; - } - - .container > div { - color: black; - } - </style> -</head> -<body unresolved> - - <template is="auto-binding"> - <template repeat="{{iconset in $.meta.metaArray}}"> - <h2>{{iconset.id}}</h2> - <h5>{{iconset.id === 'icons' ? 'The Default Set' : 'Import ' + iconset.id + '-icons.html'}}</h5> - <div class="set" horizontal wrap justified layout> - <template repeat="{{ icon in iconset.iconNames }}"> - <span class="container" vertical center layout> - <core-icon icon="{{ iconset.id }}:{{ icon }}"></core-icon> - <div>{{ icon }}</div> - </span> - </template> - </div> - </template> - <core-iconset id="meta"></core-iconset> - </template> - -</body> -</html> diff --git a/third_party/polymer/components/core-icons/device-icons.html b/third_party/polymer/components/core-icons/device-icons.html deleted file mode 100644 index ecce1d4..0000000 --- a/third_party/polymer/components/core-icons/device-icons.html +++ /dev/null @@ -1,58 +0,0 @@ -<!-- -Copyright (c) 2014 The Polymer Project Authors. All rights reserved. -This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt -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 ---> - -<link rel="import" href="../core-icon/core-icon.html"> -<link rel="import" href="../core-iconset-svg/core-iconset-svg.html"> -<core-iconset-svg id="device" iconSize="24"> -<svg><defs> -<g id="access-alarms"><path d="M22,5.7l-4.6-3.9l-1.3,1.5l4.6,3.9L22,5.7z M7.9,3.4L6.6,1.9L2,5.7l1.3,1.5L7.9,3.4z M12.5,8H11v6l4.7,2.9l0.8-1.2l-4-2.4V8z M12,4c-5,0-9,4-9,9c0,5,4,9,9,9s9-4,9-9C21,8,17,4,12,4z M12,20c-3.9,0-7-3.1-7-7c0-3.9,3.1-7,7-7c3.9,0,7,3.1,7,7C19,16.9,15.9,20,12,20z"/></g> -<g id="access-time"><path fill-opacity="0.9" d="M12,2C6.5,2,2,6.5,2,12s4.5,10,10,10c5.5,0,10-4.5,10-10S17.5,2,12,2z M12,20c-4.4,0-8-3.6-8-8s3.6-8,8-8c4.4,0,8,3.6,8,8S16.4,20,12,20z"/><polygon fill-opacity="0.9" points="12.5,7 11,7 11,13 16.2,16.2 17,14.9 12.5,12.2 "/></g> -<g id="add-alarm"><path d="M7.9,3.4L6.6,1.9L2,5.7l1.3,1.5L7.9,3.4z M22,5.7l-4.6-3.9l-1.3,1.5l4.6,3.9L22,5.7z M12,4c-5,0-9,4-9,9c0,5,4,9,9,9s9-4,9-9C21,8,17,4,12,4z M12,20c-3.9,0-7-3.1-7-7c0-3.9,3.1-7,7-7c3.9,0,7,3.1,7,7C19,16.9,15.9,20,12,20z M13,9h-2v3H8v2h3v3h2v-3h3v-2h-3V9z"/></g> -<g id="airplanemode-off"><path d="M13,9V3.5C13,2.7,12.3,2,11.5,2C10.7,2,10,2.7,10,3.5v3.7l7.8,7.8l3.2,1v-2L13,9z M3,5.3l5,5L2,14v2l8-2.5V19l-2,1.5V22l3.5-1l3.5,1v-1.5L13,19v-3.7l5.7,5.7l1.3-1.3L4.3,4L3,5.3z"/></g> -<g id="airplanemode-on"><path d="M21,16v-2l-8-5V3.5C13,2.7,12.3,2,11.5,2C10.7,2,10,2.7,10,3.5V9l-8,5v2l8-2.5V19l-2,1.5V22l3.5-1l3.5,1v-1.5L13,19v-5.5L21,16z"/></g> -<g id="bluetooth"><path d="M17.7,7.7L12,2h-1v7.6L6.4,5L5,6.4l5.6,5.6L5,17.6L6.4,19l4.6-4.6V22h1l5.7-5.7L13.4,12L17.7,7.7z M13,5.8l1.9,1.9L13,9.6V5.8z M14.9,16.3L13,18.2v-3.8L14.9,16.3z"/></g> -<g id="bluetooth-connected"><path d="M7,12l-2-2l-2,2l2,2L7,12z M17.7,7.7L12,2h-1v7.6L6.4,5L5,6.4l5.6,5.6L5,17.6L6.4,19l4.6-4.6V22h1l5.7-5.7L13.4,12L17.7,7.7z M13,5.8l1.9,1.9L13,9.6V5.8z M14.9,16.3L13,18.2v-3.8L14.9,16.3z M19,10l-2,2l2,2l2-2L19,10z"/></g> -<g id="bluetooth-disabled"><path d="M13,5.8l1.9,1.9l-1.6,1.6l1.4,1.4l3-3L12,2h-1v5l2,2V5.8z M5.4,4L4,5.4l6.6,6.6L5,17.6L6.4,19l4.6-4.6V22h1l4.3-4.3l2.3,2.3l1.4-1.4L5.4,4z M13,18.2v-3.8l1.9,1.9L13,18.2z"/></g> -<g id="bluetooth-searching"><path d="M14.2,12l2.3,2.3c0.3-0.7,0.4-1.5,0.4-2.3c0-0.8-0.2-1.6-0.4-2.3L14.2,12z M19.5,6.7L18.3,8c0.6,1.2,1,2.6,1,4s-0.4,2.8-1,4l1.2,1.2c1-1.5,1.5-3.4,1.5-5.3C21,10,20.5,8.2,19.5,6.7z M15.7,7.7L10,2H9v7.6L4.4,5L3,6.4L8.6,12L3,17.6L4.4,19L9,14.4V22h1l5.7-5.7L11.4,12L15.7,7.7z M11,5.8l1.9,1.9L11,9.6V5.8z M12.9,16.3L11,18.2v-3.8L12.9,16.3z"/></g> -<g id="brightness-auto"><path d="M10.9,12.6h2.3L12,9L10.9,12.6z M20,8.7V4h-4.7L12,0.7L8.7,4H4v4.7L0.7,12L4,15.3V20h4.7l3.3,3.3l3.3-3.3H20v-4.7l3.3-3.3L20,8.7z M14.3,16l-0.7-2h-3.2l-0.7,2H7.8L11,7h2l3.2,9H14.3z"/></g> -<g id="brightness-high"><path d="M20,8.7V4h-4.7L12,0.7L8.7,4H4v4.7L0.7,12L4,15.3V20h4.7l3.3,3.3l3.3-3.3H20v-4.7l3.3-3.3L20,8.7z M12,18c-3.3,0-6-2.7-6-6s2.7-6,6-6c3.3,0,6,2.7,6,6S15.3,18,12,18z M12,8c-2.2,0-4,1.8-4,4c0,2.2,1.8,4,4,4s4-1.8,4-4C16,9.8,14.2,8,12,8z"/></g> -<g id="brightness-low"><path d="M20,15.3l3.3-3.3L20,8.7V4h-4.7L12,0.7L8.7,4H4v4.7L0.7,12L4,15.3V20h4.7l3.3,3.3l3.3-3.3H20V15.3z M12,18c-3.3,0-6-2.7-6-6s2.7-6,6-6c3.3,0,6,2.7,6,6S15.3,18,12,18z"/></g> -<g id="brightness-medium"><path d="M20,15.3l3.3-3.3L20,8.7V4h-4.7L12,0.7L8.7,4H4v4.7L0.7,12L4,15.3V20h4.7l3.3,3.3l3.3-3.3H20V15.3z M12,18V6c3.3,0,6,2.7,6,6S15.3,18,12,18z"/></g> -<g id="data-usage"><path d="M13,2.1v3c3.4,0.5,6,3.4,6,6.9c0,0.9-0.2,1.7-0.5,2.5l2.6,1.5c0.6-1.2,0.9-2.6,0.9-4.1C22,6.8,18.1,2.6,13,2.1z M12,19c-3.9,0-7-3.1-7-7c0-3.5,2.6-6.4,6-6.9v-3C5.9,2.5,2,6.8,2,12c0,5.5,4.5,10,10,10c3.3,0,6.2-1.6,8.1-4.1l-2.6-1.5C16.2,18,14.2,19,12,19z"/></g> -<g id="developer-mode"><path d="M7,5h10v2h2V3c0-1.1-0.9-2-2-2L7,1C5.9,1,5,1.9,5,3v4h2V5z M15.4,16.6L20,12l-4.6-4.6L14,8.8l3.2,3.2L14,15.2L15.4,16.6z M10,15.2L6.8,12L10,8.8L8.6,7.4L4,12l4.6,4.6L10,15.2z M17,19H7v-2H5v4c0,1.1,0.9,2,2,2h10c1.1,0,2-0.9,2-2v-4h-2V19z"/></g> -<g id="event-note"><path d="M17,10H7v2h10V10z M13,14H7v2h6V14z M16,1v2H8V1H6v2H5C3.9,3,3,3.9,3,5l0,14c0,1.1,0.9,2,2,2h14c1.1,0,2-0.9,2-2V5c0-1.1-0.9-2-2-2h-1V1H16z M19,19H5V8h14V19z"/></g> -<g id="gps-fixed"><path d="M12,8c-2.2,0-4,1.8-4,4c0,2.2,1.8,4,4,4s4-1.8,4-4C16,9.8,14.2,8,12,8z M20.9,11c-0.5-4.2-3.8-7.5-7.9-7.9V1h-2v2.1C6.8,3.5,3.5,6.8,3.1,11H1v2h2.1c0.5,4.2,3.8,7.5,7.9,7.9V23h2v-2.1c4.2-0.5,7.5-3.8,7.9-7.9H23v-2H20.9z M12,19c-3.9,0-7-3.1-7-7c0-3.9,3.1-7,7-7s7,3.1,7,7C19,15.9,15.9,19,12,19z"/></g> -<g id="gps-not-fixed"><path d="M20.9,11c-0.5-4.2-3.8-7.5-7.9-7.9V1h-2v2.1C6.8,3.5,3.5,6.8,3.1,11H1v2h2.1c0.5,4.2,3.8,7.5,7.9,7.9V23h2v-2.1c4.2-0.5,7.5-3.8,7.9-7.9H23v-2H20.9z M12,19c-3.9,0-7-3.1-7-7c0-3.9,3.1-7,7-7s7,3.1,7,7C19,15.9,15.9,19,12,19z"/></g> -<g id="gps-off"><path d="M20.9,11c-0.5-4.2-3.8-7.5-7.9-7.9V1h-2v2.1C9.9,3.2,8.8,3.5,7.8,4l1.5,1.5C10.2,5.2,11.1,5,12,5c3.9,0,7,3.1,7,7c0,0.9-0.2,1.8-0.5,2.7l1.5,1.5c0.5-1,0.8-2,1-3.2H23v-2H20.9z M3,4.3l2,2C4,7.6,3.3,9.2,3.1,11H1v2h2.1c0.5,4.2,3.8,7.5,7.9,7.9V23h2v-2.1c1.8-0.2,3.4-0.9,4.7-2l2,2l1.3-1.3L4.3,3L3,4.3z M16.3,17.5C15.1,18.5,13.6,19,12,19c-3.9,0-7-3.1-7-7c0-1.6,0.5-3.1,1.5-4.3L16.3,17.5z"/></g> -<g id="location-disabled"><path d="M20.9,11c-0.5-4.2-3.8-7.5-7.9-7.9V1h-2v2.1C9.9,3.2,8.8,3.5,7.8,4l1.5,1.5C10.2,5.2,11.1,5,12,5c3.9,0,7,3.1,7,7c0,0.9-0.2,1.8-0.5,2.7l1.5,1.5c0.5-1,0.8-2,1-3.2H23v-2H20.9z M3,4.3l2,2C4,7.6,3.3,9.2,3.1,11H1v2h2.1c0.5,4.2,3.8,7.5,7.9,7.9V23h2v-2.1c1.8-0.2,3.4-0.9,4.7-2l2,2l1.3-1.3L4.3,3L3,4.3z M16.3,17.5C15.1,18.5,13.6,19,12,19c-3.9,0-7-3.1-7-7c0-1.6,0.5-3.1,1.5-4.3L16.3,17.5z"/></g> -<g id="location-searching"><path d="M20.9,11c-0.5-4.2-3.8-7.5-7.9-7.9V1h-2v2.1C6.8,3.5,3.5,6.8,3.1,11H1v2h2.1c0.5,4.2,3.8,7.5,7.9,7.9V23h2v-2.1c4.2-0.5,7.5-3.8,7.9-7.9H23v-2H20.9z M12,19c-3.9,0-7-3.1-7-7c0-3.9,3.1-7,7-7c3.9,0,7,3.1,7,7C19,15.9,15.9,19,12,19z"/></g> -<g id="network-cell"><path d="M2,22h20V2L2,22z M20,20h-3.3v-9.8L20,6.8V20z"/></g> -<g id="network-wifi"><path d="M12,2C7.5,2,3.3,3.5,0,6l12,16L24,6C20.7,3.5,16.5,2,12,2z M12,7.3C9.4,7.3,7,8,4.9,9.2l-2-2.7C5.6,4.9,8.7,4,12,4c3.3,0,6.4,0.9,9.1,2.5l-2,2.7C17,8,14.6,7.3,12,7.3z"/></g> -<g id="nfc"><path d="M20,2H4C2.9,2,2,2.9,2,4v16c0,1.1,0.9,2,2,2h16c1.1,0,2-0.9,2-2V4C22,2.9,21.1,2,20,2z M20,20H4V4h16V20z M18,6h-5c-1.1,0-2,0.9-2,2v2.3c-0.6,0.3-1,1-1,1.7c0,1.1,0.9,2,2,2c1.1,0,2-0.9,2-2c0-0.7-0.4-1.4-1-1.7V8h3v8H8V8h2V6H8H6v12h12V6z"/></g> -<g id="now-wallpaper"><path d="M4,4h7V2H4C2.9,2,2,2.9,2,4v7h2V4z M10,13l-4,5h12l-3-4l-2,2.7L10,13z M17,8.5C17,7.7,16.3,7,15.5,7S14,7.7,14,8.5s0.7,1.5,1.5,1.5S17,9.3,17,8.5z M20,2h-7v2h7v7h2V4C22,2.9,21.1,2,20,2z M20,20h-7v2h7c1.1,0,2-0.9,2-2v-7h-2V20z M4,13H2v7c0,1.1,0.9,2,2,2h7v-2H4V13z"/></g> -<g id="now-widgets"><path d="M13,13v8h8v-8h-4.3H13z M3,21h8v-8H3V21z M3,3v8h8V7.3V3H3z M16.7,1.7L11,7.3l5.7,5.7l5.7-5.7L16.7,1.7z"/></g> -<g id="screen-lock-landscape"><path d="M21,5H3C1.9,5,1,5.9,1,7v10c0,1.1,0.9,2,2,2h18c1.1,0,2-0.9,2-2V7C23,5.9,22.1,5,21,5z M19,17H5V7h14V17z M10,16h4c0.6,0,1-0.4,1-1v-3c0-0.6-0.4-1-1-1v-1c0-1.1-0.9-2-2-2c-1.1,0-2,0.9-2,2v1c-0.6,0-1,0.4-1,1v3C9,15.6,9.4,16,10,16z M10.8,10c0-0.7,0.5-1.2,1.2-1.2c0.7,0,1.2,0.5,1.2,1.2v1h-2.4V10z"/></g> -<g id="screen-lock-portrait"><path d="M10,16h4c0.6,0,1-0.4,1-1v-3c0-0.6-0.4-1-1-1v-1c0-1.1-0.9-2-2-2c-1.1,0-2,0.9-2,2v1c-0.6,0-1,0.4-1,1v3C9,15.6,9.4,16,10,16z M10.8,10c0-0.7,0.5-1.2,1.2-1.2c0.7,0,1.2,0.5,1.2,1.2v1h-2.4V10z M17,1H7C5.9,1,5,1.9,5,3v18c0,1.1,0.9,2,2,2h10c1.1,0,2-0.9,2-2V3C19,1.9,18.1,1,17,1z M17,19H7V5h10V19z"/></g> -<g id="screen-lock-rotation"><path d="M23.3,12.8l-2.6-2.6l-1.4,1.4l2.2,2.2l-5.7,5.7L4.5,8.2l5.7-5.7l2.1,2.1l1.4-1.4l-2.4-2.4c-0.6-0.6-1.5-0.6-2.1,0L2.7,7.1c-0.6,0.6-0.6,1.5,0,2.1l12,12c0.6,0.6,1.5,0.6,2.1,0l6.4-6.4C23.8,14.3,23.8,13.4,23.3,12.8z M8.5,20.5c-3.3-1.5-5.6-4.7-6-8.5H1c0.5,6.2,5.7,11,11.9,11c0.2,0,0.4,0,0.7,0l-3.8-3.8L8.5,20.5z M16,9h5c0.6,0,1-0.4,1-1V4c0-0.6-0.4-1-1-1V2.5C21,1.1,19.9,0,18.5,0C17.1,0,16,1.1,16,2.5V3c-0.6,0-1,0.4-1,1v4C15,8.6,15.4,9,16,9z M16.8,2.5c0-0.9,0.8-1.7,1.7-1.7c0.9,0,1.7,0.8,1.7,1.7V3h-3.4V2.5z"/></g> -<g id="screen-rotation"><path d="M16.5,2.5c3.3,1.5,5.6,4.7,6,8.5h1.5C23.4,4.8,18.3,0,12,0c-0.2,0-0.4,0-0.7,0l3.8,3.8L16.5,2.5z M10.2,1.7c-0.6-0.6-1.5-0.6-2.1,0L1.7,8.1c-0.6,0.6-0.6,1.5,0,2.1l12,12c0.6,0.6,1.5,0.6,2.1,0l6.4-6.4c0.6-0.6,0.6-1.5,0-2.1L10.2,1.7z M14.8,21.2l-12-12l6.4-6.4l12,12L14.8,21.2z M7.5,21.5c-3.3-1.5-5.6-4.7-6-8.5H0.1C0.6,19.2,5.7,24,12,24c0.2,0,0.4,0,0.7,0l-3.8-3.8L7.5,21.5z"/></g> -<g id="sd-storage"><path d="M18,2h-8L4,8l0,12c0,1.1,0.9,2,2,2h12c1.1,0,2-0.9,2-2V4C20,2.9,19.1,2,18,2z M12,8h-2V4h2V8z M15,8h-2V4h2V8z M18,8h-2V4h2V8z"/></g> -<g id="signal-cellular-1-bar"><path d="M2,22h20V2L2,22z M20,20h-8.7v-4.5L20,6.8V20z"/></g> -<g id="signal-cellular-2-bar"><path d="M2,22h20V2L2,22z M20,20h-6v-7.2l6-6V20z"/></g> -<g id="signal-cellular-3-bar"><path d="M2,22h20V2L2,22z M20,20h-3.3v-9.8L20,6.8V20z"/></g> -<g id="signal-cellular-4-bar"><polygon points="2,22 22,22 22,2 "/></g> -<g id="signal-wifi-1-bar"><path d="M12,2C7.5,2,3.3,3.5,0,6l12,16L24,6C20.7,3.5,16.5,2,12,2z M12,13.3c-1.2,0-2.4,0.3-3.5,0.7L2.9,6.5C5.6,4.9,8.7,4,12,4c3.3,0,6.4,0.9,9.1,2.5l-5.7,7.6C14.4,13.6,13.2,13.3,12,13.3z"/></g> -<g id="signal-wifi-2-bar"><path d="M12,2C7.5,2,3.3,3.5,0,6l12,16L24,6C20.7,3.5,16.5,2,12,2z M12,10c-2,0-3.8,0.5-5.5,1.3L2.9,6.5C5.6,4.9,8.7,4,12,4c3.3,0,6.4,0.9,9.1,2.5l-3.6,4.9C15.8,10.5,14,10,12,10z"/></g> -<g id="signal-wifi-3-bar"><path d="M12,2C7.5,2,3.3,3.5,0,6l12,16L24,6C20.7,3.5,16.5,2,12,2z M12,7.3C9.4,7.3,7,8,4.9,9.2l-2-2.7C5.6,4.9,8.7,4,12,4c3.3,0,6.4,0.9,9.1,2.5l-2,2.7C17,8,14.6,7.3,12,7.3z"/></g> -<g id="signal-wifi-4-bar"><path d="M12,2C7.5,2,3.3,3.5,0,6l12,16L24,6C20.7,3.5,16.5,2,12,2z"/></g> -<g id="storage"><path d="M2,19h20v-4H2V19z M4,16h2v2H4V16z M2,5v4h20V5H2z M6,8H4V6h2V8z M2,14h20v-4H2V14z M4,11h2v2H4V11z"/></g> -<g id="timer"><path d="M15,1H9v2h6V1z M11,14h2V8h-2V14z M19,7.4L20.5,6C20,5.5,19.5,5,19,4.6L17.6,6c-1.5-1.2-3.5-2-5.6-2c-5,0-9,4-9,9c0,5,4,9,9,9s9-4,9-9C21,10.9,20.3,8.9,19,7.4z M12,20c-3.9,0-7-3.1-7-7c0-3.9,3.1-7,7-7c3.9,0,7,3.1,7,7C19,16.9,15.9,20,12,20z"/></g> -<g id="usb"><path d="M15,7v4h1v2h-3V5h2l-3-4L9,5h2v8H8v-2.1C8.7,10.6,9.2,9.8,9.2,9c0-1.2-1-2.2-2.2-2.2c-1.2,0-2.2,1-2.2,2.2c0,0.8,0.5,1.6,1.2,1.9V13c0,1.1,0.9,2,2,2h3v3.1c-0.7,0.4-1.2,1.1-1.2,1.9c0,1.2,1,2.2,2.2,2.2c1.2,0,2.2-1,2.2-2.2c0-0.9-0.5-1.6-1.2-1.9V15h3c1.1,0,2-0.9,2-2v-2h1V7H15z"/></g> -<g id="wifi-tethering"><path d="M12,11c-1.1,0-2,0.9-2,2c0,1.1,0.9,2,2,2c1.1,0,2-0.9,2-2C14,11.9,13.1,11,12,11z M18,13c0-3.3-2.7-6-6-6c-3.3,0-6,2.7-6,6c0,2.2,1.2,4.1,3,5.2l1-1.7c-1.2-0.7-2-2-2-3.4c0-2.2,1.8-4,4-4s4,1.8,4,4c0,1.5-0.8,2.8-2,3.4l1,1.7C16.8,17.1,18,15.2,18,13z M12,3C6.5,3,2,7.5,2,13c0,3.7,2,6.9,5,8.6l1-1.7c-2.4-1.4-4-4-4-6.9c0-4.4,3.6-8,8-8s8,3.6,8,8c0,3-1.6,5.5-4,6.9l1,1.7c3-1.7,5-5,5-8.6C22,7.5,17.5,3,12,3z"/></g> -</defs></svg> -</core-iconset-svg> diff --git a/third_party/polymer/components/core-icons/editor-icons.html b/third_party/polymer/components/core-icons/editor-icons.html deleted file mode 100644 index d59c108..0000000 --- a/third_party/polymer/components/core-icons/editor-icons.html +++ /dev/null @@ -1,67 +0,0 @@ -<!-- -Copyright (c) 2014 The Polymer Project Authors. All rights reserved. -This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt -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 ---> - -<link rel="import" href="../core-icon/core-icon.html"> -<link rel="import" href="../core-iconset-svg/core-iconset-svg.html"> -<core-iconset-svg id="editor" iconSize="24"> -<svg><defs> -<g id="attach-drive"><path d="M22.3,14L15.4,2H8.6l0,0l6.9,12H22.3z M9.7,15l-3.4,6h13.1l3.4-6H9.7z M7.7,3.5L1.2,15l3.4,6l6.6-11.5L7.7,3.5z"/></g> -<g id="attach-file"><path d="M16.5,6v11.5c0,2.2-1.8,4-4,4s-4-1.8-4-4V5c0-1.4,1.1-2.5,2.5-2.5s2.5,1.1,2.5,2.5v10.5c0,0.6-0.4,1-1,1s-1-0.4-1-1V6H10v9.5c0,1.4,1.1,2.5,2.5,2.5s2.5-1.1,2.5-2.5V5c0-2.2-1.8-4-4-4S7,2.8,7,5v12.5c0,3,2.5,5.5,5.5,5.5s5.5-2.5,5.5-5.5V6H16.5z"/></g> -<g id="attach-money"><path d="M11.8,10.9c-2.3-0.6-3-1.2-3-2.1c0-1.1,1-1.9,2.7-1.9c1.8,0,2.4,0.8,2.5,2.1h2.2c-0.1-1.7-1.1-3.3-3.2-3.8V3h-3v2.2C8.1,5.6,6.5,6.8,6.5,8.8c0,2.3,1.9,3.5,4.7,4.1c2.5,0.6,3,1.5,3,2.4c0,0.7-0.5,1.8-2.7,1.8c-2.1,0-2.9-0.9-3-2.1H6.3c0.1,2.2,1.8,3.4,3.7,3.8V21h3v-2.2c1.9-0.4,3.5-1.5,3.5-3.6C16.5,12.5,14.1,11.5,11.8,10.9z"/></g> -<g id="border-all"><path d="M3,3v18h18V3H3z M11,19H5v-6h6V19z M11,11H5V5h6V11z M19,19h-6v-6h6V19z M19,11h-6V5h6V11z"/></g> -<g id="border-bottom"><path d="M9,11H7v2h2V11z M13,15h-2v2h2V15z M9,3H7v2h2V3z M13,11h-2v2h2V11z M5,3H3v2h2V3z M13,7h-2v2h2V7z M17,11h-2v2h2V11z M13,3h-2v2h2V3z M17,3h-2v2h2V3z M19,13h2v-2h-2V13z M19,17h2v-2h-2V17z M5,7H3v2h2V7z M19,3v2h2V3H19z M19,9h2V7h-2V9z M5,11H3v2h2V11z M3,21h18v-2H3V21z M5,15H3v2h2V15z"/></g> -<g id="border-clear"><path d="M7,5h2V3H7V5z M7,13h2v-2H7V13z M7,21h2v-2H7V21z M11,17h2v-2h-2V17z M11,21h2v-2h-2V21z M3,21h2v-2H3V21z M3,17h2v-2H3V17z M3,13h2v-2H3V13z M3,9h2V7H3V9z M3,5h2V3H3V5z M11,13h2v-2h-2V13z M19,17h2v-2h-2V17z M19,13h2v-2h-2V13z M19,21h2v-2h-2V21z M19,9h2V7h-2V9z M11,9h2V7h-2V9z M19,3v2h2V3H19z M11,5h2V3h-2V5z M15,21h2v-2h-2V21z M15,13h2v-2h-2V13z M15,5h2V3h-2V5z"/></g> -<g id="border-color"><path d="M17.8,7L14,3.2l-10,10V17h3.8L17.8,7z M20.7,4c0.4-0.4,0.4-1,0-1.4l-2.3-2.3c-0.4-0.4-1-0.4-1.4,0l-2,2L18.8,6L20.7,4z"/></g> -<g id="border-horizontal"><path d="M3,21h2v-2H3V21z M5,7H3v2h2V7z M3,17h2v-2H3V17z M7,21h2v-2H7V21z M5,3H3v2h2V3z M9,3H7v2h2V3z M17,3h-2v2h2V3z M13,7h-2v2h2V7z M13,3h-2v2h2V3z M19,17h2v-2h-2V17z M11,21h2v-2h-2V21z M3,13h18v-2H3V13z M19,3v2h2V3H19z M19,9h2V7h-2V9z M11,17h2v-2h-2V17z M15,21h2v-2h-2V21z M19,21h2v-2h-2V21z"/></g> -<g id="border-inner"><path d="M3,21h2v-2H3V21z M7,21h2v-2H7V21z M5,7H3v2h2V7z M3,17h2v-2H3V17z M9,3H7v2h2V3z M5,3H3v2h2V3z M17,3h-2v2h2V3z M19,9h2V7h-2V9z M19,3v2h2V3H19z M15,21h2v-2h-2V21z M13,3h-2v8H3v2h8v8h2v-8h8v-2h-8V3z M19,21h2v-2h-2V21z M19,17h2v-2h-2V17z"/></g> -<g id="border-left"><path d="M11,21h2v-2h-2V21z M11,17h2v-2h-2V17z M11,5h2V3h-2V5z M11,9h2V7h-2V9z M11,13h2v-2h-2V13z M7,21h2v-2H7V21z M7,5h2V3H7V5z M7,13h2v-2H7V13z M3,21h2V3H3V21z M19,9h2V7h-2V9z M15,21h2v-2h-2V21z M19,17h2v-2h-2V17z M19,3v2h2V3H19z M19,13h2v-2h-2V13z M19,21h2v-2h-2V21z M15,13h2v-2h-2V13z M15,5h2V3h-2V5z"/></g> -<g id="border-outer"><path d="M13,7h-2v2h2V7z M13,11h-2v2h2V11z M17,11h-2v2h2V11z M3,3v18h18V3H3z M19,19H5V5h14V19z M13,15h-2v2h2V15z M9,11H7v2h2V11z"/></g> -<g id="border-right"><path d="M7,21h2v-2H7V21z M3,5h2V3H3V5z M7,5h2V3H7V5z M7,13h2v-2H7V13z M3,21h2v-2H3V21z M11,21h2v-2h-2V21z M3,13h2v-2H3V13z M3,17h2v-2H3V17z M3,9h2V7H3V9z M11,17h2v-2h-2V17z M15,13h2v-2h-2V13z M19,3v18h2V3H19z M15,21h2v-2h-2V21z M15,5h2V3h-2V5z M11,13h2v-2h-2V13z M11,5h2V3h-2V5z M11,9h2V7h-2V9z"/></g> -<g id="border-style"><path d="M15,21h2v-2h-2V21z M19,21h2v-2h-2V21z M7,21h2v-2H7V21z M11,21h2v-2h-2V21z M19,17h2v-2h-2V17z M19,13h2v-2h-2V13z M3,3v18h2V5h16V3H3z M19,9h2V7h-2V9z"/></g> -<g id="border-top"><path d="M7,21h2v-2H7V21z M7,13h2v-2H7V13z M11,13h2v-2h-2V13z M11,21h2v-2h-2V21z M3,17h2v-2H3V17z M3,21h2v-2H3V21z M3,13h2v-2H3V13z M3,9h2V7H3V9z M11,17h2v-2h-2V17z M19,9h2V7h-2V9z M19,13h2v-2h-2V13z M3,3v2h18V3H3z M19,17h2v-2h-2V17z M15,21h2v-2h-2V21z M11,9h2V7h-2V9z M19,21h2v-2h-2V21z M15,13h2v-2h-2V13z"/></g> -<g id="border-vertical"><path d="M3,9h2V7H3V9z M3,5h2V3H3V5z M7,21h2v-2H7V21z M7,13h2v-2H7V13z M3,13h2v-2H3V13z M3,21h2v-2H3V21z M3,17h2v-2H3V17z M7,5h2V3H7V5z M19,17h2v-2h-2V17z M11,21h2V3h-2V21z M19,21h2v-2h-2V21z M19,13h2v-2h-2V13z M19,3v2h2V3H19z M19,9h2V7h-2V9z M15,5h2V3h-2V5z M15,21h2v-2h-2V21z M15,13h2v-2h-2V13z"/></g> -<g id="format-align-center"><path d="M7,15v2h10v-2H7z M3,21h18v-2H3V21z M3,13h18v-2H3V13z M7,7v2h10V7H7z M3,3v2h18V3H3z"/></g> -<g id="format-align-justify"><path d="M3,21h18v-2H3V21z M3,17h18v-2H3V17z M3,13h18v-2H3V13z M3,9h18V7H3V9z M3,3v2h18V3H3z"/></g> -<g id="format-align-left"><path d="M15,15H3v2h12V15z M15,7H3v2h12V7z M3,13h18v-2H3V13z M3,21h18v-2H3V21z M3,3v2h18V3H3z"/></g> -<g id="format-align-right"><path d="M3,21h18v-2H3V21z M9,17h12v-2H9V17z M3,13h18v-2H3V13z M9,9h12V7H9V9z M3,3v2h18V3H3z"/></g> -<g id="format-bold"><path d="M15.6,10.8c1-0.7,1.7-1.8,1.7-2.8c0-2.3-1.7-4-4-4H7v14h7c2.1,0,3.7-1.7,3.7-3.8C17.8,12.7,16.9,11.4,15.6,10.8z M10,6.5h3c0.8,0,1.5,0.7,1.5,1.5S13.8,9.5,13,9.5h-3V6.5z M13.5,15.5H10v-3h3.5c0.8,0,1.5,0.7,1.5,1.5S14.3,15.5,13.5,15.5z"/></g> -<g id="format-clear"><path d="M3.3,5L2,6.3l7,7L6.5,19h3l1.6-3.7l5.7,5.7l1.3-1.3L3.5,5.3L3.3,5z M6,5v0.2L8.8,8h2.4l-0.7,1.7l2.1,2.1L14.2,8H20V5H6z"/></g> -<g id="format-color-fill"><path d="M16.6,8.9L7.6,0L6.2,1.4l2.4,2.4L3.4,8.9c-0.6,0.6-0.6,1.5,0,2.1l5.5,5.5C9.2,16.9,9.6,17,10,17s0.8-0.1,1.1-0.4l5.5-5.5C17.1,10.5,17.1,9.5,16.6,8.9z M5.2,10L10,5.2l4.8,4.8H5.2z M19,11.5c0,0-2,2.2-2,3.5c0,1.1,0.9,2,2,2s2-0.9,2-2C21,13.7,19,11.5,19,11.5z"/></g> -<g id="format-color-reset"><path d="M18,14c0-4-6-10.8-6-10.8s-1.3,1.5-2.7,3.5l8.6,8.6C17.9,14.9,18,14.4,18,14z M17.1,17.1l-4.6-4.6L5.3,5.3L4,6.5l3.3,3.3C6.6,11.3,6,12.8,6,14c0,3.3,2.7,6,6,6c1.5,0,2.9-0.6,4-1.5l2.6,2.6l1.3-1.3L17.1,17.1z"/></g> -<g id="format-color-text"><path d="M11,3L5.5,17h2.2l1.1-3h6.2l1.1,3h2.2L13,3H11z M9.6,12L12,5.7l2.4,6.3H9.6z"/></g> -<g id="format-indent-decrease"><path d="M11,17h10v-2H11V17z M3,12l4,4V8L3,12z M3,21h18v-2H3V21z M3,3v2h18V3H3z M11,9h10V7H11V9z M11,13h10v-2H11V13z"/></g> -<g id="format-indent-increase"><path d="M3,21h18v-2H3V21z M3,8v8l4-4L3,8z M11,17h10v-2H11V17z M3,3v2h18V3H3z M11,9h10V7H11V9z M11,13h10v-2H11V13z"/></g> -<g id="format-italic"><polygon points="10,4 10,7 12.2,7 8.8,15 6,15 6,18 14,18 14,15 11.8,15 15.2,7 18,7 18,4 "/></g> -<g id="format-line-spacing"><path d="M6,7h2.5L5,3.5L1.5,7H4v10H1.5L5,20.5L8.5,17H6V7z M10,5v2h12V5H10z M10,19h12v-2H10V19z M10,13h12v-2H10V13z"/></g> -<g id="format-list-bulleted"><path d="M4,10.5c-0.8,0-1.5,0.7-1.5,1.5s0.7,1.5,1.5,1.5s1.5-0.7,1.5-1.5S4.8,10.5,4,10.5z M4,4.5C3.2,4.5,2.5,5.2,2.5,6S3.2,7.5,4,7.5S5.5,6.8,5.5,6S4.8,4.5,4,4.5z M4,16.7c-0.7,0-1.3,0.6-1.3,1.3s0.6,1.3,1.3,1.3s1.3-0.6,1.3-1.3S4.7,16.7,4,16.7z M7,19h14v-2H7V19z M7,13h14v-2H7V13z M7,5v2h14V5H7z"/></g> -<g id="format-list-numbered"><path d="M2,17h2v0.5H3v1h1V19H2v1h3v-4H2V17z M3,8h1V4H2v1h1V8z M2,11h1.8L2,13.1V14h3v-1H3.2L5,10.9V10H2V11z M7,5v2h14V5H7z M7,19h14v-2H7V19z M7,13h14v-2H7V13z"/></g> -<g id="format-paint"><path d="M18,4V3c0-0.6-0.4-1-1-1H5C4.4,2,4,2.4,4,3v4c0,0.6,0.4,1,1,1h12c0.6,0,1-0.4,1-1V6h1v4H9v11c0,0.6,0.4,1,1,1h2c0.6,0,1-0.4,1-1v-9h8V4H18z"/></g> -<g id="format-quote"><polygon points="6,17 9,17 11,13 11,7 5,7 5,13 8,13 "/><polygon points="14,17 17,17 19,13 19,7 13,7 13,13 16,13 "/></g> -<g id="format-size"><path d="M9,4v3h5v12h3V7h5V4H9z M3,12h3v7h3v-7h3V9H3V12z"/></g> -<g id="format-strikethrough"><path d="M10,19h4v-3h-4V19z M5,4v3h5v3h4V7h5V4H5z M3,14h18v-2H3V14z"/></g> -<g id="format-textdirection-l-to-r"><polygon points="18,4 6,4 6,6 12.5,12 6,18 6,20 18,20 18,17 11,17 16,12 11,7 18,7 "/></g> -<g id="format-textdirection-r-to-l"><path d="M9,10L9,10l0,5h2V4h2v11h2V4h2V2H9C6.8,2,5,3.8,5,6C5,8.2,6.8,10,9,10z M21,18l-4-4v3H5v2h12v3L21,18z"/></g> -<g id="format-underline"><path d="M12,17c3.3,0,6-2.7,6-6V3h-2.5v8c0,1.9-1.6,3.5-3.5,3.5S8.5,12.9,8.5,11V3H6v8C6,14.3,8.7,17,12,17z M5,19v2h14v-2H5z"/></g> -<g id="functions"><path d="M10,10L10,10l0,5h2V4h2v11h2V4h2V2h-8C7.8,2,6,3.8,6,6C6,8.2,7.8,10,10,10z M8,17v-3l-4,4l4,4v-3h12v-2H8z"/></g> -<g id="insert-chart"><path d="M19,3H5C3.9,3,3,3.9,3,5v14c0,1.1,0.9,2,2,2h14c1.1,0,2-0.9,2-2V5C21,3.9,20.1,3,19,3z M9,17H7v-7h2V17z M13,17h-2V7h2V17z M17,17h-2v-4h2V17z"/></g> -<g id="insert-comment"><path d="M20,2H4C2.9,2,2,2.9,2,4v12c0,1.1,0.9,2,2,2h14l4,4V4C22,2.9,21.1,2,20,2z M18,14H6v-2h12V14z M18,11H6V9h12V11z M18,8H6V6h12V8z"/></g> -<g id="insert-drive-file"><path d="M6,2C4.9,2,4,2.9,4,4l0,16c0,1.1,0.9,2,2,2h12c1.1,0,2-0.9,2-2V8l-6-6H6z M13,9V3.5L18.5,9H13z"/></g> -<g id="insert-emoticon"><path d="M12,2C6.5,2,2,6.5,2,12s4.5,10,10,10c5.5,0,10-4.5,10-10S17.5,2,12,2z M12,20c-4.4,0-8-3.6-8-8s3.6-8,8-8c4.4,0,8,3.6,8,8S16.4,20,12,20z M15.5,11c0.8,0,1.5-0.7,1.5-1.5S16.3,8,15.5,8S14,8.7,14,9.5S14.7,11,15.5,11z M8.5,11c0.8,0,1.5-0.7,1.5-1.5S9.3,8,8.5,8S7,8.7,7,9.5S7.7,11,8.5,11z M12,17.5c2.3,0,4.3-1.5,5.1-3.5H6.9C7.7,16,9.7,17.5,12,17.5z"/></g> -<g id="insert-invitation"><path d="M17,12h-5v5h5V12z M16,1v2H8V1H6v2H5C3.9,3,3,3.9,3,5l0,14c0,1.1,0.9,2,2,2h14c1.1,0,2-0.9,2-2V5c0-1.1-0.9-2-2-2h-1V1H16z M19,19H5V8h14V19z"/></g> -<g id="insert-link"><path d="M8,13h8v-2H8V13z M3.9,12c0-2.3,1.8-4.1,4.1-4.1h3V6H8c-3.3,0-6,2.7-6,6s2.7,6,6,6h3v-1.9H8C5.7,16.1,3.9,14.3,3.9,12z M16,6h-3v1.9h3c2.3,0,4.1,1.8,4.1,4.1c0,2.3-1.8,4.1-4.1,4.1h-3V18h3c3.3,0,6-2.7,6-6S19.3,6,16,6z"/></g> -<g id="insert-photo"><path d="M21,19V5c0-1.1-0.9-2-2-2H5C3.9,3,3,3.9,3,5v14c0,1.1,0.9,2,2,2h14C20.1,21,21,20.1,21,19z M8.5,13.5l2.5,3l3.5-4.5l4.5,6H5L8.5,13.5z"/></g> -<g id="merge-type"><path d="M17,20.4l1.4-1.4L15,15.6L13.6,17L17,20.4z M7.5,8H11v5.6L5.6,19L7,20.4l6-6V8h3.5L12,3.5L7.5,8z"/></g> -<g id="mode-comment"><path d="M22,4c0-1.1-0.9-2-2-2H4C2.9,2,2,2.9,2,4v12c0,1.1,0.9,2,2,2h14l4,4L22,4z"/></g> -<g id="mode-edit"><path d="M3,17.2V21h3.8L17.8,9.9l-3.8-3.8L3,17.2z M20.7,7c0.4-0.4,0.4-1,0-1.4l-2.3-2.3c-0.4-0.4-1-0.4-1.4,0l-1.8,1.8l3.8,3.8L20.7,7z"/></g> -<g id="vertical-align-bottom"><path d="M16,13h-3V3h-2v10H8l4,4L16,13z M4,19v2h16v-2H4z"/></g> -<g id="vertical-align-center"><path d="M8,19h3v4h2v-4h3l-4-4L8,19z M16,5h-3V1h-2v4H8l4,4L16,5z M4,11v2h16v-2H4z"/></g> -<g id="vertical-align-top"><path d="M8,11h3v10h2V11h3l-4-4L8,11z M4,3v2h16V3H4z"/></g> -<g id="wrap-text"><path d="M4,19h6v-2H4V19z M20,5H4v2h16V5z M17,11H4v2h13.2c1.1,0,2,0.9,2,2s-0.9,2-2,2H15v-2l-3,3l3,3v-2h2c2.2,0,4-1.8,4-4S19.2,11,17,11z"/></g> -</defs></svg> -</core-iconset-svg> diff --git a/third_party/polymer/components/core-icons/hardware-icons.html b/third_party/polymer/components/core-icons/hardware-icons.html deleted file mode 100644 index 510a05c..0000000 --- a/third_party/polymer/components/core-icons/hardware-icons.html +++ /dev/null @@ -1,56 +0,0 @@ -<!-- -Copyright (c) 2014 The Polymer Project Authors. All rights reserved. -This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt -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 ---> - -<link rel="import" href="../core-icon/core-icon.html"> -<link rel="import" href="../core-iconset-svg/core-iconset-svg.html"> -<core-iconset-svg id="hardware" iconSize="24"> -<svg><defs> -<g id="cast"><path d="M21,3H3C1.9,3,1,3.9,1,5v3h2V5h18v14h-7v2h7c1.1,0,2-0.9,2-2V5C23,3.9,22.1,3,21,3z M1,18v3h3C4,19.3,2.7,18,1,18z M1,14v2c2.8,0,5,2.2,5,5h2C8,17.1,4.9,14,1,14z M1,10v2c5,0,9,4,9,9h2C12,14.9,7.1,10,1,10z"/></g> -<g id="cast-connected"><path d="M1,18v3h3C4,19.3,2.7,18,1,18z M1,14v2c2.8,0,5,2.2,5,5h2C8,17.1,4.9,14,1,14z M19,7H5v1.6c4,1.3,7.1,4.4,8.4,8.4H19V7z M1,10v2c5,0,9,4,9,9h2C12,14.9,7.1,10,1,10z M21,3H3C1.9,3,1,3.9,1,5v3h2V5h18v14h-7v2h7c1.1,0,2-0.9,2-2V5C23,3.9,22.1,3,21,3z"/></g> -<g id="chromecast"><path d="M12,2C6.5,2,2,6.5,2,12s4.5,10,10,10c5.5,0,10-4.5,10-10S17.5,2,12,2z M12,4c3,0,5.5,1.6,6.9,4H12c-1.9,0-3.6,1.4-3.9,3.2L5.7,7.1C7.2,5.2,9.4,4,12,4z M15,12c0,1.7-1.3,3-3,3c-1.7,0-3-1.3-3-3c0-1.7,1.3-3,3-3C13.7,9,15,10.3,15,12z M4,12c0-1.5,0.4-2.8,1.1-4l3.5,6l0,0c0.7,1.2,2,2,3.4,2c0.5,0,0.9-0.1,1.3-0.2l-2.4,4.1C7,19.4,4,16,4,12z M12,20l3.5-6l0,0c0.3-0.6,0.6-1.3,0.6-2c0-1.2-0.5-2.3-1.4-3h4.8c0.4,0.9,0.6,1.9,0.6,3C20,16.4,16.4,20,12,20z"/></g> -<g id="desktop-mac"><path d="M21,2H3C1.9,2,1,2.9,1,4v12c0,1.1,0.9,2,2,2h7l-2,3v1h8v-1l-2-3h7c1.1,0,2-0.9,2-2V4C23,2.9,22.1,2,21,2z M21,14H3V4h18V14z"/></g> -<g id="desktop-windows"><path d="M21,2H3C1.9,2,1,2.9,1,4v12c0,1.1,0.9,2,2,2h7v2H8v2h8v-2h-2v-2h7c1.1,0,2-0.9,2-2V4C23,2.9,22.1,2,21,2z M21,16H3V4h18V16z"/></g> -<g id="dock"><path d="M8,23h8v-2H8V23z M16,1L8,1C6.9,1,6,1.9,6,3v14c0,1.1,0.9,2,2,2h8c1.1,0,2-0.9,2-2V3C18,1.9,17.1,1,16,1z M16,15H8V5h8V15z"/></g> -<g id="gamepad"><path d="M15,7.5V2H9v5.5l3,3L15,7.5z M7.5,9H2v6h5.5l3-3L7.5,9z M9,16.5V22h6v-5.5l-3-3L9,16.5z M16.5,9l-3,3l3,3H22V9H16.5z"/></g> -<g id="glass"><path d="M13,11v2.5h5.9c-0.6,3.5-3.4,6-6.9,6c-4.1,0-7.5-3.4-7.5-7.5S7.9,4.5,12,4.5c2.1,0,3.9,0.9,5.2,2.3l1.8-1.8C17.2,3.2,14.8,2,12,2C6.5,2,2,6.5,2,12s4.5,10,10,10c5.5,0,9.5-4.5,9.5-10v-1H13z"/></g> -<g id="headset"><path d="M12,1c-5,0-9,4-9,9v7c0,1.7,1.3,3,3,3h3v-8H5v-2c0-3.9,3.1-7,7-7c3.9,0,7,3.1,7,7v2h-4v8h3c1.7,0,3-1.3,3-3v-7C21,5,17,1,12,1z"/></g> -<g id="headset-mic"><path d="M12,1c-5,0-9,4-9,9v7c0,1.7,1.3,3,3,3h3v-8H5v-2c0-3.9,3.1-7,7-7c3.9,0,7,3.1,7,7v2h-4v8h4v1h-7v2h6c1.7,0,3-1.3,3-3V10C21,5,17,1,12,1z"/></g> -<g id="keyboard"><path d="M20,5H4C2.9,5,2,5.9,2,7l0,10c0,1.1,0.9,2,2,2h16c1.1,0,2-0.9,2-2V7C22,5.9,21.1,5,20,5z M11,8h2v2h-2V8z M11,11h2v2h-2V11z M8,8h2v2H8V8z M8,11h2v2H8V11z M7,13H5v-2h2V13z M7,10H5V8h2V10z M16,17H8v-2h8V17z M16,13h-2v-2h2V13z M16,10h-2V8h2V10z M19,13h-2v-2h2V13z M19,10h-2V8h2V10z"/></g> -<g id="keyboard-alt"><path d="M15.5,10c0.8,0,1.5-0.7,1.5-1.5S16.3,7,15.5,7S14,7.7,14,8.5S14.7,10,15.5,10z M8.5,10C9.3,10,10,9.3,10,8.5S9.3,7,8.5,7C7.7,7,7,7.7,7,8.5S7.7,10,8.5,10z M12,17c2.6,0,4.8-1.7,5.7-4H6.3C7.2,15.3,9.4,17,12,17z M12,1C6.5,1,2,5.5,2,11c0,5.5,4.5,10,10,10c5.5,0,10-4.5,10-10C22,5.5,17.5,1,12,1z M12,19c-4.4,0-8-3.6-8-8s3.6-8,8-8c4.4,0,8,3.6,8,8S16.4,19,12,19z"/></g> -<g id="keyboard-arrow-down"><polygon points="7.4,7.8 12,12.4 16.6,7.8 18,9.2 12,15.2 6,9.2 "/></g> -<g id="keyboard-arrow-left"><polygon points="15.4,16.1 10.8,11.5 15.4,6.9 14,5.5 8,11.5 14,17.5 "/></g> -<g id="keyboard-arrow-right"><polygon points="8.6,16.3 13.2,11.8 8.6,7.2 10,5.8 16,11.8 10,17.8 "/></g> -<g id="keyboard-arrow-up"><polygon points="7.4,15.4 12,10.8 16.6,15.4 18,14 12,8 6,14 "/></g> -<g id="keyboard-backspace"><polygon points="21,11 6.8,11 10.4,7.4 9,6 3,12 9,18 10.4,16.6 6.8,13 21,13 "/></g> -<g id="keyboard-capslock"><path d="M12,8.4l4.6,4.6l1.4-1.4l-6-6l-6,6L7.4,13L12,8.4z M6,18h12v-2H6V18z"/></g> -<g id="keyboard-control"><path d="M6,10c-1.1,0-2,0.9-2,2c0,1.1,0.9,2,2,2c1.1,0,2-0.9,2-2C8,10.9,7.1,10,6,10z M18,10c-1.1,0-2,0.9-2,2c0,1.1,0.9,2,2,2c1.1,0,2-0.9,2-2C20,10.9,19.1,10,18,10z M12,10c-1.1,0-2,0.9-2,2c0,1.1,0.9,2,2,2c1.1,0,2-0.9,2-2C14,10.9,13.1,10,12,10z"/></g> -<g id="keyboard-hide"><path d="M20,3H4C2.9,3,2,3.9,2,5l0,10c0,1.1,0.9,2,2,2h16c1.1,0,2-0.9,2-2V5C22,3.9,21.1,3,20,3z M11,6h2v2h-2V6z M11,9h2v2h-2V9z M8,6h2v2H8V6z M8,9h2v2H8V9z M7,11H5V9h2V11z M7,8H5V6h2V8z M16,15H8v-2h8V15z M16,11h-2V9h2V11z M16,8h-2V6h2V8z M19,11h-2V9h2V11z M19,8h-2V6h2V8z M12,23l4-4H8L12,23z"/></g> -<g id="keyboard-return"><polygon points="19,7 19,11 5.8,11 9.4,7.4 8,6 2,12 8,18 9.4,16.6 5.8,13 21,13 21,7 "/></g> -<g id="keyboard-tab"><path d="M11.6,7.4l3.6,3.6H1v2h14.2l-3.6,3.6L13,18l6-6l-6-6L11.6,7.4z M20,6v12h2V6H20z"/></g> -<g id="keyboard-voice"><path d="M12,15c1.7,0,3-1.3,3-3l0-6c0-1.7-1.3-3-3-3c-1.7,0-3,1.3-3,3v6C9,13.7,10.3,15,12,15z M17.3,12c0,3-2.5,5.1-5.3,5.1c-2.8,0-5.3-2.1-5.3-5.1H5c0,3.4,2.7,6.2,6,6.7V22h2v-3.3c3.3-0.5,6-3.3,6-6.7H17.3z"/></g> -<g id="laptop"><path d="M20,18c1.1,0,2-0.9,2-2l0-10c0-1.1-0.9-2-2-2H4C2.9,4,2,4.9,2,6v10c0,1.1,0.9,2,2,2H0v2h24v-2H20z M4,6h16v10H4V6z"/></g> -<g id="laptop-chromebook"><path d="M22,18V3H2v15H0v2h24v-2H22z M14,18h-4v-1h4V18z M20,15H4V5h16V15z"/></g> -<g id="laptop-mac"><path d="M20,18c1.1,0,2-0.9,2-2l0-11c0-1.1-0.9-2-2-2H4C2.9,3,2,3.9,2,5v11c0,1.1,0.9,2,2,2H0c0,1.1,0.9,2,2,2h20c1.1,0,2-0.9,2-2H20z M4,5h16v11H4V5z M12,19c-0.6,0-1-0.4-1-1s0.4-1,1-1c0.6,0,1,0.4,1,1S12.6,19,12,19z"/></g> -<g id="laptop-windows"><path d="M20,18v-1c1.1,0,2-0.9,2-2l0-10c0-1.1-0.9-2-2-2H4C2.9,3,2,3.9,2,5v10c0,1.1,0.9,2,2,2v1H0v2h24v-2H20z M4,5h16v10H4V5z"/></g> -<g id="memory"><path d="M15,9H9v6h6V9z M13,13h-2v-2h2V13z M21,11V9h-2V7c0-1.1-0.9-2-2-2h-2V3h-2v2h-2V3H9v2H7C5.9,5,5,5.9,5,7v2H3v2h2v2H3v2h2v2c0,1.1,0.9,2,2,2h2v2h2v-2h2v2h2v-2h2c1.1,0,2-0.9,2-2v-2h2v-2h-2v-2H21z M17,17H7V7h10V17z"/></g> -<g id="mouse"><path d="M13,1.1V9h7C20,4.9,16.9,1.6,13,1.1z M4,15c0,4.4,3.6,8,8,8c4.4,0,8-3.6,8-8v-4H4V15z M11,1.1C7.1,1.6,4,4.9,4,9h7V1.1z"/></g> -<g id="nest-protect"><path d="M19,3H5C3.9,3,3,3.9,3,5v14c0,1.1,0.9,2,2,2h14c1.1,0,2-0.9,2-2V5C21,3.9,20.1,3,19,3z M12,18c-3.3,0-6-2.7-6-6s2.7-6,6-6c3.3,0,6,2.7,6,6S15.3,18,12,18z"/><circle cx="12" cy="12" r="4"/></g> -<g id="nest-thermostat"><path d="M12,2C6.5,2,2,6.5,2,12c0,5.5,4.5,10,10,10c5.5,0,10-4.5,10-10C22,6.5,17.5,2,12,2z M12,5c1.6,0,3,0.5,4.2,1.4L14,8.6C13.4,8.2,12.7,8,12,8c-2.2,0-4,1.8-4,4c0,1.1,0.4,2.1,1.2,2.8l-2.1,2.1C5.8,15.7,5,13.9,5,12C5,8.1,8.1,5,12,5z M16.9,16.9l-2.1-2.1c0.7-0.7,1.2-1.7,1.2-2.8c0-0.7-0.2-1.4-0.6-2l2.2-2.2C18.5,9,19,10.4,19,12C19,13.9,18.2,15.7,16.9,16.9z"/></g> -<g id="phone"><path d="M17,1L7,1C5.9,1,5,1.9,5,3v18c0,1.1,0.9,2,2,2h10c1.1,0,2-0.9,2-2V3C19,1.9,18.1,1,17,1z M17,19H7V5h10V19z"/></g> -<g id="phone-android"><path d="M16,1H8C6.3,1,5,2.3,5,4v16c0,1.7,1.3,3,3,3h8c1.7,0,3-1.3,3-3V4C19,2.3,17.7,1,16,1z M14,21h-4v-1h4V21z M17.2,18H6.8V4h10.5V18z"/></g> -<g id="phone-iphone"><path d="M15.5,1h-8C6.1,1,5,2.1,5,3.5v17C5,21.9,6.1,23,7.5,23h8c1.4,0,2.5-1.1,2.5-2.5v-17C18,2.1,16.9,1,15.5,1z M11.5,22c-0.8,0-1.5-0.7-1.5-1.5s0.7-1.5,1.5-1.5c0.8,0,1.5,0.7,1.5,1.5S12.3,22,11.5,22z M16,18H7V4h9V18z"/></g> -<g id="security"><path d="M12,1L3,5v6c0,5.6,3.8,10.7,9,12c5.2-1.3,9-6.4,9-12V5L12,1z M12,12h7c-0.5,4.1-3.3,7.8-7,8.9V12l-7,0V6.3l7-3.1V12z"/></g> -<g id="speaker"><path d="M17,2H7C5.9,2,5,2.9,5,4v16c0,1.1,0.9,2,2,2l10,0c1.1,0,2-0.9,2-2V4C19,2.9,18.1,2,17,2z M12,4c1.1,0,2,0.9,2,2s-0.9,2-2,2c-1.1,0-2-0.9-2-2S10.9,4,12,4z M12,20c-2.8,0-5-2.2-5-5s2.2-5,5-5c2.8,0,5,2.2,5,5S14.8,20,12,20z M12,12c-1.7,0-3,1.3-3,3c0,1.7,1.3,3,3,3c1.7,0,3-1.3,3-3C15,13.3,13.7,12,12,12z"/></g> -<g id="tablet"><path d="M21,4H3C1.9,4,1,4.9,1,6v12c0,1.1,0.9,2,2,2h18c1.1,0,2-0.9,2-2l0-12C23,4.9,22.1,4,21,4z M19,18H5V6h14V18z"/></g> -<g id="tablet-android"><path d="M18,0H6C4.3,0,3,1.3,3,3v18c0,1.7,1.3,3,3,3h12c1.7,0,3-1.3,3-3V3C21,1.3,19.7,0,18,0z M14,22h-4v-1h4V22z M19.2,19H4.8V3h14.5V19z"/></g> -<g id="tablet-mac"><path d="M18.5,0h-14C3.1,0,2,1.1,2,2.5v19C2,22.9,3.1,24,4.5,24h14c1.4,0,2.5-1.1,2.5-2.5v-19C21,1.1,19.9,0,18.5,0z M11.5,23c-0.8,0-1.5-0.7-1.5-1.5s0.7-1.5,1.5-1.5c0.8,0,1.5,0.7,1.5,1.5S12.3,23,11.5,23z M19,19H4V3h15V19z"/></g> -<g id="tv"><path d="M20,3H4C2.9,3,2,3.9,2,5v12c0,1.1,0.9,2,2,2h4v2h8v-2h4c1.1,0,2-0.9,2-2l0-12C22,3.9,21.1,3,20,3z M20,17H4V5h16V17z"/></g> -<g id="watch"><path d="M20,12c0-2.5-1.2-4.8-3-6.3L16,0H8L7,5.7C5.2,7.2,4,9.5,4,12s1.2,4.8,3,6.3L8,24h8l1-5.7C18.8,16.8,20,14.5,20,12z M6,12c0-3.3,2.7-6,6-6c3.3,0,6,2.7,6,6s-2.7,6-6,6C8.7,18,6,15.3,6,12z"/></g> -</defs></svg> -</core-iconset-svg> diff --git a/third_party/polymer/components/core-icons/image-icons.html b/third_party/polymer/components/core-icons/image-icons.html deleted file mode 100644 index ca645b5..0000000 --- a/third_party/polymer/components/core-icons/image-icons.html +++ /dev/null @@ -1,53 +0,0 @@ -<!-- -Copyright (c) 2014 The Polymer Project Authors. All rights reserved. -This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt -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 ---> - -<link rel="import" href="../core-icon/core-icon.html"> -<link rel="import" href="../core-iconset-svg/core-iconset-svg.html"> -<core-iconset-svg id="image" iconSize="24"> -<svg><defs> -<g id="auto-fix"><polygon points="7.5,5.6 10,7 8.6,4.5 10,2 7.5,3.4 5,2 6.4,4.5 5,7 "/><polygon points="19.5,15.4 17,14 18.4,16.5 17,19 19.5,17.6 22,19 20.6,16.5 22,14 "/><polygon points="22,2 19.5,3.4 17,2 18.4,4.5 17,7 19.5,5.6 22,7 20.6,4.5 "/><path d="M14.4,7.3c-0.4-0.4-1-0.4-1.4,0L1.3,19c-0.4,0.4-0.4,1,0,1.4l2.3,2.3c0.4,0.4,1,0.4,1.4,0L16.7,11c0.4-0.4,0.4-1,0-1.4L14.4,7.3z M13.3,12.8l-2.1-2.1l2.4-2.4l2.1,2.1L13.3,12.8z"/></g> -<g id="camera"><path d="M9.4,10.5l4.8-8.3C13.5,2.1,12.7,2,12,2C9.6,2,7.4,2.8,5.7,4.3l3.7,6.3L9.4,10.5z M21.5,9c-0.9-2.9-3.1-5.3-6-6.3L11.9,9H21.5z M21.8,10h-7.5l0.3,0.5l4.8,8.3C21,17,22,14.6,22,12C22,11.3,21.9,10.6,21.8,10z M8.5,12L4.6,5.2C3,7,2,9.4,2,12c0,0.7,0.1,1.4,0.2,2h7.5L8.5,12z M2.5,15c0.9,2.9,3.1,5.3,6,6.3l3.7-6.3H2.5z M13.7,15l-3.9,6.8c0.7,0.2,1.4,0.2,2.2,0.2c2.4,0,4.6-0.8,6.3-2.3l-3.7-6.3L13.7,15z"/></g> -<g id="camera-alt"><circle cx="12" cy="12" r="3.2"/><path d="M9,2L7.2,4H4C2.9,4,2,4.9,2,6v12c0,1.1,0.9,2,2,2h16c1.1,0,2-0.9,2-2V6c0-1.1-0.9-2-2-2h-3.2L15,2H9z M12,17c-2.8,0-5-2.2-5-5s2.2-5,5-5s5,2.2,5,5S14.8,17,12,17z"/></g> -<g id="camera-roll"><path d="M14,5c0-1.1-0.9-2-2-2h-1V2c0-0.6-0.4-1-1-1H6C5.4,1,5,1.4,5,2v1H4C2.9,3,2,3.9,2,5v15c0,1.1,0.9,2,2,2h8c1.1,0,2-0.9,2-2h8V5H14z M12,18h-2v-2h2V18z M12,9h-2V7h2V9z M16,18h-2v-2h2V18z M16,9h-2V7h2V9z M20,18h-2v-2h2V18z M20,9h-2V7h2V9z"/></g> -<g id="compare"><path d="M10,3H5C3.9,3,3,3.9,3,5v14c0,1.1,0.9,2,2,2h5v2h2V1h-2V3z M10,18H5l5-6V18z M19,3h-5v2h5v13l-5-6v9h5c1.1,0,2-0.9,2-2V5C21,3.9,20.1,3,19,3z"/></g> -<g id="crop"><path d="M17,15h2V7c0-1.1-0.9-2-2-2H9v2h8V15z M7,17V1H5v4H1v2h4v10c0,1.1,0.9,2,2,2h10v4h2v-4h4v-2H7z"/></g> -<g id="crop-free"><path d="M3,5v4h2V5h4V3H5C3.9,3,3,3.9,3,5z M5,15H3v4c0,1.1,0.9,2,2,2h4v-2H5V15z M19,19h-4v2h4c1.1,0,2-0.9,2-2v-4h-2V19z M19,3h-4v2h4v4h2V5C21,3.9,20.1,3,19,3z"/></g> -<g id="crop-landscape"><path d="M19,5H5C3.9,5,3,5.9,3,7v10c0,1.1,0.9,2,2,2h14c1.1,0,2-0.9,2-2V7C21,5.9,20.1,5,19,5z M19,17H5V7h14V17z"/></g> -<g id="crop-portrait"><path d="M17,3H7C5.9,3,5,3.9,5,5v14c0,1.1,0.9,2,2,2h10c1.1,0,2-0.9,2-2V5C19,3.9,18.1,3,17,3z M17,19H7V5h10V19z"/></g> -<g id="crop-square"><path d="M18,4H6C4.9,4,4,4.9,4,6v12c0,1.1,0.9,2,2,2h12c1.1,0,2-0.9,2-2V6C20,4.9,19.1,4,18,4z M18,18H6V6h12V18z"/></g> -<g id="flash-auto"><path d="M3,2v12h3v9l7-12H9l4-9H3z M19,2h-2l-3.2,9h1.9l0.7-2h3.2l0.7,2h1.9L19,2z M16.9,7.6L18,4l1.1,3.6H16.9z"/></g> -<g id="flash-off"><path d="M3.3,3L2,4.3l5,5V13h3v9l3.6-6.1l4.1,4.1l1.3-1.3L3.3,3z M17,10h-4l4-8H7v2.2l8.5,8.5L17,10z"/></g> -<g id="flash-on"><polygon points="7,2 7,13 10,13 10,22 17,10 13,10 17,2 "/></g> -<g id="image"><path d="M21,19V5c0-1.1-0.9-2-2-2H5C3.9,3,3,3.9,3,5v14c0,1.1,0.9,2,2,2h14C20.1,21,21,20.1,21,19z M8.5,13.5l2.5,3l3.5-4.5l4.5,6H5L8.5,13.5z"/></g> -<g id="landscape"><path d="M14,6l-3.8,5l2.9,3.8L11.5,16C9.8,13.8,7,10,7,10l-6,8h22L14,6z"/></g> -<g id="palette"><path d="M12,3c-5,0-9,4-9,9s4,9,9,9c0.8,0,1.5-0.7,1.5-1.5c0-0.4-0.1-0.7-0.4-1c-0.2-0.3-0.4-0.6-0.4-1c0-0.8,0.7-1.5,1.5-1.5H16c2.8,0,5-2.2,5-5C21,6.6,17,3,12,3z M6.5,12C5.7,12,5,11.3,5,10.5S5.7,9,6.5,9C7.3,9,8,9.7,8,10.5S7.3,12,6.5,12z M9.5,8C8.7,8,8,7.3,8,6.5S8.7,5,9.5,5C10.3,5,11,5.7,11,6.5S10.3,8,9.5,8z M14.5,8C13.7,8,13,7.3,13,6.5S13.7,5,14.5,5C15.3,5,16,5.7,16,6.5S15.3,8,14.5,8z M17.5,12c-0.8,0-1.5-0.7-1.5-1.5S16.7,9,17.5,9c0.8,0,1.5,0.7,1.5,1.5S18.3,12,17.5,12z"/></g> -<g id="panorama"><path d="M23,18V6c0-1.1-0.9-2-2-2H3C1.9,4,1,4.9,1,6v12c0,1.1,0.9,2,2,2h18C22.1,20,23,19.1,23,18z M8.5,12.5l2.5,3l3.5-4.5l4.5,6H5L8.5,12.5z"/></g> -<g id="photo"><path d="M21,19V5c0-1.1-0.9-2-2-2H5C3.9,3,3,3.9,3,5v14c0,1.1,0.9,2,2,2h14C20.1,21,21,20.1,21,19z M8.5,13.5l2.5,3l3.5-4.5l4.5,6H5L8.5,13.5z"/></g> -<g id="photo-album"><path d="M18,2h-6v7L9.5,7.5L7,9V2H6C4.9,2,4,2.9,4,4v16c0,1.1,0.9,2,2,2h12c1.1,0,2-0.9,2-2V4C20,2.9,19.1,2,18,2z M6,19l3-3.9l2.1,2.6l3-3.9L18,19H6z"/></g> -<g id="photo-library"><path d="M23,17V3c0-1.1-0.9-2-2-2H7C5.9,1,5,1.9,5,3v14c0,1.1,0.9,2,2,2h14C22.1,19,23,18.1,23,17z M10.5,11.5l2.5,3l3.5-4.5l4.5,6H7L10.5,11.5z M1,5v16c0,1.1,0.9,2,2,2h16v-2H3V5H1z"/></g> -<g id="portrait"><path d="M12,12.2c1.2,0,2.2-1,2.2-2.2c0-1.2-1-2.2-2.2-2.2c-1.2,0-2.2,1-2.2,2.2C9.8,11.2,10.8,12.2,12,12.2z M16.5,16.2c0-1.5-3-2.2-4.5-2.2s-4.5,0.8-4.5,2.2V17h9V16.2z M19,3H5C3.9,3,3,3.9,3,5v14c0,1.1,0.9,2,2,2h14c1.1,0,2-0.9,2-2V5C21,3.9,20.1,3,19,3z M19,19L5,19V5h14V19z"/></g> -<g id="slideshow"><path d="M10,8v8l5-4L10,8z M19,3H5C3.9,3,3,3.9,3,5v14c0,1.1,0.9,2,2,2h14c1.1,0,2-0.9,2-2V5C21,3.9,20.1,3,19,3z M19,19L5,19V5h14V19z"/></g> -<g id="switch-camera"><path d="M20,4h-3.2L15,2H9L7.2,4H4C2.9,4,2,4.9,2,6v12c0,1.1,0.9,2,2,2h16c1.1,0,2-0.9,2-2V6C22,4.9,21.1,4,20,4z M15,15.5V13H9v2.5L5.5,12L9,8.5V11h6V8.5l3.5,3.5L15,15.5z"/></g> -<g id="switch-video"><path d="M18,9.5V6c0-0.6-0.4-1-1-1H3C2.4,5,2,5.4,2,6v12c0,0.6,0.4,1,1,1h14c0.6,0,1-0.4,1-1v-3.5l4,4v-13L18,9.5z M13,15.5V13H7v2.5L3.5,12L7,8.5V11h6V8.5l3.5,3.5L13,15.5z"/></g> -<g id="tag-faces"><path d="M17,11c0.6,0,1-0.4,1-1c0-0.6-0.4-1-1-1c-0.6,0-1,0.4-1,1C16,10.6,16.4,11,17,11z M15,16c1.9,0,3.4-1.3,3.8-3h-7.6C11.6,14.7,13.1,16,15,16z M13,11c0.6,0,1-0.4,1-1c0-0.6-0.4-1-1-1c-0.6,0-1,0.4-1,1C12,10.6,12.4,11,13,11z M22,3L7.6,3C7,3,6.4,3.3,6,3.8L0,12l6,8.2C6.4,20.7,7,21,7.6,21H22c1.1,0,2-0.9,2-2V5C24,3.9,23.1,3,22,3z M4,13c-0.6,0-1-0.4-1-1c0-0.6,0.4-1,1-1s1,0.4,1,1C5,12.6,4.6,13,4,13z M15,18c-3.3,0-6-2.7-6-6c0-3.3,2.7-6,6-6c3.3,0,6,2.7,6,6C21,15.3,18.3,18,15,18z"/></g> -<g id="timelapse"><path d="M16.2,7.8C15.1,6.6,13.5,6,12,6v6l-4.2,4.2c2.3,2.3,6.1,2.3,8.5,0C18.6,13.9,18.6,10.1,16.2,7.8z M12,2C6.5,2,2,6.5,2,12c0,5.5,4.5,10,10,10c5.5,0,10-4.5,10-10C22,6.5,17.5,2,12,2z M12,20c-4.4,0-8-3.6-8-8c0-4.4,3.6-8,8-8c4.4,0,8,3.6,8,8C20,16.4,16.4,20,12,20z"/></g> -<g id="unknown-1"><path d="M19,3H5C3.9,3,3,3.9,3,5v14c0,1.1,0.9,2,2,2h14c1.1,0,2-0.9,2-2V5C21,3.9,20.1,3,19,3z M5.5,7.5h2v-2H9v2h2V9H9v2H7.5V9h-2V7.5z M19,19L5,19L19,5V19z M17,17v-1.5h-5V17H17z"/></g> -<g id="unknown-2"><path d="M12,16h5v-1.5h-5V16z M12,2C6.5,2,2,6.5,2,12s4.5,10,10,10c5.5,0,10-4.5,10-10C22,6.5,17.5,2,12,2z M6,8h2V6h1.5v2h2v1.5h-2v2H8v-2H6V8z M12,20c-2.2,0-4.2-0.9-5.7-2.3L17.7,6.3C19.1,7.8,20,9.8,20,12C20,16.4,16.4,20,12,20z"/></g> -<g id="unknown-3"><path d="M13,8h-2v3H8v2h3v3h2v-3h3v-2h-3V8z M12,2C6.5,2,2,6.5,2,12s4.5,10,10,10c5.5,0,10-4.5,10-10C22,6.5,17.5,2,12,2z M12,20c-4.4,0-8-3.6-8-8c0-4.4,3.6-8,8-8c4.4,0,8,3.6,8,8C20,16.4,16.4,20,12,20z"/></g> -<g id="unknown-4"><path d="M12,2C6.5,2,2,6.5,2,12s4.5,10,10,10c5.5,0,10-4.5,10-10C22,6.5,17.5,2,12,2z M12,20c-4.4,0-8-3.6-8-8c0-4.4,3.6-8,8-8c4.4,0,8,3.6,8,8C20,16.4,16.4,20,12,20z M8,13h8v-2H8V13z"/></g> -<g id="unknown-5"><path d="M12,10H4v2h8V10z M12,2L12,2l0,2c4.4,0,8,3.6,8,8c0,4.4-3.6,8-8,8c-2.2,0-4.2-0.9-5.7-2.3l-1.4,1.4C6.7,20.9,9.2,22,12,22c5.5,0,10-4.5,10-10C22,6.5,17.5,2,12,2z"/></g> -<g id="unknown-6"><path d="M16,10h-2v2h2V10z M16,14h-2v2h2V14z M8,10H6v2h2V10z M12,10h-2v2h2V10z M20,4H4C2.9,4,2,4.9,2,6v12c0,1.1,0.9,2,2,2h16c1.1,0,2-0.9,2-2V6C22,4.9,21.1,4,20,4z M20,18L4,18V6h16V18z"/></g> -<g id="unknown-7"><path d="M14,16h5v-5h3l-5.5-5.5L11,11h3V16z M11,20h11v-2H11V20z M5.5,7l-3.2,9h1.9l0.7-2h3.2l0.7,2h1.9L7.5,7H5.5z M5.4,12.6L6.5,9l1.1,3.6H5.4z"/></g> -<g id="wb-auto"><path d="M6.9,12.6h2.3L8,9L6.9,12.6z M22,7l-1.2,6.3L19.3,7h-1.6l-1.5,6.3L15,7h-0.8C12.8,5.2,10.5,4,8,4c-4.4,0-8,3.6-8,8s3.6,8,8,8c3.1,0,5.8-1.8,7.2-4.4l0.1,0.4H17l1.5-6.1L20,16h1.8l2-9H22z M10.3,16l-0.7-2H6.4l-0.7,2H3.8L7,7h2l3.2,9H10.3z"/></g> -<g id="wb-cloudy"><path d="M19.4,10c-0.7-3.4-3.7-6-7.4-6C9.1,4,6.6,5.6,5.4,8C2.3,8.4,0,10.9,0,14c0,3.3,2.7,6,6,6h13c2.8,0,5-2.2,5-5C24,12.4,21.9,10.2,19.4,10z"/></g> -<g id="wb-incandescent"><path d="M3.5,18.5L5,20l1.8-1.8l-1.4-1.4L3.5,18.5z M11,22.4c0.3,0,2,0,2,0v-2.9h-2V22.4z M4,10.5H1v2h3V10.5z M15,6.3V1.5H9v4.8c-1.8,1-3,3-3,5.2c0,3.3,2.7,6,6,6s6-2.7,6-6C18,9.3,16.8,7.3,15,6.3z M20,10.5v2h3v-2H20z M17.2,18.2L19,20l1.4-1.4l-1.8-1.8L17.2,18.2z"/></g> -<g id="wb-irradescent"><path d="M5,14.5h14v-6H5V14.5z M11,0.6v2.9h2V0.6H11z M19,3l-1.8,1.8l1.4,1.4l1.8-1.8L19,3z M13,22.4v-2.9h-2v2.9C11.3,22.5,13,22.4,13,22.4z M20.5,18.5l-1.8-1.8l-1.4,1.4L19,20L20.5,18.5z M3.5,4.5l1.8,1.8l1.4-1.4L5,3L3.5,4.5z M5,20l1.8-1.8l-1.4-1.4l-1.8,1.8L5,20z"/></g> -<g id="wb-sunny"><path d="M6.8,4.8L5,3L3.5,4.5l1.8,1.8L6.8,4.8z M4,10.5H1v2h3V10.5z M13,0.6h-2v2.9h2V0.6z M20.5,4.5L19,3l-1.8,1.8l1.4,1.4L20.5,4.5z M17.2,18.2L19,20l1.4-1.4l-1.8-1.8L17.2,18.2z M20,10.5v2h3v-2H20z M12,5.5c-3.3,0-6,2.7-6,6s2.7,6,6,6s6-2.7,6-6S15.3,5.5,12,5.5z M11,22.4c0.3,0,2,0,2,0v-2.9h-2V22.4z M3.5,18.5L5,20l1.8-1.8l-1.4-1.4L3.5,18.5z"/></g> -</defs></svg> -</core-iconset-svg> diff --git a/third_party/polymer/components/core-icons/index.html b/third_party/polymer/components/core-icons/index.html deleted file mode 100644 index 58856f3..0000000 --- a/third_party/polymer/components/core-icons/index.html +++ /dev/null @@ -1,22 +0,0 @@ -<!doctype html> -<!-- -Copyright (c) 2014 The Polymer Project Authors. All rights reserved. -This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE -The complete set of authors may be found at http://polymer.github.io/AUTHORS -The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS -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 ---> -<html> -<head> - - <script src="../platform/platform.js"></script> - <link rel="import" href="../core-component-page/core-component-page.html"> - -</head> -<body unresolved> - - <core-component-page></core-component-page> - -</body> -</html> diff --git a/third_party/polymer/components/core-icons/maps-icons.html b/third_party/polymer/components/core-icons/maps-icons.html deleted file mode 100644 index 5a5101d..0000000 --- a/third_party/polymer/components/core-icons/maps-icons.html +++ /dev/null @@ -1,69 +0,0 @@ -<!-- -Copyright (c) 2014 The Polymer Project Authors. All rights reserved. -This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt -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 ---> - -<link rel="import" href="../core-icon/core-icon.html"> -<link rel="import" href="../core-iconset-svg/core-iconset-svg.html"> -<core-iconset-svg id="maps" iconSize="24"> -<svg><defs> -<g id="beenhere"><path d="M19,1H5C3.9,1,3,1.9,3,3l0,12.9c0,0.7,0.3,1.3,0.9,1.7L12,23l8.1-5.4c0.5-0.4,0.9-1,0.9-1.7L21,3C21,1.9,20.1,1,19,1z M10,16l-5-5l1.4-1.4l3.6,3.6l7.6-7.6L19,7L10,16z"/></g> -<g id="directions"><path d="M21.7,11.3l-9-9l0,0c-0.4-0.4-1-0.4-1.4,0l-9,9c-0.4,0.4-0.4,1,0,1.4l9,9c0,0,0,0,0,0c0.4,0.4,1,0.4,1.4,0l9-9C22.1,12.3,22.1,11.7,21.7,11.3z M14,14.5V12h-4v3H8v-4c0-0.6,0.4-1,1-1h5V7.5l3.5,3.5L14,14.5z"/></g> -<g id="directions-bike"><path d="M16,4.8c1,0,1.8-0.8,1.8-1.8S17,1.2,16,1.2c-1,0-1.8,0.8-1.8,1.8S15,4.8,16,4.8z M19,12c-2.8,0-5,2.2-5,5c0,2.8,2.2,5,5,5c2.8,0,5-2.2,5-5C24,14.2,21.8,12,19,12z M19,20.5c-1.9,0-3.5-1.6-3.5-3.5s1.6-3.5,3.5-3.5c1.9,0,3.5,1.6,3.5,3.5S20.9,20.5,19,20.5z M14.8,10H19V8.2h-3.2l-1.9-3.3c-0.3-0.5-0.8-0.8-1.5-0.8c-0.5,0-0.9,0.2-1.2,0.5L7.5,8.3C7.2,8.6,7,9,7,9.5c0,0.6,0.3,1.2,0.8,1.5l3.4,2v5H13v-6.5l-2.2-1.7l2.3-2.3L14.8,10z M5,12c-2.8,0-5,2.2-5,5c0,2.8,2.2,5,5,5c2.8,0,5-2.2,5-5C10,14.2,7.8,12,5,12z M5,20.5c-1.9,0-3.5-1.6-3.5-3.5s1.6-3.5,3.5-3.5c1.9,0,3.5,1.6,3.5,3.5S6.9,20.5,5,20.5z"/></g> -<g id="directions-bus"><path d="M4,16c0,0.9,0.4,1.7,1,2.2V20c0,0.6,0.4,1,1,1h1c0.6,0,1-0.4,1-1v-1h8v1c0,0.6,0.4,1,1,1h1c0.6,0,1-0.4,1-1v-1.8c0.6-0.5,1-1.3,1-2.2V6c0-3.5-3.6-4-8-4C7.6,2,4,2.5,4,6V16z M7.5,17C6.7,17,6,16.3,6,15.5S6.7,14,7.5,14C8.3,14,9,14.7,9,15.5S8.3,17,7.5,17z M16.5,17c-0.8,0-1.5-0.7-1.5-1.5s0.7-1.5,1.5-1.5c0.8,0,1.5,0.7,1.5,1.5S17.3,17,16.5,17z M18,11H6V6h12V11z"/></g> -<g id="directions-car"><path d="M18.9,6c-0.2-0.6-0.8-1-1.4-1h-11C5.8,5,5.3,5.4,5.1,6L3,12v8c0,0.6,0.4,1,1,1h1c0.6,0,1-0.4,1-1v-1h12v1c0,0.6,0.4,1,1,1h1c0.6,0,1-0.4,1-1v-8L18.9,6z M6.5,16C5.7,16,5,15.3,5,14.5S5.7,13,6.5,13C7.3,13,8,13.7,8,14.5S7.3,16,6.5,16z M17.5,16c-0.8,0-1.5-0.7-1.5-1.5s0.7-1.5,1.5-1.5c0.8,0,1.5,0.7,1.5,1.5S18.3,16,17.5,16z M5,11l1.5-4.5h11L19,11H5z"/></g> -<g id="directions-ferry"><path d="M20,21c-1.4,0-2.8-0.5-4-1.3c-2.4,1.7-5.6,1.7-8,0C6.8,20.5,5.4,21,4,21H2v2h2c1.4,0,2.7-0.3,4-1c2.5,1.3,5.5,1.3,8,0c1.3,0.6,2.6,1,4,1h2v-2H20z M3.9,19L3.9,19C5.6,19,7,18.1,8,17c1,1.1,2.4,2,4,2c1.6,0,3-0.9,4-2c1,1.1,2.4,2,4,2h0.1l1.9-6.7c0.1-0.3,0.1-0.5-0.1-0.8c-0.1-0.2-0.3-0.4-0.6-0.5L20,10.6V6c0-1.1-0.9-2-2-2h-3V1H9v3H6C4.9,4,4,4.9,4,6v4.6L2.7,11c-0.3,0.1-0.5,0.3-0.6,0.5C2,11.8,2,12.1,2.1,12.3L3.9,19z M6,6h12v4l-6-2l-6,2V6z"/></g> -<g id="directions-subway"><path d="M12,2C7.6,2,4,2.5,4,6v9.5C4,17.4,5.6,19,7.5,19L6,20.5V21h12v-0.5L16.5,19c1.9,0,3.5-1.6,3.5-3.5V6C20,2.5,16.4,2,12,2z M7.5,17C6.7,17,6,16.3,6,15.5C6,14.7,6.7,14,7.5,14C8.3,14,9,14.7,9,15.5C9,16.3,8.3,17,7.5,17z M11,11H6V6h5V11z M16.5,17c-0.8,0-1.5-0.7-1.5-1.5c0-0.8,0.7-1.5,1.5-1.5c0.8,0,1.5,0.7,1.5,1.5C18,16.3,17.3,17,16.5,17z M18,11h-5V6h5V11z"/></g> -<g id="directions-train"><path d="M4,15.5C4,17.4,5.6,19,7.5,19L6,20.5V21h12v-0.5L16.5,19c1.9,0,3.5-1.6,3.5-3.5V5c0-3.5-3.6-4-8-4C7.6,1,4,1.5,4,5V15.5z M12,17c-1.1,0-2-0.9-2-2s0.9-2,2-2c1.1,0,2,0.9,2,2S13.1,17,12,17z M18,10H6V5h12V10z"/></g> -<g id="directions-transit"><path d="M12,2C7.6,2,4,2.5,4,6v9.5C4,17.4,5.6,19,7.5,19L6,20.5V21h12v-0.5L16.5,19c1.9,0,3.5-1.6,3.5-3.5V6C20,2.5,16.4,2,12,2z M7.5,17C6.7,17,6,16.3,6,15.5C6,14.7,6.7,14,7.5,14C8.3,14,9,14.7,9,15.5C9,16.3,8.3,17,7.5,17z M11,11H6V6h5V11z M16.5,17c-0.8,0-1.5-0.7-1.5-1.5c0-0.8,0.7-1.5,1.5-1.5c0.8,0,1.5,0.7,1.5,1.5C18,16.3,17.3,17,16.5,17z M18,11h-5V6h5V11z"/></g> -<g id="directions-walk"><path d="M14,3.8c1,0,1.8-0.8,1.8-1.8c0-1-0.8-1.8-1.8-1.8c-1,0-1.8,0.8-1.8,1.8C12.2,3,13,3.8,14,3.8z M14.1,10H19V8.2h-3.6l-2-3.3C13.1,4.4,12.5,4,11.9,4c-0.2,0-0.3,0-0.5,0.1L6,5.8V11h1.8V7.3l2.1-0.7L6,22h1.8l2.9-8.1L13,17v5h1.8v-6.4l-2.5-4.5L13,8.2L14.1,10z"/></g> -<g id="earth"><path d="M12,2C6.5,2,2,6.5,2,12s4.5,10,10,10c5.5,0,10-4.5,10-10S17.5,2,12,2z M12,20.2c-1.1,0-2.2-0.2-3.2-0.6c-0.6-1.5-0.6-2.6,1.1-2.1c0,0,3.9,1.5,8,0.1C16.5,19.2,14.4,20.2,12,20.2z M19.1,16.1c-0.9,0.4-2.1,1-4,1c-1.9,0-3.5-0.8-5.6-1.4c-1.9-0.6-2.6-1.5-3.8-1.5c-0.7,0-1,0.7-1.2,1.2c-0.5-1-0.8-2.2-0.8-3.4c0-0.8,0.1-1.6,0.3-2.3c1.3-1.6,3.2-2.6,6-0.4c0,0,6.2,4.7,9.8,5C19.7,14.9,19.4,15.5,19.1,16.1z M12.4,7.6C9.6,4.9,7.3,5.7,6.3,6.1c0.7-0.7,1.6-1.3,2.6-1.7c2.8-0.1,5.9,0.4,7.6,2.9c0,0,2.4,4.2,3.3,2.3c0.2,0.7,0.3,1.5,0.3,2.3c0,0.3,0,0.6,0,0.9C18.1,12.6,15.3,10.3,12.4,7.6z"/></g> -<g id="explore-nearby"><path d="M12,7.2c-2.1,0-3.8,1.7-3.8,3.8c0,3,3.8,6.5,3.8,6.5s3.8-3.5,3.8-6.5C15.8,8.9,14.1,7.2,12,7.2z M12,12.5c-0.8,0-1.5-0.7-1.5-1.5c0-0.8,0.7-1.5,1.5-1.5c0.8,0,1.5,0.7,1.5,1.5C13.5,11.8,12.8,12.5,12,12.5z M12,2C6.5,2,2,6.5,2,12s4.5,10,10,10c5.5,0,10-4.5,10-10S17.5,2,12,2z M12,20c-4.4,0-8-3.6-8-8s3.6-8,8-8c4.4,0,8,3.6,8,8S16.4,20,12,20z"/></g> -<g id="flight"><path d="M21,16v-2l-8-5V3.5C13,2.7,12.3,2,11.5,2S10,2.7,10,3.5V9l-8,5v2l8-2.5V19l-2,1.5V22l3.5-1l3.5,1v-1.5L13,19v-5.5L21,16z"/></g> -<g id="hotel"><path d="M7,13c1.7,0,3-1.3,3-3S8.7,7,7,7c-1.7,0-3,1.3-3,3S5.3,13,7,13z M19,7h-8v7H3V5H1v15h2v-3h18v3h2v-9C23,8.8,21.2,7,19,7z"/></g> -<g id="local-airport"><path d="M21,16v-2l-8-5V3.5C13,2.7,12.3,2,11.5,2C10.7,2,10,2.7,10,3.5V9l-8,5v2l8-2.5V19l-2,1.5V22l3.5-1l3.5,1v-1.5L13,19v-5.5L21,16z"/></g> -<g id="local-atm"><path d="M11,17h2v-1h1c0.6,0,1-0.4,1-1v-3c0-0.6-0.4-1-1-1h-3v-1h4V8h-2V7h-2v1h-1C9.4,8,9,8.4,9,9v3c0,0.6,0.4,1,1,1h3v1H9v2h2V17z M20,4H4C2.9,4,2,4.9,2,6l0,12c0,1.1,0.9,2,2,2h16c1.1,0,2-0.9,2-2V6C22,4.9,21.1,4,20,4z M20,18H4V6h16V18z"/></g> -<g id="local-attraction"><path d="M20,12c0-1.1,0.9-2,2-2V6c0-1.1-0.9-2-2-2H4C2.9,4,2,4.9,2,6l0,4c1.1,0,2,0.9,2,2c0,1.1-0.9,2-2,2l0,4c0,1.1,0.9,2,2,2h16c1.1,0,2-0.9,2-2v-4C20.9,14,20,13.1,20,12z M15.6,16.8L12,14.5l-3.6,2.3l1.1-4.1L6.2,10l4.2-0.2L12,5.8l1.5,3.9l4.2,0.2l-3.3,2.7L15.6,16.8z"/></g> -<g id="local-bar"><path d="M11,13v6H6v2h12v-2h-5v-6l8-8V3H3v2L11,13z M7.5,7l-2-2h13l-2,2H7.5z"/></g> -<g id="local-cafe"><path d="M20,3H4v10c0,2.2,1.8,4,4,4h6c2.2,0,4-1.8,4-4v-3h2c1.1,0,2-0.9,2-2V5C22,3.9,21.1,3,20,3z M20,8h-2V5h2V8z M2,21h18v-2H2V21z"/></g> -<g id="local-car-wash"><path d="M17,5c0.8,0,1.5-0.7,1.5-1.5c0-1-1.5-2.7-1.5-2.7s-1.5,1.7-1.5,2.7C15.5,4.3,16.2,5,17,5z M12,5c0.8,0,1.5-0.7,1.5-1.5c0-1-1.5-2.7-1.5-2.7s-1.5,1.7-1.5,2.7C10.5,4.3,11.2,5,12,5z M7,5c0.8,0,1.5-0.7,1.5-1.5c0-1-1.5-2.7-1.5-2.7S5.5,2.5,5.5,3.5C5.5,4.3,6.2,5,7,5z M18.9,8c-0.2-0.6-0.8-1-1.4-1h-11C5.8,7,5.3,7.4,5.1,8L3,14v8c0,0.6,0.4,1,1,1h1c0.6,0,1-0.4,1-1v-1h12v1c0,0.6,0.4,1,1,1h1c0.6,0,1-0.4,1-1v-8L18.9,8z M6.5,18C5.7,18,5,17.3,5,16.5C5,15.7,5.7,15,6.5,15C7.3,15,8,15.7,8,16.5C8,17.3,7.3,18,6.5,18z M17.5,18c-0.8,0-1.5-0.7-1.5-1.5c0-0.8,0.7-1.5,1.5-1.5c0.8,0,1.5,0.7,1.5,1.5C19,17.3,18.3,18,17.5,18z M5,13l1.5-4.5h11L19,13H5z"/></g> -<g id="local-convenience-store"><path d="M19,7V4H5v3H2v13h8v-4h4v4h8V7H19z M11,10H9v1h2v1H8V9h2V8H8V7h3V10z M16,12h-1v-2h-2V7h1v2h1V7h1V12z"/></g> -<g id="local-drink"><path d="M3,2l2,18.2c0.1,1,1,1.8,2,1.8h10c1,0,1.9-0.8,2-1.8L21,2H3z M12,19c-1.7,0-3-1.3-3-3c0-2,3-5.4,3-5.4s3,3.4,3,5.4C15,17.7,13.7,19,12,19z M18.3,8H5.7L5.2,4h13.5L18.3,8z"/></g> -<g id="local-florist"><path d="M12,22c5,0,9-4,9-9C16,13,12,17,12,22z M5.6,10.2c0,1.4,1.1,2.5,2.5,2.5c0.5,0,1-0.2,1.4-0.4c0,0.1,0,0.1,0,0.2c0,1.4,1.1,2.5,2.5,2.5s2.5-1.1,2.5-2.5c0-0.1,0-0.1,0-0.2c0.4,0.3,0.9,0.4,1.4,0.4c1.4,0,2.5-1.1,2.5-2.5c0-1-0.6-1.8-1.4-2.2c0.8-0.4,1.4-1.3,1.4-2.2c0-1.4-1.1-2.5-2.5-2.5c-0.5,0-1,0.2-1.4,0.4c0-0.1,0-0.1,0-0.2C14.5,2.1,13.4,1,12,1S9.5,2.1,9.5,3.5c0,0.1,0,0.1,0,0.2C9.1,3.4,8.6,3.2,8.1,3.2c-1.4,0-2.5,1.1-2.5,2.5c0,1,0.6,1.8,1.4,2.2C6.2,8.4,5.6,9.3,5.6,10.2z M12,5.5c1.4,0,2.5,1.1,2.5,2.5s-1.1,2.5-2.5,2.5S9.5,9.4,9.5,8S10.6,5.5,12,5.5z M3,13c0,5,4,9,9,9C12,17,8,13,3,13z"/></g> -<g id="local-gas-station"><path d="M19.8,7.2L19.8,7.2l-3.7-3.7L15,4.6l2.1,2.1C16.2,7,15.5,7.9,15.5,9c0,1.4,1.1,2.5,2.5,2.5c0.4,0,0.7-0.1,1-0.2v7.2c0,0.6-0.4,1-1,1s-1-0.4-1-1V14c0-1.1-0.9-2-2-2h-1V5c0-1.1-0.9-2-2-2H6C4.9,3,4,3.9,4,5v16h10v-7.5h1.5v5c0,1.4,1.1,2.5,2.5,2.5c1.4,0,2.5-1.1,2.5-2.5V9C20.5,8.3,20.2,7.7,19.8,7.2z M12,10H6V5h6V10z M18,10c-0.6,0-1-0.4-1-1c0-0.6,0.4-1,1-1s1,0.4,1,1C19,9.6,18.6,10,18,10z"/></g> -<g id="local-grocery-store"><path d="M7,18c-1.1,0-2,0.9-2,2s0.9,2,2,2s2-0.9,2-2S8.1,18,7,18z M1,2v2h2l3.6,7.6L5.2,14C5.1,14.3,5,14.7,5,15c0,1.1,0.9,2,2,2h12v-2H7.4c-0.1,0-0.2-0.1-0.2-0.2c0,0,0-0.1,0-0.1L8.1,13h7.4c0.8,0,1.4-0.4,1.7-1l3.6-6.5C21,5.3,21,5.2,21,5c0-0.6-0.4-1-1-1H5.2L4.3,2H1z M17,18c-1.1,0-2,0.9-2,2s0.9,2,2,2s2-0.9,2-2S18.1,18,17,18z"/></g> -<g id="local-hospital"><path d="M19,3H5C3.9,3,3,3.9,3,5l0,14c0,1.1,0.9,2,2,2h14c1.1,0,2-0.9,2-2V5C21,3.9,20.1,3,19,3z M18,14h-4v4h-4v-4H6v-4h4V6h4v4h4V14z"/></g> -<g id="local-hotel"><path d="M7,13c1.7,0,3-1.3,3-3S8.7,7,7,7s-3,1.3-3,3S5.3,13,7,13z M19,7h-8v7H3V5H1v15h2v-3h18v3h2v-9C23,8.8,21.2,7,19,7z"/></g> -<g id="local-laundry-service"><path d="M9.2,16.8c1.6,1.6,4.1,1.6,5.7,0c1.6-1.6,1.6-4.1,0-5.7L9.2,16.8z M18,2L6,2C4.9,2,4,2.9,4,4v16c0,1.1,0.9,2,2,2h12c1.1,0,2-0.9,2-2V4C20,2.9,19.1,2,18,2z M10,4c0.6,0,1,0.4,1,1s-0.4,1-1,1C9.4,6,9,5.6,9,5S9.4,4,10,4z M7,4c0.6,0,1,0.4,1,1S7.6,6,7,6S6,5.6,6,5S6.4,4,7,4z M12,20c-3.3,0-6-2.7-6-6s2.7-6,6-6s6,2.7,6,6S15.3,20,12,20z"/></g> -<g id="local-library"><path d="M12,11.5C9.6,9.4,6.5,8,3,8v11c3.5,0,6.6,1.4,9,3.5c2.4-2.2,5.5-3.5,9-3.5V8C17.5,8,14.4,9.4,12,11.5z M12,8c1.7,0,3-1.3,3-3s-1.3-3-3-3S9,3.3,9,5S10.3,8,12,8z"/></g> -<g id="local-mall"><path d="M19,6h-2c0-2.8-2.2-5-5-5S7,3.2,7,6H5C3.9,6,3,6.9,3,8l0,12c0,1.1,0.9,2,2,2h14c1.1,0,2-0.9,2-2V8C21,6.9,20.1,6,19,6z M12,3c1.7,0,3,1.3,3,3H9C9,4.3,10.3,3,12,3z M12,13c-2.8,0-5-2.2-5-5h2c0,1.7,1.3,3,3,3s3-1.3,3-3h2C17,10.8,14.8,13,12,13z"/></g> -<g id="local-movies"><path d="M18,3v2h-2V3H8v2H6V3H4v18h2v-2h2v2h8v-2h2v2h2V3H18z M8,17H6v-2h2V17z M8,13H6v-2h2V13z M8,9H6V7h2V9z M18,17h-2v-2h2V17z M18,13h-2v-2h2V13z M18,9h-2V7h2V9z"/></g> -<g id="local-offer"><path d="M21.4,11.6l-9-9C12.1,2.2,11.6,2,11,2H4C2.9,2,2,2.9,2,4v7c0,0.6,0.2,1.1,0.6,1.4l9,9c0.4,0.4,0.9,0.6,1.4,0.6c0.6,0,1.1-0.2,1.4-0.6l7-7c0.4-0.4,0.6-0.9,0.6-1.4C22,12.4,21.8,11.9,21.4,11.6z M5.5,7C4.7,7,4,6.3,4,5.5S4.7,4,5.5,4C6.3,4,7,4.7,7,5.5S6.3,7,5.5,7z"/></g> -<g id="local-parking"><path d="M13,3H6v18h4v-6h3c3.3,0,6-2.7,6-6S16.3,3,13,3z M13.2,11H10V7h3.2c1.1,0,2,0.9,2,2S14.3,11,13.2,11z"/></g> -<g id="local-pharmacy"><path d="M21,5h-2.6l1.1-3.1L17.2,1l-1.5,4H3v2l2,6l-2,6v2h18v-2l-2-6l2-6V5z M16,14h-3v3h-2v-3H8v-2h3V9h2v3h3V14z"/></g> -<g id="local-phone"><path d="M6.6,10.8c1.4,2.8,3.8,5.1,6.6,6.6l2.2-2.2c0.3-0.3,0.7-0.4,1-0.2c1.1,0.4,2.3,0.6,3.6,0.6c0.6,0,1,0.4,1,1V20c0,0.6-0.4,1-1,1C10.6,21,3,13.4,3,4c0-0.6,0.4-1,1-1h3.5c0.6,0,1,0.4,1,1c0,1.2,0.2,2.4,0.6,3.6c0.1,0.3,0,0.7-0.2,1L6.6,10.8z"/></g> -<g id="local-pizza"><path d="M12,2C8.4,2,5.2,3.5,3,6l9,16l9-16C18.8,3.5,15.6,2,12,2z M7,7c0-1.1,0.9-2,2-2c1.1,0,2,0.9,2,2s-0.9,2-2,2C7.9,9,7,8.1,7,7z M12,15c-1.1,0-2-0.9-2-2s0.9-2,2-2s2,0.9,2,2S13.1,15,12,15z"/></g> -<g id="local-play"><path d="M20,12c0-1.1,0.9-2,2-2V6c0-1.1-0.9-2-2-2H4C2.9,4,2,4.9,2,6l0,4c1.1,0,2,0.9,2,2c0,1.1-0.9,2-2,2l0,4c0,1.1,0.9,2,2,2h16c1.1,0,2-0.9,2-2v-4C20.9,14,20,13.1,20,12z M15.6,16.8L12,14.5l-3.6,2.3l1.1-4.1L6.2,10l4.2-0.2L12,5.8l1.5,3.9l4.2,0.2l-3.3,2.7L15.6,16.8z"/></g> -<g id="local-post-office"><path d="M20,4H4C2.9,4,2,4.9,2,6l0,12c0,1.1,0.9,2,2,2h16c1.1,0,2-0.9,2-2V6C22,4.9,21.1,4,20,4z M20,8l-8,5L4,8V6l8,5l8-5V8z"/></g> -<g id="local-print-shop"><path d="M19,8H5c-1.7,0-3,1.3-3,3v6h4v4h12v-4h4v-6C22,9.3,20.7,8,19,8z M16,19H8v-5h8V19z M19,12c-0.6,0-1-0.4-1-1s0.4-1,1-1s1,0.4,1,1S19.6,12,19,12z M18,3H6v4h12V3z"/></g> -<g id="local-restaurant"><path d="M8.1,13.3l2.8-2.8l-7-7c-1.6,1.6-1.6,4.1,0,5.7L8.1,13.3z"/><path d="M14.9,11.5c1.5,0.7,3.7,0.2,5.3-1.4C22.1,8.2,22.4,5.5,21,4c-1.5-1.5-4.2-1.1-6.1,0.8c-1.6,1.6-2.1,3.7-1.4,5.3c-2.2,2.2-9.8,9.8-9.8,9.8l1.4,1.4l6.9-6.9l6.9,6.9l1.4-1.4L13.4,13L14.9,11.5z"/></g> -<g id="local-see"><circle cx="12" cy="12" r="3.2"/><path d="M9,2L7.2,4H4C2.9,4,2,4.9,2,6v12c0,1.1,0.9,2,2,2h16c1.1,0,2-0.9,2-2V6c0-1.1-0.9-2-2-2h-3.2L15,2H9z M12,17c-2.8,0-5-2.2-5-5s2.2-5,5-5s5,2.2,5,5S14.8,17,12,17z"/></g> -<g id="local-shipping"><path d="M20,8h-3V4H3C1.9,4,1,4.9,1,6v11h2c0,1.7,1.3,3,3,3s3-1.3,3-3h6c0,1.7,1.3,3,3,3s3-1.3,3-3h2v-5L20,8z M6,18.5c-0.8,0-1.5-0.7-1.5-1.5s0.7-1.5,1.5-1.5s1.5,0.7,1.5,1.5S6.8,18.5,6,18.5z M19.5,9.5l2,2.5H17V9.5H19.5z M18,18.5c-0.8,0-1.5-0.7-1.5-1.5s0.7-1.5,1.5-1.5s1.5,0.7,1.5,1.5S18.8,18.5,18,18.5z"/></g> -<g id="local-taxi"><path d="M18.9,6c-0.2-0.6-0.8-1-1.4-1H15V3H9v2H6.5C5.8,5,5.3,5.4,5.1,6L3,12v8c0,0.6,0.4,1,1,1h1c0.6,0,1-0.4,1-1v-1h12v1c0,0.6,0.4,1,1,1h1c0.6,0,1-0.4,1-1v-8L18.9,6z M6.5,16C5.7,16,5,15.3,5,14.5S5.7,13,6.5,13C7.3,13,8,13.7,8,14.5S7.3,16,6.5,16z M17.5,16c-0.8,0-1.5-0.7-1.5-1.5s0.7-1.5,1.5-1.5c0.8,0,1.5,0.7,1.5,1.5S18.3,16,17.5,16z M5,11l1.5-4.5h11L19,11H5z"/></g> -<g id="location-history"><path d="M19,2H5C3.9,2,3,2.9,3,4v14c0,1.1,0.9,2,2,2h4l3,3l3-3h4c1.1,0,2-0.9,2-2V4C21,2.9,20.1,2,19,2z M12,5.3c1.5,0,2.7,1.2,2.7,2.7c0,1.5-1.2,2.7-2.7,2.7c-1.5,0-2.7-1.2-2.7-2.7C9.3,6.5,10.5,5.3,12,5.3z M18,16H6v-0.9c0-2,4-3.1,6-3.1c2,0,6,1.1,6,3.1V16z"/></g> -<g id="map"><path d="M20.5,3c-0.1,0-0.1,0-0.2,0L15,5.1L9,3L3.4,4.9C3.2,5,3,5.1,3,5.4v15.1C3,20.8,3.2,21,3.5,21c0.1,0,0.1,0,0.2,0L9,18.9l6,2.1l5.6-1.9c0.2-0.1,0.4-0.3,0.4-0.5V3.5C21,3.2,20.8,3,20.5,3z M15,19l-6-2.1V5l6,2.1V19z"/></g> -<g id="menu"><path d="M8.1,13.3l2.8-2.8l-7-7c-1.6,1.6-1.6,4.1,0,5.7L8.1,13.3z"/><path d="M14.9,11.5c1.5,0.7,3.7,0.2,5.3-1.4C22.1,8.2,22.4,5.5,21,4c-1.5-1.5-4.2-1.1-6.1,0.8c-1.6,1.6-2.1,3.7-1.4,5.3c-2.2,2.2-9.8,9.8-9.8,9.8l1.4,1.4l6.9-6.9l6.9,6.9l1.4-1.4L13.4,13L14.9,11.5z"/></g> -<g id="my-location"><path d="M12,8c-2.2,0-4,1.8-4,4c0,2.2,1.8,4,4,4s4-1.8,4-4C16,9.8,14.2,8,12,8z M20.9,11c-0.5-4.2-3.8-7.5-7.9-7.9V1h-2v2.1C6.8,3.5,3.5,6.8,3.1,11H1v2h2.1c0.5,4.2,3.8,7.5,7.9,7.9V23h2v-2.1c4.2-0.5,7.5-3.8,7.9-7.9H23v-2H20.9z M12,19c-3.9,0-7-3.1-7-7c0-3.9,3.1-7,7-7s7,3.1,7,7C19,15.9,15.9,19,12,19z"/></g> -<g id="navigation"><polygon points="12,2 4.5,20.3 5.2,21 12,18 18.8,21 19.5,20.3 "/></g> -<g id="place"><path d="M12,2C8.1,2,5,5.1,5,9c0,5.2,7,13,7,13s7-7.8,7-13C19,5.1,15.9,2,12,2z M12,11.5c-1.4,0-2.5-1.1-2.5-2.5s1.1-2.5,2.5-2.5c1.4,0,2.5,1.1,2.5,2.5S13.4,11.5,12,11.5z"/></g> -<g id="rate-review"><path d="M15.4,6.4l-1.8-1.8c-0.2-0.2-0.5-0.2-0.7,0L6,11.5V14h2.5l6.9-6.9C15.5,6.9,15.5,6.6,15.4,6.4z"/><path d="M20,2H4C2.9,2,2,2.9,2,4l0,18l4-4h14c1.1,0,2-0.9,2-2V4C22,2.9,21.1,2,20,2z M6,14v-2.5l6.9-6.9c0.2-0.2,0.5-0.2,0.7,0l1.8,1.8c0.2,0.2,0.2,0.5,0,0.7L8.5,14H6z M18,14h-7.5l2-2H18V14z"/></g> -<g id="satellite"><path d="M19,3H5C3.9,3,3,3.9,3,5v14c0,1.1,0.9,2,2,2h14c1.1,0,2-0.9,2-2V5C21,3.9,20.1,3,19,3z M5,5h3c0,1.7-1.3,3-3,3V5z M5,12v-2c2.8,0,5-2.2,5-5h2C12,8.9,8.9,12,5,12z M5,18l3.5-4.5l2.5,3l3.5-4.5l4.5,6H5z"/></g> -<g id="store-mall-directory"><path d="M20,4H4v2h16V4z M21,14v-2l-1-5H4l-1,5v2h1v6h10v-6h4v6h2v-6H21z M12,18H6v-4h6V18z"/></g> -<g id="terrain"><path d="M14,6l-3.8,5l2.9,3.8L11.5,16C9.8,13.8,7,10,7,10l-6,8h22L14,6z"/></g> -<g id="traffic"><path d="M20,10h-3V8.9c1.7-0.4,3-2,3-3.9h-3V4c0-0.6-0.4-1-1-1H8C7.4,3,7,3.4,7,4v1H4c0,1.9,1.3,3.4,3,3.9V10H4c0,1.9,1.3,3.4,3,3.9V15H4c0,1.9,1.3,3.4,3,3.9V20c0,0.6,0.4,1,1,1h8c0.6,0,1-0.4,1-1v-1.1c1.7-0.4,3-2,3-3.9h-3v-1.1C18.7,13.4,20,11.9,20,10z M12,19c-1.1,0-2-0.9-2-2s0.9-2,2-2c1.1,0,2,0.9,2,2S13.1,19,12,19z M12,14c-1.1,0-2-0.9-2-2s0.9-2,2-2c1.1,0,2,0.9,2,2S13.1,14,12,14z M12,9c-1.1,0-2-0.9-2-2c0-1.1,0.9-2,2-2c1.1,0,2,0.9,2,2C14,8.1,13.1,9,12,9z"/></g> -</defs></svg> -</core-iconset-svg> diff --git a/third_party/polymer/components/core-icons/notification-icons.html b/third_party/polymer/components/core-icons/notification-icons.html deleted file mode 100644 index d2646f8..0000000 --- a/third_party/polymer/components/core-icons/notification-icons.html +++ /dev/null @@ -1,45 +0,0 @@ -<!-- -Copyright (c) 2014 The Polymer Project Authors. All rights reserved. -This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt -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 ---> - -<link rel="import" href="../core-icon/core-icon.html"> -<link rel="import" href="../core-iconset-svg/core-iconset-svg.html"> -<core-iconset-svg id="notification" iconSize="24"> -<svg><defs> -<g id="adb"><path d="M5,16c0,3.9,3.1,7,7,7c3.9,0,7-3.1,7-7v-4H5V16z M16.1,4.4l2.1-2.1l-0.8-0.8l-2.3,2.3C14.2,3.3,13.1,3,12,3c-1.1,0-2.2,0.3-3.1,0.7L6.6,1.4L5.8,2.3l2.1,2.1C6.1,5.6,5,7.7,5,10v1h14v-1C19,7.7,17.9,5.6,16.1,4.4z M9,9C8.4,9,8,8.6,8,8s0.4-1,1-1c0.6,0,1,0.4,1,1S9.6,9,9,9z M15,9c-0.6,0-1-0.4-1-1s0.4-1,1-1c0.6,0,1,0.4,1,1S15.6,9,15,9z"/></g> -<g id="bluetooth-audio"><path d="M14.2,12l2.3,2.3c0.3-0.7,0.4-1.5,0.4-2.3c0-0.8-0.2-1.6-0.4-2.3L14.2,12z M19.5,6.7L18.3,8c0.6,1.2,1,2.6,1,4s-0.4,2.8-1,4l1.2,1.2c1-1.5,1.5-3.4,1.5-5.3C21,10,20.5,8.2,19.5,6.7z M15.7,7.7L10,2H9v7.6L4.4,5L3,6.4L8.6,12L3,17.6L4.4,19L9,14.4V22h1l5.7-5.7L11.4,12L15.7,7.7z M11,5.8l1.9,1.9L11,9.6V5.8z M12.9,16.3L11,18.2v-3.8L12.9,16.3z"/></g> -<g id="disc-full"><path d="M20,16h2v-2h-2V16z M20,7v5h2V7H20z M10,4c-4.4,0-8,3.6-8,8c0,4.4,3.6,8,8,8s8-3.6,8-8C18,7.6,14.4,4,10,4z M10,14c-1.1,0-2-0.9-2-2s0.9-2,2-2c1.1,0,2,0.9,2,2S11.1,14,10,14z"/></g> -<g id="dnd-on"><path d="M12,2C6.5,2,2,6.5,2,12s4.5,10,10,10c5.5,0,10-4.5,10-10S17.5,2,12,2z M4,12c0-4.4,3.6-8,8-8c1.8,0,3.5,0.6,4.9,1.7L5.7,16.9C4.6,15.5,4,13.8,4,12z M12,20c-1.8,0-3.5-0.6-4.9-1.7L18.3,7.1C19.4,8.5,20,10.2,20,12C20,16.4,16.4,20,12,20z"/></g> -<g id="drive-eta"><path d="M18.9,5c-0.2-0.6-0.8-1-1.4-1h-11C5.8,4,5.3,4.4,5.1,5L3,11v8c0,0.6,0.4,1,1,1h1c0.6,0,1-0.4,1-1v-1h12v1c0,0.6,0.4,1,1,1h1c0.6,0,1-0.4,1-1v-8L18.9,5z M6.5,15C5.7,15,5,14.3,5,13.5S5.7,12,6.5,12C7.3,12,8,12.7,8,13.5S7.3,15,6.5,15z M17.5,15c-0.8,0-1.5-0.7-1.5-1.5s0.7-1.5,1.5-1.5c0.8,0,1.5,0.7,1.5,1.5S18.3,15,17.5,15z M5,10l1.5-4.5h11L19,10H5z"/></g> -<g id="mms"><path d="M20,2H4C2.9,2,2,2.9,2,4l0,18l4-4h14c1.1,0,2-0.9,2-2V4C22,2.9,21.1,2,20,2z M5,14l3.5-4.5l2.5,3L14.5,8l4.5,6H5z"/></g> -<g id="more"><path d="M22,3H7C6.3,3,5.8,3.4,5.4,3.9L0,12l5.4,8.1c0.4,0.5,1,0.9,1.7,0.9H22c1.1,0,2-0.9,2-2V5C24,3.9,23.1,3,22,3z M9,13.5c-0.8,0-1.5-0.7-1.5-1.5s0.7-1.5,1.5-1.5c0.8,0,1.5,0.7,1.5,1.5S9.8,13.5,9,13.5z M14,13.5c-0.8,0-1.5-0.7-1.5-1.5s0.7-1.5,1.5-1.5c0.8,0,1.5,0.7,1.5,1.5S14.8,13.5,14,13.5z M19,13.5c-0.8,0-1.5-0.7-1.5-1.5s0.7-1.5,1.5-1.5c0.8,0,1.5,0.7,1.5,1.5S19.8,13.5,19,13.5z"/></g> -<g id="phone-bluetooth-speaker"><path d="M14.7,9.5L17,7.2V11h0.5l2.9-2.9L18.2,6l2.1-2.1L17.5,1H17v3.8l-2.3-2.3L14,3.2L16.8,6L14,8.8L14.7,9.5z M18,2.9l0.9,0.9L18,4.8V2.9z M18,7.2l0.9,0.9L18,9.1V7.2z M20,15.5c-1.2,0-2.4-0.2-3.6-0.6c-0.3-0.1-0.7,0-1,0.2l-2.2,2.2c-2.8-1.4-5.1-3.8-6.6-6.6l2.2-2.2c0.3-0.3,0.4-0.7,0.2-1C8.7,6.4,8.5,5.2,8.5,4c0-0.6-0.4-1-1-1H4C3.4,3,3,3.4,3,4c0,9.4,7.6,17,17,17c0.6,0,1-0.4,1-1v-3.5C21,15.9,20.6,15.5,20,15.5z"/></g> -<g id="phone-forwarded"><path d="M18,11l5-5l-5-5v3h-4v4h4V11z M20,15.5c-1.2,0-2.4-0.2-3.6-0.6c-0.3-0.1-0.7,0-1,0.2l-2.2,2.2c-2.8-1.4-5.1-3.8-6.6-6.6l2.2-2.2c0.3-0.3,0.4-0.7,0.2-1C8.7,6.4,8.5,5.2,8.5,4c0-0.6-0.4-1-1-1H4C3.4,3,3,3.4,3,4c0,9.4,7.6,17,17,17c0.6,0,1-0.4,1-1v-3.5C21,15.9,20.6,15.5,20,15.5z"/></g> -<g id="phone-in-talk"><path d="M20,15.5c-1.2,0-2.4-0.2-3.6-0.6c-0.3-0.1-0.7,0-1,0.2l-2.2,2.2c-2.8-1.4-5.1-3.8-6.6-6.6l2.2-2.2c0.3-0.3,0.4-0.7,0.2-1C8.7,6.4,8.5,5.2,8.5,4c0-0.6-0.4-1-1-1H4C3.4,3,3,3.4,3,4c0,9.4,7.6,17,17,17c0.6,0,1-0.4,1-1v-3.5C21,15.9,20.6,15.5,20,15.5z M19,12h2c0-5-4-9-9-9v2C15.9,5,19,8.1,19,12z M15,12h2c0-2.8-2.2-5-5-5v2C13.7,9,15,10.3,15,12z"/></g> -<g id="phone-locked"><path d="M20,15.5c-1.2,0-2.4-0.2-3.6-0.6c-0.3-0.1-0.7,0-1,0.2l-2.2,2.2c-2.8-1.4-5.1-3.8-6.6-6.6l2.2-2.2c0.3-0.3,0.4-0.7,0.2-1C8.7,6.4,8.5,5.2,8.5,4c0-0.6-0.4-1-1-1H4C3.4,3,3,3.4,3,4c0,9.4,7.6,17,17,17c0.6,0,1-0.4,1-1v-3.5C21,15.9,20.6,15.5,20,15.5z M20,4V3.5C20,2.1,18.9,1,17.5,1C16.1,1,15,2.1,15,3.5V4c-0.6,0-1,0.4-1,1v4c0,0.6,0.4,1,1,1h5c0.6,0,1-0.4,1-1V5C21,4.4,20.6,4,20,4z M19.2,4h-3.4V3.5c0-0.9,0.8-1.7,1.7-1.7c0.9,0,1.7,0.8,1.7,1.7V4z"/></g> -<g id="phone-missed"><path d="M6.5,5.5L12,11l7-7l-1-1l-6,6L7.5,4.5H11V3H5v6h1.5V5.5z M23.7,16.7c-3-2.9-7.2-4.7-11.7-4.7c-4.5,0-8.7,1.8-11.7,4.7C0.1,16.9,0,17.1,0,17.4s0.1,0.5,0.3,0.7l2.5,2.5c0.2,0.2,0.4,0.3,0.7,0.3c0.3,0,0.5-0.1,0.7-0.3c0.8-0.7,1.7-1.4,2.7-1.9c0.3-0.2,0.6-0.5,0.6-0.9v-3.1c1.4-0.5,3-0.7,4.6-0.7c1.6,0,3.2,0.3,4.6,0.7v3.1c0,0.4,0.2,0.7,0.6,0.9c1,0.5,1.9,1.1,2.7,1.9c0.2,0.2,0.4,0.3,0.7,0.3c0.3,0,0.5-0.1,0.7-0.3l2.5-2.5c0.2-0.2,0.3-0.4,0.3-0.7S23.9,16.9,23.7,16.7z"/></g> -<g id="phone-paused"><path d="M17,3h-2v7h2V3z M20,15.5c-1.2,0-2.4-0.2-3.6-0.6c-0.3-0.1-0.7,0-1,0.2l-2.2,2.2c-2.8-1.4-5.1-3.8-6.6-6.6l2.2-2.2c0.3-0.3,0.4-0.7,0.2-1C8.7,6.4,8.5,5.2,8.5,4c0-0.6-0.4-1-1-1H4C3.4,3,3,3.4,3,4c0,9.4,7.6,17,17,17c0.6,0,1-0.4,1-1v-3.5C21,15.9,20.6,15.5,20,15.5z M19,3v7h2V3H19z"/></g> -<g id="play-download"><path d="M20,6h-4V4l-2-2h-4L8,4v2H4C2.9,6,2,6.9,2,8l0,11c0,1.1,0.9,2,2,2h16c1.1,0,2-0.9,2-2V8C22,6.9,21.1,6,20,6z M10,4h4v2h-4V4z M12,19l-5-5h3v-4h4v4h3L12,19z"/></g> -<g id="play-install"><path d="M20,6h-4V4l-2-2h-4L8,4v2H4C2.9,6,2,6.9,2,8l0,11c0,1.1,0.9,2,2,2h16c1.1,0,2-0.9,2-2V8C22,6.9,21.1,6,20,6z M10,4h4v2h-4V4z M10.5,17.5L7,14l1.4-1.4l2.1,2.1l5.2-5.2l1.4,1.4L10.5,17.5z"/></g> -<g id="sd-card"><path d="M18,2h-8L4,8l0,12c0,1.1,0.9,2,2,2h12c1.1,0,2-0.9,2-2V4C20,2.9,19.1,2,18,2z M12,8h-2V4h2V8z M15,8h-2V4h2V8z M18,8h-2V4h2V8z"/></g> -<g id="sim-card-alert"><path d="M18,2h-8L4,8l0,12c0,1.1,0.9,2,2,2h12c1.1,0,2-0.9,2-2V4C20,2.9,19.1,2,18,2z M13,17h-2v-2h2V17z M13,13h-2V8h2V13z"/></g> -<g id="sms"><path d="M20,2H4C2.9,2,2,2.9,2,4l0,18l4-4h14c1.1,0,2-0.9,2-2V4C22,2.9,21.1,2,20,2z M9,11H7V9h2V11z M13,11h-2V9h2V11z M17,11h-2V9h2V11z"/></g> -<g id="sms-failed"><path d="M20,2H4C2.9,2,2,2.9,2,4l0,18l4-4h14c1.1,0,2-0.9,2-2V4C22,2.9,21.1,2,20,2z M13,14h-2v-2h2V14z M13,10h-2V6h2V10z"/></g> -<g id="sync"><path d="M12,4V1L8,5l4,4V6c3.3,0,6,2.7,6,6c0,1-0.3,2-0.7,2.8l1.5,1.5C19.5,15,20,13.6,20,12C20,7.6,16.4,4,12,4z M12,18c-3.3,0-6-2.7-6-6c0-1,0.3-2,0.7-2.8L5.2,7.7C4.5,9,4,10.4,4,12c0,4.4,3.6,8,8,8v3l4-4l-4-4V18z"/></g> -<g id="sync-disabled"><path d="M10,6.3V4.3c-0.8,0.2-1.5,0.5-2.2,1l1.5,1.5C9.5,6.6,9.7,6.4,10,6.3z M2.9,5.4l2.4,2.4C4.5,9,4,10.4,4,12c0,2.2,0.9,4.2,2.4,5.6L4,20h6v-6l-2.2,2.2C6.7,15.2,6,13.7,6,12c0-1,0.2-1.9,0.7-2.8l8.1,8.1c-0.2,0.1-0.5,0.2-0.8,0.3v2.1c0.8-0.2,1.5-0.5,2.2-1l2.4,2.4l1.3-1.3L4.1,4.1L2.9,5.4z M20,4h-6v6l2.2-2.2C17.3,8.8,18,10.3,18,12c0,1-0.2,1.9-0.7,2.8l1.5,1.5C19.5,15,20,13.6,20,12c0-2.2-0.9-4.2-2.4-5.6L20,4z"/></g> -<g id="sync-green"><path d="M4,12c0,2.2,0.9,4.2,2.4,5.6L4,20h6v-6l-2.2,2.2C6.7,15.2,6,13.7,6,12c0-2.6,1.7-4.8,4-5.7V4.3C6.6,5.2,4,8.3,4,12z M20,4h-6v6l2.2-2.2C17.3,8.8,18,10.3,18,12c0,2.6-1.7,4.8-4,5.7v2.1c3.4-0.9,6-4,6-7.7c0-2.2-0.9-4.2-2.4-5.6L20,4z"/></g> -<g id="sync-problem"><path d="M3,12c0,2.2,0.9,4.2,2.4,5.6L3,20h6v-6l-2.2,2.2C5.7,15.2,5,13.7,5,12c0-2.6,1.7-4.8,4-5.7V4.3C5.6,5.2,3,8.3,3,12z M11,17h2v-2h-2V17z M21,4h-6v6l2.2-2.2C18.3,8.8,19,10.3,19,12c0,2.6-1.7,4.8-4,5.7v2.1c3.4-0.9,6-4,6-7.7c0-2.2-0.9-4.2-2.4-5.6L21,4z M11,13h2V7h-2V13z"/></g> -<g id="sync-problem-red"><path d="M3,12c0,2.2,0.9,4.2,2.4,5.6L3,20h6v-6l-2.2,2.2C5.7,15.2,5,13.7,5,12c0-2.6,1.7-4.8,4-5.7V4.3C5.6,5.2,3,8.3,3,12z M11,17h2v-2h-2V17z M21,4h-6v6l2.2-2.2C18.3,8.8,19,10.3,19,12c0,2.6-1.7,4.8-4,5.7v2.1c3.4-0.9,6-4,6-7.7c0-2.2-0.9-4.2-2.4-5.6L21,4z M11,13h2V7h-2V13z"/></g> -<g id="system-update"><path d="M17,1L7,1C5.9,1,5,1.9,5,3v18c0,1.1,0.9,2,2,2h10c1.1,0,2-0.9,2-2V3C19,1.9,18.1,1,17,1z M17,19H7V5h10V19z M16,13h-3V8h-2v5H8l4,4L16,13z"/></g> -<g id="tap-and-play"><path d="M2,16v2c2.8,0,5,2.2,5,5h2C9,19.1,5.9,16,2,16z M2,20v3h3C5,21.3,3.7,20,2,20z M2,12v2c5,0,9,4,9,9h2C13,16.9,8.1,12,2,12z M17,1L7,1C5.9,1,5,1.9,5,3v7.4c0.7,0.2,1.4,0.4,2,0.6V5h10v13h-3c0.5,1.2,0.8,2.6,0.9,4H17c1.1,0,2-0.9,2-2V3C19,1.9,18.1,1,17,1z"/></g> -<g id="time-to-leave"><path d="M18.9,5c-0.2-0.6-0.8-1-1.4-1h-11C5.8,4,5.3,4.4,5.1,5L3,11v8c0,0.6,0.4,1,1,1h1c0.6,0,1-0.4,1-1v-1h12v1c0,0.6,0.4,1,1,1h1c0.6,0,1-0.4,1-1v-8L18.9,5z M6.5,15C5.7,15,5,14.3,5,13.5S5.7,12,6.5,12C7.3,12,8,12.7,8,13.5S7.3,15,6.5,15z M17.5,15c-0.8,0-1.5-0.7-1.5-1.5s0.7-1.5,1.5-1.5c0.8,0,1.5,0.7,1.5,1.5S18.3,15,17.5,15z M5,10l1.5-4.5h11L19,10H5z"/></g> -<g id="vibration"><path d="M0,15h2V9H0V15z M3,17h2V7H3V17z M22,9v6h2V9H22z M19,17h2V7h-2V17z M16.5,3h-9C6.7,3,6,3.7,6,4.5v15C6,20.3,6.7,21,7.5,21h9c0.8,0,1.5-0.7,1.5-1.5v-15C18,3.7,17.3,3,16.5,3z M16,19H8V5h8V19z"/></g> -<g id="voice-chat"><path d="M20,2H4C2.9,2,2,2.9,2,4l0,18l4-4h14c1.1,0,2-0.9,2-2V4C22,2.9,21.1,2,20,2z M18,14l-4-3.2V14H6V6h8v3.2L18,6V14z"/></g> -<g id="vpn"><path d="M22,4V3.5C22,2.1,20.9,1,19.5,1C18.1,1,17,2.1,17,3.5V4c-0.6,0-1,0.4-1,1v4c0,0.6,0.4,1,1,1h5c0.6,0,1-0.4,1-1V5C23,4.4,22.6,4,22,4z M21.2,4h-3.4V3.5c0-0.9,0.8-1.7,1.7-1.7c0.9,0,1.7,0.8,1.7,1.7V4z M18.9,12c0,0.3,0.1,0.7,0.1,1c0,2.1-0.8,4-2.1,5.4c-0.3-0.8-1-1.4-1.9-1.4h-1v-3c0-0.6-0.4-1-1-1H7v-2h2c0.6,0,1-0.4,1-1V8h2c1.1,0,2-0.9,2-2V3.5C13.1,3.2,12,3,11,3C5.5,3,1,7.5,1,13c0,5.5,4.5,10,10,10c5.5,0,10-4.5,10-10c0-0.3,0-0.7-0.1-1H18.9z M10,20.9c-3.9-0.5-7-3.9-7-7.9c0-0.6,0.1-1.2,0.2-1.8L8,16v1c0,1.1,0.9,2,2,2V20.9z"/></g> -</defs></svg> -</core-iconset-svg> diff --git a/third_party/polymer/components/core-icons/png-icons.html b/third_party/polymer/components/core-icons/png-icons.html deleted file mode 100644 index 5347c6b..0000000 --- a/third_party/polymer/components/core-icons/png-icons.html +++ /dev/null @@ -1,19 +0,0 @@ -<!-- -Copyright (c) 2014 The Polymer Project Authors. All rights reserved. -This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt -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 ---> - -<link rel="import" href="../core-icon/core-icon.html"> -<core-iconset id="core-icons" src="../core-action-icons/action-icons.png" width="24" iconSize="24" - icons="drawer menu search dropdown close add trash refresh settings dialoga - left right down up grid contact account plus time marker - briefcase array columns list modules quilt stream maximize shrink sort - shortcut dialog twitter facebook favorite gplus filter tag plusone dots"> - - <property theme="core-light-theme" offsetX="24"></property> - <property theme="core-dark-theme" offsetX="72"></property> -</core-iconset> diff --git a/third_party/polymer/components/core-icons/social-icons.html b/third_party/polymer/components/core-icons/social-icons.html deleted file mode 100644 index 102c544..0000000 --- a/third_party/polymer/components/core-icons/social-icons.html +++ /dev/null @@ -1,52 +0,0 @@ -<!-- -Copyright (c) 2014 The Polymer Project Authors. All rights reserved. -This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt -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 ---> - -<link rel="import" href="../core-icon/core-icon.html"> -<link rel="import" href="../core-iconset-svg/core-iconset-svg.html"> -<core-iconset-svg id="social" iconSize="24"> -<svg><defs> -<g id="cake"><path d="M12,7c1.1,0,2-0.9,2-2c0-0.4-0.1-0.7-0.3-1L12,1l-1.7,3C10.1,4.3,10,4.6,10,5C10,6.1,10.9,7,12,7z M21,21v-4c0-1.1-0.9-2-2-2h-1v-3c0-1.1-0.9-2-2-2h-3V8h-2v2H8c-1.1,0-2,0.9-2,2v3H5c-1.1,0-2,0.9-2,2v4H1v2h22v-2H21z"/></g> -<g id="circles"><path d="M16.7,15c-0.8,2.3-3,4-5.7,4c-3.3,0-6-2.7-6-6c0-2.6,1.7-4.8,4-5.7C9,7.2,9,7.1,9,7c0-1,0.2-2,0.5-2.9C5.3,4.8,2,8.5,2,13c0,5,4,9,9,9c4.5,0,8.2-3.3,8.9-7.5C19,14.8,18,15,17,15C16.9,15,16.8,15,16.7,15z"/><path d="M17,1c-3.3,0-6,2.7-6,6s2.7,6,6,6c3.3,0,6-2.7,6-6S20.3,1,17,1z M17,10c-1.7,0-3-1.3-3-3s1.3-3,3-3c1.7,0,3,1.3,3,3S18.7,10,17,10z"/></g> -<g id="circles-add"><path d="M12,2C6.5,2,2,6.5,2,12c0,5.5,4.5,10,10,10s10-4.5,10-10C22,6.5,17.5,2,12,2z M12,20c-4.4,0-8-3.6-8-8s3.6-8,8-8c4.4,0,8,3.6,8,8S16.4,20,12,20z"/><path d="M13,11V8h-2v3H8v2h3v3h2v-3h3v-2H13z"/></g> -<g id="circles-extended"><path d="M12,10c2.2,0,4-1.8,4-4c0-2.2-1.8-4-4-4C9.8,2,8,3.8,8,6C8,8.2,9.8,10,12,10z M12,4c1.1,0,2,0.9,2,2c0,1.1-0.9,2-2,2c-1.1,0-2-0.9-2-2C10,4.9,10.9,4,12,4z M6,13c-2.2,0-4,1.8-4,4c0,2.2,1.8,4,4,4c2.2,0,4-1.8,4-4C10,14.8,8.2,13,6,13z M6,19c-1.1,0-2-0.9-2-2c0-1.1,0.9-2,2-2c1.1,0,2,0.9,2,2C8,18.1,7.1,19,6,19z M12,11.1c-1,0-1.9,0.9-1.9,1.9s0.9,1.9,1.9,1.9c1,0,1.9-0.9,1.9-1.9S13,11.1,12,11.1z M18,13c-2.2,0-4,1.8-4,4c0,2.2,1.8,4,4,4c2.2,0,4-1.8,4-4C22,14.8,20.2,13,18,13z M18,19c-1.1,0-2-0.9-2-2c0-1.1,0.9-2,2-2c1.1,0,2,0.9,2,2C20,18.1,19.1,19,18,19z"/></g> -<g id="communities"><path d="M9,12c-1.1,0-2,0.9-2,2s0.9,2,2,2c1.1,0,2-0.9,2-2S10.1,12,9,12z M14,9c0-1.1-0.9-2-2-2c-1.1,0-2,0.9-2,2s0.9,2,2,2C13.1,11,14,10.1,14,9z M12,2C6.5,2,2,6.5,2,12c0,5.5,4.5,10,10,10c5.5,0,10-4.5,10-10C22,6.5,17.5,2,12,2z M12,20c-4.4,0-8-3.6-8-8c0-4.4,3.6-8,8-8c4.4,0,8,3.6,8,8C20,16.4,16.4,20,12,20z M15,12c-1.1,0-2,0.9-2,2s0.9,2,2,2c1.1,0,2-0.9,2-2S16.1,12,15,12z"/></g> -<g id="domain"><path d="M12,7V3H2v18h20V7H12z M6,19H4v-2h2V19z M6,15H4v-2h2V15z M6,11H4V9h2V11z M6,7H4V5h2V7z M10,19H8v-2h2V19z M10,15H8v-2h2V15z M10,11H8V9h2V11z M10,7H8V5h2V7z M20,19h-8v-2h2v-2h-2v-2h2v-2h-2V9h8V19z M18,11h-2v2h2V11z M18,15h-2v2h2V15z"/></g> -<g id="group"><path d="M16,11c1.7,0,3-1.3,3-3c0-1.7-1.3-3-3-3c-1.7,0-3,1.3-3,3C13,9.7,14.3,11,16,11z M8,11c1.7,0,3-1.3,3-3c0-1.7-1.3-3-3-3C6.3,5,5,6.3,5,8C5,9.7,6.3,11,8,11z M8,13c-2.3,0-7,1.2-7,3.5V19h14v-2.5C15,14.2,10.3,13,8,13z M16,13c-0.3,0-0.6,0-1,0.1c1.2,0.8,2,2,2,3.4V19h6v-2.5C23,14.2,18.3,13,16,13z"/></g> -<g id="group-add"><path d="M8,10H5V7H3v3H0v2h3v3h2v-3h3V10z M18,11c1.7,0,3-1.3,3-3c0-1.7-1.3-3-3-3c-0.3,0-0.6,0.1-0.9,0.1C17.7,6,18,6.9,18,8s-0.3,2-0.9,2.9C17.4,10.9,17.7,11,18,11z M13,11c1.7,0,3-1.3,3-3c0-1.7-1.3-3-3-3c-1.7,0-3,1.3-3,3C10,9.7,11.3,11,13,11z M19.6,13.2c0.8,0.7,1.4,1.7,1.4,2.8v2h3v-2C24,14.5,21.6,13.5,19.6,13.2z M13,13c-2,0-6,1-6,3v2h12v-2C19,14,15,13,13,13z"/></g> -<g id="location-city"><path d="M15,11V5l-3-3L9,5v2H3v14h18V11H15z M7,19H5v-2h2V19z M7,15H5v-2h2V15z M7,11H5V9h2V11z M13,19h-2v-2h2V19z M13,15h-2v-2h2V15z M13,11h-2V9h2V11z M13,7h-2V5h2V7z M19,19h-2v-2h2V19z M19,15h-2v-2h2V15z"/></g> -<g id="mood"><path d="M12,2C6.5,2,2,6.5,2,12s4.5,10,10,10c5.5,0,10-4.5,10-10S17.5,2,12,2z M12,20c-4.4,0-8-3.6-8-8s3.6-8,8-8c4.4,0,8,3.6,8,8S16.4,20,12,20z M15.5,11c0.8,0,1.5-0.7,1.5-1.5S16.3,8,15.5,8S14,8.7,14,9.5S14.7,11,15.5,11z M8.5,11c0.8,0,1.5-0.7,1.5-1.5S9.3,8,8.5,8S7,8.7,7,9.5S7.7,11,8.5,11z M12,17.5c2.3,0,4.3-1.5,5.1-3.5H6.9C7.7,16,9.7,17.5,12,17.5z"/></g> -<g id="notifications"><path d="M11.5,22c1.1,0,2-0.9,2-2h-4C9.5,21.1,10.4,22,11.5,22z M18,16v-5.5c0-3.1-2.1-5.6-5-6.3V3.5C13,2.7,12.3,2,11.5,2C10.7,2,10,2.7,10,3.5v0.7c-2.9,0.7-5,3.2-5,6.3V16l-2,2v1h17v-1L18,16z"/></g> -<g id="notifications-none"><path d="M11.5,22c1.1,0,2-0.9,2-2h-4C9.5,21.1,10.4,22,11.5,22z M18,16v-5.5c0-3.1-2.1-5.6-5-6.3V3.5C13,2.7,12.3,2,11.5,2C10.7,2,10,2.7,10,3.5v0.7c-2.9,0.7-5,3.2-5,6.3V16l-2,2v1h17v-1L18,16z M16,17H7v-6.5C7,8,9,6,11.5,6C14,6,16,8,16,10.5V17z"/></g> -<g id="notifications-off"><path d="M11.5,22c1.1,0,2-0.9,2-2h-4C9.5,21.1,10.4,22,11.5,22z M18,10.5c0-3.1-2.1-5.6-5-6.3V3.5C13,2.7,12.3,2,11.5,2C10.7,2,10,2.7,10,3.5v0.7C9.5,4.3,9,4.5,8.6,4.7l9.4,9.4V10.5z M17.7,19l2,2l1.3-1.3L4.3,3L3,4.3l2.9,2.9C5.3,8.2,5,9.3,5,10.5V16l-2,2v1H17.7z"/></g> -<g id="notifications-on"><path d="M6.6,3.6L5.2,2.2C2.8,4,1.2,6.8,1,10h2C3.2,7.3,4.5,5,6.6,3.6z M20,10h2c-0.2-3.2-1.7-6-4.1-7.8l-1.4,1.4C18.5,5,19.8,7.3,20,10z M18,10.5c0-3.1-2.1-5.6-5-6.3V3.5C13,2.7,12.3,2,11.5,2C10.7,2,10,2.7,10,3.5v0.7c-2.9,0.7-5,3.2-5,6.3V16l-2,2v1h17v-1l-2-2V10.5z M11.5,22c0.1,0,0.3,0,0.4,0c0.7-0.1,1.2-0.6,1.4-1.2c0.1-0.2,0.2-0.5,0.2-0.8h-4C9.5,21.1,10.4,22,11.5,22z"/></g> -<g id="notifications-paused"><path d="M11.5,22c1.1,0,2-0.9,2-2h-4C9.5,21.1,10.4,22,11.5,22z M18,16v-5.5c0-3.1-2.1-5.6-5-6.3V3.5C13,2.7,12.3,2,11.5,2C10.7,2,10,2.7,10,3.5v0.7c-2.9,0.7-5,3.2-5,6.3V16l-2,2v1h17v-1L18,16z M14,9.8l-2.8,3.4H14V15H9v-1.8l2.8-3.4H9V8h5V9.8z"/></g> -<g id="pages"><path d="M3,5v6h5L7,7l4,1V3H5C3.9,3,3,3.9,3,5z M8,13H3v6c0,1.1,0.9,2,2,2h6v-5l-4,1L8,13z M17,17l-4-1v5h6c1.1,0,2-0.9,2-2v-6l-5,0L17,17z M19,3h-6v5l4-1l-1,4h5V5C21,3.9,20.1,3,19,3z"/></g> -<g id="party-mode"><path d="M20,4h-3.2L15,2H9L7.2,4H4C2.9,4,2,4.9,2,6v12c0,1.1,0.9,2,2,2h16c1.1,0,2-0.9,2-2V6C22,4.9,21.1,4,20,4z M12,7c1.6,0,3.1,0.8,4,2h-4c-1.7,0-3,1.3-3,3c0,0.4,0.1,0.7,0.2,1H7.1C7,12.7,7,12.3,7,12C7,9.2,9.2,7,12,7z M12,17c-1.6,0-3.1-0.8-4-2h4c1.7,0,3-1.3,3-3c0-0.4-0.1-0.7-0.2-1h2.1c0.1,0.3,0.1,0.7,0.1,1C17,14.8,14.8,17,12,17z"/></g> -<g id="people"><path d="M16,11c1.7,0,3-1.3,3-3c0-1.7-1.3-3-3-3c-1.7,0-3,1.3-3,3C13,9.7,14.3,11,16,11z M8,11c1.7,0,3-1.3,3-3c0-1.7-1.3-3-3-3C6.3,5,5,6.3,5,8C5,9.7,6.3,11,8,11z M8,13c-2.3,0-7,1.2-7,3.5V19h14v-2.5C15,14.2,10.3,13,8,13z M16,13c-0.3,0-0.6,0-1,0.1c1.2,0.8,2,2,2,3.4V19h6v-2.5C23,14.2,18.3,13,16,13z"/></g> -<g id="person"><path d="M12,12c2.2,0,4-1.8,4-4c0-2.2-1.8-4-4-4C9.8,4,8,5.8,8,8C8,10.2,9.8,12,12,12z M12,14c-2.7,0-8,1.3-8,4v2h16v-2C20,15.3,14.7,14,12,14z"/></g> -<g id="person-add"><path d="M15,12c2.2,0,4-1.8,4-4c0-2.2-1.8-4-4-4c-2.2,0-4,1.8-4,4C11,10.2,12.8,12,15,12z M6,10V7H4v3H1v2h3v3h2v-3h3v-2H6z M15,14c-2.7,0-8,1.3-8,4v2h16v-2C23,15.3,17.7,14,15,14z"/></g> -<g id="person-outline"><path d="M12,5.9c1.2,0,2.1,0.9,2.1,2.1s-0.9,2.1-2.1,2.1S9.9,9.2,9.9,8S10.8,5.9,12,5.9 M12,14.9c3,0,6.1,1.5,6.1,2.1v1.1H5.9V17C5.9,16.4,9,14.9,12,14.9 M12,4C9.8,4,8,5.8,8,8c0,2.2,1.8,4,4,4c2.2,0,4-1.8,4-4C16,5.8,14.2,4,12,4L12,4z M12,13c-2.7,0-8,1.3-8,4v3h16v-3C20,14.3,14.7,13,12,13L12,13z"/></g> -<g id="plus-one"><polygon points="10,8 8,8 8,12 4,12 4,14 8,14 8,18 10,18 10,14 14,14 14,12 10,12 "/><polygon points="14.5,6.1 14.5,7.9 17,7.4 17,18 19,18 19,5 "/></g> -<g id="poll"><path d="M19,3H5C3.9,3,3,3.9,3,5v14c0,1.1,0.9,2,2,2h14c1.1,0,2-0.9,2-2V5C21,3.9,20.1,3,19,3z M9,17H7v-7h2V17z M13,17h-2V7h2V17z M17,17h-2v-4h2V17z"/></g> -<g id="post-blogger"><path d="M20,2H4C2.9,2,2,2.9,2,4l0,16c0,1.1,0.9,2,2,2h16c1.1,0,2-0.9,2-2V4C22,2.9,21.1,2,20,2z M16,9v1c0,0.6,0.4,1,1,1c0.6,0,1,0.4,1,1v3c0,1.7-1.3,3-3,3H9c-1.7,0-3-1.3-3-3V8c0-1.7,1.3-3,3-3h4c1.7,0,3,1.3,3,3V9z M10,10h2.6c0.6,0,1-0.4,1-1c0-0.6-0.4-1-1-1H10C9.4,8,9,8.4,9,9C9,9.6,9.4,10,10,10z M14,13h-4c-0.6,0-1,0.4-1,1c0,0.6,0.4,1,1,1h4c0.6,0,1-0.4,1-1C15,13.4,14.6,13,14,13z"/></g> -<g id="post-facebook"><path d="M20,2H4C2.9,2,2,2.9,2,4l0,16c0,1.1,0.9,2,2,2h16c1.1,0,2-0.9,2-2V4C22,2.9,21.1,2,20,2z M19,4v3h-2c-0.6,0-1,0.4-1,1v2h3v3h-3v7h-3v-7h-2v-3h2V7.5C13,5.6,14.6,4,16.5,4H19z"/></g> -<g id="post-github"><path d="M7.2 6.6h-.1c-.5 1.4-.2 2.3-.1 2.6-.6.7-1 1.6-1 2.6 0 3.8 2.4 4.6 4.6 4.9-.2 0-.6.2-.8.8-.4.2-1.8.7-2.6-.7 0 0-.5-.8-1.3-.9 0 0-.8 0-.1.5 0 0 .6.3.9 1.3 0 0 .5 1.7 3 1.1v3.1h5v-3.5c0-1-.4-1.5-.8-1.8 2.2-.2 4.6-1 4.6-4.8 0-1.1-.4-2-1-2.6.1-.3.4-1.2-.1-2.6 0 0-.8-.3-2.7 1-.8-.2-1.6-.3-2.5-.3-.8 0-1.7.1-2.5.3-1.4-1-2.2-1-2.6-1zm12.8 15.4h-16c-1.1 0-2-.9-2-2v-16c0-1.1.9-2 2-2h16c1.1 0 2 .9 2 2v16c0 1.1-.9 2-2 2z"/></g> -<g id="post-gplus"><path d="M11.2,8.9c0-1-0.6-3-2.1-3c-0.6,0-1.3,0.4-1.3,1.7c0,1.2,0.6,2.9,2,2.9C9.8,10.5,11.2,10.4,11.2,8.9z M10.6,13.8c-0.1,0-0.2,0-0.3,0h0c-0.3,0-1.2,0.1-1.8,0.3C7.8,14.3,7,14.8,7,15.8c0,1.1,1,2.2,3,2.2c1.5,0,2.4-1,2.4-2C12.4,15.3,11.9,14.8,10.6,13.8z M20,2H4C2.9,2,2,2.9,2,4l0,16c0,1.1,0.9,2,2,2h16c1.1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.3c-0.1,4.6-3,7.8-7.4,8c-1.8,0.1-3.1-0.5-4.3-1.2c1.3,0.2,3-0.3,3.9-1.1c-1.3-0.1-2.1-0.8-2.5-1.9c0.4,0.1,0.8,0,1.1,0c-1.2-0.4-2-1.1-2.1-2.7c0.3,0.2,0.7,0.3,1.1,0.3c-0.9-0.5-1.5-2.4-0.8-3.6c1.3,1.4,2.9,2.6,5.5,2.8c-0.7-2.8,3.1-4.3,4.6-2.4c0.7-0.1,1.2-0.4,1.7-0.6c-0.2,0.7-0.6,1.1-1.1,1.5c0.5-0.1,1-0.2,1.4-0.4C18.7,8.5,18.2,8.9,17.7,9.3z"/></g> -<g id="public"><path d="M12,2C6.5,2,2,6.5,2,12c0,5.5,4.5,10,10,10c5.5,0,10-4.5,10-10C22,6.5,17.5,2,12,2z M11,19.9c-3.9-0.5-7-3.9-7-7.9c0-0.6,0.1-1.2,0.2-1.8L9,15v1c0,1.1,0.9,2,2,2V19.9z M17.9,17.4c-0.3-0.8-1-1.4-1.9-1.4h-1v-3c0-0.6-0.4-1-1-1H8v-2h2c0.6,0,1-0.4,1-1V7h2c1.1,0,2-0.9,2-2V4.6c2.9,1.2,5,4.1,5,7.4C20,14.1,19.2,16,17.9,17.4z"/></g> -<g id="school"><path d="M5,13.2v4l7,3.8l7-3.8v-4L12,17L5,13.2z M12,3L1,9l11,6l9-4.9V17h2V9L12,3z"/></g> -<g id="share"><path d="M21,11l-7-7v4C7,9,4,14,3,19c2.5-3.5,6-5.1,11-5.1V18L21,11z"/></g> -<g id="share-alt"><path d="M18,16.1c-0.8,0-1.5,0.3-2,0.8l-7.1-4.2C9,12.5,9,12.2,9,12s0-0.5-0.1-0.7L16,7.2C16.5,7.7,17.2,8,18,8c1.7,0,3-1.3,3-3s-1.3-3-3-3s-3,1.3-3,3c0,0.2,0,0.5,0.1,0.7L8,9.8C7.5,9.3,6.8,9,6,9c-1.7,0-2.9,1.2-2.9,2.9c0,1.7,1.3,3,3,3c0.8,0,1.5-0.3,2-0.8l7.1,4.2c-0.1,0.3-0.1,0.5-0.1,0.7c0,1.6,1.3,2.9,2.9,2.9s2.9-1.3,2.9-2.9S19.6,16.1,18,16.1z"/></g> -<g id="whatshot"><path d="M13.5,0.7c0,0,0.7,2.6,0.7,4.8c0,2.1-1.4,3.7-3.4,3.7c-2.1,0-3.6-1.7-3.6-3.7l0-0.4C5.2,7.5,4,10.6,4,14c0,4.4,3.6,8,8,8c4.4,0,8-3.6,8-8C20,8.6,17.4,3.8,13.5,0.7z M11.7,19c-1.8,0-3.2-1.4-3.2-3.1c0-1.6,1-2.8,2.8-3.1c1.8-0.4,3.6-1.2,4.6-2.6c0.4,1.3,0.6,2.6,0.6,4C16.5,16.8,14.4,19,11.7,19z"/></g> -</defs></svg> -</core-iconset-svg> diff --git a/third_party/polymer/components/core-iconset-svg/.bower.json b/third_party/polymer/components/core-iconset-svg/.bower.json deleted file mode 100644 index 81af334..0000000 --- a/third_party/polymer/components/core-iconset-svg/.bower.json +++ /dev/null @@ -1,20 +0,0 @@ -{ - "name": "core-iconset", - "private": true, - "dependencies": { - "polymer": "Polymer/polymer#>=0.3.0 <1.0.0", - "core-meta": "Polymer/core-meta#>=0.3.0 <1.0.0", - "core-icon": "Polymer/core-icon#>=0.3.0 <1.0.0" - }, - "homepage": "https://github.com/Polymer/core-iconset", - "version": "0.3.5", - "_release": "0.3.5", - "_resolution": { - "type": "version", - "tag": "0.3.5", - "commit": "76bf6beb0e7ffc1b67485ab2dc13b188915e8233" - }, - "_source": "git://github.com/Polymer/core-iconset.git", - "_target": "0.3.5", - "_originalSource": "Polymer/core-iconset" -}
\ No newline at end of file diff --git a/third_party/polymer/components/core-iconset-svg/README.md b/third_party/polymer/components/core-iconset-svg/README.md deleted file mode 100644 index 7a3a217..0000000 --- a/third_party/polymer/components/core-iconset-svg/README.md +++ /dev/null @@ -1,4 +0,0 @@ -core-iconset -============ - -See the [component page](http://polymer-project.org/docs/elements/core-elements.html#core-iconset) for more information. diff --git a/third_party/polymer/components/core-iconset-svg/bower.json b/third_party/polymer/components/core-iconset-svg/bower.json deleted file mode 100644 index d783d98..0000000 --- a/third_party/polymer/components/core-iconset-svg/bower.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "name": "core-iconset", - "private": true, - "dependencies": { - "polymer": "Polymer/polymer#>=0.3.0 <1.0.0", - "core-meta": "Polymer/core-meta#>=0.3.0 <1.0.0", - "core-icon": "Polymer/core-icon#>=0.3.0 <1.0.0" - } -}
\ No newline at end of file diff --git a/third_party/polymer/components/core-iconset-svg/core-iconset.html b/third_party/polymer/components/core-iconset-svg/core-iconset.html deleted file mode 100644 index 7ab2d34..0000000 --- a/third_party/polymer/components/core-iconset-svg/core-iconset.html +++ /dev/null @@ -1,241 +0,0 @@ -<!-- -Copyright (c) 2014 The Polymer Project Authors. All rights reserved. -This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt -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 ---> - -<!-- -/** - * @group Polymer Core Elements - * - * The `core-iconset` element allows users to define their own icon sets. - * The `src` property specifies the url of the icon image. Multiple icons may - * be included in this image and they may be organized into rows. - * The `icons` property is a space separated list of names corresponding to the - * icons. The names must be ordered as the icons are ordered in the icon image. - * Icons are expected to be square and are the size specified by the `iconSize` - * property. The `width` property corresponds to the width of the icon image - * and must be specified if icons are arranged into multiple rows in the image. - * - * All `core-iconset` elements are available for use by other `core-iconset` - * elements via a database keyed by id. Typically, an element author that wants - * to support a set of custom icons uses a `core-iconset` to retrieve - * and use another, user-defined iconset. - * - * Example: - * - * <core-iconset id="my-icons" src="my-icons.png" width="96" iconSize="24" - * icons="location place starta stopb bus car train walk"> - * </core-iconset> - * - * This will automatically register the icon set "my-icons" to the iconset - * database. To use these icons from within another element, make a - * `core-iconset` element and call the `byId` method to retrieve a - * given iconset. To apply a particular icon to an element, use the - * `applyIcon` method. For example: - * - * iconset.applyIcon(iconNode, 'car'); - * - * Themed icon sets are also supported. The `core-iconset` can contain child - * `property` elements that specify a theme with an offsetX and offsetY of the - * theme within the icon resource. For example. - * - * <core-iconset id="my-icons" src="my-icons.png" width="96" iconSize="24" - * icons="location place starta stopb bus car train walk"> - * <property theme="special" offsetX="256" offsetY="24"></property> - * </core-iconset> - * - * Then a themed icon can be applied like this: - * - * iconset.applyIcon(iconNode, 'car', 'special'); - * - * @element core-iconset - * @extends core-meta - * @homepage github.io - */ ---> - -<link rel="import" href="../core-meta/core-meta.html"> - -<polymer-element name="core-iconset" extends="core-meta" attributes="src width icons iconSize"> - - <script> - - Polymer('core-iconset', { - - /** - * The URL of the iconset image. - * - * @attribute src - * @type string - * @default '' - */ - src: '', - - /** - * The width of the iconset image. This must only be specified if the - * icons are arranged into separate rows inside the image. - * - * @attribute width - * @type number - * @default 0 - */ - width: 0, - - /** - * A space separated list of names corresponding to icons in the iconset - * image file. This list must be ordered the same as the icon images - * in the image file. - * - * @attribute icons - * @type string - * @default '' - */ - icons: '', - - /** - * The size of an individual icon. Note that icons must be square. - * - * @attribute iconSize - * @type number - * @default 24 - */ - iconSize: 24, - - /** - * The horizontal offset of the icon images in the inconset src image. - * This is typically used if the image resource contains additional images - * beside those intended for the iconset. - * - * @attribute offsetX - * @type number - * @default 0 - */ - offsetX: 0, - /** - * The vertical offset of the icon images in the inconset src image. - * This is typically used if the image resource contains additional images - * beside those intended for the iconset. - * - * @attribute offsetY - * @type number - * @default 0 - */ - offsetY: 0, - type: 'iconset', - - created: function() { - this.iconMap = {}; - this.iconNames = []; - this.themes = {}; - }, - - ready: function() { - // TODO(sorvell): ensure iconset's src is always relative to the main - // document - if (this.src && (this.ownerDocument !== document)) { - this.src = this.resolvePath(this.src, this.ownerDocument.baseURI); - } - this.super(); - this.updateThemes(); - }, - - iconsChanged: function() { - var ox = this.offsetX; - var oy = this.offsetY; - this.icons && this.icons.split(/\s+/g).forEach(function(name, i) { - this.iconNames.push(name); - this.iconMap[name] = { - offsetX: ox, - offsetY: oy - } - if (ox + this.iconSize < this.width) { - ox += this.iconSize; - } else { - ox = this.offsetX; - oy += this.iconSize; - } - }, this); - }, - - updateThemes: function() { - var ts = this.querySelectorAll('property[theme]'); - ts && ts.array().forEach(function(t) { - this.themes[t.getAttribute('theme')] = { - offsetX: parseInt(t.getAttribute('offsetX')) || 0, - offsetY: parseInt(t.getAttribute('offsetY')) || 0 - }; - }, this); - }, - - // TODO(ffu): support retrived by index e.g. getOffset(10); - /** - * Returns an object containing `offsetX` and `offsetY` properties which - * specify the pixel locaion in the iconset's src file for the given - * `icon` and `theme`. It's uncommon to call this method. It is useful, - * for example, to manually position a css backgroundImage to the proper - * offset. It's more common to use the `applyIcon` method. - * - * @method getOffset - * @param {String|Number} icon The name of the icon or the index of the - * icon within in the icon image. - * @param {String} theme The name of the theme. - * @returns {Object} An object specifying the offset of the given icon - * within the icon resource file; `offsetX` is the horizontal offset and - * `offsetY` is the vertical offset. Both values are in pixel units. - */ - getOffset: function(icon, theme) { - var i = this.iconMap[icon]; - if (!i) { - var n = this.iconNames[Number(icon)]; - i = this.iconMap[n]; - } - var t = this.themes[theme]; - if (i && t) { - return { - offsetX: i.offsetX + t.offsetX, - offsetY: i.offsetY + t.offsetY - } - } - return i; - }, - - /** - * Applies an icon to the given element as a css background image. This - * method does not size the element, and it's often necessary to set - * the element's height and width so that the background image is visible. - * - * @method applyIcon - * @param {Element} element The element to which the background is - * applied. - * @param {String|Number} icon The name or index of the icon to apply. - * @param {Number} scale (optional, defaults to 1) A scaling factor - * with which the icon can be magnified. - * @return {Element} The icon element. - */ - applyIcon: function(element, icon, scale) { - var offset = this.getOffset(icon); - scale = scale || 1; - if (element && offset) { - var icon = element._icon || document.createElement('div'); - var style = icon.style; - style.backgroundImage = 'url(' + this.src + ')'; - style.backgroundPosition = (-offset.offsetX * scale + 'px') + - ' ' + (-offset.offsetY * scale + 'px'); - style.backgroundSize = scale === 1 ? 'auto' : - this.width * scale + 'px'; - if (icon.parentNode !== element) { - element.appendChild(icon); - } - return icon; - } - } - - }); - - </script> - -</polymer-element> diff --git a/third_party/polymer/components/core-iconset-svg/demo.html b/third_party/polymer/components/core-iconset-svg/demo.html deleted file mode 100644 index 82ea67a..0000000 --- a/third_party/polymer/components/core-iconset-svg/demo.html +++ /dev/null @@ -1,62 +0,0 @@ -<!doctype html> -<!-- -Copyright (c) 2014 The Polymer Project Authors. All rights reserved. -This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt -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 ---> - -<html> -<head> - - <title>core-iconset</title> - - <script src="../platform/platform.js"></script> - <link rel="import" href="core-iconset.html"> - <link rel="import" href="../core-icon/core-icon.html"> - -</head> -<body unresolved> - - <!-- Register an icon set; you can do this anywhere, including an HTMLImport! --> - <core-iconset id="my-icons" src="my-icons.png" width="96" iconSize="24" - icons="location place starta stopb bus car train walk"> - </core-iconset> - - <core-iconset id="my-icons-big" src="my-icons-big.png" width="192" iconSize="48" - icons="location place starta stopb bus car train walk"> - </core-iconset> - - <!-- Now create a bunch of icons using our iconset --> - <core-icon icon="my-icons:location"></core-icon> - <core-icon icon="my-icons:place"></core-icon> - <core-icon icon="my-icons:starta"></core-icon> - <core-icon icon="my-icons:stopb"></core-icon> - <core-icon icon="my-icons:bus"></core-icon> - <core-icon icon="my-icons:car"></core-icon> - <core-icon icon="my-icons:train"></core-icon> - <core-icon icon="my-icons:walk"></core-icon> - <br> - <!-- icons may also be specified by index --> - <style> - .embiggen core-icon { - width: 48px; - height: 48px; - } - </style> - - <div class="embiggen"> - <core-icon icon="my-icons-big:0"></core-icon> - <core-icon icon="my-icons-big:1"></core-icon> - <core-icon icon="my-icons-big:2"></core-icon> - <core-icon icon="my-icons-big:3"></core-icon> - <core-icon icon="my-icons-big:4"></core-icon> - <core-icon icon="my-icons-big:5"></core-icon> - <core-icon icon="my-icons-big:6"></core-icon> - <core-icon icon="my-icons-big:7"></core-icon> - </div> - - </body> -</html> diff --git a/third_party/polymer/components/core-iconset-svg/index.html b/third_party/polymer/components/core-iconset-svg/index.html deleted file mode 100644 index 58856f3..0000000 --- a/third_party/polymer/components/core-iconset-svg/index.html +++ /dev/null @@ -1,22 +0,0 @@ -<!doctype html> -<!-- -Copyright (c) 2014 The Polymer Project Authors. All rights reserved. -This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE -The complete set of authors may be found at http://polymer.github.io/AUTHORS -The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS -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 ---> -<html> -<head> - - <script src="../platform/platform.js"></script> - <link rel="import" href="../core-component-page/core-component-page.html"> - -</head> -<body unresolved> - - <core-component-page></core-component-page> - -</body> -</html> diff --git a/third_party/polymer/components/core-iconset-svg/my-icons-big.png b/third_party/polymer/components/core-iconset-svg/my-icons-big.png Binary files differdeleted file mode 100644 index f019f3f..0000000 --- a/third_party/polymer/components/core-iconset-svg/my-icons-big.png +++ /dev/null diff --git a/third_party/polymer/components/core-iconset-svg/my-icons.png b/third_party/polymer/components/core-iconset-svg/my-icons.png Binary files differdeleted file mode 100644 index a7d223b..0000000 --- a/third_party/polymer/components/core-iconset-svg/my-icons.png +++ /dev/null diff --git a/third_party/polymer/components/core-iconset/.bower.json b/third_party/polymer/components/core-iconset/.bower.json deleted file mode 100644 index 81af334..0000000 --- a/third_party/polymer/components/core-iconset/.bower.json +++ /dev/null @@ -1,20 +0,0 @@ -{ - "name": "core-iconset", - "private": true, - "dependencies": { - "polymer": "Polymer/polymer#>=0.3.0 <1.0.0", - "core-meta": "Polymer/core-meta#>=0.3.0 <1.0.0", - "core-icon": "Polymer/core-icon#>=0.3.0 <1.0.0" - }, - "homepage": "https://github.com/Polymer/core-iconset", - "version": "0.3.5", - "_release": "0.3.5", - "_resolution": { - "type": "version", - "tag": "0.3.5", - "commit": "76bf6beb0e7ffc1b67485ab2dc13b188915e8233" - }, - "_source": "git://github.com/Polymer/core-iconset.git", - "_target": "0.3.5", - "_originalSource": "Polymer/core-iconset" -}
\ No newline at end of file diff --git a/third_party/polymer/components/core-iconset/README.md b/third_party/polymer/components/core-iconset/README.md deleted file mode 100644 index 7a3a217..0000000 --- a/third_party/polymer/components/core-iconset/README.md +++ /dev/null @@ -1,4 +0,0 @@ -core-iconset -============ - -See the [component page](http://polymer-project.org/docs/elements/core-elements.html#core-iconset) for more information. diff --git a/third_party/polymer/components/core-iconset/bower.json b/third_party/polymer/components/core-iconset/bower.json deleted file mode 100644 index d783d98..0000000 --- a/third_party/polymer/components/core-iconset/bower.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "name": "core-iconset", - "private": true, - "dependencies": { - "polymer": "Polymer/polymer#>=0.3.0 <1.0.0", - "core-meta": "Polymer/core-meta#>=0.3.0 <1.0.0", - "core-icon": "Polymer/core-icon#>=0.3.0 <1.0.0" - } -}
\ No newline at end of file diff --git a/third_party/polymer/components/core-iconset/core-iconset.html b/third_party/polymer/components/core-iconset/core-iconset.html deleted file mode 100644 index 7ab2d34..0000000 --- a/third_party/polymer/components/core-iconset/core-iconset.html +++ /dev/null @@ -1,241 +0,0 @@ -<!-- -Copyright (c) 2014 The Polymer Project Authors. All rights reserved. -This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt -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 ---> - -<!-- -/** - * @group Polymer Core Elements - * - * The `core-iconset` element allows users to define their own icon sets. - * The `src` property specifies the url of the icon image. Multiple icons may - * be included in this image and they may be organized into rows. - * The `icons` property is a space separated list of names corresponding to the - * icons. The names must be ordered as the icons are ordered in the icon image. - * Icons are expected to be square and are the size specified by the `iconSize` - * property. The `width` property corresponds to the width of the icon image - * and must be specified if icons are arranged into multiple rows in the image. - * - * All `core-iconset` elements are available for use by other `core-iconset` - * elements via a database keyed by id. Typically, an element author that wants - * to support a set of custom icons uses a `core-iconset` to retrieve - * and use another, user-defined iconset. - * - * Example: - * - * <core-iconset id="my-icons" src="my-icons.png" width="96" iconSize="24" - * icons="location place starta stopb bus car train walk"> - * </core-iconset> - * - * This will automatically register the icon set "my-icons" to the iconset - * database. To use these icons from within another element, make a - * `core-iconset` element and call the `byId` method to retrieve a - * given iconset. To apply a particular icon to an element, use the - * `applyIcon` method. For example: - * - * iconset.applyIcon(iconNode, 'car'); - * - * Themed icon sets are also supported. The `core-iconset` can contain child - * `property` elements that specify a theme with an offsetX and offsetY of the - * theme within the icon resource. For example. - * - * <core-iconset id="my-icons" src="my-icons.png" width="96" iconSize="24" - * icons="location place starta stopb bus car train walk"> - * <property theme="special" offsetX="256" offsetY="24"></property> - * </core-iconset> - * - * Then a themed icon can be applied like this: - * - * iconset.applyIcon(iconNode, 'car', 'special'); - * - * @element core-iconset - * @extends core-meta - * @homepage github.io - */ ---> - -<link rel="import" href="../core-meta/core-meta.html"> - -<polymer-element name="core-iconset" extends="core-meta" attributes="src width icons iconSize"> - - <script> - - Polymer('core-iconset', { - - /** - * The URL of the iconset image. - * - * @attribute src - * @type string - * @default '' - */ - src: '', - - /** - * The width of the iconset image. This must only be specified if the - * icons are arranged into separate rows inside the image. - * - * @attribute width - * @type number - * @default 0 - */ - width: 0, - - /** - * A space separated list of names corresponding to icons in the iconset - * image file. This list must be ordered the same as the icon images - * in the image file. - * - * @attribute icons - * @type string - * @default '' - */ - icons: '', - - /** - * The size of an individual icon. Note that icons must be square. - * - * @attribute iconSize - * @type number - * @default 24 - */ - iconSize: 24, - - /** - * The horizontal offset of the icon images in the inconset src image. - * This is typically used if the image resource contains additional images - * beside those intended for the iconset. - * - * @attribute offsetX - * @type number - * @default 0 - */ - offsetX: 0, - /** - * The vertical offset of the icon images in the inconset src image. - * This is typically used if the image resource contains additional images - * beside those intended for the iconset. - * - * @attribute offsetY - * @type number - * @default 0 - */ - offsetY: 0, - type: 'iconset', - - created: function() { - this.iconMap = {}; - this.iconNames = []; - this.themes = {}; - }, - - ready: function() { - // TODO(sorvell): ensure iconset's src is always relative to the main - // document - if (this.src && (this.ownerDocument !== document)) { - this.src = this.resolvePath(this.src, this.ownerDocument.baseURI); - } - this.super(); - this.updateThemes(); - }, - - iconsChanged: function() { - var ox = this.offsetX; - var oy = this.offsetY; - this.icons && this.icons.split(/\s+/g).forEach(function(name, i) { - this.iconNames.push(name); - this.iconMap[name] = { - offsetX: ox, - offsetY: oy - } - if (ox + this.iconSize < this.width) { - ox += this.iconSize; - } else { - ox = this.offsetX; - oy += this.iconSize; - } - }, this); - }, - - updateThemes: function() { - var ts = this.querySelectorAll('property[theme]'); - ts && ts.array().forEach(function(t) { - this.themes[t.getAttribute('theme')] = { - offsetX: parseInt(t.getAttribute('offsetX')) || 0, - offsetY: parseInt(t.getAttribute('offsetY')) || 0 - }; - }, this); - }, - - // TODO(ffu): support retrived by index e.g. getOffset(10); - /** - * Returns an object containing `offsetX` and `offsetY` properties which - * specify the pixel locaion in the iconset's src file for the given - * `icon` and `theme`. It's uncommon to call this method. It is useful, - * for example, to manually position a css backgroundImage to the proper - * offset. It's more common to use the `applyIcon` method. - * - * @method getOffset - * @param {String|Number} icon The name of the icon or the index of the - * icon within in the icon image. - * @param {String} theme The name of the theme. - * @returns {Object} An object specifying the offset of the given icon - * within the icon resource file; `offsetX` is the horizontal offset and - * `offsetY` is the vertical offset. Both values are in pixel units. - */ - getOffset: function(icon, theme) { - var i = this.iconMap[icon]; - if (!i) { - var n = this.iconNames[Number(icon)]; - i = this.iconMap[n]; - } - var t = this.themes[theme]; - if (i && t) { - return { - offsetX: i.offsetX + t.offsetX, - offsetY: i.offsetY + t.offsetY - } - } - return i; - }, - - /** - * Applies an icon to the given element as a css background image. This - * method does not size the element, and it's often necessary to set - * the element's height and width so that the background image is visible. - * - * @method applyIcon - * @param {Element} element The element to which the background is - * applied. - * @param {String|Number} icon The name or index of the icon to apply. - * @param {Number} scale (optional, defaults to 1) A scaling factor - * with which the icon can be magnified. - * @return {Element} The icon element. - */ - applyIcon: function(element, icon, scale) { - var offset = this.getOffset(icon); - scale = scale || 1; - if (element && offset) { - var icon = element._icon || document.createElement('div'); - var style = icon.style; - style.backgroundImage = 'url(' + this.src + ')'; - style.backgroundPosition = (-offset.offsetX * scale + 'px') + - ' ' + (-offset.offsetY * scale + 'px'); - style.backgroundSize = scale === 1 ? 'auto' : - this.width * scale + 'px'; - if (icon.parentNode !== element) { - element.appendChild(icon); - } - return icon; - } - } - - }); - - </script> - -</polymer-element> diff --git a/third_party/polymer/components/core-iconset/demo.html b/third_party/polymer/components/core-iconset/demo.html deleted file mode 100644 index 82ea67a..0000000 --- a/third_party/polymer/components/core-iconset/demo.html +++ /dev/null @@ -1,62 +0,0 @@ -<!doctype html> -<!-- -Copyright (c) 2014 The Polymer Project Authors. All rights reserved. -This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt -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 ---> - -<html> -<head> - - <title>core-iconset</title> - - <script src="../platform/platform.js"></script> - <link rel="import" href="core-iconset.html"> - <link rel="import" href="../core-icon/core-icon.html"> - -</head> -<body unresolved> - - <!-- Register an icon set; you can do this anywhere, including an HTMLImport! --> - <core-iconset id="my-icons" src="my-icons.png" width="96" iconSize="24" - icons="location place starta stopb bus car train walk"> - </core-iconset> - - <core-iconset id="my-icons-big" src="my-icons-big.png" width="192" iconSize="48" - icons="location place starta stopb bus car train walk"> - </core-iconset> - - <!-- Now create a bunch of icons using our iconset --> - <core-icon icon="my-icons:location"></core-icon> - <core-icon icon="my-icons:place"></core-icon> - <core-icon icon="my-icons:starta"></core-icon> - <core-icon icon="my-icons:stopb"></core-icon> - <core-icon icon="my-icons:bus"></core-icon> - <core-icon icon="my-icons:car"></core-icon> - <core-icon icon="my-icons:train"></core-icon> - <core-icon icon="my-icons:walk"></core-icon> - <br> - <!-- icons may also be specified by index --> - <style> - .embiggen core-icon { - width: 48px; - height: 48px; - } - </style> - - <div class="embiggen"> - <core-icon icon="my-icons-big:0"></core-icon> - <core-icon icon="my-icons-big:1"></core-icon> - <core-icon icon="my-icons-big:2"></core-icon> - <core-icon icon="my-icons-big:3"></core-icon> - <core-icon icon="my-icons-big:4"></core-icon> - <core-icon icon="my-icons-big:5"></core-icon> - <core-icon icon="my-icons-big:6"></core-icon> - <core-icon icon="my-icons-big:7"></core-icon> - </div> - - </body> -</html> diff --git a/third_party/polymer/components/core-iconset/index.html b/third_party/polymer/components/core-iconset/index.html deleted file mode 100644 index 58856f3..0000000 --- a/third_party/polymer/components/core-iconset/index.html +++ /dev/null @@ -1,22 +0,0 @@ -<!doctype html> -<!-- -Copyright (c) 2014 The Polymer Project Authors. All rights reserved. -This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE -The complete set of authors may be found at http://polymer.github.io/AUTHORS -The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS -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 ---> -<html> -<head> - - <script src="../platform/platform.js"></script> - <link rel="import" href="../core-component-page/core-component-page.html"> - -</head> -<body unresolved> - - <core-component-page></core-component-page> - -</body> -</html> diff --git a/third_party/polymer/components/core-iconset/my-icons-big.png b/third_party/polymer/components/core-iconset/my-icons-big.png Binary files differdeleted file mode 100644 index f019f3f..0000000 --- a/third_party/polymer/components/core-iconset/my-icons-big.png +++ /dev/null diff --git a/third_party/polymer/components/core-iconset/my-icons.png b/third_party/polymer/components/core-iconset/my-icons.png Binary files differdeleted file mode 100644 index a7d223b..0000000 --- a/third_party/polymer/components/core-iconset/my-icons.png +++ /dev/null diff --git a/third_party/polymer/components/core-input/.bower.json b/third_party/polymer/components/core-input/.bower.json deleted file mode 100644 index 2f1a23b..0000000 --- a/third_party/polymer/components/core-input/.bower.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "name": "core-input", - "dependencies": { - "polymer": "Polymer/polymer#>=0.3.0 <1.0.0" - }, - "homepage": "https://github.com/Polymer/core-input", - "version": "0.3.5", - "_release": "0.3.5", - "_resolution": { - "type": "version", - "tag": "0.3.5", - "commit": "03b52ae6a53a554f315311921e9aafb9448e21b0" - }, - "_source": "git://github.com/Polymer/core-input.git", - "_target": "0.3.5", - "_originalSource": "Polymer/core-input" -}
\ No newline at end of file diff --git a/third_party/polymer/components/core-input/README.md b/third_party/polymer/components/core-input/README.md deleted file mode 100644 index ca86fcb..0000000 --- a/third_party/polymer/components/core-input/README.md +++ /dev/null @@ -1,2 +0,0 @@ -core-input -========== diff --git a/third_party/polymer/components/core-input/bower.json b/third_party/polymer/components/core-input/bower.json deleted file mode 100644 index 2513292..0000000 --- a/third_party/polymer/components/core-input/bower.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "name": "core-input", - "dependencies": { - "polymer": "Polymer/polymer#>=0.3.0 <1.0.0" - } -}
\ No newline at end of file diff --git a/third_party/polymer/components/core-input/core-input.css b/third_party/polymer/components/core-input/core-input.css deleted file mode 100644 index 7303061..0000000 --- a/third_party/polymer/components/core-input/core-input.css +++ /dev/null @@ -1,35 +0,0 @@ -:host { - display: inline-block; - text-align: inherit; - color: #ccc; - position: relative; - width: 20em; -} - -:host:hover { - cursor: text; -} - -input, -textarea { - font: inherit; - width: 100%; - margin: 0; - padding: 0; - background-color: transparent; - border: none; - outline: none; - width: 100%; -} - -textarea { - resize: none; -} - -textarea[fit] { - position: absolute; - top: 0; - left: 0; - right: 0; - bottom: 0; -}
\ No newline at end of file diff --git a/third_party/polymer/components/core-input/core-input.html b/third_party/polymer/components/core-input/core-input.html deleted file mode 100644 index 95edde0..0000000 --- a/third_party/polymer/components/core-input/core-input.html +++ /dev/null @@ -1,432 +0,0 @@ -<!-- -Copyright (c) 2014 The Polymer Project Authors. All rights reserved. -This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE -The complete set of authors may be found at http://polymer.github.io/AUTHORS -The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS -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 ---> - -<!-- -/** - * core-input is an unstyled single- or multi-line text field where user can - * enter input. - * - * Example: - * - * <core-input placeholder="Placeholder text here"></core-input> - * - * <core-input multiline placeholder="Enter multiple lines here"></core-input> - * - * The text input's value is considered "committed" if the user hits the "enter" - * key or blurs the input after changing the value. The `change` event is fired - * when the value becomes committed, and the committed value is stored in the - * `value` property. The current value of the input is stored in the `inputValue` - * property. - * - * Validation - * ---------- - * - * core-input can optionally validate the value using the HTML5 constraints API, - * similar to native inputs. There are two methods to enable input validation: - * - * 1. By setting the `type` attribute. For example, setting it to `email` will - * check the value is a valid email, and setting it to `number` will check - * the input is a number. - * - * 2. By setting attributes related to validation. The attributes are `pattern`, - * `min`, `max`, `step` and `required`. - * - * Only `required` is supported for multiline inputs currently. - * - * Example: - * - * <core-input type="email" placeholder="enter your email"></core-input> - * - * <core-input type="number" min="5" placeholder="enter a number greater than or equal to 5"></core-input> - * - * <core-input pattern=".*abc.*" placeholder="enter something containing 'abc'"></core-input> - * - * See https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation - * for more info on validation. - * - * @group Polymer Core Elements - * @element core-input - * @homepage github.io - */ ---> - -<!-- -Fired when the inputValue of is changed. This is the same event as the DOM -"input" event. - -@event input ---> - -<!-- -Fired when the user commits the value of the input, either by the hitting the -`enter` key or blurring the input after the changing the inputValue. Also see the -DOM "change" event. - -@event change ---> - -<!-- -Fired when the inputValue of this text input changes and fails validation. - -@event input-invalid -@param {Object} detail -@param {string} value The text input's inputValue. ---> - -<!-- -Fired when the inputValue of this text input changes and passes validation. - -@event input-valid -@param {Object} detail -@param {string} value The text input's inputValue. ---> -<link href="../polymer/polymer.html" rel="import"> - -<polymer-element name="core-input" on-focus="{{focusAction}}"> - - <template> - - <link href="core-input.css" rel="stylesheet"> - - <template if="{{multiline}}"> - <textarea id="input" value="{{inputValue}}" rows="{{rows}}" fit?="{{rows === 'fit'}}" disabled?="{{disabled}}" placeholder="{{placeholder}}" autofocus?="{{autofocus}}" required?="{{required}}" readonly?="{{readonly}}" aria-label="{{label || placeholder}}" aria-invalid="{{invalid}}" on-change="{{inputChangeAction}}" on-focus="{{inputFocusAction}}" on-blur="{{inputBlurAction}}"></textarea> - </template> - - <template if="{{!multiline}}"> - <input id="input" value="{{inputValue}}" disabled?="{{disabled}}" type="{{type}}" placeholder="{{placeholder}}" autofocus?="{{autofocus}}" required?="{{required}}" readonly?="{{readonly}}" pattern="{{pattern}}" min="{{min}}" max="{{max}}" step="{{step}}" maxlength="{{maxlength}}" aria-label="{{label || placeholder}}" aria-invalid="{{invalid}}" on-keydown="{{keydownAction}}" on-change="{{inputChangeAction}}" on-focus="{{inputFocusAction}}" on-blur="{{inputBlurAction}}"> - </template> - - </template> - - <script> - - Polymer('core-input', { - publish: { - /** - * Placeholder text that hints to the user what can be entered in - * the input. - * - * @attribute placeholder - * @type string - * @default '' - */ - placeholder: '', - - /** - * If true, this input cannot be focused and the user cannot change - * its value. - * - * @attribute disabled - * @type boolean - * @default false - */ - disabled: false, - - /** - * If true, the user cannot modify the value of the input. - * - * @attribute readonly - * @type boolean - * @default false - */ - readonly: false, - - /** - * If true, this input will automatically gain focus on page load. - * - * @attribute autofocus - * @type boolean - * @default false - */ - autofocus: false, - - /** - * If true, this input accepts multi-line input like a `<textarea>` - * - * @attribute multiline - * @type boolean - * @default false - */ - multiline: false, - - /** - * (multiline only) The height of this text input in rows. The input - * will scroll internally if more input is entered beyond the size - * of the component. This property is meaningless if multiline is - * false. You can also set this property to "fit" and size the - * component with CSS to make the input fit the CSS size. - * - * @attribute rows - * @type number|'fit' - * @default 'fit' - */ - rows: 'fit', - - /** - * The current value of this input. Changing inputValue programmatically - * will cause value to be out of sync. Instead, change value directly - * or call commit() after changing inputValue. - * - * @attribute inputValue - * @type string - * @default '' - */ - inputValue: '', - - /** - * The value of the input committed by the user, either by changing the - * inputValue and blurring the input, or by hitting the `enter` key. - * - * @attribute value - * @type string - * @default '' - */ - value: '', - - /** - * Set the input type. Not supported for `multiline`. - * - * @attribute type - * @type string - * @default text - */ - type: 'text', - - /** - * If true, the input is invalid if its value is null. - * - * @attribute required - * @type boolean - * @default false - */ - required: false, - - /** - * A regular expression to validate the input value against. See - * https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation#Validation-related_attributes - * for more info. Not supported if `multiline` is true. - * - * @attribute pattern - * @type string - * @default '.*' - */ - // FIXME(yvonne): The default is set to .* because we can't bind to pattern such - // that the attribute is unset if pattern is null. - pattern: '.*', - - /** - * If set, the input is invalid if the value is less than this property. See - * https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation#Validation-related_attributes - * for more info. Not supported if `multiline` is true. - * - * @attribute min - */ - min: null, - - /** - * If set, the input is invalid if the value is greater than this property. See - * https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation#Validation-related_attributes - * for more info. Not supported if `multiline` is true. - * - * @attribute max - */ - max: null, - - /** - * If set, the input is invalid if the value is not `min` plus an integral multiple - * of this property. See - * https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation#Validation-related_attributes - * for more info. Not supported if `multiline` is true. - * - * @attribute step - */ - step: null, - - /** - * The maximum length of the input value. - * - * @attribute maxlength - * @type number - */ - maxlength: null, - - /** - * If this property is true, the text input's inputValue failed validation. - * - * @attribute invalid - * @type boolean - * @default false - */ - invalid: false - }, - - ready: function() { - this.handleTabindex(this.getAttribute('tabindex')); - }, - - invalidChanged: function() { - this.classList.toggle('invalid', this.invalid); - this.fire('input-'+ (this.invalid ? 'invalid' : 'valid'), {value: this.inputValue}); - }, - - inputValueChanged: function() { - this.updateValidity_(); - }, - - valueChanged: function() { - this.inputValue = this.value; - }, - - requiredChanged: function() { - this.updateValidity_(); - }, - - attributeChanged: function(attr, oldVal, curVal) { - if (attr === 'tabindex') { - this.handleTabindex(curVal); - } - }, - - handleTabindex: function(tabindex) { - if (tabindex > 0) { - this.$.input.setAttribute('tabindex', -1); - } else { - this.$.input.removeAttribute('tabindex'); - } - }, - - /** - * Commits the inputValue to value. - * - * @method commit - */ - commit: function() { - this.value = this.inputValue; - }, - - updateValidity_: function() { - if (this.$.input.willValidate) { - this.invalid = !this.$.input.validity.valid; - } - }, - - keydownAction: function() { - // for type = number, the value is the empty string unless the input is a valid number. - // FIXME(yvonne): check other types - if (this.type === 'number') { - this.async(function() { - this.updateValidity_(); - }); - } - }, - - inputChangeAction: function() { - this.commit(); - if (!window.ShadowDOMPolyfill) { - // re-fire event that does not bubble across shadow roots - this.fire('change', null, this); - } - }, - - focusAction: function(e) { - if (this.getAttribute('tabindex') > 0) { - // Forward focus to the inner input if tabindex is set on the element - // This will not cause an infinite loop because focus will not fire on the <input> - // again if it's already focused. - this.$.input.focus(); - } - }, - - inputFocusAction: function(e) { - if (window.ShadowDOMPolyfill) { - // re-fire non-bubbling event if polyfill - this.fire('focus', null, this, false); - } - }, - - inputBlurAction: function() { - if (window.ShadowDOMPolyfill) { - // re-fire non-bubbling event - this.fire('blur', null, this, false); - } - }, - - blur: function() { - // forward blur method to the internal input / textarea element - this.$.input.blur(); - }, - - click: function() { - // forward click method to the internal input / textarea element - this.$.input.click(); - }, - - focus: function() { - // forward focus method to the internal input / textarea element - this.$.input.focus(); - }, - - select: function() { - // forward select method to the internal input / textarea element - this.$.input.focus(); - }, - - setSelectionRange: function(selectionStart, selectionEnd, selectionDirection) { - // forward setSelectionRange method to the internal input / textarea element - this.$.input.setSelectionRange(selectionStart, selectionEnd, selectionDirection); - }, - - setRangeText: function(replacement, start, end, selectMode) { - // forward setRangeText method to the internal input element - if (!this.multiline) { - this.$.input.setRangeText(replacement, start, end, selectMode); - } - }, - - stepDown: function(n) { - // forward stepDown method to the internal input element - if (!this.multiline) { - this.$.input.stepDown(n); - } - }, - - stepUp: function(n) { - // forward stepUp method to the internal input element - if (!this.multiline) { - this.$.input.stepUp(n); - } - }, - - get willValidate() { - return this.$.input.willValidate; - }, - - get validity() { - return this.$.input.validity; - }, - - get validationMessage() { - return this.$.input.validationMessage; - }, - - checkValidity: function() { - var r = this.$.input.checkValidity(); - this.updateValidity_(); - return r; - }, - - setCustomValidity: function(message) { - this.$.input.setCustomValidity(message); - this.updateValidity_(); - } - - }); - </script> - -</polymer-element> diff --git a/third_party/polymer/components/core-input/demo.html b/third_party/polymer/components/core-input/demo.html deleted file mode 100644 index c519f8e..0000000 --- a/third_party/polymer/components/core-input/demo.html +++ /dev/null @@ -1,133 +0,0 @@ -<!doctype html> -<html> -<head> - <meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no"> - - <title>core-input</title> - - <script src="../platform/platform.js"></script> - - <link href="core-input.html" rel="import"> - - <style> - body { - padding: 24px; - margin: 0; - -webkit-transform: translateZ(0); - font-family: sans-serif; - font-size: 16px; - } - - section { - margin: 2em 0; - } - - aside { - background: #ccc; - padding: 1em; - margin-right: 2em; - font-size: 12px; - width: 250px; - border-radius: 3px; - } - - core-input { - margin: 1em; - } - - core-input[multiline] { - border: 1px dotted #ccc; - } - - core-input.sized { - width: 500px; - height: 200px; - } - - .validation core-input, - .validation core-input[multiline] { - border: solid 1px lime; - } - - .validation core-input.invalid, - .validation core-input[multiline].invalid { - border: solid 1px red; - } - - </style> - -</head> -<body> - - <section horizontal start layout> - <aside>A single-line text input. See console for committed values.</aside> - <core-input id="single" placeholder="Type something..."></core-input> - <script> - var single = document.getElementById('single'); - single.addEventListener('change', function() { - console.log('single: value committed: ', single.value); - }); - </script> - </section> - - <section horizontal start layout> - <aside>The <code>type</code> attribute is supported. This is a single-line input with <code>type = password</code>. See console for committed values.</aside> - <core-input id="password" type="password" placeholder="Enter password..."></core-input> - <script> - var password = document.getElementById('password'); - password.addEventListener('change', function() { - console.log('password: value committed: ', password.value); - }); - </script> - </section> - - <section horizontal start layout> - <aside>A multi-line text input with 3 rows. The input is normally unstyled but here is styled with a dotted border to show its size.</aside> - <core-input multiline rows="3" placeholder="Type many lines here..."></core-input> - </section> - - <section horizontal start layout> - <aside>A multi-line text input sized with CSS. The input is normally unstyled but here is styled with a dotted border to show its size.</aside> - <core-input class="sized" multiline rows="fit" placeholder="This input is 500px * 200px"></core-input> - </section> - - <section horizontal start layout> - <aside>Inputs with the <code>tabindex</code> attribute.</aside> - <div> - <core-input tabindex="2" placeholder="tabindex = 2"></core-input> - <br> - <core-input tabindex="3" placeholder="tabindex = 3"></core-input> - <br> - <core-input tabindex="1" placeholder="tabindex = 1"></core-input> - </div> - </section> - - <section horizontal start layout> - <aside>Validation examples. The border color reflects the current validation state. See console for validation events.</aside> - <div class="validation"> - <core-input id="validate-number" type="number" placeholder="type = number"></core-input> - <br> - <core-input id="validate-email" type="email" placeholder="type = email"></core-input> - <br> - <core-input id="validate-required" required placeholder="required"></core-input> - <br> - <core-input id="validate-ml-required" multiline rows="3" required placeholder="required (multiline)"></core-input> - <br> - <core-input id="validate-pattern" pattern="a*bc" placeholder="with pattern = a*bc"></core-input> - <br> - <core-input id="validate-min-max" type="number" min="5" max="10" placeholder="type = number, min = 5, max = 10"></core-input> - <br> - <core-input id="validate-step" type="number" step="2" placeholder="type = number, step = 2"></core-input> - </div> - <script> - document.querySelector('.validation').addEventListener('input-invalid', function(e, value, s) { - console.log(e.target.id, 'invalid, inputValue:', e.detail.value, e.target.validity); - }); - document.querySelector('.validation').addEventListener('input-valid', function(e, value, s) { - console.log(e.target.id, 'valid, inputValue:', e.detail.value, e.target.validity); - }); - </script> - </section> - - -</body> diff --git a/third_party/polymer/components/core-input/index.html b/third_party/polymer/components/core-input/index.html deleted file mode 100644 index 58856f3..0000000 --- a/third_party/polymer/components/core-input/index.html +++ /dev/null @@ -1,22 +0,0 @@ -<!doctype html> -<!-- -Copyright (c) 2014 The Polymer Project Authors. All rights reserved. -This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE -The complete set of authors may be found at http://polymer.github.io/AUTHORS -The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS -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 ---> -<html> -<head> - - <script src="../platform/platform.js"></script> - <link rel="import" href="../core-component-page/core-component-page.html"> - -</head> -<body unresolved> - - <core-component-page></core-component-page> - -</body> -</html> diff --git a/third_party/polymer/components/core-input/metadata.html b/third_party/polymer/components/core-input/metadata.html deleted file mode 100644 index 01f69bb..0000000 --- a/third_party/polymer/components/core-input/metadata.html +++ /dev/null @@ -1,11 +0,0 @@ -<x-meta id="core-input" label="Input" group="Core" isEditor> - - <template> - <core-input placeholder="Type something..." style="padding: 15px;"></core-input> - </template> - - <template id="imports"> - <link rel="import" href="core-input.html"> - </template> - -</x-meta> diff --git a/third_party/polymer/components/core-item/.bower.json b/third_party/polymer/components/core-item/.bower.json deleted file mode 100644 index a498db0..0000000 --- a/third_party/polymer/components/core-item/.bower.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "name": "core-item", - "private": true, - "dependencies": { - "core-icon": "Polymer/core-icon#>=0.3.0 <1.0.0", - "core-icons": "Polymer/core-icons#>=0.3.0 <1.0.0" - }, - "homepage": "https://github.com/Polymer/core-item", - "version": "0.3.5", - "_release": "0.3.5", - "_resolution": { - "type": "version", - "tag": "0.3.5", - "commit": "9d4c6a97a7e70ebfb62bd9266892cfe13de7b70b" - }, - "_source": "git://github.com/Polymer/core-item.git", - "_target": "0.3.5", - "_originalSource": "Polymer/core-item" -}
\ No newline at end of file diff --git a/third_party/polymer/components/core-item/README.md b/third_party/polymer/components/core-item/README.md deleted file mode 100644 index ab1d0cd..0000000 --- a/third_party/polymer/components/core-item/README.md +++ /dev/null @@ -1,4 +0,0 @@ -core-item -========= - -See the [component page](http://polymer-project.org/docs/elements/core-elements.html#core-item) for more information. diff --git a/third_party/polymer/components/core-item/bower.json b/third_party/polymer/components/core-item/bower.json deleted file mode 100644 index 4b46e03..0000000 --- a/third_party/polymer/components/core-item/bower.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "name": "core-item", - "private": true, - "dependencies": { - "core-icon": "Polymer/core-icon#>=0.3.0 <1.0.0", - "core-icons": "Polymer/core-icons#>=0.3.0 <1.0.0" - } -}
\ No newline at end of file diff --git a/third_party/polymer/components/core-item/core-item.css b/third_party/polymer/components/core-item/core-item.css deleted file mode 100644 index fa13705..0000000 --- a/third_party/polymer/components/core-item/core-item.css +++ /dev/null @@ -1,41 +0,0 @@ -/* -Copyright (c) 2014 The Polymer Project Authors. All rights reserved. -This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt -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 -*/ - -html /deep/ core-item { - display: block; - position: relative; - min-height: 40px; - white-space: nowrap; -} - -html /deep/ core-item.font-scalable { - min-height: 2.5em; -} - -html /deep/ core-item.core-selected { - font-weight: bold; -} - -html /deep/ core-item::shadow core-icon { - margin: 0 16px 0 4px; -} - -html /deep/ core-item.font-scalable::shadow core-icon { - margin: 0 1em 0 0.25em; - height: 1.5em; - width: 1.5em; -} - -html /deep/ core-item::shadow ::content > a { - position: absolute; - top: 0; - right: 0; - bottom: 0; - left: 0; -} diff --git a/third_party/polymer/components/core-item/core-item.html b/third_party/polymer/components/core-item/core-item.html deleted file mode 100644 index e8868cb..0000000 --- a/third_party/polymer/components/core-item/core-item.html +++ /dev/null @@ -1,74 +0,0 @@ -<!-- -Copyright (c) 2014 The Polymer Project Authors. All rights reserved. -This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt -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 ---> - -<!-- -`core-item` is a simple line-item object: a label and/or an icon that can also -act as a link. - -Example: - - <core-item icon="settings" label="Settings"></core-item> - -To use as a link, put <a> element in the item. - -Example: - - <core-item icon="settings" label="Settings"> - <a href="#settings" target="_self"></a> - </core-item> - -@group Polymer Core Elements -@element core-item -@homepage github.io ---> - -<link rel="import" href="../core-icon/core-icon.html"> - -<link rel="stylesheet" href="core-item.css" shim-shadowdom> - -<polymer-element name="core-item" attributes="label icon src" horizontal center layout> -<template> - - <core-icon src="{{src}}" icon="{{icon}}" hidden?="{{!src && !icon}}"></core-icon> - <div id="label">{{label}}</div> - <content></content> - -</template> -<script> - - Polymer('core-item', { - - /** - * The URL of an image for the icon. - * - * @attribute src - * @type string - * @default '' - */ - - /** - * Specifies the icon from the Polymer icon set. - * - * @attribute icon - * @type string - * @default '' - */ - - /** - * Specifies the label for the menu item. - * - * @attribute label - * @type string - * @default '' - */ - - }); - -</script> -</polymer-element> diff --git a/third_party/polymer/components/core-item/demo.html b/third_party/polymer/components/core-item/demo.html deleted file mode 100644 index 9f1b6f4..0000000 --- a/third_party/polymer/components/core-item/demo.html +++ /dev/null @@ -1,83 +0,0 @@ -<!doctype html> -<html> -<head> - - <title>core-item</title> - - <script src="../platform/platform.js"></script> - - <link rel="import" href="../core-icons/core-icons.html"> - <link rel="import" href="core-item.html"> - - <style> - - body { - font-family: sans-serif; - font-size: 16px; - margin: 20px; - } - - core-item { - width: 300px; - } - - core-item.big { - font-size: 24px; - } - - core-item.small { - font-size: 12px; - } - - core-item.contact-item { - height: 50px; - background-color: #efefef; - border: 1px solid #ddd; - } - - core-item.contact-item .name { - font-size: 1.125em; - } - - core-item.contact-item .address { - font-size: 0.75em; - } - - </style> - -</head> -<body unresolved> - - <h2>items with icon and label:</h2> - - <core-item icon="settings" label="Settings"></core-item> - <core-item icon="account-box" label="Account"></core-item> - - <h2>items with label only:</h2> - - <core-item label="Settings"></core-item> - <core-item label="Account"></core-item> - - <h2>links (via <a>):</h2> - - <core-item icon="settings" label="Settings"><a href="#settings" target="_self"></a></core-item> - <core-item icon="account-box" label="Account"><a href="#account" target="_self"></a></core-item> - - <h2>items sized with CSS:</h2> - <core-item icon="settings" label="Settings" class="font-scalable big"></core-item> - <core-item icon="account-box" label="Account" class="font-scalable big"></core-item> - <core-item icon="settings" label="Settings" class="font-scalable small"></core-item> - <core-item icon="account-box" label="Account" class="font-scalable small"></core-item> - - <h2>custom item:</h2> - - <core-item icon="account-circle" class="contact-item"> - <div flex> - <div class="name">John Doe</div> - <div class="address">123 A Street, San Francisco, CA</div> - </div> - <core-icon icon="more-vert"></core-icon> - </core-item> - -</body> -</html> diff --git a/third_party/polymer/components/core-item/index.html b/third_party/polymer/components/core-item/index.html deleted file mode 100644 index 58856f3..0000000 --- a/third_party/polymer/components/core-item/index.html +++ /dev/null @@ -1,22 +0,0 @@ -<!doctype html> -<!-- -Copyright (c) 2014 The Polymer Project Authors. All rights reserved. -This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE -The complete set of authors may be found at http://polymer.github.io/AUTHORS -The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS -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 ---> -<html> -<head> - - <script src="../platform/platform.js"></script> - <link rel="import" href="../core-component-page/core-component-page.html"> - -</head> -<body unresolved> - - <core-component-page></core-component-page> - -</body> -</html> diff --git a/third_party/polymer/components/core-item/metadata.html b/third_party/polymer/components/core-item/metadata.html deleted file mode 100644 index 63e7979..0000000 --- a/third_party/polymer/components/core-item/metadata.html +++ /dev/null @@ -1,15 +0,0 @@ -<x-meta id="core-item" label="Item" group="Core"> - - <template> - - <core-item icon="settings" label="Item"></core-item> - - </template> - - <template id="imports"> - - <link rel="import" href="core-item.html"> - - </template> - -</x-meta>
\ No newline at end of file diff --git a/third_party/polymer/components/core-layout-grid/.bower.json b/third_party/polymer/components/core-layout-grid/.bower.json deleted file mode 100644 index dc5bd26..0000000 --- a/third_party/polymer/components/core-layout-grid/.bower.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "name": "core-layout-grid", - "private": true, - "dependencies": { - "polymer": "Polymer/polymer#>=0.3.0 <1.0.0" - }, - "homepage": "https://github.com/Polymer/core-layout-grid", - "version": "0.3.5", - "_release": "0.3.5", - "_resolution": { - "type": "version", - "tag": "0.3.5", - "commit": "1ecfd18678529b78f08230da6166c330fe39bc03" - }, - "_source": "git://github.com/Polymer/core-layout-grid.git", - "_target": "0.3.5", - "_originalSource": "Polymer/core-layout-grid" -}
\ No newline at end of file diff --git a/third_party/polymer/components/core-layout-grid/README.md b/third_party/polymer/components/core-layout-grid/README.md deleted file mode 100644 index e612651..0000000 --- a/third_party/polymer/components/core-layout-grid/README.md +++ /dev/null @@ -1,4 +0,0 @@ -core-layout-grid -================ - -See the [component page](http://polymer-project.org/docs/elements/core-elements.html#core-layout-grid) for more information. diff --git a/third_party/polymer/components/core-layout-grid/bower.json b/third_party/polymer/components/core-layout-grid/bower.json deleted file mode 100644 index 844907a..0000000 --- a/third_party/polymer/components/core-layout-grid/bower.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "name": "core-layout-grid", - "private": true, - "dependencies": { - "polymer": "Polymer/polymer#>=0.3.0 <1.0.0" - } -}
\ No newline at end of file diff --git a/third_party/polymer/components/core-layout-grid/core-layout-grid.html b/third_party/polymer/components/core-layout-grid/core-layout-grid.html deleted file mode 100644 index 25b1c88..0000000 --- a/third_party/polymer/components/core-layout-grid/core-layout-grid.html +++ /dev/null @@ -1,350 +0,0 @@ -<!-- -Copyright (c) 2014 The Polymer Project Authors. All rights reserved. -This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt -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 ---> - - -<!-- -@group Polymer Core Elements - -@element core-layout-grid -@status beta -@homepage github.io - -TODO ---> -<link rel="import" href="../polymer/polymer.html"> - -<polymer-element name="core-layout-grid" attributes="nodes layout auto"> -<script> - (function() { - - Polymer('core-layout-grid', { - - nodes: null, - layout: null, - auto: false, - - created: function() { - this.layout = []; - }, - - nodesChanged: function() { - this.invalidate(); - }, - - layoutChanged: function() { - this.invalidate(); - }, - - autoNodes: function() { - this.nodes = this.parentNode.children.array().filter( - function(node) { - switch(node.localName) { - case 'core-layout-grid': - case 'style': - return false; - } - return true; - } - ); - }, - - invalidate: function() { - if (this.layout && this.layout.length) { - // job debounces layout, only letting it occur every N ms - this.layoutJob = this.job(this.layoutJob, this.relayout); - } - }, - - relayout: function() { - if (!this.nodes || this.auto) { - this.autoNodes(); - } - layout(this.layout, this.nodes); - this.asyncFire('core-layout'); - } - - }); - - // - - var lineParent; - - function line(axis, p, d) { - var l = document.createElement('line'); - var extent = (axis === 'left' ? 'width' : - (axis === 'top' ? 'height' : axis)); - l.setAttribute('extent', extent); - if (d < 0) { - axis = (axis === 'left' ? 'right' : - (axis === 'top' ? 'bottom' : axis)); - } - p = Math.abs(p); - l.style[axis] = p + 'px'; - l.style[extent] = '0px'; - lineParent.appendChild(l); - } - - var colCount, colOwners, rowCount, rowOwners; - - function matrixillate(matrix) { - // mesaure the matrix, must be rectangular - rowCount = matrix.length; - colCount = rowCount && matrix[0].length || 0; - // transpose matrix - var transpose = []; - for (var i=0; i<colCount; i++) { - var c = []; - for (var j=0; j<rowCount; j++) { - c.push(matrix[j][i]); - } - transpose.push(c); - } - // assign sizing control - colOwners = findOwners(matrix); - rowOwners = findOwners(transpose); - //console.log('colOwners', colOwners); - //console.log('rowOwners', rowOwners); - } - - function findOwners(matrix) { - var majCount = matrix.length; - var minCount = majCount && matrix[0].length || 0; - var owners = []; - // for each column (e.g.) - for (var i=0; i<minCount; i++) { - // array of contained areas - var contained = {}; - // look at each row to find a containing area - for (var j=0; j<majCount; j++) { - // get the row vector - var vector = matrix[j] - // node index at [i,j] - var nodei = vector[i]; - // if a node is there - if (nodei) { - // determine if it bounds this column - var owns = false; - if (i === 0) { - owns = (i === minCount-1) || (nodei !== vector[i+1]); - } else if (i === minCount - 1) { - owns = (i === 0) || (nodei !== vector[i-1]); - } else { - owns = nodei !== vector[i-1] && nodei !== vector[i+1]; - } - if (owns) { - contained[nodei] = 1; - } - } - // store the owners for this column - owners[i] = contained; - } - } - return owners; - } - - var nodes; - - function colWidth(i) { - for (var col in colOwners[i]) { - col = Number(col); - if (col === 0) { - return 96; - } - var node = nodes[col - 1]; - if (node.hasAttribute('h-flex') || node.hasAttribute('flex')) { - return -1; - } - var w = node.offsetWidth; - //console.log('colWidth(' + i + ') ==', w); - return w; - } - return -1; - } - - function rowHeight(i) { - for (var row in rowOwners[i]) { - row = Number(row); - if (row === 0) { - return 96; - } - var node = nodes[row - 1]; - if (node.hasAttribute('v-flex') || node.hasAttribute('flex')) { - return -1; - } - var h = node.offsetHeight; - //console.log('rowHeight(' + i + ') ==', h); - return h; - } - return -1; - } - - var m = 0; - - function railize(count, sizeFn) { - // - // create rails for `count` tracks using - // sizing function `sizeFn(trackNo)` - // - // for n tracks there are (n+1) rails - // - // |track|track|track| - // 0|->sz0|->sz1|<-sz2|0 - // - // |track|track|track| - // 0|->sz0| |<-sz2|0 - // - // there can be one elastic track per set - // - // |track|track|track|track| - // 0|-->s0|-->s1|<--s1|<--s2|0 - // - // sz1 spans multiple tracks which makes - // it elastic (it's underconstrained) - // - var rails = []; - var a = 0; - for (var i=0, x; i<count; i++) { - rails[i] = {p: a, s: 1}; - x = sizeFn(i) + m + m; - if (x == -1) { - break; - } - a += x; - } - if (i === count) { - rails[i] = {p: 0, s: -1}; - } - var b = 0; - for (var ii=count, x; ii>i; ii--) { - rails[ii] = {p: b, s: -1}; - x = sizeFn(ii - 1) + m + m; - if (x !== -1) { - b += x; - } - } - return rails; - } - - // TODO(sjmiles): this code tries to preserve actual position, - // so 'unposition' is really 'naturalize' or something - function unposition(box) { - var style = box.style; - //style.right = style.bottom = style.width = style.height = ''; - style.position = 'absolute'; - style.display = 'inline-block'; - style.boxSizing = style.mozBoxSizing = 'border-box'; - } - - function _position(style, maj, min, ext, a, b) { - style[maj] = style[min] = ''; - style[ext] = 'auto'; - if (a.s < 0 && b.s < 0) { - var siz = a.p - b.p - m - m; - style[ext] = siz + 'px'; - var c = 'calc(100% - ' + (b.p + siz + m) + 'px' + ')'; - style[maj] = '-webkit-' + c; - style[maj] = c; - } else if (b.s < 0) { - style[maj] = a.p + m + 'px'; - style[min] = b.p + m + 'px'; - } else { - style[maj] = a.p + m + 'px'; - style[ext] = b.p - a.p - m - m + 'px'; - } - } - - function position(elt, left, right, top, bottom) { - _position(elt.style, 'top', 'bottom', 'height', rows[top], - rows[bottom]); - _position(elt.style, 'left', 'right', 'width', columns[left], - columns[right]); - } - - function layout(matrix, anodes, alineParent) { - //console.group('layout'); - - lineParent = alineParent; - nodes = anodes; - matrixillate(matrix); - - nodes.forEach(unposition); - - columns = railize(colCount, colWidth); - rows = railize(rowCount, rowHeight); - - if (alineParent) { - //console.group('column rails'); - columns.forEach(function(c) { - //console.log(c.p, c.s); - line('left', c.p, c.s); - }); - //console.groupEnd(); - - //console.group('row rails'); - rows.forEach(function(r) { - //console.log(r.p, r.s); - line('top', r.p, r.s); - }); - //console.groupEnd(); - } - - //console.group('rail boundaries'); - nodes.forEach(function(node, i) { - // node indices are 1-based - var n = i + 1; - // boundary rails - var l, r, t = 1e10, b = -1e10; - matrix.forEach(function(vector, i) { - var f = vector.indexOf(n); - if (f > -1) { - l = f; - r = vector.lastIndexOf(n) + 1; - t = Math.min(t, i); - b = Math.max(b, i) + 1; - } - }); - if (l == undefined) { - //console.log('unused'); - node.style.position = 'absolute'; - var offscreen = node.getAttribute('offscreen'); - switch (offscreen) { - case 'basement': - node.style.zIndex = 0; - break; - case 'left': - case 'top': - node.style[offscreen] = node.offsetWidth * -2 + 'px'; - break; - case 'right': - node.style.left = node.offsetParent.offsetWidth - + node.offsetWidth + 'px'; - break; - case 'bottom': - node.style.top = node.parentNode.offsetHeight - + node.offsetHeight + 'px'; - break; - default: - node.style[Math.random() >= 0.5 ? 'left' : 'top'] = '-110%'; - } - //node.style.opacity = 0; - node.style.pointerEvents = 'none'; - } else { - node.style.pointerEvents = ''; - //node.style.opacity = ''; - //console.log(l, r, t, b); - position(node, l, r, t, b); - } - }); - //console.groupEnd(); - //console.groupEnd(); - } - - })(); -</script> -</polymer-element>
\ No newline at end of file diff --git a/third_party/polymer/components/core-layout-grid/demo.html b/third_party/polymer/components/core-layout-grid/demo.html deleted file mode 100644 index c03fb4e..0000000 --- a/third_party/polymer/components/core-layout-grid/demo.html +++ /dev/null @@ -1,107 +0,0 @@ -<!doctype html> -<html> -<head> - - <title>core-layout-grid example</title> - - <script src="../platform/platform.js"></script> - - <link rel="import" href="core-layout-grid.html"> - - <style> - body { - font-family: sans-serif; - overflow: hidden; - } - </style> - -</head> -<body unresolved> - - <grid-test></grid-test> - - <polymer-element name="grid-test" on-tap="{{rotate}}"> - <template> - - <style> - * { - -webkit-transition: top, right, bottom, left; - -webkit-transition-duration: 0.3s; - } - - panel { - display: inline-block; - border: 4px dotted lightblue; - padding: 16px; - background-color: whitesmoke; - } - - #outputToolbar { - width: 400px; - } - - #output { - width: 400px; - } - - #workspace { - border-color: orange; - } - </style> - - <core-layout-grid nodes="{{nodes}}" layout="{{layout}}"></core-layout-grid> - - <panel id="toolbar">toolbar (click to rotate)</panel> - <panel id="sidebar">sidebar</panel> - <panel id="workspace">workspace</panel> - <panel id="outputToolbar">otherbar</panel> - <panel id="output"> - output - <h2>Documentation</h2> - <h1>Verbiage</h1> - <p>In backbone record integer LED amplified internet protocol a extension reflective. - Array kilohertz LED. Wavelength extension patch supporting wave an by prompt.</p> - </panel> - - </template> - <script> - - Polymer('grid-test', { - arrangements: [[ - [1, 1, 1, 1], - [2, 3, 3, 4], - [2, 3, 3, 5] - ], [ - [4, 3, 2], - [5, 3, 2], - [5, 1, 1] - ], [ - [1, 1], - [2, 3], - [4, 3] - ]], - - outputLayout: 0, - - ready: function() { - this.outputLayoutChanged(); - }, - - outputLayoutChanged: function() { - this.layout = this.arrangements[this.outputLayout]; - }, - - toggleLayout: function() { - this.outputLayout = (this.outputLayout + 1) % this.arrangements.length; - }, - - rotate: function() { - this.toggleLayout(); - } - }); - - </script> - </polymer-element> - -</body> -</html> diff --git a/third_party/polymer/components/core-layout-grid/index.html b/third_party/polymer/components/core-layout-grid/index.html deleted file mode 100644 index 58856f3..0000000 --- a/third_party/polymer/components/core-layout-grid/index.html +++ /dev/null @@ -1,22 +0,0 @@ -<!doctype html> -<!-- -Copyright (c) 2014 The Polymer Project Authors. All rights reserved. -This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE -The complete set of authors may be found at http://polymer.github.io/AUTHORS -The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS -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 ---> -<html> -<head> - - <script src="../platform/platform.js"></script> - <link rel="import" href="../core-component-page/core-component-page.html"> - -</head> -<body unresolved> - - <core-component-page></core-component-page> - -</body> -</html> diff --git a/third_party/polymer/components/core-layout-grid/metadata.html b/third_party/polymer/components/core-layout-grid/metadata.html deleted file mode 100644 index cdf11b3..0000000 --- a/third_party/polymer/components/core-layout-grid/metadata.html +++ /dev/null @@ -1,13 +0,0 @@ -<x-meta id="core-layout-grid" label="Layout: Grid" group="Core" isContainer> - - <template> - <core-layout-grid></core-layout-grid> - </template> - - <property name="layout" kind="json"></property> - - <template id="imports"> - <link rel="import" href="core-layout-grid.html"> - </template> - -</x-meta> diff --git a/third_party/polymer/components/core-layout-trbl/.bower.json b/third_party/polymer/components/core-layout-trbl/.bower.json deleted file mode 100644 index 8a2b441..0000000 --- a/third_party/polymer/components/core-layout-trbl/.bower.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "name": "core-layout-trbl", - "private": true, - "dependencies": { - "polymer": "Polymer/polymer#>=0.3.0 <1.0.0" - }, - "homepage": "https://github.com/Polymer/core-layout-trbl", - "version": "0.3.5", - "_release": "0.3.5", - "_resolution": { - "type": "version", - "tag": "0.3.5", - "commit": "cf7dd6a4371b2fcdd396599d006c412a86ff606f" - }, - "_source": "git://github.com/Polymer/core-layout-trbl.git", - "_target": "0.3.5", - "_originalSource": "Polymer/core-layout-trbl" -}
\ No newline at end of file diff --git a/third_party/polymer/components/core-layout-trbl/README.md b/third_party/polymer/components/core-layout-trbl/README.md deleted file mode 100644 index 438ccc4..0000000 --- a/third_party/polymer/components/core-layout-trbl/README.md +++ /dev/null @@ -1,4 +0,0 @@ -core-layout-trbl -================ - -See the [component page](http://polymer-project.org/docs/elements/core-elements.html#core-layout-trbl) for more information. diff --git a/third_party/polymer/components/core-layout-trbl/bower.json b/third_party/polymer/components/core-layout-trbl/bower.json deleted file mode 100644 index 84ca4c5..0000000 --- a/third_party/polymer/components/core-layout-trbl/bower.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "name": "core-layout-trbl", - "private": true, - "dependencies": { - "polymer": "Polymer/polymer#>=0.3.0 <1.0.0" - } -}
\ No newline at end of file diff --git a/third_party/polymer/components/core-layout-trbl/core-layout-trbl.html b/third_party/polymer/components/core-layout-trbl/core-layout-trbl.html deleted file mode 100644 index c9ea2c6..0000000 --- a/third_party/polymer/components/core-layout-trbl/core-layout-trbl.html +++ /dev/null @@ -1,269 +0,0 @@ -<!-- -Copyright (c) 2014 The Polymer Project Authors. All rights reserved. -This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt -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 ---> - -<!-- -`<core-layout-trbl>` arranges nodes horizontally via absolute positioning. -Set the `vertical` attribute (boolean) to arrange vertically instead. - -`<core-layout-trbl>` arranges it's <b>sibling elements</b>, not -it's children. - -One arranged node may be marked as elastic by giving it a `flex` -attribute (boolean). - -You may remove a node from layout by giving it a `nolayout` -attribute (boolean). - -CSS Notes: - -`padding` is ignored on the parent node. -`margin` is ignored on arranged nodes. -`min-width` is ignored on arranged nodes, use `min-width` on the parent node -instead. - -Example: - -Arrange three `div` into columns. `flex` attribute on Column Two makes that -column elastic. - - <core-layout-trbl></core-layout-trbl> - <div>Column One</div> - <div flex>Column Two</div> - <div>Column Three</div> - -Remember that `<core-layout-trbl>` arranges it's sibling elements, not it's children. - -If body has width 52 device pixels (in this case, ascii characters), call that 52px. -Column One has it's natural width of 12px (including border), Column Three has it's -natural width of 14px, body border uses 2px, and Column Two automatically uses the -remaining space: 24px. - - |- 52px -| - ---------------------------------------------------- - ||Column One|| Column Two ||Column Three|| - ---------------------------------------------------- - |- 12px -||- (24px) -|| 14px -| - -As the parent node resizes, the elastic column reacts via CSS to adjust it's size. -No javascript is used during parent resizing, for best performance. - -Changes in content or sibling size are not handled automatically. - - ---------------------------------------------------------------- - ||Column One| Column Two |Column Three|| - ---------------------------------------------------------------- - - -------------------------------------- - ||Column One|Column Two|Column Three|| - -------------------------------------- - -Arrange in rows by adding the `vertical` attribute. - -Example: - - <core-layout-trbl vertical></core-layout-trbl> - <div>Row One</div> - <div flex>Row Two</div> - <div>Row Three</div> - -This setup will cause Row Two to stretch to fill the container. - - ----------- ----------- - |---------| |---------| - | | | | - |Row One | |Row One | - | | | | - |---------| |---------| - | | | | - |Row Two | |Row Two | - | | | | - |---------| | | - | | | | - |Row Three| | | - | | |---------| - |---------| | | - ----------- |Row Three| - | | - |---------| - |---------| - -Layouts can be nested arbitrarily. - - <core-layout-trbl></core-layout-trbl> - <div>Menu</div> - <div flex> - <core-layout-trbl vertical></core-layout-trbl> - <div>Title</div> - <div>Toolbar</div> - <div flex>Main</div> - <div>Footer</div> - </div> - -Renders something like this - - -------------------------------- - ||Menu ||Title || - || ||-----------------|| - || ||Toolbar || - || ||-----------------|| - || ||Main || - || || || - || ||-----------------|| - || ||Footer || - -------------------------------- - -@group Polymer Core Elements -@element core-layout-trbl ---> -<link rel="import" href="../polymer/polymer.html"> - -<polymer-element name="core-layout-trbl" attributes="vertical"> - - <template> - - <style> - :host { - display: none; - } - </style> - - </template> - - <script> - - Polymer('core-layout-trbl', { - - vertical: false, - - ready: function() { - this.setAttribute('nolayout', ''); - }, - - attached: function() { - this.asyncMethod(function() { - this.prepare(); - this.layout(); - }); - }, - - prepare: function() { - var parent = this.parentNode.host || this.parentNode; - // explicit position harmful on <body> - if (parent.localName !== 'body') { - // may recalc - var cs = window.getComputedStyle(parent); - if (cs.position === 'static') { - parent.style.position = 'relative'; - } - //parent.style.overflow = 'hidden'; - } - // changes will cause another recalc at next validation step - var stylize = this.stylize, vertical; - this.parentNode.childNodes.array().forEach(function(c, i) { - if (c.nodeType === Node.ELEMENT_NODE && !c.hasAttribute('nolayout')) { - stylize(c, { - position: 'absolute', - boxSizing: 'border-box', - MozBoxSizing: 'border-box', - }); - // test for auto-vertical - if (vertical === undefined) { - vertical = (c.offsetWidth == 0 && c.offsetHeight !== 0); - } - } - }); - this.vertical = this.vertical || vertical; - }, - - /** - * Arrange sibling nodes end-to-end in one dimension. - * - * Arrangement is horizontal unless the `vertical` - * attribute is applied on this node. - * - * @method layout - */ - layout: function() { - var parent = this.parentNode.host || this.parentNode; - var vertical = this.vertical; - var ww = 0, hh = 0, pre = [], fit, post = []; - var list = pre; - // gather element information (at most one recalc) - this.parentNode.childNodes.array().forEach(function(c, i) { - if (c.nodeType===Node.ELEMENT_NODE && !c.hasAttribute('nolayout')) { - var info = { - element: c, - w: c.offsetWidth, - h: c.offsetHeight - }; - if (!c.hasAttribute('fit') && !c.hasAttribute('flex')) { - ww += c.offsetWidth; - hh += c.offsetHeight; - list.push(info); - } else { - fit = c; - list = post; - ww = hh = 0; - } - } - }); - // update layout styles (invalidate, no recalc) - var v = 0; - var mxp = 0, myp = 0; - var stylize = this.stylize; - pre.forEach(function(info) { - if (vertical) { - stylize(info.element, { - top: v + 'px', right: mxp, height: info.h + 'px', left: mxp - }); - } else { - stylize(info.element, { - top: myp, width: info.w + 'px', bottom: myp, left: v + 'px' - }); - } - v += vertical ? info.h : info.w; - }); - if (fit) { - if (vertical) { - stylize(fit, { - top: v + 'px', right: mxp, bottom: hh + 'px', left: mxp - }); - } else { - stylize(fit, { - top: myp, right: ww + 'px', bottom: myp, left: v + 'px' - }); - } - v = vertical ? hh : ww; - post.forEach(function(info) { - v -= vertical ? info.h : info.w; - if (vertical) { - stylize(info.element, { - height: info.h + 'px', right: mxp, bottom: v + 'px', left: mxp - }); - } else { - stylize(info.element, { - top: myp, right: v + 'px', bottom: myp, width: info.w + 'px' - }); - } - }); - } - }, - - stylize: function(element, styles) { - var style = element.style; - Object.keys(styles).forEach(function(k){ - style[k] = styles[k]; - }); - } - - }); - - </script> - -</polymer-element> diff --git a/third_party/polymer/components/core-layout-trbl/core-slide.html b/third_party/polymer/components/core-layout-trbl/core-slide.html deleted file mode 100644 index 92f158e..0000000 --- a/third_party/polymer/components/core-layout-trbl/core-slide.html +++ /dev/null @@ -1,181 +0,0 @@ -<!-- -Copyright (c) 2014 The Polymer Project Authors. All rights reserved. -This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt -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 ---> - -<link rel="import" href="../polymer/polymer.html"> - -<polymer-element name="core-slide" attributes="open closed vertical target targetId"> - - <template> - - <style> - :host { - display: none; - } - </style> - - </template> - - <script> - - Polymer('core-slide', { - - closed: false, - open: true, - vertical: false, - targetId: '', - target: null, - - ready: function() { - this.setAttribute('nolayout', ''); - }, - - attached: function() { - this.target = this.parentNode; - }, - - targetIdChanged: function() { - var p = this.parentNode; - while (p.parentNode) {p = p.parentNode;}; - this.target = p.querySelector('#' + this.targetId); - }, - - targetChanged: function() { - if (this.closed) { - this.asyncMethod(this.update); - } - }, - - toggle: function() { - this.open = !this.open; - }, - - closedChanged: function() { - this.open = !this.closed; - }, - - openChanged: function() { - this.asyncMethod(this.update); - }, - - update: function() { - this.closed = !this.open; - if (this.target) { - if (this.vertical) { - if (this.target.style.top !== '') { - this.updateTop(); - } else { - this.updateBottom(); - } - } else { - if (this.target.style.left !== '') { - this.updateLeft(); - } else { - this.updateRight(); - } - } - } - }, - - updateLeft: function() { - var w = this.target.offsetWidth; - var l = this.open ? 0 : -w; - this.target.style.left = l + 'px'; - var s = this.target.nextElementSibling; - while (s) { - if (!s.hasAttribute('nolayout')) { - if (s.style.left === '' && s.style.right !== '') { - break; - } - l += w; - s.style.left = l + 'px'; - w = s.offsetWidth; - } - s = s.nextElementSibling; - } - }, - - updateRight: function() { - var w = this.target.offsetWidth; - var r = this.open ? 0 : -w; - this.target.style.right = r + 'px'; - //var s = this.target.previousElementSibling; - var s = previousElementSibling(this.target); - while (s) { - if (!s.hasAttribute('nolayout')) { - if (s.style.right === '' && s.style.left !== '') { - break; - } - r += w; - s.style.right = r + 'px'; - w = s.offsetWidth; - } - //if (s == s.previousElementSibling) { - // console.error(s.localName + ' is its own sibling', s); - // break; - //} - //s = s.previousElementSibling; - s = previousElementSibling(s); - } - }, - - updateTop: function() { - var h = this.target.offsetHeight; - var t = this.open ? 0 : -h; - this.target.style.top = t + 'px'; - var s = this.target.nextElementSibling; - while (s) { - if (!s.hasAttribute('nolayout')) { - if (s.style.top === '' && s.style.bottom !== '') { - break; - } - t += h; - s.style.top = t + 'px'; - h = s.offsetHeight; - } - s = s.nextElementSibling; - } - }, - - updateBottom: function() { - var h = this.target.offsetHeight; - var b = this.open ? 0 : -h; - this.target.style.bottom = b + 'px'; - //var s = this.target.previousElementSibling; - var s = previousElementSibling(this.target); - while (s) { - if (!s.hasAttribute('nolayout')) { - if (s.style.bottom === '' && s.style.top !== '') { - break; - } - b = b + h; - s.style.bottom = b + 'px'; - h = s.offsetHeight; - } - //if (s == s.previousElementSibling) { - // console.error(s.localName + ' is its own sibling', s); - // break; - //} - //s = s.previousElementSibling; - s = previousElementSibling(s); - } - } - - }); - - // TODO(sjmiles): temporary workaround for b0rked property in ShadowDOMPolyfill - function previousElementSibling(e) { - do { - e = e.previousSibling; - } while (e && e.nodeType !== Node.ELEMENT_NODE); - return e; - }; - - </script> - -</polymer-element> diff --git a/third_party/polymer/components/core-layout-trbl/demo.html b/third_party/polymer/components/core-layout-trbl/demo.html deleted file mode 100644 index 3812ccf..0000000 --- a/third_party/polymer/components/core-layout-trbl/demo.html +++ /dev/null @@ -1,58 +0,0 @@ -<!DOCTYPE html>
-<!--
-Copyright (c) 2014 The Polymer Project Authors. All rights reserved.
-This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
-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
--->
-
-<html>
-<head>
-
- <title>core-layout-trbl demo</title>
-
- <script src="../platform/platform.js"></script>
- <link rel="import" href="core-layout-trbl.html">
- <link rel="import" href="core-slide.html">
-
- <style>
- div {
- padding: 8px;
- border: 3px solid lightblue;
- -webkit-transition: all 0.3s;
- }
- [vertical] ~ div {
- border: 3px solid orange;
- }
- </style>
-
-</head>
-<body unresolved>
-
- <div style="height: 600px; overflow: hidden;">
- <core-layout-trbl></core-layout-trbl>
- <div id="left">Hi I'm some content</div>
- <div id="left2" onclick="leftSlide.closed = !leftSlide.closed;">Click Me First</div>
- <div onclick="leftSlide2.closed = !leftSlide2.closed;">Click Me Second</div>
- <div fit>
- <core-layout-trbl vertical></core-layout-trbl>
- <div id="top">Gribble gribble</div>
- <div onclick="topSlide.closed = !topSlide.closed;">Click Me</div>
- <div fit>Squids!</div>
- <div onclick="bottomSlide.closed = !bottomSlide.closed;">Click Me</div>
- <div>More is more</div>
- <div id="bottom">Squids are larger than they appear.</div>
- </div>
- <div onclick="rightSlide.closed = !rightSlide.closed;">Click me</div>
- <div id="right">A last bit, like a panel</div>
- </div>
- <core-slide id="leftSlide" targetid="left"></core-slide>
- <core-slide id="leftSlide2" targetid="left2"></core-slide>
- <core-slide id="rightSlide" targetid="right"></core-slide>
- <core-slide id="topSlide" vertical targetid="top"></core-slide>
- <core-slide id="bottomSlide" vertical targetid="bottom"></core-slide>
-
-</body>
-</html>
diff --git a/third_party/polymer/components/core-layout-trbl/index.html b/third_party/polymer/components/core-layout-trbl/index.html deleted file mode 100644 index 58856f3..0000000 --- a/third_party/polymer/components/core-layout-trbl/index.html +++ /dev/null @@ -1,22 +0,0 @@ -<!doctype html> -<!-- -Copyright (c) 2014 The Polymer Project Authors. All rights reserved. -This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE -The complete set of authors may be found at http://polymer.github.io/AUTHORS -The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS -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 ---> -<html> -<head> - - <script src="../platform/platform.js"></script> - <link rel="import" href="../core-component-page/core-component-page.html"> - -</head> -<body unresolved> - - <core-component-page></core-component-page> - -</body> -</html> diff --git a/third_party/polymer/components/core-layout/.bower.json b/third_party/polymer/components/core-layout/.bower.json deleted file mode 100644 index 6a615b5..0000000 --- a/third_party/polymer/components/core-layout/.bower.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "name": "core-layout", - "private": true, - "dependencies": { - "polymer": "Polymer/polymer#>=0.3.0 <1.0.0" - }, - "version": "0.3.5", - "homepage": "https://github.com/Polymer/core-layout", - "_release": "0.3.5", - "_resolution": { - "type": "version", - "tag": "0.3.5", - "commit": "b3e60118a0f859868ddc60d180ea28f42426c0f8" - }, - "_source": "git://github.com/Polymer/core-layout.git", - "_target": "0.3.5", - "_originalSource": "Polymer/core-layout" -}
\ No newline at end of file diff --git a/third_party/polymer/components/core-layout/README.md b/third_party/polymer/components/core-layout/README.md deleted file mode 100644 index 11ec2d0..0000000 --- a/third_party/polymer/components/core-layout/README.md +++ /dev/null @@ -1,4 +0,0 @@ -core-layout -=========== - -## DEPRECATED (in favor of layout attributes) diff --git a/third_party/polymer/components/core-layout/bower.json b/third_party/polymer/components/core-layout/bower.json deleted file mode 100644 index 56dd1f1..0000000 --- a/third_party/polymer/components/core-layout/bower.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "name": "core-layout", - "private": true, - "dependencies": { - "polymer": "Polymer/polymer#>=0.3.0 <1.0.0" - }, - "version": "0.3.0" -}
\ No newline at end of file diff --git a/third_party/polymer/components/core-layout/core-layout-host.css b/third_party/polymer/components/core-layout/core-layout-host.css deleted file mode 100644 index aa5f845..0000000 --- a/third_party/polymer/components/core-layout/core-layout-host.css +++ /dev/null @@ -1,106 +0,0 @@ -/* -Copyright (c) 2014 The Polymer Project Authors. All rights reserved. -This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt -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 -*/ - -:host { - display: -webkit-box !important; - display: -ms-flexbox !important; - display: -moz-flex !important; - display: -webkit-flex !important; - display: flex !important; -} - -:host(.core-h) { - -webkit-box-orient: horizontal; - -ms-flex-direction: row; - -moz-flex-direction: row; - -webkit-flex-direction: row; - flex-direction: row; -} - -:host(.core-v) { - -webkit-box-orient: vertical; - -ms-flex-direction: column; - -moz-flex-direction: column; - -webkit-flex-direction: column; - flex-direction: column; -} - -:host(.core-h.core-reverse) { - -webkit-box-direction: reverse; - -ms-flex-direction: row-reverse; - -moz-flex-direction: row-reverse; - -webkit-flex-direction: row-reverse; - flex-direction: row-reverse; -} - -:host(.core-v.core-reverse) { - -webkit-box-direction: reverse; - -ms-flex-direction: column-reverse; - -moz-flex-direction: column-reverse; - -webkit-flex-direction: column-reverse; - flex-direction: column-reverse; -} - -/* alignment in main axis */ -:host(.core-justify-start) { - -webkit-box-pack: start; - -ms-flex-pack: start; - -moz-justify-content: flex-start; - -webkit-justify-content: flex-start; - justify-content: flex-start; -} - -:host(.core-justify-center) { - -webkit-box-pack: center; - -ms-flex-pack: center; - -moz-justify-content: center; - -webkit-justify-content: center; - justify-content: center; -} - -:host(.core-justify-end) { - -webkit-box-pack: end; - -ms-flex-pack: end; - -moz-justify-content: flex-end; - -webkit-justify-content: flex-end; - justify-content: flex-end; -} - -:host(.core-justify-between) { - -webkit-box-pack: justify; - -ms-flex-pack: justify; - -moz-justify-content: space-between; - -webkit-justify-content: space-between; - justify-content: space-between; -} - -/* alignment in cross axis */ -:host(.core-align-start) { - -webkit-box-align: start; - -ms-flex-align: start; - -moz-align-items: flex-start; - -webkit-align-items: flex-start; - align-items: flex-start; -} - -:host(.core-align-center) { - -webkit-box-align: center; - -ms-flex-align: center; - -moz-align-items: center; - -webkit-align-items: center; - align-items: center; -} - -:host(.core-align-end) { - -webkit-box-align: end; - -ms-flex-align: end; - -moz-align-items: flex-end; - -webkit-align-items: flex-end; - align-items: flex-end; -} diff --git a/third_party/polymer/components/core-layout/core-layout.css b/third_party/polymer/components/core-layout/core-layout.css deleted file mode 100644 index 80f64b0..0000000 --- a/third_party/polymer/components/core-layout/core-layout.css +++ /dev/null @@ -1,216 +0,0 @@ -/* -Copyright 2013 The Polymer Authors. All rights reserved. -Use of this source code is governed by a BSD-style -license that can be found in the LICENSE file. -*/ - -.core-h, .core-v { - display: -webkit-box !important; - display: -ms-flexbox !important; - display: -moz-flex !important; - display: -webkit-flex !important; - display: flex !important; -} - -.core-h { - -webkit-box-orient: horizontal; - -ms-flex-direction: row; - -moz-flex-direction: row; - -webkit-flex-direction: row; - flex-direction: row; -} - -.core-h.core-reverse { - -webkit-box-direction: reverse; - -ms-flex-direction: row-reverse; - -moz-flex-direction: row-reverse; - -webkit-flex-direction: row-reverse; - flex-direction: row-reverse; -} - -.core-v { - -webkit-box-orient: vertical; - -ms-flex-direction: column; - -moz-flex-direction: column; - -webkit-flex-direction: column; - flex-direction: column; -} - -.core-v.core-reverse { - -webkit-box-direction: reverse; - -ms-flex-direction: column-reverse; - -moz-flex-direction: column-reverse; - -webkit-flex-direction: column-reverse; - flex-direction: column-reverse; -} - -.core-relative { - position: relative; -} - -.core-fit { - position: absolute; - top: 0; - left: 0; - height: 100%; - width: 100%; -} - -body.core-fit { - margin: 0; -} - -.core-flex, [core-flex] { - -webkit-box-flex: 1; - -ms-flex: 1; - -moz-flex: 1; - -webkit-flex: 1; - flex: 1; -} - -.core-flex-auto, [core-flex-auto] { - -webkit-box-flex: 1; - -ms-flex: 1 1 auto; - -moz-flex: 1 1 auto; - -webkit-flex: 1 1 auto; - flex: 1 1 auto; -} - -.core-flex-none, [core-flex-none] { - -webkit-box-flex: none; - -ms-flex: none; - -moz-flex: none; - -webkit-flex: none; - flex: none; -} - -.core-flex1, [core-flex=1] { - -webkit-box-flex: 1; - -ms-flex: 1; - -moz-flex: 1; - -webkit-flex: 1; - flex: 1; -} - -.core-flex2, [core-flex=2] { - -webkit-box-flex: 2; - -ms-flex: 2; - -moz-flex: 2; - -webkit-flex: 2; - flex: 2; -} - -.core-flex3, [core-flex=3] { - -webkit-box-flex: 3; - -ms-flex: 3; - -moz-flex: 3; - -webkit-flex: 3; - flex: 3; -} - -/* distributed elements */ -::content > .core-flex, ::content > [core-flex] { - -webkit-box-flex: 1; - -ms-flex: 1; - -moz-flex: 1; - -webkit-flex: 1; - flex: 1; -} - -::content > .core-flex-auto, ::content > [core-flex-auto] { - -webkit-box-flex: 1; - -ms-flex: 1 1 auto; - -moz-flex: 1 1 auto; - -webkit-flex: 1 1 auto; - flex: 1 1 auto; -} - -::content > .core-flex-none, ::content > [core-flex-none] { - -webkit-box-flex: none; - -ms-flex: none; - -moz-flex: none; - -webkit-flex: none; - flex: none; -} - -::content > .core-flex1, ::content > [core-flex=1] { - -webkit-box-flex: 1; - -ms-flex: 1; - -moz-flex: 1; - -webkit-flex: 1; - flex: 1; -} - -::content > .core-flex2, ::content > [core-flex=2] { - -webkit-box-flex: 2; - -ms-flex: 2; - -moz-flex: 2; - -webkit-flex: 2; - flex: 2; -} - -::content > .core-flex3, ::content > [core-flex=3] { - -webkit-box-flex: 3; - -ms-flex: 3; - -moz-flex: 3; - -webkit-flex: 3; - flex: 3; -} - -/* alignment in main axis */ -.core-justify-start { - -webkit-box-pack: start; - -ms-flex-pack: start; - -moz-justify-content: flex-start; - -webkit-justify-content: flex-start; - justify-content: flex-start; -} - -.core-justify-center { - -webkit-box-pack: center; - -ms-flex-pack: center; - -moz-justify-content: center; - -webkit-justify-content: center; - justify-content: center; -} - -.core-justify-end { - -webkit-box-pack: end; - -ms-flex-pack: end; - -moz-justify-content: flex-end; - -webkit-justify-content: flex-end; - justify-content: flex-end; -} - -.core-justify-between { - -webkit-box-pack: justify; - -ms-flex-pack: justify; - -moz-justify-content: space-between; - -webkit-justify-content: space-between; - justify-content: space-between; -} - -/* alignment in cross axis */ -.core-align-start { - -webkit-box-align: start; - -ms-flex-align: start; - -moz-align-items: flex-start; - -webkit-align-items: flex-start; - align-items: flex-start; -} - -.core-align-center { - -webkit-box-align: center; - -ms-flex-align: center; - -moz-align-items: center; - -webkit-align-items: center; - align-items: center; -} - -.core-align-end { - -webkit-box-align: end; - -ms-flex-align: end; - -moz-align-items: flex-end; - -webkit-align-items: flex-end; - align-items: flex-end; -} diff --git a/third_party/polymer/components/core-layout/core-layout.html b/third_party/polymer/components/core-layout/core-layout.html deleted file mode 100644 index 96082af..0000000 --- a/third_party/polymer/components/core-layout/core-layout.html +++ /dev/null @@ -1,288 +0,0 @@ -<!-- -Copyright (c) 2014 The Polymer Project Authors. All rights reserved. -This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt -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 ---> - -<!-- -The `core-layout` element is a helper for using -[CSS3 Flexible Boxes](https://developer.mozilla.org/en-US/docs/Web/Guide/CSS/Flexible_boxes). -A `core-layout` element enables a set of css selectors for easy flexbox styling. - -Example: - - <core-layout> - <div>Left</div> - <div core-flex>Main</div> - <div>Right</div> - </core-layout> - - Renders something like this: - - --------------------------------- - |-------------------------------| - ||Left| Main |Right|| - |-------------------------------| - --------------------------------- - -__Note__: the `core-layout` element applies layout to itself if it has children or to -its parent element, if it does not. This feature allows you to apply layout to an -arbitrary parent. - -Elements can layout horizontally, such that their items stack -left to right or vertically, such that their items stack top to bottom. The -default is horizontal. Set `vertical` to true to layout the elements vertically. - -To make a particular child _flexible_, use the `core-flex` attribute. -You can control flexibility from 1 to 3 by giving the attribute a -corresponding value. For other values, apply the css manually. - -It's common in flexbox parlance to hear the terms _main axis_ and _cross axis_. -For a horizontal layout the main axis is horizontal and the cross axis is vertical. -These are exchanged for a vertical layout. - -To effect alignment in the main axis, use the `justify` attribute. The -supported values are `start`, `center`, `end`, and `between`. - -To effect alignment in the cross axis, use the `align` attribute. The -supported values are `start`, `center`, and `end`. - -Note, it's also possible to include the `core-layout.css` stylesheet separate -from the `core-layout` element. Including the element automatically includes -the stylesheet. To use the stylesheet independent of the element, css classes -should be used of the following form: `core-h`, `core-v`, `core-flex`, -`core-justify-start`, and `core-align-start`. - -The `core-layout` and css file also provide a few commonly needed layout -behaviors. Apply the `core-fit` class to fit an element to its container. To -ensure a container will contain an element inside it with the `core-fit` class -give it the `core-relative` class. - -More examples: - - <core-layout vertical> - - <div>Header</div> - <div core-flex>Body</div> - <div>Footer</div> - - </core-layout> - - ---------- - ||------|| - ||Header|| - ||------|| - ||Body || - || || - || || - || || - || || - || || - || || - ||------|| - ||Footer|| - ||------|| - ---------- - -Justify: - - <core-layout justify="end"> - <div core-flex>Left</div> - <div>Main</div> - <div>Right</div> - </core-layout> - - --------------------------------- - |-------------------------------| - || Left|Main|Right|| - |-------------------------------| - --------------------------------- - -Align: - - <core-layout align="center"> - <div>Left</div> - <div core-flex>Main</div> - <div>Right</div> - </core-layout> - - --------------------------------- - |-------------------------------| - || | | || - ||Left| Main |Right|| - || | | || - |-------------------------------| - --------------------------------- - - -To layout contents of a parent element, place a `core-layout` inside of it: - - <some-element> - <core-layout></core-layout> - <div>Left</div> - <div core-flex>Main</div> - <div>Right</div> - </some-element> - - --------------------------------- - |-------------------------------| - ||Left| Main |Right|| - |-------------------------------| - --------------------------------- - -You may also use the `core-layout` stylesheet directly: - - <link rel="stylesheet" href="../core-layout/core-layout.css"> - <div class="core-h core-justify-end"> - <div core-flex>Left</div> - <div>Main</div> - <div>Right</div> - </div> - - --------------------------------- - |-------------------------------| - || Left|Main|Right|| - |-------------------------------| - --------------------------------- - -@group Polymer Core Elements -@element core-layout - ---> -<link rel="import" href="../polymer/polymer.html"> - -<polymer-element name="core-layout" attributes="vertical justify align isContainer reverse"> - - <template> - - <link no-shim rel="stylesheet" href="core-layout.css"> - <link no-shim rel="stylesheet" href="core-layout-host.css"> - - </template> - - <script> - - (function() { - - Polymer('core-layout', { - - isContainer: false, - /** - * Controls if the element lays out vertically or not. - * - * @attribute vertical - * @type boolean - * @default false - */ - vertical: false, - /** - * Controls how the items are aligned in the main-axis direction. For - * example for a horizontal layout, this controls how each item is aligned - * horizontally. - * - * @attribute justify - * @type string start|center|end|between - * @default '' - */ - justify: '', - /** - * Controls how the items are aligned in cross-axis direction. For - * example for a horizontal layout, this controls how each item is aligned - * vertically. - * - * @attribute align - * @type string start|center|end - * @default '' - */ - align: '', - /** - * Controls whether or not the items layout in reverse order. - * - * @attribute reverse - * @type boolean - * @default false - */ - reverse: false, - layoutPrefix: 'core-', - - // NOTE: include template so that styles are loaded, but remove - // so that we can decide dynamically what part to include - registerCallback: function(polymerElement) { - var template = polymerElement.querySelector('template'); - this.styles = template.content.querySelectorAll('style').array(); - this.styles.forEach(function(s) { - s.removeAttribute('no-shim'); - }) - }, - - fetchTemplate: function() { - return null; - }, - - attached: function() { - this.installScopeStyle(this.styles[0]); - if (this.children.length) { - this.isContainer = true; - } - var container = this.isContainer ? this : this.parentNode; - // detect if laying out a shadowRoot host. - var forHost = container instanceof ShadowRoot; - if (forHost) { - this.installScopeStyle(this.styles[1], 'host'); - container = container.host || document.body; - } - this.layoutContainer = container; - }, - - detached: function() { - this.layoutContainer = null; - }, - - layoutContainerChanged: function(old) { - this.style.display = this.layoutContainer === this ? null : 'none'; - this.verticalChanged(); - this.alignChanged(); - this.justifyChanged(); - }, - - setLayoutClass: function(prefix, old, newValue) { - if (this.layoutContainer) { - prefix = this.layoutPrefix + prefix; - if (old) { - this.layoutContainer.classList.remove(prefix + old); - } - if (newValue) { - this.layoutContainer.classList.add(prefix + newValue); - } - } - }, - - verticalChanged: function(old) { - old = old ? 'v' : 'h'; - var vertical = this.vertical ? 'v' : 'h'; - this.setLayoutClass('', old, vertical); - }, - - alignChanged: function(old) { - this.setLayoutClass('align-', old, this.align); - }, - - justifyChanged: function(old) { - this.setLayoutClass('justify-', old, this.justify); - }, - - reverseChanged: function(old) { - old = old ? 'reverse' : ''; - var newValue = this.reverse ? 'reverse' : ''; - this.setLayoutClass('', old, newValue); - } - - }); - - })(); - </script> - -</polymer-element> diff --git a/third_party/polymer/components/core-layout/demo-body.html b/third_party/polymer/components/core-layout/demo-body.html deleted file mode 100644 index ab92311..0000000 --- a/third_party/polymer/components/core-layout/demo-body.html +++ /dev/null @@ -1,31 +0,0 @@ -<!DOCTYPE html> -<html> -<head> - <title>core-layout demo</title> - - <script src="../platform/platform.js"></script> - <link rel="import" href="core-layout.html"> - <style> - .scroll { - overflow: auto; - } - - .content { - height: 2000px; - } - - div { - border: 3px solid green; - padding: 10px; - } - </style> -</head> -<body is="polymer-body" class="core-fit" unresolved> - <core-layout vertical></core-layout> - <div>Header</div> - <div class="scroll core-flex"> - <section class="content"></section> - </div> - <div>Footer</div> -</body> -</html> diff --git a/third_party/polymer/components/core-layout/demo-css.html b/third_party/polymer/components/core-layout/demo-css.html deleted file mode 100644 index f8fed78..0000000 --- a/third_party/polymer/components/core-layout/demo-css.html +++ /dev/null @@ -1,83 +0,0 @@ -<!DOCTYPE html> -<!-- -Copyright (c) 2014 The Polymer Project Authors. All rights reserved. -This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt -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 ---> -<html> -<head> - <title>core-layout demo</title> - - <script src="../platform/platform.js"></script> - <link rel="import" href="core-layout.html"> - - <style> - body { - font-size: 20px; - } - - layout-demo { - height: 300px; - } - - </style> - -</head> -<body unresolved> - - <polymer-element name="layout-demo" noscript> - <template> - <style> - div { - box-sizing: border-box; - -moz-box-sizing: border-box; - border: 2px solid #ccc; - } - - .abs { - position: absolute; - font-size: 14px; - padding: 4px; - right: 10%; - bottom: 10px; - height: 30px; - width: 70px; - border-radius: 10px; - background: seagreen; - border: none; - } - </style> - <link rel="stylesheet" href="core-layout.css"> - <link rel="stylesheet" href="core-layout-host.css"> - <div class="core-flex core-h"> - <div>Hi I'm some content</div> - <div class="core-flex core-v"> - <div class="core-h core-align-center"> - <h3>Title</h3> - <button>hello</button> - </div> - <div class="core-flex core-h"> - <div class="core-flex core-relative"> - Main content - <div class="abs">abs pos :)</div> - </div> - <div>Sidebar content</div> - </div> - <div>Some more stuffs...</div> - <div class="core-h core-justify-end"> - <b>Footer</b> - </div> - </div> - <div>A last bit, like a panel</div> - </div> - </template> - </polymer-element> - - <h3>core-layout example</h3> - <layout-demo></layout-demo> - -</body> -</html> diff --git a/third_party/polymer/components/core-layout/demo-parent.html b/third_party/polymer/components/core-layout/demo-parent.html deleted file mode 100644 index 8700763..0000000 --- a/third_party/polymer/components/core-layout/demo-parent.html +++ /dev/null @@ -1,87 +0,0 @@ -<!DOCTYPE html> -<!-- -Copyright (c) 2014 The Polymer Project Authors. All rights reserved. -This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt -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 ---> -<html> -<head> - <title>core-layout demo</title> - - <script src="../platform/platform.js"></script> - <link rel="import" href="core-layout.html"> - - <style> - body { - font-size: 20px; - } - - layout-demo { - height: 300px; - } - - </style> - -</head> -<body unresolved> - - <polymer-element name="layout-demo" noscript> - <template> - <style> - div { - box-sizing: border-flow; - -moz-flow-sizing: border-flow; - border: 2px solid #ccc; - } - - .abs { - position: absolute; - font-size: 14px; - padding: 4px; - right: 10%; - bottom: 10px; - height: 30px; - width: 70px; - border-radius: 10px; - background: seagreen; - border: none; - } - </style> - <core-layout></core-layout> - <div core-flex> - <core-layout></core-layout> - <div>Hi I'm some content</div> - <div core-flex> - <core-layout vertical></core-layout> - <div> - <core-layout align="center"></core-layout> - <h3>Title</h3> - <button>hello</button> - </div> - <div core-flex> - <core-layout></core-layout> - <div core-flex class="core-relative"> - Main content - <div class="abs">abs pos :)</div> - </div> - <div>Sidebar content</div> - </div> - <div>Some more stuffs...</div> - <div> - <core-layout justify="end"></core-layout> - <b>Footer</b> - </div> - </div> - <div>A last bit, like a panel</div> - </div> - </template> - </polymer-element> - - <h3>core-layout example</h3> - <layout-demo></layout-demo> - -</body> -</html> diff --git a/third_party/polymer/components/core-layout/demo.html b/third_party/polymer/components/core-layout/demo.html deleted file mode 100644 index 46c91b5..0000000 --- a/third_party/polymer/components/core-layout/demo.html +++ /dev/null @@ -1,82 +0,0 @@ -<!DOCTYPE html> -<!-- -Copyright (c) 2014 The Polymer Project Authors. All rights reserved. -This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt -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 ---> -<html> -<head> - <title>core-layout demo</title> - - <script src="../platform/platform.js"></script> - <link rel="import" href="core-layout.html"> - - <style> - body { - font-size: 20px; - } - - layout-demo { - height: 300px; - } - - </style> - -</head> -<body unresolved> - - <polymer-element name="layout-demo" noscript> - <template> - <style> - div, core-layout { - box-sizing: border-flow; - -moz-flow-sizing: border-flow; - border: 2px solid #ccc; - } - - .abs { - position: absolute; - font-size: 14px; - padding: 4px; - right: 10%; - bottom: 10px; - height: 30px; - width: 70px; - border-radius: 10px; - background: seagreen; - border: none; - } - </style> - <core-layout></core-layout> - <core-layout core-flex> - <div>Hi I'm some content</div> - <core-layout core-flex vertical> - <core-layout align="center"> - <h3>Title</h3> - <button>hello</button> - </core-layout> - <core-layout core-flex> - <div core-flex class="core-relative"> - Main content - <div class="abs">abs pos :)</div> - </div> - <div>Sidebar content</div> - </core-layout> - <div>Some more stuffs...</div> - <core-layout justify="end"> - <b>Footer</b> - </core-layout> - </core-layout> - <div>A last bit, like a panel</div> - </core-layout> - </template> - </polymer-element> - - <h3>core-layout example</h3> - <layout-demo></layout-demo> - -</body> -</html> diff --git a/third_party/polymer/components/core-layout/index.html b/third_party/polymer/components/core-layout/index.html deleted file mode 100644 index 58856f3..0000000 --- a/third_party/polymer/components/core-layout/index.html +++ /dev/null @@ -1,22 +0,0 @@ -<!doctype html> -<!-- -Copyright (c) 2014 The Polymer Project Authors. All rights reserved. -This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE -The complete set of authors may be found at http://polymer.github.io/AUTHORS -The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS -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 ---> -<html> -<head> - - <script src="../platform/platform.js"></script> - <link rel="import" href="../core-component-page/core-component-page.html"> - -</head> -<body unresolved> - - <core-component-page></core-component-page> - -</body> -</html> diff --git a/third_party/polymer/components/core-layout/metadata.html b/third_party/polymer/components/core-layout/metadata.html deleted file mode 100644 index e2bbac1..0000000 --- a/third_party/polymer/components/core-layout/metadata.html +++ /dev/null @@ -1,15 +0,0 @@ -<x-meta id="core-layout" label="Layout" group="Core" isContainer> - - <template> - - <core-layout isContainer style="width: 400px; height: 400px;"></core-layout> - - </template> - - <template id="imports"> - - <link rel="import" href="core-layout.html"> - - </template> - -</x-meta>
\ No newline at end of file diff --git a/third_party/polymer/components/core-list/.bower.json b/third_party/polymer/components/core-list/.bower.json deleted file mode 100644 index 286a011..0000000 --- a/third_party/polymer/components/core-list/.bower.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "name": "core-list", - "private": true, - "dependencies": { - "polymer": "Polymer/polymer#>=0.3.0 <1.0.0", - "core-selection": "Polymer/core-selection#>=0.3.0 <1.0.0" - }, - "homepage": "https://github.com/Polymer/core-list", - "version": "0.3.5", - "_release": "0.3.5", - "_resolution": { - "type": "version", - "tag": "0.3.5", - "commit": "eac2a2a06e40a0879ab221e73382ebbec5597080" - }, - "_source": "git://github.com/Polymer/core-list.git", - "_target": "0.3.5", - "_originalSource": "Polymer/core-list" -}
\ No newline at end of file diff --git a/third_party/polymer/components/core-list/README.md b/third_party/polymer/components/core-list/README.md deleted file mode 100644 index 0142d51..0000000 --- a/third_party/polymer/components/core-list/README.md +++ /dev/null @@ -1,4 +0,0 @@ -core-list
-============
-
-See the [component page](http://polymer-project.org/docs/elements/core-elements.html#core-list) for more information.
diff --git a/third_party/polymer/components/core-list/bower.json b/third_party/polymer/components/core-list/bower.json deleted file mode 100644 index 40a5bee..0000000 --- a/third_party/polymer/components/core-list/bower.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "name": "core-list", - "private": true, - "dependencies": { - "polymer": "Polymer/polymer#>=0.3.0 <1.0.0", - "core-selection": "Polymer/core-selection#>=0.3.0 <1.0.0" - } -}
\ No newline at end of file diff --git a/third_party/polymer/components/core-list/core-list.css b/third_party/polymer/components/core-list/core-list.css deleted file mode 100644 index 1e2c9ea..0000000 --- a/third_party/polymer/components/core-list/core-list.css +++ /dev/null @@ -1,20 +0,0 @@ -:host {
- display: block;
- overflow: auto;
- /*-webkit-overflow-scrolling: touch;
- -webkit-transform: translateZ(0);
- transform: translateZ(0);*/
-}
-
-.core-list-viewport > * {
- overflow: hidden;
-}
-
-.core-list-viewport.horizontal {
- height: 100%;
- white-space: nowrap;
-}
-
-.core-list-viewport.horizontal > * {
- display: inline-block;
-}
\ No newline at end of file diff --git a/third_party/polymer/components/core-list/core-list.html b/third_party/polymer/components/core-list/core-list.html deleted file mode 100644 index d815108..0000000 --- a/third_party/polymer/components/core-list/core-list.html +++ /dev/null @@ -1,403 +0,0 @@ -<!--
-Copyright (c) 2014 The Polymer Project Authors. All rights reserved.
-This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
-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
--->
-
-<!--
-`core-list` displays a virtual, 'infinite' list. The template inside the
-`core-list` element represents the dom to create for each list item. The
-`data` property specifies an array of list item data. The `height` property
-represents the height of a list item.
-
-By default, the list supports selection via tapping. Styling the selection
-should be done via binding. The `selectedProperty` property is set on the
-list view data for each selected item.
-
-`core-list` manages a viewport of data based on the current scroll position.
-For performance reasons, not every item in the list is rendered at once.
-
- <core-list data="{{data}}" height="80">
- <template>
- <div class="{{ {selected: selected} | tokenList }}">List row: {{index}}</div>
- </template>
- </core-list>
-
-@group Polymer Core Elements
-@element core-list
--->
-<link rel="import" href="../polymer/polymer.html">
-<link rel="import" href="../core-selection/core-selection.html">
-
-<polymer-element name="core-list" on-tap="{{tapHandler}}">
-<template>
- <core-selection id="selection" multi="{{multi}}" on-core-select="{{selectedHandler}}"></core-selection>
- <link rel="stylesheet" href="core-list.css">
- <div id="viewport" class="core-list-viewport"><content></content></div>
-</template>
-<script>
-(function() {
-
- Polymer('core-list', {
-
- publish: {
- /**
- * Fired when an item element is tapped.
- *
- * @event core-activate
- * @param {Object} detail
- * @param {Object} detail.item the item element
- */
-
- /**
- *
- * An array of source data for the list to display.
- *
- * @attribute data
- * @type array
- * @default null
- */
- data: null,
-
- /**
- *
- * An optional element on which to listen for scroll events.
- *
- * @attribute scrollTarget
- * @type Element
- * @default core-list
- */
- scrollTarget: null,
-
- /**
- *
- * The height of a list item. `core-list` currently supports only fixed-height
- * list items. This height must be specified via the height property.
- *
- * @attribute height
- * @type number
- * @default 80
- */
- height: 80,
-
- /**
- *
- * The number of extra items rendered above the minimum set required to
- * fill the list's height.
- *
- * @attribute extraItems
- * @type number
- * @default 30
- */
- extraItems: 30,
-
- /**
- *
- * The property set on the list view data to represent selection state.
- * This should set so that it does not conflict with other data properties.
- * Note, selection data is not stored on the data in given in the data property.
- *
- * @attribute selectedProperty
- * @type string
- * @default 'selected'
- */
- selectedProperty: 'selected',
-
- // TODO(sorvell): experimental
- /**
- *
- * If true, data is sync'd from the list back to the list's data.
- *
- * @attribute sync
- * @type boolean
- * @default false
- */
- sync: false,
-
- /**
- *
- * Set to true to support multiple selection.
- *
- * @attribute multi
- * @type boolean
- * @default false
- */
- multi: false
-
- },
-
- observe: {
- 'data template scrollTarget': 'initialize'
- },
-
- ready: function() {
- this.clearSelection();
- this._boundScrollHandler = this.scrollHandler.bind(this);
- },
-
- attached: function() {
- this.template = this.querySelector('template');
- },
-
- // TODO(sorvell): it'd be nice to dispense with 'data' and just use
- // template repeat's model. However, we need tighter integration
- // with TemplateBinding for this.
- initialize: function() {
- if (!this.data || !this.template) {
- return;
- }
- var target = this.scrollTarget || this;
- if (this._target !== target) {
- if (this._target) {
- this._target.removeEventListener('scroll', this._boundScrollHandler, false);
- }
- this._target = target;
- this._target.addEventListener('scroll', this._boundScrollHandler, false);
- }
-
- this.initializeViewport();
- this.initalizeData();
- this.onMutation(this, this.initializeItems);
- },
-
- // TODO(sorvell): need to handle resizing
- initializeViewport: function() {
- this.$.viewport.style.height = this.height * this.data.length + 'px';
- this._visibleCount = Math.ceil(this._target.offsetHeight / this.height);
- this._physicalCount = Math.min(this._visibleCount + this.extraItems,
- this.data.length);
- this._physicalHeight = this.height * this._physicalCount;
- },
-
- // TODO(sorvell): selection currently cannot be maintained when
- // items are added or deleted.
- initalizeData: function() {
- var exampleDatum = this.data[0] || {};
- this._propertyNames = Object.getOwnPropertyNames(exampleDatum);
- this._physicalData = new Array(this._physicalCount);
- for (var i = 0; i < this._physicalCount; ++i) {
- this._physicalData[i] = {};
- this.updateItem(i, i);
- }
- this.template.model = this._physicalData;
- this.template.setAttribute('repeat', '');
- },
-
- initializeItems: function() {
- this._physicalItems = new Array(this._physicalCount);
- for (var i = 0, item = this.template.nextElementSibling;
- item && i < this._physicalCount;
- ++i, item = item.nextElementSibling) {
- this._physicalItems[i] = item;
- item._transformValue = 0;
- }
- this.refresh(false);
- },
-
- updateItem: function(virtualIndex, physicalIndex) {
- var virtualDatum = this.data[virtualIndex];
- var physicalDatum = this._physicalData[physicalIndex];
- this.pushItemData(virtualDatum, physicalDatum);
- physicalDatum._physicalIndex = physicalIndex;
- physicalDatum._virtualIndex = virtualIndex;
- if (this.selectedProperty) {
- physicalDatum[this.selectedProperty] = this._selectedData.get(virtualDatum);
- }
- },
-
- pushItemData: function(source, dest) {
- for (var i = 0; i < this._propertyNames.length; ++i) {
- var propertyName = this._propertyNames[i];
- dest[propertyName] = source[propertyName];
- }
- },
-
- // experimental: push physical data back to this.data.
- // this is optional when scrolling and needs to be called at other times.
- syncData: function() {
- if (this.firstPhysicalIndex === undefined ||
- this.baseVirtualIndex === undefined) {
- return;
- }
- var p, v;
- for (var i = 0; i < this.firstPhysicalIndex; ++i) {
- p = this._physicalData[i];
- v = this.data[this.baseVirtualIndex + this._physicalCount + i];
- this.pushItemData(p, v);
- }
- for (var i = this.firstPhysicalIndex; i < this._physicalCount; ++i) {
- p = this._physicalData[i];
- v = this.data[this.baseVirtualIndex + i];
- this.pushItemData(p, v);
- }
- },
-
- scrollHandler: function(e, detail) {
- this._scrollTop = e.detail ? e.detail.target.scrollTop : e.target.scrollTop;
- this.refresh(false);
- },
-
- /**
- * Refresh the list at the current scroll position.
- *
- * @method refresh
- */
- refresh: function(force) {
- var firstVisibleIndex = Math.floor(this._scrollTop / this.height);
- var visibleMidpoint = firstVisibleIndex + this._visibleCount / 2;
-
- var firstReifiedIndex = Math.max(0, Math.floor(visibleMidpoint -
- this._physicalCount / 2));
- firstReifiedIndex = Math.min(firstReifiedIndex, this.data.length -
- this._physicalCount);
-
- var firstPhysicalIndex = firstReifiedIndex % this._physicalCount;
- var baseVirtualIndex = firstReifiedIndex - firstPhysicalIndex;
-
- var baseTransformValue = Math.floor(this.height * baseVirtualIndex);
- var nextTransformValue = Math.floor(baseTransformValue +
- this._physicalHeight);
-
- var baseTransformString = 'translate3d(0,' + baseTransformValue + 'px,0)';
- var nextTransformString = 'translate3d(0,' + nextTransformValue + 'px,0)';
- // TODO(sorvell): experiemental for sync'ing back to virtual data.
- if (this.sync) {
- this.syncData();
- }
- this.firstPhysicalIndex = firstPhysicalIndex;
- this.baseVirtualIndex = baseVirtualIndex;
-
- for (var i = 0; i < firstPhysicalIndex; ++i) {
- var item = this._physicalItems[i];
- if (force || item._transformValue != nextTransformValue) {
- this.updateItem(baseVirtualIndex + this._physicalCount + i, i);
- setTransform(item, nextTransformString, nextTransformValue);
- }
- }
- for (var i = firstPhysicalIndex; i < this._physicalCount; ++i) {
- var item = this._physicalItems[i];
- if (force || item._transformValue != baseTransformValue) {
- this.updateItem(baseVirtualIndex + i, i);
- setTransform(item, baseTransformString, baseTransformValue);
- }
- }
- },
-
- // list selection
- tapHandler: function(e) {
- if (e.target === this) {
- return;
- }
- if (this.sync) {
- this.syncData();
- }
- var n = e.target;
- var model = n.templateInstance && n.templateInstance.model;
- if (model) {
- var vi = model._virtualIndex, pi = model._physicalIndex;
- var data = this.data[vi], item = this._physicalItems[pi];
- this.$.selection.select(data);
- this.asyncFire('core-activate', {data: data, item: item});
- }
- },
-
- selectedHandler: function(e, detail) {
- if (this.selectedProperty) {
- var i$ = this.indexesForData(detail.item);
- // TODO(sorvell): we should be relying on selection to store the
- // selected data but we want to optimize for lookup.
- this._selectedData.set(detail.item, detail.isSelected);
- if (i$.physical >= 0) {
- this.updateItem(i$.virtual, i$.physical);
- }
- }
- },
-
- /**
- * Select the list item at the given index.
- *
- * @method selectItem
- * @param {number} index
- */
- selectItem: function(index) {
- var data = this.data[index];
- if (data) {
- this.$.selection.select(data);
- }
- },
-
- /**
- * Set the selected state of the list item at the given index.
- *
- * @method setItemSelected
- * @param {number} index
- * @param {boolean} isSelected
- */
- setItemSelected: function(index, isSelected) {
- var data = this.data[index];
- if (data) {
- this.$.selection.setItemSelected(data, isSelected);
- }
- },
-
- indexesForData: function(data) {
- var virtual = this.data.indexOf(data);
- var physical = this.virtualToPhysicalIndex(virtual);
- return { virtual: virtual, physical: physical };
- },
-
- virtualToPhysicalIndex: function(index) {
- for (var i=0, l=this._physicalData.length; i<l; i++) {
- if (this._physicalData[i]._virtualIndex === index) {
- return i;
- }
- }
- return -1;
- },
-
- get selection() {
- return this.$.selection.getSelection();
- },
-
- selectedChanged: function() {
- this.$.selection.select(this.selected);
- },
-
- clearSelection: function() {
- this._selectedData = new WeakMap();
- if (this.multi) {
- var s$ = this.selection;
- for (var i=0, l=s$.length, s; (i<l) && (s=s$[i]); i++) {
- this.$.selection.setItemSelected(s, false);
- }
- } else {
- this.$.selection.setItemSelected(this.selection, false);
- }
- this.$.selection.clear();
- },
-
- scrollToItem: function(index) {
- this.scrollTop = index * this.height;
- }
-
- });
-
- // determine proper transform mechanizm
- if (document.documentElement.style.transform !== undefined) {
- function setTransform(element, string, value) {
- element.style.transform = string;
- element._transformValue = value;
- }
- } else {
- function setTransform(element, string, value) {
- element.style.webkitTransform = string;
- element._transformValue = value;
- }
- }
-
-})();
-</script>
-</polymer-element>
diff --git a/third_party/polymer/components/core-list/demo-divider.html b/third_party/polymer/components/core-list/demo-divider.html deleted file mode 100644 index e3c5984..0000000 --- a/third_party/polymer/components/core-list/demo-divider.html +++ /dev/null @@ -1,178 +0,0 @@ -<!doctype html>
-<!--
-Copyright (c) 2014 The Polymer Project Authors. All rights reserved.
-This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
-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
--->
-<html>
-<head>
- <title>core-list: divider</title>
- <meta name="viewport" content="width=device-width">
- <script src="../platform/platform.js"></script>
- <link rel="import" href="core-list.html">
- <style>
- html, body {
- font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
- height: 100%;
- margin: 0;
- }
-
- list-test {
- display: block;
- height: 100%;
- margin: 0 auto;
- }
-
- .stuff {
- min-height: 60px;
- background: red !important;
- border-bottom: 1px solid black;
- }
- </style>
-</head>
-<body>
-
-<list-test></list-test>
-
-<polymer-element name="list-test">
-<template>
- <style>
- core-list {
- height: 100%;
- }
-
- .item {
- box-sizing: border-box;
- height: 80px;
- border-bottom: 1px solid #ddd;
- cursor: default;
- overflow: hidden;
- }
-
- .selected {
- background: silver;
- }
-
- .message {
- padding-left: 77px;
- line-height: 167%;
- background-repeat: no-repeat;
- background-position: 10px 10px;
- background-size: 60px;
- }
-
- .from {
- display: inline;
- font-weight: bold;
- }
-
- .timestamp {
- margin-left: 10px;
- font-size: 12px;
- opacity: 0.8;
- }
-
- .body {
- font-size: 12px;
- }
-
- .hidden {
- display: none;
- }
-
- .divider {
- height: 80px;
- box-sizing: border-box;
- box-shadow: inset 0 8px 40px 0 rgba(0, 0, 0, 0.1);
- text-transform: uppercase;
- padding: 36px 20px 0;
- font-size: 40px;
- }
-
- .main {
- padding: 4px;
- background-color: white;
- }
- </style>
- <core-list id="list" data="{{data}}" height="80">
- <template repeat>
- <div class="item {{ {selected: selected} | tokenList }}">
- <div class="divider {{ {hidden: !divider} |tokenList}}">{{divider}}</div>
- <div class="message {{ {hidden: divider} |tokenList}}" style="background-image: url(images/{{index % 4}}.png);">
- <span class="from">{{name}}</span>
- <span class="timestamp">{{time}}</span>
- <div class="subject">Infinite List. {{index}}</div>
- <div class="body">{{details}}</div>
- </div>
- </div>
- </template>
- </core-list>
-
-</template>
-<script>
-(function() {
- var strings = [
- "PARKOUR!",
- "Neque porro quisquam est qui dolorem ipsum quia dolor sit amet, consectetur, adipisci velit...",
- "Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book."
- ];
-
- var namegen = {
- generateString: function(inLength) {
- var s = '';
- for (var i=0; i<inLength; i++) {
- s += String.fromCharCode(Math.floor(Math.random() * 26) + 97);
- }
- return s;
- },
- generateName: function(inMin, inMax) {
- return this.generateString(Math.floor(Math.random() * (inMax - inMin + 1) + inMin));
- }
- };
-
- Polymer('list-test', {
- count: 1000,
- ready: function() {
- this.data = this.generateData();
- },
- generateData: function() {
- var names = [], data = [];
- for (var i=0; i<this.count; i++) {
- names.push(namegen.generateName(4, 8));
- }
- names.sort();
- for (var i=0, o; i<this.count; i++) {
- var name = names[i];
- var divider = name.charAt(0);
- if (divider === (names[i-1] || '').charAt(0)) {
- divider = null;
- }
- o = {
- index: i,
- name: name,
- divider: divider,
- details: strings[i % 3],
- time: '8:29pm'
- };
- data.push(o);
- if (divider) {
- o = Object.create(o);
- o.divider = false;
- data.push(o);
- }
- }
- return data;
- },
- tapAction: function(e) {
- console.log('tap', e);
- }
- });
-})();
-</script>
-</polymer-element>
-
-</body>
-</html>
diff --git a/third_party/polymer/components/core-list/demo.html b/third_party/polymer/components/core-list/demo.html deleted file mode 100644 index 8233733..0000000 --- a/third_party/polymer/components/core-list/demo.html +++ /dev/null @@ -1,154 +0,0 @@ -<!doctype html>
-<!--
-Copyright (c) 2014 The Polymer Project Authors. All rights reserved.
-This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
-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
--->
-<html>
-<head>
- <title>core-list</title>
- <meta name="viewport" content="width=device-width">
- <script src="../platform/platform.js"></script>
- <link rel="import" href="core-list.html">
- <style>
- html, body {
- height: 100%;
- margin: 0;
- }
-
- list-test {
- display: block;
- height: 100%;
- margin: 0 auto;
- }
-
- .stuff {
- min-height: 60px;
- background: red !important;
- border-bottom: 1px solid black;
- }
- </style>
-</head>
-<body>
-
-<list-test></list-test>
-
-<polymer-element name="list-test">
-<template>
- <style>
- core-list {
- height: 100%;
- }
-
- .item {
- box-sizing: border-box;
- height: 80px;
- border-bottom: 1px solid #ddd;
- padding: 4px;
- cursor: default;
- background-color: white;
- overflow: hidden;
- }
-
- .selected {
- background: silver;
- }
-
- .message {
- padding-left: 77px;
- line-height: 167%;
- background-repeat: no-repeat;
- background-position: 10px 10px;
- background-size: 60px;
- }
-
- .from {
- display: inline;
- font-weight: bold;
- }
-
- .timestamp {
- margin-left: 10px;
- font-size: 12px;
- opacity: 0.8;
- }
-
- .body {
- font-size: 12px;
- }
- </style>
- <core-list id="list" data="{{data}}" height="80">
- <template>
- <div class="item {{ {selected: selected} | tokenList }}">
- <div class="message" style="background-image: url(images/{{index % 4}}.png);">
- <span class="from">{{name}}</span>
- <span class="timestamp">{{time}}</span>
- <div class="subject">Infinite List. {{index}}</div>
- <div class="body">{{details}}</div>
- </div>
- </div>
- </template>
- </core-list>
-
-</template>
-<script>
-(function() {
- var strings = [
- "PARKOUR!",
- "Neque porro quisquam est qui dolorem ipsum quia dolor sit amet, consectetur, adipisci velit...",
- "Lorem Ipsum is simply dummy text of the printing and typesetting industry."
- ];
-
- var namegen = {
- generateString: function(inLength) {
- var s = '';
- for (var i=0; i<inLength; i++) {
- s += String.fromCharCode(Math.floor(Math.random() * 26) + 97);
- }
- return s;
- },
- generateName: function(inMin, inMax) {
- return this.generateString(Math.floor(Math.random() * (inMax - inMin + 1) + inMin));
- }
- };
-
- Polymer('list-test', {
- count: 50000,
- ready: function() {
- this.data = this.generateData();
- },
- generateData: function() {
- var names = [], data = [];
- for (var i=0; i<this.count; i++) {
- names.push(namegen.generateName(4, 8));
- }
- names.sort();
- for (var i=0; i<this.count; i++) {
- var name = names[i];
- var divider = name.charAt(0);
- if (divider === (names[i-1] || '').charAt(0)) {
- divider = null;
- }
- data.push({
- index: i,
- name: name,
- divider: divider,
- details: strings[i % 3],
- time: '8:29pm'
- });
- }
- return data;
- },
- tapAction: function(e) {
- console.log('tap', e);
- }
- });
-})();
-</script>
-</polymer-element>
-
-</body>
-</html>
diff --git a/third_party/polymer/components/core-list/images/0.png b/third_party/polymer/components/core-list/images/0.png Binary files differdeleted file mode 100644 index 12397a9..0000000 --- a/third_party/polymer/components/core-list/images/0.png +++ /dev/null diff --git a/third_party/polymer/components/core-list/images/1.png b/third_party/polymer/components/core-list/images/1.png Binary files differdeleted file mode 100644 index 6b7e49f..0000000 --- a/third_party/polymer/components/core-list/images/1.png +++ /dev/null diff --git a/third_party/polymer/components/core-list/images/2.png b/third_party/polymer/components/core-list/images/2.png Binary files differdeleted file mode 100644 index 6fba511..0000000 --- a/third_party/polymer/components/core-list/images/2.png +++ /dev/null diff --git a/third_party/polymer/components/core-list/images/3.png b/third_party/polymer/components/core-list/images/3.png Binary files differdeleted file mode 100644 index d629633..0000000 --- a/third_party/polymer/components/core-list/images/3.png +++ /dev/null diff --git a/third_party/polymer/components/core-list/index.html b/third_party/polymer/components/core-list/index.html deleted file mode 100644 index e75c2ca..0000000 --- a/third_party/polymer/components/core-list/index.html +++ /dev/null @@ -1,22 +0,0 @@ -<!doctype html>
-<!--
-Copyright (c) 2014 The Polymer Project Authors. All rights reserved.
-This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
-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
--->
-<html>
-<head>
-
- <script src="../platform/platform.js"></script>
- <link rel="import" href="../core-component-page/core-component-page.html">
-
-</head>
-<body unresolved>
-
- <core-component-page></core-component-page>
-
-</body>
-</html>
diff --git a/third_party/polymer/components/core-localstorage/.bower.json b/third_party/polymer/components/core-localstorage/.bower.json deleted file mode 100644 index 8331406..0000000 --- a/third_party/polymer/components/core-localstorage/.bower.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "name": "core-localstorage", - "private": true, - "dependencies": { - "polymer": "Polymer/polymer#>=0.3.0 <1.0.0" - }, - "homepage": "https://github.com/Polymer/core-localstorage", - "version": "0.3.5", - "_release": "0.3.5", - "_resolution": { - "type": "version", - "tag": "0.3.5", - "commit": "fcd9792aa1bf34e52a6b976f7d025d5d5a5c199d" - }, - "_source": "git://github.com/Polymer/core-localstorage.git", - "_target": "0.3.5", - "_originalSource": "Polymer/core-localstorage" -}
\ No newline at end of file diff --git a/third_party/polymer/components/core-localstorage/README.md b/third_party/polymer/components/core-localstorage/README.md deleted file mode 100644 index 241035b..0000000 --- a/third_party/polymer/components/core-localstorage/README.md +++ /dev/null @@ -1,4 +0,0 @@ -core-localstorage -================= - -See the [component landing page](http://polymer-project.org/docs/elements/core-elements.html#core-localstorage) for more information. diff --git a/third_party/polymer/components/core-localstorage/bower.json b/third_party/polymer/components/core-localstorage/bower.json deleted file mode 100644 index 2b2f2f8..0000000 --- a/third_party/polymer/components/core-localstorage/bower.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "name": "core-localstorage", - "private": true, - "dependencies": { - "polymer": "Polymer/polymer#>=0.3.0 <1.0.0" - } -}
\ No newline at end of file diff --git a/third_party/polymer/components/core-localstorage/core-localstorage.html b/third_party/polymer/components/core-localstorage/core-localstorage.html deleted file mode 100644 index 3ca5a09..0000000 --- a/third_party/polymer/components/core-localstorage/core-localstorage.html +++ /dev/null @@ -1,128 +0,0 @@ -<!-- -Copyright (c) 2014 The Polymer Project Authors. All rights reserved. -This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt -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 ---> - -<!-- -Element access to localStorage. The "name" property -is the key to the data ("value" property) stored in localStorage. - -`core-localstorage` automatically saves the value to localStorage when -value is changed. Note that if value is an object auto-save will be -triggered only when value is a different instance. - - <core-localstorage name="my-app-storage" value="{{value}}"></core-localstorage> - -@group Polymer Core Elements -@element core-localstorage -@blurb Element access to localStorage. -@url github.io -@categories Data ---> - -<link rel="import" href="../polymer/polymer.html"> - -<polymer-element name="core-localstorage" attributes="name value useRaw autoSaveDisabled" hidden> -<script> - - Polymer('core-localstorage', { - - /** - * Fired when a value is loaded from localStorage. - * @event core-localstorage-load - */ - - /** - * The key to the data stored in localStorage. - * - * @attribute name - * @type string - * @default null - */ - name: '', - - /** - * The data associated with the specified name. - * - * @attribute value - * @type object - * @default null - */ - value: null, - - /** - * If true, the value is stored and retrieved without JSON processing. - * - * @attribute useRaw - * @type boolean - * @default false - */ - useRaw: false, - - /** - * If true, auto save is disabled. - * - * @attribute autoSaveDisabled - * @type boolean - * @default false - */ - autoSaveDisabled: false, - - attached: function() { - // wait for bindings are all setup - this.async('load'); - }, - - valueChanged: function() { - if (this.loaded && !this.autoSaveDisabled) { - this.save(); - } - }, - - load: function() { - var v = localStorage.getItem(this.name); - if (this.useRaw) { - this.value = v; - } else { - // localStorage has a flaw that makes it difficult to determine - // if a key actually exists or not (getItem returns null if the - // key doesn't exist, which is not distinguishable from a stored - // null value) - // however, if not `useRaw`, an (unparsed) null value unambiguously - // signals that there is no value in storage (a stored null value would - // be escaped, i.e. "null") - // in this case we save any non-null current (default) value - if (v === null) { - if (this.value !== null) { - this.save(); - } - } else { - try { - v = JSON.parse(v); - } catch(x) { - } - this.value = v; - } - } - this.loaded = true; - this.asyncFire('core-localstorage-load'); - }, - - /** - * Saves the value to localStorage. - * - * @method save - */ - save: function() { - var v = this.useRaw ? this.value : JSON.stringify(this.value); - localStorage.setItem(this.name, v); - } - - }); - -</script> -</polymer-element> diff --git a/third_party/polymer/components/core-localstorage/demo.html b/third_party/polymer/components/core-localstorage/demo.html deleted file mode 100644 index 428ea7d..0000000 --- a/third_party/polymer/components/core-localstorage/demo.html +++ /dev/null @@ -1,41 +0,0 @@ -<!doctype html> -<html> -<head> - - <title>polymer-localstorage</title> - - <script src="../platform/platform.js"></script> - - <link rel="import" href="core-localstorage.html"> - -</head> -<body> - - <x-test1></x-test1> - - <polymer-element name="x-test1" noscript> - <template> - string entered below will be stored in localStorage and automatically retrived from localStorage when the page is reloaded<br> - <input value="{{value}}"> - <core-localstorage name="polymer-localstorage-x-test1" value="{{value}}"></core-localstorage> - </template> - </polymer-element> - - <br><br> - - <x-test2></x-test2> - - <polymer-element name="x-test2"> - <template> - <input type="checkbox" checked="{{mode}}"> - <core-localstorage name="polymer-localstorage-x-test2" value="{{mode}}"></core-localstorage> - </template> - <script> - Polymer('x-test2', { - mode: false - }); - </script> - </polymer-element> - -</body> -</html> diff --git a/third_party/polymer/components/core-localstorage/index.html b/third_party/polymer/components/core-localstorage/index.html deleted file mode 100644 index 58856f3..0000000 --- a/third_party/polymer/components/core-localstorage/index.html +++ /dev/null @@ -1,22 +0,0 @@ -<!doctype html> -<!-- -Copyright (c) 2014 The Polymer Project Authors. All rights reserved. -This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE -The complete set of authors may be found at http://polymer.github.io/AUTHORS -The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS -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 ---> -<html> -<head> - - <script src="../platform/platform.js"></script> - <link rel="import" href="../core-component-page/core-component-page.html"> - -</head> -<body unresolved> - - <core-component-page></core-component-page> - -</body> -</html> diff --git a/third_party/polymer/components/core-media-query/.bower.json b/third_party/polymer/components/core-media-query/.bower.json deleted file mode 100644 index 1d58491..0000000 --- a/third_party/polymer/components/core-media-query/.bower.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "name": "core-media-query", - "private": true, - "dependencies": { - "polymer": "Polymer/polymer#>=0.3.0 <1.0.0" - }, - "homepage": "https://github.com/Polymer/core-media-query", - "version": "0.3.5", - "_release": "0.3.5", - "_resolution": { - "type": "version", - "tag": "0.3.5", - "commit": "a6e34b10bc9a8cf0a5bcefec818ac0d9f3fca1b2" - }, - "_source": "git://github.com/Polymer/core-media-query.git", - "_target": "0.3.5", - "_originalSource": "Polymer/core-media-query" -}
\ No newline at end of file diff --git a/third_party/polymer/components/core-media-query/README.md b/third_party/polymer/components/core-media-query/README.md deleted file mode 100644 index 2eeb93e..0000000 --- a/third_party/polymer/components/core-media-query/README.md +++ /dev/null @@ -1,4 +0,0 @@ -core-media-query -================ - -See the [component page](http://polymer-project.org/docs/elements/core-elements.html#core-media-query) for more information. diff --git a/third_party/polymer/components/core-media-query/bower.json b/third_party/polymer/components/core-media-query/bower.json deleted file mode 100644 index 4dff6e2..0000000 --- a/third_party/polymer/components/core-media-query/bower.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "name": "core-media-query", - "private": true, - "dependencies": { - "polymer": "Polymer/polymer#>=0.3.0 <1.0.0" - } -}
\ No newline at end of file diff --git a/third_party/polymer/components/core-media-query/core-media-query.html b/third_party/polymer/components/core-media-query/core-media-query.html deleted file mode 100644 index 20cfd09..0000000 --- a/third_party/polymer/components/core-media-query/core-media-query.html +++ /dev/null @@ -1,87 +0,0 @@ -<!-- -Copyright (c) 2014 The Polymer Project Authors. All rights reserved. -This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt -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 ---> -<!-- -/** - * @group Polymer Core Elements - * @element core-media-query - * @status beta - * @homepage github.io - * - * core-media-query can be used to data bind to a CSS media query. - * The "query" property is a bare CSS media query. - * The "queryMatches" property will be a boolean representing if the page matches that media query. - * - * core-media-query uses media query listeners to dynamically update the "queryMatches" property. - * A "core-media-change" event also fires when queryMatches changes. - * - * Example: - * - * <core-media-query query="max-width: 640px" queryMatches="{{phoneScreen}}"></core-media-query> - * - */ - - /** - * Fired when the media query state changes - * - * @event core-media-change - */ ---> -<link rel="import" href="../polymer/polymer.html"> - -<polymer-element name="core-media-query" attributes="query queryMatches"> - <template> - <style> - :host { - display: none; - } - </style> - </template> - <script> - Polymer('core-media-query', { - - /** - * The Boolean return value of the media query - * - * @attribute queryMatches - * @type Boolean - * @default false - */ - queryMatches: false, - - /** - * The CSS media query to evaulate - * - * @attribute query - * @type string - * @default '' - */ - query: '', - ready: function() { - this._mqHandler = this.queryHandler.bind(this); - this._mq = null; - }, - queryChanged: function() { - if (this._mq) { - this._mq.removeListener(this._mqHandler); - } - var query = this.query; - if (query[0] !== '(') { - query = '(' + this.query + ')'; - } - this._mq = window.matchMedia(query); - this._mq.addListener(this._mqHandler); - this.queryHandler(this._mq); - }, - queryHandler: function(mq) { - this.queryMatches = mq.matches; - this.asyncFire('core-media-change', mq); - } - }); - </script> -</polymer-element> diff --git a/third_party/polymer/components/core-media-query/demo.html b/third_party/polymer/components/core-media-query/demo.html deleted file mode 100644 index b45494a..0000000 --- a/third_party/polymer/components/core-media-query/demo.html +++ /dev/null @@ -1,44 +0,0 @@ -<!DOCTYPE html> -<!-- -Copyright (c) 2014 The Polymer Project Authors. All rights reserved. -This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt -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 ---> -<html lang="en"> -<head> - <meta charset="UTF-8"> - <title>Polymer match media</title> - <script src="../platform/platform.js"></script> - <link rel="import" href="core-media-query.html" /> -</head> -<body> - - <polymer-element name="match-example"> - <template> - <core-media-query query="{{query}}" queryMatches="{{qMatches}}"></core-media-query> - My query of "{{query}}" {{qMatches ? "matches" : "doesn't match"}} - </template> - <script> - Polymer('match-example', { - query: 'min-width: 600px' - }); - </script> - </polymer-element> - - <match-example id="me"></match-example> - <pre id="output"> - Log of 'mediachange' events on document, from polymer-match-media: - </pre> - - <script> - var output = document.querySelector('#output'); - // on-mediachange would give true or false as second param to the handler - document.addEventListener('core-media-change', function(e) { - output.textContent += '\nevent: ' + e.type + ' query: ' + e.detail.media + ' matches: ' + e.detail.matches; - }); - </script> -</body> -</html> diff --git a/third_party/polymer/components/core-media-query/index.html b/third_party/polymer/components/core-media-query/index.html deleted file mode 100644 index 58856f3..0000000 --- a/third_party/polymer/components/core-media-query/index.html +++ /dev/null @@ -1,22 +0,0 @@ -<!doctype html> -<!-- -Copyright (c) 2014 The Polymer Project Authors. All rights reserved. -This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE -The complete set of authors may be found at http://polymer.github.io/AUTHORS -The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS -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 ---> -<html> -<head> - - <script src="../platform/platform.js"></script> - <link rel="import" href="../core-component-page/core-component-page.html"> - -</head> -<body unresolved> - - <core-component-page></core-component-page> - -</body> -</html> diff --git a/third_party/polymer/components/core-menu-button/.bower.json b/third_party/polymer/components/core-menu-button/.bower.json deleted file mode 100644 index 032e280..0000000 --- a/third_party/polymer/components/core-menu-button/.bower.json +++ /dev/null @@ -1,22 +0,0 @@ -{ - "name": "core-menu-button", - "private": false, - "dependencies": { - "polymer": "Polymer/polymer#>=0.3.0 <1.0.0", - "core-icon-button": "Polymer/core-icon-button#>=0.3.0 <1.0.0", - "core-menu": "Polymer/core-menu#>=0.3.0 <1.0.0", - "core-overlay": "Polymer/core-overlay#>=0.3.0 <1.0.0", - "core-toolbar": "Polymer/core-toolbar#>=0.3.0 <1.0.0" - }, - "homepage": "https://github.com/Polymer/core-menu-button", - "version": "0.3.5", - "_release": "0.3.5", - "_resolution": { - "type": "version", - "tag": "0.3.5", - "commit": "9457832fed31a58b392c2a04911b209ca10252cd" - }, - "_source": "git://github.com/Polymer/core-menu-button.git", - "_target": "0.3.5", - "_originalSource": "Polymer/core-menu-button" -}
\ No newline at end of file diff --git a/third_party/polymer/components/core-menu-button/README.md b/third_party/polymer/components/core-menu-button/README.md deleted file mode 100644 index 033027e..0000000 --- a/third_party/polymer/components/core-menu-button/README.md +++ /dev/null @@ -1,2 +0,0 @@ -core-menu-button -================ diff --git a/third_party/polymer/components/core-menu-button/bower.json b/third_party/polymer/components/core-menu-button/bower.json deleted file mode 100644 index c63493e..0000000 --- a/third_party/polymer/components/core-menu-button/bower.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "name": "core-menu-button", - "private": false, - "dependencies": { - "polymer": "Polymer/polymer#>=0.3.0 <1.0.0", - "core-icon-button": "Polymer/core-icon-button#>=0.3.0 <1.0.0", - "core-menu": "Polymer/core-menu#>=0.3.0 <1.0.0", - "core-overlay": "Polymer/core-overlay#>=0.3.0 <1.0.0", - "core-toolbar": "Polymer/core-toolbar#>=0.3.0 <1.0.0" - } -}
\ No newline at end of file diff --git a/third_party/polymer/components/core-menu-button/core-menu-button.css b/third_party/polymer/components/core-menu-button/core-menu-button.css deleted file mode 100644 index 03b5bb5..0000000 --- a/third_party/polymer/components/core-menu-button/core-menu-button.css +++ /dev/null @@ -1,10 +0,0 @@ -/* -Copyright 2013 The Polymer Authors. All rights reserved. -Use of this source code is governed by a BSD-style -license that can be found in the LICENSE file. -*/ - -:host { - position: relative; - display: inline-block; -}
\ No newline at end of file diff --git a/third_party/polymer/components/core-menu-button/core-menu-button.html b/third_party/polymer/components/core-menu-button/core-menu-button.html deleted file mode 100644 index 2ec5ed4..0000000 --- a/third_party/polymer/components/core-menu-button/core-menu-button.html +++ /dev/null @@ -1,137 +0,0 @@ -<!-- -Copyright (c) 2014 The Polymer Project Authors. All rights reserved. -This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt -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 ---> -<!-- -/** - * @module Polymer Core Elements - */ -/** - * core-menu-button is a core-icon-button with a drop down menu - * that allows the user to select an option. The drop down menu is styled with - * an arrow pointing to the button, and can be positioned to the top or the - * bottom of the button with the valign property. The valign property aligns - * the menu to the left or right edge of the button. - * - * Example: - * - * <core-menu-button selected="0"> - * <core-item icon="settings" label="Settings"></core-item> - * <core-item icon="dialog" label="Dialog"></core-item> - * <core-item icon="search" label="Search"></core-item> - * </core-menu-button> - * - * @class core-menu-button - */ ---> -<link href="../polymer/polymer.html" rel="import"> -<link href="../core-icon-button/core-icon-button.html" rel="import"> -<link href="../core-menu/core-menu.html" rel="import"> -<link href="../core-overlay/core-overlay.html" rel="import"> - -<polymer-element name="core-menu-button" attributes="icon label src selected opened halign valign valueattr multi inlineMenu"> - <template> - <link rel="stylesheet" href="core-menu-button.css"> - <core-overlay target="{{$.overlay}}" opened="{{opened}}" layered?="{{!inlineMenu}}"></core-overlay> - <core-icon-button id="button" on-tap="{{toggle}}" src="{{src}}" icon="{{icon}}" active="{{opened}}"><span>{{label}}</span></core-icon-button> - <div id="overlay" halign="{{halign}}" valign="{{valign}}"> - <style> - #overlay { - position: absolute; - left: 0px; - top: 40px; - padding: 8px; - background: #fff; - border: 1px solid #ccc; - border-radius: 3px; - /* overlay styling must be complete */ - font-size: 1rem; - } - - core-menu { - margin: 0; - } - - #overlay[halign=right] { - left: auto; - right: 0px; - } - - #overlay[valign=top] { - top: auto; - bottom: 40px; - } - </style> - <core-menu id="menu" selected="{{selected}}" selectedItem="{{selectedItem}}" selectedClass="{{selectedClass}}" valueattr="{{valueattr}}" multi="{{multi}}" on-core-select="{{closeAction}}"> - <content select="*"></content> - </core-menu> - </div> - </template> - <script> - Polymer('core-menu-button', { - /** - * The icon to display. - * @attribute icon - * @type string - */ - icon: 'dots', - src: '', - /** - * The index of the selected menu item. - * @attribute selected - * @type number - */ - selected: '', - /** - * Set to true to open the menu. - * @attribute opened - * @type boolean - */ - opened: false, - /** - * Set to true to cause the menu popup to be displayed inline rather - * than in its own layer. - * @attribute inlineMenu - * @type boolean - */ - inlineMenu: false, - /** - * Horizontally align the overlay with the button. Accepted values are - * ["left", "center", "right"]. - * @attribute halign - * @type string - */ - halign: 'center', - /** - * Display the overlay on top or below the button. Accepted values are - * ["top", "bottom"]. - * @attribute valign - * @type string - */ - valign: 'bottom', - multi: false, - closeAction: function() { - this.opened = false; - }, - /** - * Toggle the opened state of the dropdown. - * @method toggle - */ - toggle: function() { - this.opened = !this.opened; - }, - /** - * The selected menu item. - * @property selection - * @type Node - */ - get selection() { - return this.$.menu.selection; - } - }); - </script> -</polymer-element> diff --git a/third_party/polymer/components/core-menu-button/demo.html b/third_party/polymer/components/core-menu-button/demo.html deleted file mode 100644 index 6235b31..0000000 --- a/third_party/polymer/components/core-menu-button/demo.html +++ /dev/null @@ -1,90 +0,0 @@ - -<!doctype html> -<!-- -Copyright 2013 The Polymer Authors. All rights reserved. -Use of this source code is governed by a BSD-style -license that can be found in the LICENSE file. ---> -<html> -<head> - <title>core-menu-button</title> - <script src="../platform/platform.js"></script> - <link rel="import" href="core-menu-button.html"> - <link rel="import" href="../core-item/core-item.html"> - <link rel="import" href="../core-toolbar/core-toolbar.html"> - <style> - body { - margin: 0; - font-family: sans-serif; - } - - core-toolbar { - background-color: #cfa0e9; - overflow: hidden; - } - - .small::shadow core-icon-button { - padding: 12px; - } - - .small::shadow core-icon-button::shadow core-icon { - display: block; - height: 14px; - width: 14px; - } - - </style> -</head> -<body class="core-body-text" unresolved> - - - <br> - <br> - <br> - <br> - <br> - <br> - <br> - <br> - <br> - <br> - <core-toolbar> - - <core-menu-button icon="menu"> - - <core-item icon="settings" label="Settings"></core-item> - <core-item icon="add" label="Add"></core-item> - <core-item icon="search" label="Search"></core-item> - - </core-menu-button> - - <core-menu-button icon="menu" class="small"> - - <core-item icon="settings" label="Settings"></core-item> - <core-item icon="add" label="Add"></core-item> - <core-item icon="search" label="Search"></core-item> - - </core-menu-button> - - <div core-flex>Toolbar</div> - - <core-menu-button icon="add" halign="right"> - - <core-item icon="star-rate" label="Rate"></core-item> - <core-item icon="today" label="Today"></core-item> - <core-item icon="keep" label="Keep"></core-item> - - </core-menu-button> - - <core-menu-button icon="more-vert" halign="right" valign="top"> - - <core-item icon="visibility" label="Visibility"></core-item> - <core-item icon="extension" label="Extension"></core-item> - <core-item icon="info" label="Info"></core-item> - - </core-menu-button> - - </core-toolbar> - -</body> -</html> diff --git a/third_party/polymer/components/core-menu-button/index.html b/third_party/polymer/components/core-menu-button/index.html deleted file mode 100644 index 58856f3..0000000 --- a/third_party/polymer/components/core-menu-button/index.html +++ /dev/null @@ -1,22 +0,0 @@ -<!doctype html> -<!-- -Copyright (c) 2014 The Polymer Project Authors. All rights reserved. -This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE -The complete set of authors may be found at http://polymer.github.io/AUTHORS -The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS -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 ---> -<html> -<head> - - <script src="../platform/platform.js"></script> - <link rel="import" href="../core-component-page/core-component-page.html"> - -</head> -<body unresolved> - - <core-component-page></core-component-page> - -</body> -</html> diff --git a/third_party/polymer/components/core-menu-button/metadata.html b/third_party/polymer/components/core-menu-button/metadata.html deleted file mode 100644 index 7f9f545..0000000 --- a/third_party/polymer/components/core-menu-button/metadata.html +++ /dev/null @@ -1,17 +0,0 @@ -<x-meta id="core-menu-button" label="Menu Button" group="Core" isContainer> - - <template> - <core-menu-button icon="more-vert" selected="0"> - <core-item icon="content-cut" label="Cut"></core-item> - <core-item icon="content-copy" label="Copy"></core-item> - <core-item icon="content-paste" label="Paste"></core-item> - </core-menu-button> - </template> - - <template id="imports"> - <link rel="import" href="core-menu-button.html"> - <link rel="import" href="../core-icons/core-icons.html"> - <link rel="import" href="../core-item/core-item.html"> - </template> - -</x-meta>
\ No newline at end of file diff --git a/third_party/polymer/components/core-menu/.bower.json b/third_party/polymer/components/core-menu/.bower.json deleted file mode 100644 index ebd2e88..0000000 --- a/third_party/polymer/components/core-menu/.bower.json +++ /dev/null @@ -1,20 +0,0 @@ -{ - "name": "core-menu", - "private": true, - "dependencies": { - "core-selector": "Polymer/core-selector#>=0.3.0 <1.0.0", - "core-collapse": "Polymer/core-collapse#>=0.3.0 <1.0.0", - "core-item": "Polymer/core-item#>=0.3.0 <1.0.0" - }, - "homepage": "https://github.com/Polymer/core-menu", - "version": "0.3.5", - "_release": "0.3.5", - "_resolution": { - "type": "version", - "tag": "0.3.5", - "commit": "854fbf7e6e3a6cc406a50825733796f66ae588cc" - }, - "_source": "git://github.com/Polymer/core-menu.git", - "_target": "0.3.5", - "_originalSource": "Polymer/core-menu" -}
\ No newline at end of file diff --git a/third_party/polymer/components/core-menu/README.md b/third_party/polymer/components/core-menu/README.md deleted file mode 100644 index a6b2cfd..0000000 --- a/third_party/polymer/components/core-menu/README.md +++ /dev/null @@ -1,4 +0,0 @@ -core-menu -========= - -See the [component page](http://polymer-project.org/docs/elements/core-elements.html#core-menu) for more information. diff --git a/third_party/polymer/components/core-menu/bower.json b/third_party/polymer/components/core-menu/bower.json deleted file mode 100644 index 3f49f80..0000000 --- a/third_party/polymer/components/core-menu/bower.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "name": "core-menu", - "private": true, - "dependencies": { - "core-selector": "Polymer/core-selector#>=0.3.0 <1.0.0", - "core-collapse": "Polymer/core-collapse#>=0.3.0 <1.0.0", - "core-item": "Polymer/core-item#>=0.3.0 <1.0.0" - } -}
\ No newline at end of file diff --git a/third_party/polymer/components/core-menu/core-menu.css b/third_party/polymer/components/core-menu/core-menu.css deleted file mode 100644 index 7cf6ab5..0000000 --- a/third_party/polymer/components/core-menu/core-menu.css +++ /dev/null @@ -1,18 +0,0 @@ -/* -Copyright (c) 2014 The Polymer Project Authors. All rights reserved. -This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt -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 -*/ - -html /deep/ core-menu { - display: block; - margin: 12px; -} - -polyfill-next-selector { content: 'core-menu > core-item'; } -html /deep/ core-menu::shadow ::content > core-item { - cursor: default; -} diff --git a/third_party/polymer/components/core-menu/core-menu.html b/third_party/polymer/components/core-menu/core-menu.html deleted file mode 100644 index e9aba77..0000000 --- a/third_party/polymer/components/core-menu/core-menu.html +++ /dev/null @@ -1,62 +0,0 @@ -<!-- -Copyright (c) 2014 The Polymer Project Authors. All rights reserved. -This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt -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 ---> - -<!-- -`core-menu` is a selector which styles to looks like a menu. - - <core-menu selected="0"> - <core-item icon="settings" label="Settings"></core-item> - <core-item icon="dialog" label="Dialog"></core-item> - <core-item icon="search" label="Search"></core-item> - </core-menu> - -When an item is selected the `core-selected` class is added to it. The user can -use the class to add more stylings to the selected item. - - core-item.core-selected { - color: red; - } - -The `selectedItem` property references the selected item. - - <core-menu selected="0" selectedItem="{{item}}"> - <core-item icon="settings" label="Settings"></core-item> - <core-item icon="dialog" label="Dialog"></core-item> - <core-item icon="search" label="Search"></core-item> - </core-menu> - - <div>selected label: {{item.label}}</div> - -The `core-select` event signals selection change. - - <core-menu selected="0" on-core-select="{{selectAction}}"> - <core-item icon="settings" label="Settings"></core-item> - <core-item icon="dialog" label="Dialog"></core-item> - <core-item icon="search" label="Search"></core-item> - </core-menu> - - ... - - selectAction: function(e, detail) { - if (detail.isSelected) { - var selectedItem = detail.item; - ... - } - } - -@group Polymer Core Elements -@element core-menu -@extends core-selector ---> - -<link rel="import" href="../core-selector/core-selector.html"> - -<link rel="stylesheet" href="core-menu.css" shim-shadowdom> - -<polymer-element name="core-menu" extends="core-selector" noscript></polymer-element> diff --git a/third_party/polymer/components/core-menu/core-submenu.css b/third_party/polymer/components/core-menu/core-submenu.css deleted file mode 100644 index 54c7f5b..0000000 --- a/third_party/polymer/components/core-menu/core-submenu.css +++ /dev/null @@ -1,29 +0,0 @@ -/* -Copyright (c) 2014 The Polymer Project Authors. All rights reserved. -This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE -The complete set of authors may be found at http://polymer.github.io/AUTHORS -The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS -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 -*/ - -:host { - display: block; - height: auto; -} - -:host(.core-selected, [active]) { - font-weight: initial; -} - -core-item { - cursor: default; -} - -::content > core-item { - cursor: default; -} - -#submenu { - margin: 0 0 0 44px; -} diff --git a/third_party/polymer/components/core-menu/core-submenu.html b/third_party/polymer/components/core-menu/core-submenu.html deleted file mode 100644 index 42e422a..0000000 --- a/third_party/polymer/components/core-menu/core-submenu.html +++ /dev/null @@ -1,106 +0,0 @@ -<!-- -Copyright (c) 2014 The Polymer Project Authors. All rights reserved. -This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE -The complete set of authors may be found at http://polymer.github.io/AUTHORS -The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS -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 ---> - -<!-- -Use to create nested menus inside of `core-menu` elements. - - <core-menu selected="0"> - - <core-submenu icon="settings" label="Topics"> - <core-item label="Topic 1"></core-item> - <core-item label="Topic 2"></core-item> - </core-submenu> - - <core-submenu icon="settings" label="Favorites"> - <core-item label="Favorite 1"></core-item> - <core-item label="Favorite 2"></core-item> - <core-item label="Favorite 3"></core-item> - </core-submenu> - - </core-menu> - -There is a margin set on the submenu to indent the items. -You can override the margin by doing: - - core-submenu::shadow #submenu { - margin-left: 20px; - } - -@group Polymer Core Elements -@element core-submenu -@extends core-item ---> - -<link rel="import" href="../core-item/core-item.html"> -<link rel="import" href="../core-menu/core-menu.html"> -<link rel="import" href="../core-collapse/core-collapse.html"> - -<polymer-element name="core-submenu" attributes="selected selectedItem label icon src valueattr"> -<template> - - <link rel="stylesheet" href="core-submenu.css"> - - <core-item src="{{src}}" label="{{label}}" icon="{{icon}}" class="{{ {'core-selected' : active} | tokenList}}" on-tap="{{activate}}"> - <content select=".item-content"></content> - </core-item> - - <core-menu id="submenu" selected="{{selected}}" selectedItem="{{selectedItem}}" valueattr="{{valueattr}}"> - <content></content> - </core-menu> - - <core-collapse target="{{$.submenu}}" opened="{{opened}}"></core-collapse> - -</template> -<script> - - Polymer('core-submenu', { - - publish: { - active: {value: false, reflect: true} - }, - - opened: false, - - get items() { - return this.$.submenu.items; - }, - - hasItems: function() { - return !!this.items.length; - }, - - unselectAllItems: function() { - this.$.submenu.selected = null; - this.$.submenu.clearSelection(); - }, - - activeChanged: function() { - if (this.hasItems()) { - this.opened = this.active; - } - if (!this.active) { - this.unselectAllItems(); - } - }, - - toggle: function() { - this.opened = !this.opened; - }, - - activate: function() { - if (this.hasItems() && this.active) { - this.toggle(); - this.unselectAllItems(); - } - } - - }); - -</script> -</polymer-element> diff --git a/third_party/polymer/components/core-menu/demo.html b/third_party/polymer/components/core-menu/demo.html deleted file mode 100644 index edb9581..0000000 --- a/third_party/polymer/components/core-menu/demo.html +++ /dev/null @@ -1,101 +0,0 @@ -<!doctype html> -<!-- -Copyright (c) 2014 The Polymer Project Authors. All rights reserved. -This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt -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 ---> -<html> -<head> - - <title>core-menu</title> - - <script src="../platform/platform.js"></script> - - <link rel="import" href="../core-icons/core-icons.html"> - <link rel="import" href="core-menu.html"> - <link rel="import" href="core-submenu.html"> - <link rel="import" href="../core-item/core-item.html"> - - <style> - - body { - font-family: sans-serif; - margin: 20px; - } - - section { - width: 300px; - } - - .dark { - background-color: #333; - } - - .dark core-item { - color: #fafafa; - fill: #fafafa; - } - - </style> - -</head> -<body> - - <h2>simple menu:</h2> - - <section> - - <core-menu selected="0"> - - <core-item icon="settings" label="Settings"></core-item> - <core-item icon="favorite" label="Favorite"></core-item> - <core-item icon="account-box" label="Account"></core-item> - - </core-menu> - - </section> - - <h2>simple menu:</h2> - - <section class="dark"> - - <core-menu selected="0"> - - <core-item icon="settings" label="Settings"></core-item> - <core-item icon="favorite" label="Favorite"></core-item> - <core-item icon="account-box" label="Account"></core-item> - - </core-menu> - - </section> - - <h2>submenu:</h2> - - <section> - - <core-menu selected="0"> - - <core-submenu icon="settings" label="Topics"> - - <core-item label="Topic 1"></core-item> - <core-item label="Topic 2"></core-item> - - </core-submenu> - - <core-submenu icon="settings" label="Favorites"> - - <core-item label="Favorite 1"></core-item> - <core-item label="Favorite 2"></core-item> - <core-item label="Favorite 3"></core-item> - - </core-submenu> - - </core-menu> - - </section> - -</body> -</html> diff --git a/third_party/polymer/components/core-menu/index.html b/third_party/polymer/components/core-menu/index.html deleted file mode 100644 index 524991f..0000000 --- a/third_party/polymer/components/core-menu/index.html +++ /dev/null @@ -1,22 +0,0 @@ -<!doctype html> -<!-- -Copyright (c) 2014 The Polymer Project Authors. All rights reserved. -This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE -The complete set of authors may be found at http://polymer.github.io/AUTHORS -The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS -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 ---> -<html> -<head> - - <script src="../platform/platform.js"></script> - <link rel="import" href="../core-component-page/core-component-page.html"> - -</head> -<body unresolved> - - <core-component-page sources='["core-menu.html", "core-submenu.html", "../core-selector/core-selector.html"]'></core-component-page> - -</body> -</html> diff --git a/third_party/polymer/components/core-menu/metadata.html b/third_party/polymer/components/core-menu/metadata.html deleted file mode 100644 index 4fa1f39..0000000 --- a/third_party/polymer/components/core-menu/metadata.html +++ /dev/null @@ -1,53 +0,0 @@ -<x-meta id="core-menu" label="Menu" group="Core" isContainer> - - <template> - - <core-menu selected="0" style="font-size: 16px;"> - - <core-submenu icon="settings" label="Topics"> - - <core-item label="Topic 1"></core-item> - <core-item label="Topic 2"></core-item> - - </core-submenu> - - <core-submenu icon="settings" label="Favorites"> - - <core-item label="Favorite 1"></core-item> - <core-item label="Favorite 2"></core-item> - <core-item label="Favorite 3"></core-item> - - </core-submenu> - - </core-menu> - - </template> - - <template id="imports"> - - <link rel="import" href="core-submenu.html"> - - </template> - -</x-meta> - -<x-meta id="core-submenu" label="Sub Menu" group="Core" isContainer> - - <template> - - <core-submenu icon="settings" label="Topics"> - - <core-item label="Topic 1"></core-item> - <core-item label="Topic 2"></core-item> - - </core-submenu> - - </template> - - <template id="imports"> - - <link rel="import" href="core-submenu.html"> - - </template> - -</x-meta> diff --git a/third_party/polymer/components/core-meta/.bower.json b/third_party/polymer/components/core-meta/.bower.json deleted file mode 100644 index 561477b..0000000 --- a/third_party/polymer/components/core-meta/.bower.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "name": "core-meta", - "private": true, - "dependencies": { - "polymer": "Polymer/polymer#>=0.3.0 <1.0.0" - }, - "homepage": "https://github.com/Polymer/core-meta", - "version": "0.3.5", - "_release": "0.3.5", - "_resolution": { - "type": "version", - "tag": "0.3.5", - "commit": "4d2a4cf723403a6ee0575e3863be843648db32ec" - }, - "_source": "git://github.com/Polymer/core-meta.git", - "_target": "0.3.5", - "_originalSource": "Polymer/core-meta" -}
\ No newline at end of file diff --git a/third_party/polymer/components/core-meta/README.md b/third_party/polymer/components/core-meta/README.md deleted file mode 100644 index d8da644..0000000 --- a/third_party/polymer/components/core-meta/README.md +++ /dev/null @@ -1,4 +0,0 @@ -core-meta -========= - -See the [component page](http://polymer-project.org/docs/elements/core-elements.html#core-meta) for more information. diff --git a/third_party/polymer/components/core-meta/bower.json b/third_party/polymer/components/core-meta/bower.json deleted file mode 100644 index 1ae7894..0000000 --- a/third_party/polymer/components/core-meta/bower.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "name": "core-meta", - "private": true, - "dependencies": { - "polymer": "Polymer/polymer#>=0.3.0 <1.0.0" - } -}
\ No newline at end of file diff --git a/third_party/polymer/components/core-meta/core-meta.html b/third_party/polymer/components/core-meta/core-meta.html deleted file mode 100644 index c008dd5..0000000 --- a/third_party/polymer/components/core-meta/core-meta.html +++ /dev/null @@ -1,145 +0,0 @@ -<!-- -Copyright (c) 2014 The Polymer Project Authors. All rights reserved. -This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt -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 ---> - -<!-- -`core-meta` provides a method of constructing a self-organizing database. -It is useful to collate element meta-data for things like catalogs and for -designer. - -Example, an element folder has a `metadata.html` file in it, that contains a -`core-meta`, something like this: - - <core-meta id="my-element" label="My Element"> - <property name="color" value="blue"></property> - </core-meta> - -An application can import as many of these files as it wants, and then use -`core-meta` again to access the collected data. - - <script> - var meta = document.createElement('core-meta'); - console.log(meta.list); // dump a list of all meta-data elements that have been created - </script> - -Use `byId(id)` to retrive a specific core-meta. - - <script> - var meta = document.createElement('core-meta'); - console.log(meta.byId('my-element')); - </script> - -By default all meta-data are stored in a single databse. If your meta-data -have different types and want them to be stored separately, use `type` to -differentiate them. - -Example: - - <core-meta id="x-foo" type="xElt"></core-meta> - <core-meta id="x-bar" type="xElt"></core-meta> - <core-meta id="y-bar" type="yElt"></core-meta> - - <script> - var meta = document.createElement('core-meta'); - meta.type = 'xElt'; - console.log(meta.list); - </script> - -@group Polymer Core Elements -@element core-meta -@homepage github.io ---> - -<link rel="import" href="../polymer/polymer.html"> - -<polymer-element name="core-meta" attributes="label type" hidden> -<script> - - (function() { - - var SKIP_ID = 'meta'; - var metaData = {}, metaArray = {}; - - Polymer('core-meta', { - - /** - * The type of meta-data. All meta-data with the same type with be - * stored together. - * - * @attribute type - * @type string - * @default 'default' - */ - type: 'default', - - alwaysPrepare: true, - - ready: function() { - this.register(this.id); - }, - - get metaArray() { - var t = this.type; - if (!metaArray[t]) { - metaArray[t] = []; - } - return metaArray[t]; - }, - - get metaData() { - var t = this.type; - if (!metaData[t]) { - metaData[t] = {}; - } - return metaData[t]; - }, - - register: function(id, old) { - if (id && id !== SKIP_ID) { - this.unregister(this, old); - this.metaData[id] = this; - this.metaArray.push(this); - } - }, - - unregister: function(meta, id) { - delete this.metaData[id || meta.id]; - var i = this.metaArray.indexOf(meta); - if (i >= 0) { - this.metaArray.splice(i, 1); - } - }, - - /** - * Returns a list of all meta-data elements with the same type. - * - * @property list - * @type array - * @default [] - */ - get list() { - return this.metaArray; - }, - - /** - * Retrieves meta-data by ID. - * - * @method byId - * @param {String} id The ID of the meta-data to be returned. - * @returns Returns meta-data. - */ - byId: function(id) { - return this.metaData[id]; - } - - }); - - })(); - -</script> -</polymer-element> diff --git a/third_party/polymer/components/core-meta/demo.html b/third_party/polymer/components/core-meta/demo.html deleted file mode 100644 index dbcf01e..0000000 --- a/third_party/polymer/components/core-meta/demo.html +++ /dev/null @@ -1,58 +0,0 @@ -<!DOCTYPE html> -<!-- -Copyright (c) 2014 The Polymer Project Authors. All rights reserved. -This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt -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 ---> -<html> -<head> - <title>core-meta</title> - - <script src="../platform/platform.js"></script> - <link rel="import" href="core-meta.html"> -</head> - -<body> - - <core-meta id="x-foo" label="foo"></core-meta> - <core-meta id="x-bar" label="bar"></core-meta> - <core-meta id="x-zot" label="zot"></core-meta> - - <core-meta id="apple" label="apple" type="fruit"></core-meta> - <core-meta id="orange" label="orange" type="fruit"></core-meta> - <core-meta id="grape" label="grape" type="fruit"></core-meta> - - <h2>meta-data</h2> - - <template id="default" repeat="{{metadata}}"> - <div>{{label}}</div> - </template> - - <h2>meta-data (type: fruit)</h2> - - <template id="fruit" repeat="{{metadata}}"> - <div>{{label}}</div> - </template> - - <script> - - document.addEventListener('polymer-ready', function() { - var meta = document.createElement('core-meta'); - document.querySelector('template#default').model = { - metadata: meta.list - }; - - var fruitMeta = document.createElement('core-meta'); - fruitMeta.type = 'fruit'; - document.querySelector('template#fruit').model = { - metadata: fruitMeta.list - }; - }); - - </script> - -</body> -</html> diff --git a/third_party/polymer/components/core-meta/index.html b/third_party/polymer/components/core-meta/index.html deleted file mode 100644 index 58856f3..0000000 --- a/third_party/polymer/components/core-meta/index.html +++ /dev/null @@ -1,22 +0,0 @@ -<!doctype html> -<!-- -Copyright (c) 2014 The Polymer Project Authors. All rights reserved. -This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE -The complete set of authors may be found at http://polymer.github.io/AUTHORS -The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS -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 ---> -<html> -<head> - - <script src="../platform/platform.js"></script> - <link rel="import" href="../core-component-page/core-component-page.html"> - -</head> -<body unresolved> - - <core-component-page></core-component-page> - -</body> -</html> diff --git a/third_party/polymer/components/core-overlay/.bower.json b/third_party/polymer/components/core-overlay/.bower.json deleted file mode 100644 index b3df2b6..0000000 --- a/third_party/polymer/components/core-overlay/.bower.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "name": "core-overlay", - "private": true, - "dependencies": { - "polymer": "Polymer/polymer#>=0.3.0 <1.0.0", - "core-transition": "Polymer/core-transition#>=0.3.0 <1.0.0" - }, - "homepage": "https://github.com/Polymer/core-overlay", - "version": "0.3.5", - "_release": "0.3.5", - "_resolution": { - "type": "version", - "tag": "0.3.5", - "commit": "4912afb4418ce4a173b37e09020d6622870054e2" - }, - "_source": "git://github.com/Polymer/core-overlay.git", - "_target": "0.3.5", - "_originalSource": "Polymer/core-overlay" -}
\ No newline at end of file diff --git a/third_party/polymer/components/core-overlay/README.md b/third_party/polymer/components/core-overlay/README.md deleted file mode 100644 index 54713e0..0000000 --- a/third_party/polymer/components/core-overlay/README.md +++ /dev/null @@ -1,4 +0,0 @@ -core-overlay -============ - -See the [component page](http://polymer-project.org/docs/elements/core-elements.html#core-overlay) for more information. diff --git a/third_party/polymer/components/core-overlay/bower.json b/third_party/polymer/components/core-overlay/bower.json deleted file mode 100644 index 6f91dbe..0000000 --- a/third_party/polymer/components/core-overlay/bower.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "name": "core-overlay", - "private": true, - "dependencies": { - "polymer": "Polymer/polymer#>=0.3.0 <1.0.0", - "core-transition": "Polymer/core-transition#>=0.3.0 <1.0.0" - } -}
\ No newline at end of file diff --git a/third_party/polymer/components/core-overlay/core-key-helper.html b/third_party/polymer/components/core-overlay/core-key-helper.html deleted file mode 100644 index b9fe474..0000000 --- a/third_party/polymer/components/core-overlay/core-key-helper.html +++ /dev/null @@ -1,19 +0,0 @@ -<!-- -Copyright (c) 2014 The Polymer Project Authors. All rights reserved. -This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt -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 ---> - -<link rel="import" href="../polymer/polymer.html"> - -<polymer-element name="core-key-helper"> - <script> - Polymer('core-key-helper', { - ENTER_KEY: 13, - ESCAPE_KEY: 27 - }); - </script> -</polymer-element> diff --git a/third_party/polymer/components/core-overlay/core-overlay-layer.html b/third_party/polymer/components/core-overlay/core-overlay-layer.html deleted file mode 100644 index c75ce3a..0000000 --- a/third_party/polymer/components/core-overlay/core-overlay-layer.html +++ /dev/null @@ -1,112 +0,0 @@ -<!--
-Copyright (c) 2014 The Polymer Project Authors. All rights reserved.
-This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
-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
--->
-
-<polymer-element name="core-overlay-layer">
-<template>
- <style>
- :host {
- position: fixed;
- top: 0;
- left: 0;
- z-index: 1000;
- display: none;
- }
-
- :host(.core-opened) {
- display: block;
- }
- </style>
- <content></content>
-</template>
-<script>
-(function() {
-
- Polymer('core-overlay-layer', {
- publish: {
- opened: false
- },
- openedChanged: function() {
- this.classList.toggle('core-opened', this.opened);
- },
- /**
- * Adds an element to the overlay layer
- */
- addElement: function(element) {
- if (!this.parentNode) {
- document.querySelector('body').appendChild(this);
- }
- if (element.parentNode !== this) {
- element.__contents = [];
- var ip$ = element.querySelectorAll('content');
- for (var i=0, l=ip$.length, n; (i<l) && (n = ip$[i]); i++) {
- this.moveInsertedElements(n);
- this.cacheDomLocation(n);
- n.parentNode.removeChild(n);
- element.__contents.push(n);
- }
- this.cacheDomLocation(element);
- this.updateEventController(element);
- var h = this.makeHost();
- h.shadowRoot.appendChild(element);
- element.__host = h;
- }
- },
- makeHost: function() {
- var h = document.createElement('overlay-host');
- h.createShadowRoot();
- this.appendChild(h);
- return h;
- },
- moveInsertedElements: function(insertionPoint) {
- var n$ = insertionPoint.getDistributedNodes();
- var parent = insertionPoint.parentNode;
- insertionPoint.__contents = [];
- for (var i=0, l=n$.length, n; (i<l) && (n=n$[i]); i++) {
- this.cacheDomLocation(n);
- this.updateEventController(n);
- insertionPoint.__contents.push(n);
- parent.appendChild(n);
- }
- },
- updateEventController: function(element) {
- element.eventController = this.element.findController(element);
- },
- /**
- * Removes an element from the overlay layer
- */
- removeElement: function(element) {
- element.eventController = null;
- this.replaceElement(element);
- var h = element.__host;
- if (h) {
- h.parentNode.removeChild(h);
- }
- },
- replaceElement: function(element) {
- if (element.__contents) {
- for (var i=0, c$=element.__contents, c; (c=c$[i]); i++) {
- this.replaceElement(c);
- }
- element.__contents = null;
- }
- if (element.__parentNode) {
- var n = element.__nextElementSibling && element.__nextElementSibling
- === element.__parentNode ? element.__nextElementSibling : null;
- element.__parentNode.insertBefore(element, n);
- }
- },
- cacheDomLocation: function(element) {
- element.__nextElementSibling = element.nextElementSibling;
- element.__parentNode = element.parentNode;
- }
- });
-
-})();
-</script>
-</polymer-element>
diff --git a/third_party/polymer/components/core-overlay/core-overlay.html b/third_party/polymer/components/core-overlay/core-overlay.html deleted file mode 100644 index af0136b..0000000 --- a/third_party/polymer/components/core-overlay/core-overlay.html +++ /dev/null @@ -1,676 +0,0 @@ -<!-- -Copyright (c) 2014 The Polymer Project Authors. All rights reserved. -This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt -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 ---> - -<link rel="import" href="../polymer/polymer.html"> -<link rel="import" href="../core-transition/core-transition.html"> -<link rel="import" href="core-key-helper.html"> -<link rel="import" href="core-overlay-layer.html"> - -<!-- -The `core-overlay` element displays overlayed on top of other content. It starts -out hidden and is displayed by setting its `opened` property to true. -A `core-overlay's` opened state can be toggled by calling the `toggle` -method. - -The `core-overlay` will, by default, show/hide itself when it's opened. The -`target` property may be set to another element to cause that element to -be shown when the overlay is opened. - -It's common to want a `core-overlay` to animate to its opened -position. The `core-overlay` element uses a `core-transition` to handle -animation. The default transition is `core-transition-fade` which -causes the overlay to fade in when displayed. See -<a href="../core-transition/">`core-transition`</a> for more -information about customizing a `core-overlay's` opening animation. The -`backdrop` property can be set to true to show a backdrop behind the overlay -that will darken the rest of the window. - -An element that should close the `core-overlay` will automatically -do so if it's given the `core-overlay-toggle` attribute. This attribute -can be customized with the `closeAttribute` property. You can also use -`closeSelector` if more general matching is needed. - -By default `core-overlay` will close whenever the user taps outside it or -presses the escape key. This behavior can be turned off via the -`autoCloseDisabled` property. - - <core-overlay> - <h2>Dialog</h2> - <input placeholder="say something..." autofocus> - <div>I agree with this wholeheartedly.</div> - <button core-overlay-toggle>OK</button> - </core-overlay> - -`core-overlay` will automatically size and position itself according to the -following rules. If the target's style.top and style.left are unset, the -target will be centered. The size of the target is constrained to be no larger -than the window dimensions. The `margin` property specifies the extra amount -of space that should be reserved around the overlay. This can be used to ensure -that, for example, a drop shadow is always visible around the overlay. - -@group Core Elements -@element core-overlay -@homepage github.io ---> -<!-- -Fired when the `core-overlay`'s `opened` property changes. - -@event core-overlay-open -@param {Object} detail -@param {Object} detail.opened the opened state ---> - -<style> - .core-overlay-backdrop { - position: fixed; - top: 0; - left: 0; - width: 100vw; - height: 100vh; - background-color: black; - opacity: 0; - transition: opacity 0.2s; - } - - .core-overlay-backdrop.core-opened { - opacity: 0.6; - } -</style> - -<polymer-element name="core-overlay"> -<script> -(function() { - - Polymer('core-overlay', { - - publish: { - /** - * The target element that will be shown when the overlay is - * opened. If unspecified, the core-overlay itself is the target. - * - * @attribute target - * @type Object - * @default the overlay element - */ - target: null, - - - /** - * A `core-overlay`'s size is guaranteed to be - * constrained to the window size. To achieve this, the sizingElement - * is sized with a max-height/width. By default this element is the - * target element, but it can be specifically set to a specific element - * inside the target if that is more appropriate. This is useful, for - * example, when a region inside the overlay should scroll if needed. - * - * @attribute sizingTarget - * @type Object - * @default the target element - */ - sizingTarget: null, - - /** - * Set opened to true to show an overlay and to false to hide it. - * A `core-overlay` may be made initially opened by setting its - * `opened` attribute. - * @attribute opened - * @type boolean - * @default false - */ - opened: false, - - /** - * If true, the overlay has a backdrop darkening the rest of the screen. - * The backdrop element is attached to the document body and may be styled - * with the class `core-overlay-backdrop`. When opened the `core-opened` - * class is applied. - * - * @attribute backdrop - * @type boolean - * @default false - */ - backdrop: false, - - /** - * If true, the overlay is guaranteed to display above page content. - * - * @attribute layered - * @type boolean - * @default false - */ - layered: false, - - /** - * By default an overlay will close automatically if the user - * taps outside it or presses the escape key. Disable this - * behavior by setting the `autoCloseDisabled` property to true. - * @attribute autoCloseDisabled - * @type boolean - * @default false - */ - autoCloseDisabled: false, - - /** - * This property specifies an attribute on elements that should - * close the overlay on tap. Should not set `closeSelector` if this - * is set. - * - * @attribute closeAttribute - * @type string - * @default "core-overlay-toggle" - */ - closeAttribute: 'core-overlay-toggle', - - /** - * This property specifies a selector matching elements that should - * close the overlay on tap. Should not set `closeAttribute` if this - * is set. - * - * @attribute closeSelector - * @type string - * @default "" - */ - closeSelector: '', - - /** - * A `core-overlay` target's size is constrained to the window size. - * The `margin` property specifies a pixel amount around the overlay - * that will be reserved. It's useful for ensuring that, for example, - * a shadow displayed outside the target will always be visible. - * - * @attribute margin - * @type number - * @default 0 - */ - margin: 0, - - /** - * The transition property specifies a string which identifies a - * <a href="../core-transition/">`core-transition`</a> element that - * will be used to help the overlay open and close. The default - * `core-transition-fade` will cause the overlay to fade in and out. - * - * @attribute transition - * @type string - * @default 'core-transition-fade' - */ - transition: 'core-transition-fade' - - }, - - captureEventName: 'tap', - targetListeners: { - 'tap': 'tapHandler', - 'keydown': 'keydownHandler', - 'core-transitionend': 'transitionend' - }, - - registerCallback: function(element) { - this.layer = document.createElement('core-overlay-layer'); - this.keyHelper = document.createElement('core-key-helper'); - this.meta = document.createElement('core-transition'); - this.scrim = document.createElement('div'); - this.scrim.className = 'core-overlay-backdrop'; - }, - - ready: function() { - this.target = this.target || this; - // flush to ensure styles are installed before paint - Platform.flush(); - }, - - /** - * Toggle the opened state of the overlay. - * @method toggle - */ - toggle: function() { - this.opened = !this.opened; - }, - - /** - * Open the overlay. This is equivalent to setting the `opened` - * property to true. - * @method open - */ - open: function() { - this.opened = true; - }, - - /** - * Close the overlay. This is equivalent to setting the `opened` - * property to false. - * @method close - */ - close: function() { - this.opened = false; - }, - - domReady: function() { - this.ensureTargetSetup(); - }, - - targetChanged: function(old) { - if (this.target) { - // really make sure tabIndex is set - if (this.target.tabIndex < 0) { - this.target.tabIndex = -1; - } - this.addElementListenerList(this.target, this.targetListeners); - this.target.style.display = 'none'; - } - if (old) { - this.removeElementListenerList(old, this.targetListeners); - var transition = this.getTransition(); - if (transition) { - transition.teardown(old); - } else { - old.style.position = ''; - old.style.outline = ''; - } - old.style.display = ''; - } - }, - - // NOTE: wait to call this until we're as sure as possible that target - // is styled. - ensureTargetSetup: function() { - if (!this.target || this.target.__overlaySetup) { - return; - } - this.target.__overlaySetup = true; - this.target.style.display = ''; - var transition = this.getTransition(); - if (transition) { - transition.setup(this.target); - } - var computed = getComputedStyle(this.target); - this.targetStyle = { - position: computed.position === 'static' ? 'fixed' : - computed.position - } - if (!transition) { - this.target.style.position = this.targetStyle.position; - this.target.style.outline = 'none'; - } - this.target.style.display = 'none'; - }, - - openedChanged: function() { - this.transitioning = true; - this.ensureTargetSetup(); - this.prepareRenderOpened(); - // continue styling after delay so display state can change - // without aborting transitions - // note: we wait a full frame so that transition changes executed - // during measuring do not cause transition - this.async(function() { - this.target.style.display = ''; - this.async('renderOpened'); - }); - this.fire('core-overlay-open', this.opened); - }, - - // tasks which must occur before opening; e.g. making the element visible - prepareRenderOpened: function() { - if (this.opened) { - addOverlay(this); - } - this.prepareBackdrop(); - // async so we don't auto-close immediately via a click. - this.async(function() { - if (!this.autoCloseDisabled) { - this.enableElementListener(this.opened, document, - this.captureEventName, 'captureHandler', true); - } - }); - this.enableElementListener(this.opened, window, 'resize', - 'resizeHandler'); - - if (this.opened) { - // TODO(sorvell): force SD Polyfill to render - forcePolyfillRender(this.target); - if (!this._shouldPosition) { - this.target.style.position = 'absolute'; - var computed = getComputedStyle(this.target); - var t = (computed.top === 'auto' && computed.bottom === 'auto'); - var l = (computed.left === 'auto' && computed.right === 'auto'); - this.target.style.position = this.targetStyle.position; - this._shouldPosition = {top: t, left: l}; - } - // if we are showing, then take care when measuring - this.prepareMeasure(this.target); - this.updateTargetDimensions(); - this.finishMeasure(this.target); - if (this.layered) { - this.layer.addElement(this.target); - this.layer.opened = this.opened; - } - } - }, - - // tasks which cause the overlay to actually open; typically play an - // animation - renderOpened: function() { - var transition = this.getTransition(); - if (transition) { - transition.go(this.target, {opened: this.opened}); - } else { - this.transitionend(); - } - this.renderBackdropOpened(); - }, - - // finishing tasks; typically called via a transition - transitionend: function(e) { - // make sure this is our transition event. - if (e && e.target !== this.target) { - return; - } - this.transitioning = false; - if (!this.opened) { - this.resetTargetDimensions(); - this.target.style.display = 'none'; - this.completeBackdrop(); - removeOverlay(this); - if (this.layered) { - if (!currentOverlay()) { - this.layer.opened = this.opened; - } - this.layer.removeElement(this.target); - } - } - this.applyFocus(); - }, - - prepareBackdrop: function() { - if (this.backdrop && this.opened) { - if (!this.scrim.parentNode) { - document.body.appendChild(this.scrim); - this.scrim.style.zIndex = currentOverlayZ() - 1; - } - trackBackdrop(this); - } - }, - - renderBackdropOpened: function() { - if (this.backdrop && getBackdrops().length < 2) { - this.scrim.classList.toggle('core-opened', this.opened); - } - }, - - completeBackdrop: function() { - if (this.backdrop) { - trackBackdrop(this); - if (getBackdrops().length === 0) { - this.scrim.parentNode.removeChild(this.scrim); - } - } - }, - - prepareMeasure: function(target) { - target.style.transition = target.style.webkitTransition = 'none'; - target.style.transform = target.style.webkitTransform = 'none'; - target.style.display = ''; - }, - - finishMeasure: function(target) { - target.style.display = 'none'; - target.style.transform = target.style.webkitTransform = ''; - target.style.transition = target.style.webkitTransition = ''; - }, - - getTransition: function() { - return this.meta.byId(this.transition); - }, - - getFocusNode: function() { - return this.target.querySelector('[autofocus]') || this.target; - }, - - applyFocus: function() { - var focusNode = this.getFocusNode(); - if (this.opened) { - focusNode.focus(); - } else { - focusNode.blur(); - if (currentOverlay() == this) { - console.warn('Current core-overlay is attempting to focus itself as next! (bug)'); - } else { - focusOverlay(); - } - } - }, - - updateTargetDimensions: function() { - this.positionTarget(); - this.sizeTarget(); - // - if (this.layered) { - var rect = this.target.getBoundingClientRect(); - this.target.style.top = rect.top + 'px'; - this.target.style.left = rect.left + 'px'; - this.target.style.right = this.target.style.bottom = 'auto'; - } - }, - - sizeTarget: function() { - var sizer = this.sizingTarget || this.target; - var rect = sizer.getBoundingClientRect(); - var mt = rect.top === this.margin ? this.margin : this.margin * 2; - var ml = rect.left === this.margin ? this.margin : this.margin * 2; - var h = window.innerHeight - rect.top - mt; - var w = window.innerWidth - rect.left - ml; - sizer.style.maxHeight = h + 'px'; - sizer.style.maxWidth = w + 'px'; - sizer.style.boxSizing = 'border-box'; - }, - - positionTarget: function() { - // vertically and horizontally center if not positioned - if (this._shouldPosition.top) { - var t = Math.max((window.innerHeight - - this.target.offsetHeight - this.margin*2) / 2, this.margin); - this.target.style.top = t + 'px'; - } - if (this._shouldPosition.left) { - var l = Math.max((window.innerWidth - - this.target.offsetWidth - this.margin*2) / 2, this.margin); - this.target.style.left = l + 'px'; - } - }, - - resetTargetDimensions: function() { - this.target.style.top = this.target.style.left = ''; - this.target.style.right = this.target.style.bottom = ''; - this.target.style.width = this.target.style.height = ''; - this._shouldPosition = null; - }, - - tapHandler: function(e) { - // closeSelector takes precedence since closeAttribute has a default non-null value. - if (e.target && - (this.closeSelector && e.target.matches(this.closeSelector)) || - (this.closeAttribute && e.target.hasAttribute(this.closeAttribute))) { - this.toggle(); - } else { - if (this.autoCloseJob) { - this.autoCloseJob.stop(); - this.autoCloseJob = null; - } - } - }, - - // We use the traditional approach of capturing events on document - // to to determine if the overlay needs to close. However, due to - // ShadowDOM event retargeting, the event target is not useful. Instead - // of using it, we attempt to close asynchronously and prevent the close - // if a tap event is immediately heard on the target. - // TODO(sorvell): This approach will not work with modal. For - // this we need a scrim. - captureHandler: function(e) { - if (!this.autoCloseDisabled && (currentOverlay() == this)) { - this.autoCloseJob = this.job(this.autoCloseJob, function() { - this.close(); - }); - } - }, - - keydownHandler: function(e) { - if (!this.autoCloseDisabled && (e.keyCode == this.keyHelper.ESCAPE_KEY)) { - this.close(); - e.stopPropagation(); - } - }, - - /** - * Extensions of core-overlay should implement the `resizeHandler` - * method to adjust the size and position of the overlay when the - * browser window resizes. - * @method resizeHandler - */ - resizeHandler: function() { - this.updateTargetDimensions(); - }, - - // TODO(sorvell): these utility methods should not be here. - addElementListenerList: function(node, events) { - for (var i in events) { - this.addElementListener(node, i, events[i]); - } - }, - - removeElementListenerList: function(node, events) { - for (var i in events) { - this.removeElementListener(node, i, events[i]); - } - }, - - enableElementListener: function(enable, node, event, methodName, capture) { - if (enable) { - this.addElementListener(node, event, methodName, capture); - } else { - this.removeElementListener(node, event, methodName, capture); - } - }, - - addElementListener: function(node, event, methodName, capture) { - var fn = this._makeBoundListener(methodName); - if (node && fn) { - Polymer.addEventListener(node, event, fn, capture); - } - }, - - removeElementListener: function(node, event, methodName, capture) { - var fn = this._makeBoundListener(methodName); - if (node && fn) { - Polymer.removeEventListener(node, event, fn, capture); - } - }, - - _makeBoundListener: function(methodName) { - var self = this, method = this[methodName]; - if (!method) { - return; - } - var bound = '_bound' + methodName; - if (!this[bound]) { - this[bound] = function(e) { - method.call(self, e); - } - } - return this[bound]; - }, - }); - - function forcePolyfillRender(target) { - if (window.ShadowDOMPolyfill) { - target.offsetHeight; - } - } - - // TODO(sorvell): This should be an element with private state so it can - // be independent of overlay. - // track overlays for z-index and focus managemant - var overlays = []; - function addOverlay(overlay) { - var z0 = currentOverlayZ(); - overlays.push(overlay); - var z1 = currentOverlayZ(); - if (z1 <= z0) { - applyOverlayZ(overlay, z0); - } - } - - function removeOverlay(overlay) { - var i = overlays.indexOf(overlay); - if (i >= 0) { - overlays.splice(i, 1); - setZ(overlay, ''); - } - } - - function applyOverlayZ(overlay, aboveZ) { - setZ(overlay.target, aboveZ + 2); - } - - function setZ(element, z) { - element.style.zIndex = z; - } - - function currentOverlay() { - return overlays[overlays.length-1]; - } - - var DEFAULT_Z = 10; - - function currentOverlayZ() { - var z; - var current = currentOverlay(); - if (current) { - var z1 = window.getComputedStyle(current.target).zIndex; - if (!isNaN(z1)) { - z = Number(z1); - } - } - return z || DEFAULT_Z; - } - - function focusOverlay() { - var current = currentOverlay(); - // We have to be careful to focus the next overlay _after_ any current - // transitions are complete (due to the state being toggled prior to the - // transition). Otherwise, we risk infinite recursion when a transitioning - // (closed) overlay becomes the current overlay. - // - // NOTE: We make the assumption that any overlay that completes a transition - // will call into focusOverlay to kick the process back off. Currently: - // transitionend -> applyFocus -> focusOverlay. - if (current && !current.transitioning) { - current.applyFocus(); - } - } - - var backdrops = []; - function trackBackdrop(element) { - if (element.opened) { - backdrops.push(element); - } else { - var i = backdrops.indexOf(element); - if (i >= 0) { - backdrops.splice(i, 1); - } - } - } - - function getBackdrops() { - return backdrops; - } -})(); -</script> -</polymer-element> diff --git a/third_party/polymer/components/core-overlay/demo.html b/third_party/polymer/components/core-overlay/demo.html deleted file mode 100644 index fda6207..0000000 --- a/third_party/polymer/components/core-overlay/demo.html +++ /dev/null @@ -1,146 +0,0 @@ -<!DOCTYPE html> -<html> -<head> - <title>core-overlay</title> - <meta name="viewport" content="width=device-width, user-scalable=no"> - <script src="../platform/platform.js"></script> - <link rel="import" href="../core-transition/core-transition-css.html"> - <link rel="import" href="core-overlay.html"> - <style> - body { - margin: 0; - } - - section { - padding: 24px; - } - </style> -</head> -<body unresolved> - <section> - <x-container></x-container> - </section> - - <!-- a simple dialog element made with core-overlay --> - <polymer-element name="x-dialog" attributes="opened autoCloseDisabled"> - <template> - <style> - - :host { - box-sizing: border-box; - -moz-box-sizing: border-box; - font-family: Arial, Helvetica, sans-serif; - font-size: 13px; - -webkit-user-select: none; - -moz-user-select: none; - overflow: hidden; - background: white; - padding:30px 42px; - outline: 1px solid rgba(0,0,0,0.2); - box-shadow: 0 4px 16px rgba(0,0,0,0.2); - } - </style> - <core-overlay id="overlay" layered backdrop opened="{{opened}}" autoCloseDisabled="{{autoCloseDisabled}}" transition="core-transition-center"></core-overlay> - <content></content> - </template> - <script> - - Polymer('x-dialog', { - - ready: function() { - this.$.overlay.target = this; - }, - - toggle: function() { - this.$.overlay.toggle(); - } - - }); - - </script> - </polymer-element> - - - <!-- an element that uses the x-dialog element and core-overlay --> - <polymer-element name="x-container"> - <template> - <x-dialog id="dialog" class="dialog"> - <!-- place all overlay styles inside the overlay target --> - <style no-shim> - .dialog { - box-sizing: border-box; - -moz-box-sizing: border-box; - font-family: Arial, Helvetica, sans-serif; - font-size: 13px; - -webkit-user-select: none; - -moz-user-select: none; - overflow: hidden; - background: white; - padding:30px 42px; - outline: 1px solid rgba(0,0,0,0.2); - box-shadow: 0 4px 16px rgba(0,0,0,0.2); - } - - #dialog { - width: 500px; - } - </style> - <h2>Dialog</h2> - <div>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed fringilla sapien sed enim sollicitudin laoreet. Suspendisse suscipit, metus ac volutpat sodales, libero magna semper lacus, molestie fringilla massa orci ut arcu. Nullam sodales urna sit amet odio vehicula mattis.</div><br><br> - <div>Ut aliquam vulputate congue. Vestibulum pretium pretium nulla quis sollicitudin. Praesent lacinia congue erat nec mattis. Fusce commodo lacus est. Duis turpis eros, ultrices sed aliquet non, blandit egestas velit. Integer a augue nec lorem tristique hendrerit. Curabitur imperdiet risus id enim bibendum vestibulum. Integer id magna at arcu faucibus fermentum vel a augue. Sed fringilla venenatis dolor, in blandit magna molestie luctus. Vestibulum dignissim posuere ultrices. Aenean urna nisl, tincidunt vitae iaculis ut, pharetra nec eros.</div><br><br> - - <div> - <input placeholder="say something..." autofocus on-input="{{inputHandler}}" /><br> - I agree with this wholeheartedly. - <core-overlay layered id="confirmation" class="dialog" backdrop transition="core-transition-top"> - <!-- place all overlay styles inside the overlay target --> - <style no-shim> - .dialog { - box-sizing: border-box; - -moz-box-sizing: border-box; - font-family: Arial, Helvetica, sans-serif; - font-size: 13px; - -webkit-user-select: none; - -moz-user-select: none; - overflow: hidden; - background: white; - padding:30px 42px; - outline: 1px solid rgba(0,0,0,0.2); - box-shadow: 0 4px 16px rgba(0,0,0,0.2); - } - - #confirmation { - box-sizing: border-box; - text-align: center; - width: 150px; - } - </style> - Thank you. - </core-overlay> - </div><br><br> - <button core-overlay-toggle>OK</button> - </x-dialog> - - <button on-tap="{{tapHandler}}">Toggle Dialog</button> - </template> - <script> - - Polymer('x-container', { - - inputHandler: function(e) { - if (e.target.value === 'something') { - this.$.confirmation.toggle(); - } - }, - - tapHandler: function() { - this.$.dialog.toggle(); - } - - }); - - </script> - </polymer-element> - -</body> -</html> diff --git a/third_party/polymer/components/core-overlay/index.html b/third_party/polymer/components/core-overlay/index.html deleted file mode 100644 index 4b2f63c..0000000 --- a/third_party/polymer/components/core-overlay/index.html +++ /dev/null @@ -1,22 +0,0 @@ -<!doctype html> -<!-- -Copyright (c) 2014 The Polymer Project Authors. All rights reserved. -This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt -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 ---> -<html> -<head> - - <script src="../platform/platform.js"></script> - <link rel="import" href="../core-component-page/core-component-page.html"> - -</head> -<body unresolved> - - <core-component-page></core-component-page> - -</body> -</html> diff --git a/third_party/polymer/components/core-pages/.bower.json b/third_party/polymer/components/core-pages/.bower.json deleted file mode 100644 index a7c8606..0000000 --- a/third_party/polymer/components/core-pages/.bower.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "name": "core-pages", - "private": true, - "dependencies": { - "core-selector": "Polymer/core-selector#>=0.3.0 <1.0.0" - }, - "homepage": "https://github.com/Polymer/core-pages", - "version": "0.3.5", - "_release": "0.3.5", - "_resolution": { - "type": "version", - "tag": "0.3.5", - "commit": "e0a16a0de8ad5c2cf2394407415851dfd2424149" - }, - "_source": "git://github.com/Polymer/core-pages.git", - "_target": "0.3.5", - "_originalSource": "Polymer/core-pages" -}
\ No newline at end of file diff --git a/third_party/polymer/components/core-pages/README.md b/third_party/polymer/components/core-pages/README.md deleted file mode 100644 index cf2d283..0000000 --- a/third_party/polymer/components/core-pages/README.md +++ /dev/null @@ -1,4 +0,0 @@ -core-pages -========== - -See the [component page](http://polymer-project.org/docs/elements/core-elements.html#core-pages) for more information. diff --git a/third_party/polymer/components/core-pages/bower.json b/third_party/polymer/components/core-pages/bower.json deleted file mode 100644 index dd5b382..0000000 --- a/third_party/polymer/components/core-pages/bower.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "name": "core-pages", - "private": true, - "dependencies": { - "core-selector": "Polymer/core-selector#>=0.3.0 <1.0.0" - } -}
\ No newline at end of file diff --git a/third_party/polymer/components/core-pages/core-pages.css b/third_party/polymer/components/core-pages/core-pages.css deleted file mode 100644 index 8cca77d..0000000 --- a/third_party/polymer/components/core-pages/core-pages.css +++ /dev/null @@ -1,30 +0,0 @@ -/* -Copyright (c) 2014 The Polymer Project Authors. All rights reserved. -This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt -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 -*/ - -:host { - display: block; - position: relative; -} - -polyfill-next-selector { content: ':host > *'; } -::content > * { - position: absolute; - top: 0; - right: 0; - bottom: 0; - left: 0; - visibility: hidden; - z-index: -1000; -} - -polyfill-next-selector { content: ':host > .core-selected'; } -::content > .core-selected { - visibility: visible; - z-index: auto; -}
\ No newline at end of file diff --git a/third_party/polymer/components/core-pages/core-pages.html b/third_party/polymer/components/core-pages/core-pages.html deleted file mode 100644 index 170e559..0000000 --- a/third_party/polymer/components/core-pages/core-pages.html +++ /dev/null @@ -1,44 +0,0 @@ -<!-- -Copyright (c) 2014 The Polymer Project Authors. All rights reserved. -This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt -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 ---> - -<!-- -`core-pages` is used to select one of its children to show. One use is to cycle through a list of children "pages". - -Example: - - <core-pages selected="0"> - <div>One</div> - <div>Two</div> - <div>Three</div> - </core-pages> - - <script> - document.addEventListener('click', function(e) { - var pages = document.querySelector('core-pages'); - pages.selected = (pages.selected + 1) % pages.children.length; - }); - </script> - -@group Polymer Core Elements -@class core-pages -@extends core-selector ---> - -<link rel="import" href="../polymer/polymer.html"> -<link rel="import" href="../core-selector/core-selector.html"> - -<polymer-element name="core-pages" extends="core-selector" selected="0" notap noscript> -<template> - - <link rel="stylesheet" href="core-pages.css"> - - <shadow></shadow> - -</template> -</polymer-element> diff --git a/third_party/polymer/components/core-pages/demo.html b/third_party/polymer/components/core-pages/demo.html deleted file mode 100644 index a980653..0000000 --- a/third_party/polymer/components/core-pages/demo.html +++ /dev/null @@ -1,130 +0,0 @@ -<!doctype html>
-<html>
-<head>
-
- <meta charset="utf-8">
- <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
-
- <title>core-pages</title>
-
- <script src="../platform/platform.js"></script>
-
- <link rel="import" href="core-pages.html">
-
- <style>
-
- html, body {
- height: 100%;
- }
-
- body {
- display: flex;
- justify-content: center;
- align-items: center;
- font-family: sans-serif;
- }
-
- core-pages {
- width: 300px;
- height: 300px;
- border: 1px solid black;
- -webkit-user-select: none;
- border-radius: 5px;
- }
-
- core-pages > div {
- display: flex;
- justify-content: center;
- align-items: center;
- border-radius: inherit;
- }
-
- core-pages.fancy {
- border: none;
- margin-left: 2em;
- }
-
- core-pages.fancy > div {
- opacity: 0;
- -webkit-transform: translate3d(-100px, 0, 0) scale(0.9);
- transform: translate3d(-100px, 0, 0) scale(0.9);
- transition: all 1s cubic-bezier(.03,.56,.7,.98);
- color: white;
- }
-
- core-pages.fancy > div:nth-child(1) {
- background-color: red;
- }
-
- core-pages.fancy > div:nth-child(2) {
- background-color: green;
- }
-
- core-pages.fancy > div:nth-child(3) {
- background-color: blue;
- }
-
- core-pages.fancy > div:nth-child(4) {
- background-color: purple;
- }
-
- core-pages.fancy > div:nth-child(5) {
- background-color: black;
- }
-
- core-pages.fancy .core-selected + div {
- -webkit-transform: translate3d(100px, 0, 0) scale(0.9);
- transform: translate3d(100px, 0, 0) scale(1);
- }
-
- core-pages.fancy .core-selected {
- opacity: 1;
- -webkit-transform: translateX(0);
- transform: translateX(0);
- }
-
- core-pages.fancy div.begin {
- -webkit-transform: translate3d(100px, 0, 0) scale(0.9);
- transform: translate3d(100px, 0, 0) scale(0.9);
- }
-
- </style>
-
-</head>
-<body unresolved>
-
- <core-pages id="first" selected="0">
- <div>One</div>
- <div>Two</div>
- <div>Three</div>
- <div>Four</div>
- <div>Five</div>
- </core-pages>
-
- <core-pages class="fancy" selected="0">
- <div>One</div>
- <div>Two</div>
- <div>Three</div>
- <div>Four</div>
- <div>Five</div>
- </core-pages>
-
- <script>
- document.querySelector('#first').onclick = function(e) {
- this.selected = (this.selected + 1) % this.items.length;
- };
-
- document.querySelector('core-pages.fancy').onclick = function(e) {
- this.selected = (this.selected + 1) % this.items.length;
- this.async(function() {
- if (this.selectedIndex == 0) {
- this.selectedItem.classList.remove('begin');
- } else if (this.selectedIndex == this.items.length - 1) {
- this.items[0].classList.add('begin');
- }
- });
- };
- </script>
-
-</body>
-</html>
diff --git a/third_party/polymer/components/core-pages/index.html b/third_party/polymer/components/core-pages/index.html deleted file mode 100644 index 58856f3..0000000 --- a/third_party/polymer/components/core-pages/index.html +++ /dev/null @@ -1,22 +0,0 @@ -<!doctype html> -<!-- -Copyright (c) 2014 The Polymer Project Authors. All rights reserved. -This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE -The complete set of authors may be found at http://polymer.github.io/AUTHORS -The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS -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 ---> -<html> -<head> - - <script src="../platform/platform.js"></script> - <link rel="import" href="../core-component-page/core-component-page.html"> - -</head> -<body unresolved> - - <core-component-page></core-component-page> - -</body> -</html> diff --git a/third_party/polymer/components/core-pages/metadata.html b/third_party/polymer/components/core-pages/metadata.html deleted file mode 100644 index bc8501e..0000000 --- a/third_party/polymer/components/core-pages/metadata.html +++ /dev/null @@ -1,16 +0,0 @@ -<x-meta id="core-pages" label="Pages" group="Core" isContainer> - - <template> - <core-pages style="width: 400px; height: 400px; border: 1px solid silver;"> - <section>Page One</section> - <section>Page Two</section> - </core-pages> - </template> - - <template id="imports"> - <link rel="import" href="core-pages.html"> - </template> - -</x-meta> - -<x-meta id="section" isContainer isHidden></x-meta>
\ No newline at end of file diff --git a/third_party/polymer/components/core-range/.bower.json b/third_party/polymer/components/core-range/.bower.json deleted file mode 100644 index 3e97fcc..0000000 --- a/third_party/polymer/components/core-range/.bower.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "name": "core-range", - "private": true, - "dependencies": { - "polymer": "Polymer/polymer#>=0.3.0 <1.0.0" - }, - "homepage": "https://github.com/Polymer/core-range", - "version": "0.3.5", - "_release": "0.3.5", - "_resolution": { - "type": "version", - "tag": "0.3.5", - "commit": "df0a1a38e891ce4af074a25ac436fa03b76c6397" - }, - "_source": "git://github.com/Polymer/core-range.git", - "_target": "0.3.5", - "_originalSource": "Polymer/core-range" -}
\ No newline at end of file diff --git a/third_party/polymer/components/core-range/README.md b/third_party/polymer/components/core-range/README.md deleted file mode 100644 index b14d06e..0000000 --- a/third_party/polymer/components/core-range/README.md +++ /dev/null @@ -1,2 +0,0 @@ -core-range -========== diff --git a/third_party/polymer/components/core-range/bower.json b/third_party/polymer/components/core-range/bower.json deleted file mode 100644 index 7d38994..0000000 --- a/third_party/polymer/components/core-range/bower.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "name": "core-range", - "private": true, - "dependencies": { - "polymer": "Polymer/polymer#>=0.3.0 <1.0.0" - } -}
\ No newline at end of file diff --git a/third_party/polymer/components/core-range/core-range.html b/third_party/polymer/components/core-range/core-range.html deleted file mode 100644 index e16993c..0000000 --- a/third_party/polymer/components/core-range/core-range.html +++ /dev/null @@ -1,108 +0,0 @@ -<!-- -Copyright (c) 2014 The Polymer Project Authors. All rights reserved. -This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt -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 ---> - -<!-- -The `core-range` element is used for managing a numeric value within a given -range. It has no visual appearance and is typically used in conjunction with -another element. - -One can build a progress bar using `core-range` like this: - - <core-range min="0" max="200" value="100" ratio="{{ratio}}"></core-range> - <div class="progress-bar" style="width: {{ratio}}%;"></div> - -@group Polymer Core Elements -@element core-range -@homepage github.io - ---> - -<link rel="import" href="../polymer/polymer.html"> - -<polymer-element name="core-range" attributes="value min max step ratio"> -<script> - - Polymer('core-range', { - - /** - * The number that represents the current value. - * - * @attribute value - * @type number - * @default 0 - */ - value: 0, - - /** - * The number that indicates the minimum value of the range. - * - * @attribute min - * @type number - * @default 0 - */ - min: 0, - - /** - * The number that indicates the maximum value of the range. - * - * @attribute max - * @type number - * @default 100 - */ - max: 100, - - /** - * Specifies the value granularity of the range's value. - * - * @attribute step - * @type number - * @default 1 - */ - step: 1, - - /** - * Returns the ratio of the value. - * - * @attribute ratio - * @type number - * @default 0 - */ - ratio: 0, - - observe: { - 'value min max step': 'update' - }, - - calcRatio: function(value) { - return (this.clampValue(value) - this.min) / (this.max - this.min); - }, - - clampValue: function(value) { - return Math.min(this.max, Math.max(this.min, this.calcStep(value))); - }, - - calcStep: function(value) { - return this.step ? (Math.round(value / this.step) / (1 / this.step)) : value; - }, - - validateValue: function() { - var v = this.clampValue(this.value); - this.value = this.oldValue = isNaN(v) ? this.oldValue : v; - return this.value !== v; - }, - - update: function() { - this.validateValue(); - this.ratio = this.calcRatio(this.value) * 100; - } - - }); - -</script> -</polymer-element> diff --git a/third_party/polymer/components/core-range/demo.html b/third_party/polymer/components/core-range/demo.html deleted file mode 100644 index 338ca2a..0000000 --- a/third_party/polymer/components/core-range/demo.html +++ /dev/null @@ -1,55 +0,0 @@ -<!doctype html> -<html> - <head> - <title>core-range</title> - - <script src="../platform/platform.js"></script> - - <link rel="import" href="core-range.html"> - - <style> - - - </style> - - </head> - - <body unresolved> - - <polymer-element name="x-test" noscript attributes="value"> - - <template> - - <style> - - :host { - display: inline-block; - height: 25px; - width: 300px; - background-color: #ddd; - } - - .progress { - background-color: red; - height: 100%; - padding: 5px 0; - box-sizing: border-box; - -moz-box-sizing: border-box; - } - - </style> - - <core-range min="0" max="200" value="{{value}}" ratio="{{ratio}}"></core-range> - - <div class="progress" style="width: {{ratio}}%;">{{ratio}}%</div><br> - - value (0 - 200): <input value="{{value}}"> - - </template> - - </polymer-element> - - <x-test value="100"></x-test> - - </body> -</html> diff --git a/third_party/polymer/components/core-range/index.html b/third_party/polymer/components/core-range/index.html deleted file mode 100644 index 58856f3..0000000 --- a/third_party/polymer/components/core-range/index.html +++ /dev/null @@ -1,22 +0,0 @@ -<!doctype html> -<!-- -Copyright (c) 2014 The Polymer Project Authors. All rights reserved. -This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE -The complete set of authors may be found at http://polymer.github.io/AUTHORS -The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS -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 ---> -<html> -<head> - - <script src="../platform/platform.js"></script> - <link rel="import" href="../core-component-page/core-component-page.html"> - -</head> -<body unresolved> - - <core-component-page></core-component-page> - -</body> -</html> diff --git a/third_party/polymer/components/core-scaffold/.bower.json b/third_party/polymer/components/core-scaffold/.bower.json deleted file mode 100644 index 2445fae..0000000 --- a/third_party/polymer/components/core-scaffold/.bower.json +++ /dev/null @@ -1,21 +0,0 @@ -{ - "name": "core-scaffold", - "private": true, - "dependencies": { - "core-drawer-panel": "Polymer/core-drawer-panel#>=0.3.0 <1.0.0", - "core-header-panel": "Polymer/core-header-panel#>=0.3.0 <1.0.0", - "core-icon-button": "Polymer/core-icon-button#>=0.3.0 <1.0.0", - "core-toolbar": "Polymer/core-toolbar#>=0.3.0 <1.0.0" - }, - "homepage": "https://github.com/Polymer/core-scaffold", - "version": "0.3.5", - "_release": "0.3.5", - "_resolution": { - "type": "version", - "tag": "0.3.5", - "commit": "69d6d9aa04258341956e74dec099ef551dd4a0be" - }, - "_source": "git://github.com/Polymer/core-scaffold.git", - "_target": "0.3.5", - "_originalSource": "Polymer/core-scaffold" -}
\ No newline at end of file diff --git a/third_party/polymer/components/core-scaffold/README.md b/third_party/polymer/components/core-scaffold/README.md deleted file mode 100644 index 7f89389..0000000 --- a/third_party/polymer/components/core-scaffold/README.md +++ /dev/null @@ -1,4 +0,0 @@ -core-scaffold -============= - -See the [component page](http://polymer-project.org/docs/elements/core-elements.html#core-scaffold) for more information. diff --git a/third_party/polymer/components/core-scaffold/bower.json b/third_party/polymer/components/core-scaffold/bower.json deleted file mode 100644 index 3c04ded..0000000 --- a/third_party/polymer/components/core-scaffold/bower.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "name": "core-scaffold", - "private": true, - "dependencies": { - "core-drawer-panel": "Polymer/core-drawer-panel#>=0.3.0 <1.0.0", - "core-header-panel": "Polymer/core-header-panel#>=0.3.0 <1.0.0", - "core-icon-button": "Polymer/core-icon-button#>=0.3.0 <1.0.0", - "core-toolbar": "Polymer/core-toolbar#>=0.3.0 <1.0.0" - } -}
\ No newline at end of file diff --git a/third_party/polymer/components/core-scaffold/core-scaffold.html b/third_party/polymer/components/core-scaffold/core-scaffold.html deleted file mode 100644 index 5edd64b..0000000 --- a/third_party/polymer/components/core-scaffold/core-scaffold.html +++ /dev/null @@ -1,157 +0,0 @@ -<!-- -Copyright (c) 2014 The Polymer Project Authors. All rights reserved. -This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt -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 ---> - -<!-- -`core-scaffold` provides general application layout, introducing a -responsive scaffold containing a header, toolbar, menu, title and -areas for application content. - -Example: - - <core-scaffold> - <core-header-panel navigation flex mode="seamed"> - <core-toolbar>Application</core-toolbar> - <core-menu theme="core-light-theme"> - <core-item icon="settings" label="item1"></core-item> - <core-item icon="settings" label="item2"></core-item> - </core-menu> - </core-header-panel> - <div tool>Title</div> - <div>Content goes here...</div> - </core-scaffold> - -Use `mode` to control the header and scrolling behavior of `core-header-panel` -and `responsiveWidth` to change the layout of the scaffold. - -To have the content fits to the main area, use `fit` attribute. - - <core-scaffold> - <core-header-panel navigation flex mode="seamed"> - .... - </core-header-panel> - <div tool>Title</div> - <div fit>Content fits to the main area</div> - </core-scaffold> - -@group Polymer Core Elements -@element core-scaffold -@homepage github.io ---> - -<link rel="import" href="../core-toolbar/core-toolbar.html"> -<link rel="import" href="../core-drawer-panel/core-drawer-panel.html"> -<link rel="import" href="../core-header-panel/core-header-panel.html"> -<link rel="import" href="../core-icon-button/core-icon-button.html"> - -<polymer-element name="core-scaffold"> -<template> - - <style> - - :host { - display: block; - } - - [drawer] { - background-color: #fff; - box-shadow: 1px 0 1px rgba(0, 0, 0, 0.1); - } - - [main] { - height: 100%; - background-color: #eee; - } - - core-toolbar { - background-color: #526E9C; - color: #fff; - } - - #drawerPanel:not([narrow]) #menuButton { - display: none; - } - - </style> - - <core-drawer-panel id="drawerPanel" narrow="{{narrow}}" responsiveWidth="{{responsiveWidth}}"> - - <div vertical layout drawer> - - <content select="[navigation], nav"></content> - - </div> - - <core-header-panel main mode="{{mode}}"> - - <core-toolbar> - <core-icon-button id="menuButton" icon="menu" on-tap="{{togglePanel}}"></core-icon-button> - <content select="[tool]"></content> - </core-toolbar> - - <content select="*"></content> - - </core-header-panel> - - </core-drawer-panel> - -</template> -<script> - - Polymer('core-scaffold', { - - publish: { - /** - * When the browser window size is smaller than the `responsiveWidth`, - * `core-drawer-panel` changes to a narrow layout. In narrow layout, - * the drawer will be stacked on top of the main panel. - * - * @attribute responsiveWidth - * @type string - * @default '600px' - */ - responsiveWidth: '600px', - - /** - * Used to control the header and scrolling behaviour of `core-header-panel` - * - * @attribute mode - * @type string - * @default 'seamed' - */ - mode: {value: 'seamed', reflect: true} - }, - - /** - * Toggle the drawer panel - * @method togglePanel - */ - togglePanel: function() { - this.$.drawerPanel.togglePanel(); - }, - - /** - * Open the drawer panel - * @method openDrawer - */ - openDrawer: function() { - this.$.drawerPanel.openDrawer(); - }, - - /** - * Close the drawer panel - * @method closeDrawer - */ - closeDrawer: function() { - this.$.drawerPanel.closeDrawer(); - } - - }); - -</script> -</polymer-element> diff --git a/third_party/polymer/components/core-scaffold/demo.html b/third_party/polymer/components/core-scaffold/demo.html deleted file mode 100644 index 647ba11..0000000 --- a/third_party/polymer/components/core-scaffold/demo.html +++ /dev/null @@ -1,82 +0,0 @@ -<!doctype html> -<!-- -Copyright (c) 2014 The Polymer Project Authors. All rights reserved. -This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt -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 ---> -<html> -<head> - <title>core-scaffold</title> - - <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0"> - <meta name="mobile-web-app-capable" content="yes"> - <meta name="apple-mobile-web-app-capable" content="yes"> - - <script src="../platform/platform.js"></script> - - <link rel="import" href="core-scaffold.html"> - <link rel="import" href="../core-header-panel/core-header-panel.html"> - <link rel="import" href="../core-menu/core-menu.html"> - <link rel="import" href="../core-item/core-item.html"> - - <style> - - html, body { - height: 100%; - margin: 0; - } - - body { - font-family: sans-serif; - } - - core-scaffold { - position: absolute; - top: 0; - right: 0; - bottom: 0; - left: 0; - } - - .content { - background-color: #fff; - height: 5000px; - padding: 20px; - } - - /* some default styles for mode="cover" on core-scaffold */ - core-scaffold[mode=cover]::shadow core-header-panel::shadow #mainContainer { - left: 120px; - } - - core-scaffold[mode=cover] .content { - margin: 20px 100px 20px 0; - } - - </style> - -</head> - -<body unresolved> - - <core-scaffold> - - <core-header-panel navigation flex mode="seamed"> - <core-toolbar style="background-color: #526E9C; color: #fff;">Application</core-toolbar> - <core-menu> - <core-item icon="settings" label="item1"></core-item> - <core-item icon="settings" label="item2"></core-item> - </core-menu> - </core-header-panel> - - <div tool>Title</div> - - <div class="content">Content goes here...</div> - - </core-scaffold> - -</body> -</html> diff --git a/third_party/polymer/components/core-scaffold/index.html b/third_party/polymer/components/core-scaffold/index.html deleted file mode 100644 index 58856f3..0000000 --- a/third_party/polymer/components/core-scaffold/index.html +++ /dev/null @@ -1,22 +0,0 @@ -<!doctype html> -<!-- -Copyright (c) 2014 The Polymer Project Authors. All rights reserved. -This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE -The complete set of authors may be found at http://polymer.github.io/AUTHORS -The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS -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 ---> -<html> -<head> - - <script src="../platform/platform.js"></script> - <link rel="import" href="../core-component-page/core-component-page.html"> - -</head> -<body unresolved> - - <core-component-page></core-component-page> - -</body> -</html> diff --git a/third_party/polymer/components/core-scaffold/metadata.html b/third_party/polymer/components/core-scaffold/metadata.html deleted file mode 100644 index 9225d48..0000000 --- a/third_party/polymer/components/core-scaffold/metadata.html +++ /dev/null @@ -1,43 +0,0 @@ -<x-meta id="core-scaffold" label="Scaffold" isContainer group="Core"> - - <template> - - <core-scaffold style="position: absolute; top: 0; right: 0; bottom: 0; left: 0;"> - - <core-header-panel navigation flex mode="seamed" style="background-color: #fff;"> - - <core-toolbar style="background-color: #4F7DC9 ; color: #fff;"></core-toolbar> - - <core-menu valueattr="label" style="font-size: 16px;" theme="core-light-theme"> - <core-item icon="settings" label="Item1"></core-item> - <core-item icon="settings" label="Item2"></core-item> - </core-menu> - - </core-header-panel> - - <div tool>Title</div> - - </core-scaffold> - - </template> - - <template id="imports"> - - <link rel="import" href="core-scaffold.html"> - <link rel="import" href="../core-header-panel/core-header-panel.html"> - <link rel="import" href="../core-menu/core-menu.html"> - <link rel="import" href="../core-item/core-item.html"> - - </template> - -</x-meta> - -<x-meta id="core-card" label="Card" isContainer group="Core"> - - <template> - - <core-card style="position: absolute; width: 300px; height: 300px; background-color: #fff; border-radius: 2px; box-shadow: rgba(0, 0, 0, 0.098) 0px 2px 4px, rgba(0, 0, 0, 0.098) 0px 0px 3px;" layout vertical></core-card> - - </template> - -</x-meta> diff --git a/third_party/polymer/components/core-scroll-header-panel/.bower.json b/third_party/polymer/components/core-scroll-header-panel/.bower.json deleted file mode 100644 index 40a0128..0000000 --- a/third_party/polymer/components/core-scroll-header-panel/.bower.json +++ /dev/null @@ -1,22 +0,0 @@ -{ - "name": "core-scroll-header-panel", - "private": true, - "dependencies": { - "core-field": "Polymer/core-field#>=0.3.0 <1.0.0", - "core-icon-button": "Polymer/core-icon-button#>=0.3.0 <1.0.0", - "core-input": "Polymer/core-input#>=0.3.0 <1.0.0", - "core-media-query": "Polymer/core-media-query#>=0.3.0 <1.0.0", - "core-toolbar": "Polymer/core-toolbar#>=0.3.0 <1.0.0" - }, - "homepage": "https://github.com/Polymer/core-scroll-header-panel", - "version": "0.3.5", - "_release": "0.3.5", - "_resolution": { - "type": "version", - "tag": "0.3.5", - "commit": "d7ce265b1fed1d419e069d00a828fd627b014fa3" - }, - "_source": "git://github.com/Polymer/core-scroll-header-panel.git", - "_target": "0.3.5", - "_originalSource": "Polymer/core-scroll-header-panel" -}
\ No newline at end of file diff --git a/third_party/polymer/components/core-scroll-header-panel/README.md b/third_party/polymer/components/core-scroll-header-panel/README.md deleted file mode 100644 index dcdd864..0000000 --- a/third_party/polymer/components/core-scroll-header-panel/README.md +++ /dev/null @@ -1,4 +0,0 @@ -core-scroll-header-panel -======================== - -See the [component page](http://polymer-project.org/docs/elements/core-elements.html#core-scroll-header-panel) for more information. diff --git a/third_party/polymer/components/core-scroll-header-panel/bower.json b/third_party/polymer/components/core-scroll-header-panel/bower.json deleted file mode 100644 index 008279a..0000000 --- a/third_party/polymer/components/core-scroll-header-panel/bower.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "name": "core-scroll-header-panel", - "private": true, - "dependencies": { - "core-field": "Polymer/core-field#>=0.3.0 <1.0.0", - "core-icon-button": "Polymer/core-icon-button#>=0.3.0 <1.0.0", - "core-input": "Polymer/core-input#>=0.3.0 <1.0.0", - "core-media-query": "Polymer/core-media-query#>=0.3.0 <1.0.0", - "core-toolbar": "Polymer/core-toolbar#>=0.3.0 <1.0.0" - } -}
\ No newline at end of file diff --git a/third_party/polymer/components/core-scroll-header-panel/core-scroll-header-panel.css b/third_party/polymer/components/core-scroll-header-panel/core-scroll-header-panel.css deleted file mode 100644 index 07a0956..0000000 --- a/third_party/polymer/components/core-scroll-header-panel/core-scroll-header-panel.css +++ /dev/null @@ -1,58 +0,0 @@ -/* -Copyright (c) 2014 The Polymer Project Authors. All rights reserved. -This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt -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 -*/ - -:host { - display: block; - position: relative; - overflow: hidden; -} - -#mainContainer { - position: absolute; - top: 0; - right: 0; - bottom: 0; - left: 0; - box-sizing: border-box; - -moz-box-sizing: border-box; - -webkit-overflow-scrolling: touch; - overflow-x: hidden; - overflow-y: auto; -} - -#headerContainer { - position: absolute; - top: 0; - right: 0; - left: 0; -} - -.bg-container { - position: absolute; - top: 0; - left: 0; - width: 100%; - height: 100%; - overflow: hidden; -} - -#headerBg, #condensedHeaderBg { - position: absolute; - top: 0; - left: 0; - width: 100%; - height: 100%; - background-repeat: no-repeat; - background-size: cover; - background-position: center center; -} - -#condensedHeaderBg { - opacity: 0; -}
\ No newline at end of file diff --git a/third_party/polymer/components/core-scroll-header-panel/core-scroll-header-panel.html b/third_party/polymer/components/core-scroll-header-panel/core-scroll-header-panel.html deleted file mode 100644 index ae0f9e1..0000000 --- a/third_party/polymer/components/core-scroll-header-panel/core-scroll-header-panel.html +++ /dev/null @@ -1,302 +0,0 @@ -<!-- -Copyright (c) 2014 The Polymer Project Authors. All rights reserved. -This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt -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 ---> - -<!-- -`core-scroll-header-panel` contains a header section and a content section. The -header is initially on the top part of the view but it scrolls away with the -rest of the scrollable content. Upon scrolling slightly up at any point, the -header scrolls back into view. This saves screen space and allows users to -access important controls by easily moving them back to the view. - -__Important:__ The `core-scroll-header-panel` will not display if its parent does not have a height. - -Using [layout attributes](http://www.polymer-project.org/docs/polymer/layout-attrs.html), you can easily make the `core-scroll-header-panel` fill the screen - - <body fullbleed layout vertical> - <core-scroll-header-panel flex> - <core-toolbar> - <div>Hello World!</div> - </core-toolbar> - </core-scroll-header-panel> - </body> - -or, if you would prefer to do it in CSS, just give `html`, `body`, and `core-scroll-header-panel` a height of 100%: - - html, body { - height: 100%; - margin: 0; - } - core-scroll-header-panel { - height: 100%; - } - -`core-scroll-header-panel` works well with `core-toolbar` but can use any element -that represents a header by adding a `core-header` class to it. Use the attribute -or class `content` to delineate the content section. - - <core-scroll-header-panel> - <core-toolbar>Header</core-toolbar> - <div content>Content goes here...</div> - </core-scroll-header-panel> - -@group Polymer Core Elements -@element core-scroll-header-panel -@homepage github.io ---> - -<link rel="import" href="../polymer/polymer.html"> - -<polymer-element name="core-scroll-header-panel"> -<template> - - <link rel="stylesheet" href="core-scroll-header-panel.css"> - - <div id="mainContainer" on-scroll="{{scroll}}"> - - <content id="mainContent" select="[content], .content"></content> - - </div> - - <div id="headerContainer"> - - <div class="bg-container"> - <div id="condensedHeaderBg"></div> - <div id="headerBg"></div> - </div> - - <content id="headerContent" select="core-toolbar, .core-header"></content> - - </div> - -</template> -<script> - - Polymer('core-scroll-header-panel', { - - /** - * Fired when the content has been scrolled. - * - * @event scroll - */ - - /** - * Fired when the header is transformed. - * - * @event core-header-transform - */ - - publish: { - /** - * If true, the header's height will condense to `_condensedHeaderHeight` - * as the user scrolls down from the top of the content area. - * - * @attribute condenses - * @type boolean - * @default false - */ - condenses: false, - - /** - * If true, no cross-fade transition from one background to another. - * - * @attribute noDissolve - * @type boolean - * @default false - */ - noDissolve: false, - - /** - * If true, the header doesn't slide back in when scrolling back up. - * - * @attribute noReveal - * @type boolean - * @default false - */ - noReveal: false, - - /** - * If true, the header is fixed to the top and never moves away. - * - * @attribute fixed - * @type boolean - * @default false - */ - fixed: false, - - /** - * If true, the condensed header is always shown and does not move away. - * - * @attribute keepCondensedHeader - * @type boolean - * @default false - */ - keepCondensedHeader: false, - - /** - * The height of the header when it is at its full size. - * - * By default, the height will be measured when it is ready. If the height - * changes later the user needs to either set this value to reflect the - * new height or invoke `measureHeaderHeight()`. - * - * @attribute headerHeight - * @type number - */ - headerHeight: 0, - - /** - * The height of the header when it is condensed. - * - * By default, `_condensedHeaderHeight` is 1/3 of `headerHeight` unless - * this is specified. - * - * @attribute condensedHeaderHeight - * @type number - */ - condensedHeaderHeight: 0 - }, - - prevScrollTop: 0, - - headerMargin: 0, - - y: 0, - - observe: { - 'headerMargin fixed': 'setup' - }, - - domReady: function() { - this.async('measureHeaderHeight'); - }, - - get header() { - return this.$.headerContent.getDistributedNodes()[0]; - }, - - get scroller() { - return this.$.mainContainer; - }, - - measureHeaderHeight: function() { - var header = this.header; - if (this.header) { - this.headerHeight = header.offsetHeight; - } - }, - - headerHeightChanged: function() { - if (!this.condensedHeaderHeight) { - // assume _condensedHeaderHeight is 1/3 of the headerHeight - this._condensedHeaderHeight = this.headerHeight * 1 / 3; - } - this.condensedHeaderHeightChanged(); - }, - - condensedHeaderHeightChanged: function() { - if (this.condensedHeaderHeight) { - this._condensedHeaderHeight = this.condensedHeaderHeight; - } - if (this.headerHeight) { - this.headerMargin = this.headerHeight - this._condensedHeaderHeight; - } - }, - - condensesChanged: function() { - if (this.condenses) { - this.scroll(); - } else { - // reset transform/opacity set on the header - this.condenseHeader(null); - } - }, - - setup: function() { - var s = this.scroller.style; - s.paddingTop = this.fixed ? '' : this.headerHeight + 'px'; - s.top = this.fixed ? this.headerHeight + 'px' : ''; - if (this.fixed) { - this.transformHeader(null); - } else { - this.scroll(); - } - }, - - transformHeader: function(y) { - var s = this.$.headerContainer.style; - this.translateY(s, -y); - - if (this.condenses) { - this.condenseHeader(y); - } - - this.fire('core-header-transform', {y: y, height: this.headerHeight, - condensedHeight: this._condensedHeaderHeight}); - }, - - condenseHeader: function(y) { - var reset = y == null; - // adjust top bar in core-header so the top bar stays at the top - if (this.header.$ && this.header.$.topBar) { - this.translateY(this.header.$.topBar.style, - reset ? null : Math.min(y, this.headerMargin)); - } - // transition header bg - var hbg = this.$.headerBg.style; - if (!this.noDissolve) { - hbg.opacity = reset ? '' : (this.headerMargin - y) / this.headerMargin; - } - // adjust header bg so it stays at the center - this.translateY(hbg, reset ? null : y / 2); - // transition condensed header bg - var chbg = this.$.condensedHeaderBg.style; - if (!this.noDissolve) { - chbg = this.$.condensedHeaderBg.style; - chbg.opacity = reset ? '' : y / this.headerMargin; - // adjust condensed header bg so it stays at the center - this.translateY(chbg, reset ? null : y / 2); - } - }, - - translateY: function(s, y) { - s.transform = s.webkitTransform = y == null ? '' : - 'translate3d(0, ' + y + 'px, 0)'; - }, - - scroll: function(event) { - if (!this.header) { - return; - } - - var sTop = this.scroller.scrollTop; - - var y = Math.min(this.keepCondensedHeader ? - this.headerMargin : this.headerHeight, Math.max(0, - (this.noReveal ? sTop : this.y + sTop - this.prevScrollTop))); - - if (this.condenses && this.prevScrollTop >= sTop && sTop > this.headerMargin) { - y = Math.max(y, this.headerMargin); - } - - if (!event || !this.fixed && y !== this.y) { - requestAnimationFrame(this.transformHeader.bind(this, y)); - } - - this.prevScrollTop = sTop; - this.y = y; - - if (event) { - this.fire('scroll', {target: this.scroller}, this, false); - } - } - - }); - -</script> -</polymer-element> diff --git a/third_party/polymer/components/core-scroll-header-panel/demo.html b/third_party/polymer/components/core-scroll-header-panel/demo.html deleted file mode 100644 index 1e833db..0000000 --- a/third_party/polymer/components/core-scroll-header-panel/demo.html +++ /dev/null @@ -1,111 +0,0 @@ -<!doctype html> -<!-- -Copyright (c) 2014 The Polymer Project Authors. All rights reserved. -This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt -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 ---> -<html> -<head> - <title>core-scroll-header-panel</title> - - <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0"> - <meta name="mobile-web-app-capable" content="yes"> - <meta name="apple-mobile-web-app-capable" content="yes"> - - <script src="../platform/platform.js"></script> - - <link rel="import" href="core-scroll-header-panel.html"> - <link rel="import" href="demos/lorem-ipsum.html"> - <link rel="import" href="../core-toolbar/core-toolbar.html"> - <link rel="import" href="../core-icon-button/core-icon-button.html"> - - <style shim-shadowdom> - - html, body { - height: 100%; - } - - body { - margin: 0; - font-family: sans-serif; - color: #333; - } - - core-scroll-header-panel { - position: absolute; - top: 0; - right: 0; - bottom: 0; - left: 0; - } - - /* background for toolbar when it is at its full size */ - core-scroll-header-panel::shadow #headerBg { - background-image: url(demos/images/bg9.jpg); - } - - /* background for toolbar when it is condensed */ - core-scroll-header-panel::shadow #condensedHeaderBg { - background-color: #f4b400; - } - - core-toolbar { - color: #f1f1f1; - fill: #f1f1f1; - background-color: transparent; - } - - .title { - -webkit-transform-origin: 0; - transform-origin: 0; - font-size: 40px; - } - - .content { - padding: 10px 30px; - } - - </style> - -</head> -<body unresolved> - - <core-scroll-header-panel condenses> - - <core-toolbar class="tall"> - - <core-icon-button icon="arrow-back"></core-icon-button> - <div flex></div> - <core-icon-button icon="search"></core-icon-button> - <core-icon-button icon="more-vert"></core-icon-button> - <div class="bottom indent title">Title</div> - - </core-toolbar> - - <div class="content"> - - <lorem-ipsum paragraphs="100"></lorem-ipsum> - - </div> - - </core-scroll-header-panel> - - <script> - - // custom transformation: scale header's title - var titleStyle = document.querySelector('.title').style; - addEventListener('core-header-transform', function(e) { - var d = e.detail; - var m = d.height - d.condensedHeight; - var scale = Math.max(0.75, (m - d.y) / (m / 0.25) + 0.75); - titleStyle.transform = titleStyle.webkitTransform = - 'scale(' + scale + ') translateZ(0)'; - }); - - </script> - -</body> -</html> diff --git a/third_party/polymer/components/core-scroll-header-panel/demos/demo1.html b/third_party/polymer/components/core-scroll-header-panel/demos/demo1.html deleted file mode 100644 index 39eba41..0000000 --- a/third_party/polymer/components/core-scroll-header-panel/demos/demo1.html +++ /dev/null @@ -1,80 +0,0 @@ -<!doctype html> -<!-- -Copyright (c) 2014 The Polymer Project Authors. All rights reserved. -This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt -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 ---> -<html> -<head> - <title>core-scroll-header-panel: demo1</title> - - <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0"> - <meta name="mobile-web-app-capable" content="yes"> - <meta name="apple-mobile-web-app-capable" content="yes"> - - <script src="../../platform/platform.js"></script> - - <link rel="import" href="../core-scroll-header-panel.html"> - <link rel="import" href="lorem-ipsum.html"> - <link rel="import" href="../../core-toolbar/core-toolbar.html"> - <link rel="import" href="../../core-icon-button/core-icon-button.html"> - - <style shim-shadowdom> - - html, body { - height: 100%; - } - - body { - margin: 0; - font-family: sans-serif; - color: #333; - } - - core-scroll-header-panel { - position: absolute; - top: 0; - right: 0; - bottom: 0; - left: 0; - } - - core-toolbar { - background-color: #4285f4; - color: #f1f1f1; - fill: #f1f1f1; - } - - .content { - padding: 10px 30px; - } - - </style> - -</head> -<body unresolved> - - <core-scroll-header-panel> - - <core-toolbar> - - <core-icon-button icon="arrow-back"></core-icon-button> - <div flex>Title</div> - <core-icon-button icon="search"></core-icon-button> - <core-icon-button icon="more-vert"></core-icon-button> - - </core-toolbar> - - <div class="content"> - - <lorem-ipsum paragraphs="100"></lorem-ipsum> - - </div> - - </core-scroll-header-panel> - -</body> -</html> diff --git a/third_party/polymer/components/core-scroll-header-panel/demos/demo2.html b/third_party/polymer/components/core-scroll-header-panel/demos/demo2.html deleted file mode 100644 index 974016a..0000000 --- a/third_party/polymer/components/core-scroll-header-panel/demos/demo2.html +++ /dev/null @@ -1,82 +0,0 @@ -<!doctype html> -<!-- -Copyright (c) 2014 The Polymer Project Authors. All rights reserved. -This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt -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 ---> -<html> -<head> - <title>core-scroll-header-panel: demo2</title> - - <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0"> - <meta name="mobile-web-app-capable" content="yes"> - <meta name="apple-mobile-web-app-capable" content="yes"> - - <script src="../../platform/platform.js"></script> - - <link rel="import" href="../core-scroll-header-panel.html"> - <link rel="import" href="lorem-ipsum.html"> - <link rel="import" href="../../core-toolbar/core-toolbar.html"> - <link rel="import" href="../../core-icon-button/core-icon-button.html"> - - <style shim-shadowdom> - - html, body { - height: 100%; - } - - body { - margin: 0; - font-family: sans-serif; - color: #333; - } - - core-scroll-header-panel { - position: absolute; - top: 0; - right: 0; - bottom: 0; - left: 0; - } - - core-toolbar { - background-color: #4285f4; - color: #f1f1f1; - fill: #f1f1f1; - } - - .content { - padding: 10px 30px; - } - - </style> - -</head> -<body unresolved> - - <core-scroll-header-panel condenses> - - <core-toolbar class="tall"> - - <core-icon-button icon="arrow-back"></core-icon-button> - <div flex></div> - <core-icon-button icon="search"></core-icon-button> - <core-icon-button icon="more-vert"></core-icon-button> - - <div class="bottom indent">Title</div> - - </core-toolbar> - - <div class="content"> - - <lorem-ipsum paragraphs="100"></lorem-ipsum> - - </div> - - </core-scroll-header-panel> - -</body> -</html> diff --git a/third_party/polymer/components/core-scroll-header-panel/demos/demo3.html b/third_party/polymer/components/core-scroll-header-panel/demos/demo3.html deleted file mode 100644 index 162df33..0000000 --- a/third_party/polymer/components/core-scroll-header-panel/demos/demo3.html +++ /dev/null @@ -1,81 +0,0 @@ -<!doctype html> -<!-- -Copyright (c) 2014 The Polymer Project Authors. All rights reserved. -This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt -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 ---> -<html> -<head> - <title>core-scroll-header-panel: demo3</title> - - <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0"> - <meta name="mobile-web-app-capable" content="yes"> - <meta name="apple-mobile-web-app-capable" content="yes"> - - <script src="../../platform/platform.js"></script> - - <link rel="import" href="../core-scroll-header-panel.html"> - <link rel="import" href="lorem-ipsum.html"> - <link rel="import" href="../../core-toolbar/core-toolbar.html"> - <link rel="import" href="../../core-icon-button/core-icon-button.html"> - - <style shim-shadowdom> - - html, body { - height: 100%; - } - - body { - margin: 0; - font-family: sans-serif; - color: #333; - } - - core-scroll-header-panel { - position: absolute; - top: 0; - right: 0; - bottom: 0; - left: 0; - } - - /* background for toolbar when it is at its full size */ - core-scroll-header-panel::shadow #headerBg { - background-image: url(images/bg3.jpg); - } - - core-toolbar { - background-color: transparent; - } - - .content { - padding: 10px 30px; - } - - </style> - -</head> -<body unresolved> - - <core-scroll-header-panel condenses noReveal noDissolve> - - <core-toolbar class="tall"> - - <div flex></div> - <core-icon-button icon="search"></core-icon-button> - - </core-toolbar> - - <div class="content"> - - <lorem-ipsum paragraphs="100"></lorem-ipsum> - - </div> - - </core-scroll-header-panel> - -</body> -</html> diff --git a/third_party/polymer/components/core-scroll-header-panel/demos/demo4.html b/third_party/polymer/components/core-scroll-header-panel/demos/demo4.html deleted file mode 100644 index 77d9fec..0000000 --- a/third_party/polymer/components/core-scroll-header-panel/demos/demo4.html +++ /dev/null @@ -1,109 +0,0 @@ -<!doctype html> -<!-- -Copyright (c) 2014 The Polymer Project Authors. All rights reserved. -This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt -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 ---> -<html> -<head> - <title>core-scroll-header-panel: demo4</title> - - <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0"> - <meta name="mobile-web-app-capable" content="yes"> - <meta name="apple-mobile-web-app-capable" content="yes"> - - <script src="../../platform/platform.js"></script> - - <link rel="import" href="../core-scroll-header-panel.html"> - <link rel="import" href="lorem-ipsum.html"> - <link rel="import" href="../../core-toolbar/core-toolbar.html"> - <link rel="import" href="../../core-icon-button/core-icon-button.html"> - - <style shim-shadowdom> - - html, body { - height: 100%; - } - - body { - margin: 0; - font-family: sans-serif; - color: #333; - } - - core-scroll-header-panel { - position: absolute; - top: 0; - right: 0; - bottom: 0; - left: 0; - } - - /* background for toolbar when it is at its full size */ - core-scroll-header-panel::shadow #headerBg { - background-image: url(images/bg6.jpg); - } - - /* background for toolbar when it is condensed */ - core-scroll-header-panel::shadow #condensedHeaderBg { - background-color: #ff5722; - } - - core-toolbar { - color: #f1f1f1; - fill: #f1f1f1; - background-color: transparent; - } - - .title { - font-size: 40px; - } - - .content { - padding: 10px 30px; - } - - </style> - -</head> -<body unresolved> - - <core-scroll-header-panel condenses> - - <core-toolbar class="tall"> - - <core-icon-button icon="arrow-back"></core-icon-button> - <div flex></div> - <core-icon-button icon="search"></core-icon-button> - <core-icon-button icon="more-vert"></core-icon-button> - <div class="bottom indent title">Title</div> - - </core-toolbar> - - <div class="content"> - - <lorem-ipsum paragraphs="100"></lorem-ipsum> - - </div> - - </core-scroll-header-panel> - - <script> - - // custom transformation: scale header's title - var titleStyle = document.querySelector('.title').style; - addEventListener('core-header-transform', function(e) { - var d = e.detail; - var m = d.height - d.condensedHeight; - var scale = Math.max(0.75, (m - d.y) / (m / 0.25) + 0.75); - titleStyle.transform = titleStyle.webkitTransform = - 'scale(' + scale + ') translateZ(0)'; - }); - - </script> - -</body> -</html> diff --git a/third_party/polymer/components/core-scroll-header-panel/demos/demo5.html b/third_party/polymer/components/core-scroll-header-panel/demos/demo5.html deleted file mode 100644 index f66482e..0000000 --- a/third_party/polymer/components/core-scroll-header-panel/demos/demo5.html +++ /dev/null @@ -1,109 +0,0 @@ -<!doctype html> -<!-- -Copyright (c) 2014 The Polymer Project Authors. All rights reserved. -This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt -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 ---> -<html> -<head> - <title>core-scroll-header-panel: demo5</title> - - <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0"> - <meta name="mobile-web-app-capable" content="yes"> - <meta name="apple-mobile-web-app-capable" content="yes"> - - <script src="../../platform/platform.js"></script> - - <link rel="import" href="../core-scroll-header-panel.html"> - <link rel="import" href="lorem-ipsum.html"> - <link rel="import" href="../../core-toolbar/core-toolbar.html"> - <link rel="import" href="../../core-icon-button/core-icon-button.html"> - - <style shim-shadowdom> - - html, body { - height: 100%; - } - - body { - margin: 0; - font-family: sans-serif; - color: #333; - } - - core-scroll-header-panel { - position: absolute; - top: 0; - right: 0; - bottom: 0; - left: 0; - } - - /* background for toolbar when it is at its full size */ - core-scroll-header-panel::shadow #headerBg { - background-image: url(images/bg9.jpg); - } - - /* background for toolbar when it is condensed */ - core-scroll-header-panel::shadow #condensedHeaderBg { - background-color: #f4b400; - } - - core-toolbar { - color: #f1f1f1; - fill: #f1f1f1; - background-color: transparent; - } - - .title { - font-size: 40px; - } - - .content { - padding: 10px 30px; - } - - </style> - -</head> -<body unresolved> - - <core-scroll-header-panel condenses> - - <core-toolbar class="tall"> - - <core-icon-button icon="arrow-back"></core-icon-button> - <div flex></div> - <core-icon-button icon="search"></core-icon-button> - <core-icon-button icon="more-vert"></core-icon-button> - <div class="bottom indent title">Title</div> - - </core-toolbar> - - <div class="content"> - - <lorem-ipsum paragraphs="100"></lorem-ipsum> - - </div> - - </core-scroll-header-panel> - - <script> - - // custom transformation: scale header's title - var titleStyle = document.querySelector('.title').style; - addEventListener('core-header-transform', function(e) { - var d = e.detail; - var m = d.height - d.condensedHeight; - var scale = Math.max(0.75, (m - d.y) / (m / 0.25) + 0.75); - titleStyle.transform = titleStyle.webkitTransform = - 'scale(' + scale + ') translateZ(0)'; - }); - - </script> - -</body> -</html> diff --git a/third_party/polymer/components/core-scroll-header-panel/demos/demo6.html b/third_party/polymer/components/core-scroll-header-panel/demos/demo6.html deleted file mode 100644 index 6b252e5..0000000 --- a/third_party/polymer/components/core-scroll-header-panel/demos/demo6.html +++ /dev/null @@ -1,113 +0,0 @@ -<!doctype html> -<!-- -Copyright (c) 2014 The Polymer Project Authors. All rights reserved. -This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt -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 ---> -<html> -<head> - <title>core-scroll-header-panel: demo6</title> - - <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0"> - <meta name="mobile-web-app-capable" content="yes"> - <meta name="apple-mobile-web-app-capable" content="yes"> - - <script src="../../platform/platform.js"></script> - - <link rel="import" href="../core-scroll-header-panel.html"> - <link rel="import" href="lorem-ipsum.html"> - <link rel="import" href="../../core-toolbar/core-toolbar.html"> - <link rel="import" href="../../core-icon-button/core-icon-button.html"> - - <style shim-shadowdom> - - html, body { - height: 100%; - } - - body { - margin: 0; - font-family: sans-serif; - color: #333; - } - - core-scroll-header-panel { - position: absolute; - top: 0; - right: 0; - bottom: 0; - left: 0; - } - - /* background for toolbar when it is at its full size */ - core-scroll-header-panel::shadow #headerBg { - background-image: url(images/bg9.jpg); - } - - /* background for toolbar when it is condensed */ - core-scroll-header-panel::shadow #condensedHeaderBg { - background-image: url(images/bg2.jpg); - } - - core-toolbar { - color: #f1f1f1; - fill: #f1f1f1; - /* custom toolbar height */ - height: 256px; - background-color: transparent; - } - - .title { - font-size: 40px; - } - - .content { - padding: 10px 30px; - } - - </style> - -</head> -<body unresolved> - - <!-- By default condensedHeaderHeight is 1/3 of the header's height. Here - we want to set the condensed header's height to be 64px. --> - <core-scroll-header-panel condenses condensedHeaderHeight="64"> - - <core-toolbar> - - <core-icon-button icon="arrow-back"></core-icon-button> - <div flex></div> - <core-icon-button icon="search"></core-icon-button> - <core-icon-button icon="more-vert"></core-icon-button> - <div class="bottom indent title">Title</div> - - </core-toolbar> - - <div class="content"> - - <lorem-ipsum paragraphs="100"></lorem-ipsum> - - </div> - - </core-scroll-header-panel> - - <script> - - // custom transformation: scale header's title - var titleStyle = document.querySelector('.title').style; - addEventListener('core-header-transform', function(e) { - var d = e.detail; - var m = d.height - d.condensedHeight; - var scale = Math.max(0.75, (m - d.y) / (m / 0.25) + 0.75); - titleStyle.transform = titleStyle.webkitTransform = - 'scale(' + scale + ') translateZ(0)'; - }); - - </script> - -</body> -</html> diff --git a/third_party/polymer/components/core-scroll-header-panel/demos/demo7.html b/third_party/polymer/components/core-scroll-header-panel/demos/demo7.html deleted file mode 100644 index 5e94276..0000000 --- a/third_party/polymer/components/core-scroll-header-panel/demos/demo7.html +++ /dev/null @@ -1,120 +0,0 @@ -<!doctype html> -<!-- -Copyright (c) 2014 The Polymer Project Authors. All rights reserved. -This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt -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 ---> -<html> -<head> - <title>core-scroll-header-panel: demo7</title> - - <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0"> - <meta name="mobile-web-app-capable" content="yes"> - <meta name="apple-mobile-web-app-capable" content="yes"> - - <script src="../../platform/platform.js"></script> - - <link rel="import" href="../core-scroll-header-panel.html"> - <link rel="import" href="lorem-ipsum.html"> - <link rel="import" href="../../core-toolbar/core-toolbar.html"> - <link rel="import" href="../../core-icon-button/core-icon-button.html"> - <link rel="import" href="../../core-media-query/core-media-query.html"> - - <style shim-shadowdom> - - html, body { - height: 100%; - } - - body { - margin: 0; - font-family: sans-serif; - color: #333; - } - - core-scroll-header-panel { - position: absolute; - top: 0; - right: 0; - bottom: 0; - left: 0; - } - - /* background for toolbar when it is at its full size */ - core-scroll-header-panel::shadow #headerBg { - background-image: url(images/bg9.jpg); - } - - /* background for toolbar when it is condensed */ - core-scroll-header-panel::shadow #condensedHeaderBg { - background-color: #f4b400; - } - - core-toolbar { - color: #f1f1f1; - fill: #f1f1f1; - background-color: transparent; - } - - .title { - font-size: 40px; - } - - .content { - padding: 10px 30px; - } - - </style> - -</head> -<body unresolved> - - <core-scroll-header-panel condenses> - - <core-toolbar class="tall"> - - <core-icon-button icon="arrow-back"></core-icon-button> - <div flex></div> - <core-icon-button icon="search"></core-icon-button> - <core-icon-button icon="more-vert"></core-icon-button> - <div class="bottom indent title">Title</div> - - </core-toolbar> - - <div class="content"> - - <h3>Resize window to toggle between fixed header and scrolled header</h3> - <lorem-ipsum paragraphs="100"></lorem-ipsum> - - </div> - - </core-scroll-header-panel> - - <core-media-query id="mquery" query="min-width: 600px"></core-media-query> - - <script> - - // toggle fixed header based on screen size - var panel = document.querySelector('core-scroll-header-panel'); - var mquery = document.querySelector('#mquery'); - mquery.addEventListener('core-media-change', function() { - panel.fixed = mquery.queryMatches; - }); - - // custom transformation: scale header's title - var titleStyle = document.querySelector('.title').style; - addEventListener('core-header-transform', function(e) { - var d = e.detail; - var m = d.height - d.condensedHeight; - var scale = Math.max(0.75, (m - d.y) / (m / 0.25) + 0.75); - titleStyle.transform = titleStyle.webkitTransform = - 'scale(' + scale + ') translateZ(0)'; - }); - - </script> - -</body> -</html> diff --git a/third_party/polymer/components/core-scroll-header-panel/demos/demo8.html b/third_party/polymer/components/core-scroll-header-panel/demos/demo8.html deleted file mode 100644 index fded942..0000000 --- a/third_party/polymer/components/core-scroll-header-panel/demos/demo8.html +++ /dev/null @@ -1,122 +0,0 @@ -<!doctype html> -<!-- -Copyright (c) 2014 The Polymer Project Authors. All rights reserved. -This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt -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 ---> -<html> -<head> - <title>core-scroll-header-panel: demo8</title> - - <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0"> - <meta name="mobile-web-app-capable" content="yes"> - <meta name="apple-mobile-web-app-capable" content="yes"> - - <script src="../../platform/platform.js"></script> - - <link rel="import" href="../core-scroll-header-panel.html"> - <link rel="import" href="lorem-ipsum.html"> - <link rel="import" href="../../core-toolbar/core-toolbar.html"> - <link rel="import" href="../../core-icon-button/core-icon-button.html"> - - <style shim-shadowdom> - - html, body { - height: 100%; - } - - body { - margin: 0; - font-family: sans-serif; - color: #333; - } - - core-scroll-header-panel { - position: absolute; - top: 0; - right: 0; - bottom: 0; - left: 0; - } - - /* background for toolbar when it is at its full size */ - core-scroll-header-panel::shadow #headerBg { - background-image: url(images/bg9.jpg); - } - - /* background for toolbar when it is condensed */ - core-scroll-header-panel::shadow #condensedHeaderBg { - background-color: #673ab7; - } - - core-toolbar { - color: #f1f1f1; - fill: #f1f1f1; - /* custom toolbar height */ - height: 256px; - background-color: transparent; - } - - .bottom-text { - -webkit-transform: translateZ(0); - transform: translateZ(0); - font-size: 20px; - padding-bottom: 10px; - } - - .subtitle { - padding-top: 4px; - font-size: 16px; - color: #ccc; - } - - .bookmark { - position: absolute; - bottom: -24px; - right: 24px; - fill: #4285f4; - height: 48px; - width: 48px; - } - - .content { - padding: 20px 20px 20px 68px; - } - - </style> - -</head> -<body unresolved> - - <!-- `keepCondensedHeader` makes the condensed header to not scroll away --> - <core-scroll-header-panel condenses keepCondensedHeader condensedHeaderHeight="140"> - - <core-toolbar> - - <core-icon-button icon="arrow-back"></core-icon-button> - <div flex></div> - <core-icon-button icon="thumb-up"></core-icon-button> - <core-icon-button icon="mail"></core-icon-button> - - <div class="bottom indent bottom-text" self-end> - <div>Lorem ipsum dolor sit amet</div> - <div class="subtitle">Iisque perfecto dissentiet cum et</div> - </div> - - <core-icon class="bottom bookmark" icon="bookmark"></core-icon> - - </core-toolbar> - - <div class="content"> - - <lorem-ipsum paragraphs="100"></lorem-ipsum> - - </div> - - </core-scroll-header-panel> - -</body> -</html> diff --git a/third_party/polymer/components/core-scroll-header-panel/demos/demo9.html b/third_party/polymer/components/core-scroll-header-panel/demos/demo9.html deleted file mode 100644 index 820bcae..0000000 --- a/third_party/polymer/components/core-scroll-header-panel/demos/demo9.html +++ /dev/null @@ -1,100 +0,0 @@ -<!doctype html> -<!-- -Copyright (c) 2014 The Polymer Project Authors. All rights reserved. -This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt -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 ---> -<html> -<head> - <title>core-scroll-header-panel: demo9</title> - - <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0"> - <meta name="mobile-web-app-capable" content="yes"> - <meta name="apple-mobile-web-app-capable" content="yes"> - - <script src="../../platform/platform.js"></script> - - <link rel="import" href="../core-scroll-header-panel.html"> - <link rel="import" href="lorem-ipsum.html"> - <link rel="import" href="../../core-icons/core-icons.html"> - <link rel="import" href="../../core-icons/av-icons.html"> - <link rel="import" href="../../core-toolbar/core-toolbar.html"> - <link rel="import" href="../../core-field/core-field.html"> - <link rel="import" href="../../core-input/core-input.html"> - - <style shim-shadowdom> - - html, body { - height: 100%; - } - - body { - margin: 0; - font-family: sans-serif; - color: #333; - } - - core-scroll-header-panel { - position: absolute; - top: 0; - right: 0; - bottom: 0; - left: 0; - } - - /* background for toolbar when it is at its full size */ - core-scroll-header-panel::shadow #headerBg { - background-image: url(images/bg9.jpg); - } - - /* background for toolbar when it is condensed */ - core-scroll-header-panel::shadow #condensedHeaderBg { - background-color: transparent; - } - - core-field { - background-color: #fff; - border: 1px solid #eee; - box-shadow: 0 2px 5px 0 rgba(0, 0, 0, 0.26); - } - - core-toolbar { - background-color: transparent; - } - - .content { - padding: 10px 30px; - } - - </style> - -</head> -<body unresolved> - - <!-- Instead of using 1/3 of the header's height, we want to manually set the - condensed header's height to 64px --> - <core-scroll-header-panel condenses condensedHeaderHeight="64"> - - <core-toolbar class="medium-tall"> - - <core-field flex class="bottom"> - <core-icon icon="menu"></core-icon> - <core-input flex></core-input> - <core-icon icon="av:mic"></core-icon> - </core-field> - - </core-toolbar> - - <div class="content"> - - <lorem-ipsum paragraphs="100"></lorem-ipsum> - - </div> - - </core-scroll-header-panel> - -</body> -</html> diff --git a/third_party/polymer/components/core-scroll-header-panel/demos/images/bg2.jpg b/third_party/polymer/components/core-scroll-header-panel/demos/images/bg2.jpg Binary files differdeleted file mode 100644 index 9aad0a9..0000000 --- a/third_party/polymer/components/core-scroll-header-panel/demos/images/bg2.jpg +++ /dev/null diff --git a/third_party/polymer/components/core-scroll-header-panel/demos/images/bg3.jpg b/third_party/polymer/components/core-scroll-header-panel/demos/images/bg3.jpg Binary files differdeleted file mode 100644 index 5079b4e8..0000000 --- a/third_party/polymer/components/core-scroll-header-panel/demos/images/bg3.jpg +++ /dev/null diff --git a/third_party/polymer/components/core-scroll-header-panel/demos/images/bg5.jpg b/third_party/polymer/components/core-scroll-header-panel/demos/images/bg5.jpg Binary files differdeleted file mode 100644 index 979ef17..0000000 --- a/third_party/polymer/components/core-scroll-header-panel/demos/images/bg5.jpg +++ /dev/null diff --git a/third_party/polymer/components/core-scroll-header-panel/demos/images/bg6.jpg b/third_party/polymer/components/core-scroll-header-panel/demos/images/bg6.jpg Binary files differdeleted file mode 100644 index 1dec3f3..0000000 --- a/third_party/polymer/components/core-scroll-header-panel/demos/images/bg6.jpg +++ /dev/null diff --git a/third_party/polymer/components/core-scroll-header-panel/demos/images/bg9.jpg b/third_party/polymer/components/core-scroll-header-panel/demos/images/bg9.jpg Binary files differdeleted file mode 100644 index c9a2e658..0000000 --- a/third_party/polymer/components/core-scroll-header-panel/demos/images/bg9.jpg +++ /dev/null diff --git a/third_party/polymer/components/core-scroll-header-panel/demos/lorem-ipsum.html b/third_party/polymer/components/core-scroll-header-panel/demos/lorem-ipsum.html deleted file mode 100644 index 0c32aa9..0000000 --- a/third_party/polymer/components/core-scroll-header-panel/demos/lorem-ipsum.html +++ /dev/null @@ -1,33 +0,0 @@ -<polymer-element name="lorem-ipsum" attributes="paragraphs"> - - <script> - - var strings = [ - 'Lorem ipsum dolor sit amet, per in nusquam nominavi periculis, sit elit oportere ea, id minim maiestatis incorrupte duo. Dolorum verterem ad ius, his et nullam verterem. Eu alia debet usu, an doming tritani est. Vix ad ponderum petentium suavitate, eum eu tempor populo, graece sententiae constituam vim ex. Cu torquatos reprimique neglegentur nec, voluptua periculis has ut, at eos discere deleniti sensibus.', - 'Ut labores minimum atomorum pro. Laudem tibique ut has. No nam ipsum lorem aliquip, accumsan quaerendum ei usu. Maiestatis vituperatoribus qui at, ne suscipit volutpat tractatos nam. Nonumy semper mollis vis an, nam et harum detracto. An pri dolor percipitur, vel maluisset disputationi te.', - 'Fugit adolescens vis et, ei graeci forensibus sed. Denique argumentum comprehensam ei vis, id has facete accommodare, quo scripta utroque id. Autem nullam doming ad eam, te nam dicam iriure periculis. Quem vocent veritus eu vis, nam ut hinc idque feugait.', - 'Convenire definiebas scriptorem eu cum. Sit dolor dicunt consectetuer no, in vix nisl velit, duo ridens abhorreant delicatissimi ut. Pro ei libris omnium scripserit, natum volumus propriae no eam. Suscipit pericula explicari sed ei, te usu iudicabit forensibus efficiantur. Has quot dicam animal id.', - 'Ea duis bonorum nec, falli paulo aliquid ei eum. Cu mei vide viris gloriatur, at populo eripuit sit. Idque molestiae duo ne. Qui id tempor accusamus sadipscing. His odio feugait et. Ne vis vide labitur, eu corpora appareat interpretaris mel.', - 'Usu eu novum principes, vel quodsi aliquip ea. Labore mandamus persequeris id mea, has eripuit neglegentur id, illum noster nec in. Ea nam quod quando cetero, per qualisque tincidunt in. Qui ne meliore commune voluptatibus, qui justo labores no. Et dicat cotidieque eos, vis homero legere et, eam timeam nominavi in. Pri dicam option placerat an, cu qui aliquam adipiscing signiferumque. Vis euismod accusamus no, soluta vocibus ei cum.', - 'Has at minim mucius aliquam, est id tempor laoreet. Ius officiis convenire ex, in vim iuvaret patrioque similique, veritus detraxit sed ad. Mel no admodum abhorreant cotidieque, et duo possim postulant, consul convenire adolescens cu mel. Duo in decore soleat doming. Fabellas interpretaris eos at. No cum unum novum dicit.', - 'Pro saepe pertinax ei, ad pri animal labores suscipiantur. Modus commodo minimum eum te, vero utinam assueverit per eu, zril oportere suscipiantur pri te. Partem percipitur deterruisset ad sea, at eam suas luptatum dissentiunt. No error alienum pro, erant senserit ex mei, pri semper alterum no. Ut habemus menandri vulputate mea. Feugiat verterem ut sed. Dolores maiestatis id per.', - 'Detracto suavitate repudiandae no eum. Id adhuc minim soluta nam, novum denique ad eum. At mucius malorum meliore his, te ferri tritani cum, eu mel legendos ocurreret. His te ludus aperiam malorum, mundi nominati deseruisse pro ne, mel discere intellegat in. Vero dissentiunt quo in, vel cu meis maiestatis adversarium. In sit summo nostrum petentium, ea vix amet nullam minimum, ornatus sensibus theophrastus ex nam.', - 'Iisque perfecto dissentiet cum et, sit ut quot mandamus, ut vim tibique splendide instructior. Id nam odio natum malorum, tibique copiosae expetenda mel ea. Mea melius malorum ut. Ut nec tollit vocent timeam. Facer nonumy numquam id his, munere salutatus consequuntur eum et, eum cotidieque definitionem signiferumque id. Ei oblique graecis patrioque vis, et probatus dignissim inciderint vel. Sed id paulo erroribus, autem semper accusamus in mel.' - ]; - - Polymer('lorem-ipsum', { - - paragraphs: 1, - - paragraphsChanged: function() { - this.innerHTML = ''; - for (var i = 0; i < this.paragraphs; i++) { - this.innerHTML += '<p>' + strings[Math.floor(Math.random() * strings.length)] + '</p>'; - } - } - - }); - - </script> - -</polymer-element>
\ No newline at end of file diff --git a/third_party/polymer/components/core-scroll-header-panel/index.html b/third_party/polymer/components/core-scroll-header-panel/index.html deleted file mode 100644 index 58856f3..0000000 --- a/third_party/polymer/components/core-scroll-header-panel/index.html +++ /dev/null @@ -1,22 +0,0 @@ -<!doctype html> -<!-- -Copyright (c) 2014 The Polymer Project Authors. All rights reserved. -This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE -The complete set of authors may be found at http://polymer.github.io/AUTHORS -The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS -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 ---> -<html> -<head> - - <script src="../platform/platform.js"></script> - <link rel="import" href="../core-component-page/core-component-page.html"> - -</head> -<body unresolved> - - <core-component-page></core-component-page> - -</body> -</html> diff --git a/third_party/polymer/components/core-scroll-header-panel/metadata.html b/third_party/polymer/components/core-scroll-header-panel/metadata.html deleted file mode 100644 index 09f6170..0000000 --- a/third_party/polymer/components/core-scroll-header-panel/metadata.html +++ /dev/null @@ -1,32 +0,0 @@ -<x-meta id="core-scroll-header-panel" label="Scroll Header Panel" isContainer group="Core"> - - <template> - - <core-scroll-header-panel condenses style="width: 380px; height: 460px;"> - - <core-toolbar class="tall" style="background-color: #4285f4; color: #f1f1f1; fill: #f1f1f1;"> - - <core-icon-button icon="arrow-back"></core-icon-button> - <div flex></div> - <core-icon-button icon="search"></core-icon-button> - <core-icon-button icon="more-vert"></core-icon-button> - - <div class="bottom indent">Title</div> - - </core-toolbar> - - <section content style="height: 5000px; background: linear-gradient(rgb(214, 227, 231), lightblue);"></section> - - </core-scroll-header-panel> - - </template> - - <template id="imports"> - - <link rel="import" href="../core-icon-button/core-icon-button.html"> - <link rel="import" href="../core-toolbar/core-toolbar.html"> - <link rel="import" href="core-scroll-header-panel.html"> - - </template> - -</x-meta>
\ No newline at end of file diff --git a/third_party/polymer/components/core-selection/.bower.json b/third_party/polymer/components/core-selection/.bower.json deleted file mode 100644 index 63c30f3..0000000 --- a/third_party/polymer/components/core-selection/.bower.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "name": "core-selection", - "private": true, - "dependencies": { - "polymer": "Polymer/polymer#>=0.3.0 <1.0.0" - }, - "homepage": "https://github.com/Polymer/core-selection", - "version": "0.3.5", - "_release": "0.3.5", - "_resolution": { - "type": "version", - "tag": "0.3.5", - "commit": "9311ad9bf5914f21f124bd44d3161f7420fe5ab1" - }, - "_source": "git://github.com/Polymer/core-selection.git", - "_target": "0.3.5", - "_originalSource": "Polymer/core-selection" -}
\ No newline at end of file diff --git a/third_party/polymer/components/core-selection/README.md b/third_party/polymer/components/core-selection/README.md deleted file mode 100644 index 6287468..0000000 --- a/third_party/polymer/components/core-selection/README.md +++ /dev/null @@ -1,4 +0,0 @@ -core-selection -============== - -See the [component page](http://polymer-project.org/docs/elements/core-elements.html#core-selection) for more information. diff --git a/third_party/polymer/components/core-selection/bower.json b/third_party/polymer/components/core-selection/bower.json deleted file mode 100644 index b601e44..0000000 --- a/third_party/polymer/components/core-selection/bower.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "name": "core-selection", - "private": true, - "dependencies": { - "polymer": "Polymer/polymer#>=0.3.0 <1.0.0" - } -}
\ No newline at end of file diff --git a/third_party/polymer/components/core-selection/core-selection.html b/third_party/polymer/components/core-selection/core-selection.html deleted file mode 100644 index 414b782..0000000 --- a/third_party/polymer/components/core-selection/core-selection.html +++ /dev/null @@ -1,149 +0,0 @@ -<!-- -Copyright (c) 2014 The Polymer Project Authors. All rights reserved. -This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt -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 ---> -<!-- -@group Polymer Core Elements - -The `<core-selection>` element is used to manage selection state. It has no -visual appearance and is typically used in conjunction with another element. -For example, [core-selector](#core-selector) -use a `<core-selection>` to manage selection. - -To mark an item as selected, call the `select(item)` method on -`<core-selection>`. The item itself is an argument to this method. - -The `<core-selection>`element manages selection state for any given set of -items. When an item is selected, the `core-select` event is fired. - -The attribute `multi` indicates if multiple items can be selected at once. - -Example: - - <polymer-element name="selection-example"> - <template> - <style> - polyfill-next-selector { content: ':host > .selected'; } - ::content > .selected { - font-weight: bold; - font-style: italic; - } - </style> - <ul on-tap="{{itemTapAction}}"> - <content></content> - </ul> - <core-selection id="selection" multi - on-core-select="{{selectAction}}"></core-selection> - </template> - <script> - Polymer('selection-example', { - itemTapAction: function(e, detail, sender) { - this.$.selection.select(e.target); - }, - selectAction: function(e, detail, sender) { - detail.item.classList.toggle('selected', detail.isSelected); - } - }); - </script> - </polymer-element> - - <selection-example> - <li>Red</li> - <li>Green</li> - <li>Blue</li> - </selection-example> - -@element core-selection ---> - -<!-- -Fired when an item's selection state is changed. This event is fired both -when an item is selected or deselected. The `isSelected` detail property -contains the selection state. - -@event core-select -@param {Object} detail - @param {boolean} detail.isSelected true for selection and false for de-selection - @param {Object} detail.item the item element ---> -<link rel="import" href="../polymer/polymer.html"> - -<polymer-element name="core-selection" attributes="multi" hidden> - <script> - Polymer('core-selection', { - /** - * If true, multiple selections are allowed. - * - * @attribute multi - * @type boolean - * @default false - */ - multi: false, - ready: function() { - this.clear(); - }, - clear: function() { - this.selection = []; - }, - /** - * Retrieves the selected item(s). - * @method getSelection - * @returns Returns the selected item(s). If the multi property is true, - * getSelection will return an array, otherwise it will return - * the selected item or undefined if there is no selection. - */ - getSelection: function() { - return this.multi ? this.selection : this.selection[0]; - }, - /** - * Indicates if a given item is selected. - * @method isSelected - * @param {any} item The item whose selection state should be checked. - * @returns Returns true if `item` is selected. - */ - isSelected: function(item) { - return this.selection.indexOf(item) >= 0; - }, - setItemSelected: function(item, isSelected) { - if (item !== undefined && item !== null) { - if (isSelected) { - this.selection.push(item); - } else { - var i = this.selection.indexOf(item); - if (i >= 0) { - this.selection.splice(i, 1); - } - } - this.fire("core-select", {isSelected: isSelected, item: item}); - } - }, - /** - * Set the selection state for a given `item`. If the multi property - * is true, then the selected state of `item` will be toggled; otherwise - * the `item` will be selected. - * @method select - * @param {any} item: The item to select. - */ - select: function(item) { - if (this.multi) { - this.toggle(item); - } else if (this.getSelection() !== item) { - this.setItemSelected(this.getSelection(), false); - this.setItemSelected(item, true); - } - }, - /** - * Toggles the selection state for `item`. - * @method toggle - * @param {any} item: The item to toggle. - */ - toggle: function(item) { - this.setItemSelected(item, !this.isSelected(item)); - } - }); - </script> -</polymer-element> diff --git a/third_party/polymer/components/core-selection/demo.html b/third_party/polymer/components/core-selection/demo.html deleted file mode 100644 index 560f480..0000000 --- a/third_party/polymer/components/core-selection/demo.html +++ /dev/null @@ -1,59 +0,0 @@ -<!DOCTYPE html> -<!-- -Copyright (c) 2014 The Polymer Project Authors. All rights reserved. -This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt -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 ---> -<html> -<head> - <title>Selection</title> - <script src="../platform/platform.js"></script> - <link rel="import" href="core-selection.html"> -</head> -<body unresolved> - - <polymer-element name="selection-example"> - <template> - <style> - polyfill-next-selector { content: 'ul > *'; } - ::content > * { - cursor: pointer; - } - - polyfill-next-selector { content: 'ul > .selected'; } - ::content > .selected { - font-weight: bold; - font-style: italic; - } - </style> - - <ul on-tap="{{itemTapAction}}"> - <content></content> - </ul> - - <core-selection id="selection" multi on-core-select="{{selectAction}}"></core-selection> - - </template> - <script> - Polymer('selection-example', { - itemTapAction: function(e, detail, sender) { - this.$.selection.select(e.target); - }, - selectAction: function(e, detail, sender) { - detail.item.classList.toggle('selected', detail.isSelected); - } - }); - </script> - </polymer-element> - - <selection-example> - <li>Red</li> - <li>Green</li> - <li>Blue</li> - </selection-example> - -</body> -</html> diff --git a/third_party/polymer/components/core-selection/index.html b/third_party/polymer/components/core-selection/index.html deleted file mode 100644 index 58856f3..0000000 --- a/third_party/polymer/components/core-selection/index.html +++ /dev/null @@ -1,22 +0,0 @@ -<!doctype html> -<!-- -Copyright (c) 2014 The Polymer Project Authors. All rights reserved. -This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE -The complete set of authors may be found at http://polymer.github.io/AUTHORS -The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS -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 ---> -<html> -<head> - - <script src="../platform/platform.js"></script> - <link rel="import" href="../core-component-page/core-component-page.html"> - -</head> -<body unresolved> - - <core-component-page></core-component-page> - -</body> -</html> diff --git a/third_party/polymer/components/core-selector/.bower.json b/third_party/polymer/components/core-selector/.bower.json deleted file mode 100644 index b3ffb9c..0000000 --- a/third_party/polymer/components/core-selector/.bower.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "name": "core-selector", - "private": true, - "dependencies": { - "polymer": "Polymer/polymer#>=0.3.0 <1.0.0", - "core-selection": "Polymer/core-selection#>=0.3.0 <1.0.0" - }, - "homepage": "https://github.com/Polymer/core-selector", - "version": "0.3.5", - "_release": "0.3.5", - "_resolution": { - "type": "version", - "tag": "0.3.5", - "commit": "8c99bc7559b098ea82ced4fc03b7c0beb65e87da" - }, - "_source": "git://github.com/Polymer/core-selector.git", - "_target": "0.3.5", - "_originalSource": "Polymer/core-selector" -}
\ No newline at end of file diff --git a/third_party/polymer/components/core-selector/README.md b/third_party/polymer/components/core-selector/README.md deleted file mode 100644 index e4beeea..0000000 --- a/third_party/polymer/components/core-selector/README.md +++ /dev/null @@ -1,4 +0,0 @@ -core-selector -============== - -See the [component page](http://polymer-project.org/docs/elements/core-elements.html#core-selector) for more information. diff --git a/third_party/polymer/components/core-selector/bower.json b/third_party/polymer/components/core-selector/bower.json deleted file mode 100644 index e744103..0000000 --- a/third_party/polymer/components/core-selector/bower.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "name": "core-selector", - "private": true, - "dependencies": { - "polymer": "Polymer/polymer#>=0.3.0 <1.0.0", - "core-selection": "Polymer/core-selection#>=0.3.0 <1.0.0" - } -}
\ No newline at end of file diff --git a/third_party/polymer/components/core-selector/core-selector.html b/third_party/polymer/components/core-selector/core-selector.html deleted file mode 100644 index af328d6..0000000 --- a/third_party/polymer/components/core-selector/core-selector.html +++ /dev/null @@ -1,424 +0,0 @@ -<!-- -Copyright (c) 2014 The Polymer Project Authors. All rights reserved. -This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt -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 ---> - -<!-- -@group Polymer Core Elements - -`<core-selector>` is used to manage a list of elements that can be selected. - -The attribute `selected` indicates which item element is being selected. -The attribute `multi` indicates if multiple items can be selected at once. -Tapping on the item element would fire `core-activate` event. Use -`core-select` event to listen for selection changes. - -Example: - - <core-selector selected="0"> - <div>Item 1</div> - <div>Item 2</div> - <div>Item 3</div> - </core-selector> - -`<core-selector>` is not styled. Use the `core-selected` CSS class to style the selected element. - - <style> - .item.core-selected { - background: #eee; - } - </style> - ... - <core-selector> - <div class="item">Item 1</div> - <div class="item">Item 2</div> - <div class="item">Item 3</div> - </core-selector> - -@element core-selector -@status stable -@homepage github.io ---> - -<!-- -Fired when an item's selection state is changed. This event is fired both -when an item is selected or deselected. The `isSelected` detail property -contains the selection state. - -@event core-select -@param {Object} detail - @param {boolean} detail.isSelected true for selection and false for deselection - @param {Object} detail.item the item element ---> -<!-- -Fired when an item element is tapped. - -@event core-activate -@param {Object} detail - @param {Object} detail.item the item element ---> - -<link rel="import" href="../polymer/polymer.html"> -<link rel="import" href="../core-selection/core-selection.html"> - -<polymer-element name="core-selector" - attributes="selected multi valueattr selectedClass selectedProperty selectedAttribute selectedItem selectedModel selectedIndex notap target itemsSelector activateEvent"> - - <template> - <core-selection id="selection" multi="{{multi}}" on-core-select="{{selectionSelect}}"></core-selection> - <content id="items" select="*"></content> - </template> - - <script> - - Polymer('core-selector', { - - /** - * Gets or sets the selected element. Default to use the index - * of the item element. - * - * If you want a specific attribute value of the element to be - * used instead of index, set "valueattr" to that attribute name. - * - * Example: - * - * <core-selector valueattr="label" selected="foo"> - * <div label="foo"></div> - * <div label="bar"></div> - * <div label="zot"></div> - * </core-selector> - * - * In multi-selection this should be an array of values. - * - * Example: - * - * <core-selector id="selector" valueattr="label" multi> - * <div label="foo"></div> - * <div label="bar"></div> - * <div label="zot"></div> - * </core-selector> - * - * this.$.selector.selected = ['foo', 'zot']; - * - * @attribute selected - * @type Object - * @default null - */ - selected: null, - - /** - * If true, multiple selections are allowed. - * - * @attribute multi - * @type boolean - * @default false - */ - multi: false, - - /** - * Specifies the attribute to be used for "selected" attribute. - * - * @attribute valueattr - * @type string - * @default 'name' - */ - valueattr: 'name', - - /** - * Specifies the CSS class to be used to add to the selected element. - * - * @attribute selectedClass - * @type string - * @default 'core-selected' - */ - selectedClass: 'core-selected', - - /** - * Specifies the property to be used to set on the selected element - * to indicate its active state. - * - * @attribute selectedProperty - * @type string - * @default '' - */ - selectedProperty: '', - - /** - * Specifies the attribute to set on the selected element to indicate - * its active state. - * - * @attribute selectedAttribute - * @type string - * @default 'active' - */ - selectedAttribute: 'active', - - /** - * Returns the currently selected element. In multi-selection this returns - * an array of selected elements. - * - * @attribute selectedItem - * @type Object - * @default null - */ - selectedItem: null, - - /** - * In single selection, this returns the model associated with the - * selected element. - * - * @attribute selectedModel - * @type Object - * @default null - */ - selectedModel: null, - - /** - * In single selection, this returns the selected index. - * - * @attribute selectedIndex - * @type number - * @default -1 - */ - selectedIndex: -1, - - /** - * The target element that contains items. If this is not set - * core-selector is the container. - * - * @attribute target - * @type Object - * @default null - */ - target: null, - - /** - * This can be used to query nodes from the target node to be used for - * selection items. Note this only works if the 'target' property is set. - * - * Example: - * - * <core-selector target="{{$.myForm}}" itemsSelector="input[type=radio]"></core-selector> - * <form id="myForm"> - * <label><input type="radio" name="color" value="red"> Red</label> <br> - * <label><input type="radio" name="color" value="green"> Green</label> <br> - * <label><input type="radio" name="color" value="blue"> Blue</label> <br> - * <p>color = {{color}}</p> - * </form> - * - * @attribute itemsSelector - * @type string - * @default '' - */ - itemsSelector: '', - - /** - * The event that would be fired from the item element to indicate - * it is being selected. - * - * @attribute activateEvent - * @type string - * @default 'tap' - */ - activateEvent: 'tap', - - /** - * Set this to true to disallow changing the selection via the - * `activateEvent`. - * - * @attribute notap - * @type boolean - * @default false - */ - notap: false, - - ready: function() { - this.activateListener = this.activateHandler.bind(this); - this.observer = new MutationObserver(this.updateSelected.bind(this)); - if (!this.target) { - this.target = this; - } - }, - - get items() { - if (!this.target) { - return []; - } - var nodes = this.target !== this ? (this.itemsSelector ? - this.target.querySelectorAll(this.itemsSelector) : - this.target.children) : this.$.items.getDistributedNodes(); - return Array.prototype.filter.call(nodes || [], function(n) { - return n && n.localName !== 'template'; - }); - }, - - targetChanged: function(old) { - if (old) { - this.removeListener(old); - this.observer.disconnect(); - this.clearSelection(); - } - if (this.target) { - this.addListener(this.target); - this.observer.observe(this.target, {childList: true}); - this.updateSelected(); - } - }, - - addListener: function(node) { - Polymer.addEventListener(node, this.activateEvent, this.activateListener); - }, - - removeListener: function(node) { - Polymer.removeEventListener(node, this.activateEvent, this.activateListener); - }, - - get selection() { - return this.$.selection.getSelection(); - }, - - selectedChanged: function() { - this.updateSelected(); - }, - - updateSelected: function() { - this.validateSelected(); - if (this.multi) { - this.clearSelection(); - this.selected && this.selected.forEach(function(s) { - this.valueToSelection(s); - }, this); - } else { - this.valueToSelection(this.selected); - } - }, - - validateSelected: function() { - // convert to an array for multi-selection - if (this.multi && !Array.isArray(this.selected) && - this.selected !== null && this.selected !== undefined) { - this.selected = [this.selected]; - } - }, - - clearSelection: function() { - if (this.multi) { - this.selection.slice().forEach(function(s) { - this.$.selection.setItemSelected(s, false); - }, this); - } else { - this.$.selection.setItemSelected(this.selection, false); - } - this.selectedItem = null; - this.$.selection.clear(); - }, - - valueToSelection: function(value) { - var item = (value === null || value === undefined) ? - null : this.items[this.valueToIndex(value)]; - this.$.selection.select(item); - }, - - updateSelectedItem: function() { - this.selectedItem = this.selection; - }, - - selectedItemChanged: function() { - if (this.selectedItem) { - var t = this.selectedItem.templateInstance; - this.selectedModel = t ? t.model : undefined; - } else { - this.selectedModel = null; - } - this.selectedIndex = this.selectedItem ? - parseInt(this.valueToIndex(this.selected)) : -1; - }, - - valueToIndex: function(value) { - // find an item with value == value and return it's index - for (var i=0, items=this.items, c; (c=items[i]); i++) { - if (this.valueForNode(c) == value) { - return i; - } - } - // if no item found, the value itself is probably the index - return value; - }, - - valueForNode: function(node) { - return node[this.valueattr] || node.getAttribute(this.valueattr); - }, - - // events fired from <core-selection> object - selectionSelect: function(e, detail) { - this.updateSelectedItem(); - if (detail.item) { - this.applySelection(detail.item, detail.isSelected); - } - }, - - applySelection: function(item, isSelected) { - if (this.selectedClass) { - item.classList.toggle(this.selectedClass, isSelected); - } - if (this.selectedProperty) { - item[this.selectedProperty] = isSelected; - } - if (this.selectedAttribute && item.setAttribute) { - if (isSelected) { - item.setAttribute(this.selectedAttribute, ''); - } else { - item.removeAttribute(this.selectedAttribute); - } - } - }, - - // event fired from host - activateHandler: function(e) { - if (!this.notap) { - var i = this.findDistributedTarget(e.target, this.items); - if (i >= 0) { - var item = this.items[i]; - var s = this.valueForNode(item) || i; - if (this.multi) { - if (this.selected) { - this.addRemoveSelected(s); - } else { - this.selected = [s]; - } - } else { - this.selected = s; - } - this.asyncFire('core-activate', {item: item}); - } - } - }, - - addRemoveSelected: function(value) { - var i = this.selected.indexOf(value); - if (i >= 0) { - this.selected.splice(i, 1); - } else { - this.selected.push(value); - } - this.valueToSelection(value); - }, - - findDistributedTarget: function(target, nodes) { - // find first ancestor of target (including itself) that - // is in nodes, if any - while (target && target != this) { - var i = Array.prototype.indexOf.call(nodes, target); - if (i >= 0) { - return i; - } - target = target.parentNode; - } - } - }); - </script> -</polymer-element> diff --git a/third_party/polymer/components/core-selector/demo.html b/third_party/polymer/components/core-selector/demo.html deleted file mode 100644 index de58696..0000000 --- a/third_party/polymer/components/core-selector/demo.html +++ /dev/null @@ -1,106 +0,0 @@ -<!DOCTYPE html> -<!-- -Copyright (c) 2014 The Polymer Project Authors. All rights reserved. -This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt -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 ---> -<html> -<head> - <title>Selector</title> - <script src="../platform/platform.js"></script> - <link rel="import" href="core-selector.html"> -</head> -<body unresolved> - <polymer-element name="selector-examples"> - <template> - <style> - .list { - display: block; - border: 1px solid #ccc; - border-bottom: none; - background: #666; - color: white; - list-style: none; - margin: 0; - padding: 0; - } - - .list > * { - height: 40px; - line-height: 40px; - padding: 0 20px; - border-bottom: 1px solid #ccc; - } - - .list > *.core-selected { - background: #333; - } - - li { - height: 30px; - } - - li.core-selected:after { - content: "\2713"; - position: absolute; - padding-left: 10px; - } - </style> - - <h2>basic</h2> - <core-selector class="list" selected="0"> - <div>Item 0</div> - <div>Item 1</div> - <div>Item 2</div> - <div>Item 3</div> - <div>Item 4</div> - </core-selector> - - <h2>multi-selection</h2> - <core-selector class="list" selected="{{multiSelected}}" multi> - <div>Item 0</div> - <div>Item 1</div> - <div>Item 2</div> - <div>Item 3</div> - <div>Item 4</div> - </core-selector> - - <h2>list</h2> - <core-selector target="{{$.list}}" selected="0"></core-selector> - <ul id="list"> - <li>Item 0</li> - <li>Item 1</li> - <li>Item 2</li> - <li>Item 3</li> - <li>Item 4</li> - </ul> - - <h2>binding of a group of radio buttons to a variable</h2> - <core-selector target="{{$.myForm}}" itemsSelector="input[type=radio]" - selected="{{color}}" valueattr="value" selectedProperty="checked" - activateEvent="change"></core-selector> - <form id="myForm"> - <label><input type="radio" name="color" value="red"> Red</label> <br> - <label><input type="radio" name="color" value="green"> Green</label> <br> - <label><input type="radio" name="color" value="blue"> Blue</label> <br> - <p>color = {{color}}</p> - </form> - - </template> - - <script> - Polymer('selector-examples', { - ready: function() { - this.multiSelected = [1, 3]; - this.color = 'green'; - } - }); - </script> - </polymer-element> - - <selector-examples></selector-examples> -</body> -</html> diff --git a/third_party/polymer/components/core-selector/index.html b/third_party/polymer/components/core-selector/index.html deleted file mode 100644 index 58856f3..0000000 --- a/third_party/polymer/components/core-selector/index.html +++ /dev/null @@ -1,22 +0,0 @@ -<!doctype html> -<!-- -Copyright (c) 2014 The Polymer Project Authors. All rights reserved. -This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE -The complete set of authors may be found at http://polymer.github.io/AUTHORS -The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS -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 ---> -<html> -<head> - - <script src="../platform/platform.js"></script> - <link rel="import" href="../core-component-page/core-component-page.html"> - -</head> -<body unresolved> - - <core-component-page></core-component-page> - -</body> -</html> diff --git a/third_party/polymer/components/core-selector/metadata.html b/third_party/polymer/components/core-selector/metadata.html deleted file mode 100644 index fe0bf18..0000000 --- a/third_party/polymer/components/core-selector/metadata.html +++ /dev/null @@ -1,11 +0,0 @@ -<x-meta id="core-selector" label="Selector" group="Core" isContainer> - - <template> - <core-selector selected="0" style="width:100%;height:50px;"></core-selector> - </template> - - <template> - <link rel="import" href="core-selector.html"> - </template> - -</x-meta>
\ No newline at end of file diff --git a/third_party/polymer/components/core-shared-lib/.bower.json b/third_party/polymer/components/core-shared-lib/.bower.json deleted file mode 100644 index 15b08d5..0000000 --- a/third_party/polymer/components/core-shared-lib/.bower.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "name": "core-shared-lib", - "private": true, - "dependencies": { - "polymer": "Polymer/polymer#>=0.3.0 <1.0.0" - }, - "homepage": "https://github.com/Polymer/core-shared-lib", - "version": "0.3.5", - "_release": "0.3.5", - "_resolution": { - "type": "version", - "tag": "0.3.5", - "commit": "55ae7ea8b185677bfa5adf704502aade2ed7ab95" - }, - "_source": "git://github.com/Polymer/core-shared-lib.git", - "_target": "0.3.5", - "_originalSource": "Polymer/core-shared-lib" -}
\ No newline at end of file diff --git a/third_party/polymer/components/core-shared-lib/README.md b/third_party/polymer/components/core-shared-lib/README.md deleted file mode 100644 index 32c53ce..0000000 --- a/third_party/polymer/components/core-shared-lib/README.md +++ /dev/null @@ -1,4 +0,0 @@ -core-shared-lib -=============== - -See the [component landing page](http://polymer-project.org/docs/elements/core-elements.html#core-shared-lib) for more information. diff --git a/third_party/polymer/components/core-shared-lib/bower.json b/third_party/polymer/components/core-shared-lib/bower.json deleted file mode 100644 index 4989fd0..0000000 --- a/third_party/polymer/components/core-shared-lib/bower.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "name": "core-shared-lib", - "private": true, - "dependencies": { - "polymer": "Polymer/polymer#>=0.3.0 <1.0.0" - } -}
\ No newline at end of file diff --git a/third_party/polymer/components/core-shared-lib/core-shared-lib.html b/third_party/polymer/components/core-shared-lib/core-shared-lib.html deleted file mode 100644 index 45ae603..0000000 --- a/third_party/polymer/components/core-shared-lib/core-shared-lib.html +++ /dev/null @@ -1,151 +0,0 @@ -<!-- -Copyright (c) 2014 The Polymer Project Authors. All rights reserved. -This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt -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 ---> -<link rel="import" href="../polymer/polymer.html"> - -<!-- -Supports sharing a JSONP-based JavaScript library. - - <core-shared-lib on-core-shared-lib-load="{{load}}" url="https://apis.google.com/js/plusone.js?onload=%%callback%%"> - -Multiple components can request a library using a `core-shared-lib` component and only one copy of that library will -loaded from the network. - -Currently, the library must support JSONP to work as a shared-lib. - -Some libraries require a specific global function be defined. If this is the case, specify the `callbackName` property. - -Where possible, you should use an HTML Import to load library dependencies. Rather than using this element, -create an import (`<link rel="import" href="lib.html">`) that wraps loading the .js file: - -lib.html: - - <script src="lib.js"></script> - -@group Polymer Core Elements -@element core-shared-lib ---> -<polymer-element name="core-shared-lib" attributes="url notifyEvent callbackName"> -<script> -(function() { - - Polymer({ - - notifyEvent: 'core-shared-lib-load', - - ready: function() { - if (!this.url && this.defaultUrl) { - this.url = this.defaultUrl; - } - }, - - urlChanged: function() { - require(this.url, this, this.callbackName); - }, - - provide: function() { - this.async('notify'); - }, - - notify: function() { - this.fire(this.notifyEvent, arguments); - } - - }); - - var apiMap = {}; - - function require(url, notifiee, callbackName) { - // make hashable string form url - var name = nameFromUrl(url); - // lookup existing loader instance - var loader = apiMap[name]; - // create a loader as needed - if (!loader) { - loader = apiMap[name] = new Loader(name, url, callbackName); - } - loader.requestNotify(notifiee); - } - - function nameFromUrl(url) { - return url.replace(/[\:\/\%\?\&\.\=\-]/g, '_') + '_api'; - } - - var Loader = function(name, url, callbackName) { - this.instances = []; - this.callbackName = callbackName; - if (this.callbackName) { - window[this.callbackName] = this.success.bind(this); - } else { - if (url.indexOf(this.callbackMacro) >= 0) { - this.callbackName = name + '_loaded'; - window[this.callbackName] = this.success.bind(this); - url = url.replace(this.callbackMacro, this.callbackName); - } else { - // TODO(sjmiles): we should probably fallback to listening to script.load - throw 'core-shared-api: a %%callback%% parameter is required in the API url'; - } - } - // - this.addScript(url); - }; - - Loader.prototype = { - - callbackMacro: '%%callback%%', - loaded: false, - - addScript: function(src) { - var script = document.createElement('script'); - script.src = src; - script.onerror = this.error.bind(this); - var s = document.querySelector('script'); - s.parentNode.insertBefore(script, s); - this.script = script; - }, - - removeScript: function() { - if (this.script.parentNode) { - this.script.parentNode.removeChild(this.script); - } - this.script = null; - }, - - error: function() { - this.cleanup(); - }, - - success: function() { - this.loaded = true; - this.cleanup(); - this.result = Array.prototype.slice.call(arguments); - this.instances.forEach(this.provide, this); - this.instances = null; - }, - - cleanup: function() { - delete window[this.callbackName]; - }, - - provide: function(instance) { - instance.notify(instance, this.result); - }, - - requestNotify: function(instance) { - if (this.loaded) { - this.provide(instance); - } else { - this.instances.push(instance); - } - } - - }; - -})(); -</script> -</polymer-element> diff --git a/third_party/polymer/components/core-shared-lib/demo.html b/third_party/polymer/components/core-shared-lib/demo.html deleted file mode 100644 index a18ef95..0000000 --- a/third_party/polymer/components/core-shared-lib/demo.html +++ /dev/null @@ -1,33 +0,0 @@ -<!doctype html> -<!-- -Copyright (c) 2014 The Polymer Project Authors. All rights reserved. -This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt -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 ---> -<html> -<head> - <title></title> - - <script src="../platform/platform.js"></script> - - <link rel="import" href="core-shared-lib.html"> - -</head> -<body> - - <!-- three instances, but only one actual network transaction --> - <core-shared-lib url="https://apis.google.com/js/client.js?onload=%%callback%%"></core-shared-lib> - <core-shared-lib url="https://apis.google.com/js/client.js?onload=%%callback%%"></core-shared-lib> - <core-shared-lib url="https://apis.google.com/js/client.js?onload=%%callback%%"></core-shared-lib> - - <script> - addEventListener('core-shared-lib-load', function() { - console.log('client.js lib load notify'); - }); - </script> - -</body> -</html> diff --git a/third_party/polymer/components/core-shared-lib/index.html b/third_party/polymer/components/core-shared-lib/index.html deleted file mode 100644 index 58856f3..0000000 --- a/third_party/polymer/components/core-shared-lib/index.html +++ /dev/null @@ -1,22 +0,0 @@ -<!doctype html> -<!-- -Copyright (c) 2014 The Polymer Project Authors. All rights reserved. -This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE -The complete set of authors may be found at http://polymer.github.io/AUTHORS -The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS -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 ---> -<html> -<head> - - <script src="../platform/platform.js"></script> - <link rel="import" href="../core-component-page/core-component-page.html"> - -</head> -<body unresolved> - - <core-component-page></core-component-page> - -</body> -</html> diff --git a/third_party/polymer/components/core-signals/.bower.json b/third_party/polymer/components/core-signals/.bower.json deleted file mode 100644 index 57eec41..0000000 --- a/third_party/polymer/components/core-signals/.bower.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "name": "core-signals", - "private": true, - "dependencies": { - "polymer": "Polymer/polymer#>=0.3.0 <1.0.0" - }, - "homepage": "https://github.com/Polymer/core-signals", - "version": "0.3.5", - "_release": "0.3.5", - "_resolution": { - "type": "version", - "tag": "0.3.5", - "commit": "9d727f813b322f91c97fc347dfa1c64a359d5cfa" - }, - "_source": "git://github.com/Polymer/core-signals.git", - "_target": "0.3.5", - "_originalSource": "Polymer/core-signals" -}
\ No newline at end of file diff --git a/third_party/polymer/components/core-signals/README.md b/third_party/polymer/components/core-signals/README.md deleted file mode 100644 index 05d4a61..0000000 --- a/third_party/polymer/components/core-signals/README.md +++ /dev/null @@ -1,4 +0,0 @@ -core-signals -============ - -See the [component page](http://www.polymer-project.org/docs/elements/core-elements.html#core-signals) for more information. diff --git a/third_party/polymer/components/core-signals/bower.json b/third_party/polymer/components/core-signals/bower.json deleted file mode 100644 index 85449b8..0000000 --- a/third_party/polymer/components/core-signals/bower.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "name": "core-signals", - "private": true, - "dependencies": { - "polymer": "Polymer/polymer#>=0.3.0 <1.0.0" - } -}
\ No newline at end of file diff --git a/third_party/polymer/components/core-signals/core-signals.html b/third_party/polymer/components/core-signals/core-signals.html deleted file mode 100644 index d742b09..0000000 --- a/third_party/polymer/components/core-signals/core-signals.html +++ /dev/null @@ -1,84 +0,0 @@ -<!-- -Copyright (c) 2014 The Polymer Project Authors. All rights reserved. -This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE -The complete set of authors may be found at http://polymer.github.io/AUTHORS -The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS -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 ---> -<link rel="import" href="../polymer/polymer.html"> - -<!-- -`core-signals` provides basic publish-subscribe functionality. - -Note: avoid using `core-signals` whenever you can use -a controller (parent element) to mediate communication -instead. - -To send a signal, fire a custom event of type `core-signal`, with -a detail object containing `name` and `data` fields. - - this.fire('core-signal', {name: 'hello', data: null}); - -To receive a signal, listen for `core-signal-<name>` event on a -`core-signal` element. - - <core-signal on-core-signal-hello="{{helloSignal}}"> - -You can fire a signal event from anywhere, and all -`core-signal` elements will receive the event, regardless -of where they are in DOM. - -@group Polymer Core Elements -@element core-signals -@status stable -@homepage github.io ---> -<polymer-element name="core-signals"> -<script> -(function(){ - - Polymer({ - attached: function() { - signals.push(this); - }, - removed: function() { - var i = signals.indexOf(this); - if (i >= 0) { - signals.splice(i, 1); - } - } - }); - - // private shared database - var signals = []; - - // signal dispatcher - function notify(name, data) { - // convert generic-signal event to named-signal event - var signal = new CustomEvent('core-signal-' + name, { - // if signals bubble, it's easy to get confusing duplicates - // (1) listen on a container on behalf of local child - // (2) some deep child ignores the event and it bubbles - // up to said container - // (3) local child event bubbles up to container - // also, for performance, we avoid signals flying up the - // tree from all over the place - bubbles: false, - detail: data - }); - // dispatch named-signal to all 'signals' instances, - // only interested listeners will react - signals.forEach(function(s) { - s.dispatchEvent(signal); - }); - } - - // signal listener at document - document.addEventListener('core-signal', function(e) { - notify(e.detail.name, e.detail.data); - }); - -})(); -</script> -</polymer-element> diff --git a/third_party/polymer/components/core-signals/demo.html b/third_party/polymer/components/core-signals/demo.html deleted file mode 100644 index b3c4cc1..0000000 --- a/third_party/polymer/components/core-signals/demo.html +++ /dev/null @@ -1,53 +0,0 @@ -<!-- -Copyright (c) 2014 The Polymer Project Authors. All rights reserved. -This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt -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 ---> -<!doctype html> -<html> -<head> - -<title></title> - -<script src="../platform/platform.js"></script> - -<link rel="import" href="core-signals.html"> - -</head> -<body> - -<my-element></my-element> -<my-app></my-app> - -<polymer-element name="my-element"> -<template> - Hello -</template> -<script> - Polymer('my-element', { - ready: function() { - this.asyncFire('core-signal', {name: "foo", data: "Foo!"}); - } - }); -</script> -</polymer-element> - -<polymer-element name="my-app"> -<template> - <core-signals on-core-signal-foo="{{fooSignal}}"></core-signals> - <content></content> -</template> -<script> - Polymer('my-app', { - fooSignal: function(e, detail, sender) { - this.innerHTML += '<br>[my-app] got a [' + detail + '] signal<br>'; - } - }); -</script> -</polymer-element> - -</body> -</html> diff --git a/third_party/polymer/components/core-signals/index.html b/third_party/polymer/components/core-signals/index.html deleted file mode 100644 index a003379..0000000 --- a/third_party/polymer/components/core-signals/index.html +++ /dev/null @@ -1,22 +0,0 @@ -<!doctype html>
-<!--
-Copyright (c) 2014 The Polymer Project Authors. All rights reserved.
-This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE
-The complete set of authors may be found at http://polymer.github.io/AUTHORS
-The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS
-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
--->
-<html>
-<head>
-
- <script src="../platform/platform.js"></script>
- <link rel="import" href="../core-component-page/core-component-page.html">
-
-</head>
-<body unresolved>
-
- <core-component-page></core-component-page>
-
-</body>
-</html>
diff --git a/third_party/polymer/components/core-splitter/.bower.json b/third_party/polymer/components/core-splitter/.bower.json deleted file mode 100644 index 50ef0c8..0000000 --- a/third_party/polymer/components/core-splitter/.bower.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "name": "core-splitter", - "private": true, - "dependencies": { - "polymer": "Polymer/polymer#>=0.3.0 <1.0.0" - }, - "homepage": "https://github.com/Polymer/core-splitter", - "version": "0.3.5", - "_release": "0.3.5", - "_resolution": { - "type": "version", - "tag": "0.3.5", - "commit": "f803b7e279fea797bdde3d751ecf3926d01b38de" - }, - "_source": "git://github.com/Polymer/core-splitter.git", - "_target": "0.3.5", - "_originalSource": "Polymer/core-splitter" -}
\ No newline at end of file diff --git a/third_party/polymer/components/core-splitter/README.md b/third_party/polymer/components/core-splitter/README.md deleted file mode 100644 index d788648..0000000 --- a/third_party/polymer/components/core-splitter/README.md +++ /dev/null @@ -1,4 +0,0 @@ -core-splitter -============= - -See the [component page](http://polymer-project.org/docs/elements/core-elements.html#core-splitter) for more information. diff --git a/third_party/polymer/components/core-splitter/bower.json b/third_party/polymer/components/core-splitter/bower.json deleted file mode 100644 index 62e3bf9..0000000 --- a/third_party/polymer/components/core-splitter/bower.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "name": "core-splitter", - "private": true, - "dependencies": { - "polymer": "Polymer/polymer#>=0.3.0 <1.0.0" - } -}
\ No newline at end of file diff --git a/third_party/polymer/components/core-splitter/core-splitter.css b/third_party/polymer/components/core-splitter/core-splitter.css deleted file mode 100644 index 75d62d0..0000000 --- a/third_party/polymer/components/core-splitter/core-splitter.css +++ /dev/null @@ -1,27 +0,0 @@ -/* -Copyright (c) 2014 The Polymer Project Authors. All rights reserved. -This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt -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 -*/ - -:host { - display: block; - width: 12px; - background: #efefef url(handle.svg) no-repeat center; - box-shadow: inset 0 0 2px 1px #ccc; - cursor: col-resize; -} - -:host(.horizontal) { - width: auto; - height: 12px; - cursor: row-resize; - background-image: url(handle-h.svg); -} - -:host(:hover, :active) { - background-color: #ddd; -} diff --git a/third_party/polymer/components/core-splitter/core-splitter.html b/third_party/polymer/components/core-splitter/core-splitter.html deleted file mode 100644 index 391349c..0000000 --- a/third_party/polymer/components/core-splitter/core-splitter.html +++ /dev/null @@ -1,147 +0,0 @@ -<!-- -Copyright (c) 2014 The Polymer Project Authors. All rights reserved. -This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt -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 ---> - -<!-- -`core-splitter` provides a split bar and dragging on the split bar -will resize the sibling element. Use its `direction` property to indicate -which sibling element to be resized and the orientation. Usually you would want -to use `core-splitter` along with flex layout so that the other sibling -element can be _flexible_. - -Example: - - <div horizontal layout> - <div>left</div> - <core-splitter direction="left"></core-splitter> - <div flex>right</div> - </div> - -In the above example, dragging the splitter will resize the _left_ element. And -since the parent container is a flexbox and the _right_ element has -`flex`, the _right_ element will be auto-resized. - -For horizontal splitter set `direction` to "up" or "down". - -Example: - - <div vertical layout> - <div>top</div> - <core-splitter direction="up"></core-splitter> - <div flex>bottom</div> - </div> - -@group Polymer Core Elements -@element core-splitter -@homepage github.io ---> - -<link rel="import" href="../polymer/polymer.html"> - -<polymer-element name="core-splitter" attributes="direction locked minSize allowOverflow" - on-trackstart="{{trackStart}}" on-track="{{track}}" on-down="{{preventSelection}}"> - -<template> - - <link rel="stylesheet" href="core-splitter.css"> - -</template> -<script> - - Polymer('core-splitter', { - - /** - * Possible values are "left", "right", "up" and "down". - * - * @attribute direction - * @type string - * @default 'left' - */ - direction: 'left', - - /** - * Minimum width to which the splitter target can be sized - * - * @attribute minSize - * @type number - * @default 0 - */ - minSize: 0, - - /** - * Locks the split bar so it can't be dragged. - * - * @attribute locked - * @type boolean - * @default false - */ - locked: false, - - /** - * By default the parent and siblings of the splitter are set to overflow hidden. This helps - * avoid elements bleeding outside the splitter regions. Set this property to true to allow - * these elements to overflow. - * - * @attribute allowOverflow - * @type boolean - * @default false - */ - allowOverflow: false, - - ready: function() { - this.directionChanged(); - }, - - domReady: function() { - if (!this.allowOverflow) { - this.parentNode.style.overflow = this.nextElementSibling.style.overflow = - this.previousElementSibling.style.overflow = 'hidden'; - } - }, - - directionChanged: function() { - this.isNext = this.direction === 'right' || this.direction === 'down'; - this.horizontal = this.direction === 'up' || this.direction === 'down'; - this.update(); - }, - - update: function() { - this.target = this.isNext ? this.nextElementSibling : this.previousElementSibling; - this.dimension = this.horizontal ? 'height' : 'width'; - this.classList.toggle('horizontal', this.horizontal); - }, - - targetChanged: function(old) { - if (old) { - old.style[old.__splitterMinSize] = ''; - } - var min = this.target.__splitterMinSize = this.horizontal ? 'minHeight' : 'minWidth'; - this.target.style[min] = this.minSize + 'px'; - }, - - trackStart: function() { - this.update(); - this.size = parseInt(getComputedStyle(this.target)[this.dimension]); - }, - - track: function(e) { - if (this.locked) { - return; - } - var d = e[this.horizontal ? 'dy' : 'dx']; - this.target.style[this.dimension] = - this.size + (this.isNext ? -d : d) + 'px'; - }, - - preventSelection: function(e) { - e.preventDefault(); - } - }); - -</script> -</polymer-element>
\ No newline at end of file diff --git a/third_party/polymer/components/core-splitter/demo.html b/third_party/polymer/components/core-splitter/demo.html deleted file mode 100644 index 2cdb9d6..0000000 --- a/third_party/polymer/components/core-splitter/demo.html +++ /dev/null @@ -1,82 +0,0 @@ -<!doctype html> -<!-- -Copyright (c) 2014 The Polymer Project Authors. All rights reserved. -This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt -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 ---> -<html> -<head> - <title>core-splitter</title> - - <script src="../platform/platform.js"></script> - - <link rel="import" href="core-splitter.html"> - - <style> - - body { - -webkit-user-select: none; - -moz-user-select: none; - -webkit-tap-highlight-color: rgba(0,0,0,0); - margin: 24px; - } - - .container { - width: 400px; - height: 200px; - border: 4px solid #aaa; - } - - #box1, #box3, #box5, #box6 { - width: 100px; - } - - #box2, #box4 { - height: 40px; - } - - </style> - -</head> -<body unresolved> - <div class="container" horizontal layout> - <div>left</div> - <core-splitter direction="left" minSize="128"></core-splitter> - <div flex>right</div> - </div> - - <br> - - <div class="container" vertical layout> - <div id="box2">top</div> - <core-splitter direction="up"></core-splitter> - <div flex>bottom</div> - </div> - - <br> - - <div class="container" horizontal layout> - <div id="box3">1</div> - <core-splitter direction="left"></core-splitter> - <div flex vertical layout> - <div id="box4">2</div> - <core-splitter direction="up"></core-splitter> - <div flex>3</div> - </div> - </div> - - <br> - - <div class="container" horizontal layout> - <div id="box5">left</div> - <core-splitter direction="left"></core-splitter> - <div flex>center</div> - <core-splitter direction="right"></core-splitter> - <div id="box6">right</div> - </div> - -</body> -</html> diff --git a/third_party/polymer/components/core-splitter/handle-h.svg b/third_party/polymer/components/core-splitter/handle-h.svg deleted file mode 100644 index 13dc623..0000000 --- a/third_party/polymer/components/core-splitter/handle-h.svg +++ /dev/null @@ -1,4 +0,0 @@ -<svg xmlns="http://www.w3.org/2000/svg" height="24" width="24"> -<g id="more-horiz"><path d="M6,10c-1.1,0-2,0.9-2,2s0.9,2,2,2c1.1,0,2-0.9,2-2S7.1,10,6,10z M18,10c-1.1,0-2,0.9-2,2s0.9,2,2,2c1.1,0,2-0.9,2-2S19.1,10,18,10z M12,10c-1.1,0-2,0.9-2,2s0.9,2,2,2c1.1,0,2-0.9,2-2S13.1,10,12,10z"/></g> -</svg> - diff --git a/third_party/polymer/components/core-splitter/handle.svg b/third_party/polymer/components/core-splitter/handle.svg deleted file mode 100644 index 124412e..0000000 --- a/third_party/polymer/components/core-splitter/handle.svg +++ /dev/null @@ -1,4 +0,0 @@ -<svg xmlns="http://www.w3.org/2000/svg" height="24" width="24"> -<g id="more-vert"><path d="M12,8c1.1,0,2-0.9,2-2s-0.9-2-2-2c-1.1,0-2,0.9-2,2S10.9,8,12,8z M12,10c-1.1,0-2,0.9-2,2s0.9,2,2,2c1.1,0,2-0.9,2-2S13.1,10,12,10z M12,16c-1.1,0-2,0.9-2,2s0.9,2,2,2c1.1,0,2-0.9,2-2S13.1,16,12,16z"/></g> -</svg> - diff --git a/third_party/polymer/components/core-splitter/index.html b/third_party/polymer/components/core-splitter/index.html deleted file mode 100644 index 58856f3..0000000 --- a/third_party/polymer/components/core-splitter/index.html +++ /dev/null @@ -1,22 +0,0 @@ -<!doctype html> -<!-- -Copyright (c) 2014 The Polymer Project Authors. All rights reserved. -This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE -The complete set of authors may be found at http://polymer.github.io/AUTHORS -The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS -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 ---> -<html> -<head> - - <script src="../platform/platform.js"></script> - <link rel="import" href="../core-component-page/core-component-page.html"> - -</head> -<body unresolved> - - <core-component-page></core-component-page> - -</body> -</html> diff --git a/third_party/polymer/components/core-style/.bower.json b/third_party/polymer/components/core-style/.bower.json deleted file mode 100644 index 2b80b6a..0000000 --- a/third_party/polymer/components/core-style/.bower.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "name": "core-style", - "private": true, - "dependencies": { - "polymer": "Polymer/polymer#>=0.3.0 <1.0.0" - }, - "homepage": "https://github.com/Polymer/core-style", - "version": "0.3.5", - "_release": "0.3.5", - "_resolution": { - "type": "version", - "tag": "0.3.5", - "commit": "f5c5847be698afefe3d311c6e4062becb56ca832" - }, - "_source": "git://github.com/Polymer/core-style.git", - "_target": "0.3.5", - "_originalSource": "Polymer/core-style" -}
\ No newline at end of file diff --git a/third_party/polymer/components/core-style/README.md b/third_party/polymer/components/core-style/README.md deleted file mode 100644 index 89f4546..0000000 --- a/third_party/polymer/components/core-style/README.md +++ /dev/null @@ -1,4 +0,0 @@ -core-style -========== - -See the [component page](http://polymer-project.org/docs/elements/core-elements.html#core-style) for more information. diff --git a/third_party/polymer/components/core-style/bower.json b/third_party/polymer/components/core-style/bower.json deleted file mode 100644 index 6240018..0000000 --- a/third_party/polymer/components/core-style/bower.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "name": "core-style", - "private": true, - "dependencies": { - "polymer": "Polymer/polymer#>=0.3.0 <1.0.0" - } -}
\ No newline at end of file diff --git a/third_party/polymer/components/core-style/core-style.html b/third_party/polymer/components/core-style/core-style.html deleted file mode 100644 index d0aaf52..0000000 --- a/third_party/polymer/components/core-style/core-style.html +++ /dev/null @@ -1,387 +0,0 @@ -<!--
-Copyright (c) 2014 The Polymer Project Authors. All rights reserved.
-This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
-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
--->
-<!--
-
-The `core-style` element helps manage styling inside other elements and can
-be used to make themes. The `core-style` element can be either a producer
-or consumer of styling. If it has its `id` property set, it's a producer.
-Elements that are producers should include css styling as their text content.
-If a `core-style` has its `ref` property set, it's a consumer. A `core-style`
-typically sets its `ref` property to the value of the `id` property of the
-`core-style` it wants to use. This allows a single producer to be used in
-multiple places, for example, in many different elements.
-
-It's common to place `core-style` producer elements inside HTMLImports.
-Remote stylesheets should be included this way, the @import css mechanism is
-not currently supported.
-
-Here's a basic example:
-
- <polymer-element name="x-test" noscript>
- <template>
- <core-style ref="x-test"></core-style>
- <content></content>
- </template>
- </polymer-element>
-
-The `x-test` element above will be styled by any `core-style` elements that have
-`id` set to `x-test`. These `core-style` producers are separate from the element
-definition, allowing a user of the element to style it independent of the author's
-styling. For example:
-
- <core-style id="x-test">
- :host {
- backgound-color: steelblue;
- }
- </core-style>
-
-The content of the `x-test` `core-style` producer gets included inside the
-shadowRoot of the `x-test` element. If the content of the `x-test` producer
-`core-style` changes, all consumers of it are automatically kept in sync. This
-allows updating styling on the fly.
-
-The `core-style` element also supports bindings and it is the producer
-`core-style` element is the model for its content. Here's an example:
-
- <core-style id="x-test">
- :host {
- background-color: {{myColor}};
- }
- </core-style>
- <script>
- document._currentScript.ownerDocument.getElementById('x-test').myColor = 'orange';
- </script>
-
-Finally, to facilitate sharing data between `core-style` elements, all
-`core-style` elements have a `g` property which is set to the global
-`CoreStyle.g`. Here's an example:
-
- <core-style id="x-test">
- :host {
- background-color: {{g.myColor}};
- }
- </core-style>
- <script>
- CoreStyle.g.myColor = 'tomato';
- </script>
-
-Finally, one `core-style` can be nested inside another. The `core-style`
-element has a `list` property which is a map of all the `core-style` producers.
-A `core-style` producer's content is available via its `cssText` property.
-Putting this together:
-
- <core-style id="common">
- :host {
- font-family: sans-serif;
- }
- </core-style>
-
- <core-style id="x-test">
- {{list.common.cssText}}
-
- :host {
- background-color: {{g.myColor}};
- }
- </core-style>
-
-
-@group Polymer Core Elements
-@element core-style
-@homepage github.io
--->
-
-<link rel="import" href="../polymer/polymer.html">
-
-<polymer-element name="core-style" hidden>
-<script>
-(function() {
-
-window.CoreStyle = window.CoreStyle || {
- g: {},
- list: {},
- refMap: {}
-};
-
-Polymer('core-style', {
- /**
- * The `id` property should be set if the `core-style` is a producer
- * of styles. In this case, the `core-style` should have text content
- * that is cssText.
- *
- * @attribute id
- * @type string
- * @default ''
- */
-
-
- publish: {
- /**
- * The `ref` property should be set if the `core-style` element is a
- * consumer of styles. Set it to the `id` of the desired `core-style`
- * element.
- *
- * @attribute ref
- * @type string
- * @default ''
- */
- ref: ''
- },
-
- // static
- g: CoreStyle.g,
- refMap: CoreStyle.refMap,
-
- /**
- * The `list` is a map of all `core-style` producers stored by `id`. It
- * should be considered readonly. It's useful for nesting one `core-style`
- * inside another.
- *
- * @attribute list
- * @type object (readonly)
- * @default {map of all `core-style` producers}
- */
- list: CoreStyle.list,
-
- // if we have an id, we provide style
- // if we have a ref, we consume/require style
- ready: function() {
- if (this.id) {
- this.provide();
- } else {
- this.registerRef(this.ref);
- if (!window.ShadowDOMPolyfill) {
- this.require();
- }
- }
- },
-
- // can't shim until attached if using SD polyfill because need to find host
- attached: function() {
- if (!this.id && window.ShadowDOMPolyfill) {
- this.require();
- }
- },
-
- /****** producer stuff *******/
-
- provide: function() {
- this.register();
- // we want to do this asap, especially so we can do so before definitions
- // that use this core-style are registered.
- if (this.textContent) {
- this._completeProvide();
- } else {
- this.async(this._completeProvide);
- }
- },
-
- register: function() {
- var i = this.list[this.id];
- if (i) {
- if (!Array.isArray(i)) {
- this.list[this.id] = [i];
- }
- this.list[this.id].push(this);
- } else {
- this.list[this.id] = this;
- }
- },
-
- // stamp into a shadowRoot so we can monitor dom of the bound output
- _completeProvide: function() {
- this.createShadowRoot();
- this.domObserver = new MutationObserver(this.domModified.bind(this))
- .observe(this.shadowRoot, {subtree: true,
- characterData: true, childList: true});
- this.provideContent();
- },
-
- provideContent: function() {
- this.ensureTemplate();
- this.shadowRoot.textContent = '';
- this.shadowRoot.appendChild(this.instanceTemplate(this.template));
- this.cssText = this.shadowRoot.textContent;
- },
-
- ensureTemplate: function() {
- if (!this.template) {
- this.template = this.querySelector('template:not([repeat]):not([bind])');
- // move content into the template
- if (!this.template) {
- this.template = document.createElement('template');
- var n = this.firstChild;
- while (n) {
- this.template.content.appendChild(n.cloneNode(true));
- n = n.nextSibling;
- }
- }
- }
- },
-
- domModified: function() {
- this.cssText = this.shadowRoot.textContent;
- this.notify();
- },
-
- // notify instances that reference this element
- notify: function() {
- var s$ = this.refMap[this.id];
- if (s$) {
- for (var i=0, s; (s=s$[i]); i++) {
- s.require();
- }
- }
- },
-
- /****** consumer stuff *******/
-
- registerRef: function(ref) {
- //console.log('register', ref);
- this.refMap[this.ref] = this.refMap[this.ref] || [];
- this.refMap[this.ref].push(this);
- },
-
- applyRef: function(ref) {
- this.ref = ref;
- this.registerRef(this.ref);
- this.require();
- },
-
- require: function() {
- var cssText = this.cssTextForRef(this.ref);
- //console.log('require', this.ref, cssText);
- if (cssText) {
- this.ensureStyleElement();
- // do nothing if cssText has not changed
- if (this.styleElement._cssText === cssText) {
- return;
- }
- this.styleElement._cssText = cssText;
- if (window.ShadowDOMPolyfill) {
- this.styleElement.textContent = cssText;
- cssText = Platform.ShadowCSS.shimStyle(this.styleElement,
- this.getScopeSelector());
- }
- this.styleElement.textContent = cssText;
- }
- },
-
- cssTextForRef: function(ref) {
- var s$ = this.byId(ref);
- var cssText = '';
- if (s$) {
- if (Array.isArray(s$)) {
- var p = [];
- for (var i=0, l=s$.length, s; (i<l) && (s=s$[i]); i++) {
- p.push(s.cssText);
- }
- cssText = p.join('\n\n');
- } else {
- cssText = s$.cssText;
- }
- }
- if (s$ && !cssText) {
- console.warn('No styles provided for ref:', ref);
- }
- return cssText;
- },
-
- byId: function(id) {
- return this.list[id];
- },
-
- ensureStyleElement: function() {
- if (!this.styleElement) {
- this.styleElement = window.ShadowDOMPolyfill ?
- this.makeShimStyle() :
- this.makeRootStyle();
- }
- if (!this.styleElement) {
- console.warn(this.localName, 'could not setup style.');
- }
- },
-
- makeRootStyle: function() {
- var style = document.createElement('style');
- this.appendChild(style);
- return style;
- },
-
- makeShimStyle: function() {
- var host = this.findHost(this);
- if (host) {
- var name = host.localName;
- var style = document.querySelector('style[' + name + '=' + this.ref +']');
- if (!style) {
- style = document.createElement('style');
- style.setAttribute(name, this.ref);
- document.head.appendChild(style);
- }
- return style;
- }
- },
-
- getScopeSelector: function() {
- if (!this._scopeSelector) {
- var selector = '', host = this.findHost(this);
- if (host) {
- var typeExtension = host.hasAttribute('is');
- var name = typeExtension ? host.getAttribute('is') : host.localName;
- selector = Platform.ShadowCSS.makeScopeSelector(name,
- typeExtension);
- }
- this._scopeSelector = selector;
- }
- return this._scopeSelector;
- },
-
- findHost: function(node) {
- while (node.parentNode) {
- node = node.parentNode;
- }
- return node.host || wrap(document.documentElement);
- },
-
- /* filters! */
- // TODO(dfreedm): add more filters!
-
- cycle: function(rgb, amount) {
- if (rgb.match('#')) {
- var o = this.hexToRgb(rgb);
- if (!o) {
- return rgb;
- }
- rgb = 'rgb(' + o.r + ',' + o.b + ',' + o.g + ')';
- }
-
- function cycleChannel(v) {
- return Math.abs((Number(v) - amount) % 255);
- }
-
- return rgb.replace(/rgb\(([^,]*),([^,]*),([^,]*)\)/, function(m, a, b, c) {
- return 'rgb(' + cycleChannel(a) + ',' + cycleChannel(b) + ', '
- + cycleChannel(c) + ')';
- });
- },
-
- hexToRgb: function(hex) {
- var result = /^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(hex);
- return result ? {
- r: parseInt(result[1], 16),
- g: parseInt(result[2], 16),
- b: parseInt(result[3], 16)
- } : null;
- }
-
-});
-
-
-})();
-</script>
-</polymer-element>
diff --git a/third_party/polymer/components/core-style/demo.html b/third_party/polymer/components/core-style/demo.html deleted file mode 100644 index 0681c6c..0000000 --- a/third_party/polymer/components/core-style/demo.html +++ /dev/null @@ -1,58 +0,0 @@ -<!DOCTYPE html> -<!-- -Copyright 2013 The Polymer Authors. All rights reserved. -Use of this source code is governed by a BSD-style -license that can be found in the LICENSE file. ---> -<html> -<head> - <title>core-style</title> - <script src="../platform/platform.js"></script> - - <link rel="import" href="elements.html"> - <link rel="import" href="my-theme.html"> - -</head> -<body unresolved fullbleed vertical layout> - <core-style ref="main"></core-style> - - <template is="auto-binding"> - <my-toolbar> - <span flex>core-style</span> - <input type="color" value="{{g.theme.colorOne}}"> - <input type="color" value="{{g.theme.colorTwo}}"> - <input type="color" value="{{g.theme.colorThree}}"> - <input type="range" min="1" max="8" value="{{g.columns}}"> - <button>A button</button> - </my-toolbar> - <section flex horizontal wrap layout> - <template repeat="{{item in items}}"> - <my-panel>{{item}}</my-panel> - </template> - </section> - </template> - - <script> - (function() { - - addEventListener('polymer-ready', function() { - var items = []; - for (var i=0; i < 100; i++) { - items.push(i); - } - - CoreStyle.g.items = items; - - addEventListener('template-bound', function(e) { - e.target.g = CoreStyle.g; - e.target.items = items; - }); - }); - - })(); - </script> - -</body> -</html> - - diff --git a/third_party/polymer/components/core-style/elements.html b/third_party/polymer/components/core-style/elements.html deleted file mode 100644 index f09f2e5..0000000 --- a/third_party/polymer/components/core-style/elements.html +++ /dev/null @@ -1,46 +0,0 @@ -<link rel="import" href="core-style.html"> - -<core-style id="my-toolbar"> - :host { - height: 54px; - font-size: 1.3rem; - background-color: steelblue; - color: white; - } - - polyfill-next-selector { - content: ':host > *'; - } - ::content > * { - margin: 8px; - } -</core-style> - -<polymer-element name="my-toolbar" horizontal center layout noscript> - <template> - <core-style ref="my-toolbar"></core-style> - <content></content> - </template> -</polymer-element> - -<core-style id="my-panel"> - :host { - display: inline-block; - height: 200px; - width: calc({{ 100 / g.columns }}% - 16px); - font-size: 50px; - background: gray; - margin: 8px; - } -</core-style> - -<script> - CoreStyle.g.columns = 3; -</script> - -<polymer-element name="my-panel" vertical center center-justified layout noscript> - <template> - <core-style ref="my-panel"></core-style> - <content></content> - </template> -</polymer-element>
\ No newline at end of file diff --git a/third_party/polymer/components/core-style/index.html b/third_party/polymer/components/core-style/index.html deleted file mode 100644 index 58856f3..0000000 --- a/third_party/polymer/components/core-style/index.html +++ /dev/null @@ -1,22 +0,0 @@ -<!doctype html> -<!-- -Copyright (c) 2014 The Polymer Project Authors. All rights reserved. -This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE -The complete set of authors may be found at http://polymer.github.io/AUTHORS -The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS -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 ---> -<html> -<head> - - <script src="../platform/platform.js"></script> - <link rel="import" href="../core-component-page/core-component-page.html"> - -</head> -<body unresolved> - - <core-component-page></core-component-page> - -</body> -</html> diff --git a/third_party/polymer/components/core-style/my-theme.html b/third_party/polymer/components/core-style/my-theme.html deleted file mode 100644 index 5c6b43f..0000000 --- a/third_party/polymer/components/core-style/my-theme.html +++ /dev/null @@ -1,64 +0,0 @@ -<link rel="import" href="core-style.html"> - -<script> - - CoreStyle.g.theme = { - colorOne: '#abcdef', - colorTwo: '#123456', - colorThree: '#224433' - } -</script> - -<core-style id="main"> - body { - font-family: sans-serif; - } - - section { - overflow: auto; - } - - button { - border: 1px solid {{g.theme.colorOne | cycle(-50)}}; - border-radius: 4px; - background-color: {{g.theme.colorOne}}; - color: {{g.theme.colorTwo}}; - } - - button:active { - border: 1px solid {{g.theme.colorTwo | cycle(50)}}; - border-radius: 4px; - background-color: {{g.theme.colorTwo}}; - color: {{g.theme.colorOne}}; - } - - <template repeat="{{item in g.items}}"> - my-panel:nth-of-type({{item+1}}) { - background-color: {{ g.theme.colorThree | cycle(item * -1) }}; - } - </template> -</core-style> - -<core-style id="my-toolbar"> - :host { - border-bottom: 8px solid {{g.theme.colorOne}}; - color: {{g.theme.colorOne | cycle(100)}}; - background-color: {{g.theme.colorTwo}}; - } -</core-style> - -<core-style id="my-panel"> - :host { - box-sizing: border-box; - background-color: {{g.theme.colorOne}}; - border: 8px solid {{g.theme.colorOne | cycle(50)}}; - color: {{g.theme.colorOne | cycle(-100)}}; - } - - :host(:nth-of-type(2n + 1)) { - background-color: {{g.theme.colorTwo}}; - border: 8px solid {{g.theme.colorTwo | cycle(-50)}}; - color: {{g.theme.colorTwo | cycle(100)}} - } - -</core-style>
\ No newline at end of file diff --git a/third_party/polymer/components/core-toolbar/.bower.json b/third_party/polymer/components/core-toolbar/.bower.json deleted file mode 100644 index f757185..0000000 --- a/third_party/polymer/components/core-toolbar/.bower.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "name": "core-toolbar", - "private": true, - "dependencies": { - "core-icon-button": "Polymer/core-icon-button#>=0.3.0 <1.0.0" - }, - "homepage": "https://github.com/Polymer/core-toolbar", - "version": "0.3.5", - "_release": "0.3.5", - "_resolution": { - "type": "version", - "tag": "0.3.5", - "commit": "e6f0423da98b946357bd450215803b6d02271d2b" - }, - "_source": "git://github.com/Polymer/core-toolbar.git", - "_target": "0.3.5", - "_originalSource": "Polymer/core-toolbar" -}
\ No newline at end of file diff --git a/third_party/polymer/components/core-toolbar/README.md b/third_party/polymer/components/core-toolbar/README.md deleted file mode 100644 index f1600d8..0000000 --- a/third_party/polymer/components/core-toolbar/README.md +++ /dev/null @@ -1,4 +0,0 @@ -core-toolbar
-============
-
-See the [component page](http://polymer-project.org/docs/elements/core-elements.html#core-toolbar) for more information.
diff --git a/third_party/polymer/components/core-toolbar/bower.json b/third_party/polymer/components/core-toolbar/bower.json deleted file mode 100644 index d391679..0000000 --- a/third_party/polymer/components/core-toolbar/bower.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "name": "core-toolbar", - "private": true, - "dependencies": { - "core-icon-button": "Polymer/core-icon-button#>=0.3.0 <1.0.0" - } -}
\ No newline at end of file diff --git a/third_party/polymer/components/core-toolbar/core-toolbar.css b/third_party/polymer/components/core-toolbar/core-toolbar.css deleted file mode 100644 index d9a050a..0000000 --- a/third_party/polymer/components/core-toolbar/core-toolbar.css +++ /dev/null @@ -1,110 +0,0 @@ -/* -Copyright (c) 2014 The Polymer Project Authors. All rights reserved. -This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt -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 -*/ - -:host { - /* technical */ - display: block; - position: relative; - box-sizing: border-box; - -moz-box-sizing: border-box; - /* size */ - height: 64px; - /* typography */ - font-size: 1.3em; - /* background */ - background-color: #CFD8DC; -} - -:host(.animate) { - /* transition */ - transition: height 0.18s ease-in; -} - -:host(.medium-tall) { - height: 128px; -} - -:host(.tall) { - height: 192px; -} - -.toolbar-tools { - position: relative; - height: 64px; - padding: 0 8px; - pointer-events: none; -} - -/* narrow layout */ -:host(.narrow) { - height: 56px; -} - -:host(.narrow.medium-tall) { - height: 112px; -} - -:host(.narrow.tall) { - height: 168px; -} - -:host(.narrow) .toolbar-tools { - height: 56px; - padding: 0; -} - -/* middle bar */ -#middleBar { - position: absolute; - top: 0; - right: 0; - left: 0; -} - -:host(.tall, .medium-tall) #middleBar { - -webkit-transform: translateY(100%); - transform: translateY(100%); -} - -/* bottom bar */ -#bottomBar { - position: absolute; - right: 0; - bottom: 0; - left: 0; -} - -/* make elements (e.g. buttons) respond to mouse/touch events */ -polyfill-next-selector { content: '.toolbar-tools > *'; } -::content > * { - pointer-events: auto; -} - -/* elements spacing */ -polyfill-next-selector { content: '.toolbar-tools > *'; } -::content > * { - margin: 0px 8px; -} - -/* misc helpers */ -polyfill-next-selector { content: '.toolbar-tools > .fit'; } -::content > .fit { - position: absolute; - top: auto; - right: 0; - bottom: 0; - left: 0; - width: auto; - margin: 0; -} - -polyfill-next-selector { content: ':host .indent'; } -::content > .indent { - margin-left: 60px; -} diff --git a/third_party/polymer/components/core-toolbar/core-toolbar.html b/third_party/polymer/components/core-toolbar/core-toolbar.html deleted file mode 100644 index 5cb7369..0000000 --- a/third_party/polymer/components/core-toolbar/core-toolbar.html +++ /dev/null @@ -1,74 +0,0 @@ -<!-- -Copyright (c) 2014 The Polymer Project Authors. All rights reserved. -This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt -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 ---> - -<!-- -`core-toolbar` is a horizontal bar containing elements that can be used for -label, navigation, search and actions. - - <core-toolbar> - <core-icon-button icon="menu" on-tap="{{menuAction}}"></core-icon-button> - <div flex>Title</div> - <core-icon-button icon="more" on-tap="{{moreAction}}"></core-icon-button> - </core-toolbar> - -`core-toolbar` has a standard height, but can made be taller by setting `tall` -class on the `core-toolbar`. This will make the toolbar 3x the normal height. - - <core-toolbar class="tall"> - <core-icon-button icon="menu"></core-icon-button> - </core-toolbar> - -Apply `medium-tall` class to make the toolbar medium tall. This will make the -toolbar 2x the normal height. - - <core-toolbar class="medium-tall"> - <core-icon-button icon="menu"></core-icon-button> - </core-toolbar> - -When taller, elements can pin to either the top (default), middle or bottom. - - <core-toolbar class="tall"> - <core-icon-button icon="menu"></core-icon-button> - <div class="middle indent">Middle Title</div> - <div class="bottom indent">Bottom Title</div> - </core-toolbar> - -To make an element completely fit at the bottom of the toolbar, use `fit` along -with `bottom`. - - <core-toolbar class="tall"> - <div id="progressBar" class="bottom fit"></div> - </core-toolbar> - -@group Polymer Core Elements -@element core-toolbar -@homepage github.io ---> - -<link rel="import" href="../polymer/polymer.html"> - -<polymer-element name="core-toolbar" noscript> -<template> - - <link rel="stylesheet" href="core-toolbar.css"> - - <div id="bottomBar" class="toolbar-tools" center horizontal layout> - <content select=".bottom"></content> - </div> - - <div id="middleBar" class="toolbar-tools" center horizontal layout> - <content select=".middle"></content> - </div> - - <div id="topBar" class="toolbar-tools" center horizontal layout> - <content></content> - </div> - -</template> -</polymer-element> diff --git a/third_party/polymer/components/core-toolbar/demo.html b/third_party/polymer/components/core-toolbar/demo.html deleted file mode 100644 index 03a7ac0..0000000 --- a/third_party/polymer/components/core-toolbar/demo.html +++ /dev/null @@ -1,107 +0,0 @@ -<!doctype html> -<!-- -Copyright (c) 2014 The Polymer Project Authors. All rights reserved. -This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt -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 ---> -<html> -<head> - <title>core-toolbar</title> - - <script src="../platform/platform.js"></script> - - <link rel="import" href="core-toolbar.html"> - <link rel="import" href="../core-icon-button/core-icon-button.html"> - - <style shim-shadowdom> - - body { - font-family: sans-serif; - } - - core-toolbar { - background-color: #CFA0E9; - } - - core-toolbar.dark-theme { - background-color: #7D25AC; - color: #f1f1f1; - fill: #f1f1f1; - } - - </style> - -</head> -<body unresolved> - - <core-toolbar> - <core-icon-button icon="menu"></core-icon-button> - <span flex>Toolbar</span> - <core-icon-button icon="refresh"></core-icon-button> - <core-icon-button icon="add"></core-icon-button> - </core-toolbar> - - <br> - - <core-toolbar class="dark-theme"> - <core-icon-button icon="menu"></core-icon-button> - <span flex>Toolbar: dark-theme</span> - <core-icon-button icon="refresh"></core-icon-button> - <core-icon-button icon="add"></core-icon-button> - </core-toolbar> - - <br> - - <core-toolbar class="tall"> - <core-icon-button icon="menu"></core-icon-button> - <span flex>Toolbar: tall</span> - <core-icon-button icon="refresh"></core-icon-button> - <core-icon-button icon="add"></core-icon-button> - </core-toolbar> - - <br> - - <core-toolbar class="tall"> - <core-icon-button icon="menu" class="bottom"></core-icon-button> - <span flex class="bottom">Toolbar: tall with elements pin to the bottom</span> - <core-icon-button icon="refresh" class="bottom"></core-icon-button> - <core-icon-button icon="add" class="bottom"></core-icon-button> - </core-toolbar> - - <br> - - <core-toolbar class="medium-tall"> - <core-icon-button icon="menu"></core-icon-button> - <span flex></span> - <core-icon-button icon="refresh"></core-icon-button> - <core-icon-button icon="add"></core-icon-button> - <span class="bottom indent">Toolbar: medium-tall with label aligns to the bottom</span> - </core-toolbar> - - <br> - - <core-toolbar class="tall"> - <core-icon-button icon="menu"></core-icon-button> - <div flex></div> - <core-icon-button icon="refresh"></core-icon-button> - <core-icon-button icon="add"></core-icon-button> - <div class="middle indent">label aligns to the middle</div> - <div class="bottom indent" style="color: #666; font-size: 18px;">some stuffs align to the bottom</div> - </core-toolbar> - - <br> - - <core-toolbar class="tall"> - <core-icon-button icon="menu"></core-icon-button> - <div flex></div> - <core-icon-button icon="refresh"></core-icon-button> - <core-icon-button icon="add"></core-icon-button> - <div class="middle indent">element (e.g. progress) fits at the bottom of the toolbar</div> - <div class="bottom fit" style="height: 20px; background-color: #0f9d58;"></div> - </core-toolbar> - -</body> -</html> diff --git a/third_party/polymer/components/core-toolbar/index.html b/third_party/polymer/components/core-toolbar/index.html deleted file mode 100644 index 58856f3..0000000 --- a/third_party/polymer/components/core-toolbar/index.html +++ /dev/null @@ -1,22 +0,0 @@ -<!doctype html> -<!-- -Copyright (c) 2014 The Polymer Project Authors. All rights reserved. -This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE -The complete set of authors may be found at http://polymer.github.io/AUTHORS -The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS -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 ---> -<html> -<head> - - <script src="../platform/platform.js"></script> - <link rel="import" href="../core-component-page/core-component-page.html"> - -</head> -<body unresolved> - - <core-component-page></core-component-page> - -</body> -</html> diff --git a/third_party/polymer/components/core-toolbar/metadata.html b/third_party/polymer/components/core-toolbar/metadata.html deleted file mode 100644 index e9a48b6..0000000 --- a/third_party/polymer/components/core-toolbar/metadata.html +++ /dev/null @@ -1,19 +0,0 @@ -<x-meta id="core-toolbar" label="Toolbar" group="Core" isContainer> - - <template> - - <core-toolbar style="right: 0px; left: 0px; background-color: #4F7DC9; color: #fff; fill: #fff;"> - <core-icon-button icon="menu"></core-icon-button> - <div flex>Toolbar</div> - </core-toolbar> - - </template> - - <template id="imports"> - - <link rel="import" href="../core-icon-button/core-icon-button.html"> - <link rel="import" href="core-toolbar.html"> - - </template> - -</x-meta>
\ No newline at end of file diff --git a/third_party/polymer/components/core-tooltip/.bower.json b/third_party/polymer/components/core-tooltip/.bower.json deleted file mode 100644 index 3abc499..0000000 --- a/third_party/polymer/components/core-tooltip/.bower.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "name": "core-tooltip", - "private": true, - "dependencies": { - "polymer": "Polymer/polymer#>=0.3.0 <1.0.0" - }, - "homepage": "https://github.com/Polymer/core-tooltip", - "version": "0.3.5", - "_release": "0.3.5", - "_resolution": { - "type": "version", - "tag": "0.3.5", - "commit": "c0abe47824167800043f459a04d7a3ef731cd4e7" - }, - "_source": "git://github.com/Polymer/core-tooltip.git", - "_target": "0.3.5", - "_originalSource": "Polymer/core-tooltip" -}
\ No newline at end of file diff --git a/third_party/polymer/components/core-tooltip/README.md b/third_party/polymer/components/core-tooltip/README.md deleted file mode 100644 index 22d55c1..0000000 --- a/third_party/polymer/components/core-tooltip/README.md +++ /dev/null @@ -1,4 +0,0 @@ -core-tooltip -============ - -See the [component page](http://polymer-project.org/docs/elements/core-elements.html#core-tooltip) for more information. diff --git a/third_party/polymer/components/core-tooltip/bower.json b/third_party/polymer/components/core-tooltip/bower.json deleted file mode 100644 index 4bd73aef..0000000 --- a/third_party/polymer/components/core-tooltip/bower.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "name": "core-tooltip", - "private": true, - "dependencies": { - "polymer": "Polymer/polymer#>=0.3.0 <1.0.0" - } -}
\ No newline at end of file diff --git a/third_party/polymer/components/core-tooltip/core-tooltip.css b/third_party/polymer/components/core-tooltip/core-tooltip.css deleted file mode 100644 index 09c0b3b..0000000 --- a/third_party/polymer/components/core-tooltip/core-tooltip.css +++ /dev/null @@ -1,103 +0,0 @@ -/* Copyright (c) 2014 The Polymer Project Authors. All rights reserved. -This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt -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 */ - -:host { - box-sizing: border-box; - position: relative; - display: inline-block; -} - -:host(:hover) .polymer-tooltip { - visibility: visible !important; -} - -:host(:focus) .polymer-tooltip { - visibility: visible !important; -} - -.polymer-tooltip:not(.show) { - visibility: hidden; -} - -.polymer-tooltip { - pointer-events: none; - position: absolute; - display: flex; - font-size: 10px; - font-family: sans-serif; - padding: 8px; - color: white; - background-color: rgba(0,0,0,0.8); - box-sizing: border-box; - border-radius: 3px; /* TODO: not in spec. */ - white-space: nowrap; - line-height: 6px; - z-index: 1002; /* TODO: this is brittle. */ -} - -:host([large]) .polymer-tooltip { - line-height: 14px; - font-size: 14px; - padding: 16px; -} - -.polymer-tooltip.noarrow::after { - display: none; -} - -.polymer-tooltip::after { - position: absolute; - border: solid transparent; - content: ''; - height: 0; - width: 0; - border-width: 4px; -} - -.top { - margin-bottom: 10px; /* TODO: not specified in spec */ - bottom: 100%; -} - -.right { - margin-left: 10px; /* TODO: not specified in spec */ - left: 100%; -} - -.bottom { - top: 100%; - margin-top: 10px; /* TODO: not specified in spec */ -} - -.left { - margin-right: 10px; /* TODO: not specified in spec */ - right: 100%; -} - -.polymer-tooltip.bottom::after { - bottom: 100%; - left: calc(50% - 4px); - border-bottom-color: rgba(0,0,0,0.8); -} - -.polymer-tooltip.left::after { - left: 100%; - top: calc(50% - 4px); - border-left-color: rgba(0,0,0,0.8); -} - -.polymer-tooltip.top::after { - top: 100%; - left: calc(50% - 4px); - border-top-color: rgba(0,0,0,0.8); -} - -.polymer-tooltip.right::after { - right: 100%; - top: calc(50% - 4px); - border-right-color: rgba(0,0,0,0.8); -} diff --git a/third_party/polymer/components/core-tooltip/core-tooltip.html b/third_party/polymer/components/core-tooltip/core-tooltip.html deleted file mode 100644 index 76d7abc..0000000 --- a/third_party/polymer/components/core-tooltip/core-tooltip.html +++ /dev/null @@ -1,144 +0,0 @@ -<!-- -Copyright (c) 2014 The Polymer Project Authors. All rights reserved. -This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt -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 ---> - -<!-- -The `core-tooltip` element creates a hover tooltip centered for the content -it contains. It can be positioned on the top|bottom|left|right of content using -the `position` attribute. - -To include HTML in the tooltip, include the `tip` attribute on the relevant -content. - -<b>Example</b>: - - <core-tooltip label="I'm a tooltip"> - <span>Hover over me.</span> - </core-tooltip> - -<b>Example</b> - positioning the tooltip to the right: - - <core-tooltip label="I'm a tooltip to the right" position="right"> - <polymer-ui-icon-button icon="drawer"></polymer-ui-icon-button> - </core-tooltip> - -<b>Example</b> - no arrow and showing by default: - - <core-tooltip label="Tooltip with no arrow and always on" noarrow show> - <img src="image.jpg"> - </core-tooltip> - -<b>Example</b> - rich tooltip using the `tip` attribute: - - <core-tooltip> - <div>Example of a rich information tooltip</div> - <div tip> - <img src="profile.jpg">Foo <b>Bar</b> - <a href="#">@baz</a> - </div> - </core-tooltip> - -@group Polymer Core Elements -@element core-tooltip -@homepage http://polymer.github.io/core-tooltip ---> - -<link rel="import" href="../polymer/polymer.html"> - -<!-- TODO: would be nice to inherit from label to get .htmlFor, and .control, - but the latter is readonly. --> -<!-- TODO: support off center arrows. --> -<!-- TODO: detect mobile and apply the .large class, instead of manual - control. --> -<!-- TODO: possibly reuse core-overlay. --> -<polymer-element name="core-tooltip" attributes="noarrow position label show" tabindex="0"> -<template> - - <link rel="stylesheet" href="core-tooltip.css"> - - <div id="tooltip" class="polymer-tooltip {{position}} {{ {noarrow: noarrow, show: show} | tokenList}}"> - <content select="[tip]">{{label}}</content> - </div> - - <content></content> - -</template> -<script> - - Polymer('core-tooltip', { - - /** - * A simple string label for the tooltip to display. To display a rich - * that includes HTML, use the `tip` attribute on the content. - * - * @attribute label - * @type string - * @default null - */ - label: null, - - /** - * If true, the tooltip an arrow pointing towards the content. - * - * @attribute noarrow - * @type boolean - * @default false - */ - noarrow: false, - - /** - * If true, the tooltip displays by default. - * - * @attribute show - * @type boolean - * @default false - */ - show: false, - - /** - * Positions the tooltip to the top, right, bottom, left of its content. - * - * @attribute position - * @type string - * @default 'bottom' - */ - position: 'bottom', - - attached: function() { - this.setPosition(); - }, - - labelChanged: function(oldVal, newVal) { - // Run if we're not after attached(). - if (oldVal) { - this.setPosition(); - } - }, - - setPosition: function() { - var controlWidth = this.clientWidth; - var controlHeight = this.clientHeight; - - var styles = getComputedStyle(this.$.tooltip); - var toolTipWidth = parseFloat(styles.width); - var toolTipHeight = parseFloat(styles.height); - - switch (this.position) { - case 'top': - case 'bottom': - this.$.tooltip.style.left = (controlWidth - toolTipWidth) / 2 + 'px'; - break; - case 'left': - case 'right': - this.$.tooltip.style.top = (controlHeight - toolTipHeight) / 2 + 'px'; - break; - } - } - }); - -</script> -</polymer-element> diff --git a/third_party/polymer/components/core-tooltip/demo.html b/third_party/polymer/components/core-tooltip/demo.html deleted file mode 100644 index bdb7b8c..0000000 --- a/third_party/polymer/components/core-tooltip/demo.html +++ /dev/null @@ -1,171 +0,0 @@ -<!doctype html> -<html lang="en"> -<head> - - <meta charset="utf-8"> - <title>Core Tooltip</title> - - <script src="../platform/platform.js"></script> - - <link rel="import" href="core-tooltip.html"> - - <style> - body { - font-family: "Open Sans", sans-serif; - font-weight: 300; - padding: 24px; - } - - section { - display: flex; - justify-content: center; - align-items: center; - } - - .example { - margin: 35px 15px; - } - - .example > * { - margin: 0 15px; - } - - .fakebutton { - box-shadow: 0 0 3px #aaa inset; - border-radius: 3px; - padding: 7px 5px; - } - .fakebutton:hover { - background-color: white; - } - - img { - width: 400px; - height: 150px; - object-fit: cover; - } - - img.large { - border: 15px solid white; - box-sizing: border-box; - } - - .profile { - width: 60px; - height: auto; - border-radius: 50%; - vertical-align: middle; - } - - a { - color: currentcolor; - text-decoration: none; - } - - .rich { - background: hotpink; - color: white; - padding:20px; - border-radius: 5px; - } - - core-tooltip.fancy::shadow .polymer-tooltip { - opacity: 0; - -webkit-transition: all 300ms cubic-bezier(0,1.92,.99,1.07); - transition: all 300ms cubic-bezier(0,1.92,.99,1.07); - -webkit-transform: translate3d(0, -10px, 0); - transform: translate3d(0, -10px, 0); - } - - core-tooltip.fancy:hover::shadow .polymer-tooltip, - core-tooltip.fancy:focus::shadow .polymer-tooltip { - opacity: 1; - -webkit-transform: translate3d(0, 0, 0); - transform: translate3d(0, 0, 0); - } - </style> - <style shim-shadowdom2> - .on /deep/ .polymer-tooltip { - visibility: visible; - } - </style> - -</head> -<body unresolved> - - <article onclick="this.classList.toggle('on');"> - - <em>click the page to toggle all examples...</em> - - <section class="small"> - - <div class="example"> - - <core-tooltip label='position="left"' position="left"> - <div class="fakebutton">|||</div> - </core-tooltip> - - <core-tooltip label='position="top"' position="top"> - <div class="fakebutton">|||</div> - </core-tooltip> - - <core-tooltip label='position="bottom"' position="bottom"> - <div class="fakebutton">|||</div> - </core-tooltip> - - <core-tooltip label='position="right"' position="right"> - <div class="fakebutton">|||</div> - </core-tooltip> - - </div> - - <div class="example"> - - <core-tooltip label="Fancy effect" class="fancy"> - <img src="https://pbs.twimg.com/profile_images/378800000548263523/c110b0a4c3e3e4d3dcce1d2020f3eded.jpeg - " class="profile"> - </core-tooltip> - - </div> - - </section> - - <section> - - <div class="example"> - - <core-tooltip> - <div class="rich">Rich tooltip with HTML</div> - <div tip> - <img src="https://pbs.twimg.com/profile_images/378800000548263523/c110b0a4c3e3e4d3dcce1d2020f3eded.jpeg - " class="profile" style="width: 40px;margin-right: 8px;">Eric <b>Bidelman</b> - <a href="#">@ebidel</a></div> - </core-tooltip> - - </div> - - <div class="example"> - - <core-tooltip label="<core-tooltip large>" large> - Larger tooltips for mobile - </core-tooltip> - - </div> - - </section> - - <section> - - <div class="example"> - - <core-tooltip label="Tooltip with no arrow and always on: <core-tooltip noarrow show>" position="bottom" noarrow show> - <img src="https://s3-us-west-2.amazonaws.com/s.cdpn.io/3/building.jpg" class="large"> - </core-tooltip> - - </div> - - </section> - - </article> - -</body> -</html>
\ No newline at end of file diff --git a/third_party/polymer/components/core-tooltip/index.html b/third_party/polymer/components/core-tooltip/index.html deleted file mode 100644 index 484a759..0000000 --- a/third_party/polymer/components/core-tooltip/index.html +++ /dev/null @@ -1,23 +0,0 @@ -<!doctype html> -<!-- -Copyright (c) 2014 The Polymer Project Authors. All rights reserved. -This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE -The complete set of authors may be found at http://polymer.github.io/AUTHORS -The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS -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 ---> -<html> -<head> - - <meta charset="utf-8"> - <script src="../platform/platform.js"></script> - <link rel="import" href="../core-component-page/core-component-page.html"> - -</head> -<body unresolved> - - <core-component-page></core-component-page> - -</body> -</html>
\ No newline at end of file diff --git a/third_party/polymer/components/core-tooltip/metadata.html b/third_party/polymer/components/core-tooltip/metadata.html deleted file mode 100644 index 157c995..0000000 --- a/third_party/polymer/components/core-tooltip/metadata.html +++ /dev/null @@ -1,9 +0,0 @@ -<x-meta id="core-tooltip" label="Tooltip" group="Core">
- <template>
- <core-tooltip></core-tooltip>
- </template>
- <template id="imports">
- <link rel="import" href="core-tooltip.html">
- </template>
-</x-meta>
-
diff --git a/third_party/polymer/components/core-transition/.bower.json b/third_party/polymer/components/core-transition/.bower.json deleted file mode 100644 index dca4be3..0000000 --- a/third_party/polymer/components/core-transition/.bower.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "name": "core-transition", - "private": true, - "dependencies": { - "polymer": "Polymer/polymer#>=0.3.0 <1.0.0", - "core-meta": "Polymer/core-meta#>=0.3.0 <1.0.0" - }, - "homepage": "https://github.com/Polymer/core-transition", - "version": "0.3.5", - "_release": "0.3.5", - "_resolution": { - "type": "version", - "tag": "0.3.5", - "commit": "12960cd196487364d35492d6d172c30aeccb70a9" - }, - "_source": "git://github.com/Polymer/core-transition.git", - "_target": "0.3.5", - "_originalSource": "Polymer/core-transition" -}
\ No newline at end of file diff --git a/third_party/polymer/components/core-transition/README.md b/third_party/polymer/components/core-transition/README.md deleted file mode 100644 index c280251..0000000 --- a/third_party/polymer/components/core-transition/README.md +++ /dev/null @@ -1,2 +0,0 @@ -core-transition -=============== diff --git a/third_party/polymer/components/core-transition/bower.json b/third_party/polymer/components/core-transition/bower.json deleted file mode 100644 index b994821..0000000 --- a/third_party/polymer/components/core-transition/bower.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "name": "core-transition", - "private": true, - "dependencies": { - "polymer": "Polymer/polymer#>=0.3.0 <1.0.0", - "core-meta": "Polymer/core-meta#>=0.3.0 <1.0.0" - } -}
\ No newline at end of file diff --git a/third_party/polymer/components/core-transition/core-transition-css.html b/third_party/polymer/components/core-transition/core-transition-css.html deleted file mode 100644 index fd8d2fc..0000000 --- a/third_party/polymer/components/core-transition/core-transition-css.html +++ /dev/null @@ -1,221 +0,0 @@ -<!-- -Copyright (c) 2014 The Polymer Project Authors. All rights reserved. -This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt -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 ---> - -<!-- - -`<core-transition-css>` implements CSS transitions as `<core-transition>` objects so they can be -reused in a pluggable transition system such as in `<core-overlay>`. Currently this class has -some specific support to animate an element from and to the viewport such as a dialog, but you -can override it for different effects. - -Example: - -my-css-transition.html: - - <polymer-element name="my-css-transition" extends="core-transition-css"> - <template> - <style> - :host(.my-transition) { - opacity: 0; - transition: transform 1s ease-out, opacity 1s ease-out; - } - :host(.my-transition.my-opened) { - opacity: 1; - transform: none; - } - :host(.my-transition-top) { - transform: translateY(-100vh); - } - :host(.my-transition-bottom) { - transform: translateY(100vh); - } - </style> - </template> - <script> - Polymer({ - baseClass: 'my-transition', - openedClass: 'my-opened' - }); - </script> - </polymer-element> - - <my-css-transition id="my-transition-top" transitionType="top"></my-css-transition> - <my-css-transition id="my-transition-bottom" transitionType="bottom"></my-css-transition> - -my-css-transition-demo.html - - <link href="components/core-meta/core-meta.html" rel="import"> - <link href="my-css-transition.html"> - - <div id="animate-me"></div> - - <script> - // Get the core-transition - var meta = document.createElement('core-meta'); - meta.type = 'transition'; - var transition1 = meta.byId('my-transition-top'); - - // Set up the animation - var animated = document.getElementById('animate-me'); - transition1.setup(animated); - transition1.go(animated, {opened: true}); - </script> - -The first element in the template of a `<core-transition-css>` object should be a stylesheet. It -will be injected to the scope of the animated node in the `setup` function. The node is initially -invisible with `opacity: 0`, and you can transition it to an "opened" state by passing -`{opened: true}` to the `go` function. - -All nodes being animated will get the class `my-transition` added in the `setup` function. -Additionally, the class `my-transition-<transitionType>` will be applied. You can use the -`transitionType` attribute to implement several different behaviors with the same -`<core-transition-css>` object. In the above example, `<my-css-transition>` implements both -sliding the node from the top of the viewport and from the bottom of the viewport. - -Available transitions ---------------------- - -`<core-transition-css>` includes several commonly used transitions. - -`core-transition-fade`: Animates from `opacity: 0` to `opacity: 1` when it opens. - -`core-transition-center`: Zooms the node into the final size. - -`core-transition-top`: Slides the node into the final position from the top. - -`core-transition-bottom`: Slides the node into the final position from the bottom. - -`core-transition-left`: Slides the node into the final position from the left. - -`core-transition-right`: Slides the node into the final position from the right. - -@group Polymer Core Elements -@element core-transition-css -@extends core-transition -@status beta -@homepage github.io ---> - -<link rel="import" href="core-transition.html"> - -<polymer-element name="core-transition-css" extends="core-transition" attributes="transitionType"> -<template> - <link no-shim rel="stylesheet" href="core-transition-overlay.css"> -</template> -<script> - - Polymer('core-transition-css', { - - /** - * The class that will be applied to all animated nodes. - * - * @attribute baseClass - * @type string - * @default "core-transition" - */ - baseClass: 'core-transition', - - /** - * The class that will be applied to nodes in the opened state. - * - * @attribute openedClass - * @type string - * @default "core-opened" - */ - openedClass: 'core-opened', - - /** - * The class that will be applied to nodes in the closed state. - * - * @attribute closedClass - * @type string - * @default "core-closed" - */ - closedClass: 'core-closed', - - /** - * Event to listen to for animation completion. - * - * @attribute completeEventName - * @type string - * @default "transitionEnd" - */ - completeEventName: 'transitionend', - - publish: { - /** - * A secondary configuration attribute for the animation. The class - * `<baseClass>-<transitionType` is applied to the animated node during - * `setup`. - * - * @attribute transitionType - * @type string - */ - transitionType: null - }, - - registerCallback: function(element) { - this.transitionStyle = element.templateContent().firstElementChild; - }, - - // template is just for loading styles, we don't need a shadowRoot - fetchTemplate: function() { - return null; - }, - - go: function(node, state) { - if (state.opened !== undefined) { - this.transitionOpened(node, state.opened); - } - }, - - setup: function(node) { - if (!node._hasTransitionStyle) { - if (!node.shadowRoot) { - node.createShadowRoot().innerHTML = '<content></content>'; - } - this.installScopeStyle(this.transitionStyle, 'transition', - node.shadowRoot); - node._hasTransitionStyle = true; - } - node.classList.add(this.baseClass); - if (this.transitionType) { - node.classList.add(this.baseClass + '-' + this.transitionType); - } - }, - - teardown: function(node) { - node.classList.remove(this.baseClass); - if (this.transitionType) { - node.classList.remove(this.baseClass + '-' + this.transitionType); - } - }, - - transitionOpened: function(node, opened) { - this.listenOnce(node, this.completeEventName, function() { - node.classList.toggle(this.revealedClass, opened); - if (!opened) { - node.classList.remove(this.closedClass); - } - this.complete(node); - }); - node.classList.toggle(this.openedClass, opened); - node.classList.toggle(this.closedClass, !opened); - } - - }); -</script> -</polymer-element> - -<core-transition-css id="core-transition-fade"></core-transition-css> -<core-transition-css id="core-transition-center" transitionType="center"></core-transition-css> -<core-transition-css id="core-transition-top" transitionType="top"></core-transition-css> -<core-transition-css id="core-transition-bottom" transitionType="bottom"></core-transition-css> -<core-transition-css id="core-transition-left" transitionType="left"></core-transition-css> -<core-transition-css id="core-transition-right" transitionType="right"></core-transition-css> diff --git a/third_party/polymer/components/core-transition/core-transition-overlay.css b/third_party/polymer/components/core-transition/core-transition-overlay.css deleted file mode 100644 index 07b2d69..0000000 --- a/third_party/polymer/components/core-transition/core-transition-overlay.css +++ /dev/null @@ -1,46 +0,0 @@ -/* Copyright (c) 2014 The Polymer Project Authors. All rights reserved. -This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt -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 */ - -:host(.core-transition) { - outline: none; - overflow: hidden; - opacity: 0; - transition: transform 0.2s ease-in-out, opacity 0.2s ease-in; - -webkit-transition: -webkit-transform 0.2s ease-in-out, opacity 0.2s ease-in; -} - - -:host(.core-transition.core-opened) { - opacity: 1; - transform: none; - -webkit-transform: none; -} - -:host(.core-transition-center) { - transform: scale(0.5); - -webkit-transform: scale(0.5); -} - -:host(.core-transition-top) { - transform: translateY(-200%); - -webkit-transform: translateY(-200%); -} - -:host(.core-transition-bottom) { - transform: translateY(200%); - -webkit-transform: translateY(200%); -} - -:host(.core-transition-left) { - transform: translateX(-200%); - -webkit-transform: translateX(-200%); -} - -:host(.core-transition-right) { - transform: translateX(200%); - -webkit-transform: translateX(200%); -}
\ No newline at end of file diff --git a/third_party/polymer/components/core-transition/core-transition.html b/third_party/polymer/components/core-transition/core-transition.html deleted file mode 100644 index 6b09672..0000000 --- a/third_party/polymer/components/core-transition/core-transition.html +++ /dev/null @@ -1,140 +0,0 @@ -<!-- -Copyright (c) 2014 The Polymer Project Authors. All rights reserved. -This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt -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 ---> - -<!-- - -`<core-transition>` is an abstraction of an animation. It is used to implement pluggable -transitions, for example in `<core-overlay>`. You can extend this class to create a custom -animation, instantiate it, and import it where you need the animation. - -All instances of `<core-transition>` are stored in a single database with `type=transition`. -For more about the database, please see the documentation for `<core-meta>`. - -Each instance of `<core-transition>` objects are shared across all the clients, so you should -not store state information specific to the animated element in the transition. Rather, store -it on the element. - -Example: - -my-transition.html: - - <polymer-element name="my-transition" extends="core-transition"> - <script> - go: function(node) { - node.style.transition = 'opacity 1s ease-out'; - node.style.opacity = 0; - } - </script> - </polymer-element> - - <my-transition id="my-fade-out"></my-transition> - -my-transition-demo.html: - - <link href="components/core-meta/core-meta.html" rel="import"> - <link href="my-transition.html" rel="import"> - - <div id="animate-me"></div> - - <script> - // Get the core-transition - var meta = document.createElement('core-meta'); - meta.type = 'transition'; - var transition = meta.byId('my-fade-out'); - - // Run the animation - var animated = document.getElementById('animate-me'); - transition.go(animated); - </script> - -@group Polymer Core Elements -@element core-transition -@extends core-meta -@status beta -@homepage github.io ---> -<!-- -Fired when the animation finishes. - -@event core-transitionend -@param {Object} detail -@param {Object} detail.node The animated node ---> - -<link rel="import" href="../core-meta/core-meta.html"> - -<polymer-element name="core-transition" extends="core-meta"> - - <script> - Polymer('core-transition', { - - type: 'transition', - - /** - * Run the animation. - * - * @method go - * @param {Node} node The node to apply the animation on - * @param {Object} state State info - */ - go: function(node, state) { - this.complete(node); - }, - - /** - * Set up the animation. This may include injecting a stylesheet, - * applying styles, creating a web animations object, etc.. This - * - * @method setup - * @param {Node} node The animated node - */ - setup: function(node) { - }, - - /** - * Tear down the animation. - * - * @method teardown - * @param {Node} node The animated node - */ - teardown: function(node) { - }, - - /** - * Called when the animation completes. This function also fires the - * `core-transitionend` event. - * - * @method complete - * @param {Node} node The animated node - */ - complete: function(node) { - this.fire('core-transitionend', null, node); - }, - - /** - * Utility function to listen to an event on a node once. - * - * @method listenOnce - * @param {Node} node The animated node - * @param {string} event Name of an event - * @param {Function} fn Event handler - * @param {Array} args Additional arguments to pass to `fn` - */ - listenOnce: function(node, event, fn, args) { - var self = this; - var listener = function() { - fn.apply(self, args); - node.removeEventListener(event, listener, false); - } - node.addEventListener(event, listener, false); - } - - }); - </script> -</polymer-element>
\ No newline at end of file diff --git a/third_party/polymer/components/core-transition/demo.html b/third_party/polymer/components/core-transition/demo.html deleted file mode 100644 index 9efd403..0000000 --- a/third_party/polymer/components/core-transition/demo.html +++ /dev/null @@ -1,87 +0,0 @@ -<!doctype html> -<!-- -Copyright 2013 The Polymer Authors. All rights reserved. -Use of this source code is governed by a BSD-style -license that can be found in the LICENSE file. ---> -<html> -<head> - - <meta charset="utf-8"> - <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> - <meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no"> - - <title>core-transition</title> - - <script src="../platform/platform.js"></script> - - <link href="core-transition-css.html" rel="import"> - - <style> - #animate-me { - background-color: lime; - position: fixed; - top: 100px; - width: 100%; - height: 100%; - } - </style> - -</head> -<body unresolved> - - <div id="animate-me" hidden></div> - - <select id="sel" onchange="setup();"> - <option value="core-transition-fade" selected>core-transition-fade</option> - <option value="core-transition-center">core-transition-center</option> - <option value="core-transition-top">core-transition-top</option> - <option value="core-transition-bottom">core-transition-bottom</option> - <option value="core-transition-left">core-transition-left</option> - <option value="core-transition-right">core-transition-right</option> - </select> - - <button onclick="stuff();">toggle</button> - - <script> - - document.addEventListener('polymer-ready', function() { - // initial setup - setup(); - document.getElementById('animate-me').removeAttribute('hidden'); - }); - - var meta; - var transition; - var state = { - opened: false - } - - function getMeta() { - if (!meta) { - meta = document.createElement('core-meta'); - meta.type = 'transition'; - } - return meta; - } - - function setup() { - var target = document.getElementById('animate-me'); - - if (transition) { - transition.teardown(target); - } - - var value = document.getElementById('sel').selectedOptions[0].value; - transition = getMeta().byId(value); - transition.setup(target); - } - - function stuff() { - var target = document.getElementById('animate-me'); - state.opened = !state.opened; - transition.go(target, state); - } - </script> -</body> -</html> diff --git a/third_party/polymer/components/core-transition/index.html b/third_party/polymer/components/core-transition/index.html deleted file mode 100644 index 8a75554..0000000 --- a/third_party/polymer/components/core-transition/index.html +++ /dev/null @@ -1,22 +0,0 @@ -<!doctype html> -<!-- -Copyright (c) 2014 The Polymer Project Authors. All rights reserved. -This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE -The complete set of authors may be found at http://polymer.github.io/AUTHORS -The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS -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 ---> -<html> -<head> - - <script src="../platform/platform.js"></script> - <link rel="import" href="../core-component-page/core-component-page.html"> - -</head> -<body unresolved> - - <core-component-page sources='["core-transition.html","../core-meta/core-meta.html","core-transition-css.html"]'></core-component-page> - -</body> -</html> diff --git a/third_party/polymer/components/font-roboto/.bower.json b/third_party/polymer/components/font-roboto/.bower.json deleted file mode 100644 index d6919f3..0000000 --- a/third_party/polymer/components/font-roboto/.bower.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "name": "font-roboto", - "homepage": "https://github.com/Polymer/font-roboto", - "version": "0.3.5", - "_release": "0.3.5", - "_resolution": { - "type": "version", - "tag": "0.3.5", - "commit": "3515cb3b0d19e5df52ae8c4ad9606ab9a67b8fa6" - }, - "_source": "git://github.com/Polymer/font-roboto.git", - "_target": "0.3.5", - "_originalSource": "Polymer/font-roboto" -}
\ No newline at end of file diff --git a/third_party/polymer/components/font-roboto/roboto.html b/third_party/polymer/components/font-roboto/roboto.html deleted file mode 100644 index c379ebf..0000000 --- a/third_party/polymer/components/font-roboto/roboto.html +++ /dev/null @@ -1,9 +0,0 @@ -<!-- -Copyright (c) 2014 The Polymer Project Authors. All rights reserved. -This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt -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 ---> -<link href='//fonts.googleapis.com/css?family=RobotoDraft:regular,bold,italic,thin,light,bolditalic,black,medium&lang=en' rel='stylesheet' type='text/css'> diff --git a/third_party/polymer/components/paper-button/.bower.json b/third_party/polymer/components/paper-button/.bower.json deleted file mode 100644 index bf90392..0000000 --- a/third_party/polymer/components/paper-button/.bower.json +++ /dev/null @@ -1,22 +0,0 @@ -{ - "name": "paper-button", - "private": true, - "dependencies": { - "polymer": "Polymer/polymer#>=0.3.0 <1.0.0", - "core-icon": "Polymer/core-icon#>=0.3.0 <1.0.0", - "paper-focusable": "Polymer/paper-focusable#>=0.3.0 <1.0.0", - "paper-ripple": "Polymer/paper-ripple#>=0.3.0 <1.0.0", - "paper-shadow": "Polymer/paper-shadow#>=0.3.0 <1.0.0" - }, - "homepage": "https://github.com/Polymer/paper-button", - "version": "0.3.5", - "_release": "0.3.5", - "_resolution": { - "type": "version", - "tag": "0.3.5", - "commit": "1ca7459275aa5ae511153a1d06931239577f1677" - }, - "_source": "git://github.com/Polymer/paper-button.git", - "_target": "0.3.5", - "_originalSource": "Polymer/paper-button" -}
\ No newline at end of file diff --git a/third_party/polymer/components/paper-button/README.md b/third_party/polymer/components/paper-button/README.md deleted file mode 100644 index 75919a5..0000000 --- a/third_party/polymer/components/paper-button/README.md +++ /dev/null @@ -1,4 +0,0 @@ -paper-button -=================== - -See the [component page](http://www.polymer-project.org/docs/elements/paper-elements.html#paper-button) for more information. diff --git a/third_party/polymer/components/paper-button/bower.json b/third_party/polymer/components/paper-button/bower.json deleted file mode 100644 index 951e47d..0000000 --- a/third_party/polymer/components/paper-button/bower.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "name": "paper-button", - "private": true, - "dependencies": { - "polymer": "Polymer/polymer#>=0.3.0 <1.0.0", - "core-icon": "Polymer/core-icon#>=0.3.0 <1.0.0", - "paper-focusable": "Polymer/paper-focusable#>=0.3.0 <1.0.0", - "paper-ripple": "Polymer/paper-ripple#>=0.3.0 <1.0.0", - "paper-shadow": "Polymer/paper-shadow#>=0.3.0 <1.0.0" - } -}
\ No newline at end of file diff --git a/third_party/polymer/components/paper-button/demo.html b/third_party/polymer/components/paper-button/demo.html deleted file mode 100644 index fb71815..0000000 --- a/third_party/polymer/components/paper-button/demo.html +++ /dev/null @@ -1,99 +0,0 @@ -<!doctype html> -<!-- -Copyright 2013 The Polymer Authors. All rights reserved. -Use of this source code is governed by a BSD-style -license that can be found in the LICENSE file. ---> -<html> -<head> - - <meta charset="utf-8"> - <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> - <meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no"> - - <title>paper-button</title> - - <script src="../platform/platform.js"></script> - - <link href="../font-roboto/roboto.html" rel="import"> - <link href="../core-icons/core-icons.html" rel="import"> - <link href="paper-button.html" rel="import"> - - <style shim-shadowdom> - body { - font-family: RobotoDraft, 'Helvetica Neue', Helvetica, Arial; - margin: 0; - padding: 24px; - -webkit-user-select: none; - -moz-user-select: none; - -ms-user-select: none; - user-select: none; - -webkit-tap-highlight-color: rgba(0,0,0,0); - -webkit-touch-callout: none; - transform: translateZ(0); - -webkit-transform: translateZ(0); - } - - section { - padding: 20px 0; - } - - section > div { - padding: 14px;:width; - } - - paper-button { - margin: 1em; - width: 10em; - } - - paper-button.colored { - color: #4285f4; - fill: #4285f4; - } - - paper-button[raisedButton].colored { - background: #4285f4; - color: #fff; - } - - paper-button[raisedButton].colored #ripple, - paper-button[raisedButton].colored::shadow #ripple { - color: #2a56c6; - } - - paper-button[raisedButton].colored #focusBg, - paper-button[raisedButton].colored::shadow #focusBg { - background: #3367d6; - } - - </style> -</head> -<body unresolved> - - <section> - - <div>Flat buttons</div> - - <paper-button label="button"></paper-button> - <paper-button class="colored" label="colored"></paper-button> - <!-- <paper-button focused label="focused"></paper-button> --> - <paper-button disabled label="disabled" onclick="alert('should not be clickable');"></paper-button> - - </section> - - <br> - - <section> - - <div>Raised buttons</div> - - <paper-button raisedButton label="button"></paper-button> - <paper-button raisedButton class="colored" label="colored"></paper-button> - <!-- <paper-button raisedButton focused label="focused"></paper-button> --> - <paper-button raisedButton disabled label="disabled" onclick="alert('should not be clickable');"></paper-button> - - </section> - -</body> -</html> diff --git a/third_party/polymer/components/paper-button/demo2.html b/third_party/polymer/components/paper-button/demo2.html deleted file mode 100644 index 29cbb32..0000000 --- a/third_party/polymer/components/paper-button/demo2.html +++ /dev/null @@ -1,136 +0,0 @@ -<!doctype html> -<!-- -Copyright 2013 The Polymer Authors. All rights reserved. -Use of this source code is governed by a BSD-style -license that can be found in the LICENSE file. ---> -<html> -<head> - <title>paper-button</title> - <meta charset="utf-8"> - <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> - <meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no"> - <script src="../platform/platform.js"></script> - <link href="../font-roboto/roboto.html" rel="import"> - <link href="../core-icons/core-icons.html" rel="import"> - <link href="paper-button.html" rel="import"> - <style shim-shadowdom> - body { - font-family: RobotoDraft, 'Helvetica Neue', Helvetica, Arial; - font-size: 14px; - text-align: center; - padding: 1em 2em; - transform: translateZ(0); - -webkit-transform: translateZ(0); - transform: translateZ(0); - } - h1 { - margin-bottom: 2em; - } - - section { - display: inline-block; - background: #f7f7f7; - border-radius: 3px; - width: 25%; - text-align: center; - margin: 1%; - padding: 1em; - } - - paper-button { - margin: 1em; - width: 10em; - } - - paper-button.colored { - color: #4285f4; - fill: #4285f4; - } - - paper-button[raisedButton].colored { - background: #4285f4; - color: #fff; - } - paper-button[raisedButton].colored.hover:hover { - background: #3367d6; - } - paper-button[raisedButton].colored::shadow #ripple { - color: #2a56c6; - } - paper-button[raisedButton].colored::shadow #focusBg { - background: #3367d6; - } - - .label { - text-align: left; - color: #bbb; - font-size: 12px; - margin-top: 2em; - } - </style> -</head> -<body unresolved> - - <h1><paper-button></h1> - - <section> - <paper-button label="button"></paper-button> - <br> - <paper-button class="colored" label="colored"></paper-button> - <br> - <paper-button disabled label="disabled"></paper-button> - <br> - <div class="label">flat</div> - </section> - - <section> - <paper-button raisedButton label="button"></paper-button> - <br> - <paper-button raisedButton class="colored" label="colored"></paper-button> - <br> - <paper-button raisedButton disabled label="disabled"></paper-button> - <br> - <div class="label">raised</div> - </section> - - <br> - <br> - - <section> - <paper-button class="hover" label="button"></paper-button> - <br> - <paper-button class="colored hover" label="colored"></paper-button> - <br> - <div class="label">flat + hover state</div> - </section> - - <section> - <paper-button raisedButton class="hover" label="button"></paper-button> - <br> - <paper-button raisedButton class="colored hover" label="colored"></paper-button> - <br> - <div class="label">raised + hover state</div> - </section> - - <br> - <br> - - <section> - <paper-button focused label="button"></paper-button> - <br> - <paper-button focused class="colored" label="colored"></paper-button> - <br> - <div class="label">flat + focused</div> - </section> - - <section> - <paper-button raisedButton focused label="button"></paper-button> - <br> - <paper-button raisedButton focused class="colored" label="colored"></paper-button> - <br> - <div class="label">raised + focused</div> - </section> - -</body> -</html> diff --git a/third_party/polymer/components/paper-button/index.html b/third_party/polymer/components/paper-button/index.html deleted file mode 100644 index 58856f3..0000000 --- a/third_party/polymer/components/paper-button/index.html +++ /dev/null @@ -1,22 +0,0 @@ -<!doctype html> -<!-- -Copyright (c) 2014 The Polymer Project Authors. All rights reserved. -This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE -The complete set of authors may be found at http://polymer.github.io/AUTHORS -The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS -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 ---> -<html> -<head> - - <script src="../platform/platform.js"></script> - <link rel="import" href="../core-component-page/core-component-page.html"> - -</head> -<body unresolved> - - <core-component-page></core-component-page> - -</body> -</html> diff --git a/third_party/polymer/components/paper-button/metadata.html b/third_party/polymer/components/paper-button/metadata.html deleted file mode 100644 index a532812..0000000 --- a/third_party/polymer/components/paper-button/metadata.html +++ /dev/null @@ -1,8 +0,0 @@ -<x-meta id="paper-button" label="Button" group="Paper" isContainer> - <template> - <paper-button label="Paper Button"></paper-button> - </template> - <template id="imports"> - <link rel="import" href="paper-button.html"> - </template> -</x-meta>
\ No newline at end of file diff --git a/third_party/polymer/components/paper-button/paper-button.css b/third_party/polymer/components/paper-button/paper-button.css deleted file mode 100644 index e8954ac..0000000 --- a/third_party/polymer/components/paper-button/paper-button.css +++ /dev/null @@ -1,115 +0,0 @@ -:host { - display: inline-block; - position: relative; - border: 0; - background: transparent; - text-align: center; - font: inherit; - text-transform: uppercase; - outline: none; - border-radius: 3px; - -webkit-user-select: none; - user-select: none; - cursor: pointer; -} - -:host(.hover:hover) { - background: #e4e4e4; -} - -:host([raisedButton]) { - background: #dfdfdf; -} - -:host([raisedButton].hover:hover) { - background: #d6d6d6; -} - -:host([disabled]) { - background: #eaeaea !important; - color: #a8a8a8 !important; - cursor: auto; -} - -#shadow-container { - border-radius: inherit; -} - -#clip { - position: relative; - border-radius: inherit; - overflow: hidden; -} - -/* -#focusBg { - position: absolute; - top: 0; - left: 0; - bottom: 0; - right: 0; - opacity: 0; - border-radius: inherit; - background: #c3c3c3; - -webkit-transition: opacity 0.2s cubic-bezier(0.4, 0, 0.2, 1); - transition: opacity 0.2s cubic-bezier(0.4, 0, 0.2, 1); -} - -:host([focused]) #focusBg { - -webkit-transition: none; - transition: none; - -webkit-animation: focus-fade 0.7s infinite alternate; - animation: focus-fade 0.7s infinite alternate; -} - -@-webkit-keyframes focus-fade { - 0% { - opacity: 1; - } - 100% { - opacity: 0; - } -} - -@keyframes focus-fade { - 0% { - opacity: 1; - } - 100% { - opacity: 0; - } -} -*/ - -#ripple { - position: absolute; - top: 0; - left: 0; - bottom: 0; - right: 0; - color: #d1d1d1; - pointer-events: none; -} - -:host([raisedButton]) #ripple { - color: #cecece; -} - -#ripple::shadow canvas { - top: 0; - left: 0; -} - -#content { - /* needed to position the ink behind the content */ - position: relative; -} - -#icon { - margin: 8px; -} - -#content > span { - display: inline-block; - margin: 0.5em; -}
\ No newline at end of file diff --git a/third_party/polymer/components/paper-button/paper-button.html b/third_party/polymer/components/paper-button/paper-button.html deleted file mode 100644 index 87dbef7..0000000 --- a/third_party/polymer/components/paper-button/paper-button.html +++ /dev/null @@ -1,211 +0,0 @@ -<!-- -Copyright (c) 2014 The Polymer Project Authors. All rights reserved. -This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt -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 ---> - -<!-- -@group Paper Elements - -`paper-button` is a button containing text or an image. When the user touches -the button, a ripple effect emanates from the point of contact. - -A `paper-button` may be flat or raised. A raised button behaves like a piece -of paper resting on another sheet, and lifts up upon press. Flat buttons do -not raise up. Add the `raisedButton` attribute to make a raised button. - -Example: - - <paper-button label="flat button"></paper-button> - <paper-button label="raised button" raisedButton></paper-button> - -A button should be styled with a background color, text color, ripple color -and hover color. - -To style the background, text and hover color, apply the `background` and -`color` CSS properties to the button. To style the ripple color, apply the -`color` CSS property to the `#ripple` element in the button's shadow root: - - /* Style #my-button blue with white text and darker blue ink. */ - #my-button { - background: #4285f4; - color: #fff; - } - - #my-button:hover { - background: #2a56c6; - } - - #my-button::shadow #ripple { - color: #2a56c6; - } - -@element paper-button -@extends paper-focusable ---> - -<link href="../polymer/polymer.html" rel="import"> -<link href="../core-icon/core-icon.html" rel="import"> -<link href="../paper-focusable/paper-focusable.html" rel="import"> -<link href="../paper-ripple/paper-ripple.html" rel="import"> -<link href="../paper-shadow/paper-shadow.html" rel="import"> - -<polymer-element name="paper-button" extends="paper-focusable" attributes="label raisedButton iconSrc icon" -role="button"> - - <template> - - <link href="paper-button.css" rel="stylesheet"> - - <template if="{{raisedButton}}"> - <div fit id="shadow-container"> - <paper-shadow id="shadow" z="{{z}}" animated></paper-shadow> - </div> - </template> - - <div id="clip"> - <!-- <div id="focusBg"></div> --> - <paper-ripple id="ripple"></paper-ripple> - <div id="content"> - <template if="{{iconSrc || icon}}"> - <core-icon id="icon" src="{{iconSrc}}" icon="{{icon}}"></core-icon> - </template> - <template if="{{label}}"> - <span>{{label}}</span> - </template> - </div> - </div> - - </template> - - <script> - Polymer('paper-button', { - - publish: { - - /** - * The label of the button. - * - * @attribute label - * @type string - * @default '' - */ - label: '', - - /** - * If true, the button will be styled as a "raised" button. - * - * @attribute raisedButton - * @type boolean - * @default false - */ - raisedButton: {value: false, reflect: true}, - - /** - * (optional) The URL of an image for an icon to use in the button. - * Should not use `icon` property if you are using this property. - * - * @attribute iconSrc - * @type string - * @default '' - */ - iconSrc: '', - - /** - * (optional) Specifies the icon name or index in the set of icons - * available in the icon set. If using this property, load the icon - * set separately where the icon is used. Should not use `src` - * if you are using this property. - * - * @attribute icon - * @type string - * @default '' - */ - icon: '' - - }, - - z: 1, - - attached: function() { - if (this.textContent && !this.textContent.match(/\s+/)) { - console.warn('Using textContent to label the button is deprecated. Use the "label" property instead'); - this.label = this.textContent; - } - }, - - activeChanged: function() { - this.super(); - - if (this.active) { - // FIXME: remove when paper-ripple can have a default 'down' state. - if (!this.lastEvent) { - var rect = this.getBoundingClientRect(); - this.lastEvent = { - x: rect.left + rect.width / 2, - y: rect.top + rect.height / 2 - } - } - this.$.ripple.downAction(this.lastEvent); - } else { - this.$.ripple.upAction(); - } - this.adjustZ(); - }, - - focusedChanged: function() { - this.super(); - this.adjustZ(); - }, - - disabledChanged: function() { - this.super(); - this.adjustZ(); - }, - - // waitForSpillCompleted: function(callback) { - // this.async(callback, null, (this.$.ink.spillCompleted ? 0 : this.duration)); - // }, - - // resetInk: function() { - // this.active = false; - // this.$.ink.reset(); - // }, - - insideButton: function(x, y) { - var rect = this.getBoundingClientRect(); - return (rect.left <= x) && (x <= rect.right) && (rect.top <= y) && (y <= rect.bottom); - }, - - adjustZ: function() { - if (this.focused) { - this.classList.add('paper-shadow-animate-z-1-z-2'); - } else { - this.classList.remove('paper-shadow-animate-z-1-z-2'); - - if (this.active) { - this.z = 2; - } else if (this.disabled) { - this.z = 0; - } else { - this.z = 1; - } - - } - }, - - downAction: function(e) { - this.super(e); - this.lastEvent = e; - }, - - labelChanged: function() { - this.setAttribute('aria-label', this.label); - } - - }); - </script> -</polymer-element> diff --git a/third_party/polymer/components/paper-checkbox/.bower.json b/third_party/polymer/components/paper-checkbox/.bower.json deleted file mode 100644 index 964e097..0000000 --- a/third_party/polymer/components/paper-checkbox/.bower.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "name": "paper-checkbox", - "private": true, - "dependencies": { - "font-roboto": "Polymer/font-roboto#>=0.3.0 <1.0.0", - "paper-radio-button": "Polymer/paper-radio-button#>=0.3.0 <1.0.0" - }, - "homepage": "https://github.com/Polymer/paper-checkbox", - "version": "0.3.5", - "_release": "0.3.5", - "_resolution": { - "type": "version", - "tag": "0.3.5", - "commit": "3e99039c345409bceb291b8e1b2056f3a8885b6b" - }, - "_source": "git://github.com/Polymer/paper-checkbox.git", - "_target": "0.3.5", - "_originalSource": "Polymer/paper-checkbox" -}
\ No newline at end of file diff --git a/third_party/polymer/components/paper-checkbox/README.md b/third_party/polymer/components/paper-checkbox/README.md deleted file mode 100644 index 374e62d..0000000 --- a/third_party/polymer/components/paper-checkbox/README.md +++ /dev/null @@ -1,4 +0,0 @@ -paper-checkbox -=================== - -See the [component page](http://www.polymer-project.org/docs/elements/paper-elements.html#paper-checkbox) for more information. diff --git a/third_party/polymer/components/paper-checkbox/bower.json b/third_party/polymer/components/paper-checkbox/bower.json deleted file mode 100644 index 281773b..0000000 --- a/third_party/polymer/components/paper-checkbox/bower.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "name": "paper-checkbox", - "private": true, - "dependencies": { - "font-roboto": "Polymer/font-roboto#>=0.3.0 <1.0.0", - "paper-radio-button": "Polymer/paper-radio-button#>=0.3.0 <1.0.0" - } -}
\ No newline at end of file diff --git a/third_party/polymer/components/paper-checkbox/demo.html b/third_party/polymer/components/paper-checkbox/demo.html deleted file mode 100644 index 0b8b115..0000000 --- a/third_party/polymer/components/paper-checkbox/demo.html +++ /dev/null @@ -1,104 +0,0 @@ -<!doctype html> -<html> -<head> - <title>paper-checkbox</title> - - <meta name="viewport" content="width=device-width, minimum-scale=1.0, initial-scale=1, user-scalable=yes"> - <meta name="mobile-web-app-capable" content="yes"> - <meta name="apple-mobile-web-app-capable" content="yes"> - - <script src="../platform/platform.js"></script> - - <link rel="import" href="paper-checkbox.html"> - <link rel="import" href="../font-roboto/roboto.html"> - - <style shim-shadowdom> - - body { - font-family: RobotoDraft, 'Helvetica Neue', Helvetica, Arial; - margin: 0; - padding: 24px; - -webkit-user-select: none; - -moz-user-select: none; - -ms-user-select: none; - user-select: none; - -webkit-tap-highlight-color: rgba(0,0,0,0); - -webkit-touch-callout: none; - } - - paper-checkbox { - padding: 20px 20px 20px 0; - } - - section { - width: 300px; - } - - paper-checkbox.blue::shadow #ink[checked] { - color: #4285f4; - } - - paper-checkbox.blue::shadow #checkbox.checked { - border-color: #4285f4; - } - - </style> - -</head> -<body unresolved> - - <div horizontal layout> - <paper-checkbox></paper-checkbox> - <div vertical layout> - <h4>Notifications</h4> - <div>Notify me about updates to apps or games that I've downloaded</div> - </div> - </div> - - <br> - - <div horizontal layout> - <paper-checkbox checked></paper-checkbox> - <div vertical layout> - <h4>Auto-updates</h4> - <div>Auto-update apps over wifi only</div> - </div> - </div> - - <br> - - <div horizontal layout> - <paper-checkbox></paper-checkbox> - <div vertical layout> - <h4>Clear search history</h4> - <div>Remove all the searches you have ever performed</div> - </div> - </div> - - <br> - <br> - <br> - - <section> - - <h3>Sound</h3> - - <div center horizontal layout> - <div flex>Touch sounds</div> - <paper-checkbox class="blue" checked></paper-checkbox> - </div> - - <div center horizontal layout> - <div flex>Screen lock sound</div> - <paper-checkbox class="blue"></paper-checkbox> - </div> - - <div center horizontal layout> - <div flex>Vibrate on touch</div> - <paper-checkbox class="blue"></paper-checkbox> - </div> - - </section> - -</body> -</html> diff --git a/third_party/polymer/components/paper-checkbox/index.html b/third_party/polymer/components/paper-checkbox/index.html deleted file mode 100644 index 58856f3..0000000 --- a/third_party/polymer/components/paper-checkbox/index.html +++ /dev/null @@ -1,22 +0,0 @@ -<!doctype html> -<!-- -Copyright (c) 2014 The Polymer Project Authors. All rights reserved. -This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE -The complete set of authors may be found at http://polymer.github.io/AUTHORS -The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS -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 ---> -<html> -<head> - - <script src="../platform/platform.js"></script> - <link rel="import" href="../core-component-page/core-component-page.html"> - -</head> -<body unresolved> - - <core-component-page></core-component-page> - -</body> -</html> diff --git a/third_party/polymer/components/paper-checkbox/metadata.html b/third_party/polymer/components/paper-checkbox/metadata.html deleted file mode 100644 index 8aa1cef..0000000 --- a/third_party/polymer/components/paper-checkbox/metadata.html +++ /dev/null @@ -1,8 +0,0 @@ -<x-meta id="paper-checkbox" label="Checkbox" group="Paper"> - <template> - <paper-checkbox label="click me"></paper-checkbox> - </template> - <template id="imports"> - <link rel="import" href="paper-checkbox.html"> - </template> -</x-meta> diff --git a/third_party/polymer/components/paper-checkbox/paper-checkbox.css b/third_party/polymer/components/paper-checkbox/paper-checkbox.css deleted file mode 100644 index 4d636fd..0000000 --- a/third_party/polymer/components/paper-checkbox/paper-checkbox.css +++ /dev/null @@ -1,262 +0,0 @@ -/*
-Copyright (c) 2014 The Polymer Project Authors. All rights reserved.
-This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
-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 -*/ - -:host { - display: inline-block;
- white-space: nowrap; -} - -:host(:focus) { - outline: none; -} - -#checkboxContainer { - position: relative; - width: 18px; - height: 18px;
- cursor: pointer;
- -webkit-transform: translateZ(0);
- transform: translateZ(0); -} - -#checkboxContainer.labeled { - display: inline-block; - vertical-align: middle; -} - -#ink { - position: absolute; - top: -15px; - left: -15px; - width: 48px; - height: 48px;
- color: #5a5f5a; -}
-
-#ink[checked] {
- color: #0f9d58;
-} - -#checkbox { - position: absolute; - box-sizing: border-box; - top: 0px; - left: 0px; - width: 18px; - height: 18px; - border: solid 2px;
- border-color: #5a5a5a;
- pointer-events: none;
-}
-
-/* checkbox checked animations */ -#checkbox.checked.box {
- border: solid 2px; - -webkit-animation: box-shrink 140ms ease-out forwards; - animation: box-shrink 140ms ease-out forwards; -} - -@-webkit-keyframes box-shrink { - 0% { - -webkit-transform: rotate(0deg); - top: 0px; - left: 0px; - width: 18px; - height: 18px; - } - 100% { - -webkit-transform: rotate(45deg); - top: 13px; - left: 5px; - width: 4px; - height: 4px; - } -} - -@keyframes box-shrink { - 0% { - transform: rotate(0deg); - top: 0px; - left: 0px; - width: 18px; - height: 18px; - } - 100% { - transform: rotate(45deg); - top: 13px; - left: 5px; - width: 4px; - height: 4px; - } -} - -#checkbox.checked.checkmark { - border-left: none; - border-top: none;
- -webkit-animation: checkmark-expand 140ms ease-out forwards; - animation: checkmark-expand 140ms ease-out forwards; -} - -@-webkit-keyframes checkmark-expand { - 0% { - -webkit-transform: rotate(45deg); - top: 13px; - left: 5px; - width: 4px; - height: 4px; - } - 100% { - -webkit-transform: rotate(45deg); - top: -4px; - left: 6px; - width: 10px; - height: 21px; - border-right-width: 2px; - border-bottom-width: 2px; - } -} - -@keyframes checkmark-expand { - 0% { - transform: rotate(45deg); - top: 13px; - left: 5px; - width: 4px; - height: 4px; - } - 100% { - transform: rotate(45deg); - top: -4px; - left: 6px; - width: 10px; - height: 21px; - border-right-width: 2px;
- border-bottom-width: 2px; - } -} - -#checkbox.checked { - -webkit-transform: rotate(45deg); - transform: rotate(45deg); - top: -4px; - left: 6px; - width: 10px; - height: 21px; - border-top: none; - border-left: none;
- border-right-width: 2px; - border-bottom-width: 2px;
- border-color: #0f9d58; -} - -/* checkbox unchecked animations */ -#checkbox.unchecked.checkmark { - -webkit-transform: rotate(45deg); - transform: rotate(45deg); - border-left: none; - border-top: none; - -webkit-animation: checkmark-shrink 140ms ease-out forwards; - animation: checkmark-shrink 140ms ease-out forwards; -} - -@-webkit-keyframes checkmark-shrink { - 0% { - top: -4px; - left: 6px; - width: 10px; - height: 21px; - border-right-width: 2px;
- border-bottom-width: 2px; - } - 100% { - top: 13px; - left: 5px; - width: 4px; - height: 4px; - } -} - -@keyframes checkmark-shrink { - 0% { - top: -4px; - left: 6px; - width: 10px; - height: 21px; - border-right-width: 2px;
- border-bottom-width: 2px; - } - 100% { - top: 13px; - left: 5px; - width: 4px; - height: 4px; - } -} - -#checkbox.unchecked.box { - -webkit-animation: box-expand 140ms ease-out forwards; - animation: box-expand 140ms ease-out forwards; -} - -@-webkit-keyframes box-expand { - 0% { - -webkit-transform: rotate(45deg); - top: 13px; - left: 5px; - width: 4px; - height: 4px; - } - 100% { - -webkit-transform: rotate(0deg); - top: 0px; - left: 0px; - width: 18px; - height: 18px; - } -} - -@keyframes box-expand { - 0% { - transform: rotate(45deg); - top: 13px; - left: 5px; - width: 4px; - height: 4px; - } - 100% { - transform: rotate(0deg); - top: 0px; - left: 0px; - width: 18px; - height: 18px; - } -} - -/* label */ -#checkboxLabel { - position: relative; - display: inline-block;
- vertical-align: middle; - padding-left: 8px;
- white-space: normal;
- pointer-events: none; -} - -#checkboxLabel[hidden] { - display: none; -}
-
-/* disabled state */
-:host([disabled]) {
- pointer-events: none;
-}
-
-:host([disabled]) #checkbox {
- border-color: #eaeaea !important;
-}
diff --git a/third_party/polymer/components/paper-checkbox/paper-checkbox.html b/third_party/polymer/components/paper-checkbox/paper-checkbox.html deleted file mode 100644 index 2c2421b..0000000 --- a/third_party/polymer/components/paper-checkbox/paper-checkbox.html +++ /dev/null @@ -1,104 +0,0 @@ -<!--
-Copyright (c) 2014 The Polymer Project Authors. All rights reserved.
-This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
-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
--->
-
-<!--
-`paper-checkbox` is a button that can be either checked or unchecked. User
-can tap the checkbox to check or uncheck it. Usually you use checkboxes
-to allow user to select multiple options from a set. If you have a single
-ON/OFF option, avoid using a single checkbox and use `paper-toggle-button`
-instead.
-
-Example:
-
- <paper-checkbox></paper-checkbox>
-
- <paper-checkbox checked></paper-checkbox>
-
-Styling checkbox:
-
-To change the ink color for checked state:
-
- paper-checkbox::shadow #ink[checked] {
- color: #4285f4;
- }
-
-To change the checkbox checked color:
-
- paper-checkbox::shadow #checkbox.checked {
- border-color: #4285f4;
- }
-
-To change the ink color for unchecked state:
-
- paper-checkbox::shadow #ink {
- color: #b5b5b5;
- }
-
-To change the checbox unchecked color:
-
- paper-checkbox::shadow #checkbox {
- border-color: #b5b5b5;
- }
-
-@group Paper Elements
-@element paper-checkbox
-@extends paper-radio-button
-@homepage github.io
--->
-
-<link rel="import" href="../paper-radio-button/paper-radio-button.html">
-
-<polymer-element name="paper-checkbox" extends="paper-radio-button" role="checkbox">
-<template>
-
- <link rel="stylesheet" href="paper-checkbox.css">
-
- <div id="checkboxContainer" class="{{ {labeled: label} | tokenList }}" >
-
- <paper-ripple id="ink" class="circle recenteringTouch" checked?="{{!checked}}"></paper-ripple>
-
- <div id="checkbox" on-animationend="{{checkboxAnimationEnd}}" on-webkitAnimationEnd="{{checkboxAnimationEnd}}"></div>
-
- </div>
-
- <div id="checkboxLabel" hidden?="{{!label}}">{{label}}<content></content></div>
-
-</template>
-<script>
-
- Polymer('paper-checkbox', {
-
- /**
- * Fired when the checked state changes.
- *
- * @event change
- */
-
- toggles: true,
-
- checkedChanged: function() {
- var cl = this.$.checkbox.classList;
- cl.toggle('checked', this.checked);
- cl.toggle('unchecked', !this.checked);
- cl.toggle('checkmark', !this.checked);
- cl.toggle('box', this.checked);
- this.setAttribute('aria-checked', this.checked ? 'true': 'false');
- this.fire('change');
- },
-
- checkboxAnimationEnd: function() {
- var cl = this.$.checkbox.classList;
- cl.toggle('checkmark', this.checked && !cl.contains('checkmark'));
- cl.toggle('box', !this.checked && !cl.contains('box'));
- }
-
- });
-
-</script>
-</polymer-element>
diff --git a/third_party/polymer/components/paper-dialog/.bower.json b/third_party/polymer/components/paper-dialog/.bower.json deleted file mode 100644 index ae83584..0000000 --- a/third_party/polymer/components/paper-dialog/.bower.json +++ /dev/null @@ -1,21 +0,0 @@ -{ - "name": "paper-dialog", - "private": true, - "dependencies": { - "polymer": "Polymer/polymer#>=0.3.0 <1.0.0", - "core-overlay": "Polymer/core-overlay#>=0.3.0 <1.0.0", - "core-transition": "Polymer/core-transition#>=0.3.0 <1.0.0", - "paper-shadow": "Polymer/paper-shadow#>=0.3.0 <1.0.0" - }, - "homepage": "https://github.com/Polymer/paper-dialog", - "version": "0.3.5", - "_release": "0.3.5", - "_resolution": { - "type": "version", - "tag": "0.3.5", - "commit": "8d83f11fc97fbd97959c289022ae2f897f51b109" - }, - "_source": "git://github.com/Polymer/paper-dialog.git", - "_target": "0.3.5", - "_originalSource": "Polymer/paper-dialog" -}
\ No newline at end of file diff --git a/third_party/polymer/components/paper-dialog/.gitignore b/third_party/polymer/components/paper-dialog/.gitignore deleted file mode 100644 index 9f7d5aa..0000000 --- a/third_party/polymer/components/paper-dialog/.gitignore +++ /dev/null @@ -1 +0,0 @@ -vulcanized.html diff --git a/third_party/polymer/components/paper-dialog/README.md b/third_party/polymer/components/paper-dialog/README.md deleted file mode 100644 index 70c3e03..0000000 --- a/third_party/polymer/components/paper-dialog/README.md +++ /dev/null @@ -1,4 +0,0 @@ -paper-dialog -=================== - -See the [component page](http://www.polymer-project.org/docs/elements/paper-elements.html#paper-dialog) for more information. diff --git a/third_party/polymer/components/paper-dialog/bower.json b/third_party/polymer/components/paper-dialog/bower.json deleted file mode 100644 index 1cca8bc..0000000 --- a/third_party/polymer/components/paper-dialog/bower.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "name": "paper-dialog", - "private": true, - "dependencies": { - "polymer": "Polymer/polymer#>=0.3.0 <1.0.0", - "core-overlay": "Polymer/core-overlay#>=0.3.0 <1.0.0", - "core-transition": "Polymer/core-transition#>=0.3.0 <1.0.0", - "paper-shadow": "Polymer/paper-shadow#>=0.3.0 <1.0.0" - } -}
\ No newline at end of file diff --git a/third_party/polymer/components/paper-dialog/demo.html b/third_party/polymer/components/paper-dialog/demo.html deleted file mode 100644 index cba90ac..0000000 --- a/third_party/polymer/components/paper-dialog/demo.html +++ /dev/null @@ -1,75 +0,0 @@ -<!doctype html> -<html> -<head> - <meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no"> - <title>paper-dialog</title> - <script src="../platform/platform.js"></script> - <link href="../font-roboto/roboto.html" rel="import"> - <link href="../paper-button/paper-button.html" rel="import"> - <link rel="import" href="paper-dialog-transition.html"> - <link href="paper-dialog.html" rel="import"> - <style> - body { - -webkit-transform: translateZ(0); - transform: translateZ(0); - font-family: RobotoDraft, 'Helvetica Neue', Helvetica, Arial; - font-size: 16px; - color: rgba(0, 0, 0, 0.87); - } - - paper-dialog { - width: 50%; - min-width: 430px; - } - - p { - margin-bottom: 0; - } - - paper-dialog paper-button { - font-weight: bold; - } - - paper-button[autofocus] { - color: #4285f4; - } - </style> -</head> -<body unresolved> - <paper-dialog heading="Dialog" transition="paper-dialog-transition-center"> - <p>Lorem ipsum dolor sit amet, doming noster at quo, nostrud lucilius rationibus ea duo. Vim no mucius dolores. No bonorum voluptatum vis, has iudicabit consectetuer ne. Nullam sensibus vim id, et quo graeci perpetua.</p> - - <p>Id qui scripta laboramus dissentiet, verterem partiendo vim at. Stet dissentiet ut mei. Iriure facilis eloquentiam pro eu, nec an esse inciderint. In meliore abhorreant sea. Eros nostro ocurreret at nec. Cu per regione persecuti.</p> - - <p>Lorem ipsum dolor sit amet, doming noster at quo, nostrud lucilius rationibus ea duo. Vim no mucius dolores. No bonorum voluptatum vis, has iudicabit consectetuer ne. Nullam sensibus vim id, et quo graeci perpetua.</p> - - <paper-button label="More Info..." dismissive></paper-button> - <paper-button label="Decline" affirmative></paper-button> - <paper-button label="Accept" affirmative autofocus></paper-button> - - </paper-dialog> - - <paper-dialog heading="Dialog" transition="paper-dialog-transition-bottom"> - <p>Lorem ipsum dolor sit amet, doming noster at quo, nostrud lucilius rationibus ea duo. Vim no mucius dolores. No bonorum voluptatum vis, has iudicabit consectetuer ne. Nullam sensibus vim id, et quo graeci perpetua.</p> - - <p>Id qui scripta laboramus dissentiet, verterem partiendo vim at. Stet dissentiet ut mei. Iriure facilis eloquentiam pro eu, nec an esse inciderint. In meliore abhorreant sea. Eros nostro ocurreret at nec. Cu per regione persecuti.</p> - - <p>Lorem ipsum dolor sit amet, doming noster at quo, nostrud lucilius rationibus ea duo. Vim no mucius dolores. No bonorum voluptatum vis, has iudicabit consectetuer ne. Nullam sensibus vim id, et quo graeci perpetua.</p> - - <paper-button label="More Info..." dismissive></paper-button> - <paper-button label="Decline" affirmative></paper-button> - <paper-button label="Accept" affirmative autofocus></paper-button> - - </paper-dialog> - - <paper-button label="Transition A" onclick="toggleDialog('paper-dialog-transition-bottom')"></paper-button> - <paper-button label="Transition B" onclick="toggleDialog('paper-dialog-transition-center')"></paper-button> - <script> - function toggleDialog(transition) { - var dialog = document.querySelector('paper-dialog[transition=' + transition + ']'); - dialog.toggle(); - } - </script> - -</body> -</html> diff --git a/third_party/polymer/components/paper-dialog/index.html b/third_party/polymer/components/paper-dialog/index.html deleted file mode 100644 index 58856f3..0000000 --- a/third_party/polymer/components/paper-dialog/index.html +++ /dev/null @@ -1,22 +0,0 @@ -<!doctype html> -<!-- -Copyright (c) 2014 The Polymer Project Authors. All rights reserved. -This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE -The complete set of authors may be found at http://polymer.github.io/AUTHORS -The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS -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 ---> -<html> -<head> - - <script src="../platform/platform.js"></script> - <link rel="import" href="../core-component-page/core-component-page.html"> - -</head> -<body unresolved> - - <core-component-page></core-component-page> - -</body> -</html> diff --git a/third_party/polymer/components/paper-dialog/paper-dialog-transition.css b/third_party/polymer/components/paper-dialog/paper-dialog-transition.css deleted file mode 100644 index 6a55d2b..0000000 --- a/third_party/polymer/components/paper-dialog/paper-dialog-transition.css +++ /dev/null @@ -1,59 +0,0 @@ -/* Copyright (c) 2014 The Polymer Project Authors. All rights reserved. -This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt -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 */ - -:host(.paper-dialog-transition) { - outline: none; - opacity: 0; - transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.2s cubic-bezier(0.4, 0, 0.2, 1); - -webkit-transition: -webkit-transform 0.2s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.2s cubic-bezier(0.4, 0, 0.2, 1); -} - -:host(.paper-dialog-transition.core-opened) { - opacity: 1; - transform: none; - -webkit-transform: none; -} - -:host(.paper-dialog-transition-bottom) { - transform: scale(0.9) translateY(200%); - -webkit-transform: scale(0.9) translateY(200%); -} - -:host(.paper-dialog-transition-center.core-opened) { - animation: paper-dialog-transition-center-keyframes 0.2s cubic-bezier(0.4, 0, 0.2, 1); - -webkit-animation: paper-dialog-transition-center-keyframes 0.2s cubic-bezier(0.4, 0, 0.2, 1); -} - -@keyframes paper-dialog-transition-center-keyframes { - 0% { - transform: scale(0.5) translateY(0); - -webkit-transform: scale(0.5) translateY(0); - } - 90% { - transform: scale(1) translateY(-10px); - -webkit-transform: scale(1) translateY(-10px); - } - 100% { - transform: scale(1) translateY(0); - -webkit-transform: scale(1) translateY(0); - } -} - -@-webkit-keyframes paper-dialog-transition-center-keyframes { - 0% { - transform: scale(0.5) translateY(0); - -webkit-transform: scale(0.5) translateY(0); - } - 90% { - transform: scale(1) translateY(-10px); - -webkit-transform: scale(1) translateY(-10px); - } - 100% { - transform: scale(1) translateY(0); - -webkit-transform: scale(1) translateY(0); - } -} diff --git a/third_party/polymer/components/paper-dialog/paper-dialog-transition.html b/third_party/polymer/components/paper-dialog/paper-dialog-transition.html deleted file mode 100644 index f262a73..0000000 --- a/third_party/polymer/components/paper-dialog/paper-dialog-transition.html +++ /dev/null @@ -1,27 +0,0 @@ -<!-- -Copyright (c) 2014 The Polymer Project Authors. All rights reserved. -This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt -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 ---> - -<link href="../core-transition/core-transition-css.html" rel="import"> - -<polymer-element name="paper-dialog-transition" extends="core-transition-css"> - -<template> - <link no-shim href="paper-dialog-transition.css" rel="stylesheet"> -</template> - -<script> - Polymer({ - baseClass: 'paper-dialog-transition' - }); -</script> - -</polymer-element> - -<paper-dialog-transition id="paper-dialog-transition-bottom" transitionType="bottom"></paper-dialog-transition> -<paper-dialog-transition id="paper-dialog-transition-center" transitionType="center"></paper-dialog-transition>
\ No newline at end of file diff --git a/third_party/polymer/components/paper-dialog/paper-dialog.css b/third_party/polymer/components/paper-dialog/paper-dialog.css deleted file mode 100644 index 73096be..0000000 --- a/third_party/polymer/components/paper-dialog/paper-dialog.css +++ /dev/null @@ -1,43 +0,0 @@ -:host { - background: white; - color: rgba(0, 0, 0, 0.87); -} - -#shadow { - position: absolute; - top: 0; - left: 0; - bottom: 0; - right: 0; - z-index: -1; -} - -#container { - overflow: hidden; -} - -#main { - height: auto; - -webkit-order: 1; - -ms-flex-order: 1; - order: 1; - padding: 24px; - overflow: auto; -} - -h1 { - margin: 0; -} - -#actions { - -webkit-order: 2; - -ms-flex-order: 2; - order: 2; - padding: 4px 16px 20px; -} - -polymer-next-selector { content: ':host > *'; } -::content > * { - font: inherit; - border: 0; -} diff --git a/third_party/polymer/components/paper-dialog/paper-dialog.html b/third_party/polymer/components/paper-dialog/paper-dialog.html deleted file mode 100644 index 03df09e..0000000 --- a/third_party/polymer/components/paper-dialog/paper-dialog.html +++ /dev/null @@ -1,176 +0,0 @@ -<!-- -Copyright (c) 2014 The Polymer Project Authors. All rights reserved. -This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt -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 ---> - -<!-- -Provides a dialog overlay. - -Child elements that include a `dismissive` attribute are positioned in the lower left corner of the dialog. Elements that use the `affirmative` attribute are positioned in the lower right corner. - -Child elements that include the `dismissive` or `affirmative` attribute will automatically toggle the dialog when clicked. - -One child element should have the `autofocus` attribute so that the Enter key will automatically take action. This is -especially important for screen reader environments. - -Example: - - <paper-dialog heading="Title for dialog"> - <p>Lorem ipsum ....</p> - <p>Id qui scripta ...</p> - <paper-button label="More Info..." dismissive></paper-button> - <paper-button label="Decline" affirmative></paper-button> - <paper-button label="Accept" affirmative autofocus></paper-button> - </paper-dialog> - -#### Transitions - -`<paper-dialog>` can be used with `<paper-transition>` to transition the overlay open and close. - -To use a transition, import `paper-dialog-transition.html` alongside paper-dialog: - - <link rel="import" href="paper-dialog/paper-dialog-transition.html"> - -Then set the `transition` attribute: - - <paper-dialog heading="Title for dialog" transition="paper-transition-center"> - - <paper-dialog heading="Title for dialog" transition="paper-transition-bottom"> - -@group Paper Elements -@element paper-dialog -@homepage github.io ---> -<!-- -Fired when the dialog's `opened` property changes. - -@event core-overlay-open -@param {Object} detail -@param {Object} detail.opened the opened state ---> -<link href="../polymer/polymer.html" rel="import"> -<link href="../core-overlay/core-overlay.html" rel="import"> -<link href="../paper-shadow/paper-shadow.html" rel="import"> - -<polymer-element name="paper-dialog" attributes="opened heading transition autoCloseDisabled backdrop layered closeSelector" role="dialog"> - - <template> - - <link href="paper-dialog.css" rel="stylesheet"> - - <div id="shadow"> - <paper-shadow z="3" hasPosition></paper-shadow> - </div> - - <core-overlay id="overlay" opened="{{opened}}" autoCloseDisabled?="{{autoCloseDisabled}}" backdrop?="{{backdrop}}" layered?="{{layered}}" target="{{}}" sizingTarget="{{$.container}}" closeSelector="{{closeSelector}}" transition="{{transition}}" margin="20"></core-overlay> - - <div id="container" layout vertical> - - <div id="actions" layout horizontal> - <content select="[dismissive]"></content> - <div flex auto></div> - <content select="[affirmative]"></content> - </div> - - <div id="main" flex auto> - <h1>{{heading}}</h1> - <content></content> - </div> - - </div> - - </template> - - <script> - - Polymer('paper-dialog', { - - /** - * Set opened to true to show the dialog and to false to hide it. - * A dialog may be made intially opened by setting its opened attribute. - - * @attribute opened - * @type boolean - * @default false - */ - opened: false, - - /** - * If true, the dialog has a backdrop darkening the rest of the screen. - * The backdrop element is attached to the document body and may be styled - * with the class `core-overlay-backdrop`. When opened the `core-opened` - * class is applied. - * - * @attribute backdrop - * @type boolean - * @default false - */ - backdrop: false, - - /** - * If true, the dialog is guaranteed to display above page content. - * - * @attribute layered - * @type boolean - * @default false - */ - layered: false, - - /** - * By default a dialog will close automatically if the user - * taps outside it or presses the escape key. Disable this - * behavior by setting the `autoCloseDisabled` property to true. - * @attribute autoCloseDisabled - * @type boolean - * @default false - */ - autoCloseDisabled: false, - - /** - * This property specifies a selector matching elements that should - * close the dialog on tap. - * - * @attribute closeSelector - * @type string - * @default "" - */ - closeSelector: '[dismissive],[affirmative]', - - /** - * @attribute heading - * @type string - * @default '' - */ - heading: '', - - /** - * Set this property to the id of a <core-transition> element to specify - * the transition to use when opening/closing this dialog. - * - * @attribute transition - * @type string - * @default '' - */ - transition: '', - - /** - * Toggle the dialog's opened state. - * @method toggle - */ - toggle: function() { - this.$.overlay.toggle(); - }, - - headingChanged: function() { - this.setAttribute('aria-label', this.heading); - } - - }); - - </script> - -</polymer-element> diff --git a/third_party/polymer/components/paper-fab/.bower.json b/third_party/polymer/components/paper-fab/.bower.json deleted file mode 100644 index e3667a9..0000000 --- a/third_party/polymer/components/paper-fab/.bower.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "name": "paper-fab", - "private": true, - "dependencies": { - "polymer": "Polymer/polymer#>=0.3.0 <1.0.0", - "paper-icon-button": "Polymer/paper-icon-button#>=0.3.0 <1.0.0" - }, - "homepage": "https://github.com/Polymer/paper-fab", - "version": "0.3.5", - "_release": "0.3.5", - "_resolution": { - "type": "version", - "tag": "0.3.5", - "commit": "4fbc9fedd3462bc01b64967e51ddc49882728da7" - }, - "_source": "git://github.com/Polymer/paper-fab.git", - "_target": "0.3.5", - "_originalSource": "Polymer/paper-fab" -}
\ No newline at end of file diff --git a/third_party/polymer/components/paper-fab/README.md b/third_party/polymer/components/paper-fab/README.md deleted file mode 100644 index a210f0f..0000000 --- a/third_party/polymer/components/paper-fab/README.md +++ /dev/null @@ -1,4 +0,0 @@ -paper-fab -=================== - -See the [component page](http://www.polymer-project.org/docs/elements/paper-elements.html#paper-fab) for more information. diff --git a/third_party/polymer/components/paper-fab/bower.json b/third_party/polymer/components/paper-fab/bower.json deleted file mode 100644 index 4601add..0000000 --- a/third_party/polymer/components/paper-fab/bower.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "name": "paper-fab", - "private": true, - "dependencies": { - "polymer": "Polymer/polymer#>=0.3.0 <1.0.0", - "paper-icon-button": "Polymer/paper-icon-button#>=0.3.0 <1.0.0" - } -}
\ No newline at end of file diff --git a/third_party/polymer/components/paper-fab/demo.html b/third_party/polymer/components/paper-fab/demo.html deleted file mode 100644 index 6e2ac6c..0000000 --- a/third_party/polymer/components/paper-fab/demo.html +++ /dev/null @@ -1,72 +0,0 @@ -<!doctype html> -<!-- -Copyright 2013 The Polymer Authors. All rights reserved. -Use of this source code is governed by a BSD-style -license that can be found in the LICENSE file. ---> -<html> -<head> - - <meta charset="utf-8"> - <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> - <meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no"> - - <title>paper-fab</title> - - <script src="../platform/platform.js"></script> - - <link href="../font-roboto/roboto.html" rel="import"> - <link href="../core-icons/core-icons.html" rel="import"> - <link href="paper-fab.html" rel="import"> - - <style shim-shadowdom> - - body { - font-family: RobotoDraft, 'Helvetica Neue', Helvetica, Arial; - margin: 0; - padding: 24px; - -webkit-user-select: none; - -moz-user-select: none; - -ms-user-select: none; - user-select: none; - -webkit-tap-highlight-color: rgba(0,0,0,0); - -webkit-touch-callout: none; - transform: translateZ(0); - -webkit-transform: translateZ(0); - } - - paper-fab { - color: #FFF; - margin-right:2em; - } - - paper-fab.blue { - background: #5677fc; - } - - paper-fab.green { - background: #259b24; - } - - paper-fab.yellow { - background: #ffeb3b; - color: #000; - } - - </style> - -</head> -<body unresolved> - - <h3>Regular</h3> - - <paper-fab icon="arrow-forward"></paper-fab> - <paper-fab icon="create" class="blue"></paper-fab> - - <h3>Mini</h3> - - <paper-fab icon="done" class="mini green"></paper-fab> - <paper-fab icon="reply" class="mini yellow"></paper-fab> - -</body> -</html> diff --git a/third_party/polymer/components/paper-fab/demo2.html b/third_party/polymer/components/paper-fab/demo2.html deleted file mode 100644 index d1b69c7..0000000 --- a/third_party/polymer/components/paper-fab/demo2.html +++ /dev/null @@ -1,103 +0,0 @@ -<!doctype html> -<!-- -Copyright 2013 The Polymer Authors. All rights reserved. -Use of this source code is governed by a BSD-style -license that can be found in the LICENSE file. ---> -<html> -<head> - <title>paper-fab</title> - <meta charset="utf-8"> - <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> - <meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no"> - <script src="../platform/platform.js"></script> - <link href="../font-roboto/roboto.html" rel="import"> - <link href="../core-icons/core-icons.html" rel="import"> - <link href="../core-icons/image-icons.html" rel="import"> - <link href="../core-layout/core-layout.html" rel="import"> - <link href="paper-fab.html" rel="import"> - <style shim-shadowdom> - body { - font-family: RobotoDraft, 'Helvetica Neue', Helvetica, Arial; - font-size: 14px; - padding: 10em; - background: #f7f7f7; - transform: translateZ(0); - -webkit-transform: translateZ(0); - transform: translateZ(0); - } - - core-layout { - display: inline-block; - position: relative; - background: #f7f7f7; - border-radius: 3px; - width: 320px; - height: 480px; - border-radius: 3px; - overflow: hidden; - } - - core-layout > .inner { - border-radius: 3px; - } - - .inner { - position: absolute; - top: 0; - left: 0; - bottom: 0; - right: 0; - z-index: -1; - } - - .toolbar { - background: #4555a5; - position: relative; - padding: 1em; - } - - .photo { - background: #eee; - height: 30%; - } - - [core-flex] { - background: #fff; - padding: 0 1em; - overflow: auto; - } - - paper-fab { - position: absolute !important; - top: 167px; - right: 1em; - } - - core-icon::shadow path { - fill: #fff; - } - - </style> -</head> -<body unresolved> - - <p>In this demo, the FAB is in the "focused" state on load.</p> - - <core-layout class="card paper-shadow-top-z-1" vertical> - <div class="inner paper-shadow-bottom-z-1"></div> - <div class="toolbar paper-shadow-top-z-1"> - <div class="inner paper-shadow-bottom-z-1"></div> - <core-icon icon="arrow-back"></core-icon> - </div> - <div class="photo"> - </div> - <paper-fab focused icon="image:camera-alt"></paper-fab> - <div core-flex> - <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p> - <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p> - </div> - </core-layout> - -</body> -</html> diff --git a/third_party/polymer/components/paper-fab/index.html b/third_party/polymer/components/paper-fab/index.html deleted file mode 100644 index 58856f3..0000000 --- a/third_party/polymer/components/paper-fab/index.html +++ /dev/null @@ -1,22 +0,0 @@ -<!doctype html> -<!-- -Copyright (c) 2014 The Polymer Project Authors. All rights reserved. -This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE -The complete set of authors may be found at http://polymer.github.io/AUTHORS -The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS -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 ---> -<html> -<head> - - <script src="../platform/platform.js"></script> - <link rel="import" href="../core-component-page/core-component-page.html"> - -</head> -<body unresolved> - - <core-component-page></core-component-page> - -</body> -</html> diff --git a/third_party/polymer/components/paper-fab/metadata.html b/third_party/polymer/components/paper-fab/metadata.html deleted file mode 100644 index ef95232..0000000 --- a/third_party/polymer/components/paper-fab/metadata.html +++ /dev/null @@ -1,27 +0,0 @@ -<x-meta id="paper-fab" label="Floating Action Button" group="Paper"> - - <template> - <paper-fab icon="av:play-arrow"></paper-fab> - </template> - - <template id="imports"> - <link rel="import" href="../core-icons/core-icons.html"> - <link rel="import" href="../core-icons/av-icons.html"> - <link rel="import" href="paper-fab.html"> - </template> - -</x-meta> - -<x-meta id="paper-fab-right-aligned" label="Floating Action Button Panel" group="Paper"> - - <template> - <div layout horizontal> - <paper-fab icon="check"></paper-fab> - </div> - </template> - - <template id="imports"> - <link rel="import" href="../core-icons/core-icons.html"> - <link rel="import" href="paper-fab.html"> - </template> -</x-meta>
\ No newline at end of file diff --git a/third_party/polymer/components/paper-fab/paper-fab.css b/third_party/polymer/components/paper-fab/paper-fab.css deleted file mode 100644 index 4f333e6..0000000 --- a/third_party/polymer/components/paper-fab/paper-fab.css +++ /dev/null @@ -1,26 +0,0 @@ -:host { - box-sizing: border-box; - width: 56px; - height: 56px; - background: #d23f31; - border-radius: 50%; - fill: #fff; -} - -:host(.mini) { - width: 40px; - height: 40px; -} - -:host /deep/ #focusBg { - display: none; -} - -:host /deep/ #icon { - display: block; - margin: 16px; -} - -:host(.mini) /deep/ #icon { - margin: 8px; -} diff --git a/third_party/polymer/components/paper-fab/paper-fab.html b/third_party/polymer/components/paper-fab/paper-fab.html deleted file mode 100644 index fb110d9..0000000 --- a/third_party/polymer/components/paper-fab/paper-fab.html +++ /dev/null @@ -1,56 +0,0 @@ -<!-- -Copyright (c) 2014 The Polymer Project Authors. All rights reserved. -This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt -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 ---> - -<!-- -`<paper-fab>` is a floating action button with an icon. It comes in two sizes: regular -size and a smaller size by applying the class `mini`. - -Example: - - <paper-fab icon="favorite"></paper-fab> - <paper-fab class="mini"></paper-fab> - -@group Paper Elements -@element paper-fab -@homepage github.io -@extends paper-icon-button ---> - -<link href="../polymer/polymer.html" rel="import"> -<link href="../paper-icon-button/paper-icon-button.html" rel="import"> - -<polymer-element name="paper-fab" extends="paper-icon-button"> - - <template> - - <link href="paper-fab.css" rel="stylesheet"> - - <shadow></shadow> - - </template> - - <script> - Polymer('paper-fab', { - - publish: { - - /** - * See [`<paper-button>`](../paper-button). - * - * @attribute raisedButton - * @type boolean - * @default true - */ - raisedButton: {value: true, reflect: true} - - } - - }); - </script> -</polymer-element> diff --git a/third_party/polymer/components/paper-focusable/.bower.json b/third_party/polymer/components/paper-focusable/.bower.json deleted file mode 100644 index 8dcb240..0000000 --- a/third_party/polymer/components/paper-focusable/.bower.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "name": "paper-focusable", - "private": true, - "dependencies": { - "polymer": "Polymer/polymer#>=0.3.0 <1.0.0" - }, - "homepage": "https://github.com/Polymer/paper-focusable", - "version": "0.3.5", - "_release": "0.3.5", - "_resolution": { - "type": "version", - "tag": "0.3.5", - "commit": "fdeb4fa52af811ab504612963eae4a2db13f7f43" - }, - "_source": "git://github.com/Polymer/paper-focusable.git", - "_target": "0.3.5", - "_originalSource": "Polymer/paper-focusable" -}
\ No newline at end of file diff --git a/third_party/polymer/components/paper-focusable/README.md b/third_party/polymer/components/paper-focusable/README.md deleted file mode 100644 index ab2965a..0000000 --- a/third_party/polymer/components/paper-focusable/README.md +++ /dev/null @@ -1,4 +0,0 @@ -paper-focusable -=============== - -See the [component page](http://www.polymer-project.org/docs/elements/paper-elements.html#paper-focusable) for more information. diff --git a/third_party/polymer/components/paper-focusable/bower.json b/third_party/polymer/components/paper-focusable/bower.json deleted file mode 100644 index 324f9d2..0000000 --- a/third_party/polymer/components/paper-focusable/bower.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "name": "paper-focusable", - "private": true, - "dependencies": { - "polymer": "Polymer/polymer#>=0.3.0 <1.0.0" - } -}
\ No newline at end of file diff --git a/third_party/polymer/components/paper-focusable/demo.html b/third_party/polymer/components/paper-focusable/demo.html deleted file mode 100644 index 9fd58a2..0000000 --- a/third_party/polymer/components/paper-focusable/demo.html +++ /dev/null @@ -1,155 +0,0 @@ -<!doctype html> -<!-- -Copyright 2013 The Polymer Authors. All rights reserved. -Use of this source code is governed by a BSD-style -license that can be found in the LICENSE file. ---> -<html> -<head> - - <meta charset="utf-8"> - <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> - <meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no"> - - <title>paper-focusable</title> - - <script src="../platform/platform.js"></script> - - <link href="../font-roboto/roboto.html" rel="import"> - <link href="paper-focusable.html" rel="import"> - - <style shim-shadowdom> - body { - font-family: RobotoDraft, 'Helvetica Neue', Helvetica, Arial; - margin: 0; - padding: 24px; - -webkit-user-select: none; - -moz-user-select: none; - -ms-user-select: none; - user-select: none; - -webkit-tap-highlight-color: rgba(0,0,0,0); - -webkit-touch-callout: none; - -webkit-transform: translateZ(0); - transform: translateZ(0); - } - - section { - padding: 20px 0; - - width: 37em; - } - - section > div { - padding: 14px 0; - - font-size: 1.5em; - } - - paper-focusable[active].focusable-active { - - background: #9c27b0; - - } - - paper-focusable[active].focusable-toggle { - - background: #9c27b0; - - } - - paper-focusable[pressed].focusable-pressed { - - background: #ff80ab; - - } - - paper-focusable[focused].focusable-focused { - - background: #ec407a; - - } - - paper-focusable[disabled].focusable-disabled { - - opacity: 0.5; - - } - - - </style> -</head> -<body unresolved> - - <div class="main-descriptor"> - - The "paper-focused" item allows you to handle focusing on items. - - </div> - - <section> - - <div>Focusable Item - active</div> - - <paper-focusable class="focusable-active"> - - This paragraph shows a style with the "paper-focusable[active]" selector. - It functions much like using the "pressed" attribute. - </paper-focusable> - - </section> - - <section> - - <div>Focusable Item - pressed</div> - - <paper-focusable class="focusable-pressed"> - - This paragraph shows a style with the "paper-focusable[pressed]" selector. - It functions much like usin the "active" attribute. - - </paper-focusable> - - </section> - - <section> - - <div>Focusable Item - focused</div> - - <paper-focusable class="focusable-focused"> - - This paragraph shows a style with the "paper-focusable[focused]" selector. - This will be active on items that are focused but not active or pressed. - - </paper-focusable> - - </section> - - <section> - - <div>Focusable Item - disabled</div> - - <paper-focusable disabled class="focusable-disabled"> - - This paragraph shows a style with the "disabled" attribute. - The "paper-focusable" item with a "disabled" attribute cannot be selected, - and will prevent mouse actions. - - </paper-focusable> - - </section> - - <section> - - <div>Focusable Item - toggle</div> - - <paper-focusable isToggle class="focusable-toggle"> - - This paragraph shows a style with the "isToggle" attribute. - The "paper-focusable" item with an "isToggle" toggles the active state on each tap. - - </paper-focusable> - - </section> - -</body> -</html> diff --git a/third_party/polymer/components/paper-focusable/paper-focusable.html b/third_party/polymer/components/paper-focusable/paper-focusable.html deleted file mode 100644 index e478168..0000000 --- a/third_party/polymer/components/paper-focusable/paper-focusable.html +++ /dev/null @@ -1,146 +0,0 @@ -<!-- -Copyright (c) 2014 The Polymer Project Authors. All rights reserved. -This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt -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 ---> - -<!-- -/** - * @group Paper Elements - * - * paper-focusable is a base class for paper elements that can be focused. - * - * @element paper-focusable - * @status beta - * @homepage github.io - */ ---> - -<link href="../polymer/polymer.html" rel="import"> - -<polymer-element name="paper-focusable" attributes="active focused disabled isToggle" tabindex="0" on-down="{{downAction}}" on-up="{{upAction}}" on-focus="{{focusAction}}" on-blur="{{blurAction}}" on-contextmenu="{{contextMenuAction}}"> - - <template> - <style> - :host([disabled]) { - pointer-events: none; - } - </style> - <content></content> - </template> - - <script> - Polymer('paper-focusable', { - - publish: { - - /** - * If true, the button is currently active either because the - * user is holding down the button, or the button is a toggle - * and is currently in the active state. - * - * @attribute active - * @type boolean - * @default false - */ - active: {value: false, reflect: true}, - - /** - * If true, the element currently has focus due to keyboard - * navigation. - * - * @attribute focused - * @type boolean - * @default false - */ - focused: {value: false, reflect: true}, - - /** - * If true, the user is currently holding down the button. - * - * @attribute pressed - * @type boolean - * @default false - */ - pressed: {value: false, reflect: true}, - - /** - * If true, the user cannot interact with this element. - * - * @attribute disabled - * @type boolean - * @default false - */ - disabled: {value: false, reflect: true}, - - /** - * If true, the button toggles the active state with each tap. - * Otherwise, the button becomes active when the user is holding - * it down. - * - * @attribute isToggle - * @type boolean - * @default false - */ - isToggle: {value: false, reflect: false} - - }, - - disabledChanged: function() { - if (this.disabled) { - this.removeAttribute('tabindex'); - } else { - this.setAttribute('tabindex', 0); - } - }, - - downAction: function() { - this.pressed = true; - this.focused = false; - - if (this.isToggle) { - this.active = !this.active; - } else { - this.active = true; - } - }, - - // Pulling up the context menu for an item should focus it; but we need to - // be careful about how we deal with down/up events surrounding context - // menus. The up event typically does not fire until the context menu - // closes: so we focus immediately. - // - // This fires _after_ downAction. - contextMenuAction: function(e) { - // Note that upAction may fire _again_ on the actual up event. - this.upAction(e); - this.focusAction(); - }, - - upAction: function() { - this.pressed = false; - - if (!this.isToggle) { - this.active = false; - } - }, - - focusAction: function() { - if (!this.pressed) { - // Only render the "focused" state if the element gains focus due to - // keyboard navigation. - this.focused = true; - } - }, - - blurAction: function() { - this.focused = false; - } - - }); - - </script> -</polymer-element> diff --git a/third_party/polymer/components/paper-icon-button/.bower.json b/third_party/polymer/components/paper-icon-button/.bower.json deleted file mode 100644 index 8de328e..0000000 --- a/third_party/polymer/components/paper-icon-button/.bower.json +++ /dev/null @@ -1,20 +0,0 @@ -{ - "name": "paper-icon-button", - "private": true, - "dependencies": { - "polymer": "Polymer/polymer#>=0.3.0 <1.0.0", - "core-selector": "Polymer/core-selector#>=0.3.0 <1.0.0", - "paper-button": "Polymer/paper-button#>=0.3.0 <1.0.0" - }, - "homepage": "https://github.com/Polymer/paper-icon-button", - "version": "0.3.5", - "_release": "0.3.5", - "_resolution": { - "type": "version", - "tag": "0.3.5", - "commit": "55e07d248d0eec1d3044c240a829b96bd6ca916a" - }, - "_source": "git://github.com/Polymer/paper-icon-button.git", - "_target": "0.3.5", - "_originalSource": "Polymer/paper-icon-button" -}
\ No newline at end of file diff --git a/third_party/polymer/components/paper-icon-button/README.md b/third_party/polymer/components/paper-icon-button/README.md deleted file mode 100644 index 633a113..0000000 --- a/third_party/polymer/components/paper-icon-button/README.md +++ /dev/null @@ -1,4 +0,0 @@ -paper-icon-button -================= - -See the [component page](http://www.polymer-project.org/docs/elements/paper-elements.html#paper-icon-button) for more information. diff --git a/third_party/polymer/components/paper-icon-button/bower.json b/third_party/polymer/components/paper-icon-button/bower.json deleted file mode 100644 index 828d0ab..0000000 --- a/third_party/polymer/components/paper-icon-button/bower.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "name": "paper-icon-button", - "private": true, - "dependencies": { - "polymer": "Polymer/polymer#>=0.3.0 <1.0.0", - "core-selector": "Polymer/core-selector#>=0.3.0 <1.0.0", - "paper-button": "Polymer/paper-button#>=0.3.0 <1.0.0" - } -}
\ No newline at end of file diff --git a/third_party/polymer/components/paper-icon-button/demo.html b/third_party/polymer/components/paper-icon-button/demo.html deleted file mode 100644 index bd42d52..0000000 --- a/third_party/polymer/components/paper-icon-button/demo.html +++ /dev/null @@ -1,102 +0,0 @@ -<!doctype html> -<!-- -Copyright 2013 The Polymer Authors. All rights reserved. -Use of this source code is governed by a BSD-style -license that can be found in the LICENSE file. ---> -<html> - <head> - <title>paper-icon-button</title> - <meta name="viewport" content="width=device-width; initial-scale=1.0; max-scale=1.0; user-scalable=yes"> - <script src="../platform/platform.js"></script> - - <link rel="import" href="../core-icons/core-icons.html"> - <link rel="import" href="../core-icons/maps-icons.html"> - <link rel="import" href="../core-icons/social-icons.html"> - <link rel="import" href="../core-selector/core-selector.html"> - <link rel="import" href="paper-icon-button.html"> - - <style shim-shadowdom> - body { - font-family: sans-serif; - } - - column { - display: inline-block; - max-width: 720px; - } - - section { - margin: 1em; - } - - span { - display: inline-block; - text-align: right; - width: 6em; - margin-right: 1em; - } - - paper-icon-button { - vertical-align: middle; - } - - paper-icon-button.red::shadow core-icon { - fill: #fe774d; - } - - core-selector paper-icon-button:not([active])::shadow core-icon { - fill: #c9c9c9; - } - </style> - - </head> - - <body unresolved layout horizontal center-justified> - - <column> - - <section> - <span>icon buttons</span> - <paper-icon-button icon="menu"></paper-icon-button> - <paper-icon-button icon="arrow-back"></paper-icon-button> - <paper-icon-button icon="arrow-forward"></paper-icon-button> - <paper-icon-button icon="check"></paper-icon-button> - <paper-icon-button icon="close"></paper-icon-button> - <paper-icon-button icon="fullscreen"></paper-icon-button> - <paper-icon-button icon="fullscreen-exit"></paper-icon-button> - <paper-icon-button icon="more-vert"></paper-icon-button> - <paper-icon-button icon="refresh"></paper-icon-button> - </section> - - <section> - <span>styled</span> - <paper-icon-button icon="favorite"></paper-icon-button> - <paper-icon-button class="red" icon="favorite"></paper-icon-button> - <paper-icon-button disabled onclick="alert('should not be clickable');" icon="favorite"></paper-icon-button> - </section> - -<!-- <section> - <span>focused</span> - <paper-icon-button focused icon="social:cake"></paper-icon-button> - <paper-icon-button focused icon="social:plus-one"></paper-icon-button> - </section> - --> - <section> - <span>segmented</span> - <core-selector selected="1"> - <paper-icon-button fill isToggle icon="maps:directionswalk"></paper-icon-button> - <paper-icon-button fill isToggle icon="maps:directions-bike"></paper-icon-button> - <paper-icon-button fill isToggle icon="maps:directions-transit"></paper-icon-button> - <paper-icon-button fill isToggle icon="maps:directions-car"></paper-icon-button> - </core-selector> - </section> - - <section> - <span>custom img</span> - <paper-icon-button iconSrc="https://assets-cdn.github.com/images/modules/logos_page/Octocat.png"></paper-icon-button> - </section> - </column> - - </body> -</html> diff --git a/third_party/polymer/components/paper-icon-button/index.html b/third_party/polymer/components/paper-icon-button/index.html deleted file mode 100644 index 58856f3..0000000 --- a/third_party/polymer/components/paper-icon-button/index.html +++ /dev/null @@ -1,22 +0,0 @@ -<!doctype html> -<!-- -Copyright (c) 2014 The Polymer Project Authors. All rights reserved. -This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE -The complete set of authors may be found at http://polymer.github.io/AUTHORS -The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS -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 ---> -<html> -<head> - - <script src="../platform/platform.js"></script> - <link rel="import" href="../core-component-page/core-component-page.html"> - -</head> -<body unresolved> - - <core-component-page></core-component-page> - -</body> -</html> diff --git a/third_party/polymer/components/paper-icon-button/metadata.html b/third_party/polymer/components/paper-icon-button/metadata.html deleted file mode 100644 index c2e399c..0000000 --- a/third_party/polymer/components/paper-icon-button/metadata.html +++ /dev/null @@ -1,12 +0,0 @@ -<x-meta id="paper-icon-button" label="Icon Button" group="Paper"> - - <template> - <paper-icon-button icon="menu"></paper-icon-button> - </template> - - <template id="imports"> - <link rel="import" href="../core-icons/core-icons.html"> - <link rel="import" href="paper-icon-button.html"> - </template> - -</x-meta> diff --git a/third_party/polymer/components/paper-icon-button/paper-icon-button.css b/third_party/polymer/components/paper-icon-button/paper-icon-button.css deleted file mode 100644 index 313e627..0000000 --- a/third_party/polymer/components/paper-icon-button/paper-icon-button.css +++ /dev/null @@ -1,17 +0,0 @@ -/* -Copyright 2013 The Polymer Authors. All rights reserved. -Use of this source code is governed by a BSD-style -license that can be found in the LICENSE file. -*/ - -:host([disabled]) { - background: none !important; -} - -:host([disabled]) /deep/ #icon { - fill: #c9c9c9; -} - -:host(:not([fill])) /deep/ #focusBg { - border-radius: 50%; -}
\ No newline at end of file diff --git a/third_party/polymer/components/paper-icon-button/paper-icon-button.html b/third_party/polymer/components/paper-icon-button/paper-icon-button.html deleted file mode 100644 index 9e53016..0000000 --- a/third_party/polymer/components/paper-icon-button/paper-icon-button.html +++ /dev/null @@ -1,87 +0,0 @@ -<!-- -Copyright (c) 2014 The Polymer Project Authors. All rights reserved. -This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE -The complete set of authors may be found at http://polymer.github.io/AUTHORS -The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS -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 ---> - -<!-- -@group Paper Elements -`paper-icon-button` is a button with an image placed at the center. - -Example: - - <paper-icon-button iconSrc="star.png"></paper-icon-button> - -`paper-icon-button` includes a default icon set. Use `icon` to specify -which icon from the icon set to use. - -Example: - - <paper-icon-button icon="menu"></paper-icon-button> - -The icons provided by `core-icons` are SVG, and you can style them with CSS. - -Example: - - <paper-icon-button icon="favorite" style="fill:red;"></paper-icon-button> - -See `core-iconset` for more information about how to use a custom icon set. - -@element paper-icon-button -@extends paper-button -@homepage github.io ---> - -<link href="../core-icon/core-icon.html" rel="import"> -<link href="../paper-button/paper-button.html" rel="import"> - -<polymer-element name="paper-icon-button" extends="paper-button" attributes="fill"> - - <template> - - <link href="paper-icon-button.css" rel="stylesheet"> - - <shadow></shadow> - - </template> - - <script> - - Polymer('paper-icon-button', { - - publish: { - - /** - * If true, the ripple expands to a square to fill the containing box. - * - * @attribute fill - * @type boolean - * @default false - */ - fill: {value: false, reflect: true} - - }, - - ready: function() { - this.$.ripple.classList.add('recenteringTouch'); - this.fillChanged(); - }, - - fillChanged: function() { - this.$.ripple.classList.toggle('circle', !this.fill); - }, - - iconChanged: function(oldIcon) { - if (!this.label) { - this.setAttribute('aria-label', this.icon); - } - } - - }); - - </script> - -</polymer-element> diff --git a/third_party/polymer/components/paper-icon-button/pulse-ink.css b/third_party/polymer/components/paper-icon-button/pulse-ink.css deleted file mode 100644 index 8d11bc1..0000000 --- a/third_party/polymer/components/paper-icon-button/pulse-ink.css +++ /dev/null @@ -1,10 +0,0 @@ -@-webkit-keyframes pulse-ink { - 0% { - -webkit-transform: scale(0); - opacity: 0; - } - 100% { - -webkit-transform: scale(1); - opacity: 0.9; - } -} diff --git a/third_party/polymer/components/paper-input/.bower.json b/third_party/polymer/components/paper-input/.bower.json deleted file mode 100644 index 690374f..0000000 --- a/third_party/polymer/components/paper-input/.bower.json +++ /dev/null @@ -1,20 +0,0 @@ -{ - "name": "paper-input", - "private": true, - "dependencies": { - "polymer": "Polymer/polymer#>=0.3.0 <1.0.0", - "core-input": "Polymer/core-input#>=0.3.0 <1.0.0", - "core-style": "Polymer/core-style#>=0.3.0 <1.0.0" - }, - "homepage": "https://github.com/Polymer/paper-input", - "version": "0.3.5", - "_release": "0.3.5", - "_resolution": { - "type": "version", - "tag": "0.3.5", - "commit": "52a7c021c9aeb7d0020e81d42d8b7ce3884ca68e" - }, - "_source": "git://github.com/Polymer/paper-input.git", - "_target": "0.3.5", - "_originalSource": "Polymer/paper-input" -}
\ No newline at end of file diff --git a/third_party/polymer/components/paper-input/.gitignore b/third_party/polymer/components/paper-input/.gitignore deleted file mode 100644 index 9f7d5aa..0000000 --- a/third_party/polymer/components/paper-input/.gitignore +++ /dev/null @@ -1 +0,0 @@ -vulcanized.html diff --git a/third_party/polymer/components/paper-input/README.md b/third_party/polymer/components/paper-input/README.md deleted file mode 100644 index f7617c5..0000000 --- a/third_party/polymer/components/paper-input/README.md +++ /dev/null @@ -1,4 +0,0 @@ -paper-input -=================== - -See the [component page](http://www.polymer-project.org/docs/elements/paper-elements.html#paper-input) for more information. diff --git a/third_party/polymer/components/paper-input/bower.json b/third_party/polymer/components/paper-input/bower.json deleted file mode 100644 index 0ad8185..0000000 --- a/third_party/polymer/components/paper-input/bower.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "name": "paper-input", - "private": true, - "dependencies": { - "polymer": "Polymer/polymer#>=0.3.0 <1.0.0", - "core-input": "Polymer/core-input#>=0.3.0 <1.0.0", - "core-style": "Polymer/core-style#>=0.3.0 <1.0.0" - } -}
\ No newline at end of file diff --git a/third_party/polymer/components/paper-input/demo.html b/third_party/polymer/components/paper-input/demo.html deleted file mode 100644 index 457d587..0000000 --- a/third_party/polymer/components/paper-input/demo.html +++ /dev/null @@ -1,73 +0,0 @@ -<!doctype html> -<html> -<head> - - <meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no"> - - <title>paper-input</title> - - <script src="../platform/platform.js"></script> - - <link href="../font-roboto/roboto.html" rel="import"> - <link href="paper-input.html" rel="import"> - - <style shim-shadowdom> - - body { - font-family: RobotoDraft, 'Helvetica Neue', Helvetica, Arial; - margin: 0; - padding: 24px; - -webkit-user-select: none; - -moz-user-select: none; - -ms-user-select: none; - user-select: none; - -webkit-tap-highlight-color: rgba(0,0,0,0); - -webkit-touch-callout: none; - } - - </style> - -</head> -<body unresolved> - <section> - - <paper-input label="Type something..."></paper-input> - - <br> - - <paper-input label="Type only numbers..." type="number" error="Input is not a number!"></paper-input> - - <br> - - <paper-input label="Type something..." required error="This input requires a value!"></paper-input> - - <br> - - <paper-input disabled label="I'm disabled"></paper-input> - - <br> - - <paper-input floatingLabel label="Floating label"></paper-input> - - <br> - - <paper-input floatingLabel label="Type only numbers... (floating)" type="number" error="Input is not a number!"></paper-input> - - <br> - - <paper-input multiline label="Type multiple lines here..."></paper-input> - - <br> - - <paper-input multiline rows="3" label="This input is 3 rows high"></paper-input> - - <br> - - <paper-input multiline maxRows="3" label="This input is at most 3 rows high"></paper-input> - - <br> - - <paper-input multiline floatingLabel label="Multiple lines and a floating label"></paper-input> - - </section> -</body> diff --git a/third_party/polymer/components/paper-input/demo2.html b/third_party/polymer/components/paper-input/demo2.html deleted file mode 100644 index 2fbdd7f..0000000 --- a/third_party/polymer/components/paper-input/demo2.html +++ /dev/null @@ -1,114 +0,0 @@ -<!doctype html> -<html> -<head> - <meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no"> - <title>paper-input</title> - <script src="../platform/platform.js"></script> - <link href="../font-roboto/roboto.html" rel="import"> - <link href="paper-input.html" rel="import"> - <style> - body { - padding: 0; - margin: 0; - -webkit-transform: translateZ(0); - transform: translateZ(0); - } - section { - font-family: RobotoDraft, 'Helvetica Neue', Helvetica, Arial; - font-size: 16px; - text-align: center; - padding: 36px 20%; - background: #eee; - } - h1 { - font-size: 2em; - margin-bottom: 2em; - } - .container { - margin: 24px 0; - border-radius: 5px; - } - paper-input { - width: 100%; - text-align: left; - } - .dark-theme { - background: #333333; - color: #ccc; - } - .dark-theme paper-input { - color: #666; - } - .dark-theme input { - color: #fff; - } - .dark-theme /deep/ input { - color: #fff; - } - .dark-theme #underline { - background: #666; - border-bottom-color: #666; - } - .dark-theme /deep/ #underline { - background: #666; - border-bottom-color: #666; - } - .dark-theme .focusedColor { - color: #7d8ad0; - background: #7d8ad0; - } - .dark-theme /deep/ .focusedColor { - color: #7d8ad0; - background: #7d8ad0; - } - </style> -</head> -<body unresolved> - <section> - <h1><paper-input></h1> - <div class="container"> - <paper-input label="Type something..."></paper-input> - </div> - <div class="container"> - <paper-input label="Type only numbers..." validate="^[0-9]*$" error="Input is not a number!"></paper-input> - </div> - <div class="container"> - <paper-input disabled label="I'm disabled"></paper-input> - </div> - <div class="container"> - <paper-input floatingLabel label="Floating label"></paper-input> - </div> - <div class="container"> - <paper-input floatingLabel label="Type only numbers... (floating)" validate="^[0-9]*$" error="Input is not a number!"></paper-input> - </div> - <div class="container"> - <paper-input multiline style="display:none;" label="Type multiple lines here..."></paper-input> - </div> - <div class="container"> - <paper-input multiline rows="3" label="This input is 3 rows high"></paper-input> - </div> - <div class="container"> - <paper-input multiline maxRows="3" label="This input is at most 3 rows high"></paper-input> - </div> - <div class="container"> - <paper-input multiline floatingLabel label="Multiple lines and a floating label"></paper-input> - </div> - </section> - <section class="dark-theme"> - <div class="container"> - <paper-input label="Type something..."></paper-input> - </div> - <div class="container"> - <paper-input label="Type only numbers..." validate="^[0-9]*$" error="Input is not a number!"></paper-input> - </div> - <div class="container"> - <paper-input disabled label="I'm disabled"></paper-input> - </div> - <div class="container"> - <paper-input floatingLabel label="Floating label"></paper-input> - </div> - <div class="container"> - <paper-input floatingLabel label="Type only numbers... (floating)" validate="^[0-9]*$" error="Input is not a number!"></paper-input> - </div> - </section> -</body> diff --git a/third_party/polymer/components/paper-input/error-100.png b/third_party/polymer/components/paper-input/error-100.png Binary files differdeleted file mode 100644 index ab5a6b1..0000000 --- a/third_party/polymer/components/paper-input/error-100.png +++ /dev/null diff --git a/third_party/polymer/components/paper-input/error-200.png b/third_party/polymer/components/paper-input/error-200.png Binary files differdeleted file mode 100644 index ede8dd5..0000000 --- a/third_party/polymer/components/paper-input/error-200.png +++ /dev/null diff --git a/third_party/polymer/components/paper-input/index.html b/third_party/polymer/components/paper-input/index.html deleted file mode 100644 index b90ad27..0000000 --- a/third_party/polymer/components/paper-input/index.html +++ /dev/null @@ -1,22 +0,0 @@ -<!doctype html> -<!-- -Copyright (c) 2014 The Polymer Project Authors. All rights reserved. -This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE -The complete set of authors may be found at http://polymer.github.io/AUTHORS -The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS -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 ---> -<html> -<head> - - <script src="../platform/platform.js"></script> - <link rel="import" href="../core-component-page/core-component-page.html"> - -</head> -<body unresolved> - - <core-component-page sources='["paper-input.html","../core-input/core-input.html"]'></core-component-page> - -</body> -</html> diff --git a/third_party/polymer/components/paper-input/metadata.html b/third_party/polymer/components/paper-input/metadata.html deleted file mode 100644 index 703692d..0000000 --- a/third_party/polymer/components/paper-input/metadata.html +++ /dev/null @@ -1,14 +0,0 @@ -<x-meta id="paper-input" label="Input" group="Paper" isEditor> - - <template> - <paper-input label="Type something..."></paper-input> - </template> - - <template id="imports"> - <link rel="import" href="paper-input.html"> - </template> - - <property name="validate" kind="string"></property> - <property name="error" kind="string"></property> - -</x-meta> diff --git a/third_party/polymer/components/paper-input/paper-input.css b/third_party/polymer/components/paper-input/paper-input.css deleted file mode 100644 index 31120f6..0000000 --- a/third_party/polymer/components/paper-input/paper-input.css +++ /dev/null @@ -1,211 +0,0 @@ -:host { - display: inline-block; - outline: none; - text-align: inherit; - color: #757575; -} -:host(:hover) { - cursor: text; -} - -#container { - position: relative; -} - -#inputClone, -#minInputHeight, -#maxInputHeight { - position: absolute; - top: 0; - left: 0; - visibility: hidden; - padding: 0.5em 0; -} - -:host /deep/ input, -:host /deep/ textarea { - font: inherit; - color: #000; - padding: 0; - /* Important to use margin here so the margin remains visible - * when textarea scrolls internally. */ - margin: 0.5em 0; - background-color: transparent; - border: none; - outline: none; - width: 100%; -} - -:host /deep/ input:invalid, -:host /deep/ textarea:invalid { - box-shadow: none; -} - -.host /deep/ textarea { - resize: none; -} - -#floatedLabel { - font-size: 0.75em; - background: transparent; - white-space: nowrap; -} -#floatedLabel.hidden { - visibility: hidden; -} -#floatedLabel.focused { - visibility: visible; -} - -#label { - position: absolute; - top: 0; - left: 0; - right: 0; - bottom: 0; - width: 100%; - padding: 0.5em 0; - background: transparent; - -moz-transform-origin: 0% 0%; - -webkit-transform-origin: 0% 0%; - transform-origin: 0% 0%; - pointer-events: none; -} -#label.hidden { - display: none; -} -#label.animating { - /* TODO: transforms are unprefixed in M36/ Remove when stable. */ - -webkit-transition: -webkit-transform 0.3s cubic-bezier(0.2, 0, 0.03, 1); - transition: transform 0.3s cubic-bezier(0.2, 0, 0.03, 1); -} - -#labelSpan { - overflow: hidden; - text-overflow: ellipsis; - white-space: nowrap; - display: inline-block; - max-width: 100%; -} - -#errorContainer { - visibility: hidden; - display: -webkit-flex; - display: flex; - -webkit-align-items: center; - align-items: center; -} - -:host(.invalid) #errorContainer { - visibility: visible; -} - -#error { - -webkit-flex: 1; - flex: 1; - font-size: 0.75em; - padding: 0.5em 0; -} - -#errorIcon { - background-image: url(error-100.png); - background-size: 24px 24px; - height: 24px; - width: 24px; -} - - -@media (min-resolution: 2dppx) { - #errorIcon { - background-image: url(error-200.png); - background-size: 24px 24px; - } -} - -#underlineContainer { - position: absolute; - left: 0; - right: 0; - bottom: -1px; -} - -:host([multiline]) #underlineContainer { - bottom: auto; -} - -:host([multiline]) #underlineContainer.animating { - -webkit-transition: top 0.2s ease-in; - transition: top 0.2s ease-in; -} - -#underline { - height: 1px; - background: #757575; - border-bottom-color: #757575; -} - -:host([disabled]) #underline { - border-bottom: 1px dashed; - height: 0px; - background: transparent; -} - -#underlineHighlight { - position: absolute; - left: 0; - right: 0; - bottom: 0; - height: 2px; - -webkit-transform: scale(0,2); - transform: scale(0,2); -} -#underlineHighlight.pressed { - -webkit-transform: scale(0.1,2); - transform: scale(0.1,2); - /* TODO: transforms are unprefixed in M36/ Remove when stable. */ - -webkit-transition: -webkit-transform 0.1s cubic-bezier(0.2, 0, 0.03, 1); - transition: transform 0.3s cubic-bezier(0.2, 0, 0.03, 1); -} -#underlineHighlight.animating { - /* TODO: transforms are unprefixed in M36/ Remove when stable. */ - -webkit-transition: -webkit-transform 0.3s cubic-bezier(0.2, 0, 0.03, 1); - transition: transform 0.3s cubic-bezier(0.2, 0, 0.03, 1); -} -#underlineHighlight.focused { - -webkit-transform: scale(1); - transform: scale(1); -} - -#caret { - display: none; - position: absolute; - top: 0; - left: 0; - right: 0; - bottom: 0; - opacity: 0; - -moz-transform-origin: 0%; - -webkit-transform-origin-x: 0%; - transform-origin-x: 0%; - -webkit-transform: scaleX(1) translateX(10%); - transform: scaleX(1) translateX(10%); -} -#caret.animating { - display: block; - /* TODO: transforms are unprefixed in M36/ Remove when stable. */ - -webkit-transition: -webkit-transform 0.2s ease-out, opacity 0.2s ease-out; - transition: transform 0.3s cubic-bezier(0.2, 0, 0.03, 1); -} -#caret.focused { - display: block; - opacity: 0.75; - -webkit-transform: scaleX(0) translateX(0); - transform: scaleX(0) translateX(0); -} -#caretInner { - position: absolute; - top: 0.6em; - left: 0; - height: 1.2em; - width: 25%; -} diff --git a/third_party/polymer/components/paper-input/paper-input.html b/third_party/polymer/components/paper-input/paper-input.html deleted file mode 100644 index 613cca6..0000000 --- a/third_party/polymer/components/paper-input/paper-input.html +++ /dev/null @@ -1,433 +0,0 @@ -<!-- -Copyright (c) 2014 The Polymer Project Authors. All rights reserved. -This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE -The complete set of authors may be found at http://polymer.github.io/AUTHORS -The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS -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 ---> - -<!-- -`paper-input` is a single- or multi-line text field where user can enter input. -It can optionally have a label. - -Example: - - <paper-input label="Your Name"></paper-input> - <paper-input multiline label="Enter multiple lines here"></paper-input> - -Theming --------- - -Set `CoreStyle.g.paperInput.focusedColor` and `CoreStyle.g.paperInput.invalidColor` to theme -the focused and invalid states. - -@group Paper Elements -@element paper-input -@extends core-input -@homepage github.io ---> -<link href="../polymer/polymer.html" rel="import"> -<link href="../core-input/core-input.html" rel="import"> -<link href="../core-style/core-style.html" rel="import"> - -<core-style id="paper-input"> - -#label.focused, -#floatedLabel.focused { - color: {{g.paperInput.focusedColor}}; -} - -#underlineHighlight.focused, -#caretInner { - background-color: {{g.paperInput.focusedColor}}; -} - -#error, -:host(.invalid) #label.focused, -:host(.invalid) #floatedLabel.focused { - color: {{g.paperInput.invalidColor}}; -} -:host(.invalid) #underlineHighlight.focused, -:host(.invalid) #caretInner { - background-color: {{g.paperInput.invalidColor}}; -} - -</core-style> - -<polymer-element name="paper-input" extends="core-input" attributes="label floatingLabel maxRows error" on-down="{{downAction}}" on-up="{{upAction}}"> - - <template> - - <link href="paper-input.css" rel="stylesheet"> - - <core-style ref="paper-input"></core-style> - - <div id="floatedLabel" class="hidden" hidden?="{{!floatingLabel}}"><span id="floatedLabelSpan">{{label}}</span></div> - - <div id="container" on-transitionend="{{transitionEndAction}}" on-webkitTransitionEnd="{{transitionEndAction}}"> - - <div id="label"><span id="labelSpan">{{label}}</span></div> - - <div id="inputContainer"> - - <div id="inputClone"> - <span id="inputCloneSpan" aria-hidden="true"> </span> - </div> - - <template if="{{multiline}}"> - <div id="minInputHeight"></div> - <div id="maxInputHeight"></div> - </template> - - <shadow></shadow> - - </div> - - <div id="underlineContainer"> - <div id="underline"></div> - <div id="underlineHighlight" class="focusedColor"></div> - </div> - - <div id="caret"> - <div id="caretInner" class="focusedColor"></div> - </div> - - </div> - - <div id="errorContainer"> - <div id="error" role="alert" aria-hidden="{{!invalid}}">{{error || validationMessage}}</div> - <div id="errorIcon"></div> - </div> - - </template> - - <script> - - (function() { - - var paperInput = CoreStyle.g.paperInput = CoreStyle.g.paperInput || {}; - paperInput.focusedColor = '#4059a9'; - paperInput.invalidColor = '#d34336'; - - Polymer('paper-input', { - - /** - * The label for this input. It normally appears as grey text inside - * the text input and disappears once the user enters text. - * - * @attribute label - * @type string - * @default '' - */ - label: '', - - /** - * If true, the label will "float" above the text input once the - * user enters text instead of disappearing. - * - * @attribute floatingLabel - * @type boolean - * @default false - */ - floatingLabel: false, - - /** - * (multiline only) If set to a non-zero value, the height of this - * text input will grow with the value changes until it is maxRows - * rows tall. If the maximum size does not fit the value, the text - * input will scroll internally. - * - * @attribute maxRows - * @type number - * @default 0 - */ - maxRows: 0, - - /** - * The message to display if the input value fails validation. If this - * is unset or the empty string, a default message is displayed depending - * on the type of validation error. - * - * @attribute error - * @type string - */ - error: '', - - focused: false, - pressed: false, - - attached: function() { - if (this.multiline) { - this.resizeInput(); - window.requestAnimationFrame(function() { - this.$.underlineContainer.classList.add('animating'); - }.bind(this)); - } - }, - - resizeInput: function() { - var height = this.$.inputClone.getBoundingClientRect().height; - var bounded = this.maxRows > 0 || this.rows > 0; - if (bounded) { - var minHeight = this.$.minInputHeight.getBoundingClientRect().height; - var maxHeight = this.$.maxInputHeight.getBoundingClientRect().height; - height = Math.max(minHeight, Math.min(height, maxHeight)); - } - this.$.inputContainer.style.height = height + 'px'; - this.$.underlineContainer.style.top = height + 'px'; - }, - - prepareLabelTransform: function() { - var toRect = this.$.floatedLabelSpan.getBoundingClientRect(); - var fromRect = this.$.labelSpan.getBoundingClientRect(); - if (toRect.width !== 0) { - this.$.label.cachedTransform = 'scale(' + (toRect.width / fromRect.width) + ') ' + - 'translateY(' + (toRect.bottom - fromRect.bottom) + 'px)'; - } - }, - - toggleLabel: function(force) { - var v = force !== undefined ? force : this.inputValue; - - if (!this.floatingLabel) { - this.$.label.classList.toggle('hidden', v); - } - - if (this.floatingLabel && !this.focused) { - this.$.label.classList.toggle('hidden', v); - this.$.floatedLabel.classList.toggle('hidden', !v); - } - }, - - rowsChanged: function() { - if (this.multiline && !isNaN(parseInt(this.rows))) { - this.$.minInputHeight.innerHTML = ''; - for (var i = 0; i < this.rows; i++) { - this.$.minInputHeight.appendChild(document.createElement('br')); - } - this.resizeInput(); - } - }, - - maxRowsChanged: function() { - if (this.multiline && !isNaN(parseInt(this.maxRows))) { - this.$.maxInputHeight.innerHTML = ''; - for (var i = 0; i < this.maxRows; i++) { - this.$.maxInputHeight.appendChild(document.createElement('br')); - } - this.resizeInput(); - } - }, - - inputValueChanged: function() { - this.super(); - - if (this.multiline) { - var escaped = this.inputValue.replace(/\n/gm, '<br>'); - if (!escaped || escaped.lastIndexOf('<br>') === escaped.length - 4) { - escaped += ' '; - } - this.$.inputCloneSpan.innerHTML = escaped; - this.resizeInput(); - } - - this.toggleLabel(); - }, - - labelChanged: function() { - if (this.floatingLabel && this.$.floatedLabel && this.$.label) { - // If the element is created programmatically, labelChanged is called before - // binding. Run the measuring code in async so the DOM is ready. - this.async(function() { - this.prepareLabelTransform(); - }); - } - }, - - placeholderChanged: function() { - this.label = this.placeholder; - }, - - inputFocusAction: function() { - if (!this.pressed) { - if (this.floatingLabel) { - this.$.floatedLabel.classList.remove('hidden'); - this.$.floatedLabel.classList.add('focused'); - this.$.floatedLabel.classList.add('focusedColor'); - } - this.$.label.classList.add('hidden'); - this.$.underlineHighlight.classList.add('focused'); - this.$.caret.classList.add('focused'); - - this.super(arguments); - } - this.focused = true; - }, - - shouldFloatLabel: function() { - // if type = number, the input value is the empty string until a valid number - // is entered so we must do some hacks here - return this.inputValue || (this.type === 'number' && !this.validity.valid); - }, - - inputBlurAction: function() { - this.super(arguments); - - this.$.underlineHighlight.classList.remove('focused'); - this.$.caret.classList.remove('focused'); - - if (this.floatingLabel) { - this.$.floatedLabel.classList.remove('focused'); - this.$.floatedLabel.classList.remove('focusedColor'); - if (!this.shouldFloatLabel()) { - this.$.floatedLabel.classList.add('hidden'); - } - } - - // type = number hack. see core-input for more info - if (!this.shouldFloatLabel()) { - this.$.label.classList.remove('hidden'); - this.$.label.classList.add('animating'); - this.async(function() { - this.$.label.style.webkitTransform = 'none'; - this.$.label.style.transform = 'none'; - }); - } - - this.focused = false; - }, - - downAction: function(e) { - if (this.disabled) { - return; - } - - if (this.focused) { - return; - } - - this.pressed = true; - var rect = this.$.underline.getBoundingClientRect(); - var right = e.x - rect.left; - this.$.underlineHighlight.style.webkitTransformOriginX = right + 'px'; - this.$.underlineHighlight.style.transformOriginX = right + 'px'; - this.$.underlineHighlight.classList.remove('focused'); - this.underlineAsync = this.async(function() { - this.$.underlineHighlight.classList.add('pressed'); - }, null, 200); - - // No caret animation if there is text in the input. - if (!this.inputValue) { - this.$.caret.classList.remove('focused'); - } - }, - - upAction: function(e) { - if (this.disabled) { - return; - } - - if (!this.pressed) { - return; - } - - // if a touchevent caused the up, the synthentic mouseevents will blur - // the input, make sure to prevent those from being generated. - if (e._source === 'touch') { - e.preventDefault(); - } - - if (this.underlineAsync) { - clearTimeout(this.underlineAsync); - this.underlineAsync = null; - } - - // Focus the input here to bring up the virtual keyboard. - this.$.input.focus(); - this.pressed = false; - this.animating = true; - - this.$.underlineHighlight.classList.remove('pressed'); - this.$.underlineHighlight.classList.add('animating'); - this.async(function() { - this.$.underlineHighlight.classList.add('focused'); - }); - - // No caret animation if there is text in the input. - if (!this.inputValue) { - this.$.caret.classList.add('animating'); - this.async(function() { - this.$.caret.classList.add('focused'); - }, null, 100); - } - - if (this.floatingLabel) { - this.$.label.classList.add('focusedColor'); - this.$.label.classList.add('animating'); - if (!this.$.label.cachedTransform) { - this.prepareLabelTransform(); - } - this.$.label.style.webkitTransform = this.$.label.cachedTransform; - this.$.label.style.transform = this.$.label.cachedTransform; - } - }, - - keydownAction: function() { - this.super(); - - // more type = number hacks. see core-input for more info - if (this.type === 'number') { - this.async(function() { - if (!this.inputValue) { - this.toggleLabel(!this.validity.valid); - } - }); - } - }, - - keypressAction: function() { - if (this.animating) { - this.transitionEndAction(); - } - }, - - transitionEndAction: function(e) { - this.animating = false; - if (this.pressed) { - return; - } - - if (this.focused) { - - if (this.floatingLabel || this.inputValue) { - this.$.label.classList.add('hidden'); - } - - if (this.floatingLabel) { - this.$.label.classList.remove('focusedColor'); - this.$.label.classList.remove('animating'); - this.$.floatedLabel.classList.remove('hidden'); - this.$.floatedLabel.classList.add('focused'); - this.$.floatedLabel.classList.add('focusedColor'); - } - - this.async(function() { - this.$.underlineHighlight.classList.remove('animating'); - this.$.caret.classList.remove('animating'); - }, null, 100); - - } else { - - this.$.label.classList.remove('animating'); - - } - } - - }); - - }()); - - </script> - -</polymer-element> diff --git a/third_party/polymer/components/paper-item/.bower.json b/third_party/polymer/components/paper-item/.bower.json deleted file mode 100644 index 4e9282f..0000000 --- a/third_party/polymer/components/paper-item/.bower.json +++ /dev/null @@ -1,20 +0,0 @@ -{ - "name": "paper-item", - "private": true, - "dependencies": { - "polymer": "Polymer/polymer#>=0.3.0 <1.0.0", - "core-icon": "Polymer/core-icon#>=0.3.0 <1.0.0", - "paper-ripple": "Polymer/paper-ripple#>=0.3.0 <1.0.0" - }, - "homepage": "https://github.com/Polymer/paper-item", - "version": "0.3.5", - "_release": "0.3.5", - "_resolution": { - "type": "version", - "tag": "0.3.5", - "commit": "06e4854e71fe1f7c10a39ec0a2cf44b1af11b264" - }, - "_source": "git://github.com/Polymer/paper-item.git", - "_target": "0.3.5", - "_originalSource": "Polymer/paper-item" -}
\ No newline at end of file diff --git a/third_party/polymer/components/paper-item/README.md b/third_party/polymer/components/paper-item/README.md deleted file mode 100644 index b7ec0ce..0000000 --- a/third_party/polymer/components/paper-item/README.md +++ /dev/null @@ -1,4 +0,0 @@ -paper-item -========= - -See the [component page](http://polymer-project.org/docs/elements/paper-elements.html#paper-item) for more information. diff --git a/third_party/polymer/components/paper-item/bower.json b/third_party/polymer/components/paper-item/bower.json deleted file mode 100644 index cf71cef..0000000 --- a/third_party/polymer/components/paper-item/bower.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "name": "paper-item", - "private": true, - "dependencies": { - "polymer": "Polymer/polymer#>=0.3.0 <1.0.0", - "core-icon": "Polymer/core-icon#>=0.3.0 <1.0.0", - "paper-ripple": "Polymer/paper-ripple#>=0.3.0 <1.0.0" - } -}
\ No newline at end of file diff --git a/third_party/polymer/components/paper-item/demo.html b/third_party/polymer/components/paper-item/demo.html deleted file mode 100644 index 2bf6108..0000000 --- a/third_party/polymer/components/paper-item/demo.html +++ /dev/null @@ -1,37 +0,0 @@ -<!doctype html> -<!-- -Copyright 2013 The Polymer Authors. All rights reserved. -Use of this source code is governed by a BSD-style -license that can be found in the LICENSE file. ---> -<html> -<head> - <title>paper-item</title> - <meta charset="utf-8"> - <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> - <meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no"> - <script src="../platform/platform.js"></script> - <link href="../font-roboto/roboto.html" rel="import"> - <link href="../core-icons/core-icons.html" rel="import"> - <link href="../core-menu/core-menu.html" rel="import"> - <link href="paper-item.html" rel="import"> - <style shim-shadowdom> - body { - font-family: RobotoDraft, 'Helvetica Neue', Helvetica, Arial; - } - - paper-item { - max-width: 320px; - } - </style> -</head> -<body unresolved> - <core-menu> - <paper-item icon="refresh" label="Item 1"></paper-item> - <paper-item label="Item 2"></paper-item> - <paper-item label="Item with a link"> - <a href="http://www.polymer-project.org" target="_self"></a> - </paper-item> - </core-menu> -</body> -</html>
\ No newline at end of file diff --git a/third_party/polymer/components/paper-item/index.html b/third_party/polymer/components/paper-item/index.html deleted file mode 100644 index 58856f3..0000000 --- a/third_party/polymer/components/paper-item/index.html +++ /dev/null @@ -1,22 +0,0 @@ -<!doctype html> -<!-- -Copyright (c) 2014 The Polymer Project Authors. All rights reserved. -This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE -The complete set of authors may be found at http://polymer.github.io/AUTHORS -The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS -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 ---> -<html> -<head> - - <script src="../platform/platform.js"></script> - <link rel="import" href="../core-component-page/core-component-page.html"> - -</head> -<body unresolved> - - <core-component-page></core-component-page> - -</body> -</html> diff --git a/third_party/polymer/components/paper-item/metadata.html b/third_party/polymer/components/paper-item/metadata.html deleted file mode 100644 index eb16cdc..0000000 --- a/third_party/polymer/components/paper-item/metadata.html +++ /dev/null @@ -1,14 +0,0 @@ -<x-meta id="paper-item" label="Item" group="Paper"> - - <template> - - <paper-item icon="settings" label="Item"></paper-item> - - </template> - - <template id="imports"> - <link rel="import" href="../core-icons/core-icons.html"> - <link rel="import" href="paper-item.html"> - </template> - -</x-meta>
\ No newline at end of file diff --git a/third_party/polymer/components/paper-item/paper-item.css b/third_party/polymer/components/paper-item/paper-item.css deleted file mode 100644 index d6a191e..0000000 --- a/third_party/polymer/components/paper-item/paper-item.css +++ /dev/null @@ -1,31 +0,0 @@ -html /deep/ paper-item { - display: block; - position: relative; - -webkit-user-select: none; - user-select: none; - cursor: pointer; - height: 36px; - padding: 0 12px; - white-space: nowrap; -} - -html /deep/ paper-item::shadow #ripple { - position: absolute; - top: 0; - left: 0; - bottom: 0; - right: 0; - pointer-events: none; -} - -html /deep/ paper-item::shadow #icon { - margin-right: 8px; -} - -html /deep/ paper-item::shadow ::content > a { - position: absolute; - top: 0; - right: 0; - bottom: 0; - left: 0; -} diff --git a/third_party/polymer/components/paper-item/paper-item.html b/third_party/polymer/components/paper-item/paper-item.html deleted file mode 100644 index ceb1b8a..0000000 --- a/third_party/polymer/components/paper-item/paper-item.html +++ /dev/null @@ -1,104 +0,0 @@ -<!-- -Copyright (c) 2014 The Polymer Project Authors. All rights reserved. -This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt -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 ---> - -<!-- -@group Paper Elements - -`paper-item` is a list-item object for use in menus. It may contain and icon and/or -a text label. - -Example: - - <core-menu> - <paper-item icon="refresh" label="Refresh"></paper-item> - <paper-item label="Help"></paper-item> - <paper-item label="Sign Out"></paper-item> - </core-menu> - -To use as a link, put an `<a>` element in the item. - -Example: - - <paper-item icon="home" label="Home"> - <a href="http://www.polymer-project.org"></a> - </paper-item> - -@class paper-item ---> - -<link href="../polymer/polymer.html" rel="import"> -<link href="../core-icon/core-icon.html" rel="import"> -<link href="../paper-ripple/paper-ripple.html" rel="import"> - -<link href="paper-item.css" rel="stylesheet" shim-shadowdom> - -<polymer-element name="paper-item" attributes="label iconSrc icon" center horizontal layout> - - <template> - - <paper-ripple id="ripple"></paper-ripple> - - <core-icon id="icon" hidden?="{{!iconSrc && !icon}}" src="{{iconSrc}}" icon="{{icon}}"></core-icon> - <div id="label">{{label}}</div> - <content></content> - </template> - - <script> - Polymer('paper-item', { - - publish: { - - /** - * The label for the item. - * - * @attribute label - * @type string - * @default '' - */ - label: '', - - /** - * (optional) The URL of an image for an icon to use in the button. - * Should not use `icon` property if you are using this property. - * - * @attribute iconSrc - * @type string - * @default '' - */ - iconSrc: '', - - /** - * (optional) Specifies the icon name or index in the set of icons - * available in the icon set. If using this property, load the icon - * set separately where the icon is used. Should not use `src` - * if you are using this property. - * - * @attribute icon - * @type string - * @default '' - */ - icon: '' - - }, - - eventDelegates: { - 'down': 'downAction', - 'up': 'upAction' - }, - - downAction: function(e) { - this.$.ripple.downAction(e); - }, - - upAction: function(e) { - this.$.ripple.upAction(e); - } - }); - </script> -</polymer-element> diff --git a/third_party/polymer/components/paper-menu-button/.bower.json b/third_party/polymer/components/paper-menu-button/.bower.json deleted file mode 100644 index 4f19c57..0000000 --- a/third_party/polymer/components/paper-menu-button/.bower.json +++ /dev/null @@ -1,28 +0,0 @@ -{ - "name": "paper-menu-button", - "private": true, - "dependencies": { - "polymer": "Polymer/polymer#>=0.3.0 <1.0.0", - "core-animation": "Polymer/core-animation#>=0.3.0 <1.0.0", - "core-icon": "Polymer/core-icon#>=0.3.0 <1.0.0", - "core-icons": "Polymer/core-icons#>=0.3.0 <1.0.0", - "core-menu": "Polymer/core-menu#>=0.3.0 <1.0.0", - "core-overlay": "Polymer/core-overlay#>=0.3.0 <1.0.0", - "core-transition": "Polymer/core-transition#>=0.3.0 <1.0.0", - "paper-focusable": "Polymer/paper-focusable#>=0.3.0 <1.0.0", - "paper-icon-button": "Polymer/paper-icon-button#>=0.3.0 <1.0.0", - "paper-item": "Polymer/paper-item#>=0.3.0 <1.0.0", - "paper-shadow": "Polymer/paper-shadow#>=0.3.0 <1.0.0" - }, - "homepage": "https://github.com/Polymer/paper-menu-button", - "version": "0.3.5", - "_release": "0.3.5", - "_resolution": { - "type": "version", - "tag": "0.3.5", - "commit": "557515cf8419a3f22ded36ada44af9f37e4f1742" - }, - "_source": "git://github.com/Polymer/paper-menu-button.git", - "_target": "0.3.5", - "_originalSource": "Polymer/paper-menu-button" -}
\ No newline at end of file diff --git a/third_party/polymer/components/paper-menu-button/README.md b/third_party/polymer/components/paper-menu-button/README.md deleted file mode 100644 index aa0f3bf..0000000 --- a/third_party/polymer/components/paper-menu-button/README.md +++ /dev/null @@ -1,4 +0,0 @@ -paper-menu-button -================= - -See the [component page](http://www.polymer-project.org/docs/elements/paper-elements.html#paper-menu-button) for more information. diff --git a/third_party/polymer/components/paper-menu-button/bower.json b/third_party/polymer/components/paper-menu-button/bower.json deleted file mode 100644 index 8dfe0ac..0000000 --- a/third_party/polymer/components/paper-menu-button/bower.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "name": "paper-menu-button", - "private": true, - "dependencies": { - "polymer": "Polymer/polymer#>=0.3.0 <1.0.0", - "core-animation": "Polymer/core-animation#>=0.3.0 <1.0.0", - "core-icon": "Polymer/core-icon#>=0.3.0 <1.0.0", - "core-icons": "Polymer/core-icons#>=0.3.0 <1.0.0", - "core-menu": "Polymer/core-menu#>=0.3.0 <1.0.0", - "core-overlay": "Polymer/core-overlay#>=0.3.0 <1.0.0", - "core-transition": "Polymer/core-transition#>=0.3.0 <1.0.0", - "paper-focusable": "Polymer/paper-focusable#>=0.3.0 <1.0.0", - "paper-icon-button": "Polymer/paper-icon-button#>=0.3.0 <1.0.0", - "paper-item": "Polymer/paper-item#>=0.3.0 <1.0.0", - "paper-shadow": "Polymer/paper-shadow#>=0.3.0 <1.0.0" - } -}
\ No newline at end of file diff --git a/third_party/polymer/components/paper-menu-button/demo.html b/third_party/polymer/components/paper-menu-button/demo.html deleted file mode 100644 index ca65df4..0000000 --- a/third_party/polymer/components/paper-menu-button/demo.html +++ /dev/null @@ -1,92 +0,0 @@ -<!doctype html> -<!-- -Copyright 2013 The Polymer Authors. All rights reserved. -Use of this source code is governed by a BSD-style -license that can be found in the LICENSE file. ---> -<html> -<head> - <title>paper-menu-button</title> - <script src="../platform/platform.js"></script> - <link href="../core-icons/core-icons.html" rel="import"> - <link href="../paper-icon-button/paper-icon-button.html" rel="import"> - <link href="../paper-item/paper-item.html" rel="import"> - <link href="../paper-shadow/paper-shadow.html" rel="import"> - <link href="paper-menu-button.html" rel="import"> - <style> - body { - margin: 0; - font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; - font-size: 14px; - background: #f7f7f7; - } - - .card { - background: #fff; - width: 320px; - height: 480px; - margin: 128px 96px; - border-radius: 3px; - } - - .toolbar { - background: #91a7ff; - position: relative; - padding: 0.5em; - border-radius: 3px 3px 0 0; - } - - .inner { - position: absolute; - top: 0; - left: 0; - bottom: 0; - right: 0; - z-index: -1; - } - - body /deep/ core-icon { - fill: #fff; - } - - body /deep/ paper-item::shadow core-icon { - fill: #000; - } - - core-icon { - fill: #fff; - } - - paper-item core-icon { - fill: #000; - } - - </style> -</head> -<body unresolved> - - <paper-shadow></paper-shadow> - - <div class="card paper-shadow-top-z-1"> - <div class="inner paper-shadow-bottom-z-1"></div> - <div layout horizontal class="toolbar paper-shadow-top-z-1"> - <div class="inner paper-shadow-bottom-z-1"></div> - <paper-menu-button icon="menu" halign="left"> - <paper-item label="Menu Item 1"></paper-item> - <paper-item label="Menu Item 2"></paper-item> - <paper-item label="Menu Item 3"></paper-item> - </paper-menu-button> - <div flex></div> - <paper-icon-button icon="search"></paper-icon-button> - <paper-menu-button icon="more-vert" halign="right" slow> - <paper-item label="Refresh"></paper-item> - <paper-item label="Send Feedback"></paper-item> - <paper-item label="Settings"></paper-item> - <paper-item label="Help"></paper-item> - <paper-item label="Sign Out"></paper-item> - </paper-menu-button> - </div> - </div> - -</body> -</html> diff --git a/third_party/polymer/components/paper-menu-button/index.html b/third_party/polymer/components/paper-menu-button/index.html deleted file mode 100644 index f83dd36..0000000 --- a/third_party/polymer/components/paper-menu-button/index.html +++ /dev/null @@ -1,22 +0,0 @@ -<!doctype html> -<!-- -Copyright (c) 2014 The Polymer Project Authors. All rights reserved. -This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE -The complete set of authors may be found at http://polymer.github.io/AUTHORS -The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS -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 ---> -<html> -<head> - - <script src="../platform/platform.js"></script> - <link rel="import" href="../core-component-page/core-component-page.html"> - -</head> -<body unresolved> - - <core-component-page sources="['paper-menu-button.html','paper-menu-button-overlay.html']"></core-component-page> - -</body> -</html> diff --git a/third_party/polymer/components/paper-menu-button/metadata.html b/third_party/polymer/components/paper-menu-button/metadata.html deleted file mode 100644 index f9db2d6..0000000 --- a/third_party/polymer/components/paper-menu-button/metadata.html +++ /dev/null @@ -1,12 +0,0 @@ -<x-meta id="paper-menu-button" label="Menu Button" isContainer> - <template> - <paper-menu-button icon="menu"> - <div>Menu Item 1</div> - <div>Menu Item 2</div> - <div>Menu Item 3</div> - </paper-menu-button> - </template> - <template id="imports"> - <link rel="import" href="paper-menu-button.html"> - </template> -</x-meta>
\ No newline at end of file diff --git a/third_party/polymer/components/paper-menu-button/paper-menu-button-overlay.html b/third_party/polymer/components/paper-menu-button/paper-menu-button-overlay.html deleted file mode 100644 index b959136..0000000 --- a/third_party/polymer/components/paper-menu-button/paper-menu-button-overlay.html +++ /dev/null @@ -1,87 +0,0 @@ -<!-- -Copyright (c) 2014 The Polymer Project Authors. All rights reserved. -This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt -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 ---> - -<link rel="import" href="../polymer/polymer.html"> -<link rel="import" href="../core-overlay/core-overlay.html"> - -<!-- - -`paper-menu-button-overlay` is a helper class to position an overlay relative to another -element, e.g. the button with a pulldown menu. - -@group Paper Elements -@element paper-menu-button-overlay -@extends core-overlay -@homepage github.io ---> - -<polymer-element name="paper-menu-button-overlay" extends="core-overlay" attributes="relatedTarget halign valign"> - <script> - Polymer('paper-menu-button-overlay', { - - publish: { - - /** - * The `relatedTarget` is an element used to position the overlay, for example a - * button the user taps to show a menu. - * - * @attribute relatedTarget - * @type Element - */ - relatedTarget: null, - - /** - * The horizontal alignment of the overlay relative to the `relatedTarget`. - * - * @attribute halign - * @type 'left'|'right'|'center' - * @default 'left' - */ - halign: 'left' - - }, - - updateTargetDimensions: function() { - this.super(); - - var t = this.target; - this.target.cachedSize = t.getBoundingClientRect(); - }, - - positionTarget: function() { - if (this.relatedTarget) { - - var rect = this.relatedTarget.getBoundingClientRect(); - - if (this.halign === 'left') { - this.target.style.left = rect.left + 'px'; - } else if (this.halign === 'right') { - this.target.style.right = (window.innerWidth - rect.right) + 'px'; - } else { - this.target.style.left = (rect.left - (rect.width - this.target.cachedSize.width) / 2) + 'px'; - } - - if (this.valign === 'top') { - this.target.style.top = rect.top + 'px'; - } else if (this.valign === 'bottom') { - this.target.style.top = rect.bottom + 'px'; - } else { - this.target.style.top = rect.top + 'px'; - } - - // this.target.style.top = rect.top + 'px'; - - } else { - this.super(); - } - } - - }); - </script> -</polymer-element> diff --git a/third_party/polymer/components/paper-menu-button/paper-menu-button-transition.css b/third_party/polymer/components/paper-menu-button/paper-menu-button-transition.css deleted file mode 100644 index 6d1ba6e..0000000 --- a/third_party/polymer/components/paper-menu-button/paper-menu-button-transition.css +++ /dev/null @@ -1,19 +0,0 @@ -/* Copyright (c) 2014 The Polymer Project Authors. All rights reserved. -This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt -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 */ - -:host(.paper-menu-button-transition) { - outline: none; - opacity: 0; - transition: transform 0.2s ease-in-out, opacity 0.2s ease-in; - -webkit-transition: -webkit-transform 0.2s ease-in-out, opacity 0.2s ease-in; -} - -:host(.paper-menu-button-transition.paper-menu-button-opened) { - opacity: 1; - transform: none; - -webkit-transform: none; -} diff --git a/third_party/polymer/components/paper-menu-button/paper-menu-button-transition.html b/third_party/polymer/components/paper-menu-button/paper-menu-button-transition.html deleted file mode 100644 index 7c6307f..0000000 --- a/third_party/polymer/components/paper-menu-button/paper-menu-button-transition.html +++ /dev/null @@ -1,118 +0,0 @@ -<!-- -Copyright (c) 2014 The Polymer Project Authors. All rights reserved. -This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt -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 ---> -<!-- -@group Paper Elements -@class paper-menu-button-transition -@extends core-transition-css ---> -<link href="../polymer/polymer.html" rel="import"> -<link href="../core-transition/core-transition-css.html" rel="import"> -<link href="../core-animation/web-animations.html" rel="import"> - -<polymer-element name="paper-menu-button-transition" extends="core-transition-css" attributes="duration transformOrigin"> - <template> - <link no-shim href="paper-menu-button-transition.css" rel="stylesheet"> - </template> - <script> - Polymer('paper-menu-button-transition', { - - baseClass: 'paper-menu-button-transition', - revealedClass: 'paper-menu-button-revealed', - openedClass: 'paper-menu-button-opened', - closedClass: 'paper-menu-button-closed', - - duration: 500, - - setup: function(node) { - this.super(arguments); - - var bg = node.querySelector('.paper-menu-button-overlay-bg'); - bg.style.transformOrigin = this.transformOrigin; - bg.style.webkitTransformOrigin = this.transformOrigin; - }, - - transitionOpened: function(node, opened) { - this.super(arguments); - - if (opened) { - if (this.player) { - this.player.cancel(); - } - - var anims = []; - - var ink = node.querySelector('.paper-menu-button-overlay-ink'); - var offset = 40 / Math.max(node.cachedSize.width, node.cachedSize.height); - anims.push(new Animation(ink, [{ - 'opacity': 0.9, - 'transform': 'scale(0)', - }, { - 'opacity': 0.9, - 'transform': 'scale(1)' - }], { - duration: this.duration * offset - })); - - var bg = node.querySelector('.paper-menu-button-overlay-bg'); - anims.push(new Animation(bg, [{ - 'opacity': 0.9, - 'transform': 'scale(' + 40 / node.cachedSize.width + ',' + 40 / node.cachedSize.height + ')', - }, { - 'opacity': 1, - 'transform': 'scale(0.95, 0.5)' - }, { - 'opacity': 1, - 'transform': 'scale(1, 1)' - }], { - delay: this.duration * offset, - duration: this.duration * (1 - offset), - fill: 'forwards' - })); - - var nodes = window.ShadowDOMPolyfill ? Platform.queryAllShadows(node.querySelector('core-menu'), 'content').getDistributedNodes() : node.querySelector('core-menu::shadow content').getDistributedNodes().array(); - var items = nodes.filter(function(n) { - return n.nodeType === Node.ELEMENT_NODE; - }); - var itemDelay = offset + (1 - offset) / 2; - var itemDuration = this.duration * (1 - itemDelay) / items.length; - items.forEach(function(item, i) { - anims.push(new Animation(item, [{ - 'opacity': 0 - }, { - 'opacity': 1 - }], { - delay: this.duration * itemDelay + itemDuration * i, - duration: itemDuration, - fill: 'both' - })); - }.bind(this)); - - var shadow = node.querySelector('paper-shadow'); - anims.push(new Animation(shadow, function(t, target) { - if (t > offset * 2 && shadow.z === 0) { - shadow.z = 1 - } - }, { - duration: this.duration - })); - - var group = new AnimationGroup(anims, { - easing: 'cubic-bezier(0.4, 0, 0.2, 1)' - }); - this.player = document.timeline.play(group); - } - }, - - }); - </script> -</polymer-element> - -<paper-menu-button-transition id="paper-menu-button-transition-top-left" transformOrigin="0% 0%"></paper-menu-button-transition> -<paper-menu-button-transition id="paper-menu-button-transition-top-right" transformOrigin="100% 0%"></paper-menu-button-transition> -<paper-menu-button-transition id="paper-menu-button-transition-top-right-slow" transformOrigin="100% 0%" duration="10000"></paper-menu-button-transition> diff --git a/third_party/polymer/components/paper-menu-button/paper-menu-button.css b/third_party/polymer/components/paper-menu-button/paper-menu-button.css deleted file mode 100644 index 62971c7..0000000 --- a/third_party/polymer/components/paper-menu-button/paper-menu-button.css +++ /dev/null @@ -1,86 +0,0 @@ -/* -Copyright 2013 The Polymer Authors. All rights reserved. -Use of this source code is governed by a BSD-style -license that can be found in the LICENSE file. -*/ - -:host { - display: inline-block; - padding: 8px; - position: relative; - background-image: none; - outline: none; - user-select: none; - -webkit-user-select: none; - cursor: pointer; - overflow: hidden; -} - -:host([disabled]) { - cursor: auto; -} - -core-icon { - position: relative; -} - -core-icon::shadow svg { - transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1); - -webkit-transition: -webkit-transform 0.2s cubic-bezier(0.4, 0, 0.2, 1); - transform-origin: 50% 50%; - -webkit-transform-origin: 50% 50%; -} - -:host(:hover) core-icon::shadow svg { - transform: scale(1.2); - -webkit-transform: scale(1.2); -} - -:host([disabled]:hover) core-icon::shadow svg { - transform: none; - -webkit-transform: none; -} - -:host([disabled]) core-icon::shadow path { - fill: #c9c9c9; -} - -#overlay { - display: block; - position: fixed; - border-radius: 3px; -} - -.paper-menu-button-overlay-ink { - position: absolute; - top: 0; - left: 0; - width: 40px; - height: 40px; - border-radius: 20px; - background: #fff; - opacity: 0; - transform: scale(0); - -webkit-transform: scale(0); -} - -:host([halign="right"]) .paper-menu-button-overlay-ink { - left: auto; - right: 0; -} - -.paper-menu-button-overlay-bg { - position: absolute; - top: 0; - left: 0; - bottom: 0; - right: 0; - border-radius: 3px; - background: #fff; - opacity: 0; -} - -#menu { - position: relative; - margin: 0; -} diff --git a/third_party/polymer/components/paper-menu-button/paper-menu-button.html b/third_party/polymer/components/paper-menu-button/paper-menu-button.html deleted file mode 100644 index 73c5101..0000000 --- a/third_party/polymer/components/paper-menu-button/paper-menu-button.html +++ /dev/null @@ -1,128 +0,0 @@ -<!-- -Copyright (c) 2014 The Polymer Project Authors. All rights reserved. -This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt -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 ---> -<!-- -A `paper-menu-button` is a `paper-icon-button` that opens a drop down menu when tapped. - -Example: - - <paper-menu-button icon="menu"> - <div>Menu Item 1</div> - <div>Menu Item 2</div> - <div>Menu Item 3</div> - </paper-menu-button> - - @group Paper Elements - @element paper-menu-button - @extends paper-focusable ---> -<link href="../polymer/polymer.html" rel="import"> -<link href="../core-icon/core-icon.html" rel="import"> -<link href="../core-menu/core-menu.html" rel="import"> -<link href="../paper-focusable/paper-focusable.html" rel="import"> -<link href="../paper-shadow/paper-shadow.html" rel="import"> -<link href="paper-menu-button-overlay.html" rel="import"> -<link href="paper-menu-button-transition.html" rel="import"> - -<polymer-element name="paper-menu-button-overlay-container" noscript> -<template> - <content></content> -</template> -</polymer-element> - -<polymer-element name="paper-menu-button" extends="paper-focusable" attributes="src icon opened halign valign slow" on-tap="{{tapAction}}"> - <template> - <link rel="stylesheet" href="paper-menu-button.css"> - <paper-menu-button-overlay target="{{$.overlay}}" relatedTarget="{{}}" halign="{{halign}}" valign="{{valign}}" opened="{{opened}}" transition="paper-menu-button-transition-top-{{halign}}{{slow ? '-slow' : ''}}"></paper-menu-button-overlay> - <paper-menu-button-overlay-container id="overlay"> - <paper-shadow target="{{$.overlayBg}}" z="0" hasPosition></paper-shadow> - <div class="paper-menu-button-overlay-ink"></div> - <div id="overlayBg" class="paper-menu-button-overlay-bg"></div> - <core-menu id="menu"> - <content></content> - </core-menu> - </paper-menu-button-overlay-container> - <core-icon src="{{src}}" icon="{{icon}}"></core-icon> - </template> - <script> - Polymer('paper-menu-button', { - - publish: { - - /** - * If true, this menu is currently visible. - * - * @attribute opened - * @type boolean - * @default false - */ - opened: { value: false, reflect: true }, - - /** - * The horizontal alignment of the pulldown menu relative to the button. - * - * @attribute halign - * @type 'left' | 'right' - * @default 'left' - */ - halign: { value: 'left', reflect: true }, - - /** - * The vertical alignment of the pulldown menu relative to the button. - * - * @attribute valign - * @type 'bottom' | 'top' - * @default 'top' - */ - valign: {value: 'top', reflect: true} - }, - - /** - * The URL of an image for the icon. Should not use `icon` property - * if you are using this property. - * - * @attribute src - * @type string - * @default '' - */ - src: '', - - /** - * Specifies the icon name or index in the set of icons available in - * the icon set. Should not use `src` property if you are using this - * property. - * - * @attribute icon - * @type string - * @default '' - */ - icon: '', - - slow: false, - - tapAction: function() { - if (this.disabled) { - return; - } - - this.super(); - this.toggle(); - }, - - /** - * Toggle the opened state of the menu. - * - * @method toggle - */ - toggle: function() { - this.opened = !this.opened; - } - - }); - </script> -</polymer-element> diff --git a/third_party/polymer/components/paper-progress/.bower.json b/third_party/polymer/components/paper-progress/.bower.json deleted file mode 100644 index b87b3e8..0000000 --- a/third_party/polymer/components/paper-progress/.bower.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "name": "paper-progress", - "private": true, - "dependencies": { - "core-range": "Polymer/core-range#>=0.3.0 <1.0.0", - "paper-button": "Polymer/paper-button#>=0.3.0 <1.0.0" - }, - "homepage": "https://github.com/Polymer/paper-progress", - "version": "0.3.5", - "_release": "0.3.5", - "_resolution": { - "type": "version", - "tag": "0.3.5", - "commit": "33d780253eb4d3ba916cfd4b27f614228ef5e0fb" - }, - "_source": "git://github.com/Polymer/paper-progress.git", - "_target": "0.3.5", - "_originalSource": "Polymer/paper-progress" -}
\ No newline at end of file diff --git a/third_party/polymer/components/paper-progress/README.md b/third_party/polymer/components/paper-progress/README.md deleted file mode 100644 index 549e768..0000000 --- a/third_party/polymer/components/paper-progress/README.md +++ /dev/null @@ -1,4 +0,0 @@ -paper-progress -=================== - -See the [component page](http://www.polymer-project.org/docs/elements/paper-elements.html#paper-progress) for more information. diff --git a/third_party/polymer/components/paper-progress/bower.json b/third_party/polymer/components/paper-progress/bower.json deleted file mode 100644 index 3d1ab87..0000000 --- a/third_party/polymer/components/paper-progress/bower.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "name": "paper-progress", - "private": true, - "dependencies": { - "core-range": "Polymer/core-range#>=0.3.0 <1.0.0", - "paper-button": "Polymer/paper-button#>=0.3.0 <1.0.0" - } -}
\ No newline at end of file diff --git a/third_party/polymer/components/paper-progress/demo.html b/third_party/polymer/components/paper-progress/demo.html deleted file mode 100644 index 7a17bea..0000000 --- a/third_party/polymer/components/paper-progress/demo.html +++ /dev/null @@ -1,98 +0,0 @@ -<!doctype html> -<html> -<head> - <title>paper-progress</title> - - <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0"> - <meta name="mobile-web-app-capable" content="yes"> - <meta name="apple-mobile-web-app-capable" content="yes"> - - <script src="../platform/platform.js"></script> - - <link rel="import" href="paper-progress.html"> - <link rel="import" href="../paper-button/paper-button.html"> - - <style shim-shadowdom> - - body { - font-family: RobotoDraft, 'Helvetica Neue', Helvetica, Arial; - margin: 0; - padding: 24px; - } - - paper-progress { - display: block; - width: 100%; - padding: 25px 0; - } - - paper-progress.pink::shadow #activeProgress { - background-color: #e91e63; - } - - paper-progress.pink::shadow #secondaryProgress { - background-color: #f8bbd0; - } - - </style> - -</head> -<body unresolved> - - <paper-progress></paper-progress> - - <paper-button raisedButton label="Start" onclick="startProgress();"></paper-button> - - <br><br><br> - - <paper-progress value="40"></paper-progress><br> - - <paper-progress value="800" min="100" max="1000"></paper-progress><br> - - <paper-progress value="40" secondaryProgress="80"></paper-progress><br> - - <paper-progress value="200" max="200"></paper-progress><br> - - <paper-progress class="pink" value="80"></paper-progress><br> - - <paper-progress class="pink" value="40" secondaryProgress="80"></paper-progress> - - <script> - - var progress = document.querySelector('paper-progress'); - var button = document.querySelector('paper-button'); - - var repeat, maxRepeat = 5, animating = false; - - function nextProgress() { - animating = true; - if (progress.value < progress.max) { - progress.value += (progress.step || 1); - } else { - if (++repeat >= maxRepeat) { - animating = false; - button.disabled = false; - return; - } - progress.value = progress.min; - } - progress.async(nextProgress); - } - - function startProgress() { - repeat = 0; - progress.value = progress.min; - button.disabled = true; - if (!animating) { - nextProgress(); - } - } - - addEventListener('polymer-ready', function() { - startProgress(); - }); - - </script> - -</body> -</html> diff --git a/third_party/polymer/components/paper-progress/index.html b/third_party/polymer/components/paper-progress/index.html deleted file mode 100644 index 58856f3..0000000 --- a/third_party/polymer/components/paper-progress/index.html +++ /dev/null @@ -1,22 +0,0 @@ -<!doctype html> -<!-- -Copyright (c) 2014 The Polymer Project Authors. All rights reserved. -This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE -The complete set of authors may be found at http://polymer.github.io/AUTHORS -The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS -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 ---> -<html> -<head> - - <script src="../platform/platform.js"></script> - <link rel="import" href="../core-component-page/core-component-page.html"> - -</head> -<body unresolved> - - <core-component-page></core-component-page> - -</body> -</html> diff --git a/third_party/polymer/components/paper-progress/metadata.html b/third_party/polymer/components/paper-progress/metadata.html deleted file mode 100644 index 95148c7..0000000 --- a/third_party/polymer/components/paper-progress/metadata.html +++ /dev/null @@ -1,8 +0,0 @@ -<x-meta id="paper-progress" label="Progress" group="Paper"> - <template> - <paper-progress></paper-progress> - </template> - <template id="imports"> - <link rel="import" href="paper-progress.html"> - </template> -</x-meta> diff --git a/third_party/polymer/components/paper-progress/paper-progress.css b/third_party/polymer/components/paper-progress/paper-progress.css deleted file mode 100644 index 7c03daa..0000000 --- a/third_party/polymer/components/paper-progress/paper-progress.css +++ /dev/null @@ -1,35 +0,0 @@ -/* -Copyright (c) 2014 The Polymer Project Authors. All rights reserved. -This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt -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 -*/ - -:host { - display: inline-block; - width: 200px; - height: 4px; -} - -#progressContainer { - position: relative; - height: 100%; - background-color: #c8c8c8; -} - -#activeProgress, #secondaryProgress { - position: absolute; - top: 0; - left: 0; - bottom: 0; -} - -#activeProgress { - background-color: #0f9d58; -} - -#secondaryProgress { - background-color: #87ceac; -}
\ No newline at end of file diff --git a/third_party/polymer/components/paper-progress/paper-progress.html b/third_party/polymer/components/paper-progress/paper-progress.html deleted file mode 100644 index 74c171a..0000000 --- a/third_party/polymer/components/paper-progress/paper-progress.html +++ /dev/null @@ -1,98 +0,0 @@ -<!-- -Copyright (c) 2014 The Polymer Project Authors. All rights reserved. -This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt -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 ---> - -<!-- -The progress bars are for situations where the percentage completed can be -determined. They give users a quick sense of how much longer an operation -will take. - -Example: - - <paper-progress value="10"></paper-progress> - -There is also a secondary progress which is useful for displaying intermediate -progress, such as the buffer level during a streaming playback progress bar. - -Example: - - <paper-progress value="10" secondaryProgesss="30"></paper-progress> - -Styling progress bar: - -To change the active progress bar color: - - paper-progress::shadow #activeProgress { - background-color: #e91e63; - } - -To change the secondary progress bar color: - - paper-progress::shadow #secondaryProgress { - background-color: #f8bbd0; - } - -To change the progress bar background color: - - paper-progress::shadow #progressContainer { - background-color: #64ffda; - } - -@group Paper Elements -@element paper-progress -@extends core-range -@homepage github.io ---> - -<link rel="import" href="../core-range/core-range.html"> - -<polymer-element name="paper-progress" extends="core-range" attributes="secondaryProgress"> - - <template> - - <link rel="stylesheet" href="paper-progress.css"> - - <div id="progressContainer" role="progressbar" aria-valuenow="{{value}}" aria-valuemin="{{min}}" aria-valuemax="{{max}}"> - - <div id="secondaryProgress" style="width: {{secondaryRatio}}%;"></div> - <div id="activeProgress" style="width: {{ratio}}%;"></div> - - </div> - - </template> - - <script> - - Polymer('paper-progress', { - - /** - * The number that represents the current secondary progress. - * - * @attribute secondaryProgress - * @type number - * @default 0 - */ - secondaryProgress: 0, - - step: 0, - - observe: { - 'value secondaryProgress min max': 'update' - }, - - update: function() { - this.super(); - this.secondaryProgress = this.clampValue(this.secondaryProgress); - this.secondaryRatio = this.calcRatio(this.secondaryProgress) * 100; - } - - }); - - </script> - -</polymer-element> diff --git a/third_party/polymer/components/paper-radio-button/.bower.json b/third_party/polymer/components/paper-radio-button/.bower.json deleted file mode 100644 index c4afd55..0000000 --- a/third_party/polymer/components/paper-radio-button/.bower.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "name": "paper-radio-button", - "private": true, - "dependencies": { - "paper-ripple": "Polymer/paper-ripple#>=0.3.0 <1.0.0" - }, - "homepage": "https://github.com/Polymer/paper-radio-button", - "version": "0.3.5", - "_release": "0.3.5", - "_resolution": { - "type": "version", - "tag": "0.3.5", - "commit": "bc1a5899421351b4c4a5d3b1296951c09de5cca8" - }, - "_source": "git://github.com/Polymer/paper-radio-button.git", - "_target": "0.3.5", - "_originalSource": "Polymer/paper-radio-button" -}
\ No newline at end of file diff --git a/third_party/polymer/components/paper-radio-button/README.md b/third_party/polymer/components/paper-radio-button/README.md deleted file mode 100644 index 79b1009c..0000000 --- a/third_party/polymer/components/paper-radio-button/README.md +++ /dev/null @@ -1,4 +0,0 @@ -paper-radio-button -=================== - -See the [component page](http://www.polymer-project.org/docs/elements/paper-elements.html#paper-radio-button) for more information. diff --git a/third_party/polymer/components/paper-radio-button/bower.json b/third_party/polymer/components/paper-radio-button/bower.json deleted file mode 100644 index 0aaca42..0000000 --- a/third_party/polymer/components/paper-radio-button/bower.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "name": "paper-radio-button", - "private": true, - "dependencies": { - "paper-ripple": "Polymer/paper-ripple#>=0.3.0 <1.0.0" - } -}
\ No newline at end of file diff --git a/third_party/polymer/components/paper-radio-button/demo.html b/third_party/polymer/components/paper-radio-button/demo.html deleted file mode 100644 index 837a88e..0000000 --- a/third_party/polymer/components/paper-radio-button/demo.html +++ /dev/null @@ -1,66 +0,0 @@ -<!doctype html> -<html> -<head> - <title>paper-radio-button</title> - - <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0"> - <meta name="mobile-web-app-capable" content="yes"> - <meta name="apple-mobile-web-app-capable" content="yes"> - - <script src="../platform/platform.js"></script> - - <link rel="import" href="paper-radio-button.html"> - - <style shim-shadowdom> - - body { - font-family: RobotoDraft, 'Helvetica Neue', Helvetica, Arial; - margin: 0; - -webkit-user-select: none; - -moz-user-select: none; - -ms-user-select: none; - user-select: none; - -webkit-tap-highlight-color: rgba(0,0,0,0); - -webkit-touch-callout: none; - } - - .label { - height: 40px; - color: #4285f4; - font-size: 20px; - } - - section, paper-radio-button { - padding: 20px; - } - - paper-radio-button.blue::shadow #ink[checked] { - color: #4285f4; - } - - paper-radio-button.blue::shadow #onRadio { - background-color: #4285f4; - } - - </style> - -</head> -<body unresolved> - - <section> - <div class="label">Radio button</div> - <paper-radio-button></paper-radio-button> - </section> - - <section> - <div class="label">Radio button (toggles)</div> - <paper-radio-button toggles></paper-radio-button> - </section> - - <section> - <div class="label">Radio button (toggles, Blue)</div> - <paper-radio-button class="blue" toggles></paper-radio-button> - </section> - -</body> -</html> diff --git a/third_party/polymer/components/paper-radio-button/index.html b/third_party/polymer/components/paper-radio-button/index.html deleted file mode 100644 index 58856f3..0000000 --- a/third_party/polymer/components/paper-radio-button/index.html +++ /dev/null @@ -1,22 +0,0 @@ -<!doctype html> -<!-- -Copyright (c) 2014 The Polymer Project Authors. All rights reserved. -This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE -The complete set of authors may be found at http://polymer.github.io/AUTHORS -The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS -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 ---> -<html> -<head> - - <script src="../platform/platform.js"></script> - <link rel="import" href="../core-component-page/core-component-page.html"> - -</head> -<body unresolved> - - <core-component-page></core-component-page> - -</body> -</html> diff --git a/third_party/polymer/components/paper-radio-button/metadata.html b/third_party/polymer/components/paper-radio-button/metadata.html deleted file mode 100644 index 4c92b3e..0000000 --- a/third_party/polymer/components/paper-radio-button/metadata.html +++ /dev/null @@ -1,8 +0,0 @@ -<x-meta id="paper-radio-button" label="Radio Button" group="Paper"> - <template> - <paper-radio-button label="Radio Button"></paper-radio-button><br> - </template> - <template id="imports"> - <link rel="import" href="paper-radio-button.html"> - </template> -</x-meta> diff --git a/third_party/polymer/components/paper-radio-button/paper-radio-button.css b/third_party/polymer/components/paper-radio-button/paper-radio-button.css deleted file mode 100644 index 9f91f08..0000000 --- a/third_party/polymer/components/paper-radio-button/paper-radio-button.css +++ /dev/null @@ -1,98 +0,0 @@ -/* -Copyright (c) 2014 The Polymer Project Authors. All rights reserved. -This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt -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 -*/ - -:host { - display: inline-block; - white-space: nowrap; -} - -:host(:focus) { - outline: none; -} - -#radioContainer { - position: relative; - width: 16px; - height: 16px; - cursor: pointer; -} - -#radioContainer.labeled { - display: inline-block; - vertical-align: middle; -} - -#ink { - position: absolute; - top: -16px; - left: -16px; - width: 48px; - height: 48px; - color: #5a5a5a; -} - -#ink[checked] { - color: #0f9d58; -} - -#offRadio { - position: absolute; - top: 0px; - left: 0px; - width: 12px; - height: 12px; - border-radius: 50%; - border: solid 2px; - border-color: #5a5a5a; -} - -#onRadio { - position: absolute; - top: 0; - left: 0; - width: 16px; - height: 16px; - border-radius: 50%; - background-color: #0f9d58; - -webkit-transform: scale(0); - transform: scale(0); - transition: -webkit-transform ease 0.28s; - transition: transform ease 0.28s; -} - -#onRadio.fill { - -webkit-transform: scale(1.1); - transform: scale(1.1); -} - -#radioLabel { - position: relative; - display: inline-block; - vertical-align: middle; - margin-left: 10px; - white-space: normal; - pointer-events: none; -} - -#radioLabel[hidden] { - display: none; -} - -/* disabled state */ -:host([disabled]) { - pointer-events: none; -} - -:host([disabled]) #offRadio { - border-color: #eaeaea !important; -} - -:host([disabled]) #onRadio { - background-color: #eaeaea !important; -} diff --git a/third_party/polymer/components/paper-radio-button/paper-radio-button.html b/third_party/polymer/components/paper-radio-button/paper-radio-button.html deleted file mode 100644 index 9ececf9..0000000 --- a/third_party/polymer/components/paper-radio-button/paper-radio-button.html +++ /dev/null @@ -1,148 +0,0 @@ -<!-- -Copyright (c) 2014 The Polymer Project Authors. All rights reserved. -This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt -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 ---> - -<!-- -`paper-radio-button` is a button that can be either checked or unchecked. -User can tap the radio button to check it. But it cannot be unchecked by -tapping once checked. - -Use `paper-radio-group` to group a set of radio buttons. When radio buttons -are inside a radio group, only one radio button in the group can be checked. - -Example: - - <paper-radio-button></paper-radio-button> - -Styling radio button: - -To change the ink color for checked state: - - paper-radio-button::shadow #ink[checked] { - color: #4285f4; - } - -To change the radio checked color: - - paper-radio-button::shadow #onRadio { - background-color: #4285f4; - } - -To change the ink color for unchecked state: - - paper-radio-button::shadow #ink { - color: #b5b5b5; - } - -To change the radio unchecked color: - - paper-radio-button::shadow #offRadio { - border-color: #b5b5b5; - } - -@group Paper Elements -@element paper-radio-button -@homepage github.io ---> - -<link rel="import" href="../paper-ripple/paper-ripple.html"> - -<polymer-element name="paper-radio-button" role="radio" tabindex="0" aria-checked="false"> -<template> - - <link rel="stylesheet" href="paper-radio-button.css"> - - <div id="radioContainer" class="{{ {labeled: label} | tokenList }}"> - - <div id="offRadio"></div> - <div id="onRadio"></div> - - <paper-ripple id="ink" class="circle recenteringTouch" checked?="{{!checked}}"></paper-ripple> - - </div> - - <div id="radioLabel" aria-hidden="true" hidden?="{{!label}}">{{label}}<content></content></div> - -</template> -<script> - - Polymer('paper-radio-button', { - - /** - * Fired when the checked state changes. - * - * @event change - */ - - publish: { - /** - * Gets or sets the state, `true` is checked and `false` is unchecked. - * - * @attribute checked - * @type boolean - * @default false - */ - checked: {value: false, reflect: true}, - - /** - * The label for the radio button. - * - * @attribute label - * @type string - * @default '' - */ - label: '', - - /** - * Normally the user cannot uncheck the radio button by tapping once - * checked. Setting this property to `true` makes the radio button - * toggleable from checked to unchecked. - * - * @attribute toggles - * @type boolean - * @default false - */ - toggles: false, - - /** - * If true, the user cannot interact with this element. - * - * @attribute disabled - * @type boolean - * @default false - */ - disabled: {value: false, reflect: true} - }, - - eventDelegates: { - tap: 'tap' - }, - - tap: function() { - this.toggle(); - this.fire('paper-radio-button-activate'); - }, - - toggle: function() { - this.checked = !this.toggles || !this.checked; - }, - - checkedChanged: function() { - this.$.onRadio.classList.toggle('fill', this.checked); - this.setAttribute('aria-checked', this.checked ? 'true': 'false'); - this.fire('change'); - }, - - labelChanged: function() { - this.setAttribute('aria-label', this.label); - } - - }); - -</script> -</polymer-element> diff --git a/third_party/polymer/components/paper-radio-group/.bower.json b/third_party/polymer/components/paper-radio-group/.bower.json deleted file mode 100644 index e04aecd..0000000 --- a/third_party/polymer/components/paper-radio-group/.bower.json +++ /dev/null @@ -1,20 +0,0 @@ -{ - "name": "paper-radio-group", - "private": true, - "dependencies": { - "core-selector": "Polymer/core-selector#>=0.3.0 <1.0.0", - "font-roboto": "Polymer/font-roboto#>=0.3.0 <1.0.0", - "paper-radio-button": "Polymer/paper-radio-button#>=0.3.0 <1.0.0" - }, - "homepage": "https://github.com/Polymer/paper-radio-group", - "version": "0.3.5", - "_release": "0.3.5", - "_resolution": { - "type": "version", - "tag": "0.3.5", - "commit": "a825edbfcd397ea04b4921eb4636f8e697b8cb4b" - }, - "_source": "git://github.com/Polymer/paper-radio-group.git", - "_target": "0.3.5", - "_originalSource": "Polymer/paper-radio-group" -}
\ No newline at end of file diff --git a/third_party/polymer/components/paper-radio-group/README.md b/third_party/polymer/components/paper-radio-group/README.md deleted file mode 100644 index 1024a7b..0000000 --- a/third_party/polymer/components/paper-radio-group/README.md +++ /dev/null @@ -1,4 +0,0 @@ -paper-radio-group -================= - -See the [component page](http://www.polymer-project.org/docs/elements/paper-elements.html#paper-radio-group) for more information. diff --git a/third_party/polymer/components/paper-radio-group/bower.json b/third_party/polymer/components/paper-radio-group/bower.json deleted file mode 100644 index d0fd455..0000000 --- a/third_party/polymer/components/paper-radio-group/bower.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "name": "paper-radio-group", - "private": true, - "dependencies": { - "core-selector": "Polymer/core-selector#>=0.3.0 <1.0.0", - "font-roboto": "Polymer/font-roboto#>=0.3.0 <1.0.0", - "paper-radio-button": "Polymer/paper-radio-button#>=0.3.0 <1.0.0" - } -}
\ No newline at end of file diff --git a/third_party/polymer/components/paper-radio-group/demo.html b/third_party/polymer/components/paper-radio-group/demo.html deleted file mode 100644 index 07625e5..0000000 --- a/third_party/polymer/components/paper-radio-group/demo.html +++ /dev/null @@ -1,74 +0,0 @@ -<!doctype html> -<html> -<head> - <title>paper-radio-group</title> - - <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0"> - <meta name="mobile-web-app-capable" content="yes"> - <meta name="apple-mobile-web-app-capable" content="yes"> - - <script src="../platform/platform.js"></script> - - <link rel="import" href="paper-radio-group.html"> - <link rel="import" href="../font-roboto/roboto.html"> - - <style shim-shadowdom> - - body { - font-family: RobotoDraft, 'Helvetica Neue', Helvetica, Arial; - margin: 0; - padding: 24px; - -webkit-user-select: none; - -moz-user-select: none; - -ms-user-select: none; - user-select: none; - -webkit-tap-highlight-color: rgba(0,0,0,0); - -webkit-touch-callout: none; - } - - section { - xpadding: 20px; - xbackground-color: #f0f0f0; - } - - paper-radio-group.blue paper-radio-button::shadow #ink[checked] { - color: #4285f4; - } - - paper-radio-group.blue paper-radio-button::shadow #onRadio { - background-color: #4285f4; - } - - </style> - -</head> -<body unresolved> - - <section> - - <h4>Keep Wi-Fi on during sleep</h4> - - <paper-radio-group selected="2"> - <paper-radio-button label="Always"></paper-radio-button><br> - <paper-radio-button label="Only when plugged in"></paper-radio-button><br> - <paper-radio-button label="Never"></paper-radio-button> - </paper-radio-group> - - </section> - - <br> - - <section> - - <h4>Wi-Fi frequency band</h4> - - <paper-radio-group class="blue" selected="0"> - <paper-radio-button label="Auto"></paper-radio-button><br> - <paper-radio-button label="5 GHz only"></paper-radio-button><br> - <paper-radio-button label="2.4 GHz only"></paper-radio-button> - </paper-radio-group> - - </section> - -</body> -</html> diff --git a/third_party/polymer/components/paper-radio-group/index.html b/third_party/polymer/components/paper-radio-group/index.html deleted file mode 100644 index 58856f3..0000000 --- a/third_party/polymer/components/paper-radio-group/index.html +++ /dev/null @@ -1,22 +0,0 @@ -<!doctype html> -<!-- -Copyright (c) 2014 The Polymer Project Authors. All rights reserved. -This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE -The complete set of authors may be found at http://polymer.github.io/AUTHORS -The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS -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 ---> -<html> -<head> - - <script src="../platform/platform.js"></script> - <link rel="import" href="../core-component-page/core-component-page.html"> - -</head> -<body unresolved> - - <core-component-page></core-component-page> - -</body> -</html> diff --git a/third_party/polymer/components/paper-radio-group/metadata.html b/third_party/polymer/components/paper-radio-group/metadata.html deleted file mode 100644 index 590071c..0000000 --- a/third_party/polymer/components/paper-radio-group/metadata.html +++ /dev/null @@ -1,13 +0,0 @@ -<x-meta id="paper-radio-group" label="Radio Group" isContainer group="Paper"> - <template> - <paper-radio-group selected="Small" valueattr="label"> - <paper-radio-button label="Small"></paper-radio-button> - <paper-radio-button label="Medium"></paper-radio-button> - <paper-radio-button label="Large"></paper-radio-button> - </paper-radio-group> - </template> - <template id="imports"> - <link rel="import" href="paper-radio-group.html"> - <link rel="import" href="../paper-radio-button/paper-radio-button.html"> - </template> -</x-meta> diff --git a/third_party/polymer/components/paper-radio-group/paper-radio-group.html b/third_party/polymer/components/paper-radio-group/paper-radio-group.html deleted file mode 100644 index 1a7d007..0000000 --- a/third_party/polymer/components/paper-radio-group/paper-radio-group.html +++ /dev/null @@ -1,68 +0,0 @@ -<!-- -Copyright (c) 2014 The Polymer Project Authors. All rights reserved. -This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt -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 ---> - -<!-- -`paper-radio-group` allows user to select only one radio button from a set. -Checking one radio button that belongs to a radio group unchecks any -previously checked radio button within the same group. Use -`selected` to get or set the selected radio button. - -Example: - - <paper-radio-group selected="small"> - <paper-radio-button name="small" label="Small"></paper-radio-button> - <paper-radio-button name="medium" label="Medium"></paper-radio-button> - <paper-radio-button name="large" label="Large"></paper-radio-button> - </paper-radio-group> - -See <a href="../paper-radio-button/">paper-radio-button</a> for more -information about `paper-radio-button`. - -@group Paper Elements -@element paper-radio-group -@extends core-selector -@homepage github.io ---> - -<link rel="import" href="../core-selector/core-selector.html"> -<link rel="import" href="../paper-radio-button/paper-radio-button.html"> - -<polymer-element name="paper-radio-group" extends="core-selector" role="radiogroup"> - - <template> - - <style> - - :host { - display: inline-block; - } - - polyfill-next-selector { content: ':host > *'; } - ::content > * { - padding: 12px; - } - - </style> - - <shadow></shadow> - - </template> - - <script> - - Polymer('paper-radio-group', { - - selectedAttribute: 'checked', - activateEvent: 'paper-radio-button-activate' - - }); - - </script> - -</polymer-element> diff --git a/third_party/polymer/components/paper-ripple/.bower.json b/third_party/polymer/components/paper-ripple/.bower.json deleted file mode 100644 index 6e3121b..0000000 --- a/third_party/polymer/components/paper-ripple/.bower.json +++ /dev/null @@ -1,20 +0,0 @@ -{ - "name": "paper-ripple", - "private": true, - "dependencies": { - "core-icon": "Polymer/core-icon#>=0.3.0 <1.0.0", - "core-icons": "Polymer/core-icons#>=0.3.0 <1.0.0", - "font-roboto": "Polymer/font-roboto#>=0.3.0 <1.0.0" - }, - "homepage": "https://github.com/Polymer/paper-ripple", - "version": "0.3.5", - "_release": "0.3.5", - "_resolution": { - "type": "version", - "tag": "0.3.5", - "commit": "1f1773cf275eec867a04e1f8a5ea6f97e4648dbd" - }, - "_source": "git://github.com/Polymer/paper-ripple.git", - "_target": "0.3.5", - "_originalSource": "Polymer/paper-ripple" -}
\ No newline at end of file diff --git a/third_party/polymer/components/paper-ripple/README.md b/third_party/polymer/components/paper-ripple/README.md deleted file mode 100644 index a4ca437..0000000 --- a/third_party/polymer/components/paper-ripple/README.md +++ /dev/null @@ -1,4 +0,0 @@ -paper-ripple -============ - -See the [component page](http://www.polymer-project.org/docs/elements/paper-elements.html#paper-ripple) for more information. diff --git a/third_party/polymer/components/paper-ripple/bower.json b/third_party/polymer/components/paper-ripple/bower.json deleted file mode 100644 index 590723f..0000000 --- a/third_party/polymer/components/paper-ripple/bower.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "name": "paper-ripple", - "private": true, - "dependencies": { - "core-icon": "Polymer/core-icon#>=0.3.0 <1.0.0", - "core-icons": "Polymer/core-icons#>=0.3.0 <1.0.0", - "font-roboto": "Polymer/font-roboto#>=0.3.0 <1.0.0" - } -}
\ No newline at end of file diff --git a/third_party/polymer/components/paper-ripple/demo.html b/third_party/polymer/components/paper-ripple/demo.html deleted file mode 100644 index baef84f..0000000 --- a/third_party/polymer/components/paper-ripple/demo.html +++ /dev/null @@ -1,409 +0,0 @@ -<!doctype html> -<html> -<head> - <title>paper-ripple</title> - - <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0"> - <meta name="mobile-web-app-capable" content="yes"> - <meta name="apple-mobile-web-app-capable" content="yes"> - - <script src="../platform/platform.js"></script> - - <link rel="import" href="../core-icons/core-icons.html"> - <link rel="import" href="paper-ripple.html"> - <link rel="import" href="../font-roboto/roboto.html"> - <link rel="import" href="../core-icon/core-icon.html"> - - <style shim-shadowdom> - - body { - background-color: #f9f9f9; - font-family: RobotoDraft, 'Helvetica Neue', Helvetica, Arial; - -webkit-user-select: none; - -moz-user-select: none; - -ms-user-select: none; - user-select: none; - -webkit-tap-highlight-color: rgba(0,0,0,0); - -webkit-touch-callout: none; - } - - section { - padding: 30px 25px; - } - - section > * { - margin: 10px - } - - /* Button */ - .button { - display: inline-block; - position: relative; - width: 120px; - height: 32px; - line-height: 32px; - border-radius: 2px; - font-size: 0.9em; - background-color: #fff; - color: #646464; - } - - .button > paper-ripple { - border-radius: 2px; - overflow: hidden; - } - - .button.narrow { - width: 60px; - } - - .button.grey { - background-color: #eee; - } - - .button.blue { - background-color: #4285f4; - color: #fff; - } - - .button.green { - background-color: #0f9d58; - color: #fff; - } - - .button.raised { - transition: box-shadow 0.2s cubic-bezier(0.4, 0, 0.2, 1); - transition-delay: 0.2s; - box-shadow: 0 2px 5px 0 rgba(0, 0, 0, 0.26); - } - - .button.raised:active { - box-shadow: 0 8px 17px 0 rgba(0, 0, 0, 0.2); - transition-delay: 0s; - } - - /* Icon Button */ - .icon-button { - position: relative; - display: inline-block; - width: 56px; - height: 56px; - } - - .icon-button > core-icon { - margin: 16px; - transition: -webkit-transform 0.2s cubic-bezier(0.4, 0, 0.2, 1); - transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1); - } - - .icon-button:hover > core-icon { - -webkit-transform: scale(1.2); - transform: scale(1.2); - } - - .icon-button > paper-ripple { - overflow: hidden; - color: #646464; - } - - .icon-button.red > core-icon::shadow path { - fill: #db4437; - } - - .icon-button.red > paper-ripple { - color: #db4437; - } - - .icon-button.blue > core-icon::shadow path { - fill: #4285f4; - } - - .icon-button.blue > paper-ripple { - color: #4285f4; - } - - /* FAB */ - .fab { - position: relative; - display: inline-block; - width: 56px; - height: 56px; - border-radius: 50%; - color: #fff; - overflow: hidden; - transition: box-shadow 0.2s cubic-bezier(0.4, 0, 0.2, 1); - transition-delay: 0.2s; - box-shadow: 0 2px 5px 0 rgba(0, 0, 0, 0.26); - } - - .fab.red { - background-color: #d23f31; - } - - .fab.blue { - background-color: #4285f4; - } - - .fab.green { - background-color: #0f9d58; - } - - .fab:active { - box-shadow: 0 8px 17px 0 rgba(0, 0, 0, 0.2); - transition-delay: 0s; - } - - .fab > core-icon { - margin: 16px; - } - - .fab > core-icon::shadow path { - fill: #fff; - } - - /* Menu */ - .menu { - display: inline-block; - width: 180px; - background-color: #fff; - box-shadow: 0 8px 17px 0 rgba(0, 0, 0, 0.2); - } - - .item { - position: relative; - height: 48px; - line-height: 48px; - color: #646464; - font-size: 0.9em; - } - - .menu.blue > .item { - color: #4285f4; - } - - /* Card, Dialog */ - .card, .dialog { - position: relative; - display: inline-block; - width: 300px; - height: 240px; - vertical-align: top; - background-color: #fff; - box-shadow: 0 12px 15px 0 rgba(0, 0, 0, 0.24); - } - - .dialog { - box-sizing: border-box; - padding: 16px; - } - - .dialog > .content { - height: 170px; - font-size: 0.9em; - } - - .dialog > .content > .title { - font-size: 1.3em; - } - - .dialog > .button { - width: 90px; - float: right; - } - - .card.image { - background: url(http://lorempixel.com/300/240/nature/); - color: #fff; - } - - /* Misc */ - .center { - text-align: center; - } - - .label { - padding: 0 16px; - } - - .label-blue { - color: #4285f4; - } - - .label-red { - color: #d23f31; - } - - </style> - -</head> -<body unresolved> - - <section> - - <div class="button raised"> - <div class="center" fit>SUBMIT</div> - <paper-ripple fit></paper-ripple> - </div> - - <div class="button raised grey"> - <div class="center" fit>CANCEL</div> - <paper-ripple fit></paper-ripple> - </div> - - <div class="button raised blue"> - <div class="center" fit>COMPOSE</div> - <paper-ripple fit></paper-ripple> - </div> - - <div class="button raised green"> - <div class="center" fit>OK</div> - <paper-ripple fit></paper-ripple> - </div> - - </section> - - <section> - - <div class="button raised grey narrow"> - <div class="center" fit>+1</div> - <paper-ripple fit></paper-ripple> - </div> - - <div class="button raised grey narrow label-blue"> - <div class="center" fit>+1</div> - <paper-ripple fit></paper-ripple> - </div> - - <div class="button raised grey narrow label-red"> - <div class="center" fit>+1</div> - <paper-ripple fit></paper-ripple> - </div> - - </section> - - <section> - - <div class="icon-button"> - <core-icon icon="menu"></core-icon> - <paper-ripple class="circle recenteringTouch" fit></paper-ripple> - </div> - - <div class="icon-button"> - <core-icon icon="more-vert"></core-icon> - <paper-ripple class="circle recenteringTouch" fit></paper-ripple> - </div> - - <div class="icon-button red"> - <core-icon icon="delete"></core-icon> - <paper-ripple class="circle recenteringTouch" fit></paper-ripple> - </div> - - <div class="icon-button blue"> - <core-icon icon="account-box"></core-icon> - <paper-ripple class="circle recenteringTouch" fit></paper-ripple> - </div> - - </section> - - <section> - - <div class="fab red"> - <core-icon icon="add"></core-icon> - <paper-ripple class="circle recenteringTouch" fit></paper-ripple> - </div> - - <div class="fab blue"> - <core-icon icon="mail"></core-icon> - <paper-ripple class="circle recenteringTouch" fit></paper-ripple> - </div> - - <div class="fab green"> - <core-icon icon="create"></core-icon> - <paper-ripple class="circle recenteringTouch" fit></paper-ripple> - </div> - - </section> - - <section> - - <div class="menu"> - - <div class="item"> - <div class="label" fit>Mark as unread</div> - <paper-ripple fit></paper-ripple> - </div> - <div class="item"> - <div class="label" fit>Mark as important</div> - <paper-ripple fit></paper-ripple> - </div> - <div class="item"> - <div class="label" fit>Add to Tasks</div> - <paper-ripple fit></paper-ripple> - </div> - <div class="item"> - <div class="label" fit>Create event</div> - <paper-ripple fit></paper-ripple> - </div> - - </div> - - <div class="menu blue"> - - <div class="item"> - <div class="label" fit>Import</div> - <paper-ripple fit></paper-ripple> - </div> - <div class="item"> - <div class="label" fit>Export</div> - <paper-ripple fit></paper-ripple> - </div> - <div class="item"> - <div class="label" fit>Print</div> - <paper-ripple fit></paper-ripple> - </div> - <div class="item"> - <div class="label" fit>Restore contacts</div> - <paper-ripple fit></paper-ripple> - </div> - - </div> - - </section> - - <section> - - <div class="dialog"> - - <div class="content"> - <div class="title">Permission</div><br> - <div>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam.</div> - </div> - - <div class="button label-blue"> - <div class="center" fit>ACCEPT</div> - <paper-ripple fit></paper-ripple> - </div> - - <div class="button"> - <div class="center" fit>DECLINE</div> - <paper-ripple fit></paper-ripple> - </div> - - </div> - - <div class="card"> - - <paper-ripple class="recenteringTouch" fit></paper-ripple> - - </div> - - <div class="card image"> - - <paper-ripple class="recenteringTouch" fit></paper-ripple> - - </div> - - </section> - -</body> -</html> diff --git a/third_party/polymer/components/paper-ripple/index.html b/third_party/polymer/components/paper-ripple/index.html deleted file mode 100644 index 58856f3..0000000 --- a/third_party/polymer/components/paper-ripple/index.html +++ /dev/null @@ -1,22 +0,0 @@ -<!doctype html> -<!-- -Copyright (c) 2014 The Polymer Project Authors. All rights reserved. -This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE -The complete set of authors may be found at http://polymer.github.io/AUTHORS -The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS -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 ---> -<html> -<head> - - <script src="../platform/platform.js"></script> - <link rel="import" href="../core-component-page/core-component-page.html"> - -</head> -<body unresolved> - - <core-component-page></core-component-page> - -</body> -</html> diff --git a/third_party/polymer/components/paper-ripple/metadata.html b/third_party/polymer/components/paper-ripple/metadata.html deleted file mode 100644 index 565ad23..0000000 --- a/third_party/polymer/components/paper-ripple/metadata.html +++ /dev/null @@ -1,11 +0,0 @@ -<x-meta id="paper-ripple" label="Ripple" group="Paper"> - - <template> - <paper-ripple style="width: 300px; height: 300px;"></paper-ripple> - </template> - - <template id="imports"> - <link rel="import" href="paper-ripple.html"> - </template> - -</x-meta> diff --git a/third_party/polymer/components/paper-ripple/paper-ripple.html b/third_party/polymer/components/paper-ripple/paper-ripple.html deleted file mode 100644 index 96026d4..0000000 --- a/third_party/polymer/components/paper-ripple/paper-ripple.html +++ /dev/null @@ -1,427 +0,0 @@ -<!-- -Copyright (c) 2014 The Polymer Project Authors. All rights reserved. -This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt -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 ---> - -<!-- -`paper-ripple` provides a visual effect that other paper elements can -use to simulate a rippling effect emanating from the point of contact. The -effect can be visualized as a concentric circle with motion. - -Example: - - <paper-ripple></paper-ripple> - -`paper-ripple` listens to "down" and "up" events so it would display ripple -effect when touches on it. You can also defeat the default behavior and -manually route the down and up actions to the ripple element. Note that it is -important if you call downAction() you will have to make sure to call upAction() -so that `paper-ripple` would end the animation loop. - -Example: - - <paper-ripple id="ripple" style="pointer-events: none;"></paper-ripple> - ... - downAction: function(e) { - this.$.ripple.downAction({x: e.x, y: e.y}); - }, - upAction: function(e) { - this.$.ripple.upAction(); - } - -Styling ripple effect: - - Use CSS color property to style the ripple: - - paper-ripple { - color: #4285f4; - } - - Note that CSS color property is inherited so it is not required to set it on - the `paper-ripple` element directly. - -Apply `recenteringTouch` class to make the recentering rippling effect. - - <paper-ripple class="recenteringTouch"></paper-ripple> - -Apply `circle` class to make the rippling effect within a circle. - - <paper-ripple class="circle"></paper-ripple> - -@group Paper Elements -@element paper-ripple -@homepage github.io ---> - -<link rel="import" href="../polymer/polymer.html" > - -<polymer-element name="paper-ripple" attributes="initialOpacity opacityDecayVelocity"> -<template> - - <style> - - :host { - display: block; - position: relative; - } - - #canvas { - pointer-events: none; - position: absolute; - top: 0; - left: 0; - width: 100%; - height: 100%; - } - - :host(.circle) #canvas { - border-radius: 50%; - } - - </style> - -</template> -<script> - - (function() { - - var waveMaxRadius = 150; - // - // INK EQUATIONS - // - function waveRadiusFn(touchDownMs, touchUpMs, anim) { - // Convert from ms to s. - var touchDown = touchDownMs / 1000; - var touchUp = touchUpMs / 1000; - var totalElapsed = touchDown + touchUp; - var ww = anim.width, hh = anim.height; - // use diagonal size of container to avoid floating point math sadness - var waveRadius = Math.min(Math.sqrt(ww * ww + hh * hh), waveMaxRadius) * 1.1 + 5; - var duration = 1.1 - .2 * (waveRadius / waveMaxRadius); - var tt = (totalElapsed / duration); - - var size = waveRadius * (1 - Math.pow(80, -tt)); - return Math.abs(size); - } - - function waveOpacityFn(td, tu, anim) { - // Convert from ms to s. - var touchDown = td / 1000; - var touchUp = tu / 1000; - var totalElapsed = touchDown + touchUp; - - if (tu <= 0) { // before touch up - return anim.initialOpacity; - } - return Math.max(0, anim.initialOpacity - touchUp * anim.opacityDecayVelocity); - } - - function waveOuterOpacityFn(td, tu, anim) { - // Convert from ms to s. - var touchDown = td / 1000; - var touchUp = tu / 1000; - - // Linear increase in background opacity, capped at the opacity - // of the wavefront (waveOpacity). - var outerOpacity = touchDown * 0.3; - var waveOpacity = waveOpacityFn(td, tu, anim); - return Math.max(0, Math.min(outerOpacity, waveOpacity)); - } - - // Determines whether the wave should be completely removed. - function waveDidFinish(wave, radius, anim) { - var waveOpacity = waveOpacityFn(wave.tDown, wave.tUp, anim); - // If the wave opacity is 0 and the radius exceeds the bounds - // of the element, then this is finished. - if (waveOpacity < 0.01 && radius >= Math.min(wave.maxRadius, waveMaxRadius)) { - return true; - } - return false; - }; - - function waveAtMaximum(wave, radius, anim) { - var waveOpacity = waveOpacityFn(wave.tDown, wave.tUp, anim); - if (waveOpacity >= anim.initialOpacity && radius >= Math.min(wave.maxRadius, waveMaxRadius)) { - return true; - } - return false; - } - - // - // DRAWING - // - function drawRipple(ctx, x, y, radius, innerColor, outerColor) { - if (outerColor) { - ctx.fillStyle = outerColor; - ctx.fillRect(0,0,ctx.canvas.width, ctx.canvas.height); - } - ctx.beginPath(); - ctx.arc(x, y, radius, 0, 2 * Math.PI, false); - ctx.fillStyle = innerColor; - ctx.fill(); - } - - // - // SETUP - // - function createWave(elem) { - var elementStyle = window.getComputedStyle(elem); - var fgColor = elementStyle.color; - - var wave = { - waveColor: fgColor, - maxRadius: 0, - isMouseDown: false, - mouseDownStart: 0.0, - mouseUpStart: 0.0, - tDown: 0, - tUp: 0 - }; - return wave; - } - - function removeWaveFromScope(scope, wave) { - if (scope.waves) { - var pos = scope.waves.indexOf(wave); - scope.waves.splice(pos, 1); - } - }; - - // Shortcuts. - var pow = Math.pow; - var now = Date.now; - if (window.performance && performance.now) { - now = performance.now.bind(performance); - } - - function cssColorWithAlpha(cssColor, alpha) { - var parts = cssColor.match(/^rgb\((\d+),\s*(\d+),\s*(\d+)\)$/); - if (typeof alpha == 'undefined') { - alpha = 1; - } - if (!parts) { - return 'rgba(255, 255, 255, ' + alpha + ')'; - } - return 'rgba(' + parts[1] + ', ' + parts[2] + ', ' + parts[3] + ', ' + alpha + ')'; - } - - function dist(p1, p2) { - return Math.sqrt(pow(p1.x - p2.x, 2) + pow(p1.y - p2.y, 2)); - } - - function distanceFromPointToFurthestCorner(point, size) { - var tl_d = dist(point, {x: 0, y: 0}); - var tr_d = dist(point, {x: size.w, y: 0}); - var bl_d = dist(point, {x: 0, y: size.h}); - var br_d = dist(point, {x: size.w, y: size.h}); - return Math.max(tl_d, tr_d, bl_d, br_d); - } - - Polymer('paper-ripple', { - - /** - * The initial opacity set on the wave. - * - * @attribute initialOpacity - * @type number - * @default 0.25 - */ - initialOpacity: 0.25, - - /** - * How fast (opacity per second) the wave fades out. - * - * @attribute opacityDecayVelocity - * @type number - * @default 0.8 - */ - opacityDecayVelocity: 0.8, - - backgroundFill: true, - pixelDensity: 2, - - eventDelegates: { - down: 'downAction', - up: 'upAction' - }, - - attached: function() { - // create the canvas element manually becase ios - // does not render the canvas element if it is not created in the - // main document (component templates are created in a - // different document). See: - // https://bugs.webkit.org/show_bug.cgi?id=109073. - if (!this.$.canvas) { - var canvas = document.createElement('canvas'); - canvas.id = 'canvas'; - this.shadowRoot.appendChild(canvas); - this.$.canvas = canvas; - } - }, - - ready: function() { - this.waves = []; - }, - - setupCanvas: function() { - this.$.canvas.setAttribute('width', this.$.canvas.clientWidth * this.pixelDensity + "px"); - this.$.canvas.setAttribute('height', this.$.canvas.clientHeight * this.pixelDensity + "px"); - var ctx = this.$.canvas.getContext('2d'); - ctx.scale(this.pixelDensity, this.pixelDensity); - if (!this._loop) { - this._loop = this.animate.bind(this, ctx); - } - }, - - downAction: function(e) { - this.setupCanvas(); - var wave = createWave(this.$.canvas); - - this.cancelled = false; - wave.isMouseDown = true; - wave.tDown = 0.0; - wave.tUp = 0.0; - wave.mouseUpStart = 0.0; - wave.mouseDownStart = now(); - - var width = this.$.canvas.width / 2; // Retina canvas - var height = this.$.canvas.height / 2; - var rect = this.getBoundingClientRect(); - var touchX = e.x - rect.left; - var touchY = e.y - rect.top; - - wave.startPosition = {x:touchX, y:touchY}; - - if (this.classList.contains("recenteringTouch")) { - wave.endPosition = {x: width / 2, y: height / 2}; - wave.slideDistance = dist(wave.startPosition, wave.endPosition); - } - wave.containerSize = Math.max(width, height); - wave.maxRadius = distanceFromPointToFurthestCorner(wave.startPosition, {w: width, h: height}); - this.waves.push(wave); - requestAnimationFrame(this._loop); - }, - - upAction: function() { - for (var i = 0; i < this.waves.length; i++) { - // Declare the next wave that has mouse down to be mouse'ed up. - var wave = this.waves[i]; - if (wave.isMouseDown) { - wave.isMouseDown = false - wave.mouseUpStart = now(); - wave.mouseDownStart = 0; - wave.tUp = 0.0; - break; - } - } - this._loop && requestAnimationFrame(this._loop); - }, - - cancel: function() { - this.cancelled = true; - }, - - animate: function(ctx) { - var shouldRenderNextFrame = false; - - // Clear the canvas - ctx.clearRect(0, 0, ctx.canvas.width, ctx.canvas.height); - - var deleteTheseWaves = []; - // The oldest wave's touch down duration - var longestTouchDownDuration = 0; - var longestTouchUpDuration = 0; - // Save the last known wave color - var lastWaveColor = null; - // wave animation values - var anim = { - initialOpacity: this.initialOpacity, - opacityDecayVelocity: this.opacityDecayVelocity, - height: ctx.canvas.height, - width: ctx.canvas.width - } - - for (var i = 0; i < this.waves.length; i++) { - var wave = this.waves[i]; - - if (wave.mouseDownStart > 0) { - wave.tDown = now() - wave.mouseDownStart; - } - if (wave.mouseUpStart > 0) { - wave.tUp = now() - wave.mouseUpStart; - } - - // Determine how long the touch has been up or down. - var tUp = wave.tUp; - var tDown = wave.tDown; - longestTouchDownDuration = Math.max(longestTouchDownDuration, tDown); - longestTouchUpDuration = Math.max(longestTouchUpDuration, tUp); - - // Obtain the instantenous size and alpha of the ripple. - var radius = waveRadiusFn(tDown, tUp, anim); - var waveAlpha = waveOpacityFn(tDown, tUp, anim); - var waveColor = cssColorWithAlpha(wave.waveColor, waveAlpha); - lastWaveColor = wave.waveColor; - - // Position of the ripple. - var x = wave.startPosition.x; - var y = wave.startPosition.y; - - // Ripple gravitational pull to the center of the canvas. - if (wave.endPosition) { - - // This translates from the origin to the center of the view based on the max dimension of - var translateFraction = Math.min(1, radius / wave.containerSize * 2 / Math.sqrt(2) ); - - x += translateFraction * (wave.endPosition.x - wave.startPosition.x); - y += translateFraction * (wave.endPosition.y - wave.startPosition.y); - } - - // If we do a background fill fade too, work out the correct color. - var bgFillColor = null; - if (this.backgroundFill) { - var bgFillAlpha = waveOuterOpacityFn(tDown, tUp, anim); - bgFillColor = cssColorWithAlpha(wave.waveColor, bgFillAlpha); - } - - // Draw the ripple. - drawRipple(ctx, x, y, radius, waveColor, bgFillColor); - - // Determine whether there is any more rendering to be done. - var maximumWave = waveAtMaximum(wave, radius, anim); - var waveDissipated = waveDidFinish(wave, radius, anim); - var shouldKeepWave = !waveDissipated || maximumWave; - var shouldRenderWaveAgain = !waveDissipated && !maximumWave; - shouldRenderNextFrame = shouldRenderNextFrame || shouldRenderWaveAgain; - if (!shouldKeepWave || this.cancelled) { - deleteTheseWaves.push(wave); - } - } - - if (shouldRenderNextFrame) { - requestAnimationFrame(this._loop); - } - - for (var i = 0; i < deleteTheseWaves.length; ++i) { - var wave = deleteTheseWaves[i]; - removeWaveFromScope(this, wave); - } - - if (!this.waves.length) { - // If there is nothing to draw, clear any drawn waves now because - // we're not going to get another requestAnimationFrame any more. - ctx.clearRect(0, 0, ctx.canvas.width, ctx.canvas.height); - this._loop = null; - } - } - - }); - - })(); - -</script> -</polymer-element> diff --git a/third_party/polymer/components/paper-ripple/raw.html b/third_party/polymer/components/paper-ripple/raw.html deleted file mode 100644 index 85b465d..0000000 --- a/third_party/polymer/components/paper-ripple/raw.html +++ /dev/null @@ -1,790 +0,0 @@ -<html> -<head> - <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> -<script> - -// -// INK EQUATIONS -// - -// Animation constants. -var globalSpeed = 1; -var waveOpacityDecayVelocity = 0.8 / globalSpeed; // opacity per second. -var waveInitialOpacity = 0.25; -var waveLingerOnTouchUp = 0.2; -var waveMaxRadius = 150; - -// TODOs: -// - rather than max distance to corner, use hypotenuos(sp) (diag) -// - use quadratic for the fall off, move fast at the beginning, -// - on cancel, immediately fade out, reverse the direction - -function waveRadiusFn(touchDownMs, touchUpMs, ww, hh) { - // Convert from ms to s. - var touchDown = touchDownMs / 1000; - var touchUp = touchUpMs / 1000; - var totalElapsed = touchDown + touchUp; - var waveRadius = Math.min(Math.max(ww, hh), waveMaxRadius) * 1.1 + 5; - var dduration = 1.1 - .2 * (waveRadius / waveMaxRadius); - var tt = (totalElapsed / dduration); - - var ssize = waveRadius * (1 - Math.pow(80, -tt)); - return Math.abs(ssize); -} - -function waveOpacityFn(td, tu) { - // Convert from ms to s. - var touchDown = td / 1000; - var touchUp = tu / 1000; - var totalElapsed = touchDown + touchUp; - - if (tu <= 0) { // before touch up - return waveInitialOpacity; - } - return Math.max(0, waveInitialOpacity - touchUp * waveOpacityDecayVelocity); -} - -function waveOuterOpacityFn(td, tu) { - // Convert from ms to s. - var touchDown = td / 1000; - var touchUp = tu / 1000; - - // Linear increase in background opacity, capped at the opacity - // of the wavefront (waveOpacity). - var outerOpacity = touchDown * 0.3; - var waveOpacity = waveOpacityFn(td, tu); - return Math.max(0, Math.min(outerOpacity, waveOpacity)); - -} - -function waveGravityToCenterPercentageFn(td, tu, r) { - // Convert from ms to s. - var touchDown = td / 1000; - var touchUp = tu / 1000; - var totalElapsed = touchDown + touchUp; - - return Math.min(1.0, touchUp * 6); -} - - -// Determines whether the wave should be completely removed. -function waveDidFinish(wave, radius) { - var waveOpacity = waveOpacityFn(wave.tDown, wave.tUp); - // Does not linger any more. - // var lingerTimeMs = waveLingerOnTouchUp * 1000; - - // If the wave opacity is 0 and the radius exceeds the bounds - // of the element, then this is finished. - if (waveOpacity < 0.01 && radius >= wave.maxRadius) { - return true; - } - return false; -}; - -// -// DRAWING -// - -function animateIcon() { - var el = document.getElementById('button_toolbar0'); - el.classList.add('animate'); - setTimeout(function(){ - el.classList.remove('animate'); - el.classList.toggle('selected'); - }, 500); -} - - -function drawRipple(canvas, x, y, radius, innerColor, outerColor, innerColorAlpha, outerColorAlpha) { - var ctx = canvas.getContext('2d'); - if (outerColor) { - ctx.fillStyle = outerColor; - ctx.fillRect(0,0,canvas.width, canvas.height); - } - - ctx.beginPath(); - ctx.arc(x, y, radius, 0, 2 * Math.PI, false); - ctx.fillStyle = innerColor; - ctx.fill(); -} - -function drawLabel(canvas, label, fontSize, color, alignment) { - var ctx = canvas.getContext('2d'); - ctx.font= fontSize + 'px Helvetica'; - - var metrics = ctx.measureText(label); - var width = metrics.width; - var height = metrics.height; - ctx.fillStyle = color; - - var xPos = (canvas.width/2 - width)/2; - - if (alignment === 'left') { xPos = 16; } - - ctx.fillText(label, xPos, canvas.height/2 - (canvas.height/2 - fontSize +2) / 2); -} - -// -// BUTTON SETUP -// - -function createWave(elem) { - var elementStyle = window.getComputedStyle(elem); - var fgColor = elementStyle.color; - - var wave = { - waveColor: fgColor, - maxRadius: 0, - isMouseDown: false, - mouseDownStart: 0.0, - mouseUpStart: 0.0, - tDown: 0, - tUp: 0 - }; - return wave; -} - -function removeWaveFromScope(scope, wave) { - if (scope.waves) { - var pos = scope.waves.indexOf(wave); - scope.waves.splice(pos, 1); - } -}; - - -function setUpPaperByClass( classname ) { - var elems = document.querySelectorAll( classname ); - [].forEach.call( elems, function( el ) { - setUpPaper(el); - }); -} - -function setUpPaper(elem) { - var pixelDensity = 2; - - var elementStyle = window.getComputedStyle(elem); - var fgColor = elementStyle.color; - var bgColor = elementStyle.backgroundColor; - elem.width = elem.clientWidth; - elem.setAttribute('width', elem.clientWidth * pixelDensity + "px"); - elem.setAttribute('height', elem.clientHeight * pixelDensity + "px"); - - var isButton = elem.classList.contains( 'button' ) || elem.classList.contains( 'button_floating' ) | elem.classList.contains( 'button_menu' ); - var isToolbarButton = elem.classList.contains( 'button_toolbar' ); - - elem.getContext('2d').scale(pixelDensity, pixelDensity) - - var scope = { - backgroundFill: true, - element: elem, - label: 'Button', - waves: [], - }; - - - scope.label = elem.getAttribute('value') || elementStyle.content; - scope.labelFontSize = elementStyle.fontSize.split("px")[0]; - - drawLabel(elem, scope.label, scope.labelFontSize, fgColor, elem.style.textAlign); - - - // - // RENDER FOR EACH FRAME - // - var onFrame = function() { - var shouldRenderNextFrame = false; - - // Clear the canvas - var ctx = elem.getContext('2d'); - ctx.clearRect(0, 0, elem.width, elem.height); - - var deleteTheseWaves = []; - // The oldest wave's touch down duration - var longestTouchDownDuration = 0; - var longestTouchUpDuration = 0; - // Save the last known wave color - var lastWaveColor = null; - - for (var i = 0; i < scope.waves.length; i++) { - var wave = scope.waves[i]; - - if (wave.mouseDownStart > 0) { - wave.tDown = now() - wave.mouseDownStart; - } - if (wave.mouseUpStart > 0) { - wave.tUp = now() - wave.mouseUpStart; - } - - // Determine how long the touch has been up or down. - var tUp = wave.tUp; - var tDown = wave.tDown; - longestTouchDownDuration = Math.max(longestTouchDownDuration, tDown); - longestTouchUpDuration = Math.max(longestTouchUpDuration, tUp); - - // Obtain the instantenous size and alpha of the ripple. - var radius = waveRadiusFn(tDown, tUp, elem.width, elem.height); - var waveAlpha = waveOpacityFn(tDown, tUp); - var waveColor = cssColorWithAlpha(wave.waveColor, waveAlpha); - lastWaveColor = wave.waveColor; - - // Position of the ripple. - var x = wave.startPosition.x; - var y = wave.startPosition.y; - - // Ripple gravitational pull to the center of the canvas. - if (wave.endPosition) { - - var translateFraction = waveGravityToCenterPercentageFn(tDown, tUp, wave.maxRadius); - - // This translates from the origin to the center of the view based on the max dimension of - var translateFraction = Math.min(1, radius / wave.containerSize * 2 / Math.sqrt(2) ); - - x += translateFraction * (wave.endPosition.x - wave.startPosition.x); - y += translateFraction * (wave.endPosition.y - wave.startPosition.y); - } - - // If we do a background fill fade too, work out the correct color. - var bgFillColor = null; - if (scope.backgroundFill) { - var bgFillAlpha = waveOuterOpacityFn(tDown, tUp); - bgFillColor = cssColorWithAlpha(wave.waveColor, bgFillAlpha); - } - - // Draw the ripple. - drawRipple(elem, x, y, radius, waveColor, bgFillColor); - - // Determine whether there is any more rendering to be done. - var shouldRenderWaveAgain = !waveDidFinish(wave, radius); - shouldRenderNextFrame = shouldRenderNextFrame || shouldRenderWaveAgain; - if (!shouldRenderWaveAgain) { - deleteTheseWaves.push(wave); - } - } - - if (shouldRenderNextFrame) { - window.requestAnimationFrame(onFrame); - } else { - // If there is nothing to draw, clear any drawn waves now because - // we're not going to get another requestAnimationFrame any more. - var ctx = elem.getContext('2d'); - ctx.clearRect(0, 0, elem.width, elem.height); - } - - // Draw the label at the very last point so it is on top of everything. - drawLabel(elem, scope.label, scope.labelFontSize, fgColor, elem.style.textAlign); - - for (var i = 0; i < deleteTheseWaves.length; ++i) { - var wave = deleteTheseWaves[i]; - removeWaveFromScope(scope, wave); - } - }; - - // - // MOUSE DOWN HANDLER - // - - elem.addEventListener('mousedown', function(e) { - var wave = createWave(e.target); - var elem = scope.element; - - wave.isMouseDown = true; - wave.tDown = 0.0; - wave.tUp = 0.0; - wave.mouseUpStart = 0.0; - wave.mouseDownStart = now(); - - var width = e.target.width / 2; // Retina canvas - var height = e.target.height / 2; - var touchX = e.clientX - e.target.offsetLeft - e.target.offsetParent.offsetLeft; - var touchY = e.clientY - e.target.offsetTop - e.target.offsetParent.offsetTop; - wave.startPosition = {x:touchX, y:touchY}; - - if (elem.classList.contains("recenteringTouch")) { - wave.endPosition = {x: width / 2, y: height / 2}; - wave.slideDistance = dist(wave.startPosition, wave.endPosition); - } - wave.containerSize = Math.max(width, height); - wave.maxRadius = distanceFromPointToFurthestCorner(wave.startPosition, {w: width, h: height}); - elem.classList.add("activated"); - scope.waves.push(wave); - window.requestAnimationFrame(onFrame); - return false; - }); - - // - // MOUSE UP HANDLER - // - - elem.addEventListener('mouseup', function(e) { - elem.classList.remove("activated"); - - for (var i = 0; i < scope.waves.length; i++) { - // Declare the next wave that has mouse down to be mouse'ed up. - var wave = scope.waves[i]; - if (wave.isMouseDown) { - wave.isMouseDown = false - wave.mouseUpStart = now(); - wave.mouseDownStart = 0; - wave.tUp = 0.0; - break; - } - } - return false; - }); - - elem.addEventListener('mouseout', function(e) { - elem.classList.remove("activated"); - - for (var i = 0; i < scope.waves.length; i++) { - // Declare the next wave that has mouse down to be mouse'ed up. - var wave = scope.waves[i]; - if (wave.isMouseDown) { - wave.isMouseDown = false - wave.mouseUpStart = now(); - wave.mouseDownStart = 0; - wave.tUp = 0.0; - wave.cancelled = true; - break; - } - } - return false; - }); - - return scope; -}; - -// Shortcuts. -var pow = Math.pow; -var now = function() { return new Date().getTime(); }; - -// Quad beizer where t is between 0 and 1. -function quadBezier(t, p0, p1, p2, p3) { - return pow(1 - t, 3) * p0 + - 3 * pow(1 - t, 2) * t * p1 + - (1 - t) * pow(t, 2) * p2 + - pow(t, 3) * p3; -} - -function easeIn(t) { - return quadBezier(t, 0.4, 0.0, 1, 1); -} - -function cssColorWithAlpha(cssColor, alpha) { - var parts = cssColor.match(/^rgb\((\d+),\s*(\d+),\s*(\d+)\)$/); - if (typeof alpha == 'undefined') { - alpha = 1; - } - if (!parts) { - return 'rgba(255, 255, 255, ' + alpha + ')'; - } - return 'rgba(' + parts[1] + ', ' + parts[2] + ', ' + parts[3] + ', ' + alpha + ')'; -} - -function dist(p1, p2) { - return Math.sqrt(Math.pow(p1.x - p2.x, 2) + Math.pow(p1.y - p2.y, 2)); -} - -function distanceFromPointToFurthestCorner(point, size) { - var tl_d = dist(point, {x: 0, y: 0}); - var tr_d = dist(point, {x: size.w, y: 0}); - var bl_d = dist(point, {x: 0, y: size.h}); - var br_d = dist(point, {x: size.w, y: size.h}); - return Math.max(Math.max(tl_d, tr_d), Math.max(bl_d, br_d)); -} - - -function toggleDialog() { - var el = document.getElementById('dialog'); - el.classList.toggle("visible"); -} - -function toggleMenu() { - var el = document.getElementById('menu'); - el.classList.toggle("visible"); -} - - -// Initialize - -function init() { - setUpPaperByClass( '.paper' ); -} - -window.addEventListener('DOMContentLoaded', init, false); -</script> - -<style type="text/css" media="screen"> - body { - background-color: #f9f9f9; - margin:0; padding:0; - font-family:sans-serif; - font-size:14px; -} - -* { - - -webkit-user-select: none; - cursor:default; -} -.toolbar { - background-color:#673AB7; - height:56px; - overflow:hidden; -} - - -#dialog { - width:250px; - height:120px; - opacity:0.0; - pointer-events:none; - -webkit-transform: scale(0.95) translate3d(0,100px,0);; - -webkit-transition: -webkit-transform 0.3s ease-out, height 0.2s ease-out, opacity 0.2s ease-out, -webkit-box-shadow .5s ease-out; - - -webkit-box-shadow:0 10px 10px rgba(0,0,0,0.12), 0 5px 5px rgba(0,0,0,0.24); - -webkit-transition-delay:0.25s; - -} - -#dialog.visible { - pointer-events:all; - opacity:1.0; - -webkit-transform: scale(1.0) translate3d(0,0,0);; - width:250px; - height:160px; - -webkit-box-shadow:0 19px 19px rgba(0,0,0,0.30), 0 15px 6px rgba(0,0,0,0.22); - -webkit-transition-delay:0.0s; - -} - - -.dialog { - top:120px; - right: 0; - left: 50%; - margin-left:-125px; - padding:24px 16px 20px 24px; - position:absolute; - - background:white; - color:rgba(0,0,0,0.5); - margin-bottom:38px; - overflow:hidden; -} -.dialog h1 { - font-size:20px; - font-weight:normal; - padding:0; margin-top:0; -} - -.dialog .button { - position:absolute; - top:160px; - right:10px; -} - -/*#menu { - width:250px; - height:120px; - opacity:0.0; - pointer-events:none; - -webkit-transform: scale(0.95) translate3d(0,100px,0);; - -webkit-transition: -webkit-transform 0.3s ease-out, height 0.2s ease-out, opacity 0.2s ease-out, -webkit-box-shadow .5s ease-out; - - -webkit-box-shadow:0 10px 10px rgba(0,0,0,0.12), 0 5px 5px rgba(0,0,0,0.24); -} - -#menu.visible { - pointer-events:all; - opacity:1.0; - -webkit-transform: scale(1.0) translate3d(0,0,0);; - width:250px; - height:160px; - -webkit-box-shadow:0 19px 19px rgba(0,0,0,0.30), 0 15px 6px rgba(0,0,0,0.22); -}*/ - - - - -.menu { - width:160px; - height:160px; - background:white; - position:absolute; - right:8px; - top: 8px; - padding:0; - - - opacity:0.0; - pointer-events:none; - -webkit-transform: scale(0.95) translate3d(0,0,0);; - -webkit-transition: -webkit-transform 0.3s ease-out, width 0.2s ease-out, height 0.3s ease-out, opacity 0.1s ease-out, -webkit-box-shadow .5s ease-out; - - -webkit-box-shadow:0 10px 10px rgba(0,0,0,0.12), 0 5px 5px rgba(0,0,0,0.24); - -webkit-transition-delay:0.35s; - overflow:hidden; - - -} - -.menu.visible { - width:180px; - height:192px; - pointer-events:all; - opacity:1.0; - -webkit-transform: scale(1.0) translate3d(0,0,0);; - -webkit-box-shadow:0 10px 10px rgba(0,0,0,0.12), 0 5px 5px rgba(0,0,0,0.24); - -webkit-transition-delay:0.15s; - -} - - - -.menu div { - height:48px; - padding:0; - -} - -.menu canvas { - height:48px; - width: 100%; -} - - -.button_floating { - width:56px; - height:56px; - color:#fff; - background-color:#039BE5; - border-radius:28px; - position:absolute; - top:388px; - right:40px; -} - -.container { -} - - - - -.button { - -webkit-border-radius: 2px; - -moz-border-radius: 2px; - border-radius: 2px; -} - -.button_menu.container { - margin: 0px; - height: 48px; - padding: 0; -} - - - -.button_menu { - -webkit-border-radius: 2px; - -moz-border-radius: 2px; - border-radius: 2px; - text-align:left !important; - color:rgb(100,100,100); -} - -.button_toolbar { - -webkit-border-radius: 84px; - - color: rgb(255,255,255); - width: 80px; - height: 80px; - float:left; - margin-right:-24px; - margin-top:-12px; - background-color: rgba(0, 0, 0, 0); -} - -#button_small { - color: rgb(100, 100, 100); - background-color: #ffffff; - width: 80px; - height: 32px; - -} - -#button_blue { - color: rgb(255, 255, 255); - background-color: #0277BD; - width: 80px; - height: 32px; -} - -#button_borderless_square { - color: #ffffff; - background-color: #f9f9f9; - border: 1px solid #f0f0f0; - width: 100px; - height: 100px; - background-color: rgb(255, 255, 255, 0); - background-image:url(http://wallpaperandbackground.com/wp-content/uploads/2014/03/Field-Landscape.jpg); - background-size:cover; - -} - -#button_borderless { - color: #777777; - background-color: #ffffff; - width:80px; - height: 32px; - margin-right:72px; - content: "CANCEL"; -} - -#button_borderless_blue { - color: #4285F4; - background-color: #ffffff; - width: 64px; - height: 32px; - content:"OK"; -} - -#button_large { - color: rgb(255, 255, 255); - width: 100%; - height: 360px; - background-color:#81D4FA; -} - -#button_toolbar1 { - content: ''; - color:transparent; - margin-left:-4px; - -} - -#button_toolbar2 { - content: '★'; - float:right; -} - -#button_toolbar3 { - content: 'MENU'; - font-size: 14px; - width: 88px; - height:88px; - margin-top: -16px; - color:#7FFFFF; - float:right; - margin-right:0; - -} - -.caption { - z-index: 100; - background-color: red; -} - -#button_toolbar0.animate { - -webkit-animation: play 0.5s steps(16); - -} - - -.button.raised { - -webkit-transition: -webkit-box-shadow 0.2s; - -webkit-transition-delay: 0.2s; - -webkit-box-shadow:0 1px 2px rgba(0,0,0,0.12), 0 1px 1px rgba(0,0,0,0.24); -} - -.button.raised.activated { - -webkit-box-shadow: 0px 10px 10px rgba(0,0,0,0.19), 0px 6px 3px rgba(0,0,0,0.23); - -webkit-transition-delay: 0.0s; -} - - -.floating { - -webkit-transition: -webkit-box-shadow 0.2s; - -webkit-transition-delay: 0.2s; - -webkit-box-shadow:0 3px 3px rgba(0,0,0,0.16), 0 3px 3px rgba(0,0,0,0.23); -} - -.floating.activated { - -webkit-box-shadow: 0px 14px 14px rgba(0,0,0,0.25), 0px 10px 5px rgba(0,0,0,0.22); - -webkit-transition-delay: 0.0s; -} - -#title { - color:white; - font-size:20px; - line-height:58px; - margin-left:24px; -} - -.content { - padding-left:72px; padding-top:24px; padding-right:144px; - line-height:20px; - color:#666; -} - -@-webkit-keyframes play { - from { background-position: 0px 0px; } - to { background-position: 0px -384px; } -} - -#button_toolbar0 { - pointer-events: none; - position:absolute; - top:16px; - left: 24px; - content: "\00a0"; - width:24px; - height:24px; - background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAGACAYAAAC3NaJiAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAAAAAAAAAAB6mUWpAAAABx0RVh0U29mdHdhcmUAQWRvYmUgRmlyZXdvcmtzIENTNui8sowAABabSURBVHic7Z15tCVVdYe/ej2P0M0g8yARVJAGQZnHBuOEiPMQYxBRJBLFmAViiHHGEUcSxRGj0TggRtEIklZBhAUCQUQcgGZuoAd6et2v37tf/tin+p5b7w51X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oq4uL7oC+HtC6VpqHB8WXnSI4VtUu4iKfgDGIo+sMfkRCfD/onOZE4n8mZYAAAAASUVORK5CYII=); -} - -#button_toolbar0.selected { - background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAGACAYAAAC3NaJiAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAAAAAAAAAAB6mUWpAAAABx0RVh0U29mdHdhcmUAQWRvYmUgRmlyZXdvcmtzIENTNui8sowAABjoSURBVHic7Z15nFxVlce/tzrpdGcle4CQhH0PhiVhBBQVJS6oiDijgjgzbiMqo+I4g4rbuIyC4vhxGXc/47gg4DYgjjguCCg7CMRIBMKWECAhSXenO91Vv/njnNvv1qtXVa86AdHp8/m8z6t69e75vXe387vnnPcqSOLxlMrjqv2JAKCTKpJ0jKQ3SprWTmfcSgO48lskbZP0XkkTywCUqiJJxwCfAZYCAZjg+1KFy1z5zTLZJumjO62KxqK8NEBO+YCkD0ua2k55HmBCkxOeBXwSOBSoARcBXwemS9qlhe4qsMH3AARJhJC1l6TnAZ8G9oqHgEeAQVo3bAV4AHgRsC4erLsDv7qzE+W40rktFKdSA7rSA3UAIYTHJJ0HLB7jHawjqZ4GAAe5TNIQWRsIuBz4ELCV1tNLbINMHu9e9KcbBzsC0vFklwMZlPRBSd1lAEpNdiGEq4AzgVuxRh/xfXt50tgDgFqtFiS1veu2c1EzqVQqomzVxDKdnDwWGQfY+QC1Wq2csR8LgKRpIYTXSTq2k0Jlz5st6XyfWW+QdHArnZ3ORXtI+k9J230+WiXpqTsFQNLBkn4sqebKr2mlvCMAScdK+q0rrkm6VNJBJe64NYCkiqQXSfp9MkV/RdJu7ZTnARrmIkmTgb8D3gUswOaeXwDfAHolLcSm6xHMBtftQwh1Rr+OF0nqAd4NnAVE+ytgCzDkioaBAd/6gP7k+3qMU90XAfJ30IXRldS4B2BGmaoBHsIY4KjkeVG/pHOA2cBz/PAwcDdWBVOBiV6uK7ef6Of0NwVwkHskvRH4rIN0ATcC53rh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zKbzsLf67E6H73ZPJPKiF1FgMrswe7yjvChO9eQBqo7ajhe1kpa8KHLTndEGo7zoCc1SG29kGG/kEvL/oJF3+mwaUg7zeMifv0V73AH+D6kiv3uZmfIGAAAAAElFTkSuQmCC); -} -</style> -</head> - -<body id=""> - <div class="toolbar"> - <div id="button_toolbar0" class="toolbar_icon"></div> - <span class="container"><canvas class="paper button_toolbar recenteringTouch" id="button_toolbar1" onclick="animateIcon()"></canvas></span> - <span id="title" style="float:left">Ripple test</span> - <span class="container"><canvas onClick="toggleMenu()" class="paper button_toolbar recenteringTouch" id="button_toolbar3"></canvas></span> - <span class="container"><canvas class="paper button_toolbar recenteringTouch" id="button_toolbar2"></canvas></span> - <span class="container"><canvas class="paper button_toolbar recenteringTouch" id="button_toolbar2"></canvas></span> - -</div> - -<div id="dialog" class="dialog visible"> - <h1>Press mah buttons!</h1> Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam. - <span class="container"><canvas class="paper button" id="button_borderless" value="CANCEL"></canvas></span> - <span class="container"><canvas class="paper button" id="button_borderless_blue" onclick="toggleDialog()" value="OK"></canvas></span> -</div> - -<div id="menu" class="menu visible"> - <div class="container button_menu"><canvas class="paper button_menu" value="Fold" style="text-align:left"></canvas></div> - <div class="container button_menu"><canvas class="paper button_menu" value="Spindle" style="text-align:left"></canvas></div> - <div class="container button_menu"><canvas class="paper button_menu" onClick="" value="Mutilate" style="text-align:left"></canvas></div> - <div class="container button_menu"><canvas class="paper button_menu" onClick="toggleMenu()" value="Dismiss" style="text-align:left"></canvas></div> - -</div> -<div class="container"><canvas class="paper button recenteringTouch" id="button_large"></canvas></div> -<div class="content" style=""> -Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam. sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. -<p></p> -<span class="container" style="margin-right:8px;"><canvas class="paper button raised" id="button_blue" value="ABORT"></canvas></span> -<span class="container" style="margin-right:8px;"><canvas class="paper button raised" id="button_small" value="RETRY"></canvas></span> - <span class="container"><canvas class="paper button raised" id="button_small" value="FAIL"></canvas></span> - - <p><p> -<canvas class="paper button" id="button_borderless_square"></canvas> - - -</div> -<div class="container"><canvas onClick="toggleDialog()" class="paper button_floating floating recenteringTouch" id="button_floating" value="★"></canvas></div> -</body> -</html> diff --git a/third_party/polymer/components/paper-shadow/.bower.json b/third_party/polymer/components/paper-shadow/.bower.json deleted file mode 100644 index 6e07f7a..0000000 --- a/third_party/polymer/components/paper-shadow/.bower.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "name": "paper-shadow", - "private": true, - "dependencies": { - "polymer": "Polymer/polymer#>=0.3.0 <1.0.0" - }, - "homepage": "https://github.com/Polymer/paper-shadow", - "version": "0.3.5", - "_release": "0.3.5", - "_resolution": { - "type": "version", - "tag": "0.3.5", - "commit": "346e641e4d1c69daacba9d41d1d7e8181f01baee" - }, - "_source": "git://github.com/Polymer/paper-shadow.git", - "_target": "0.3.5", - "_originalSource": "Polymer/paper-shadow" -}
\ No newline at end of file diff --git a/third_party/polymer/components/paper-shadow/README.md b/third_party/polymer/components/paper-shadow/README.md deleted file mode 100644 index 87ed91b..0000000 --- a/third_party/polymer/components/paper-shadow/README.md +++ /dev/null @@ -1,4 +0,0 @@ -paper-shadow -============ - -See the [component page](http://polymer-project.org/docs/elements/paper-elements.html#paper-shadow) for more information. diff --git a/third_party/polymer/components/paper-shadow/bower.json b/third_party/polymer/components/paper-shadow/bower.json deleted file mode 100644 index 939c7c5..0000000 --- a/third_party/polymer/components/paper-shadow/bower.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "name": "paper-shadow", - "private": true, - "dependencies": { - "polymer": "Polymer/polymer#>=0.3.0 <1.0.0" - } -}
\ No newline at end of file diff --git a/third_party/polymer/components/paper-shadow/demo.html b/third_party/polymer/components/paper-shadow/demo.html deleted file mode 100644 index 1718ba3..0000000 --- a/third_party/polymer/components/paper-shadow/demo.html +++ /dev/null @@ -1,249 +0,0 @@ -<!doctype html> -<!-- -Copyright 2013 The Polymer Authors. All rights reserved. -Use of this source code is governed by a BSD-style -license that can be found in the LICENSE file. ---> -<html> -<head> - <title>paper-shadow</title> - <meta charset="utf-8"> - <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> - <meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no"> - <script src="../platform/platform.js"></script> - <link href="paper-shadow.html" rel="import"> - <style> - body { - font-family: RobotoDraft, 'Helvetica Neue', Helvetica, Arial; - transform: translateZ(0); - -webkit-transform: translateZ(0); - transform: translateZ(0); - padding: 16px; - user-select: none; - -webkit-user-select: none; - } - - section { - display: flex; - display: -webkit-flex; - width: 80%; - margin: 16px; - } - - aside { - flex: 1 1 auto; - -webkit-flex: 1 1 auto; - padding: 48px 16px; - user-select: text; - -webkit-user-select: text; - } - - .card { - background: white; - width: 300px; - height: 300px; - position: relative; - margin: 16px; - border-radius: 2px; - } - - .card-inner { - position: absolute; - left: 0; - top: 0; - right: 0; - bottom: 0; - border-radius: 2px; - } - - </style> -</head> -<body unresolved> - - <paper-shadow></paper-shadow> - - <section> - <div> - <div class="card"> - </div> - </div> - <aside> - z-depth = 0 - </aside> - </section> - - <section> - <!-- Example of using paper-shadow to add a shadow to an element --> - <div> - <div class="card"> - <paper-shadow z="1"></paper-shadow> - </div> - </div> - <aside> - z-depth = 1 - </aside> - </section> - - <section> - <!-- Example of using paper-shadow as part of a Polymer element --> - <polymer-element name="x-card" attributes="z"> - <template> - <style> - :host { - display: block; - } - </style> - <paper-shadow z="{{z}}"></paper-shadow> - </template> - <script> - Polymer('x-card', { - publish: { - z: {value: 1, reflect: true} - } - }); - </script> - </polymer-element> - <div> - <x-card class="card" z="2"></x-card> - </div> - <aside> - z-depth = 2 - </aside> - </section> - - <section> - <!-- Example of using paper-shadow by adding a class directly --> - <div> - <div class="card paper-shadow-top-z-3"> - <div class="card-inner paper-shadow-bottom-z-3"> - </div> - </div> - </div> - <aside> - z-depth = 3 - </aside> - </section> - - <section> - <div> - <div class="card paper-shadow-top-z-4"> - <div class="card-inner paper-shadow-bottom-z-4"> - </div> - </div> - </div> - <aside> - z-depth = 4 - </aside> - </section> - - <section> - <div> - <div class="card paper-shadow-top-z-5"> - <div class="card-inner paper-shadow-bottom-z-5"> - </div> - </div> - </div> - <aside> - z-depth = 5 - </aside> - </section> - - <br> - <br> - <br> - <br> - - <polymer-element name="x-shadow" attributes="z" on-tap="{{tapAction}}"> - <template> - <style> - :host, - .paper-shadow-bottom { - display: block; - background: white; - color: #ccc; - } - - :host(.fab), - :host(.fab) .paper-shadow-bottom { - width: 48px; - height: 48px; - border-radius: 24px; - } - </style> - <paper-shadow z="{{z}}" animated></paper-shadow> - </template> - <script> - Polymer('x-shadow', { - publish: { - z: {value: 0, reflect: true} - }, - up: true, - zChanged: function() { - this.fire('shadow-z-changed'); - }, - tapAction: function() { - if (this.up) { - if (this.z < 5) { - this.z += 1; - } else { - this.z -= 1; - this.up = false; - } - } else { - if (this.z > 0) { - this.z -= 1; - } else { - this.z += 1; - this.up = true; - } - } - } - }); - </script> - </polymer-element> - - <section> - <div> - <x-shadow id="card" z="0" class="card"></x-shadow> - </div> - <aside> - Tap to lift/drop the card. - <br> - Current z-index = <span id="card-z">0</span> - </aside> - <script> - document.addEventListener('polymer-ready', function() { - var fab = document.getElementById('card'); - fab.addEventListener('shadow-z-changed', function() { - document.getElementById('card-z').textContent = fab.z; - }); - }); - </script> - </section> - - <section> - <div> - <style> - x-shadow.fab { - margin: 48px 142px; - } - </style> - <x-shadow id="fab" z="0" class="fab"></x-shadow> - </div> - <aside> - Tap to lift/drop the button. - <br> - Current z-index = <span id="fab-z">0</span> - </aside> - <script> - document.addEventListener('polymer-ready', function() { - var fab = document.getElementById('fab'); - fab.addEventListener('shadow-z-changed', function() { - document.getElementById('fab-z').textContent = fab.z; - }); - }); - </script> - </section> - -</body> -</html> diff --git a/third_party/polymer/components/paper-shadow/index.html b/third_party/polymer/components/paper-shadow/index.html deleted file mode 100644 index 58856f3..0000000 --- a/third_party/polymer/components/paper-shadow/index.html +++ /dev/null @@ -1,22 +0,0 @@ -<!doctype html> -<!-- -Copyright (c) 2014 The Polymer Project Authors. All rights reserved. -This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE -The complete set of authors may be found at http://polymer.github.io/AUTHORS -The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS -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 ---> -<html> -<head> - - <script src="../platform/platform.js"></script> - <link rel="import" href="../core-component-page/core-component-page.html"> - -</head> -<body unresolved> - - <core-component-page></core-component-page> - -</body> -</html> diff --git a/third_party/polymer/components/paper-shadow/metadata.html b/third_party/polymer/components/paper-shadow/metadata.html deleted file mode 100644 index 07e6edd..0000000 --- a/third_party/polymer/components/paper-shadow/metadata.html +++ /dev/null @@ -1,8 +0,0 @@ -<x-meta id="paper-shadow" label="Shadow" group="Paper"> - <template> - <paper-shadow></paper-shadow> - </template> - <template id="imports"> - <link rel="import" href="paper-shadow.html"> - </template> -</x-meta> diff --git a/third_party/polymer/components/paper-shadow/paper-shadow.css b/third_party/polymer/components/paper-shadow/paper-shadow.css deleted file mode 100644 index e5cfec7..0000000 --- a/third_party/polymer/components/paper-shadow/paper-shadow.css +++ /dev/null @@ -1,81 +0,0 @@ -.paper-shadow { - position: absolute; - top: 0; - left: 0; - bottom: 0; - right: 0; - border-radius: inherit; - pointer-events: none; -} - -.paper-shadow-animated.paper-shadow { - transition: box-shadow 0.28s cubic-bezier(0.4, 0, 0.2, 1); -} - -.paper-shadow-top-z-1 { - box-shadow: 0 2px 10px 0 rgba(0, 0, 0, 0.16); -} - -.paper-shadow-bottom-z-1 { - box-shadow: 0 2px 5px 0 rgba(0, 0, 0, 0.26); -} - -.paper-shadow-top-z-2 { - box-shadow: 0 6px 20px 0 rgba(0, 0, 0, 0.19); -} - -.paper-shadow-bottom-z-2 { - box-shadow: 0 8px 17px 0 rgba(0, 0, 0, 0.2); -} - -.paper-shadow-top-z-3 { - box-shadow: 0 17px 50px 0 rgba(0, 0, 0, 0.19); -} - -.paper-shadow-bottom-z-3 { - box-shadow: 0 12px 15px 0 rgba(0, 0, 0, 0.24); -} - -.paper-shadow-top-z-4 { - box-shadow: 0 25px 55px 0 rgba(0, 0, 0, 0.21); -} - -.paper-shadow-bottom-z-4 { - box-shadow: 0 16px 28px 0 rgba(0, 0, 0, 0.22); -} - -.paper-shadow-top-z-5 { - box-shadow: 0 40px 77px 0 rgba(0, 0, 0, 0.22); -} - -.paper-shadow-bottom-z-5 { - box-shadow: 0 27px 24px 0 rgba(0, 0, 0, 0.2); -} - -.paper-shadow-animate-z-1-z-2.paper-shadow-top { - -webkit-transition: none; - -webkit-animation: animate-shadow-top-z-1-z-2 0.7s infinite alternate; -} - -.paper-shadow-animate-z-1-z-2 .paper-shadow-bottom { - -webkit-transition: none; - -webkit-animation: animate-shadow-bottom-z-1-z-2 0.7s infinite alternate; -} - -@-webkit-keyframes animate-shadow-top-z-1-z-2 { - 0% { - box-shadow: 0 2px 10px 0 rgba(0, 0, 0, 0.16); - } - 100% { - box-shadow: 0 6px 20px 0 rgba(0, 0, 0, 0.19); - } -} - -@-webkit-keyframes animate-shadow-bottom-z-1-z-2 { - 0% { - box-shadow: 0 2px 5px 0 rgba(0, 0, 0, 0.26); - } - 100% { - box-shadow: 0 8px 17px 0 rgba(0, 0, 0, 0.2); - } -}
\ No newline at end of file diff --git a/third_party/polymer/components/paper-shadow/paper-shadow.html b/third_party/polymer/components/paper-shadow/paper-shadow.html deleted file mode 100644 index 6aa4d3b..0000000 --- a/third_party/polymer/components/paper-shadow/paper-shadow.html +++ /dev/null @@ -1,213 +0,0 @@ -<!-- -Copyright (c) 2014 The Polymer Project Authors. All rights reserved. -This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt -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 ---> - -<!-- -The `paper-shadow` element is a helper to add shadows to elements. -Paper shadows are composed of two shadows on top of each other. We -mimic this effect by using two elements on top of each other, each with a -different drop shadow. You can apply the shadow to an element by assigning -it as the target. If you do not specify a target, the shadow is applied to -the `paper-shadow` element's parent element or shadow host element if its -parent is a shadow root. Alternatively, you can use the CSS classes included -by this element directly. - -Example: - - <div id="myCard" class="card"></div> - <paper-shadow id="myShadow" z="1"></div> - - // Assign a target explicitly - myShadow.target = document.getElementById('myCard'); - - // Auto-assign the target. - <div class="card"> - <paper-shadow z="1"></paper-shadow> - </div> - - // Use the classes directly - <div class="card paper-shadow-top paper-shadow-top-z-1"> - <div class="card-inner paper-shadow-bottom paper-shadow-bottom-z-1"></div> - </div> - -If you assign a target to a `paper-shadow` element, it creates two nodes and inserts -them as the first children of the target, or the first children of the target's shadow -root if there is one. This implies: - - 1. If the primary node that drops the shadow has styling that affects its shape, - the same styling must be applied to elements with class `paper-shadow`. - `border-radius` is a very common property and is inherited automatically. - - 2. The target's overflow property will be set to `overflow: visible` because the - shadow is rendered beyond the bounds of its container. Position the shadow as a - separate layer and use a different child element for clipping if needed. - -@group Paper Elements -@class paper-shadow ---> - -<link href="../polymer/polymer.html" rel="import"> - -<polymer-element name="paper-shadow"> - - <template> - - <link no-shim href="paper-shadow.css" rel="stylesheet"> - - </template> - - <script> - Polymer('paper-shadow', { - - publish: { - /** - * If set, the shadow is applied to this node. - * - * @attribute target - * @type Element - * @default null - */ - target: {value: null, reflect: true}, - - /** - * The z-depth of this shadow, from 0-5. - * - * @attribute z - * @type number - * @default 1 - */ - z: {value: 1, reflect: true}, - - /** - * If true, the shadow animates between z-depth changes. - * - * @attribute animated - * @type boolean - * @default false - */ - animated: {value: false, reflect: true}, - - /** - * Workaround: getComputedStyle is wrong sometimes so `paper-shadow` - * may overwrite the `position` CSS property. Set this property to - * true to prevent this. - * - * @attribute hasPosition - * @type boolean - * @default false - */ - hasPosition: {value: false} - }, - - // NOTE: include template so that styles are loaded, but remove - // so that we can decide dynamically what part to include - registerCallback: function(polymerElement) { - var template = polymerElement.querySelector('template'); - this._style = template.content.querySelector('style'); - this._style.removeAttribute('no-shim'); - }, - - fetchTemplate: function() { - return null; - }, - - attached: function() { - this.installScopeStyle(this._style); - - // If no target is bound at attach, default the target to the parent - // element or shadow host. - if (!this.target) { - if (!this.parentElement && this.parentNode.host) { - this.target = this.parentNode.host; - } else if (this.parentElement && (window.ShadowDOMPolyfill ? this.parentElement !== wrap(document.body) : this.parentElement !== document.body)) { - this.target = this.parentElement; - } - } - }, - - targetChanged: function(old) { - if (old) { - this.removeShadow(old); - } - if (this.target) { - this.addShadow(this.target); - } - }, - - zChanged: function(old) { - if (this.target && this.target._paperShadow) { - var shadow = this.target._paperShadow; - ['top', 'bottom'].forEach(function(s) { - shadow[s].classList.remove('paper-shadow-' + s + '-z-' + old); - shadow[s].classList.add('paper-shadow-' + s + '-z-' + this.z); - }.bind(this)); - } - }, - - animatedChanged: function() { - if (this.target && this.target._paperShadow) { - var shadow = this.target._paperShadow; - ['top', 'bottom'].forEach(function(s) { - if (this.animated) { - shadow[s].classList.add('paper-shadow-animated'); - } else { - shadow[s].classList.remove('paper-shadow-animated'); - } - }.bind(this)); - } - }, - - addShadow: function(node) { - if (node._paperShadow) { - return; - } - - var computed = getComputedStyle(node); - if (!this.hasPosition && computed.position === 'static') { - node.style.position = 'relative'; - } - node.style.overflow = 'visible'; - - // Both the top and bottom shadows are children of the target, so - // it does not affect the classes and CSS properties of the target. - ['top', 'bottom'].forEach(function(s) { - var inner = (node._paperShadow && node._paperShadow[s]) || document.createElement('div'); - inner.classList.add('paper-shadow'); - inner.classList.add('paper-shadow-' + s + '-z-' + this.z); - if (this.animated) { - inner.classList.add('paper-shadow-animated'); - } - - if (node.shadowRoot) { - node.shadowRoot.insertBefore(inner, node.shadowRoot.firstChild); - } else { - node.insertBefore(inner, node.firstChild); - } - - node._paperShadow = node._paperShadow || {}; - node._paperShadow[s] = inner; - }.bind(this)); - - }, - - removeShadow: function(node) { - if (!node._paperShadow) { - return; - } - - ['top', 'bottom'].forEach(function(s) { - node._paperShadow[s].remove(); - }); - node._paperShadow = null; - - node.style.position = null; - } - - }); - </script> -</polymer-element> diff --git a/third_party/polymer/components/paper-slider/.bower.json b/third_party/polymer/components/paper-slider/.bower.json deleted file mode 100644 index 47d1176..0000000 --- a/third_party/polymer/components/paper-slider/.bower.json +++ /dev/null @@ -1,20 +0,0 @@ -{ - "name": "paper-slider", - "private": true, - "dependencies": { - "font-roboto": "Polymer/font-roboto#>=0.3.0 <1.0.0", - "paper-input": "Polymer/paper-input#>=0.3.0 <1.0.0", - "paper-progress": "Polymer/paper-progress#>=0.3.0 <1.0.0" - }, - "homepage": "https://github.com/Polymer/paper-slider", - "version": "0.3.5", - "_release": "0.3.5", - "_resolution": { - "type": "version", - "tag": "0.3.5", - "commit": "69f9f3f88336c8b45ddb2cef3a13c9c2e180b8e3" - }, - "_source": "git://github.com/Polymer/paper-slider.git", - "_target": "0.3.5", - "_originalSource": "Polymer/paper-slider" -}
\ No newline at end of file diff --git a/third_party/polymer/components/paper-slider/README.md b/third_party/polymer/components/paper-slider/README.md deleted file mode 100644 index 84ae564..0000000 --- a/third_party/polymer/components/paper-slider/README.md +++ /dev/null @@ -1,4 +0,0 @@ -paper-slider -============ - -See the [component page](http://www.polymer-project.org/docs/elements/paper-elements.html#paper-slider) for more information. diff --git a/third_party/polymer/components/paper-slider/bower.json b/third_party/polymer/components/paper-slider/bower.json deleted file mode 100644 index 66cf9df..0000000 --- a/third_party/polymer/components/paper-slider/bower.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "name": "paper-slider", - "private": true, - "dependencies": { - "font-roboto": "Polymer/font-roboto#>=0.3.0 <1.0.0", - "paper-input": "Polymer/paper-input#>=0.3.0 <1.0.0", - "paper-progress": "Polymer/paper-progress#>=0.3.0 <1.0.0" - } -}
\ No newline at end of file diff --git a/third_party/polymer/components/paper-slider/demo.html b/third_party/polymer/components/paper-slider/demo.html deleted file mode 100644 index d5358b4..0000000 --- a/third_party/polymer/components/paper-slider/demo.html +++ /dev/null @@ -1,142 +0,0 @@ -<!doctype html> -<html> -<head> - <title>paper-slider</title> - - <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0"> - <meta name="mobile-web-app-capable" content="yes"> - <meta name="apple-mobile-web-app-capable" content="yes"> - - <script src="../platform/platform.js"></script> - - <link rel="import" href="paper-slider.html"> - <link rel="import" href="../font-roboto/roboto.html"> - - <style shim-shadowdom> - - body { - font-family: RobotoDraft, 'Helvetica Neue', Helvetica, Arial; - margin: 0; - padding: 24px; - -webkit-user-select: none; - -moz-user-select: none; - -ms-user-select: none; - user-select: none; - -webkit-tap-highlight-color: rgba(0,0,0,0); - -webkit-touch-callout: none; - } - - paper-slider { - width: 100%; - } - - section { - max-width: 1000px; - padding: 20px 0; - background-color: #f0f0f0; - } - - section > div { - padding: 14px; - } - - .yellow-slider paper-slider::shadow #sliderKnobInner, - .yellow-slider paper-slider::shadow #sliderBar::shadow #activeProgress { - background-color: #f4b400; - } - - .green-slider paper-slider::shadow #sliderKnobInner, - .green-slider paper-slider::shadow #sliderKnobInner::before, - .green-slider paper-slider::shadow #sliderBar::shadow #activeProgress { - background-color: #0f9d58; - } - - #ratingsLabel { - padding-left: 12px; - color: #a0a0a0; - } - - </style> - -</head> -<body unresolved> - - <section class="yellow-slider"> - - <div>Music, video, games & other media</div> - <paper-slider value="50"></paper-slider> - - <br> - <br> - - <div>Notifications</div> - <paper-slider value="50"></paper-slider> - - <br> - <br> - - <div>Alarms</div> - <paper-slider value="80"></paper-slider> - - </section> - - <br> - - <section> - - <div center horizontal layout> - <div>R</div> - <paper-slider value="23" max="255" editable></paper-slider> - </div> - - <br> - <br> - - <div center horizontal layout> - <div>G</div> - <paper-slider value="183" max="255" editable></paper-slider> - </div> - - <br> - <br> - - <div center horizontal layout> - <div>B</div> - <paper-slider value="211" max="255" editable></paper-slider> - </div> - - </section> - - <br> - - <section class="green-slider"> - - <div>Brightness</div> - <br> - <paper-slider pin value="50"></paper-slider> - - </section> - - <br> - - <section class="green-slider"> - - <div> - <span>Ratings</span><span id="ratingsLabel"></span> - </div> - <br> - <paper-slider id="ratings" pin snaps max="10" step="1" value="5"></paper-slider> - - </section> - - <script> - - var ratings = document.querySelector('#ratings'); - ratings.addEventListener('change', function() { - document.querySelector('#ratingsLabel').textContent = ratings.value; - }); - - </script> - -</body> -</html> diff --git a/third_party/polymer/components/paper-slider/index.html b/third_party/polymer/components/paper-slider/index.html deleted file mode 100644 index 58856f3..0000000 --- a/third_party/polymer/components/paper-slider/index.html +++ /dev/null @@ -1,22 +0,0 @@ -<!doctype html> -<!-- -Copyright (c) 2014 The Polymer Project Authors. All rights reserved. -This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE -The complete set of authors may be found at http://polymer.github.io/AUTHORS -The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS -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 ---> -<html> -<head> - - <script src="../platform/platform.js"></script> - <link rel="import" href="../core-component-page/core-component-page.html"> - -</head> -<body unresolved> - - <core-component-page></core-component-page> - -</body> -</html> diff --git a/third_party/polymer/components/paper-slider/metadata.html b/third_party/polymer/components/paper-slider/metadata.html deleted file mode 100644 index bf83104..0000000 --- a/third_party/polymer/components/paper-slider/metadata.html +++ /dev/null @@ -1,11 +0,0 @@ -<x-meta id="paper-slider" label="Slider" group="Paper"> - - <template> - <paper-slider></paper-slider> - </template> - - <template id="imports"> - <link rel="import" href="paper-slider.html"> - </template> - -</x-meta> diff --git a/third_party/polymer/components/paper-slider/paper-slider.css b/third_party/polymer/components/paper-slider/paper-slider.css deleted file mode 100644 index d201acf..0000000 --- a/third_party/polymer/components/paper-slider/paper-slider.css +++ /dev/null @@ -1,193 +0,0 @@ -/* -Copyright (c) 2014 The Polymer Project Authors. All rights reserved. -This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt -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 -*/ - -:host { - display: inline-block; - width: 200px; - cursor: default; -} - -#sliderContainer { - position: relative; - width: calc(100% - 32px); - height: 32px; -} - -:host([editable]) #sliderContainer { - float: left; - width: calc(100% - 72px); -} - -#sliderBar { - position: absolute; - top: 15px; - left: 16px; - height: 2px; - width: 100%; - padding: 8px 0; - margin: -8px 0; -} - -.slider-markers { - position: absolute; - top: 15px; - left: 15px; - height: 2px; - width: calc(100% + 2px); - box-sizing: border-box; - pointer-events: none; - /* background-image: -webkit-linear-gradient(0deg, #ccc, #ccc 1px, transparent 1px, transparent); - background-size: 10%; */ -} - -.slider-markers::after, .slider-marker::after { - content: ""; - display: block; - width: 2px; - height: 2px; - border-radius: 50%; - background-color: black; -} - -#sliderBar::shadow #activeProgress { - background-color: #3f51b5; -} - -#sliderKnob { - position: absolute; - left: 0; - top: 0; - width: 32px; - height: 32px; -} - -#sliderKnob.transiting { - transition: left 0.08s ease; -} - -#sliderKnob:focus { - outline: none; -} - -#sliderKnob.dragging { - transition: none; -} - -#sliderKnob.snaps.dragging { - transition: -webkit-transform 0.08s ease; - transition: transform 0.08s ease; -} - -#sliderKnobInner { - width: 12px; - height: 12px; - box-sizing: border-box; - -moz-box-sizing: border-box; - border-radius: 50%; - background-color: #3f51b5; - /* FIXME(ffu): can't use the following. https://github.com/Polymer/platform/issues/53 */ - /* transition-property: height, width, background-color, border; - transition-duration: 0.1s; - transition-timing-function: ease; */ - transition: height 0.18s ease, width 0.18s ease, background-color 0.28s ease, border 0.18s ease; -} - -#sliderKnob.expand:not(.pin) > #sliderKnobInner { - width: 100%; - height: 100%; - -webkit-transform: translateZ(0); - transform: translateZ(0); -} - -#sliderKnob.ring > #sliderKnobInner { - background-color: #fff; - border: 2px solid #c8c8c8; -} - -#sliderKnobInner::before { - background-color: #3f51b5; -} - -#sliderKnob.pin > #sliderKnobInner::before { - content: ""; - position: absolute; - top: 0; - left: 0; - width: 26px; - height: 26px; - margin-left: 3px; - border-radius: 50% 50% 50% 0; - -webkit-transform: rotate(-45deg) scale(0) translate(0); - transform: rotate(-45deg) scale(0) translate(0); -} - -#sliderKnobInner::before, #sliderKnobInner::after { - transition: -webkit-transform .2s ease, background-color .18s ease; - transition: transform .2s ease, background-color .18s ease; -} - -#sliderKnob.pin.ring > #sliderKnobInner::before { - background-color: #c8c8c8; -} - -#sliderKnob.pin.expand > #sliderKnobInner::before { - -webkit-transform: rotate(-45deg) scale(1) translate(17px, -17px); - transform: rotate(-45deg) scale(1) translate(17px, -17px); -} - -#sliderKnob.pin > #sliderKnobInner::after { - /* FIXME(ffu): add dummy quotes to workaround https://github.com/Polymer/platform/issues/57 */ - content: attr(value) ""; - position: absolute; - top: 0; - left: 0; - width: 32px; - height: 26px; - text-align: center; - color: #fff; - font-size: 10px; - -webkit-transform: scale(0) translate(0); - transform: scale(0) translate(0); -} - -#sliderKnob.pin.expand > #sliderKnobInner::after { - -webkit-transform: scale(1) translate(0, -17px); - transform: scale(1) translate(0, -17px); -} - -.slider-input { - width: 40px; - height: 32px; - float: right; -} - -.slider-input::shadow input { - /* FIXME(ffu): should one be able set text-align directly on paper-input? */ - text-align: center; -} - -/* disabled state */ -:host([disabled]) #sliderContainer { - pointer-events: none; -} - -:host([disabled]) { - pointer-events: none; -} - -:host([disabled]) #sliderKnob > #sliderKnobInner { - width: 12px; - height: 12px; - background-color: #c8c8c8; - border: 2px solid #fff; -} - -:host([disabled]) #sliderContainer > #sliderBar::shadow #activeProgress { - background-color: #c8c8c8; -} diff --git a/third_party/polymer/components/paper-slider/paper-slider.html b/third_party/polymer/components/paper-slider/paper-slider.html deleted file mode 100644 index f2587bf..0000000 --- a/third_party/polymer/components/paper-slider/paper-slider.html +++ /dev/null @@ -1,310 +0,0 @@ -<!-- -Copyright (c) 2014 The Polymer Project Authors. All rights reserved. -This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt -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 ---> - -<!-- -`paper-slider` allows user to select a value from a range of values by -moving the slider thumb. The interactive nature of the slider makes it a -great choice for settings that reflect intensity levels, such as volume, -brightness, or color saturation. - -Example: - - <paper-slider></paper-slider> - -Use `min` and `max` to specify the slider range. Default is 0 to 100. - -Example: - - <paper-slider min="10" max="200" value="110"></paper-slider> - -Styling slider: - -To change the slider progress bar color: - - paper-slider::shadow #sliderBar::shadow #activeProgress { - background-color: #0f9d58; - } - -To change the slider knob color: - - paper-slider::shadow #sliderKnobInner { - background-color: #0f9d58; - } - -To change the slider pin color: - - paper-slider::shadow #sliderKnobInner::before { - background-color: #0f9d58; - } - -To change the slider pin's value: - - paper-slider::shadow #sliderKnobInner::after { - color: #0f9d58 - } - -To change the slider secondary progress bar color: - - paper-slider::shadow #sliderBar::shadow #secondaryProgress { - background-color: #0f9d58; - } - -@group Paper Elements -@element paper-slider -@extends core-range -@homepage github.io ---> - -<link rel="import" href="../paper-progress/paper-progress.html"> -<link rel="import" href="../paper-input/paper-input.html"> - -<polymer-element name="paper-slider" extends="core-range" attributes="snaps pin disabled secondaryProgress editable immediateValue"> -<template> - - <link rel="stylesheet" href="paper-slider.css"> - - <div id="sliderContainer" on-keydown="{{keydown}}"> - - <paper-progress id="sliderBar" aria-hidden="true" min="{{min}}" max="{{max}}" value="{{immediateValue}}" secondaryProgress="{{secondaryProgress}}" - on-down="{{bardown}}" on-up="{{resetKnob}}" - on-trackstart="{{trackStart}}" on-trackx="{{trackx}}" on-trackend="{{trackEnd}}"></paper-progress> - - <template if="{{snaps && !disabled}}"> - <div class="slider-markers" horizontal layout> - <template repeat="{{markers}}"> - <div flex class="slider-marker"></div> - </template> - </div> - </template> - - <div id="sliderKnob" class="{{ {pin : pin, snaps : snaps} | tokenList }}" - on-down="{{expandKnob}}" on-up="{{resetKnob}}" - on-trackstart="{{trackStart}}" on-trackx="{{trackx}}" on-trackend="{{trackEnd}}" - on-transitionend="{{knobTransitionEnd}}" - role="slider" aria-valuenow="{{value}}" aria-valuemin="{{min}}" aria-valuemax="{{max}}" - aria-valuetext="{{value}}" tabindex="0" - center-justified center horizontal layout> - - <div id="sliderKnobInner" value="{{immediateValue}}"></div> - - </div> - - </div> - - <template if="{{editable}}"> - <paper-input id="input" class="slider-input" value="{{immediateValue}}" validate="^[-+]?[0-9]*\.?[0-9]+$" disabled?="{{disabled}}" on-change="{{inputChange}}"></paper-input> - </template> - -</template> -<script> - - Polymer('paper-slider', { - - /** - * Fired when the slider's value changes. - * - * @event change - */ - - /** - * Fired when the slider's value changes due to manual interaction. - * - * Changes to the slider's value due to changes in an underlying - * bound variable will not trigger this event. - * - * @event manual-change - */ - - /** - * If true, the slider thumb snaps to tick marks evenly spaced based - * on the `step` property value. - * - * @attribute snaps - * @type boolean - * @default false - */ - snaps: false, - - /** - * If true, a pin with numeric value label is shown when the slider thumb - * is pressed. Use for settings for which users need to know the exact - * value of the setting. - * - * @attribute pin - * @type boolean - * @default false - */ - pin: false, - - /** - * If true, this slider is disabled. A disabled slider cannot be tapped - * or dragged to change the slider value. - * - * @attribute disabled - * @type boolean - * @default false - */ - disabled: false, - - /** - * The number that represents the current secondary progress. - * - * @attribute secondaryProgress - * @type number - * @default 0 - */ - secondaryProgress: 0, - - /** - * If true, an input is shown and user can use it to set the slider value. - * - * @attribute editable - * @type boolean - * @default false - */ - editable: false, - - /** - * The immediate value of the slider. This value is updated while the user - * is dragging the slider. - * - * @attribute immediateValue - * @type number - * @default 0 - */ - - observe: { - 'min max step snaps': 'update' - }, - - ready: function() { - this.update(); - }, - - update: function() { - this.positionKnob(this.calcRatio(this.value)); - this.updateMarkers(); - }, - - valueChanged: function() { - this.update(); - this.fire('change'); - }, - - expandKnob: function() { - this.$.sliderKnob.classList.add('expand'); - }, - - resetKnob: function() { - this.expandJob && this.expandJob.stop(); - this.$.sliderKnob.classList.remove('expand'); - }, - - positionKnob: function(ratio) { - this._ratio = ratio; - this.immediateValue = this.calcStep(this.calcKnobPosition()) || 0; - if (this.snaps) { - this._ratio = this.calcRatio(this.immediateValue); - } - this.$.sliderKnob.style.left = this._ratio * 100 + '%'; - }, - - immediateValueChanged: function() { - this.$.sliderKnob.classList.toggle('ring', this.immediateValue <= this.min); - }, - - inputChange: function() { - this.value = this.$.input.value; - this.fire('manual-change'); - }, - - calcKnobPosition: function() { - return (this.max - this.min) * this._ratio + this.min; - }, - - measureWidth: function() { - this._w = this.$.sliderBar.offsetWidth; - }, - - trackStart: function(e) { - this.measureWidth(); - this._x = this._ratio * this._w; - this._startx = this._x || 0; - this._minx = - this._startx; - this._maxx = this._w - this._startx; - this.$.sliderKnob.classList.add('dragging'); - e.preventTap(); - }, - - trackx: function(e) { - var x = Math.min(this._maxx, Math.max(this._minx, e.dx)); - this._x = this._startx + x; - this._ratio = this._x / this._w; - this.immediateValue = this.calcStep(this.calcKnobPosition()) || 0; - var s = this.$.sliderKnob.style; - s.transform = s.webkitTransform = 'translate3d(' + (this.snaps ? - (this.calcRatio(this.immediateValue) * this._w) - this._startx : x) + 'px, 0, 0)'; - }, - - trackEnd: function() { - var s = this.$.sliderKnob.style; - s.transform = s.webkitTransform = ''; - this.$.sliderKnob.classList.remove('dragging'); - this.resetKnob(); - this.value = this.immediateValue; - this.fire('manual-change'); - }, - - bardown: function(e) { - this.measureWidth(); - this.$.sliderKnob.classList.add('transiting'); - var rect = this.$.sliderBar.getBoundingClientRect(); - this.positionKnob((e.x - rect.left) / this._w); - this.value = this.calcStep(this.calcKnobPosition()); - this.expandJob = this.job(this.expandJob, this.expandKnob, 60); - this.fire('manual-change'); - }, - - knobTransitionEnd: function() { - this.$.sliderKnob.classList.remove('transiting'); - }, - - updateMarkers: function() { - this.markers = [], l = (this.max - this.min) / this.step; - for (var i = 0; i < l; i++) { - this.markers.push(''); - } - }, - - increment: function() { - this.value = this.clampValue(this.value + this.step); - }, - - decrement: function() { - this.value = this.clampValue(this.value - this.step); - }, - - keydown: function(e) { - if (this.disabled) { - return; - } - var c = e.keyCode; - if (c === 37) { - this.decrement(); - this.fire('manual-change'); - } else if (c === 39) { - this.increment(); - this.fire('manual-change'); - } - } - - }); - -</script> -</polymer-element> diff --git a/third_party/polymer/components/paper-tabs/.bower.json b/third_party/polymer/components/paper-tabs/.bower.json deleted file mode 100644 index cb017f2..0000000 --- a/third_party/polymer/components/paper-tabs/.bower.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "name": "paper-tabs", - "private": true, - "dependencies": { - "core-icons": "Polymer/core-icons#>=0.3.0 <1.0.0", - "core-selector": "Polymer/core-selector#>=0.3.0 <1.0.0", - "core-toolbar": "Polymer/core-toolbar#>=0.3.0 <1.0.0", - "font-roboto": "Polymer/font-roboto#>=0.3.0 <1.0.0", - "paper-icon-button": "Polymer/paper-icon-button#>=0.3.0 <1.0.0", - "paper-ripple": "Polymer/paper-ripple#>=0.3.0 <1.0.0" - }, - "homepage": "https://github.com/Polymer/paper-tabs", - "version": "0.3.5", - "_release": "0.3.5", - "_resolution": { - "type": "version", - "tag": "0.3.5", - "commit": "0b840eabda7aa69c2cf005e09e2ae1bb65b7c9c0" - }, - "_source": "git://github.com/Polymer/paper-tabs.git", - "_target": "0.3.5", - "_originalSource": "Polymer/paper-tabs" -}
\ No newline at end of file diff --git a/third_party/polymer/components/paper-tabs/README.md b/third_party/polymer/components/paper-tabs/README.md deleted file mode 100644 index 09c73c6..0000000 --- a/third_party/polymer/components/paper-tabs/README.md +++ /dev/null @@ -1,4 +0,0 @@ -paper-tabs -============ - -See the [component page](http://www.polymer-project.org/docs/elements/paper-elements.html#paper-tabs) for more information. diff --git a/third_party/polymer/components/paper-tabs/bower.json b/third_party/polymer/components/paper-tabs/bower.json deleted file mode 100644 index c11003a..0000000 --- a/third_party/polymer/components/paper-tabs/bower.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "name": "paper-tabs", - "private": true, - "dependencies": { - "core-icons": "Polymer/core-icons#>=0.3.0 <1.0.0", - "core-selector": "Polymer/core-selector#>=0.3.0 <1.0.0", - "core-toolbar": "Polymer/core-toolbar#>=0.3.0 <1.0.0", - "font-roboto": "Polymer/font-roboto#>=0.3.0 <1.0.0", - "paper-icon-button": "Polymer/paper-icon-button#>=0.3.0 <1.0.0", - "paper-ripple": "Polymer/paper-ripple#>=0.3.0 <1.0.0" - } -}
\ No newline at end of file diff --git a/third_party/polymer/components/paper-tabs/demo.html b/third_party/polymer/components/paper-tabs/demo.html deleted file mode 100644 index 3067fe7..0000000 --- a/third_party/polymer/components/paper-tabs/demo.html +++ /dev/null @@ -1,157 +0,0 @@ -<!doctype html> -<html> -<head> - <title>paper-tabs</title> - <meta name="viewport" content="width=device-width; initial-scale=1.0; max-scale=1.0; user-scalable=yes"> - <script src="../platform/platform.js"></script> - - <link rel="import" href="../core-icons/core-icons.html"> - <link rel="import" href="paper-tabs.html"> - <link rel="import" href="../core-toolbar/core-toolbar.html"> - <link rel="import" href="../paper-icon-button/paper-icon-button.html"> - <link rel="import" href="../font-roboto/roboto.html"> - - <style shim-shadowdom> - - body { - font-family: RobotoDraft, 'Helvetica Neue', Helvetica, Arial; - margin: 0; - padding: 24px; - color: #333; - -webkit-user-select: none; - -moz-user-select: none; - -ms-user-select: none; - user-select: none; - -webkit-tap-highlight-color: rgba(0,0,0,0); - -webkit-touch-callout: none; - } - - paper-tabs, core-toolbar { - background-color: #00bcd4; - color: #fff; - box-shadow: 0px 3px 2px rgba(0, 0, 0, 0.2); - } - - core-toolbar paper-tabs { - box-shadow: none; - } - - paper-tabs[noink][nobar] paper-tab.core-selected { - color: #ffff8d; - } - - paper-tabs.transparent-teal { - background-color: transparent; - color: #00bcd4; - box-shadow: none; - } - - paper-tabs.transparent-teal::shadow #selectionBar { - background-color: #00bcd4; - } - - paper-tabs.transparent-teal paper-tab::shadow #ink { - color: #00bcd4; - } - - h3 { - font-size: 16px; - font-weight: 400; - } - - </style> - -</head> -<body unresolved> - - <h3>A. No ink effect and no sliding bar</h3> - - <paper-tabs selected="0" noink nobar> - - <paper-tab>ITEM ONE</paper-tab> - <paper-tab>ITEM TWO</paper-tab> - <paper-tab>ITEM THREE</paper-tab> - - </paper-tabs> - - <br> - <br> - - <h3>B. The bar slides to the selected tab</h3> - - <paper-tabs selected="0" noink> - - <paper-tab>ITEM ONE</paper-tab> - <paper-tab>ITEM TWO</paper-tab> - <paper-tab>ITEM THREE</paper-tab> - - </paper-tabs> - - <br> - <br> - - <h3>C. Inky Tabs</h3> - - <paper-tabs selected="0"> - - <paper-tab>ITEM ONE</paper-tab> - <paper-tab>ITEM TWO</paper-tab> - <paper-tab>ITEM THREE</paper-tab> - - </paper-tabs> - - <br> - <br> - - <paper-tabs selected="0" class="transparent-teal"> - - <paper-tab>ITEM ONE</paper-tab> - <paper-tab>ITEM TWO</paper-tab> - <paper-tab>ITEM THREE</paper-tab> - - </paper-tabs> - - <br> - <br> - - <core-toolbar class="medium-tall"> - - <paper-icon-button icon="menu"></paper-icon-button> - <div flex>Title</div> - <paper-icon-button icon="search"></paper-icon-button> - <paper-icon-button icon="more-vert"></paper-icon-button> - - <div class="bottom fit" horizontal layout> - - <paper-tabs selected="0" flex style="max-width: 600px;"> - - <paper-tab>ITEM ONE</paper-tab> - <paper-tab>ITEM TWO</paper-tab> - <paper-tab>ITEM THREE</paper-tab> - - </paper-tabs> - - </div> - - </core-toolbar> - - <br> - <br> - - <core-toolbar class="tall"> - - <paper-tabs selected="0" class="bottom indent" style="width: 200px;" self-end> - - <paper-tab>ITEM ONE</paper-tab> - <paper-tab>ITEM TWO</paper-tab> - - </paper-tabs> - - <div class="bottom" flex></div> - - <paper-icon-button class="bottom" icon="search"></paper-icon-button> - - </core-toolbar> - -</body> -</html> diff --git a/third_party/polymer/components/paper-tabs/index.html b/third_party/polymer/components/paper-tabs/index.html deleted file mode 100644 index 93257d3..0000000 --- a/third_party/polymer/components/paper-tabs/index.html +++ /dev/null @@ -1,22 +0,0 @@ -<!doctype html> -<!-- -Copyright (c) 2014 The Polymer Project Authors. All rights reserved. -This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE -The complete set of authors may be found at http://polymer.github.io/AUTHORS -The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS -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 ---> -<html> -<head> - - <script src="../platform/platform.js"></script> - <link rel="import" href="../core-component-page/core-component-page.html"> - -</head> -<body unresolved> - - <core-component-page sources='["paper-tabs.html", "paper-tab.html"]'></core-component-page> - -</body> -</html> diff --git a/third_party/polymer/components/paper-tabs/metadata.html b/third_party/polymer/components/paper-tabs/metadata.html deleted file mode 100644 index 2bf4c83..0000000 --- a/third_party/polymer/components/paper-tabs/metadata.html +++ /dev/null @@ -1,49 +0,0 @@ -<x-meta id="paper-tabs" label="Tabs" group="Paper" isContainer> - - <template> - <paper-tabs selected="0" style="width: 480px; background-color: #00bcd4; color: #fff; box-shadow: 0px 3px 2px rgba(0, 0, 0, 0.2);"> - <paper-tab>ITEM ONE</paper-tab> - <paper-tab>ITEM TWO</paper-tab> - <paper-tab>ITEM THREE</paper-tab> - <paper-tab>ITEM FOUR</paper-tab> - <paper-tab>ITEM FIVE</paper-tab> - </paper-tabs> - </template> - - <template id="imports"> - <link rel="import" href="paper-tabs.html"> - </template> - -</x-meta> - - -<x-meta id="paper-tab" label="Tab" group="Paper"> - - <template> - <paper-tab style="width: 120px; height: 40px;">TAB</paper-tab> - </template> - - <template id="imports"> - <link rel="import" href="paper-tab.html"> - </template> - -</x-meta> - -<x-meta id="paper-tab-panel" label="Panel with Tabs" group="Paper" isContainer> - - <template> - <section layout vertical style="width:420px;height:630px;border:5px solid #ccc;"> - <paper-tabs selected="0" noink nobar style="background-color:#00bcd4; color:#fff;box-shadow:0px 3px 2px rgba(0, 0, 0, 0.2);"> - <paper-tab>ITEM ONE</paper-tab> - <paper-tab>ITEM TWO</paper-tab> - </paper-tabs> - <section flex relative> - </section> - </section> - </template> - - <template id="imports"> - <link rel="import" href="paper-tabs.html"> - </template> - -</x-meta> diff --git a/third_party/polymer/components/paper-tabs/paper-tab.css b/third_party/polymer/components/paper-tabs/paper-tab.css deleted file mode 100644 index 74ad3d1..0000000 --- a/third_party/polymer/components/paper-tabs/paper-tab.css +++ /dev/null @@ -1,49 +0,0 @@ -/* -Copyright (c) 2014 The Polymer Project Authors. All rights reserved. -This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt -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 -*/ - -:host { - display: block; - position: relative; - overflow: hidden; -} - -#tabContainer { - position: absolute; - top: 0; - right: 0; - bottom: 0; - left: 0; -} - -.tab-content { - transition: opacity .1s cubic-bezier(0.4, 0.0, 1, 1), color .1s cubic-bezier(0.4, 0.0, 1, 1); - cursor: default; - pointer-events: none; -} - -:host(:not(.core-selected)) .tab-content { - opacity: 0.6; -} - -#ink { - position: absolute; - top: 0; - right: 0; - bottom: 0; - left: 0; - color: #ffff8d; -} - -:host[noink] #ink { - pointer-events: none; -} - -:host-context(paper-tabs[noink]) #ink { - pointer-events: none; -} diff --git a/third_party/polymer/components/paper-tabs/paper-tab.html b/third_party/polymer/components/paper-tabs/paper-tab.html deleted file mode 100644 index 8104a84..0000000 --- a/third_party/polymer/components/paper-tabs/paper-tab.html +++ /dev/null @@ -1,66 +0,0 @@ -<!-- -Copyright (c) 2014 The Polymer Project Authors. All rights reserved. -This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt -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 ---> - -<!-- -`paper-tab` is styled to look like a tab. It should be used in conjunction with -`paper-tabs`. - -Example: - - <paper-tabs selected="0"> - <paper-tab>TAB 1</paper-tab> - <paper-tab>TAB 2</paper-tab> - <paper-tab>TAB 3</paper-tab> - </paper-tabs> - -Styling tab: - -To change the ink color: - - .pink paper-tab::shadow #ink { - color: #ff4081; - } - -@group Paper Elements -@element paper-tab -@homepage github.io ---> - -<link rel="import" href="../paper-ripple/paper-ripple.html"> - -<polymer-element name="paper-tab" attributes="noink" role="tab"> -<template> - - <link rel="stylesheet" href="paper-tab.css"> - - <div id="tabContainer" center-justified center horizontal layout> - - <div class="tab-content"><content></content></div> - <paper-ripple id="ink" initialOpacity="0.95" opacityDecayVelocity="0.98"></paper-ripple> - - </div> - -</template> -<script> - - Polymer('paper-tab', { - - /** - * If true, ink ripple effect is disabled. - * - * @attribute noink - * @type boolean - * @default false - */ - noink: false - - }); - -</script> -</polymer-element> diff --git a/third_party/polymer/components/paper-tabs/paper-tabs.css b/third_party/polymer/components/paper-tabs/paper-tabs.css deleted file mode 100644 index b247c1c..0000000 --- a/third_party/polymer/components/paper-tabs/paper-tabs.css +++ /dev/null @@ -1,57 +0,0 @@ -/* -Copyright (c) 2014 The Polymer Project Authors. All rights reserved. -This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt -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 -*/ - -:host { - display: block; - position: relative; - font-size: 14px; - font-weight: 500; - height: 48px; - overflow: hidden; -} - -#tabsContainer { - position: absolute; - top: 0; - right: 0; - bottom: 0; - left: 0; - white-space: nowrap; -} - -#selectionBar { - position: absolute; - height: 2px; - bottom: 0; - left: 0; - width: 0; - background-color: #ffff8d; - transition: width, left; -} - -#selectionBar[hidden] { - display: hidden; -} - -#selectionBar.expand { - transition-duration: 0.15s; - transition-timing-function: cubic-bezier(0.4, 0.0, 1, 1); -} - -#selectionBar.contract { - transition-duration: 0.1s; - transition-timing-function: cubic-bezier(0.0, 0.0, 0.2, 1); -} - -polyfill-next-selector { content: '#tabsContainer > *:not(#selectionBar)'; } -::content > * { - -ms-flex: 1; - -webkit-flex: 1; - flex: 1; -} diff --git a/third_party/polymer/components/paper-tabs/paper-tabs.html b/third_party/polymer/components/paper-tabs/paper-tabs.html deleted file mode 100644 index 28c4f29..0000000 --- a/third_party/polymer/components/paper-tabs/paper-tabs.html +++ /dev/null @@ -1,128 +0,0 @@ -<!-- -Copyright (c) 2014 The Polymer Project Authors. All rights reserved. -This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt -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 ---> - -<!-- -`paper-tabs` is a `core-selector` styled to look like tabs. Tabs make it easy to -explore and switch between different views or functional aspects of an app, or -to browse categorized data sets. - -Use `selected` property to get or set the selected tab. - -Example: - - <paper-tabs selected="0"> - <paper-tab>TAB 1</paper-tab> - <paper-tab>TAB 2</paper-tab> - <paper-tab>TAB 3</paper-tab> - </paper-tabs> - -See <a href="#paper-tab">paper-tab</a> for more information about -`paper-tab`. - -Styling tabs: - -To change the sliding bar color: - - paper-tabs.pink::shadow #selectionBar { - background-color: #ff4081; - } - -@group Paper Elements -@element paper-tabs -@extends core-selector -@homepage github.io ---> - -<link rel="import" href="../core-selector/core-selector.html"> -<link rel="import" href="paper-tab.html"> - -<polymer-element name="paper-tabs" extends="core-selector" attributes="noink nobar" role="tablist"> -<template> - - <link rel="stylesheet" href="paper-tabs.css"> - - <div id="tabsContainer" horizontal layout> - - <shadow></shadow> - <div id="selectionBar" hidden?="{{nobar}}" on-transitionend="{{barTransitionEnd}}"></div> - - </div> - -</template> -<script> - - Polymer('paper-tabs', { - - /** - * If true, ink effect is disabled. - * - * @attribute noink - * @type boolean - * @default false - */ - noink: false, - - /** - * If true, the bottom bar to indicate the selected tab will not be shown. - * - * @attribute nobar - * @type boolean - * @default false - */ - nobar: false, - - activateEvent: 'down', - - nostretch: false, - - selectedIndexChanged: function(old) { - var s = this.$.selectionBar.style; - - if (!this.selectedItem) { - s.width = 0; - s.left = 0; - return; - } - - var w = 100 / this.items.length; - - if (this.nostretch || old === null || old === -1) { - s.width = w + '%'; - s.left = this.selectedIndex * w + '%'; - return; - } - - var m = 5; - this.$.selectionBar.classList.add('expand'); - if (old < this.selectedIndex) { - s.width = w + w * (this.selectedIndex - old) - m + '%'; - } else { - s.width = w + w * (old - this.selectedIndex) - m + '%'; - s.left = this.selectedIndex * w + m + '%'; - } - }, - - barTransitionEnd: function() { - var cl = this.$.selectionBar.classList; - if (cl.contains('expand')) { - cl.remove('expand'); - cl.add('contract'); - var s = this.$.selectionBar.style; - var w = 100 / this.items.length; - s.width = w + '%'; - s.left = this.selectedIndex * w + '%'; - } else if (cl.contains('contract')) { - cl.remove('contract'); - } - } - - }); - -</script> -</polymer-element> diff --git a/third_party/polymer/components/paper-toast/.bower.json b/third_party/polymer/components/paper-toast/.bower.json deleted file mode 100644 index 363fdff..0000000 --- a/third_party/polymer/components/paper-toast/.bower.json +++ /dev/null @@ -1,21 +0,0 @@ -{ - "name": "paper-toast", - "private": true, - "dependencies": { - "core-media-query": "Polymer/core-media-query#>=0.3.0 <1.0.0", - "core-overlay": "Polymer/core-overlay#>=0.3.0 <1.0.0", - "font-roboto": "Polymer/font-roboto#>=0.3.0 <1.0.0", - "paper-button": "Polymer/paper-button#>=0.3.0 <1.0.0" - }, - "homepage": "https://github.com/Polymer/paper-toast", - "version": "0.3.5", - "_release": "0.3.5", - "_resolution": { - "type": "version", - "tag": "0.3.5", - "commit": "1e7e60127901675f181f6c4385e520a0bc6df607" - }, - "_source": "git://github.com/Polymer/paper-toast.git", - "_target": "0.3.5", - "_originalSource": "Polymer/paper-toast" -}
\ No newline at end of file diff --git a/third_party/polymer/components/paper-toast/README.md b/third_party/polymer/components/paper-toast/README.md deleted file mode 100644 index 9db6676..0000000 --- a/third_party/polymer/components/paper-toast/README.md +++ /dev/null @@ -1,4 +0,0 @@ -paper-toast -============ - -See the [component page](http://www.polymer-project.org/docs/elements/paper-elements.html#paper-toast) for more information. diff --git a/third_party/polymer/components/paper-toast/bower.json b/third_party/polymer/components/paper-toast/bower.json deleted file mode 100644 index 3c34334..0000000 --- a/third_party/polymer/components/paper-toast/bower.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "name": "paper-toast", - "private": true, - "dependencies": { - "core-media-query": "Polymer/core-media-query#>=0.3.0 <1.0.0", - "core-overlay": "Polymer/core-overlay#>=0.3.0 <1.0.0", - "font-roboto": "Polymer/font-roboto#>=0.3.0 <1.0.0", - "paper-button": "Polymer/paper-button#>=0.3.0 <1.0.0" - } -}
\ No newline at end of file diff --git a/third_party/polymer/components/paper-toast/demo.html b/third_party/polymer/components/paper-toast/demo.html deleted file mode 100644 index a614973..0000000 --- a/third_party/polymer/components/paper-toast/demo.html +++ /dev/null @@ -1,58 +0,0 @@ -<!doctype html> -<html> -<head> - <title>paper-toast</title> - - <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0"> - <meta name="mobile-web-app-capable" content="yes"> - <meta name="apple-mobile-web-app-capable" content="yes"> - - <script src="../platform/platform.js"></script> - - <link rel="import" href="paper-toast.html"> - <link rel="import" href="../font-roboto/roboto.html" > - <link rel="import" href="../paper-button/paper-button.html" > - - <style> - - html, body { - height: 100%; - } - - body { - overflow: hidden; - margin: 0; - font-family: RobotoDraft, 'Helvetica Neue', Helvetica, Arial; - -webkit-user-select: none; - -moz-user-select: none; - -ms-user-select: none; - user-select: none; - -webkit-tap-highlight-color: rgba(0,0,0,0); - -webkit-touch-callout: none; - } - - paper-button { - margin: 20px; - } - - </style> - -</head> -<body unresolved> - - <paper-button raisedButton onclick="document.querySelector('#toast1').show()" label="Discard Draft"></paper-button> - - <paper-button raisedButton onclick="document.querySelector('#toast2').show()" label="Get Messages"></paper-button> - - <paper-button raisedButton onclick="document.querySelector('#toast3').show()" label="Send Message"></paper-button> - - <paper-toast id="toast1" text="Your draft has been discarded."></paper-toast> - - <paper-toast id="toast2" role="alert" text="Connection timed out. Showing limited messages."> - <div style="color: #eeff41;" onclick="console.log('RETRY')">Retry</div> - </paper-toast> - - <paper-toast id="toast3" class="capsule" text="Message sent" style="padding-right: 60px;"></paper-toast> - -</body> -</html> diff --git a/third_party/polymer/components/paper-toast/index.html b/third_party/polymer/components/paper-toast/index.html deleted file mode 100644 index 58856f3..0000000 --- a/third_party/polymer/components/paper-toast/index.html +++ /dev/null @@ -1,22 +0,0 @@ -<!doctype html> -<!-- -Copyright (c) 2014 The Polymer Project Authors. All rights reserved. -This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE -The complete set of authors may be found at http://polymer.github.io/AUTHORS -The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS -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 ---> -<html> -<head> - - <script src="../platform/platform.js"></script> - <link rel="import" href="../core-component-page/core-component-page.html"> - -</head> -<body unresolved> - - <core-component-page></core-component-page> - -</body> -</html> diff --git a/third_party/polymer/components/paper-toast/metadata.html b/third_party/polymer/components/paper-toast/metadata.html deleted file mode 100644 index 7b65bd7..0000000 --- a/third_party/polymer/components/paper-toast/metadata.html +++ /dev/null @@ -1,11 +0,0 @@ -<x-meta id="paper-toast" label="Toast" group="Paper" isContainer> - - <template> - <paper-toast text="Toast!"></paper-toast> - </template> - - <template id="imports"> - <link rel="import" href="paper-toast.html"> - </template> - -</x-meta> diff --git a/third_party/polymer/components/paper-toast/paper-toast.css b/third_party/polymer/components/paper-toast/paper-toast.css deleted file mode 100644 index a677104..0000000 --- a/third_party/polymer/components/paper-toast/paper-toast.css +++ /dev/null @@ -1,80 +0,0 @@ -/* -Copyright (c) 2014 The Polymer Project Authors. All rights reserved. -This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt -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 -*/ - -:host { - display: inline-block; - background: #323232; - color: #f1f1f1; - min-height: 48px; - min-width: 288px; - padding: 16px 24px 12px; - box-sizing: border-box; - -moz-box-sizing: border-box; - box-shadow: 0 2px 5px 0 rgba(0, 0, 0, 0.26); - border-radius: 2px; - bottom: 12px; - left: 12px; - font-size: 14px; - cursor: default; -} - -:host(.capsule) { - border-radius: 24px; -} - -:host(.fit-bottom) { - bottom: 0; - left: 0; - width: 100%; - min-width: 0; - border-radius: 0; -} - -:host(.core-transition.dragging) { - transition: none; -} - -:host(.core-transition.fade-out-down), -:host(.core-transition.fade-out-up), -:host(.core-transition.fade-out-right), -:host(.core-transition.fade-out-left) { - opacity: 0; - transition: -webkit-transform 0.08s ease-in-out, opacity 0.08s ease-in-out; - transition: transform 0.08s ease-in-out, opacity 0.08s ease-in-out; -} - -:host(.core-transition.fade-out-down) { - -webkit-transform: translate(0, 100%); - transform: translate(0, 100%); -} - -:host(.core-transition.fade-out-up) { - -webkit-transform: translate(0, -100%); - transform: translate(0, -100%); -} - -:host(.core-transition.fade-out-right) { - -webkit-transform: translate(100%, 0); - transform: translate(100%, 0); -} - -:host(.core-transition.fade-out-left) { - -webkit-transform: translate(-100%, 0); - transform: translate(-100%, 0); -} - -.toast-container { - overflow: hidden; -} - -.toast-action { - padding-left: 24px; - cursor: pointer; - text-transform: uppercase; -} diff --git a/third_party/polymer/components/paper-toast/paper-toast.html b/third_party/polymer/components/paper-toast/paper-toast.html deleted file mode 100644 index df62e50..0000000 --- a/third_party/polymer/components/paper-toast/paper-toast.html +++ /dev/null @@ -1,258 +0,0 @@ -<!-- -Copyright (c) 2014 The Polymer Project Authors. All rights reserved. -This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt -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 ---> - -<!-- -`paper-toast` provides lightweight feedback about an operation in a small popup -at the base of the screen on mobile and at the lower left on desktop. Toasts are -above all other elements on screen, including the FAB. - -Toasts automatically disappear after a timeout or after user interaction -elsewhere on the screen, whichever comes first. Toasts can be swiped off -screen. There can be only one on the screen at a time. - -Example: - - <paper-toast text="Your draft has been discarded." onclick="discardDraft(el)"></paper-toast> - - <script> - function discardDraft(el) { - el.show(); - } - </script> - -An action button can be presented in the toast. - -Example (using Polymer's data-binding features): - - <paper-toast id="toast2" text="Connection timed out. Showing limited messages."> - <div style="color: blue;" on-tap="{{retry}}">Retry</div> - </paper-toast> - -Positioning toast: - -A standard toast appears near the lower left of the screen. You can change the -position by overriding bottom and left positions. - - paper-toast { - bottom: 40px; - left: 10px; - } - -To make it fit at the bottom of the screen: - - paper-toast { - bottom: 0; - left: 0; - width: 100%; - } - -When the screen size is smaller than the `responsiveWidth` (default to 480px), -the toast will automatically fits at the bottom of the screen. - -@group Paper Elements -@element paper-toast -@homepage github.io ---> - -<link rel="import" href="../core-overlay/core-overlay.html"> -<link rel="import" href="../core-transition/core-transition-css.html"> -<link rel="import" href="../core-media-query/core-media-query.html"> - -<polymer-element name="paper-toast" attributes="text duration opened responsiveWidth swipeDisabled" role="status"> - -<template> - - <link rel="stylesheet" href="paper-toast.css" > - - <core-overlay opened="{{opened}}" target="{{}}" sizingTarget="{{$.container}}" transition="core-transition-bottom"></core-overlay> - - <div class="toast-container" horizontal layout> - - <div class="toast-text" flex>{{text}}</div> - - <div class="toast-text toast-action" on-tap="{{dismiss}}"> - <content></content> - </div> - - </div> - - <core-media-query query="max-width: {{responsiveWidth}}" queryMatches="{{narrowMode}}"></core-media-query> - -</template> -<script> - - (function() { - - var currentToast; - - Polymer('paper-toast', { - - /** - * The text shows in a toast. - * - * @attribute text - * @type string - * @default '' - */ - text: '', - - /** - * The duration in milliseconds to show the toast. - * - * @attribute duration - * @type number - * @default 3000 - */ - duration: 3000, - - /** - * Set opened to true to show the toast and to false to hide it. - * - * @attribute opened - * @type boolean - * @default false - */ - opened: false, - - /** - * Min-width when the toast changes to narrow layout. In narrow layout, - * the toast fits at the bottom of the screen when opened. - * - * @attribute responsiveWidth - * @type string - * @default '480px' - */ - responsiveWidth: '480px', - - /** - * If true, the toast can't be swiped. - * - * @attribute swipeDisabled - * @type boolean - * @default false - */ - swipeDisabled: false, - - eventDelegates: { - trackstart: 'trackStart', - track: 'track', - trackend: 'trackEnd', - transitionend: 'transitionEnd' - }, - - narrowModeChanged: function() { - this.classList.toggle('fit-bottom', this.narrowMode); - }, - - openedChanged: function() { - if (this.opened) { - this.dismissJob = this.job(this.dismissJob, this.dismiss, this.duration); - } else { - this.dismissJob && this.dismissJob.stop(); - this.dismiss(); - } - }, - - /** - * Toggle the opened state of the toast. - * @method toggle - */ - toggle: function() { - this.opened = !this.opened; - }, - - /** - * Show the toast for the specified duration - * @method show - */ - show: function() { - if (currentToast) { - currentToast.dismiss(); - } - currentToast = this; - this.opened = true; - }, - - /** - * Dismiss the toast and hide it. - * @method dismiss - */ - dismiss: function() { - if (this.dragging) { - this.shouldDismiss = true; - } else { - this.opened = false; - if (currentToast === this) { - currentToast = null; - } - } - }, - - trackStart: function(e) { - if (!this.swipeDisabled) { - e.preventTap(); - this.vertical = e.yDirection; - this.w = this.offsetWidth; - this.h = this.offsetHeight; - this.dragging = true; - this.classList.add('dragging'); - } - }, - - track: function(e) { - if (this.dragging) { - var s = this.style; - if (this.vertical) { - var y = e.dy; - s.opacity = (this.h - Math.abs(y)) / this.h; - s.webkitTransform = s.transform = 'translate3d(0, ' + y + 'px, 0)'; - } else { - var x = e.dx; - s.opacity = (this.w - Math.abs(x)) / this.w; - s.webkitTransform = s.transform = 'translate3d(' + x + 'px, 0, 0)'; - } - } - }, - - trackEnd: function(e) { - if (this.dragging) { - this.classList.remove('dragging'); - this.style.opacity = null; - this.style.webkitTransform = this.style.transform = null; - var cl = this.classList; - if (this.vertical) { - cl.toggle('fade-out-down', e.yDirection === 1 && e.dy > 0); - cl.toggle('fade-out-up', e.yDirection === -1 && e.dy < 0); - } else { - cl.toggle('fade-out-right', e.xDirection === 1 && e.dx > 0); - cl.toggle('fade-out-left', e.xDirection === -1 && e.dx < 0); - } - this.dragging = false; - } - }, - - transitionEnd: function() { - var cl = this.classList; - if (cl.contains('fade-out-right') || cl.contains('fade-out-left') || - cl.contains('fade-out-down') || cl.contains('fade-out-up')) { - this.dismiss(); - cl.remove('fade-out-right', 'fade-out-left', - 'fade-out-down', 'fade-out-up'); - } else if (this.shouldDismiss) { - this.dismiss(); - } - this.shouldDismiss = false; - } - - }); - - })(); - -</script> -</polymer-element> diff --git a/third_party/polymer/components/paper-toggle-button/.bower.json b/third_party/polymer/components/paper-toggle-button/.bower.json deleted file mode 100644 index cdb3e3b..0000000 --- a/third_party/polymer/components/paper-toggle-button/.bower.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "name": "paper-toggle-button", - "private": true, - "dependencies": { - "font-roboto": "Polymer/font-roboto#>=0.3.0 <1.0.0", - "paper-radio-button": "Polymer/paper-radio-button#>=0.3.0 <1.0.0" - }, - "homepage": "https://github.com/Polymer/paper-toggle-button", - "version": "0.3.5", - "_release": "0.3.5", - "_resolution": { - "type": "version", - "tag": "0.3.5", - "commit": "0f73aaad8fa48b13e2b0e26da85af846ee0222cd" - }, - "_source": "git://github.com/Polymer/paper-toggle-button.git", - "_target": "0.3.5", - "_originalSource": "Polymer/paper-toggle-button" -}
\ No newline at end of file diff --git a/third_party/polymer/components/paper-toggle-button/README.md b/third_party/polymer/components/paper-toggle-button/README.md deleted file mode 100644 index 314fd66..0000000 --- a/third_party/polymer/components/paper-toggle-button/README.md +++ /dev/null @@ -1,4 +0,0 @@ -paper-toggle-button -=================== - -See the [component page](http://www.polymer-project.org/docs/elements/paper-elements.html#paper-toggle-button) for more information. diff --git a/third_party/polymer/components/paper-toggle-button/bower.json b/third_party/polymer/components/paper-toggle-button/bower.json deleted file mode 100644 index 67a2f4c..0000000 --- a/third_party/polymer/components/paper-toggle-button/bower.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "name": "paper-toggle-button", - "private": true, - "dependencies": { - "font-roboto": "Polymer/font-roboto#>=0.3.0 <1.0.0", - "paper-radio-button": "Polymer/paper-radio-button#>=0.3.0 <1.0.0" - } -}
\ No newline at end of file diff --git a/third_party/polymer/components/paper-toggle-button/demo.html b/third_party/polymer/components/paper-toggle-button/demo.html deleted file mode 100644 index 72fc07a..0000000 --- a/third_party/polymer/components/paper-toggle-button/demo.html +++ /dev/null @@ -1,68 +0,0 @@ -<!doctype html> -<html> -<head> - <title>paper-toggle-button</title> - - <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0"> - <meta name="mobile-web-app-capable" content="yes"> - <meta name="apple-mobile-web-app-capable" content="yes"> - - <script src="../platform/platform.js"></script> - - <link rel="import" href="paper-toggle-button.html"> - <link rel="import" href="../font-roboto/roboto.html"> - - <style shim-shadowdom> - - body { - font-family: RobotoDraft, 'Helvetica Neue', Helvetica, Arial; - margin: 0; - padding: 24px; - -webkit-user-select: none; - -moz-user-select: none; - -ms-user-select: none; - user-select: none; - -webkit-tap-highlight-color: rgba(0,0,0,0); - -webkit-touch-callout: none; - } - - section { - width: 200px; - } - - paper-toggle-button.blue::shadow paper-radio-button::shadow #ink[checked] { - color: #4285f4; - } - - paper-toggle-button.blue::shadow paper-radio-button::shadow #onRadio { - background-color: #4285f4; - } - - paper-toggle-button.blue::shadow #toggleBar[checked] { - background-color: #4285f4; - } - - </style> - -</head> -<body unresolved> - - <section> - - <div center horizontal layout> - <div flex>Wi-Fi</div> - <paper-toggle-button checked></paper-toggle-button> - </div> - - <br> - <br> - - <div center horizontal layout> - <div flex>Bluetooth</div> - <paper-toggle-button class="blue"></paper-toggle-button> - </div> - - </section> - -</body> -</html> diff --git a/third_party/polymer/components/paper-toggle-button/index.html b/third_party/polymer/components/paper-toggle-button/index.html deleted file mode 100644 index 58856f3..0000000 --- a/third_party/polymer/components/paper-toggle-button/index.html +++ /dev/null @@ -1,22 +0,0 @@ -<!doctype html> -<!-- -Copyright (c) 2014 The Polymer Project Authors. All rights reserved. -This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE -The complete set of authors may be found at http://polymer.github.io/AUTHORS -The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS -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 ---> -<html> -<head> - - <script src="../platform/platform.js"></script> - <link rel="import" href="../core-component-page/core-component-page.html"> - -</head> -<body unresolved> - - <core-component-page></core-component-page> - -</body> -</html> diff --git a/third_party/polymer/components/paper-toggle-button/metadata.html b/third_party/polymer/components/paper-toggle-button/metadata.html deleted file mode 100644 index bdddd00..0000000 --- a/third_party/polymer/components/paper-toggle-button/metadata.html +++ /dev/null @@ -1,8 +0,0 @@ -<x-meta id="paper-toggle-button" label="Toggle Button" group="Paper"> - <template> - <paper-toggle-button></paper-toggle-button> - </template> - <template id="imports"> - <link rel="import" href="paper-toggle-button.html"> - </template> -</x-meta> diff --git a/third_party/polymer/components/paper-toggle-button/paper-toggle-button.css b/third_party/polymer/components/paper-toggle-button/paper-toggle-button.css deleted file mode 100644 index 3ff5e23..0000000 --- a/third_party/polymer/components/paper-toggle-button/paper-toggle-button.css +++ /dev/null @@ -1,61 +0,0 @@ -/* -Copyright (c) 2014 The Polymer Project Authors. All rights reserved. -This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt -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 -*/ - -:host { - display: inline-block; -} - -:host(:focus) { - outline: none; -} - -#toggleContainer { - position: relative; - width: 64px; - height: 16px; -} - -#toggleBar { - position: absolute; - top: 8px; - left: 16px; - height: 1px; - width: 32px; - background-color: #5a5a5a; - pointer-events: none; -} - -#toggleBar[checked] { - background-color: #0f9d58; -} - -#toggleContainer[checked] #checkedBar { - width: 100%; -} - -#toggleRadio { - position: absolute; - left: 0; - padding: 8px 48px 8px 0; - margin: -8px -48px -8px 0; - transition: -webkit-transform linear .08s; - transition: transform linear .08s; -} - -#toggleRadio[checked] { - -webkit-transform: translate(48px, 0); - transform: translate(48px, 0); - padding: 8px 0 8px 48px; - margin: -8px 0 -8px -48px; -} - -#toggleRadio.dragging { - -webkit-transition: none; - transition: none; -}
\ No newline at end of file diff --git a/third_party/polymer/components/paper-toggle-button/paper-toggle-button.html b/third_party/polymer/components/paper-toggle-button/paper-toggle-button.html deleted file mode 100644 index 7a4b107..0000000 --- a/third_party/polymer/components/paper-toggle-button/paper-toggle-button.html +++ /dev/null @@ -1,125 +0,0 @@ -<!-- -Copyright (c) 2014 The Polymer Project Authors. All rights reserved. -This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt -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 ---> - -<!-- -`paper-toggle-button` provides a ON/OFF switch that user can toggle the state -by tapping or by dragging the swtich. - -Example: - - <paper-toggle-button></paper-toggle-button> - -Styling toggle button: - -To change the ink color for checked state: - - paper-toggle-button::shadow paper-radio-button::shadow #ink[checked] { - color: #4285f4; - } - -To change the radio checked color: - - paper-toggle-button::shadow paper-radio-button::shadow #onRadio { - background-color: #4285f4; - } - -To change the bar color for checked state: - - paper-toggle-button::shadow #toggleBar[checked] { - background-color: #4285f4; - } - -To change the ink color for unchecked state: - - paper-toggle-button::shadow paper-radio-button::shadow #ink { - color: #b5b5b5; - } - -To change the radio unchecked color: - - paper-toggle-button::shadow paper-radio-button::shadow #offRadio { - border-color: #b5b5b5; - } - -To change the bar color for unchecked state: - - paper-toggle-button::shadow #toggleBar { - background-color: red; - } - -@group Paper Elements -@element paper-toggle-button -@homepage github.io ---> - -<link rel="import" href="../paper-radio-button/paper-radio-button.html"> - -<polymer-element name="paper-toggle-button" attributes="checked" role="button" aria-pressed="false" tabindex="0"> -<template> - - <link rel="stylesheet" href="paper-toggle-button.css"> - - <div id="toggleContainer"> - - <div id="toggleBar" checked?="{{checked}}"></div> - - <paper-radio-button id="toggleRadio" toggles checked="{{checked}}" - on-trackstart="{{trackStart}}" on-trackx="{{trackx}}" on-trackend="{{trackEnd}}"></paper-radio-button> - - </div> - -</template> -<script> - - Polymer('paper-toggle-button', { - - /** - * Fired when the checked state changes. - * - * @event change - */ - - /** - * Gets or sets the state, `true` is checked and `false` is unchecked. - * - * @attribute checked - * @type boolean - * @default false - */ - checked: false, - - trackStart: function(e) { - this._w = this.$.toggleBar.offsetLeft + this.$.toggleBar.offsetWidth; - e.preventTap(); - }, - - trackx: function(e) { - this._x = Math.min(this._w, - Math.max(0, this.checked ? this._w + e.dx : e.dx)); - this.$.toggleRadio.classList.add('dragging'); - var s = this.$.toggleRadio.style; - s.webkitTransform = s.transform = 'translate3d(' + this._x + 'px,0,0)'; - }, - - trackEnd: function() { - var s = this.$.toggleRadio.style; - s.webkitTransform = s.transform = null; - this.$.toggleRadio.classList.remove('dragging'); - this.checked = Math.abs(this._x) > this._w / 2; - }, - - checkedChanged: function() { - this.setAttribute('aria-pressed', Boolean(this.checked)); - this.fire('change'); - } - - }); - -</script> -</polymer-element> diff --git a/third_party/polymer/components/platform/platform.js.map b/third_party/polymer/components/platform/platform.js.map deleted file mode 100644 index bf670fb..0000000 --- a/third_party/polymer/components/platform/platform.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"platform.js","sources":["build/boot.js","../WeakMap/weakmap.js","../observe-js/src/observe.js","build/if-poly.js","../ShadowDOM/src/wrappers.js","../ShadowDOM/src/microtask.js","../ShadowDOM/src/MutationObserver.js","../ShadowDOM/src/TreeScope.js","../ShadowDOM/src/wrappers/events.js","../ShadowDOM/src/wrappers/TouchEvent.js","../ShadowDOM/src/wrappers/NodeList.js","../ShadowDOM/src/wrappers/HTMLCollection.js","../ShadowDOM/src/wrappers/Node.js","../ShadowDOM/src/querySelector.js","../ShadowDOM/src/wrappers/node-interfaces.js","../ShadowDOM/src/wrappers/CharacterData.js","../ShadowDOM/src/wrappers/Text.js","../ShadowDOM/src/wrappers/DOMTokenList.js","../ShadowDOM/src/wrappers/Element.js","../ShadowDOM/src/wrappers/HTMLElement.js","../ShadowDOM/src/wrappers/HTMLCanvasElement.js","../ShadowDOM/src/wrappers/HTMLContentElement.js","../ShadowDOM/src/wrappers/HTMLFormElement.js","../ShadowDOM/src/wrappers/HTMLImageElement.js","../ShadowDOM/src/wrappers/HTMLShadowElement.js","../ShadowDOM/src/wrappers/HTMLTemplateElement.js","../ShadowDOM/src/wrappers/HTMLMediaElement.js","../ShadowDOM/src/wrappers/HTMLAudioElement.js","../ShadowDOM/src/wrappers/HTMLOptionElement.js","../ShadowDOM/src/wrappers/HTMLSelectElement.js","../ShadowDOM/src/wrappers/HTMLTableElement.js","../ShadowDOM/src/wrappers/HTMLTableSectionElement.js","../ShadowDOM/src/wrappers/HTMLTableRowElement.js","../ShadowDOM/src/wrappers/HTMLUnknownElement.js","../ShadowDOM/src/wrappers/SVGElement.js","../ShadowDOM/src/wrappers/SVGUseElement.js","../ShadowDOM/src/wrappers/SVGElementInstance.js","../ShadowDOM/src/wrappers/CanvasRenderingContext2D.js","../ShadowDOM/src/wrappers/WebGLRenderingContext.js","../ShadowDOM/src/wrappers/Range.js","../ShadowDOM/src/wrappers/generic.js","../ShadowDOM/src/wrappers/ShadowRoot.js","../ShadowDOM/src/ShadowRenderer.js","../ShadowDOM/src/wrappers/elements-with-form-property.js","../ShadowDOM/src/wrappers/Selection.js","../ShadowDOM/src/wrappers/Document.js","../ShadowDOM/src/wrappers/Window.js","../ShadowDOM/src/wrappers/DataTransfer.js","../ShadowDOM/src/wrappers/FormData.js","../ShadowDOM/src/wrappers/override-constructors.js","src/patches-shadowdom-polyfill.js","src/ShadowCSS.js","src/patches-shadowdom-native.js","../URL/url.js","src/lang.js","src/dom.js","src/template.js","src/inspector.js","src/unresolved.js","src/module.js","src/microtask.js","src/url.js","../MutationObservers/MutationObserver.js","../HTMLImports/src/scope.js","../HTMLImports/src/Loader.js","../HTMLImports/src/Parser.js","../HTMLImports/src/HTMLImports.js","../HTMLImports/src/Observer.js","../HTMLImports/src/boot.js","../CustomElements/src/scope.js","../CustomElements/src/Observer.js","../CustomElements/src/CustomElements.js","../CustomElements/src/Parser.js","../CustomElements/src/boot.js","src/patches-custom-elements.js","src/loader.js","src/styleloader.js","../NodeBind/src/NodeBind.js","../TemplateBinding/src/TemplateBinding.js","src/patches-mdv.js"],"names":[],"mappings":";;;;;;;;;;;AASA,OAAA,SAAA,OAAA,aAEA,OAAA,SAAA,OAAA,aAEA,SAAA,GAEA,GAAA,GAAA,EAAA,SAEA,UAAA,OAAA,MAAA,GAAA,MAAA,KAAA,QAAA,SAAA,GACA,EAAA,EAAA,MAAA,KACA,EAAA,KAAA,EAAA,EAAA,IAAA,EAAA,KAAA,IAEA,IAAA,GAAA,SAAA,eACA,SAAA,cAAA,6BACA,IAAA,EAEA,IAAA,GAAA,GADA,EAAA,EAAA,WACA,EAAA,EAAA,EAAA,EAAA,OAAA,IACA,EAAA,EAAA,GACA,QAAA,EAAA,OACA,EAAA,EAAA,MAAA,E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AGA,IAAA,EAAA,WAAA,EAAA,QAAA,OAGA,GAAA,GAAA,EAIA,IADA,GAAA,GAAA,KAAA,UAAA,OACA,EAAA,GACA,KAAA,oBAAA,GACA,KAIA,sBAAA,SAAA,GAEA,IAAA,GADA,GAAA,EAAA,UACA,EAAA,EAAA,EAAA,EAAA,OAAA,IACA,EAAA,GAAA,SAIA,UAAA,WACA,KAAA,gBAGA,KAAA,cAAA,QACA,KAAA,cAAA,SAGA,MAAA,WACA,IAAA,KAAA,OAAA,CAEA,KAAA,WACA,KAAA,GAAA,GAAA,EAAA,EAAA,KAAA,UAAA,OAAA,IACA,KAAA,sBAAA,KAAA,UAAA,GAGA,MAAA,UAAA,OAAA,EACA,KAAA,YACA,KAAA,iBAAA,UAAA,OACA,KAAA,QAAA,KAKA,oBAAA,qBAAA,GACA,MC5vCA,SAAA,GAUA,QAAA,KACA,IACA,GAAA,EACA,EAAA,eAAA,WACA,GAAA,EACA,SAAA,MAAA,QAAA,MAAA,oBACA,EAAA,6BACA,SAAA,MAAA,QAAA,cAdA,GAAA,GAAA,SAAA,cAAA,QACA,GAAA,YAAA,oEACA,IAAA,GAAA,SAAA,cAAA,OACA,GAAA,aAAA,EAAA,EAAA,WAGA,IAAA,EAeA,IAAA,SAAA,iBAQA,EAAA,iBARA,CACA,GAAA,GAAA,GACA,QAAA,iBAAA,qBAAA,WACA,IACA,EAAA,UAAA,YAAA,EAAA,KAOA,GAAA,OAAA,iBAAA,eAAA,UAAA,CACA,GAAA,GAAA,SAAA,UAAA,UACA,UAAA,UAAA,WAAA,SAAA,EAAA,GACA,GAAA,GAAA,EAAA,KAAA,KAAA,EAAA,EAEA,OADA,gBAAA,WAAA,GACA,GAKA,EAAA,MAAA,GAEA,OAAA","sourcesContent":["/**\n * Copyright (c) 2014 The Polymer Project Authors. All rights reserved.\n * This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt\n * The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt\n * The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt\n * Code distributed by Google as part of the polymer project is also\n * subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt\n */\n\nwindow.Platform = window.Platform || {};\n// prepopulate window.logFlags if necessary\nwindow.logFlags = window.logFlags || {};\n// process flags\n(function(scope){\n // import\n var flags = scope.flags || {};\n // populate flags from location\n location.search.slice(1).split('&').forEach(function(o) {\n o = o.split('=');\n o[0] && (flags[o[0]] = o[1] || true);\n });\n var entryPoint = document.currentScript ||\n document.querySelector('script[src*=\"platform.js\"]');\n if (entryPoint) {\n var a = entryPoint.attributes;\n for (var i = 0, n; i < a.length; i++) {\n n = a[i];\n if (n.name !== 'src') {\n flags[n.name] = n.value || true;\n }\n }\n }\n if (flags.log) {\n flags.log.split(',').forEach(function(f) {\n window.logFlags[f] = true;\n });\n }\n // If any of these flags match 'native', then force native ShadowDOM; any\n // other truthy value, or failure to detect native\n // ShadowDOM, results in polyfill\n flags.shadow = flags.shadow || flags.shadowdom || flags.polyfill;\n if (flags.shadow === 'native') {\n flags.shadow = false;\n } else {\n flags.shadow = flags.shadow || !HTMLElement.prototype.createShadowRoot;\n }\n\n if (flags.shadow && document.querySelectorAll('script').length > 1) {\n console.warn('platform.js is not the first script on the page. ' +\n 'See http://www.polymer-project.org/docs/start/platform.html#setup ' +\n 'for details.');\n }\n\n // CustomElements polyfill flag\n if (flags.register) {\n window.CustomElements = window.CustomElements || {flags: {}};\n window.CustomElements.flags.register = flags.register;\n }\n\n if (flags.imports) {\n window.HTMLImports = window.HTMLImports || {flags: {}};\n window.HTMLImports.flags.imports = flags.imports;\n }\n\n // export\n scope.flags = flags;\n})(Platform);\n","/*\n * Copyright 2012 The Polymer Authors. All rights reserved.\n * Use of this source code is governed by a BSD-style\n * license that can be found in the LICENSE file.\n */\n\nif (typeof WeakMap === 'undefined') {\n (function() {\n var defineProperty = Object.defineProperty;\n var counter = Date.now() % 1e9;\n\n var WeakMap = function() {\n this.name = '__st' + (Math.random() * 1e9 >>> 0) + (counter++ + '__');\n };\n\n WeakMap.prototype = {\n set: function(key, value) {\n var entry = key[this.name];\n if (entry && entry[0] === key)\n entry[1] = value;\n else\n defineProperty(key, this.name, {value: [key, value], writable: true});\n },\n get: function(key) {\n var entry;\n return (entry = key[this.name]) && entry[0] === key ?\n entry[1] : undefined;\n },\n delete: function(key) {\n var entry = key[this.name];\n if (!entry) return false;\n var hasValue = entry[0] === key;\n entry[0] = entry[1] = undefined;\n return hasValue;\n },\n has: function(key) {\n var entry = key[this.name];\n if (!entry) return false;\n return entry[0] === key;\n }\n };\n\n window.WeakMap = WeakMap;\n })();\n}\n","// Copyright 2012 Google Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n(function(global) {\n 'use strict';\n\n var testingExposeCycleCount = global.testingExposeCycleCount;\n\n // Detect and do basic sanity checking on Object/Array.observe.\n function detectObjectObserve() {\n if (typeof Object.observe !== 'function' ||\n typeof Array.observe !== 'function') {\n return false;\n }\n\n var records = [];\n\n function callback(recs) {\n records = recs;\n }\n\n var test = {};\n var arr = [];\n Object.observe(test, callback);\n Array.observe(arr, callback);\n test.id = 1;\n test.id = 2;\n delete test.id;\n arr.push(1, 2);\n arr.length = 0;\n\n Object.deliverChangeRecords(callback);\n if (records.length !== 5)\n return false;\n\n if (records[0].type != 'add' ||\n records[1].type != 'update' ||\n records[2].type != 'delete' ||\n records[3].type != 'splice' ||\n records[4].type != 'splice') {\n return false;\n }\n\n Object.unobserve(test, callback);\n Array.unobserve(arr, callback);\n\n return true;\n }\n\n var hasObserve = detectObjectObserve();\n\n function detectEval() {\n // Don't test for eval if we're running in a Chrome App environment.\n // We check for APIs set that only exist in a Chrome App context.\n if (typeof chrome !== 'undefined' && chrome.app && chrome.app.runtime) {\n return false;\n }\n\n // Firefox OS Apps do not allow eval. This feature detection is very hacky\n // but even if some other platform adds support for this function this code\n // will continue to work.\n if (navigator.getDeviceStorage) {\n return false;\n }\n\n try {\n var f = new Function('', 'return true;');\n return f();\n } catch (ex) {\n return false;\n }\n }\n\n var hasEval = detectEval();\n\n function isIndex(s) {\n return +s === s >>> 0;\n }\n\n function toNumber(s) {\n return +s;\n }\n\n function isObject(obj) {\n return obj === Object(obj);\n }\n\n var numberIsNaN = global.Number.isNaN || function(value) {\n return typeof value === 'number' && global.isNaN(value);\n }\n\n function areSameValue(left, right) {\n if (left === right)\n return left !== 0 || 1 / left === 1 / right;\n if (numberIsNaN(left) && numberIsNaN(right))\n return true;\n\n return left !== left && right !== right;\n }\n\n var createObject = ('__proto__' in {}) ?\n function(obj) { return obj; } :\n function(obj) {\n var proto = obj.__proto__;\n if (!proto)\n return obj;\n var newObject = Object.create(proto);\n Object.getOwnPropertyNames(obj).forEach(function(name) {\n Object.defineProperty(newObject, name,\n Object.getOwnPropertyDescriptor(obj, name));\n });\n return newObject;\n };\n\n var identStart = '[\\$_a-zA-Z]';\n var identPart = '[\\$_a-zA-Z0-9]';\n var identRegExp = new RegExp('^' + identStart + '+' + identPart + '*' + '$');\n\n function getPathCharType(char) {\n if (char === undefined)\n return 'eof';\n\n var code = char.charCodeAt(0);\n\n switch(code) {\n case 0x5B: // [\n case 0x5D: // ]\n case 0x2E: // .\n case 0x22: // \"\n case 0x27: // '\n case 0x30: // 0\n return char;\n\n case 0x5F: // _\n case 0x24: // $\n return 'ident';\n\n case 0x20: // Space\n case 0x09: // Tab\n case 0x0A: // Newline\n case 0x0D: // Return\n case 0xA0: // No-break space\n case 0xFEFF: // Byte Order Mark\n case 0x2028: // Line Separator\n case 0x2029: // Paragraph Separator\n return 'ws';\n }\n\n // a-z, A-Z\n if ((0x61 <= code && code <= 0x7A) || (0x41 <= code && code <= 0x5A))\n return 'ident';\n\n // 1-9\n if (0x31 <= code && code <= 0x39)\n return 'number';\n\n return 'else';\n }\n\n var pathStateMachine = {\n 'beforePath': {\n 'ws': ['beforePath'],\n 'ident': ['inIdent', 'append'],\n '[': ['beforeElement'],\n 'eof': ['afterPath']\n },\n\n 'inPath': {\n 'ws': ['inPath'],\n '.': ['beforeIdent'],\n '[': ['beforeElement'],\n 'eof': ['afterPath']\n },\n\n 'beforeIdent': {\n 'ws': ['beforeIdent'],\n 'ident': ['inIdent', 'append']\n },\n\n 'inIdent': {\n 'ident': ['inIdent', 'append'],\n '0': ['inIdent', 'append'],\n 'number': ['inIdent', 'append'],\n 'ws': ['inPath', 'push'],\n '.': ['beforeIdent', 'push'],\n '[': ['beforeElement', 'push'],\n 'eof': ['afterPath', 'push']\n },\n\n 'beforeElement': {\n 'ws': ['beforeElement'],\n '0': ['afterZero', 'append'],\n 'number': ['inIndex', 'append'],\n \"'\": ['inSingleQuote', 'append', ''],\n '\"': ['inDoubleQuote', 'append', '']\n },\n\n 'afterZero': {\n 'ws': ['afterElement', 'push'],\n ']': ['inPath', 'push']\n },\n\n 'inIndex': {\n '0': ['inIndex', 'append'],\n 'number': ['inIndex', 'append'],\n 'ws': ['afterElement'],\n ']': ['inPath', 'push']\n },\n\n 'inSingleQuote': {\n \"'\": ['afterElement'],\n 'eof': ['error'],\n 'else': ['inSingleQuote', 'append']\n },\n\n 'inDoubleQuote': {\n '\"': ['afterElement'],\n 'eof': ['error'],\n 'else': ['inDoubleQuote', 'append']\n },\n\n 'afterElement': {\n 'ws': ['afterElement'],\n ']': ['inPath', 'push']\n }\n }\n\n function noop() {}\n\n function parsePath(path) {\n var keys = [];\n var index = -1;\n var c, newChar, key, type, transition, action, typeMap, mode = 'beforePath';\n\n var actions = {\n push: function() {\n if (key === undefined)\n return;\n\n keys.push(key);\n key = undefined;\n },\n\n append: function() {\n if (key === undefined)\n key = newChar\n else\n key += newChar;\n }\n };\n\n function maybeUnescapeQuote() {\n if (index >= path.length)\n return;\n\n var nextChar = path[index + 1];\n if ((mode == 'inSingleQuote' && nextChar == \"'\") ||\n (mode == 'inDoubleQuote' && nextChar == '\"')) {\n index++;\n newChar = nextChar;\n actions.append();\n return true;\n }\n }\n\n while (mode) {\n index++;\n c = path[index];\n\n if (c == '\\\\' && maybeUnescapeQuote(mode))\n continue;\n\n type = getPathCharType(c);\n typeMap = pathStateMachine[mode];\n transition = typeMap[type] || typeMap['else'] || 'error';\n\n if (transition == 'error')\n return; // parse error;\n\n mode = transition[0];\n action = actions[transition[1]] || noop;\n newChar = transition[2] === undefined ? c : transition[2];\n action();\n\n if (mode === 'afterPath') {\n return keys;\n }\n }\n\n return; // parse error\n }\n\n function isIdent(s) {\n return identRegExp.test(s);\n }\n\n var constructorIsPrivate = {};\n\n function Path(parts, privateToken) {\n if (privateToken !== constructorIsPrivate)\n throw Error('Use Path.get to retrieve path objects');\n\n for (var i = 0; i < parts.length; i++) {\n this.push(String(parts[i]));\n }\n\n if (hasEval && this.length) {\n this.getValueFrom = this.compiledGetValueFromFn();\n }\n }\n\n // TODO(rafaelw): Make simple LRU cache\n var pathCache = {};\n\n function getPath(pathString) {\n if (pathString instanceof Path)\n return pathString;\n\n if (pathString == null || pathString.length == 0)\n pathString = '';\n\n if (typeof pathString != 'string') {\n if (isIndex(pathString.length)) {\n // Constructed with array-like (pre-parsed) keys\n return new Path(pathString, constructorIsPrivate);\n }\n\n pathString = String(pathString);\n }\n\n var path = pathCache[pathString];\n if (path)\n return path;\n\n var parts = parsePath(pathString);\n if (!parts)\n return invalidPath;\n\n var path = new Path(parts, constructorIsPrivate);\n pathCache[pathString] = path;\n return path;\n }\n\n Path.get = getPath;\n\n function formatAccessor(key) {\n if (isIndex(key)) {\n return '[' + key + ']';\n } else {\n return '[\"' + key.replace(/\"/g, '\\\\\"') + '\"]';\n }\n }\n\n Path.prototype = createObject({\n __proto__: [],\n valid: true,\n\n toString: function() {\n var pathString = '';\n for (var i = 0; i < this.length; i++) {\n var key = this[i];\n if (isIdent(key)) {\n pathString += i ? '.' + key : key;\n } else {\n pathString += formatAccessor(key);\n }\n }\n\n return pathString;\n },\n\n getValueFrom: function(obj, directObserver) {\n for (var i = 0; i < this.length; i++) {\n if (obj == null)\n return;\n obj = obj[this[i]];\n }\n return obj;\n },\n\n iterateObjects: function(obj, observe) {\n for (var i = 0; i < this.length; i++) {\n if (i)\n obj = obj[this[i - 1]];\n if (!isObject(obj))\n return;\n observe(obj, this[0]);\n }\n },\n\n compiledGetValueFromFn: function() {\n var str = '';\n var pathString = 'obj';\n str += 'if (obj != null';\n var i = 0;\n var key;\n for (; i < (this.length - 1); i++) {\n key = this[i];\n pathString += isIdent(key) ? '.' + key : formatAccessor(key);\n str += ' &&\\n ' + pathString + ' != null';\n }\n str += ')\\n';\n\n var key = this[i];\n pathString += isIdent(key) ? '.' + key : formatAccessor(key);\n\n str += ' return ' + pathString + ';\\nelse\\n return undefined;';\n return new Function('obj', str);\n },\n\n setValueFrom: function(obj, value) {\n if (!this.length)\n return false;\n\n for (var i = 0; i < this.length - 1; i++) {\n if (!isObject(obj))\n return false;\n obj = obj[this[i]];\n }\n\n if (!isObject(obj))\n return false;\n\n obj[this[i]] = value;\n return true;\n }\n });\n\n var invalidPath = new Path('', constructorIsPrivate);\n invalidPath.valid = false;\n invalidPath.getValueFrom = invalidPath.setValueFrom = function() {};\n\n var MAX_DIRTY_CHECK_CYCLES = 1000;\n\n function dirtyCheck(observer) {\n var cycles = 0;\n while (cycles < MAX_DIRTY_CHECK_CYCLES && observer.check_()) {\n cycles++;\n }\n if (testingExposeCycleCount)\n global.dirtyCheckCycleCount = cycles;\n\n return cycles > 0;\n }\n\n function objectIsEmpty(object) {\n for (var prop in object)\n return false;\n return true;\n }\n\n function diffIsEmpty(diff) {\n return objectIsEmpty(diff.added) &&\n objectIsEmpty(diff.removed) &&\n objectIsEmpty(diff.changed);\n }\n\n function diffObjectFromOldObject(object, oldObject) {\n var added = {};\n var removed = {};\n var changed = {};\n\n for (var prop in oldObject) {\n var newValue = object[prop];\n\n if (newValue !== undefined && newValue === oldObject[prop])\n continue;\n\n if (!(prop in object)) {\n removed[prop] = undefined;\n continue;\n }\n\n if (newValue !== oldObject[prop])\n changed[prop] = newValue;\n }\n\n for (var prop in object) {\n if (prop in oldObject)\n continue;\n\n added[prop] = object[prop];\n }\n\n if (Array.isArray(object) && object.length !== oldObject.length)\n changed.length = object.length;\n\n return {\n added: added,\n removed: removed,\n changed: changed\n };\n }\n\n var eomTasks = [];\n function runEOMTasks() {\n if (!eomTasks.length)\n return false;\n\n for (var i = 0; i < eomTasks.length; i++) {\n eomTasks[i]();\n }\n eomTasks.length = 0;\n return true;\n }\n\n var runEOM = hasObserve ? (function(){\n var eomObj = { pingPong: true };\n var eomRunScheduled = false;\n\n Object.observe(eomObj, function() {\n runEOMTasks();\n eomRunScheduled = false;\n });\n\n return function(fn) {\n eomTasks.push(fn);\n if (!eomRunScheduled) {\n eomRunScheduled = true;\n eomObj.pingPong = !eomObj.pingPong;\n }\n };\n })() :\n (function() {\n return function(fn) {\n eomTasks.push(fn);\n };\n })();\n\n var observedObjectCache = [];\n\n function newObservedObject() {\n var observer;\n var object;\n var discardRecords = false;\n var first = true;\n\n function callback(records) {\n if (observer && observer.state_ === OPENED && !discardRecords)\n observer.check_(records);\n }\n\n return {\n open: function(obs) {\n if (observer)\n throw Error('ObservedObject in use');\n\n if (!first)\n Object.deliverChangeRecords(callback);\n\n observer = obs;\n first = false;\n },\n observe: function(obj, arrayObserve) {\n object = obj;\n if (arrayObserve)\n Array.observe(object, callback);\n else\n Object.observe(object, callback);\n },\n deliver: function(discard) {\n discardRecords = discard;\n Object.deliverChangeRecords(callback);\n discardRecords = false;\n },\n close: function() {\n observer = undefined;\n Object.unobserve(object, callback);\n observedObjectCache.push(this);\n }\n };\n }\n\n /*\n * The observedSet abstraction is a perf optimization which reduces the total\n * number of Object.observe observations of a set of objects. The idea is that\n * groups of Observers will have some object dependencies in common and this\n * observed set ensures that each object in the transitive closure of\n * dependencies is only observed once. The observedSet acts as a write barrier\n * such that whenever any change comes through, all Observers are checked for\n * changed values.\n *\n * Note that this optimization is explicitly moving work from setup-time to\n * change-time.\n *\n * TODO(rafaelw): Implement \"garbage collection\". In order to move work off\n * the critical path, when Observers are closed, their observed objects are\n * not Object.unobserve(d). As a result, it's possible that if the observedSet\n * is kept open, but some Observers have been closed, it could cause \"leaks\"\n * (prevent otherwise collectable objects from being collected). At some\n * point, we should implement incremental \"gc\" which keeps a list of\n * observedSets which may need clean-up and does small amounts of cleanup on a\n * timeout until all is clean.\n */\n\n function getObservedObject(observer, object, arrayObserve) {\n var dir = observedObjectCache.pop() || newObservedObject();\n dir.open(observer);\n dir.observe(object, arrayObserve);\n return dir;\n }\n\n var observedSetCache = [];\n\n function newObservedSet() {\n var observerCount = 0;\n var observers = [];\n var objects = [];\n var rootObj;\n var rootObjProps;\n\n function observe(obj, prop) {\n if (!obj)\n return;\n\n if (obj === rootObj)\n rootObjProps[prop] = true;\n\n if (objects.indexOf(obj) < 0) {\n objects.push(obj);\n Object.observe(obj, callback);\n }\n\n observe(Object.getPrototypeOf(obj), prop);\n }\n\n function allRootObjNonObservedProps(recs) {\n for (var i = 0; i < recs.length; i++) {\n var rec = recs[i];\n if (rec.object !== rootObj ||\n rootObjProps[rec.name] ||\n rec.type === 'setPrototype') {\n return false;\n }\n }\n return true;\n }\n\n function callback(recs) {\n if (allRootObjNonObservedProps(recs))\n return;\n\n var observer;\n for (var i = 0; i < observers.length; i++) {\n observer = observers[i];\n if (observer.state_ == OPENED) {\n observer.iterateObjects_(observe);\n }\n }\n\n for (var i = 0; i < observers.length; i++) {\n observer = observers[i];\n if (observer.state_ == OPENED) {\n observer.check_();\n }\n }\n }\n\n var record = {\n object: undefined,\n objects: objects,\n open: function(obs, object) {\n if (!rootObj) {\n rootObj = object;\n rootObjProps = {};\n }\n\n observers.push(obs);\n observerCount++;\n obs.iterateObjects_(observe);\n },\n close: function(obs) {\n observerCount--;\n if (observerCount > 0) {\n return;\n }\n\n for (var i = 0; i < objects.length; i++) {\n Object.unobserve(objects[i], callback);\n Observer.unobservedCount++;\n }\n\n observers.length = 0;\n objects.length = 0;\n rootObj = undefined;\n rootObjProps = undefined;\n observedSetCache.push(this);\n }\n };\n\n return record;\n }\n\n var lastObservedSet;\n\n function getObservedSet(observer, obj) {\n if (!lastObservedSet || lastObservedSet.object !== obj) {\n lastObservedSet = observedSetCache.pop() || newObservedSet();\n lastObservedSet.object = obj;\n }\n lastObservedSet.open(observer, obj);\n return lastObservedSet;\n }\n\n var UNOPENED = 0;\n var OPENED = 1;\n var CLOSED = 2;\n var RESETTING = 3;\n\n var nextObserverId = 1;\n\n function Observer() {\n this.state_ = UNOPENED;\n this.callback_ = undefined;\n this.target_ = undefined; // TODO(rafaelw): Should be WeakRef\n this.directObserver_ = undefined;\n this.value_ = undefined;\n this.id_ = nextObserverId++;\n }\n\n Observer.prototype = {\n open: function(callback, target) {\n if (this.state_ != UNOPENED)\n throw Error('Observer has already been opened.');\n\n addToAll(this);\n this.callback_ = callback;\n this.target_ = target;\n this.connect_();\n this.state_ = OPENED;\n return this.value_;\n },\n\n close: function() {\n if (this.state_ != OPENED)\n return;\n\n removeFromAll(this);\n this.disconnect_();\n this.value_ = undefined;\n this.callback_ = undefined;\n this.target_ = undefined;\n this.state_ = CLOSED;\n },\n\n deliver: function() {\n if (this.state_ != OPENED)\n return;\n\n dirtyCheck(this);\n },\n\n report_: function(changes) {\n try {\n this.callback_.apply(this.target_, changes);\n } catch (ex) {\n Observer._errorThrownDuringCallback = true;\n console.error('Exception caught during observer callback: ' +\n (ex.stack || ex));\n }\n },\n\n discardChanges: function() {\n this.check_(undefined, true);\n return this.value_;\n }\n }\n\n var collectObservers = !hasObserve;\n var allObservers;\n Observer._allObserversCount = 0;\n\n if (collectObservers) {\n allObservers = [];\n }\n\n function addToAll(observer) {\n Observer._allObserversCount++;\n if (!collectObservers)\n return;\n\n allObservers.push(observer);\n }\n\n function removeFromAll(observer) {\n Observer._allObserversCount--;\n }\n\n var runningMicrotaskCheckpoint = false;\n\n var hasDebugForceFullDelivery = hasObserve && hasEval && (function() {\n try {\n eval('%RunMicrotasks()');\n return true;\n } catch (ex) {\n return false;\n }\n })();\n\n global.Platform = global.Platform || {};\n\n global.Platform.performMicrotaskCheckpoint = function() {\n if (runningMicrotaskCheckpoint)\n return;\n\n if (hasDebugForceFullDelivery) {\n eval('%RunMicrotasks()');\n return;\n }\n\n if (!collectObservers)\n return;\n\n runningMicrotaskCheckpoint = true;\n\n var cycles = 0;\n var anyChanged, toCheck;\n\n do {\n cycles++;\n toCheck = allObservers;\n allObservers = [];\n anyChanged = false;\n\n for (var i = 0; i < toCheck.length; i++) {\n var observer = toCheck[i];\n if (observer.state_ != OPENED)\n continue;\n\n if (observer.check_())\n anyChanged = true;\n\n allObservers.push(observer);\n }\n if (runEOMTasks())\n anyChanged = true;\n } while (cycles < MAX_DIRTY_CHECK_CYCLES && anyChanged);\n\n if (testingExposeCycleCount)\n global.dirtyCheckCycleCount = cycles;\n\n runningMicrotaskCheckpoint = false;\n };\n\n if (collectObservers) {\n global.Platform.clearObservers = function() {\n allObservers = [];\n };\n }\n\n function ObjectObserver(object) {\n Observer.call(this);\n this.value_ = object;\n this.oldObject_ = undefined;\n }\n\n ObjectObserver.prototype = createObject({\n __proto__: Observer.prototype,\n\n arrayObserve: false,\n\n connect_: function(callback, target) {\n if (hasObserve) {\n this.directObserver_ = getObservedObject(this, this.value_,\n this.arrayObserve);\n } else {\n this.oldObject_ = this.copyObject(this.value_);\n }\n\n },\n\n copyObject: function(object) {\n var copy = Array.isArray(object) ? [] : {};\n for (var prop in object) {\n copy[prop] = object[prop];\n };\n if (Array.isArray(object))\n copy.length = object.length;\n return copy;\n },\n\n check_: function(changeRecords, skipChanges) {\n var diff;\n var oldValues;\n if (hasObserve) {\n if (!changeRecords)\n return false;\n\n oldValues = {};\n diff = diffObjectFromChangeRecords(this.value_, changeRecords,\n oldValues);\n } else {\n oldValues = this.oldObject_;\n diff = diffObjectFromOldObject(this.value_, this.oldObject_);\n }\n\n if (diffIsEmpty(diff))\n return false;\n\n if (!hasObserve)\n this.oldObject_ = this.copyObject(this.value_);\n\n this.report_([\n diff.added || {},\n diff.removed || {},\n diff.changed || {},\n function(property) {\n return oldValues[property];\n }\n ]);\n\n return true;\n },\n\n disconnect_: function() {\n if (hasObserve) {\n this.directObserver_.close();\n this.directObserver_ = undefined;\n } else {\n this.oldObject_ = undefined;\n }\n },\n\n deliver: function() {\n if (this.state_ != OPENED)\n return;\n\n if (hasObserve)\n this.directObserver_.deliver(false);\n else\n dirtyCheck(this);\n },\n\n discardChanges: function() {\n if (this.directObserver_)\n this.directObserver_.deliver(true);\n else\n this.oldObject_ = this.copyObject(this.value_);\n\n return this.value_;\n }\n });\n\n function ArrayObserver(array) {\n if (!Array.isArray(array))\n throw Error('Provided object is not an Array');\n ObjectObserver.call(this, array);\n }\n\n ArrayObserver.prototype = createObject({\n\n __proto__: ObjectObserver.prototype,\n\n arrayObserve: true,\n\n copyObject: function(arr) {\n return arr.slice();\n },\n\n check_: function(changeRecords) {\n var splices;\n if (hasObserve) {\n if (!changeRecords)\n return false;\n splices = projectArraySplices(this.value_, changeRecords);\n } else {\n splices = calcSplices(this.value_, 0, this.value_.length,\n this.oldObject_, 0, this.oldObject_.length);\n }\n\n if (!splices || !splices.length)\n return false;\n\n if (!hasObserve)\n this.oldObject_ = this.copyObject(this.value_);\n\n this.report_([splices]);\n return true;\n }\n });\n\n ArrayObserver.applySplices = function(previous, current, splices) {\n splices.forEach(function(splice) {\n var spliceArgs = [splice.index, splice.removed.length];\n var addIndex = splice.index;\n while (addIndex < splice.index + splice.addedCount) {\n spliceArgs.push(current[addIndex]);\n addIndex++;\n }\n\n Array.prototype.splice.apply(previous, spliceArgs);\n });\n };\n\n function PathObserver(object, path) {\n Observer.call(this);\n\n this.object_ = object;\n this.path_ = getPath(path);\n this.directObserver_ = undefined;\n }\n\n PathObserver.prototype = createObject({\n __proto__: Observer.prototype,\n\n get path() {\n return this.path_;\n },\n\n connect_: function() {\n if (hasObserve)\n this.directObserver_ = getObservedSet(this, this.object_);\n\n this.check_(undefined, true);\n },\n\n disconnect_: function() {\n this.value_ = undefined;\n\n if (this.directObserver_) {\n this.directObserver_.close(this);\n this.directObserver_ = undefined;\n }\n },\n\n iterateObjects_: function(observe) {\n this.path_.iterateObjects(this.object_, observe);\n },\n\n check_: function(changeRecords, skipChanges) {\n var oldValue = this.value_;\n this.value_ = this.path_.getValueFrom(this.object_);\n if (skipChanges || areSameValue(this.value_, oldValue))\n return false;\n\n this.report_([this.value_, oldValue, this]);\n return true;\n },\n\n setValue: function(newValue) {\n if (this.path_)\n this.path_.setValueFrom(this.object_, newValue);\n }\n });\n\n function CompoundObserver(reportChangesOnOpen) {\n Observer.call(this);\n\n this.reportChangesOnOpen_ = reportChangesOnOpen;\n this.value_ = [];\n this.directObserver_ = undefined;\n this.observed_ = [];\n }\n\n var observerSentinel = {};\n\n CompoundObserver.prototype = createObject({\n __proto__: Observer.prototype,\n\n connect_: function() {\n if (hasObserve) {\n var object;\n var needsDirectObserver = false;\n for (var i = 0; i < this.observed_.length; i += 2) {\n object = this.observed_[i]\n if (object !== observerSentinel) {\n needsDirectObserver = true;\n break;\n }\n }\n\n if (needsDirectObserver)\n this.directObserver_ = getObservedSet(this, object);\n }\n\n this.check_(undefined, !this.reportChangesOnOpen_);\n },\n\n disconnect_: function() {\n for (var i = 0; i < this.observed_.length; i += 2) {\n if (this.observed_[i] === observerSentinel)\n this.observed_[i + 1].close();\n }\n this.observed_.length = 0;\n this.value_.length = 0;\n\n if (this.directObserver_) {\n this.directObserver_.close(this);\n this.directObserver_ = undefined;\n }\n },\n\n addPath: function(object, path) {\n if (this.state_ != UNOPENED && this.state_ != RESETTING)\n throw Error('Cannot add paths once started.');\n\n var path = getPath(path);\n this.observed_.push(object, path);\n if (!this.reportChangesOnOpen_)\n return;\n var index = this.observed_.length / 2 - 1;\n this.value_[index] = path.getValueFrom(object);\n },\n\n addObserver: function(observer) {\n if (this.state_ != UNOPENED && this.state_ != RESETTING)\n throw Error('Cannot add observers once started.');\n\n this.observed_.push(observerSentinel, observer);\n if (!this.reportChangesOnOpen_)\n return;\n var index = this.observed_.length / 2 - 1;\n this.value_[index] = observer.open(this.deliver, this);\n },\n\n startReset: function() {\n if (this.state_ != OPENED)\n throw Error('Can only reset while open');\n\n this.state_ = RESETTING;\n this.disconnect_();\n },\n\n finishReset: function() {\n if (this.state_ != RESETTING)\n throw Error('Can only finishReset after startReset');\n this.state_ = OPENED;\n this.connect_();\n\n return this.value_;\n },\n\n iterateObjects_: function(observe) {\n var object;\n for (var i = 0; i < this.observed_.length; i += 2) {\n object = this.observed_[i]\n if (object !== observerSentinel)\n this.observed_[i + 1].iterateObjects(object, observe)\n }\n },\n\n check_: function(changeRecords, skipChanges) {\n var oldValues;\n for (var i = 0; i < this.observed_.length; i += 2) {\n var object = this.observed_[i];\n var path = this.observed_[i+1];\n var value;\n if (object === observerSentinel) {\n var observable = path;\n value = this.state_ === UNOPENED ?\n observable.open(this.deliver, this) :\n observable.discardChanges();\n } else {\n value = path.getValueFrom(object);\n }\n\n if (skipChanges) {\n this.value_[i / 2] = value;\n continue;\n }\n\n if (areSameValue(value, this.value_[i / 2]))\n continue;\n\n oldValues = oldValues || [];\n oldValues[i / 2] = this.value_[i / 2];\n this.value_[i / 2] = value;\n }\n\n if (!oldValues)\n return false;\n\n // TODO(rafaelw): Having observed_ as the third callback arg here is\n // pretty lame API. Fix.\n this.report_([this.value_, oldValues, this.observed_]);\n return true;\n }\n });\n\n function identFn(value) { return value; }\n\n function ObserverTransform(observable, getValueFn, setValueFn,\n dontPassThroughSet) {\n this.callback_ = undefined;\n this.target_ = undefined;\n this.value_ = undefined;\n this.observable_ = observable;\n this.getValueFn_ = getValueFn || identFn;\n this.setValueFn_ = setValueFn || identFn;\n // TODO(rafaelw): This is a temporary hack. PolymerExpressions needs this\n // at the moment because of a bug in it's dependency tracking.\n this.dontPassThroughSet_ = dontPassThroughSet;\n }\n\n ObserverTransform.prototype = {\n open: function(callback, target) {\n this.callback_ = callback;\n this.target_ = target;\n this.value_ =\n this.getValueFn_(this.observable_.open(this.observedCallback_, this));\n return this.value_;\n },\n\n observedCallback_: function(value) {\n value = this.getValueFn_(value);\n if (areSameValue(value, this.value_))\n return;\n var oldValue = this.value_;\n this.value_ = value;\n this.callback_.call(this.target_, this.value_, oldValue);\n },\n\n discardChanges: function() {\n this.value_ = this.getValueFn_(this.observable_.discardChanges());\n return this.value_;\n },\n\n deliver: function() {\n return this.observable_.deliver();\n },\n\n setValue: function(value) {\n value = this.setValueFn_(value);\n if (!this.dontPassThroughSet_ && this.observable_.setValue)\n return this.observable_.setValue(value);\n },\n\n close: function() {\n if (this.observable_)\n this.observable_.close();\n this.callback_ = undefined;\n this.target_ = undefined;\n this.observable_ = undefined;\n this.value_ = undefined;\n this.getValueFn_ = undefined;\n this.setValueFn_ = undefined;\n }\n }\n\n var expectedRecordTypes = {\n add: true,\n update: true,\n delete: true\n };\n\n function diffObjectFromChangeRecords(object, changeRecords, oldValues) {\n var added = {};\n var removed = {};\n\n for (var i = 0; i < changeRecords.length; i++) {\n var record = changeRecords[i];\n if (!expectedRecordTypes[record.type]) {\n console.error('Unknown changeRecord type: ' + record.type);\n console.error(record);\n continue;\n }\n\n if (!(record.name in oldValues))\n oldValues[record.name] = record.oldValue;\n\n if (record.type == 'update')\n continue;\n\n if (record.type == 'add') {\n if (record.name in removed)\n delete removed[record.name];\n else\n added[record.name] = true;\n\n continue;\n }\n\n // type = 'delete'\n if (record.name in added) {\n delete added[record.name];\n delete oldValues[record.name];\n } else {\n removed[record.name] = true;\n }\n }\n\n for (var prop in added)\n added[prop] = object[prop];\n\n for (var prop in removed)\n removed[prop] = undefined;\n\n var changed = {};\n for (var prop in oldValues) {\n if (prop in added || prop in removed)\n continue;\n\n var newValue = object[prop];\n if (oldValues[prop] !== newValue)\n changed[prop] = newValue;\n }\n\n return {\n added: added,\n removed: removed,\n changed: changed\n };\n }\n\n function newSplice(index, removed, addedCount) {\n return {\n index: index,\n removed: removed,\n addedCount: addedCount\n };\n }\n\n var EDIT_LEAVE = 0;\n var EDIT_UPDATE = 1;\n var EDIT_ADD = 2;\n var EDIT_DELETE = 3;\n\n function ArraySplice() {}\n\n ArraySplice.prototype = {\n\n // Note: This function is *based* on the computation of the Levenshtein\n // \"edit\" distance. The one change is that \"updates\" are treated as two\n // edits - not one. With Array splices, an update is really a delete\n // followed by an add. By retaining this, we optimize for \"keeping\" the\n // maximum array items in the original array. For example:\n //\n // 'xxxx123' -> '123yyyy'\n //\n // With 1-edit updates, the shortest path would be just to update all seven\n // characters. With 2-edit updates, we delete 4, leave 3, and add 4. This\n // leaves the substring '123' intact.\n calcEditDistances: function(current, currentStart, currentEnd,\n old, oldStart, oldEnd) {\n // \"Deletion\" columns\n var rowCount = oldEnd - oldStart + 1;\n var columnCount = currentEnd - currentStart + 1;\n var distances = new Array(rowCount);\n\n // \"Addition\" rows. Initialize null column.\n for (var i = 0; i < rowCount; i++) {\n distances[i] = new Array(columnCount);\n distances[i][0] = i;\n }\n\n // Initialize null row\n for (var j = 0; j < columnCount; j++)\n distances[0][j] = j;\n\n for (var i = 1; i < rowCount; i++) {\n for (var j = 1; j < columnCount; j++) {\n if (this.equals(current[currentStart + j - 1], old[oldStart + i - 1]))\n distances[i][j] = distances[i - 1][j - 1];\n else {\n var north = distances[i - 1][j] + 1;\n var west = distances[i][j - 1] + 1;\n distances[i][j] = north < west ? north : west;\n }\n }\n }\n\n return distances;\n },\n\n // This starts at the final weight, and walks \"backward\" by finding\n // the minimum previous weight recursively until the origin of the weight\n // matrix.\n spliceOperationsFromEditDistances: function(distances) {\n var i = distances.length - 1;\n var j = distances[0].length - 1;\n var current = distances[i][j];\n var edits = [];\n while (i > 0 || j > 0) {\n if (i == 0) {\n edits.push(EDIT_ADD);\n j--;\n continue;\n }\n if (j == 0) {\n edits.push(EDIT_DELETE);\n i--;\n continue;\n }\n var northWest = distances[i - 1][j - 1];\n var west = distances[i - 1][j];\n var north = distances[i][j - 1];\n\n var min;\n if (west < north)\n min = west < northWest ? west : northWest;\n else\n min = north < northWest ? north : northWest;\n\n if (min == northWest) {\n if (northWest == current) {\n edits.push(EDIT_LEAVE);\n } else {\n edits.push(EDIT_UPDATE);\n current = northWest;\n }\n i--;\n j--;\n } else if (min == west) {\n edits.push(EDIT_DELETE);\n i--;\n current = west;\n } else {\n edits.push(EDIT_ADD);\n j--;\n current = north;\n }\n }\n\n edits.reverse();\n return edits;\n },\n\n /**\n * Splice Projection functions:\n *\n * A splice map is a representation of how a previous array of items\n * was transformed into a new array of items. Conceptually it is a list of\n * tuples of\n *\n * <index, removed, addedCount>\n *\n * which are kept in ascending index order of. The tuple represents that at\n * the |index|, |removed| sequence of items were removed, and counting forward\n * from |index|, |addedCount| items were added.\n */\n\n /**\n * Lacking individual splice mutation information, the minimal set of\n * splices can be synthesized given the previous state and final state of an\n * array. The basic approach is to calculate the edit distance matrix and\n * choose the shortest path through it.\n *\n * Complexity: O(l * p)\n * l: The length of the current array\n * p: The length of the old array\n */\n calcSplices: function(current, currentStart, currentEnd,\n old, oldStart, oldEnd) {\n var prefixCount = 0;\n var suffixCount = 0;\n\n var minLength = Math.min(currentEnd - currentStart, oldEnd - oldStart);\n if (currentStart == 0 && oldStart == 0)\n prefixCount = this.sharedPrefix(current, old, minLength);\n\n if (currentEnd == current.length && oldEnd == old.length)\n suffixCount = this.sharedSuffix(current, old, minLength - prefixCount);\n\n currentStart += prefixCount;\n oldStart += prefixCount;\n currentEnd -= suffixCount;\n oldEnd -= suffixCount;\n\n if (currentEnd - currentStart == 0 && oldEnd - oldStart == 0)\n return [];\n\n if (currentStart == currentEnd) {\n var splice = newSplice(currentStart, [], 0);\n while (oldStart < oldEnd)\n splice.removed.push(old[oldStart++]);\n\n return [ splice ];\n } else if (oldStart == oldEnd)\n return [ newSplice(currentStart, [], currentEnd - currentStart) ];\n\n var ops = this.spliceOperationsFromEditDistances(\n this.calcEditDistances(current, currentStart, currentEnd,\n old, oldStart, oldEnd));\n\n var splice = undefined;\n var splices = [];\n var index = currentStart;\n var oldIndex = oldStart;\n for (var i = 0; i < ops.length; i++) {\n switch(ops[i]) {\n case EDIT_LEAVE:\n if (splice) {\n splices.push(splice);\n splice = undefined;\n }\n\n index++;\n oldIndex++;\n break;\n case EDIT_UPDATE:\n if (!splice)\n splice = newSplice(index, [], 0);\n\n splice.addedCount++;\n index++;\n\n splice.removed.push(old[oldIndex]);\n oldIndex++;\n break;\n case EDIT_ADD:\n if (!splice)\n splice = newSplice(index, [], 0);\n\n splice.addedCount++;\n index++;\n break;\n case EDIT_DELETE:\n if (!splice)\n splice = newSplice(index, [], 0);\n\n splice.removed.push(old[oldIndex]);\n oldIndex++;\n break;\n }\n }\n\n if (splice) {\n splices.push(splice);\n }\n return splices;\n },\n\n sharedPrefix: function(current, old, searchLength) {\n for (var i = 0; i < searchLength; i++)\n if (!this.equals(current[i], old[i]))\n return i;\n return searchLength;\n },\n\n sharedSuffix: function(current, old, searchLength) {\n var index1 = current.length;\n var index2 = old.length;\n var count = 0;\n while (count < searchLength && this.equals(current[--index1], old[--index2]))\n count++;\n\n return count;\n },\n\n calculateSplices: function(current, previous) {\n return this.calcSplices(current, 0, current.length, previous, 0,\n previous.length);\n },\n\n equals: function(currentValue, previousValue) {\n return currentValue === previousValue;\n }\n };\n\n var arraySplice = new ArraySplice();\n\n function calcSplices(current, currentStart, currentEnd,\n old, oldStart, oldEnd) {\n return arraySplice.calcSplices(current, currentStart, currentEnd,\n old, oldStart, oldEnd);\n }\n\n function intersect(start1, end1, start2, end2) {\n // Disjoint\n if (end1 < start2 || end2 < start1)\n return -1;\n\n // Adjacent\n if (end1 == start2 || end2 == start1)\n return 0;\n\n // Non-zero intersect, span1 first\n if (start1 < start2) {\n if (end1 < end2)\n return end1 - start2; // Overlap\n else\n return end2 - start2; // Contained\n } else {\n // Non-zero intersect, span2 first\n if (end2 < end1)\n return end2 - start1; // Overlap\n else\n return end1 - start1; // Contained\n }\n }\n\n function mergeSplice(splices, index, removed, addedCount) {\n\n var splice = newSplice(index, removed, addedCount);\n\n var inserted = false;\n var insertionOffset = 0;\n\n for (var i = 0; i < splices.length; i++) {\n var current = splices[i];\n current.index += insertionOffset;\n\n if (inserted)\n continue;\n\n var intersectCount = intersect(splice.index,\n splice.index + splice.removed.length,\n current.index,\n current.index + current.addedCount);\n\n if (intersectCount >= 0) {\n // Merge the two splices\n\n splices.splice(i, 1);\n i--;\n\n insertionOffset -= current.addedCount - current.removed.length;\n\n splice.addedCount += current.addedCount - intersectCount;\n var deleteCount = splice.removed.length +\n current.removed.length - intersectCount;\n\n if (!splice.addedCount && !deleteCount) {\n // merged splice is a noop. discard.\n inserted = true;\n } else {\n var removed = current.removed;\n\n if (splice.index < current.index) {\n // some prefix of splice.removed is prepended to current.removed.\n var prepend = splice.removed.slice(0, current.index - splice.index);\n Array.prototype.push.apply(prepend, removed);\n removed = prepend;\n }\n\n if (splice.index + splice.removed.length > current.index + current.addedCount) {\n // some suffix of splice.removed is appended to current.removed.\n var append = splice.removed.slice(current.index + current.addedCount - splice.index);\n Array.prototype.push.apply(removed, append);\n }\n\n splice.removed = removed;\n if (current.index < splice.index) {\n splice.index = current.index;\n }\n }\n } else if (splice.index < current.index) {\n // Insert splice here.\n\n inserted = true;\n\n splices.splice(i, 0, splice);\n i++;\n\n var offset = splice.addedCount - splice.removed.length\n current.index += offset;\n insertionOffset += offset;\n }\n }\n\n if (!inserted)\n splices.push(splice);\n }\n\n function createInitialSplices(array, changeRecords) {\n var splices = [];\n\n for (var i = 0; i < changeRecords.length; i++) {\n var record = changeRecords[i];\n switch(record.type) {\n case 'splice':\n mergeSplice(splices, record.index, record.removed.slice(), record.addedCount);\n break;\n case 'add':\n case 'update':\n case 'delete':\n if (!isIndex(record.name))\n continue;\n var index = toNumber(record.name);\n if (index < 0)\n continue;\n mergeSplice(splices, index, [record.oldValue], 1);\n break;\n default:\n console.error('Unexpected record type: ' + JSON.stringify(record));\n break;\n }\n }\n\n return splices;\n }\n\n function projectArraySplices(array, changeRecords) {\n var splices = [];\n\n createInitialSplices(array, changeRecords).forEach(function(splice) {\n if (splice.addedCount == 1 && splice.removed.length == 1) {\n if (splice.removed[0] !== array[splice.index])\n splices.push(splice);\n\n return\n };\n\n splices = splices.concat(calcSplices(array, splice.index, splice.index + splice.addedCount,\n splice.removed, 0, splice.removed.length));\n });\n\n return splices;\n }\n\n global.Observer = Observer;\n global.Observer.runEOM_ = runEOM;\n global.Observer.observerSentinel_ = observerSentinel; // for testing.\n global.Observer.hasObjectObserve = hasObserve;\n global.ArrayObserver = ArrayObserver;\n global.ArrayObserver.calculateSplices = function(current, previous) {\n return arraySplice.calculateSplices(current, previous);\n };\n\n global.ArraySplice = ArraySplice;\n global.ObjectObserver = ObjectObserver;\n global.PathObserver = PathObserver;\n global.CompoundObserver = CompoundObserver;\n global.Path = Path;\n global.ObserverTransform = ObserverTransform;\n})(typeof global !== 'undefined' && global && typeof module !== 'undefined' && module ? global : this || window);\n","// select ShadowDOM impl\r\nif (Platform.flags.shadow) {\r\n","// Copyright 2012 The Polymer Authors. All rights reserved.\n// Use of this source code is goverened by a BSD-style\n// license that can be found in the LICENSE file.\n\nwindow.ShadowDOMPolyfill = {};\n\n(function(scope) {\n 'use strict';\n\n var constructorTable = new WeakMap();\n var nativePrototypeTable = new WeakMap();\n var wrappers = Object.create(null);\n\n function detectEval() {\n // Don't test for eval if we're running in a Chrome App environment.\n // We check for APIs set that only exist in a Chrome App context.\n if (typeof chrome !== 'undefined' && chrome.app && chrome.app.runtime) {\n return false;\n }\n\n // Firefox OS Apps do not allow eval. This feature detection is very hacky\n // but even if some other platform adds support for this function this code\n // will continue to work.\n if (navigator.getDeviceStorage) {\n return false;\n }\n\n try {\n var f = new Function('return true;');\n return f();\n } catch (ex) {\n return false;\n }\n }\n\n var hasEval = detectEval();\n\n function assert(b) {\n if (!b)\n throw new Error('Assertion failed');\n };\n\n var defineProperty = Object.defineProperty;\n var getOwnPropertyNames = Object.getOwnPropertyNames;\n var getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;\n\n function mixin(to, from) {\n var names = getOwnPropertyNames(from);\n for (var i = 0; i < names.length; i++) {\n var name = names[i];\n defineProperty(to, name, getOwnPropertyDescriptor(from, name));\n }\n return to;\n };\n\n function mixinStatics(to, from) {\n var names = getOwnPropertyNames(from);\n for (var i = 0; i < names.length; i++) {\n var name = names[i];\n switch (name) {\n case 'arguments':\n case 'caller':\n case 'length':\n case 'name':\n case 'prototype':\n case 'toString':\n continue;\n }\n defineProperty(to, name, getOwnPropertyDescriptor(from, name));\n }\n return to;\n };\n\n function oneOf(object, propertyNames) {\n for (var i = 0; i < propertyNames.length; i++) {\n if (propertyNames[i] in object)\n return propertyNames[i];\n }\n }\n\n var nonEnumerableDataDescriptor = {\n value: undefined,\n configurable: true,\n enumerable: false,\n writable: true\n };\n\n function defineNonEnumerableDataProperty(object, name, value) {\n nonEnumerableDataDescriptor.value = value;\n defineProperty(object, name, nonEnumerableDataDescriptor);\n }\n\n // Mozilla's old DOM bindings are bretty busted:\n // https://bugzilla.mozilla.org/show_bug.cgi?id=855844\n // Make sure they are create before we start modifying things.\n getOwnPropertyNames(window);\n\n function getWrapperConstructor(node) {\n var nativePrototype = node.__proto__ || Object.getPrototypeOf(node);\n var wrapperConstructor = constructorTable.get(nativePrototype);\n if (wrapperConstructor)\n return wrapperConstructor;\n\n var parentWrapperConstructor = getWrapperConstructor(nativePrototype);\n\n var GeneratedWrapper = createWrapperConstructor(parentWrapperConstructor);\n registerInternal(nativePrototype, GeneratedWrapper, node);\n\n return GeneratedWrapper;\n }\n\n function addForwardingProperties(nativePrototype, wrapperPrototype) {\n installProperty(nativePrototype, wrapperPrototype, true);\n }\n\n function registerInstanceProperties(wrapperPrototype, instanceObject) {\n installProperty(instanceObject, wrapperPrototype, false);\n }\n\n var isFirefox = /Firefox/.test(navigator.userAgent);\n\n // This is used as a fallback when getting the descriptor fails in\n // installProperty.\n var dummyDescriptor = {\n get: function() {},\n set: function(v) {},\n configurable: true,\n enumerable: true\n };\n\n function isEventHandlerName(name) {\n return /^on[a-z]+$/.test(name);\n }\n\n function isIdentifierName(name) {\n return /^\\w[a-zA-Z_0-9]*$/.test(name);\n }\n\n function getGetter(name) {\n return hasEval && isIdentifierName(name) ?\n new Function('return this.impl.' + name) :\n function() { return this.impl[name]; };\n }\n\n function getSetter(name) {\n return hasEval && isIdentifierName(name) ?\n new Function('v', 'this.impl.' + name + ' = v') :\n function(v) { this.impl[name] = v; };\n }\n\n function getMethod(name) {\n return hasEval && isIdentifierName(name) ?\n new Function('return this.impl.' + name +\n '.apply(this.impl, arguments)') :\n function() { return this.impl[name].apply(this.impl, arguments); };\n }\n\n function getDescriptor(source, name) {\n try {\n return Object.getOwnPropertyDescriptor(source, name);\n } catch (ex) {\n // JSC and V8 both use data properties instead of accessors which can\n // cause getting the property desciptor to throw an exception.\n // https://bugs.webkit.org/show_bug.cgi?id=49739\n return dummyDescriptor;\n }\n }\n\n function installProperty(source, target, allowMethod, opt_blacklist) {\n var names = getOwnPropertyNames(source);\n for (var i = 0; i < names.length; i++) {\n var name = names[i];\n if (name === 'polymerBlackList_')\n continue;\n\n if (name in target)\n continue;\n\n if (source.polymerBlackList_ && source.polymerBlackList_[name])\n continue;\n\n if (isFirefox) {\n // Tickle Firefox's old bindings.\n source.__lookupGetter__(name);\n }\n var descriptor = getDescriptor(source, name);\n var getter, setter;\n if (allowMethod && typeof descriptor.value === 'function') {\n target[name] = getMethod(name);\n continue;\n }\n\n var isEvent = isEventHandlerName(name);\n if (isEvent)\n getter = scope.getEventHandlerGetter(name);\n else\n getter = getGetter(name);\n\n if (descriptor.writable || descriptor.set) {\n if (isEvent)\n setter = scope.getEventHandlerSetter(name);\n else\n setter = getSetter(name);\n }\n\n defineProperty(target, name, {\n get: getter,\n set: setter,\n configurable: descriptor.configurable,\n enumerable: descriptor.enumerable\n });\n }\n }\n\n /**\n * @param {Function} nativeConstructor\n * @param {Function} wrapperConstructor\n * @param {Object=} opt_instance If present, this is used to extract\n * properties from an instance object.\n */\n function register(nativeConstructor, wrapperConstructor, opt_instance) {\n var nativePrototype = nativeConstructor.prototype;\n registerInternal(nativePrototype, wrapperConstructor, opt_instance);\n mixinStatics(wrapperConstructor, nativeConstructor);\n }\n\n function registerInternal(nativePrototype, wrapperConstructor, opt_instance) {\n var wrapperPrototype = wrapperConstructor.prototype;\n assert(constructorTable.get(nativePrototype) === undefined);\n\n constructorTable.set(nativePrototype, wrapperConstructor);\n nativePrototypeTable.set(wrapperPrototype, nativePrototype);\n\n addForwardingProperties(nativePrototype, wrapperPrototype);\n if (opt_instance)\n registerInstanceProperties(wrapperPrototype, opt_instance);\n\n defineNonEnumerableDataProperty(\n wrapperPrototype, 'constructor', wrapperConstructor);\n // Set it again. Some VMs optimizes objects that are used as prototypes.\n wrapperConstructor.prototype = wrapperPrototype;\n }\n\n function isWrapperFor(wrapperConstructor, nativeConstructor) {\n return constructorTable.get(nativeConstructor.prototype) ===\n wrapperConstructor;\n }\n\n /**\n * Creates a generic wrapper constructor based on |object| and its\n * constructor.\n * @param {Node} object\n * @return {Function} The generated constructor.\n */\n function registerObject(object) {\n var nativePrototype = Object.getPrototypeOf(object);\n\n var superWrapperConstructor = getWrapperConstructor(nativePrototype);\n var GeneratedWrapper = createWrapperConstructor(superWrapperConstructor);\n registerInternal(nativePrototype, GeneratedWrapper, object);\n\n return GeneratedWrapper;\n }\n\n function createWrapperConstructor(superWrapperConstructor) {\n function GeneratedWrapper(node) {\n superWrapperConstructor.call(this, node);\n }\n var p = Object.create(superWrapperConstructor.prototype);\n p.constructor = GeneratedWrapper;\n GeneratedWrapper.prototype = p;\n\n return GeneratedWrapper;\n }\n\n var OriginalDOMImplementation = window.DOMImplementation;\n var OriginalEventTarget = window.EventTarget;\n var OriginalEvent = window.Event;\n var OriginalNode = window.Node;\n var OriginalWindow = window.Window;\n var OriginalRange = window.Range;\n var OriginalCanvasRenderingContext2D = window.CanvasRenderingContext2D;\n var OriginalWebGLRenderingContext = window.WebGLRenderingContext;\n var OriginalSVGElementInstance = window.SVGElementInstance;\n var OriginalFormData = window.FormData;\n \n function isWrapper(object) {\n return object instanceof wrappers.EventTarget ||\n object instanceof wrappers.Event ||\n object instanceof wrappers.Range ||\n object instanceof wrappers.DOMImplementation ||\n object instanceof wrappers.CanvasRenderingContext2D ||\n object instanceof wrappers.FormData ||\n wrappers.WebGLRenderingContext &&\n object instanceof wrappers.WebGLRenderingContext;\n }\n\n function isNative(object) {\n return OriginalEventTarget && object instanceof OriginalEventTarget ||\n object instanceof OriginalNode ||\n object instanceof OriginalEvent ||\n object instanceof OriginalWindow ||\n object instanceof OriginalRange ||\n object instanceof OriginalDOMImplementation ||\n object instanceof OriginalCanvasRenderingContext2D ||\n object instanceof OriginalFormData ||\n OriginalWebGLRenderingContext &&\n object instanceof OriginalWebGLRenderingContext ||\n OriginalSVGElementInstance &&\n object instanceof OriginalSVGElementInstance;\n }\n\n /**\n * Wraps a node in a WrapperNode. If there already exists a wrapper for the\n * |node| that wrapper is returned instead.\n * @param {Node} node\n * @return {WrapperNode}\n */\n function wrap(impl) {\n if (impl === null)\n return null;\n\n assert(isNative(impl));\n return impl.polymerWrapper_ ||\n (impl.polymerWrapper_ = new (getWrapperConstructor(impl))(impl));\n }\n\n /**\n * Unwraps a wrapper and returns the node it is wrapping.\n * @param {WrapperNode} wrapper\n * @return {Node}\n */\n function unwrap(wrapper) {\n if (wrapper === null)\n return null;\n assert(isWrapper(wrapper));\n return wrapper.impl;\n }\n\n /**\n * Unwraps object if it is a wrapper.\n * @param {Object} object\n * @return {Object} The native implementation object.\n */\n function unwrapIfNeeded(object) {\n return object && isWrapper(object) ? unwrap(object) : object;\n }\n\n /**\n * Wraps object if it is not a wrapper.\n * @param {Object} object\n * @return {Object} The wrapper for object.\n */\n function wrapIfNeeded(object) {\n return object && !isWrapper(object) ? wrap(object) : object;\n }\n\n /**\n * Overrides the current wrapper (if any) for node.\n * @param {Node} node\n * @param {WrapperNode=} wrapper If left out the wrapper will be created as\n * needed next time someone wraps the node.\n */\n function rewrap(node, wrapper) {\n if (wrapper === null)\n return;\n assert(isNative(node));\n assert(wrapper === undefined || isWrapper(wrapper));\n node.polymerWrapper_ = wrapper;\n }\n\n var getterDescriptor = {\n get: undefined,\n configurable: true,\n enumerable: true\n };\n\n function defineGetter(constructor, name, getter) {\n getterDescriptor.get = getter;\n defineProperty(constructor.prototype, name, getterDescriptor);\n }\n\n function defineWrapGetter(constructor, name) {\n defineGetter(constructor, name, function() {\n return wrap(this.impl[name]);\n });\n }\n\n /**\n * Forwards existing methods on the native object to the wrapper methods.\n * This does not wrap any of the arguments or the return value since the\n * wrapper implementation already takes care of that.\n * @param {Array.<Function>} constructors\n * @parem {Array.<string>} names\n */\n function forwardMethodsToWrapper(constructors, names) {\n constructors.forEach(function(constructor) {\n names.forEach(function(name) {\n constructor.prototype[name] = function() {\n var w = wrapIfNeeded(this);\n return w[name].apply(w, arguments);\n };\n });\n });\n }\n\n scope.assert = assert;\n scope.constructorTable = constructorTable;\n scope.defineGetter = defineGetter;\n scope.defineWrapGetter = defineWrapGetter;\n scope.forwardMethodsToWrapper = forwardMethodsToWrapper;\n scope.isWrapper = isWrapper;\n scope.isWrapperFor = isWrapperFor;\n scope.mixin = mixin;\n scope.nativePrototypeTable = nativePrototypeTable;\n scope.oneOf = oneOf;\n scope.registerObject = registerObject;\n scope.registerWrapper = register;\n scope.rewrap = rewrap;\n scope.unwrap = unwrap;\n scope.unwrapIfNeeded = unwrapIfNeeded;\n scope.wrap = wrap;\n scope.wrapIfNeeded = wrapIfNeeded;\n scope.wrappers = wrappers;\n\n})(window.ShadowDOMPolyfill);\n","/*\n * Copyright 2013 The Polymer Authors. All rights reserved.\n * Use of this source code is goverened by a BSD-style\n * license that can be found in the LICENSE file.\n */\n\n(function(context) {\n 'use strict';\n\n var OriginalMutationObserver = window.MutationObserver;\n var callbacks = [];\n var pending = false;\n var timerFunc;\n\n function handle() {\n pending = false;\n var copies = callbacks.slice(0);\n callbacks = [];\n for (var i = 0; i < copies.length; i++) {\n (0, copies[i])();\n }\n }\n\n if (OriginalMutationObserver) {\n var counter = 1;\n var observer = new OriginalMutationObserver(handle);\n var textNode = document.createTextNode(counter);\n observer.observe(textNode, {characterData: true});\n\n timerFunc = function() {\n counter = (counter + 1) % 2;\n textNode.data = counter;\n };\n\n } else {\n timerFunc = window.setImmediate || window.setTimeout;\n }\n\n function setEndOfMicrotask(func) {\n callbacks.push(func);\n if (pending)\n return;\n pending = true;\n timerFunc(handle, 0);\n }\n\n context.setEndOfMicrotask = setEndOfMicrotask;\n\n})(window.ShadowDOMPolyfill);\n","/*\n * Copyright 2013 The Polymer Authors. All rights reserved.\n * Use of this source code is goverened by a BSD-style\n * license that can be found in the LICENSE file.\n */\n\n(function(scope) {\n 'use strict';\n\n var setEndOfMicrotask = scope.setEndOfMicrotask\n var wrapIfNeeded = scope.wrapIfNeeded\n var wrappers = scope.wrappers;\n\n var registrationsTable = new WeakMap();\n var globalMutationObservers = [];\n var isScheduled = false;\n\n function scheduleCallback(observer) {\n if (isScheduled)\n return;\n setEndOfMicrotask(notifyObservers);\n isScheduled = true;\n }\n\n // http://dom.spec.whatwg.org/#mutation-observers\n function notifyObservers() {\n isScheduled = false;\n\n do {\n var notifyList = globalMutationObservers.slice();\n var anyNonEmpty = false;\n for (var i = 0; i < notifyList.length; i++) {\n var mo = notifyList[i];\n var queue = mo.takeRecords();\n removeTransientObserversFor(mo);\n if (queue.length) {\n mo.callback_(queue, mo);\n anyNonEmpty = true;\n }\n }\n } while (anyNonEmpty);\n }\n\n /**\n * @param {string} type\n * @param {Node} target\n * @constructor\n */\n function MutationRecord(type, target) {\n this.type = type;\n this.target = target;\n this.addedNodes = new wrappers.NodeList();\n this.removedNodes = new wrappers.NodeList();\n this.previousSibling = null;\n this.nextSibling = null;\n this.attributeName = null;\n this.attributeNamespace = null;\n this.oldValue = null;\n }\n\n /**\n * Registers transient observers to ancestor and its ancesors for the node\n * which was removed.\n * @param {!Node} ancestor\n * @param {!Node} node\n */\n function registerTransientObservers(ancestor, node) {\n for (; ancestor; ancestor = ancestor.parentNode) {\n var registrations = registrationsTable.get(ancestor);\n if (!registrations)\n continue;\n for (var i = 0; i < registrations.length; i++) {\n var registration = registrations[i];\n if (registration.options.subtree)\n registration.addTransientObserver(node);\n }\n }\n }\n\n function removeTransientObserversFor(observer) {\n for (var i = 0; i < observer.nodes_.length; i++) {\n var node = observer.nodes_[i];\n var registrations = registrationsTable.get(node);\n if (!registrations)\n return;\n for (var j = 0; j < registrations.length; j++) {\n var registration = registrations[j];\n if (registration.observer === observer)\n registration.removeTransientObservers();\n }\n }\n }\n\n // http://dom.spec.whatwg.org/#queue-a-mutation-record\n function enqueueMutation(target, type, data) {\n // 1.\n var interestedObservers = Object.create(null);\n var associatedStrings = Object.create(null);\n\n // 2.\n for (var node = target; node; node = node.parentNode) {\n // 3.\n var registrations = registrationsTable.get(node);\n if (!registrations)\n continue;\n for (var j = 0; j < registrations.length; j++) {\n var registration = registrations[j];\n var options = registration.options;\n // 1.\n if (node !== target && !options.subtree)\n continue;\n\n // 2.\n if (type === 'attributes' && !options.attributes)\n continue;\n\n // 3. If type is \"attributes\", options's attributeFilter is present, and\n // either options's attributeFilter does not contain name or namespace\n // is non-null, continue.\n if (type === 'attributes' && options.attributeFilter &&\n (data.namespace !== null ||\n options.attributeFilter.indexOf(data.name) === -1)) {\n continue;\n }\n\n // 4.\n if (type === 'characterData' && !options.characterData)\n continue;\n\n // 5.\n if (type === 'childList' && !options.childList)\n continue;\n\n // 6.\n var observer = registration.observer;\n interestedObservers[observer.uid_] = observer;\n\n // 7. If either type is \"attributes\" and options's attributeOldValue is\n // true, or type is \"characterData\" and options's characterDataOldValue\n // is true, set the paired string of registered observer's observer in\n // interested observers to oldValue.\n if (type === 'attributes' && options.attributeOldValue ||\n type === 'characterData' && options.characterDataOldValue) {\n associatedStrings[observer.uid_] = data.oldValue;\n }\n }\n }\n\n var anyRecordsEnqueued = false;\n\n // 4.\n for (var uid in interestedObservers) {\n var observer = interestedObservers[uid];\n var record = new MutationRecord(type, target);\n\n // 2.\n if ('name' in data && 'namespace' in data) {\n record.attributeName = data.name;\n record.attributeNamespace = data.namespace;\n }\n\n // 3.\n if (data.addedNodes)\n record.addedNodes = data.addedNodes;\n\n // 4.\n if (data.removedNodes)\n record.removedNodes = data.removedNodes;\n\n // 5.\n if (data.previousSibling)\n record.previousSibling = data.previousSibling;\n\n // 6.\n if (data.nextSibling)\n record.nextSibling = data.nextSibling;\n\n // 7.\n if (associatedStrings[uid] !== undefined)\n record.oldValue = associatedStrings[uid];\n\n // 8.\n observer.records_.push(record);\n\n anyRecordsEnqueued = true;\n }\n\n if (anyRecordsEnqueued)\n scheduleCallback();\n }\n\n var slice = Array.prototype.slice;\n\n /**\n * @param {!Object} options\n * @constructor\n */\n function MutationObserverOptions(options) {\n this.childList = !!options.childList;\n this.subtree = !!options.subtree;\n\n // 1. If either options' attributeOldValue or attributeFilter is present\n // and options' attributes is omitted, set options' attributes to true.\n if (!('attributes' in options) &&\n ('attributeOldValue' in options || 'attributeFilter' in options)) {\n this.attributes = true;\n } else {\n this.attributes = !!options.attributes;\n }\n\n // 2. If options' characterDataOldValue is present and options'\n // characterData is omitted, set options' characterData to true.\n if ('characterDataOldValue' in options && !('characterData' in options))\n this.characterData = true;\n else\n this.characterData = !!options.characterData;\n\n // 3. & 4.\n if (!this.attributes &&\n (options.attributeOldValue || 'attributeFilter' in options) ||\n // 5.\n !this.characterData && options.characterDataOldValue) {\n throw new TypeError();\n }\n\n this.characterData = !!options.characterData;\n this.attributeOldValue = !!options.attributeOldValue;\n this.characterDataOldValue = !!options.characterDataOldValue;\n if ('attributeFilter' in options) {\n if (options.attributeFilter == null ||\n typeof options.attributeFilter !== 'object') {\n throw new TypeError();\n }\n this.attributeFilter = slice.call(options.attributeFilter);\n } else {\n this.attributeFilter = null;\n }\n }\n\n var uidCounter = 0;\n\n /**\n * The class that maps to the DOM MutationObserver interface.\n * @param {Function} callback.\n * @constructor\n */\n function MutationObserver(callback) {\n this.callback_ = callback;\n this.nodes_ = [];\n this.records_ = [];\n this.uid_ = ++uidCounter;\n\n // This will leak. There is no way to implement this without WeakRefs :'(\n globalMutationObservers.push(this);\n }\n\n MutationObserver.prototype = {\n // http://dom.spec.whatwg.org/#dom-mutationobserver-observe\n observe: function(target, options) {\n target = wrapIfNeeded(target);\n\n var newOptions = new MutationObserverOptions(options);\n\n // 6.\n var registration;\n var registrations = registrationsTable.get(target);\n if (!registrations)\n registrationsTable.set(target, registrations = []);\n\n for (var i = 0; i < registrations.length; i++) {\n if (registrations[i].observer === this) {\n registration = registrations[i];\n // 6.1.\n registration.removeTransientObservers();\n // 6.2.\n registration.options = newOptions;\n }\n }\n\n // 7.\n if (!registration) {\n registration = new Registration(this, target, newOptions);\n registrations.push(registration);\n this.nodes_.push(target);\n }\n },\n\n // http://dom.spec.whatwg.org/#dom-mutationobserver-disconnect\n disconnect: function() {\n this.nodes_.forEach(function(node) {\n var registrations = registrationsTable.get(node);\n for (var i = 0; i < registrations.length; i++) {\n var registration = registrations[i];\n if (registration.observer === this) {\n registrations.splice(i, 1);\n // Each node can only have one registered observer associated with\n // this observer.\n break;\n }\n }\n }, this);\n this.records_ = [];\n },\n\n takeRecords: function() {\n var copyOfRecords = this.records_;\n this.records_ = [];\n return copyOfRecords;\n }\n };\n\n /**\n * Class used to represent a registered observer.\n * @param {MutationObserver} observer\n * @param {Node} target\n * @param {MutationObserverOptions} options\n * @constructor\n */\n function Registration(observer, target, options) {\n this.observer = observer;\n this.target = target;\n this.options = options;\n this.transientObservedNodes = [];\n }\n\n Registration.prototype = {\n /**\n * Adds a transient observer on node. The transient observer gets removed\n * next time we deliver the change records.\n * @param {Node} node\n */\n addTransientObserver: function(node) {\n // Don't add transient observers on the target itself. We already have all\n // the required listeners set up on the target.\n if (node === this.target)\n return;\n\n this.transientObservedNodes.push(node);\n var registrations = registrationsTable.get(node);\n if (!registrations)\n registrationsTable.set(node, registrations = []);\n\n // We know that registrations does not contain this because we already\n // checked if node === this.target.\n registrations.push(this);\n },\n\n removeTransientObservers: function() {\n var transientObservedNodes = this.transientObservedNodes;\n this.transientObservedNodes = [];\n\n for (var i = 0; i < transientObservedNodes.length; i++) {\n var node = transientObservedNodes[i];\n var registrations = registrationsTable.get(node);\n for (var j = 0; j < registrations.length; j++) {\n if (registrations[j] === this) {\n registrations.splice(j, 1);\n // Each node can only have one registered observer associated with\n // this observer.\n break;\n }\n }\n }\n }\n };\n\n scope.enqueueMutation = enqueueMutation;\n scope.registerTransientObservers = registerTransientObservers;\n scope.wrappers.MutationObserver = MutationObserver;\n scope.wrappers.MutationRecord = MutationRecord;\n\n})(window.ShadowDOMPolyfill);\n","/**\n * Copyright 2014 The Polymer Authors. All rights reserved.\n * Use of this source code is goverened by a BSD-style\n * license that can be found in the LICENSE file.\n */\n\n(function(scope) {\n 'use strict';\n\n /**\n * A tree scope represents the root of a tree. All nodes in a tree point to\n * the same TreeScope object. The tree scope of a node get set the first time\n * it is accessed or when a node is added or remove to a tree.\n *\n * The root is a Node that has no parent.\n *\n * The parent is another TreeScope. For ShadowRoots, it is the TreeScope of\n * the host of the ShadowRoot.\n *\n * @param {!Node} root\n * @param {TreeScope} parent\n * @constructor\n */\n function TreeScope(root, parent) {\n /** @type {!Node} */\n this.root = root;\n\n /** @type {TreeScope} */\n this.parent = parent;\n }\n\n TreeScope.prototype = {\n get renderer() {\n if (this.root instanceof scope.wrappers.ShadowRoot) {\n return scope.getRendererForHost(this.root.host);\n }\n return null;\n },\n\n contains: function(treeScope) {\n for (; treeScope; treeScope = treeScope.parent) {\n if (treeScope === this)\n return true;\n }\n return false;\n }\n };\n\n function setTreeScope(node, treeScope) {\n if (node.treeScope_ !== treeScope) {\n node.treeScope_ = treeScope;\n for (var sr = node.shadowRoot; sr; sr = sr.olderShadowRoot) {\n sr.treeScope_.parent = treeScope;\n }\n for (var child = node.firstChild; child; child = child.nextSibling) {\n setTreeScope(child, treeScope);\n }\n }\n }\n\n function getTreeScope(node) {\n if (node instanceof scope.wrappers.Window) {\n debugger;\n }\n\n if (node.treeScope_)\n return node.treeScope_;\n var parent = node.parentNode;\n var treeScope;\n if (parent)\n treeScope = getTreeScope(parent);\n else\n treeScope = new TreeScope(node, null);\n return node.treeScope_ = treeScope;\n }\n\n scope.TreeScope = TreeScope;\n scope.getTreeScope = getTreeScope;\n scope.setTreeScope = setTreeScope;\n\n})(window.ShadowDOMPolyfill);\n","// Copyright 2013 The Polymer Authors. All rights reserved.\n// Use of this source code is goverened by a BSD-style\n// license that can be found in the LICENSE file.\n\n(function(scope) {\n 'use strict';\n\n var forwardMethodsToWrapper = scope.forwardMethodsToWrapper;\n var getTreeScope = scope.getTreeScope;\n var mixin = scope.mixin;\n var registerWrapper = scope.registerWrapper;\n var unwrap = scope.unwrap;\n var wrap = scope.wrap;\n var wrappers = scope.wrappers;\n\n var wrappedFuns = new WeakMap();\n var listenersTable = new WeakMap();\n var handledEventsTable = new WeakMap();\n var currentlyDispatchingEvents = new WeakMap();\n var targetTable = new WeakMap();\n var currentTargetTable = new WeakMap();\n var relatedTargetTable = new WeakMap();\n var eventPhaseTable = new WeakMap();\n var stopPropagationTable = new WeakMap();\n var stopImmediatePropagationTable = new WeakMap();\n var eventHandlersTable = new WeakMap();\n var eventPathTable = new WeakMap();\n\n function isShadowRoot(node) {\n return node instanceof wrappers.ShadowRoot;\n }\n\n function rootOfNode(node) {\n return getTreeScope(node).root;\n }\n\n // http://w3c.github.io/webcomponents/spec/shadow/#event-paths\n function getEventPath(node, event) {\n var path = [];\n var current = node;\n path.push(current);\n while (current) {\n // 4.1.\n var destinationInsertionPoints = getDestinationInsertionPoints(current);\n if (destinationInsertionPoints && destinationInsertionPoints.length > 0) {\n // 4.1.1\n for (var i = 0; i < destinationInsertionPoints.length; i++) {\n var insertionPoint = destinationInsertionPoints[i];\n // 4.1.1.1\n if (isShadowInsertionPoint(insertionPoint)) {\n var shadowRoot = rootOfNode(insertionPoint);\n // 4.1.1.1.2\n var olderShadowRoot = shadowRoot.olderShadowRoot;\n if (olderShadowRoot)\n path.push(olderShadowRoot);\n }\n\n // 4.1.1.2\n path.push(insertionPoint);\n }\n\n // 4.1.2\n current = destinationInsertionPoints[\n destinationInsertionPoints.length - 1];\n\n // 4.2\n } else {\n if (isShadowRoot(current)) {\n if (inSameTree(node, current) && eventMustBeStopped(event)) {\n // Stop this algorithm\n break;\n }\n current = current.host;\n path.push(current);\n\n // 4.2.2\n } else {\n current = current.parentNode;\n if (current)\n path.push(current);\n }\n }\n }\n\n return path;\n }\n\n // http://w3c.github.io/webcomponents/spec/shadow/#dfn-events-always-stopped\n function eventMustBeStopped(event) {\n if (!event)\n return false;\n\n switch (event.type) {\n case 'abort':\n case 'error':\n case 'select':\n case 'change':\n case 'load':\n case 'reset':\n case 'resize':\n case 'scroll':\n case 'selectstart':\n return true;\n }\n return false;\n }\n\n // http://w3c.github.io/webcomponents/spec/shadow/#dfn-shadow-insertion-point\n function isShadowInsertionPoint(node) {\n return node instanceof HTMLShadowElement;\n // and make sure that there are no shadow precing this?\n // and that there is no content ancestor?\n }\n\n function getDestinationInsertionPoints(node) {\n return scope.getDestinationInsertionPoints(node);\n }\n\n // http://w3c.github.io/webcomponents/spec/shadow/#event-retargeting\n function eventRetargetting(path, currentTarget) {\n if (path.length === 0)\n return currentTarget;\n\n // The currentTarget might be the window object. Use its document for the\n // purpose of finding the retargetted node.\n if (currentTarget instanceof wrappers.Window)\n currentTarget = currentTarget.document;\n\n var currentTargetTree = getTreeScope(currentTarget);\n var originalTarget = path[0];\n var originalTargetTree = getTreeScope(originalTarget);\n var relativeTargetTree =\n lowestCommonInclusiveAncestor(currentTargetTree, originalTargetTree);\n\n for (var i = 0; i < path.length; i++) {\n var node = path[i];\n if (getTreeScope(node) === relativeTargetTree)\n return node;\n }\n\n return path[path.length - 1];\n }\n\n function getTreeScopeAncestors(treeScope) {\n var ancestors = [];\n for (;treeScope; treeScope = treeScope.parent) {\n ancestors.push(treeScope);\n }\n return ancestors;\n }\n\n function lowestCommonInclusiveAncestor(tsA, tsB) {\n var ancestorsA = getTreeScopeAncestors(tsA);\n var ancestorsB = getTreeScopeAncestors(tsB);\n\n var result = null;\n while (ancestorsA.length > 0 && ancestorsB.length > 0) {\n var a = ancestorsA.pop();\n var b = ancestorsB.pop();\n if (a === b)\n result = a;\n else\n break;\n }\n return result;\n }\n\n function getTreeScopeRoot(ts) {\n if (!ts.parent)\n return ts;\n return getTreeScopeRoot(ts.parent);\n }\n\n function relatedTargetResolution(event, currentTarget, relatedTarget) {\n // In case the current target is a window use its document for the purpose\n // of retargetting the related target.\n if (currentTarget instanceof wrappers.Window)\n currentTarget = currentTarget.document;\n\n var currentTargetTree = getTreeScope(currentTarget);\n var relatedTargetTree = getTreeScope(relatedTarget);\n\n var relatedTargetEventPath = getEventPath(relatedTarget, event);\n\n var lowestCommonAncestorTree;\n\n // 4\n var lowestCommonAncestorTree =\n lowestCommonInclusiveAncestor(currentTargetTree, relatedTargetTree);\n\n // 5\n if (!lowestCommonAncestorTree)\n lowestCommonAncestorTree = relatedTargetTree.root;\n\n // 6\n for (var commonAncestorTree = lowestCommonAncestorTree;\n commonAncestorTree;\n commonAncestorTree = commonAncestorTree.parent) {\n // 6.1\n var adjustedRelatedTarget;\n for (var i = 0; i < relatedTargetEventPath.length; i++) {\n var node = relatedTargetEventPath[i];\n if (getTreeScope(node) === commonAncestorTree)\n return node;\n }\n }\n\n return null;\n }\n\n function inSameTree(a, b) {\n return getTreeScope(a) === getTreeScope(b);\n }\n\n var NONE = 0;\n var CAPTURING_PHASE = 1;\n var AT_TARGET = 2;\n var BUBBLING_PHASE = 3;\n\n // pendingError is used to rethrow the first error we got during an event\n // dispatch. The browser actually reports all errors but to do that we would\n // need to rethrow the error asynchronously.\n var pendingError;\n\n function dispatchOriginalEvent(originalEvent) {\n // Make sure this event is only dispatched once.\n if (handledEventsTable.get(originalEvent))\n return;\n handledEventsTable.set(originalEvent, true);\n dispatchEvent(wrap(originalEvent), wrap(originalEvent.target));\n if (pendingError) {\n var err = pendingError;\n pendingError = null;\n throw err;\n }\n }\n\n function dispatchEvent(event, originalWrapperTarget) {\n if (currentlyDispatchingEvents.get(event))\n throw new Error('InvalidStateError');\n\n currentlyDispatchingEvents.set(event, true);\n\n // Render to ensure that the event path is correct.\n scope.renderAllPending();\n var eventPath;\n\n // http://www.whatwg.org/specs/web-apps/current-work/multipage/webappapis.html#events-and-the-window-object\n // All events dispatched on Nodes with a default view, except load events,\n // should propagate to the Window.\n\n // http://www.whatwg.org/specs/web-apps/current-work/multipage/the-end.html#the-end\n var overrideTarget;\n var win;\n var type = event.type;\n\n // Should really be not cancelable too but since Firefox has a bug there\n // we skip that check.\n // https://bugzilla.mozilla.org/show_bug.cgi?id=999456\n if (type === 'load' && !event.bubbles) {\n var doc = originalWrapperTarget;\n if (doc instanceof wrappers.Document && (win = doc.defaultView)) {\n overrideTarget = doc;\n eventPath = [];\n }\n }\n\n if (!eventPath) {\n if (originalWrapperTarget instanceof wrappers.Window) {\n win = originalWrapperTarget;\n eventPath = [];\n } else {\n eventPath = getEventPath(originalWrapperTarget, event);\n\n if (event.type !== 'load') {\n var doc = eventPath[eventPath.length - 1];\n if (doc instanceof wrappers.Document)\n win = doc.defaultView;\n }\n }\n }\n\n eventPathTable.set(event, eventPath);\n\n if (dispatchCapturing(event, eventPath, win, overrideTarget)) {\n if (dispatchAtTarget(event, eventPath, win, overrideTarget)) {\n dispatchBubbling(event, eventPath, win, overrideTarget);\n }\n }\n\n eventPhaseTable.set(event, NONE);\n currentTargetTable.delete(event, null);\n currentlyDispatchingEvents.delete(event);\n\n return event.defaultPrevented;\n }\n\n function dispatchCapturing(event, eventPath, win, overrideTarget) {\n var phase = CAPTURING_PHASE;\n\n if (win) {\n if (!invoke(win, event, phase, eventPath, overrideTarget))\n return false;\n }\n\n for (var i = eventPath.length - 1; i > 0; i--) {\n if (!invoke(eventPath[i], event, phase, eventPath, overrideTarget))\n return false;\n }\n\n return true;\n }\n\n function dispatchAtTarget(event, eventPath, win, overrideTarget) {\n var phase = AT_TARGET;\n var currentTarget = eventPath[0] || win;\n return invoke(currentTarget, event, phase, eventPath, overrideTarget);\n }\n\n function dispatchBubbling(event, eventPath, win, overrideTarget) {\n var phase = BUBBLING_PHASE;\n for (var i = 1; i < eventPath.length; i++) {\n if (!invoke(eventPath[i], event, phase, eventPath, overrideTarget))\n return;\n }\n\n if (win && eventPath.length > 0) {\n invoke(win, event, phase, eventPath, overrideTarget);\n }\n }\n\n function invoke(currentTarget, event, phase, eventPath, overrideTarget) {\n var listeners = listenersTable.get(currentTarget);\n if (!listeners)\n return true;\n\n var target = overrideTarget || eventRetargetting(eventPath, currentTarget);\n\n if (target === currentTarget) {\n if (phase === CAPTURING_PHASE)\n return true;\n\n if (phase === BUBBLING_PHASE)\n phase = AT_TARGET;\n\n } else if (phase === BUBBLING_PHASE && !event.bubbles) {\n return true;\n }\n\n if ('relatedTarget' in event) {\n var originalEvent = unwrap(event);\n var unwrappedRelatedTarget = originalEvent.relatedTarget;\n\n // X-Tag sets relatedTarget on a CustomEvent. If they do that there is no\n // way to have relatedTarget return the adjusted target but worse is that\n // the originalEvent might not have a relatedTarget so we hit an assert\n // when we try to wrap it.\n if (unwrappedRelatedTarget) {\n // In IE we can get objects that are not EventTargets at this point.\n // Safari does not have an EventTarget interface so revert to checking\n // for addEventListener as an approximation.\n if (unwrappedRelatedTarget instanceof Object &&\n unwrappedRelatedTarget.addEventListener) {\n var relatedTarget = wrap(unwrappedRelatedTarget);\n\n var adjusted =\n relatedTargetResolution(event, currentTarget, relatedTarget);\n if (adjusted === target)\n return true;\n } else {\n adjusted = null;\n }\n relatedTargetTable.set(event, adjusted);\n }\n }\n\n eventPhaseTable.set(event, phase);\n var type = event.type;\n\n var anyRemoved = false;\n // targetTable.set(event, target);\n targetTable.set(event, target);\n currentTargetTable.set(event, currentTarget);\n\n // Keep track of the invoke depth so that we only clean up the removed\n // listeners if we are in the outermost invoke.\n listeners.depth++;\n\n for (var i = 0, len = listeners.length; i < len; i++) {\n var listener = listeners[i];\n if (listener.removed) {\n anyRemoved = true;\n continue;\n }\n\n if (listener.type !== type ||\n !listener.capture && phase === CAPTURING_PHASE ||\n listener.capture && phase === BUBBLING_PHASE) {\n continue;\n }\n\n try {\n if (typeof listener.handler === 'function')\n listener.handler.call(currentTarget, event);\n else\n listener.handler.handleEvent(event);\n\n if (stopImmediatePropagationTable.get(event))\n return false;\n\n } catch (ex) {\n if (!pendingError)\n pendingError = ex;\n }\n }\n\n listeners.depth--;\n\n if (anyRemoved && listeners.depth === 0) {\n var copy = listeners.slice();\n listeners.length = 0;\n for (var i = 0; i < copy.length; i++) {\n if (!copy[i].removed)\n listeners.push(copy[i]);\n }\n }\n\n return !stopPropagationTable.get(event);\n }\n\n function Listener(type, handler, capture) {\n this.type = type;\n this.handler = handler;\n this.capture = Boolean(capture);\n }\n Listener.prototype = {\n equals: function(that) {\n return this.handler === that.handler && this.type === that.type &&\n this.capture === that.capture;\n },\n get removed() {\n return this.handler === null;\n },\n remove: function() {\n this.handler = null;\n }\n };\n\n var OriginalEvent = window.Event;\n OriginalEvent.prototype.polymerBlackList_ = {\n returnValue: true,\n // TODO(arv): keyLocation is part of KeyboardEvent but Firefox does not\n // support constructable KeyboardEvent so we keep it here for now.\n keyLocation: true\n };\n\n /**\n * Creates a new Event wrapper or wraps an existin native Event object.\n * @param {string|Event} type\n * @param {Object=} options\n * @constructor\n */\n function Event(type, options) {\n if (type instanceof OriginalEvent) {\n var impl = type;\n if (!OriginalBeforeUnloadEvent && impl.type === 'beforeunload')\n return new BeforeUnloadEvent(impl);\n this.impl = impl;\n } else {\n return wrap(constructEvent(OriginalEvent, 'Event', type, options));\n }\n }\n Event.prototype = {\n get target() {\n return targetTable.get(this);\n },\n get currentTarget() {\n return currentTargetTable.get(this);\n },\n get eventPhase() {\n return eventPhaseTable.get(this);\n },\n get path() {\n var eventPath = eventPathTable.get(this);\n if (!eventPath)\n return [];\n // TODO(arv): Event path should contain window.\n return eventPath.slice();\n },\n stopPropagation: function() {\n stopPropagationTable.set(this, true);\n },\n stopImmediatePropagation: function() {\n stopPropagationTable.set(this, true);\n stopImmediatePropagationTable.set(this, true);\n }\n };\n registerWrapper(OriginalEvent, Event, document.createEvent('Event'));\n\n function unwrapOptions(options) {\n if (!options || !options.relatedTarget)\n return options;\n return Object.create(options, {\n relatedTarget: {value: unwrap(options.relatedTarget)}\n });\n }\n\n function registerGenericEvent(name, SuperEvent, prototype) {\n var OriginalEvent = window[name];\n var GenericEvent = function(type, options) {\n if (type instanceof OriginalEvent)\n this.impl = type;\n else\n return wrap(constructEvent(OriginalEvent, name, type, options));\n };\n GenericEvent.prototype = Object.create(SuperEvent.prototype);\n if (prototype)\n mixin(GenericEvent.prototype, prototype);\n if (OriginalEvent) {\n // - Old versions of Safari fails on new FocusEvent (and others?).\n // - IE does not support event constructors.\n // - createEvent('FocusEvent') throws in Firefox.\n // => Try the best practice solution first and fallback to the old way\n // if needed.\n try {\n registerWrapper(OriginalEvent, GenericEvent, new OriginalEvent('temp'));\n } catch (ex) {\n registerWrapper(OriginalEvent, GenericEvent,\n document.createEvent(name));\n }\n }\n return GenericEvent;\n }\n\n var UIEvent = registerGenericEvent('UIEvent', Event);\n var CustomEvent = registerGenericEvent('CustomEvent', Event);\n\n var relatedTargetProto = {\n get relatedTarget() {\n var relatedTarget = relatedTargetTable.get(this);\n // relatedTarget can be null.\n if (relatedTarget !== undefined)\n return relatedTarget;\n return wrap(unwrap(this).relatedTarget);\n }\n };\n\n function getInitFunction(name, relatedTargetIndex) {\n return function() {\n arguments[relatedTargetIndex] = unwrap(arguments[relatedTargetIndex]);\n var impl = unwrap(this);\n impl[name].apply(impl, arguments);\n };\n }\n\n var mouseEventProto = mixin({\n initMouseEvent: getInitFunction('initMouseEvent', 14)\n }, relatedTargetProto);\n\n var focusEventProto = mixin({\n initFocusEvent: getInitFunction('initFocusEvent', 5)\n }, relatedTargetProto);\n\n var MouseEvent = registerGenericEvent('MouseEvent', UIEvent, mouseEventProto);\n var FocusEvent = registerGenericEvent('FocusEvent', UIEvent, focusEventProto);\n\n // In case the browser does not support event constructors we polyfill that\n // by calling `createEvent('Foo')` and `initFooEvent` where the arguments to\n // `initFooEvent` are derived from the registered default event init dict.\n var defaultInitDicts = Object.create(null);\n\n var supportsEventConstructors = (function() {\n try {\n new window.FocusEvent('focus');\n } catch (ex) {\n return false;\n }\n return true;\n })();\n\n /**\n * Constructs a new native event.\n */\n function constructEvent(OriginalEvent, name, type, options) {\n if (supportsEventConstructors)\n return new OriginalEvent(type, unwrapOptions(options));\n\n // Create the arguments from the default dictionary.\n var event = unwrap(document.createEvent(name));\n var defaultDict = defaultInitDicts[name];\n var args = [type];\n Object.keys(defaultDict).forEach(function(key) {\n var v = options != null && key in options ?\n options[key] : defaultDict[key];\n if (key === 'relatedTarget')\n v = unwrap(v);\n args.push(v);\n });\n event['init' + name].apply(event, args);\n return event;\n }\n\n if (!supportsEventConstructors) {\n var configureEventConstructor = function(name, initDict, superName) {\n if (superName) {\n var superDict = defaultInitDicts[superName];\n initDict = mixin(mixin({}, superDict), initDict);\n }\n\n defaultInitDicts[name] = initDict;\n };\n\n // The order of the default event init dictionary keys is important, the\n // arguments to initFooEvent is derived from that.\n configureEventConstructor('Event', {bubbles: false, cancelable: false});\n configureEventConstructor('CustomEvent', {detail: null}, 'Event');\n configureEventConstructor('UIEvent', {view: null, detail: 0}, 'Event');\n configureEventConstructor('MouseEvent', {\n screenX: 0,\n screenY: 0,\n clientX: 0,\n clientY: 0,\n ctrlKey: false,\n altKey: false,\n shiftKey: false,\n metaKey: false,\n button: 0,\n relatedTarget: null\n }, 'UIEvent');\n configureEventConstructor('FocusEvent', {relatedTarget: null}, 'UIEvent');\n }\n\n // Safari 7 does not yet have BeforeUnloadEvent.\n // https://bugs.webkit.org/show_bug.cgi?id=120849\n var OriginalBeforeUnloadEvent = window.BeforeUnloadEvent;\n\n function BeforeUnloadEvent(impl) {\n Event.call(this, impl);\n }\n BeforeUnloadEvent.prototype = Object.create(Event.prototype);\n mixin(BeforeUnloadEvent.prototype, {\n get returnValue() {\n return this.impl.returnValue;\n },\n set returnValue(v) {\n this.impl.returnValue = v;\n }\n });\n\n if (OriginalBeforeUnloadEvent)\n registerWrapper(OriginalBeforeUnloadEvent, BeforeUnloadEvent);\n\n function isValidListener(fun) {\n if (typeof fun === 'function')\n return true;\n return fun && fun.handleEvent;\n }\n\n function isMutationEvent(type) {\n switch (type) {\n case 'DOMAttrModified':\n case 'DOMAttributeNameChanged':\n case 'DOMCharacterDataModified':\n case 'DOMElementNameChanged':\n case 'DOMNodeInserted':\n case 'DOMNodeInsertedIntoDocument':\n case 'DOMNodeRemoved':\n case 'DOMNodeRemovedFromDocument':\n case 'DOMSubtreeModified':\n return true;\n }\n return false;\n }\n\n var OriginalEventTarget = window.EventTarget;\n\n /**\n * This represents a wrapper for an EventTarget.\n * @param {!EventTarget} impl The original event target.\n * @constructor\n */\n function EventTarget(impl) {\n this.impl = impl;\n }\n\n // Node and Window have different internal type checks in WebKit so we cannot\n // use the same method as the original function.\n var methodNames = [\n 'addEventListener',\n 'removeEventListener',\n 'dispatchEvent'\n ];\n\n [Node, Window].forEach(function(constructor) {\n var p = constructor.prototype;\n methodNames.forEach(function(name) {\n Object.defineProperty(p, name + '_', {value: p[name]});\n });\n });\n\n function getTargetToListenAt(wrapper) {\n if (wrapper instanceof wrappers.ShadowRoot)\n wrapper = wrapper.host;\n return unwrap(wrapper);\n }\n\n EventTarget.prototype = {\n addEventListener: function(type, fun, capture) {\n if (!isValidListener(fun) || isMutationEvent(type))\n return;\n\n var listener = new Listener(type, fun, capture);\n var listeners = listenersTable.get(this);\n if (!listeners) {\n listeners = [];\n listeners.depth = 0;\n listenersTable.set(this, listeners);\n } else {\n // Might have a duplicate.\n for (var i = 0; i < listeners.length; i++) {\n if (listener.equals(listeners[i]))\n return;\n }\n }\n\n listeners.push(listener);\n\n var target = getTargetToListenAt(this);\n target.addEventListener_(type, dispatchOriginalEvent, true);\n },\n removeEventListener: function(type, fun, capture) {\n capture = Boolean(capture);\n var listeners = listenersTable.get(this);\n if (!listeners)\n return;\n var count = 0, found = false;\n for (var i = 0; i < listeners.length; i++) {\n if (listeners[i].type === type && listeners[i].capture === capture) {\n count++;\n if (listeners[i].handler === fun) {\n found = true;\n listeners[i].remove();\n }\n }\n }\n\n if (found && count === 1) {\n var target = getTargetToListenAt(this);\n target.removeEventListener_(type, dispatchOriginalEvent, true);\n }\n },\n dispatchEvent: function(event) {\n // We want to use the native dispatchEvent because it triggers the default\n // actions (like checking a checkbox). However, if there are no listeners\n // in the composed tree then there are no events that will trigger and\n // listeners in the non composed tree that are part of the event path are\n // not notified.\n //\n // If we find out that there are no listeners in the composed tree we add\n // a temporary listener to the target which makes us get called back even\n // in that case.\n\n var nativeEvent = unwrap(event);\n var eventType = nativeEvent.type;\n\n // Allow dispatching the same event again. This is safe because if user\n // code calls this during an existing dispatch of the same event the\n // native dispatchEvent throws (that is required by the spec).\n handledEventsTable.set(nativeEvent, false);\n\n // Force rendering since we prefer native dispatch and that works on the\n // composed tree.\n scope.renderAllPending();\n\n var tempListener;\n if (!hasListenerInAncestors(this, eventType)) {\n tempListener = function() {};\n this.addEventListener(eventType, tempListener, true);\n }\n\n try {\n return unwrap(this).dispatchEvent_(nativeEvent);\n } finally {\n if (tempListener)\n this.removeEventListener(eventType, tempListener, true);\n }\n }\n };\n\n function hasListener(node, type) {\n var listeners = listenersTable.get(node);\n if (listeners) {\n for (var i = 0; i < listeners.length; i++) {\n if (!listeners[i].removed && listeners[i].type === type)\n return true;\n }\n }\n return false;\n }\n\n function hasListenerInAncestors(target, type) {\n for (var node = unwrap(target); node; node = node.parentNode) {\n if (hasListener(wrap(node), type))\n return true;\n }\n return false;\n }\n\n if (OriginalEventTarget)\n registerWrapper(OriginalEventTarget, EventTarget);\n\n function wrapEventTargetMethods(constructors) {\n forwardMethodsToWrapper(constructors, methodNames);\n }\n\n var originalElementFromPoint = document.elementFromPoint;\n\n function elementFromPoint(self, document, x, y) {\n scope.renderAllPending();\n\n var element = wrap(originalElementFromPoint.call(document.impl, x, y));\n if (!element)\n return null;\n var path = getEventPath(element, null);\n\n // scope the path to this TreeScope\n var idx = path.lastIndexOf(self);\n if (idx == -1)\n return null;\n else\n path = path.slice(0, idx);\n\n // TODO(dfreedm): pass idx to eventRetargetting to avoid array copy\n return eventRetargetting(path, self);\n }\n\n /**\n * Returns a function that is to be used as a getter for `onfoo` properties.\n * @param {string} name\n * @return {Function}\n */\n function getEventHandlerGetter(name) {\n return function() {\n var inlineEventHandlers = eventHandlersTable.get(this);\n return inlineEventHandlers && inlineEventHandlers[name] &&\n inlineEventHandlers[name].value || null;\n };\n }\n\n /**\n * Returns a function that is to be used as a setter for `onfoo` properties.\n * @param {string} name\n * @return {Function}\n */\n function getEventHandlerSetter(name) {\n var eventType = name.slice(2);\n return function(value) {\n var inlineEventHandlers = eventHandlersTable.get(this);\n if (!inlineEventHandlers) {\n inlineEventHandlers = Object.create(null);\n eventHandlersTable.set(this, inlineEventHandlers);\n }\n\n var old = inlineEventHandlers[name];\n if (old)\n this.removeEventListener(eventType, old.wrapped, false);\n\n if (typeof value === 'function') {\n var wrapped = function(e) {\n var rv = value.call(this, e);\n if (rv === false)\n e.preventDefault();\n else if (name === 'onbeforeunload' && typeof rv === 'string')\n e.returnValue = rv;\n // mouseover uses true for preventDefault but preventDefault for\n // mouseover is ignored by browsers these day.\n };\n\n this.addEventListener(eventType, wrapped, false);\n inlineEventHandlers[name] = {\n value: value,\n wrapped: wrapped\n };\n }\n };\n }\n\n scope.elementFromPoint = elementFromPoint;\n scope.getEventHandlerGetter = getEventHandlerGetter;\n scope.getEventHandlerSetter = getEventHandlerSetter;\n scope.wrapEventTargetMethods = wrapEventTargetMethods;\n scope.wrappers.BeforeUnloadEvent = BeforeUnloadEvent;\n scope.wrappers.CustomEvent = CustomEvent;\n scope.wrappers.Event = Event;\n scope.wrappers.EventTarget = EventTarget;\n scope.wrappers.FocusEvent = FocusEvent;\n scope.wrappers.MouseEvent = MouseEvent;\n scope.wrappers.UIEvent = UIEvent;\n\n})(window.ShadowDOMPolyfill);\n","/*\n * Copyright 2014 The Polymer Authors. All rights reserved.\n * Use of this source code is goverened by a BSD-style\n * license that can be found in the LICENSE file.\n */\n\n(function(scope) {\n 'use strict';\n\n var UIEvent = scope.wrappers.UIEvent;\n var mixin = scope.mixin;\n var registerWrapper = scope.registerWrapper;\n var unwrap = scope.unwrap;\n var wrap = scope.wrap;\n\n // TouchEvent is WebKit/Blink only.\n var OriginalTouchEvent = window.TouchEvent;\n if (!OriginalTouchEvent)\n return;\n\n var nativeEvent;\n try {\n nativeEvent = document.createEvent('TouchEvent');\n } catch (ex) {\n // In Chrome creating a TouchEvent fails if the feature is not turned on\n // which it isn't on desktop Chrome.\n return;\n }\n\n var nonEnumDescriptor = {enumerable: false};\n\n function nonEnum(obj, prop) {\n Object.defineProperty(obj, prop, nonEnumDescriptor);\n }\n\n function Touch(impl) {\n this.impl = impl;\n }\n\n Touch.prototype = {\n get target() {\n return wrap(this.impl.target);\n }\n };\n\n var descr = {\n configurable: true,\n enumerable: true,\n get: null\n };\n\n [\n 'clientX',\n 'clientY',\n 'screenX',\n 'screenY',\n 'pageX',\n 'pageY',\n 'identifier',\n 'webkitRadiusX',\n 'webkitRadiusY',\n 'webkitRotationAngle',\n 'webkitForce'\n ].forEach(function(name) {\n descr.get = function() {\n return this.impl[name];\n };\n Object.defineProperty(Touch.prototype, name, descr);\n });\n\n function TouchList() {\n this.length = 0;\n nonEnum(this, 'length');\n }\n\n TouchList.prototype = {\n item: function(index) {\n return this[index];\n }\n };\n\n function wrapTouchList(nativeTouchList) {\n var list = new TouchList();\n for (var i = 0; i < nativeTouchList.length; i++) {\n list[i] = new Touch(nativeTouchList[i]);\n }\n list.length = i;\n return list;\n }\n\n function TouchEvent(impl) {\n UIEvent.call(this, impl);\n }\n\n TouchEvent.prototype = Object.create(UIEvent.prototype);\n\n mixin(TouchEvent.prototype, {\n get touches() {\n return wrapTouchList(unwrap(this).touches);\n },\n\n get targetTouches() {\n return wrapTouchList(unwrap(this).targetTouches);\n },\n\n get changedTouches() {\n return wrapTouchList(unwrap(this).changedTouches);\n },\n\n initTouchEvent: function() {\n // The only way to use this is to reuse the TouchList from an existing\n // TouchEvent. Since this is WebKit/Blink proprietary API we will not\n // implement this until someone screams.\n throw new Error('Not implemented');\n }\n });\n\n registerWrapper(OriginalTouchEvent, TouchEvent, nativeEvent);\n\n scope.wrappers.Touch = Touch;\n scope.wrappers.TouchEvent = TouchEvent;\n scope.wrappers.TouchList = TouchList;\n\n})(window.ShadowDOMPolyfill);\n\n","// Copyright 2012 The Polymer Authors. All rights reserved.\n// Use of this source code is goverened by a BSD-style\n// license that can be found in the LICENSE file.\n\n(function(scope) {\n 'use strict';\n\n var wrap = scope.wrap;\n\n var nonEnumDescriptor = {enumerable: false};\n\n function nonEnum(obj, prop) {\n Object.defineProperty(obj, prop, nonEnumDescriptor);\n }\n\n function NodeList() {\n this.length = 0;\n nonEnum(this, 'length');\n }\n NodeList.prototype = {\n item: function(index) {\n return this[index];\n }\n };\n nonEnum(NodeList.prototype, 'item');\n\n function wrapNodeList(list) {\n if (list == null)\n return list;\n var wrapperList = new NodeList();\n for (var i = 0, length = list.length; i < length; i++) {\n wrapperList[i] = wrap(list[i]);\n }\n wrapperList.length = length;\n return wrapperList;\n }\n\n function addWrapNodeListMethod(wrapperConstructor, name) {\n wrapperConstructor.prototype[name] = function() {\n return wrapNodeList(this.impl[name].apply(this.impl, arguments));\n };\n }\n\n scope.wrappers.NodeList = NodeList;\n scope.addWrapNodeListMethod = addWrapNodeListMethod;\n scope.wrapNodeList = wrapNodeList;\n\n})(window.ShadowDOMPolyfill);\n","/*\n * Copyright 2014 The Polymer Authors. All rights reserved.\n * Use of this source code is goverened by a BSD-style\n * license that can be found in the LICENSE file.\n */\n\n(function(scope) {\n 'use strict';\n\n // TODO(arv): Implement.\n\n scope.wrapHTMLCollection = scope.wrapNodeList;\n scope.wrappers.HTMLCollection = scope.wrappers.NodeList;\n\n})(window.ShadowDOMPolyfill);\n","/**\n * Copyright 2012 The Polymer Authors. All rights reserved.\n * Use of this source code is goverened by a BSD-style\n * license that can be found in the LICENSE file.\n */\n\n(function(scope) {\n 'use strict';\n\n var EventTarget = scope.wrappers.EventTarget;\n var NodeList = scope.wrappers.NodeList;\n var TreeScope = scope.TreeScope;\n var assert = scope.assert;\n var defineWrapGetter = scope.defineWrapGetter;\n var enqueueMutation = scope.enqueueMutation;\n var getTreeScope = scope.getTreeScope;\n var isWrapper = scope.isWrapper;\n var mixin = scope.mixin;\n var registerTransientObservers = scope.registerTransientObservers;\n var registerWrapper = scope.registerWrapper;\n var setTreeScope = scope.setTreeScope;\n var unwrap = scope.unwrap;\n var unwrapIfNeeded = scope.unwrapIfNeeded;\n var wrap = scope.wrap;\n var wrapIfNeeded = scope.wrapIfNeeded;\n var wrappers = scope.wrappers;\n\n function assertIsNodeWrapper(node) {\n assert(node instanceof Node);\n }\n\n function createOneElementNodeList(node) {\n var nodes = new NodeList();\n nodes[0] = node;\n nodes.length = 1;\n return nodes;\n }\n\n var surpressMutations = false;\n\n /**\n * Called before node is inserted into a node to enqueue its removal from its\n * old parent.\n * @param {!Node} node The node that is about to be removed.\n * @param {!Node} parent The parent node that the node is being removed from.\n * @param {!NodeList} nodes The collected nodes.\n */\n function enqueueRemovalForInsertedNodes(node, parent, nodes) {\n enqueueMutation(parent, 'childList', {\n removedNodes: nodes,\n previousSibling: node.previousSibling,\n nextSibling: node.nextSibling\n });\n }\n\n function enqueueRemovalForInsertedDocumentFragment(df, nodes) {\n enqueueMutation(df, 'childList', {\n removedNodes: nodes\n });\n }\n\n /**\n * Collects nodes from a DocumentFragment or a Node for removal followed\n * by an insertion.\n *\n * This updates the internal pointers for node, previousNode and nextNode.\n */\n function collectNodes(node, parentNode, previousNode, nextNode) {\n if (node instanceof DocumentFragment) {\n var nodes = collectNodesForDocumentFragment(node);\n\n // The extra loop is to work around bugs with DocumentFragments in IE.\n surpressMutations = true;\n for (var i = nodes.length - 1; i >= 0; i--) {\n node.removeChild(nodes[i]);\n nodes[i].parentNode_ = parentNode;\n }\n surpressMutations = false;\n\n for (var i = 0; i < nodes.length; i++) {\n nodes[i].previousSibling_ = nodes[i - 1] || previousNode;\n nodes[i].nextSibling_ = nodes[i + 1] || nextNode;\n }\n\n if (previousNode)\n previousNode.nextSibling_ = nodes[0];\n if (nextNode)\n nextNode.previousSibling_ = nodes[nodes.length - 1];\n\n return nodes;\n }\n\n var nodes = createOneElementNodeList(node);\n var oldParent = node.parentNode;\n if (oldParent) {\n // This will enqueue the mutation record for the removal as needed.\n oldParent.removeChild(node);\n }\n\n node.parentNode_ = parentNode;\n node.previousSibling_ = previousNode;\n node.nextSibling_ = nextNode;\n if (previousNode)\n previousNode.nextSibling_ = node;\n if (nextNode)\n nextNode.previousSibling_ = node;\n\n return nodes;\n }\n\n function collectNodesNative(node) {\n if (node instanceof DocumentFragment)\n return collectNodesForDocumentFragment(node);\n\n var nodes = createOneElementNodeList(node);\n var oldParent = node.parentNode;\n if (oldParent)\n enqueueRemovalForInsertedNodes(node, oldParent, nodes);\n return nodes;\n }\n\n function collectNodesForDocumentFragment(node) {\n var nodes = new NodeList();\n var i = 0;\n for (var child = node.firstChild; child; child = child.nextSibling) {\n nodes[i++] = child;\n }\n nodes.length = i;\n enqueueRemovalForInsertedDocumentFragment(node, nodes);\n return nodes;\n }\n\n function snapshotNodeList(nodeList) {\n // NodeLists are not live at the moment so just return the same object.\n return nodeList;\n }\n\n // http://dom.spec.whatwg.org/#node-is-inserted\n function nodeWasAdded(node, treeScope) {\n setTreeScope(node, treeScope);\n node.nodeIsInserted_();\n }\n\n function nodesWereAdded(nodes, parent) {\n var treeScope = getTreeScope(parent);\n for (var i = 0; i < nodes.length; i++) {\n nodeWasAdded(nodes[i], treeScope);\n }\n }\n\n // http://dom.spec.whatwg.org/#node-is-removed\n function nodeWasRemoved(node) {\n setTreeScope(node, new TreeScope(node, null));\n }\n\n function nodesWereRemoved(nodes) {\n for (var i = 0; i < nodes.length; i++) {\n nodeWasRemoved(nodes[i]);\n }\n }\n\n function ensureSameOwnerDocument(parent, child) {\n var ownerDoc = parent.nodeType === Node.DOCUMENT_NODE ?\n parent : parent.ownerDocument;\n if (ownerDoc !== child.ownerDocument)\n ownerDoc.adoptNode(child);\n }\n\n function adoptNodesIfNeeded(owner, nodes) {\n if (!nodes.length)\n return;\n\n var ownerDoc = owner.ownerDocument;\n\n // All nodes have the same ownerDocument when we get here.\n if (ownerDoc === nodes[0].ownerDocument)\n return;\n\n for (var i = 0; i < nodes.length; i++) {\n scope.adoptNodeNoRemove(nodes[i], ownerDoc);\n }\n }\n\n function unwrapNodesForInsertion(owner, nodes) {\n adoptNodesIfNeeded(owner, nodes);\n var length = nodes.length;\n\n if (length === 1)\n return unwrap(nodes[0]);\n\n var df = unwrap(owner.ownerDocument.createDocumentFragment());\n for (var i = 0; i < length; i++) {\n df.appendChild(unwrap(nodes[i]));\n }\n return df;\n }\n\n function clearChildNodes(wrapper) {\n if (wrapper.firstChild_ !== undefined) {\n var child = wrapper.firstChild_;\n while (child) {\n var tmp = child;\n child = child.nextSibling_;\n tmp.parentNode_ = tmp.previousSibling_ = tmp.nextSibling_ = undefined;\n }\n }\n wrapper.firstChild_ = wrapper.lastChild_ = undefined;\n }\n\n function removeAllChildNodes(wrapper) {\n if (wrapper.invalidateShadowRenderer()) {\n var childWrapper = wrapper.firstChild;\n while (childWrapper) {\n assert(childWrapper.parentNode === wrapper);\n var nextSibling = childWrapper.nextSibling;\n var childNode = unwrap(childWrapper);\n var parentNode = childNode.parentNode;\n if (parentNode)\n originalRemoveChild.call(parentNode, childNode);\n childWrapper.previousSibling_ = childWrapper.nextSibling_ =\n childWrapper.parentNode_ = null;\n childWrapper = nextSibling;\n }\n wrapper.firstChild_ = wrapper.lastChild_ = null;\n } else {\n var node = unwrap(wrapper);\n var child = node.firstChild;\n var nextSibling;\n while (child) {\n nextSibling = child.nextSibling;\n originalRemoveChild.call(node, child);\n child = nextSibling;\n }\n }\n }\n\n function invalidateParent(node) {\n var p = node.parentNode;\n return p && p.invalidateShadowRenderer();\n }\n\n function cleanupNodes(nodes) {\n for (var i = 0, n; i < nodes.length; i++) {\n n = nodes[i];\n n.parentNode.removeChild(n);\n }\n }\n\n var originalImportNode = document.importNode;\n var originalCloneNode = window.Node.prototype.cloneNode;\n\n function cloneNode(node, deep, opt_doc) {\n var clone;\n if (opt_doc)\n clone = wrap(originalImportNode.call(opt_doc, node.impl, false));\n else\n clone = wrap(originalCloneNode.call(node.impl, false));\n\n if (deep) {\n for (var child = node.firstChild; child; child = child.nextSibling) {\n clone.appendChild(cloneNode(child, true, opt_doc));\n }\n\n if (node instanceof wrappers.HTMLTemplateElement) {\n var cloneContent = clone.content;\n for (var child = node.content.firstChild;\n child;\n child = child.nextSibling) {\n cloneContent.appendChild(cloneNode(child, true, opt_doc));\n }\n }\n }\n // TODO(arv): Some HTML elements also clone other data like value.\n return clone;\n }\n\n function contains(self, child) {\n if (!child || getTreeScope(self) !== getTreeScope(child))\n return false;\n\n for (var node = child; node; node = node.parentNode) {\n if (node === self)\n return true;\n }\n return false;\n }\n\n var OriginalNode = window.Node;\n\n /**\n * This represents a wrapper of a native DOM node.\n * @param {!Node} original The original DOM node, aka, the visual DOM node.\n * @constructor\n * @extends {EventTarget}\n */\n function Node(original) {\n assert(original instanceof OriginalNode);\n\n EventTarget.call(this, original);\n\n // These properties are used to override the visual references with the\n // logical ones. If the value is undefined it means that the logical is the\n // same as the visual.\n\n /**\n * @type {Node|undefined}\n * @private\n */\n this.parentNode_ = undefined;\n\n /**\n * @type {Node|undefined}\n * @private\n */\n this.firstChild_ = undefined;\n\n /**\n * @type {Node|undefined}\n * @private\n */\n this.lastChild_ = undefined;\n\n /**\n * @type {Node|undefined}\n * @private\n */\n this.nextSibling_ = undefined;\n\n /**\n * @type {Node|undefined}\n * @private\n */\n this.previousSibling_ = undefined;\n\n this.treeScope_ = undefined;\n }\n\n var OriginalDocumentFragment = window.DocumentFragment;\n var originalAppendChild = OriginalNode.prototype.appendChild;\n var originalCompareDocumentPosition =\n OriginalNode.prototype.compareDocumentPosition;\n var originalInsertBefore = OriginalNode.prototype.insertBefore;\n var originalRemoveChild = OriginalNode.prototype.removeChild;\n var originalReplaceChild = OriginalNode.prototype.replaceChild;\n\n var isIe = /Trident/.test(navigator.userAgent);\n\n var removeChildOriginalHelper = isIe ?\n function(parent, child) {\n try {\n originalRemoveChild.call(parent, child);\n } catch (ex) {\n if (!(parent instanceof OriginalDocumentFragment))\n throw ex;\n }\n } :\n function(parent, child) {\n originalRemoveChild.call(parent, child);\n };\n\n Node.prototype = Object.create(EventTarget.prototype);\n mixin(Node.prototype, {\n appendChild: function(childWrapper) {\n return this.insertBefore(childWrapper, null);\n },\n\n insertBefore: function(childWrapper, refWrapper) {\n assertIsNodeWrapper(childWrapper);\n\n var refNode;\n if (refWrapper) {\n if (isWrapper(refWrapper)) {\n refNode = unwrap(refWrapper);\n } else {\n refNode = refWrapper;\n refWrapper = wrap(refNode);\n }\n } else {\n refWrapper = null;\n refNode = null;\n }\n\n refWrapper && assert(refWrapper.parentNode === this);\n\n var nodes;\n var previousNode =\n refWrapper ? refWrapper.previousSibling : this.lastChild;\n\n var useNative = !this.invalidateShadowRenderer() &&\n !invalidateParent(childWrapper);\n\n if (useNative)\n nodes = collectNodesNative(childWrapper);\n else\n nodes = collectNodes(childWrapper, this, previousNode, refWrapper);\n\n if (useNative) {\n ensureSameOwnerDocument(this, childWrapper);\n clearChildNodes(this);\n originalInsertBefore.call(this.impl, unwrap(childWrapper), refNode);\n } else {\n if (!previousNode)\n this.firstChild_ = nodes[0];\n if (!refWrapper) {\n this.lastChild_ = nodes[nodes.length - 1];\n if (this.firstChild_ === undefined)\n this.firstChild_ = this.firstChild;\n }\n\n var parentNode = refNode ? refNode.parentNode : this.impl;\n\n // insertBefore refWrapper no matter what the parent is?\n if (parentNode) {\n originalInsertBefore.call(parentNode,\n unwrapNodesForInsertion(this, nodes), refNode);\n } else {\n adoptNodesIfNeeded(this, nodes);\n }\n }\n\n enqueueMutation(this, 'childList', {\n addedNodes: nodes,\n nextSibling: refWrapper,\n previousSibling: previousNode\n });\n\n nodesWereAdded(nodes, this);\n\n return childWrapper;\n },\n\n removeChild: function(childWrapper) {\n assertIsNodeWrapper(childWrapper);\n if (childWrapper.parentNode !== this) {\n // IE has invalid DOM trees at times.\n var found = false;\n var childNodes = this.childNodes;\n for (var ieChild = this.firstChild; ieChild;\n ieChild = ieChild.nextSibling) {\n if (ieChild === childWrapper) {\n found = true;\n break;\n }\n }\n if (!found) {\n // TODO(arv): DOMException\n throw new Error('NotFoundError');\n }\n }\n\n var childNode = unwrap(childWrapper);\n var childWrapperNextSibling = childWrapper.nextSibling;\n var childWrapperPreviousSibling = childWrapper.previousSibling;\n\n if (this.invalidateShadowRenderer()) {\n // We need to remove the real node from the DOM before updating the\n // pointers. This is so that that mutation event is dispatched before\n // the pointers have changed.\n var thisFirstChild = this.firstChild;\n var thisLastChild = this.lastChild;\n\n var parentNode = childNode.parentNode;\n if (parentNode)\n removeChildOriginalHelper(parentNode, childNode);\n\n if (thisFirstChild === childWrapper)\n this.firstChild_ = childWrapperNextSibling;\n if (thisLastChild === childWrapper)\n this.lastChild_ = childWrapperPreviousSibling;\n if (childWrapperPreviousSibling)\n childWrapperPreviousSibling.nextSibling_ = childWrapperNextSibling;\n if (childWrapperNextSibling) {\n childWrapperNextSibling.previousSibling_ =\n childWrapperPreviousSibling;\n }\n\n childWrapper.previousSibling_ = childWrapper.nextSibling_ =\n childWrapper.parentNode_ = undefined;\n } else {\n clearChildNodes(this);\n removeChildOriginalHelper(this.impl, childNode);\n }\n\n if (!surpressMutations) {\n enqueueMutation(this, 'childList', {\n removedNodes: createOneElementNodeList(childWrapper),\n nextSibling: childWrapperNextSibling,\n previousSibling: childWrapperPreviousSibling\n });\n }\n\n registerTransientObservers(this, childWrapper);\n\n return childWrapper;\n },\n\n replaceChild: function(newChildWrapper, oldChildWrapper) {\n assertIsNodeWrapper(newChildWrapper);\n\n var oldChildNode;\n if (isWrapper(oldChildWrapper)) {\n oldChildNode = unwrap(oldChildWrapper);\n } else {\n oldChildNode = oldChildWrapper;\n oldChildWrapper = wrap(oldChildNode);\n }\n\n if (oldChildWrapper.parentNode !== this) {\n // TODO(arv): DOMException\n throw new Error('NotFoundError');\n }\n\n var nextNode = oldChildWrapper.nextSibling;\n var previousNode = oldChildWrapper.previousSibling;\n var nodes;\n\n var useNative = !this.invalidateShadowRenderer() &&\n !invalidateParent(newChildWrapper);\n\n if (useNative) {\n nodes = collectNodesNative(newChildWrapper);\n } else {\n if (nextNode === newChildWrapper)\n nextNode = newChildWrapper.nextSibling;\n nodes = collectNodes(newChildWrapper, this, previousNode, nextNode);\n }\n\n if (!useNative) {\n if (this.firstChild === oldChildWrapper)\n this.firstChild_ = nodes[0];\n if (this.lastChild === oldChildWrapper)\n this.lastChild_ = nodes[nodes.length - 1];\n\n oldChildWrapper.previousSibling_ = oldChildWrapper.nextSibling_ =\n oldChildWrapper.parentNode_ = undefined;\n\n // replaceChild no matter what the parent is?\n if (oldChildNode.parentNode) {\n originalReplaceChild.call(\n oldChildNode.parentNode,\n unwrapNodesForInsertion(this, nodes),\n oldChildNode);\n }\n } else {\n ensureSameOwnerDocument(this, newChildWrapper);\n clearChildNodes(this);\n originalReplaceChild.call(this.impl, unwrap(newChildWrapper),\n oldChildNode);\n }\n\n enqueueMutation(this, 'childList', {\n addedNodes: nodes,\n removedNodes: createOneElementNodeList(oldChildWrapper),\n nextSibling: nextNode,\n previousSibling: previousNode\n });\n\n nodeWasRemoved(oldChildWrapper);\n nodesWereAdded(nodes, this);\n\n return oldChildWrapper;\n },\n\n /**\n * Called after a node was inserted. Subclasses override this to invalidate\n * the renderer as needed.\n * @private\n */\n nodeIsInserted_: function() {\n for (var child = this.firstChild; child; child = child.nextSibling) {\n child.nodeIsInserted_();\n }\n },\n\n hasChildNodes: function() {\n return this.firstChild !== null;\n },\n\n /** @type {Node} */\n get parentNode() {\n // If the parentNode has not been overridden, use the original parentNode.\n return this.parentNode_ !== undefined ?\n this.parentNode_ : wrap(this.impl.parentNode);\n },\n\n /** @type {Node} */\n get firstChild() {\n return this.firstChild_ !== undefined ?\n this.firstChild_ : wrap(this.impl.firstChild);\n },\n\n /** @type {Node} */\n get lastChild() {\n return this.lastChild_ !== undefined ?\n this.lastChild_ : wrap(this.impl.lastChild);\n },\n\n /** @type {Node} */\n get nextSibling() {\n return this.nextSibling_ !== undefined ?\n this.nextSibling_ : wrap(this.impl.nextSibling);\n },\n\n /** @type {Node} */\n get previousSibling() {\n return this.previousSibling_ !== undefined ?\n this.previousSibling_ : wrap(this.impl.previousSibling);\n },\n\n get parentElement() {\n var p = this.parentNode;\n while (p && p.nodeType !== Node.ELEMENT_NODE) {\n p = p.parentNode;\n }\n return p;\n },\n\n get textContent() {\n // TODO(arv): This should fallback to this.impl.textContent if there\n // are no shadow trees below or above the context node.\n var s = '';\n for (var child = this.firstChild; child; child = child.nextSibling) {\n if (child.nodeType != Node.COMMENT_NODE) {\n s += child.textContent;\n }\n }\n return s;\n },\n set textContent(textContent) {\n var removedNodes = snapshotNodeList(this.childNodes);\n\n if (this.invalidateShadowRenderer()) {\n removeAllChildNodes(this);\n if (textContent !== '') {\n var textNode = this.impl.ownerDocument.createTextNode(textContent);\n this.appendChild(textNode);\n }\n } else {\n clearChildNodes(this);\n this.impl.textContent = textContent;\n }\n\n var addedNodes = snapshotNodeList(this.childNodes);\n\n enqueueMutation(this, 'childList', {\n addedNodes: addedNodes,\n removedNodes: removedNodes\n });\n\n nodesWereRemoved(removedNodes);\n nodesWereAdded(addedNodes, this);\n },\n\n get childNodes() {\n var wrapperList = new NodeList();\n var i = 0;\n for (var child = this.firstChild; child; child = child.nextSibling) {\n wrapperList[i++] = child;\n }\n wrapperList.length = i;\n return wrapperList;\n },\n\n cloneNode: function(deep) {\n return cloneNode(this, deep);\n },\n\n contains: function(child) {\n return contains(this, wrapIfNeeded(child));\n },\n\n compareDocumentPosition: function(otherNode) {\n // This only wraps, it therefore only operates on the composed DOM and not\n // the logical DOM.\n return originalCompareDocumentPosition.call(this.impl,\n unwrapIfNeeded(otherNode));\n },\n\n normalize: function() {\n var nodes = snapshotNodeList(this.childNodes);\n var remNodes = [];\n var s = '';\n var modNode;\n\n for (var i = 0, n; i < nodes.length; i++) {\n n = nodes[i];\n if (n.nodeType === Node.TEXT_NODE) {\n if (!modNode && !n.data.length)\n this.removeNode(n);\n else if (!modNode)\n modNode = n;\n else {\n s += n.data;\n remNodes.push(n);\n }\n } else {\n if (modNode && remNodes.length) {\n modNode.data += s;\n cleanupNodes(remNodes);\n }\n remNodes = [];\n s = '';\n modNode = null;\n if (n.childNodes.length)\n n.normalize();\n }\n }\n\n // handle case where >1 text nodes are the last children\n if (modNode && remNodes.length) {\n modNode.data += s;\n cleanupNodes(remNodes);\n }\n }\n });\n\n defineWrapGetter(Node, 'ownerDocument');\n\n // We use a DocumentFragment as a base and then delete the properties of\n // DocumentFragment.prototype from the wrapper Node. Since delete makes\n // objects slow in some JS engines we recreate the prototype object.\n registerWrapper(OriginalNode, Node, document.createDocumentFragment());\n delete Node.prototype.querySelector;\n delete Node.prototype.querySelectorAll;\n Node.prototype = mixin(Object.create(EventTarget.prototype), Node.prototype);\n\n scope.cloneNode = cloneNode;\n scope.nodeWasAdded = nodeWasAdded;\n scope.nodeWasRemoved = nodeWasRemoved;\n scope.nodesWereAdded = nodesWereAdded;\n scope.nodesWereRemoved = nodesWereRemoved;\n scope.snapshotNodeList = snapshotNodeList;\n scope.wrappers.Node = Node;\n\n})(window.ShadowDOMPolyfill);\n","// Copyright 2013 The Polymer Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\n(function(scope) {\n 'use strict';\n\n var HTMLCollection = scope.wrappers.HTMLCollection;\n var NodeList = scope.wrappers.NodeList;\n var getTreeScope = scope.getTreeScope;\n var wrap = scope.wrap;\n\n var originalDocumentQuerySelector = document.querySelector;\n var originalElementQuerySelector = document.documentElement.querySelector;\n\n var originalDocumentQuerySelectorAll = document.querySelectorAll;\n var originalElementQuerySelectorAll = document.documentElement.querySelectorAll;\n\n var originalDocumentGetElementsByTagName = document.getElementsByTagName;\n var originalElementGetElementsByTagName = document.documentElement.getElementsByTagName;\n\n var originalDocumentGetElementsByTagNameNS = document.getElementsByTagNameNS;\n var originalElementGetElementsByTagNameNS = document.documentElement.getElementsByTagNameNS;\n\n var OriginalElement = window.Element;\n var OriginalDocument = window.HTMLDocument;\n\n function filterNodeList(list, index, result) {\n var wrappedItem = null;\n var root = null;\n for (var i = 0, length = list.length; i < length; i++) {\n wrappedItem = wrap(list[i]);\n if (root = getTreeScope(wrappedItem).root) {\n if (root instanceof scope.wrappers.ShadowRoot) {\n continue;\n }\n }\n result[index++] = wrappedItem;\n }\n \n return index;\n }\n\n function findOne(node, selector) {\n var m, el = node.firstElementChild;\n while (el) {\n if (el.matches(selector))\n return el;\n m = findOne(el, selector);\n if (m)\n return m;\n el = el.nextElementSibling;\n }\n return null;\n }\n\n function matchesSelector(el, selector) {\n return el.matches(selector);\n }\n\n var XHTML_NS = 'http://www.w3.org/1999/xhtml';\n\n function matchesTagName(el, localName, localNameLowerCase) {\n var ln = el.localName;\n return ln === localName ||\n ln === localNameLowerCase && el.namespaceURI === XHTML_NS;\n }\n\n function matchesEveryThing() {\n return true;\n }\n\n function matchesLocalNameOnly(el, ns, localName) {\n return el.localName === localName;\n }\n\n function matchesNameSpace(el, ns) {\n return el.namespaceURI === ns;\n }\n\n function matchesLocalNameNS(el, ns, localName) {\n return el.namespaceURI === ns && el.localName === localName;\n }\n\n function findElements(node, index, result, p, arg0, arg1) {\n var el = node.firstElementChild;\n while (el) {\n if (p(el, arg0, arg1))\n result[index++] = el;\n index = findElements(el, index, result, p, arg0, arg1);\n el = el.nextElementSibling;\n }\n return index;\n }\n\n // find and findAll will only match Simple Selectors,\n // Structural Pseudo Classes are not guarenteed to be correct\n // http://www.w3.org/TR/css3-selectors/#simple-selectors\n\n function querySelectorAllFiltered (p, index, result, selector) {\n var target = this.impl;\n var list;\n var root = getTreeScope(this).root;\n if (root instanceof scope.wrappers.ShadowRoot) {\n // We are in the shadow tree and the logical tree is\n // going to be disconnected so we do a manual tree traversal\n return findElements(this, index, result, p, selector, null);\n } else if (target instanceof OriginalElement) {\n list = originalElementQuerySelectorAll.call(target, selector);\n } else if (target instanceof OriginalDocument) {\n list = originalDocumentQuerySelectorAll.call(target, selector);\n } else {\n // When we get a ShadowRoot the logical tree is going to be disconnected\n // so we do a manual tree traversal\n return findElements(this, index, result, p, selector, null);\n }\n\n return filterNodeList(list, index, result);\n }\n\n var SelectorsInterface = {\n querySelector: function(selector) {\n var target = this.impl;\n var wrappedItem;\n var root = getTreeScope(this).root;\n if (root instanceof scope.wrappers.ShadowRoot) {\n // We are in the shadow tree and the logical tree is\n // going to be disconnected so we do a manual tree traversal\n return findOne(this, selector);\n } else if (target instanceof OriginalElement) {\n wrappedItem = wrap(originalElementQuerySelector.call(target, selector));\n } else if (target instanceof OriginalDocument) {\n wrappedItem = wrap(originalDocumentQuerySelector.call(target, selector));\n } else {\n // When we get a ShadowRoot the logical tree is going to be disconnected\n // so we do a manual tree traversal\n return findOne(this, selector);\n }\n\n if (!wrappedItem) {\n // When the original query returns nothing\n // we return nothing (to be consistent with the other wrapped calls)\n return wrappedItem;\n } else if (root = getTreeScope(wrappedItem).root) {\n if (root instanceof scope.wrappers.ShadowRoot) {\n // When the original query returns an element in the ShadowDOM\n // we must do a manual tree traversal\n return findOne(this, selector);\n }\n }\n\n return wrappedItem;\n },\n querySelectorAll: function(selector) {\n var result = new NodeList();\n\n result.length = querySelectorAllFiltered.call(this,\n matchesSelector,\n 0,\n result,\n selector);\n\n return result;\n }\n };\n\n function getElementsByTagNameFiltered (p, index, result, localName, lowercase) {\n var target = this.impl;\n var list;\n var root = getTreeScope(this).root;\n if (root instanceof scope.wrappers.ShadowRoot) {\n // We are in the shadow tree and the logical tree is\n // going to be disconnected so we do a manual tree traversal\n return findElements(this, index, result, p, localName, lowercase);\n } else if (target instanceof OriginalElement) {\n list = originalElementGetElementsByTagName.call(target, localName, lowercase);\n } else if (target instanceof OriginalDocument) {\n list = originalDocumentGetElementsByTagName.call(target, localName, lowercase);\n } else {\n // When we get a ShadowRoot the logical tree is going to be disconnected\n // so we do a manual tree traversal\n return findElements(this, index, result, p, localName, lowercase);\n }\n\n return filterNodeList(list, index, result);\n }\n\n function getElementsByTagNameNSFiltered (p, index, result, ns, localName) {\n var target = this.impl;\n var list;\n var root = getTreeScope(this).root;\n if (root instanceof scope.wrappers.ShadowRoot) {\n // We are in the shadow tree and the logical tree is\n // going to be disconnected so we do a manual tree traversal\n return findElements(this, index, result, p, ns, localName);\n } else if (target instanceof OriginalElement) {\n list = originalElementGetElementsByTagNameNS.call(target, ns, localName);\n } else if (target instanceof OriginalDocument) {\n list = originalDocumentGetElementsByTagNameNS.call(target, ns, localName);\n } else {\n // When we get a ShadowRoot the logical tree is going to be disconnected\n // so we do a manual tree traversal\n return findElements(this, index, result, p, ns, localName);\n }\n\n return filterNodeList(list, index, result);\n }\n\n var GetElementsByInterface = {\n getElementsByTagName: function(localName) {\n var result = new HTMLCollection();\n var match = localName === '*' ? matchesEveryThing : matchesTagName;\n\n result.length = getElementsByTagNameFiltered.call(this, \n match,\n 0, \n result,\n localName,\n localName.toLowerCase());\n\n return result;\n },\n\n getElementsByClassName: function(className) {\n // TODO(arv): Check className?\n return this.querySelectorAll('.' + className);\n },\n\n getElementsByTagNameNS: function(ns, localName) {\n var result = new HTMLCollection();\n var match = null;\n\n if (ns === '*') {\n match = localName === '*' ? matchesEveryThing : matchesLocalNameOnly;\n } else {\n match = localName === '*' ? matchesNameSpace : matchesLocalNameNS;\n }\n \n result.length = getElementsByTagNameNSFiltered.call(this, \n match,\n 0,\n result,\n ns || null,\n localName);\n\n return result;\n }\n };\n\n scope.GetElementsByInterface = GetElementsByInterface;\n scope.SelectorsInterface = SelectorsInterface;\n\n})(window.ShadowDOMPolyfill);\n","// Copyright 2013 The Polymer Authors. All rights reserved.\n// Use of this source code is goverened by a BSD-style\n// license that can be found in the LICENSE file.\n\n(function(scope) {\n 'use strict';\n\n var NodeList = scope.wrappers.NodeList;\n\n function forwardElement(node) {\n while (node && node.nodeType !== Node.ELEMENT_NODE) {\n node = node.nextSibling;\n }\n return node;\n }\n\n function backwardsElement(node) {\n while (node && node.nodeType !== Node.ELEMENT_NODE) {\n node = node.previousSibling;\n }\n return node;\n }\n\n var ParentNodeInterface = {\n get firstElementChild() {\n return forwardElement(this.firstChild);\n },\n\n get lastElementChild() {\n return backwardsElement(this.lastChild);\n },\n\n get childElementCount() {\n var count = 0;\n for (var child = this.firstElementChild;\n child;\n child = child.nextElementSibling) {\n count++;\n }\n return count;\n },\n\n get children() {\n var wrapperList = new NodeList();\n var i = 0;\n for (var child = this.firstElementChild;\n child;\n child = child.nextElementSibling) {\n wrapperList[i++] = child;\n }\n wrapperList.length = i;\n return wrapperList;\n },\n\n remove: function() {\n var p = this.parentNode;\n if (p)\n p.removeChild(this);\n }\n };\n\n var ChildNodeInterface = {\n get nextElementSibling() {\n return forwardElement(this.nextSibling);\n },\n\n get previousElementSibling() {\n return backwardsElement(this.previousSibling);\n }\n };\n\n scope.ChildNodeInterface = ChildNodeInterface;\n scope.ParentNodeInterface = ParentNodeInterface;\n\n})(window.ShadowDOMPolyfill);\n","// Copyright 2013 The Polymer Authors. All rights reserved.\n// Use of this source code is goverened by a BSD-style\n// license that can be found in the LICENSE file.\n\n(function(scope) {\n 'use strict';\n\n var ChildNodeInterface = scope.ChildNodeInterface;\n var Node = scope.wrappers.Node;\n var enqueueMutation = scope.enqueueMutation;\n var mixin = scope.mixin;\n var registerWrapper = scope.registerWrapper;\n\n var OriginalCharacterData = window.CharacterData;\n\n function CharacterData(node) {\n Node.call(this, node);\n }\n CharacterData.prototype = Object.create(Node.prototype);\n mixin(CharacterData.prototype, {\n get textContent() {\n return this.data;\n },\n set textContent(value) {\n this.data = value;\n },\n get data() {\n return this.impl.data;\n },\n set data(value) {\n var oldValue = this.impl.data;\n enqueueMutation(this, 'characterData', {\n oldValue: oldValue\n });\n this.impl.data = value;\n }\n });\n\n mixin(CharacterData.prototype, ChildNodeInterface);\n\n registerWrapper(OriginalCharacterData, CharacterData,\n document.createTextNode(''));\n\n scope.wrappers.CharacterData = CharacterData;\n})(window.ShadowDOMPolyfill);\n","// Copyright 2014 The Polymer Authors. All rights reserved.\n// Use of this source code is goverened by a BSD-style\n// license that can be found in the LICENSE file.\n\n(function(scope) {\n 'use strict';\n\n var CharacterData = scope.wrappers.CharacterData;\n var enqueueMutation = scope.enqueueMutation;\n var mixin = scope.mixin;\n var registerWrapper = scope.registerWrapper;\n\n function toUInt32(x) {\n return x >>> 0;\n }\n\n var OriginalText = window.Text;\n\n function Text(node) {\n CharacterData.call(this, node);\n }\n Text.prototype = Object.create(CharacterData.prototype);\n mixin(Text.prototype, {\n splitText: function(offset) {\n offset = toUInt32(offset);\n var s = this.data;\n if (offset > s.length)\n throw new Error('IndexSizeError');\n var head = s.slice(0, offset);\n var tail = s.slice(offset);\n this.data = head;\n var newTextNode = this.ownerDocument.createTextNode(tail);\n if (this.parentNode)\n this.parentNode.insertBefore(newTextNode, this.nextSibling);\n return newTextNode;\n }\n });\n\n registerWrapper(OriginalText, Text, document.createTextNode(''));\n\n scope.wrappers.Text = Text;\n})(window.ShadowDOMPolyfill);\n","// Copyright 2014 The Polymer Authors. All rights reserved.\n// Use of this source code is goverened by a BSD-style\n// license that can be found in the LICENSE file.\n\n(function(scope) {\n 'use strict';\n\n function invalidateClass(el) {\n scope.invalidateRendererBasedOnAttribute(el, 'class');\n }\n\n function DOMTokenList(impl, ownerElement) {\n this.impl = impl;\n this.ownerElement_ = ownerElement;\n }\n\n DOMTokenList.prototype = {\n get length() {\n return this.impl.length;\n },\n item: function(index) {\n return this.impl.item(index);\n },\n contains: function(token) {\n return this.impl.contains(token);\n },\n add: function() {\n this.impl.add.apply(this.impl, arguments);\n invalidateClass(this.ownerElement_);\n },\n remove: function() {\n this.impl.remove.apply(this.impl, arguments);\n invalidateClass(this.ownerElement_);\n },\n toggle: function(token) {\n var rv = this.impl.toggle.apply(this.impl, arguments);\n invalidateClass(this.ownerElement_);\n return rv;\n },\n toString: function() {\n return this.impl.toString();\n }\n };\n\n scope.wrappers.DOMTokenList = DOMTokenList;\n})(window.ShadowDOMPolyfill);\n","// Copyright 2013 The Polymer Authors. All rights reserved.\n// Use of this source code is goverened by a BSD-style\n// license that can be found in the LICENSE file.\n\n(function(scope) {\n 'use strict';\n\n var ChildNodeInterface = scope.ChildNodeInterface;\n var GetElementsByInterface = scope.GetElementsByInterface;\n var Node = scope.wrappers.Node;\n var DOMTokenList = scope.wrappers.DOMTokenList;\n var ParentNodeInterface = scope.ParentNodeInterface;\n var SelectorsInterface = scope.SelectorsInterface;\n var addWrapNodeListMethod = scope.addWrapNodeListMethod;\n var enqueueMutation = scope.enqueueMutation;\n var mixin = scope.mixin;\n var oneOf = scope.oneOf;\n var registerWrapper = scope.registerWrapper;\n var unwrap = scope.unwrap;\n var wrappers = scope.wrappers;\n\n var OriginalElement = window.Element;\n\n var matchesNames = [\n 'matches', // needs to come first.\n 'mozMatchesSelector',\n 'msMatchesSelector',\n 'webkitMatchesSelector',\n ].filter(function(name) {\n return OriginalElement.prototype[name];\n });\n\n var matchesName = matchesNames[0];\n\n var originalMatches = OriginalElement.prototype[matchesName];\n\n function invalidateRendererBasedOnAttribute(element, name) {\n // Only invalidate if parent node is a shadow host.\n var p = element.parentNode;\n if (!p || !p.shadowRoot)\n return;\n\n var renderer = scope.getRendererForHost(p);\n if (renderer.dependsOnAttribute(name))\n renderer.invalidate();\n }\n\n function enqueAttributeChange(element, name, oldValue) {\n // This is not fully spec compliant. We should use localName (which might\n // have a different case than name) and the namespace (which requires us\n // to get the Attr object).\n enqueueMutation(element, 'attributes', {\n name: name,\n namespace: null,\n oldValue: oldValue\n });\n }\n\n var classListTable = new WeakMap();\n\n function Element(node) {\n Node.call(this, node);\n }\n Element.prototype = Object.create(Node.prototype);\n mixin(Element.prototype, {\n createShadowRoot: function() {\n var newShadowRoot = new wrappers.ShadowRoot(this);\n this.impl.polymerShadowRoot_ = newShadowRoot;\n\n var renderer = scope.getRendererForHost(this);\n renderer.invalidate();\n\n return newShadowRoot;\n },\n\n get shadowRoot() {\n return this.impl.polymerShadowRoot_ || null;\n },\n\n // getDestinationInsertionPoints added in ShadowRenderer.js\n\n setAttribute: function(name, value) {\n var oldValue = this.impl.getAttribute(name);\n this.impl.setAttribute(name, value);\n enqueAttributeChange(this, name, oldValue);\n invalidateRendererBasedOnAttribute(this, name);\n },\n\n removeAttribute: function(name) {\n var oldValue = this.impl.getAttribute(name);\n this.impl.removeAttribute(name);\n enqueAttributeChange(this, name, oldValue);\n invalidateRendererBasedOnAttribute(this, name);\n },\n\n matches: function(selector) {\n return originalMatches.call(this.impl, selector);\n },\n\n get classList() {\n var list = classListTable.get(this);\n if (!list) {\n classListTable.set(this,\n list = new DOMTokenList(unwrap(this).classList, this));\n }\n return list;\n },\n\n get className() {\n return unwrap(this).className;\n },\n\n set className(v) {\n this.setAttribute('class', v);\n },\n\n get id() {\n return unwrap(this).id;\n },\n\n set id(v) {\n this.setAttribute('id', v);\n }\n });\n\n matchesNames.forEach(function(name) {\n if (name !== 'matches') {\n Element.prototype[name] = function(selector) {\n return this.matches(selector);\n };\n }\n });\n\n if (OriginalElement.prototype.webkitCreateShadowRoot) {\n Element.prototype.webkitCreateShadowRoot =\n Element.prototype.createShadowRoot;\n }\n\n mixin(Element.prototype, ChildNodeInterface);\n mixin(Element.prototype, GetElementsByInterface);\n mixin(Element.prototype, ParentNodeInterface);\n mixin(Element.prototype, SelectorsInterface);\n\n registerWrapper(OriginalElement, Element,\n document.createElementNS(null, 'x'));\n\n scope.invalidateRendererBasedOnAttribute = invalidateRendererBasedOnAttribute;\n scope.matchesNames = matchesNames;\n scope.wrappers.Element = Element;\n})(window.ShadowDOMPolyfill);\n","// Copyright 2013 The Polymer Authors. All rights reserved.\n// Use of this source code is goverened by a BSD-style\n// license that can be found in the LICENSE file.\n\n(function(scope) {\n 'use strict';\n\n var Element = scope.wrappers.Element;\n var defineGetter = scope.defineGetter;\n var enqueueMutation = scope.enqueueMutation;\n var mixin = scope.mixin;\n var nodesWereAdded = scope.nodesWereAdded;\n var nodesWereRemoved = scope.nodesWereRemoved;\n var registerWrapper = scope.registerWrapper;\n var snapshotNodeList = scope.snapshotNodeList;\n var unwrap = scope.unwrap;\n var wrap = scope.wrap;\n var wrappers = scope.wrappers;\n\n /////////////////////////////////////////////////////////////////////////////\n // innerHTML and outerHTML\n\n // http://www.whatwg.org/specs/web-apps/current-work/multipage/the-end.html#escapingString\n var escapeAttrRegExp = /[&\\u00A0\"]/g;\n var escapeDataRegExp = /[&\\u00A0<>]/g;\n\n function escapeReplace(c) {\n switch (c) {\n case '&':\n return '&';\n case '<':\n return '<';\n case '>':\n return '>';\n case '\"':\n return '"'\n case '\\u00A0':\n return ' ';\n }\n }\n\n function escapeAttr(s) {\n return s.replace(escapeAttrRegExp, escapeReplace);\n }\n\n function escapeData(s) {\n return s.replace(escapeDataRegExp, escapeReplace);\n }\n\n function makeSet(arr) {\n var set = {};\n for (var i = 0; i < arr.length; i++) {\n set[arr[i]] = true;\n }\n return set;\n }\n\n // http://www.whatwg.org/specs/web-apps/current-work/#void-elements\n var voidElements = makeSet([\n 'area',\n 'base',\n 'br',\n 'col',\n 'command',\n 'embed',\n 'hr',\n 'img',\n 'input',\n 'keygen',\n 'link',\n 'meta',\n 'param',\n 'source',\n 'track',\n 'wbr'\n ]);\n\n var plaintextParents = makeSet([\n 'style',\n 'script',\n 'xmp',\n 'iframe',\n 'noembed',\n 'noframes',\n 'plaintext',\n 'noscript'\n ]);\n\n function getOuterHTML(node, parentNode) {\n switch (node.nodeType) {\n case Node.ELEMENT_NODE:\n var tagName = node.tagName.toLowerCase();\n var s = '<' + tagName;\n var attrs = node.attributes;\n for (var i = 0, attr; attr = attrs[i]; i++) {\n s += ' ' + attr.name + '=\"' + escapeAttr(attr.value) + '\"';\n }\n s += '>';\n if (voidElements[tagName])\n return s;\n\n return s + getInnerHTML(node) + '</' + tagName + '>';\n\n case Node.TEXT_NODE:\n var data = node.data;\n if (parentNode && plaintextParents[parentNode.localName])\n return data;\n return escapeData(data);\n\n case Node.COMMENT_NODE:\n return '<!--' + node.data + '-->';\n\n default:\n console.error(node);\n throw new Error('not implemented');\n }\n }\n\n function getInnerHTML(node) {\n if (node instanceof wrappers.HTMLTemplateElement)\n node = node.content;\n\n var s = '';\n for (var child = node.firstChild; child; child = child.nextSibling) {\n s += getOuterHTML(child, node);\n }\n return s;\n }\n\n function setInnerHTML(node, value, opt_tagName) {\n var tagName = opt_tagName || 'div';\n node.textContent = '';\n var tempElement = unwrap(node.ownerDocument.createElement(tagName));\n tempElement.innerHTML = value;\n var firstChild;\n while (firstChild = tempElement.firstChild) {\n node.appendChild(wrap(firstChild));\n }\n }\n\n // IE11 does not have MSIE in the user agent string.\n var oldIe = /MSIE/.test(navigator.userAgent);\n\n var OriginalHTMLElement = window.HTMLElement;\n var OriginalHTMLTemplateElement = window.HTMLTemplateElement;\n\n function HTMLElement(node) {\n Element.call(this, node);\n }\n HTMLElement.prototype = Object.create(Element.prototype);\n mixin(HTMLElement.prototype, {\n get innerHTML() {\n return getInnerHTML(this);\n },\n set innerHTML(value) {\n // IE9 does not handle set innerHTML correctly on plaintextParents. It\n // creates element children. For example\n //\n // scriptElement.innerHTML = '<a>test</a>'\n //\n // Creates a single HTMLAnchorElement child.\n if (oldIe && plaintextParents[this.localName]) {\n this.textContent = value;\n return;\n }\n\n var removedNodes = snapshotNodeList(this.childNodes);\n\n if (this.invalidateShadowRenderer()) {\n if (this instanceof wrappers.HTMLTemplateElement)\n setInnerHTML(this.content, value);\n else\n setInnerHTML(this, value, this.tagName);\n\n // If we have a non native template element we need to handle this\n // manually since setting impl.innerHTML would add the html as direct\n // children and not be moved over to the content fragment.\n } else if (!OriginalHTMLTemplateElement &&\n this instanceof wrappers.HTMLTemplateElement) {\n setInnerHTML(this.content, value);\n } else {\n this.impl.innerHTML = value;\n }\n\n var addedNodes = snapshotNodeList(this.childNodes);\n\n enqueueMutation(this, 'childList', {\n addedNodes: addedNodes,\n removedNodes: removedNodes\n });\n\n nodesWereRemoved(removedNodes);\n nodesWereAdded(addedNodes, this);\n },\n\n get outerHTML() {\n return getOuterHTML(this, this.parentNode);\n },\n set outerHTML(value) {\n var p = this.parentNode;\n if (p) {\n p.invalidateShadowRenderer();\n var df = frag(p, value);\n p.replaceChild(df, this);\n }\n },\n\n insertAdjacentHTML: function(position, text) {\n var contextElement, refNode;\n switch (String(position).toLowerCase()) {\n case 'beforebegin':\n contextElement = this.parentNode;\n refNode = this;\n break;\n case 'afterend':\n contextElement = this.parentNode;\n refNode = this.nextSibling;\n break;\n case 'afterbegin':\n contextElement = this;\n refNode = this.firstChild;\n break;\n case 'beforeend':\n contextElement = this;\n refNode = null;\n break;\n default:\n return;\n }\n\n var df = frag(contextElement, text);\n contextElement.insertBefore(df, refNode);\n },\n\n get hidden() {\n return this.hasAttribute('hidden');\n },\n set hidden(v) {\n if (v) {\n this.setAttribute('hidden', '');\n } else {\n this.removeAttribute('hidden');\n }\n }\n });\n\n function frag(contextElement, html) {\n // TODO(arv): This does not work with SVG and other non HTML elements.\n var p = unwrap(contextElement.cloneNode(false));\n p.innerHTML = html;\n var df = unwrap(document.createDocumentFragment());\n var c;\n while (c = p.firstChild) {\n df.appendChild(c);\n }\n return wrap(df);\n }\n\n function getter(name) {\n return function() {\n scope.renderAllPending();\n return this.impl[name];\n };\n }\n\n function getterRequiresRendering(name) {\n defineGetter(HTMLElement, name, getter(name));\n }\n\n [\n 'clientHeight',\n 'clientLeft',\n 'clientTop',\n 'clientWidth',\n 'offsetHeight',\n 'offsetLeft',\n 'offsetTop',\n 'offsetWidth',\n 'scrollHeight',\n 'scrollWidth',\n ].forEach(getterRequiresRendering);\n\n function getterAndSetterRequiresRendering(name) {\n Object.defineProperty(HTMLElement.prototype, name, {\n get: getter(name),\n set: function(v) {\n scope.renderAllPending();\n this.impl[name] = v;\n },\n configurable: true,\n enumerable: true\n });\n }\n\n [\n 'scrollLeft',\n 'scrollTop',\n ].forEach(getterAndSetterRequiresRendering);\n\n function methodRequiresRendering(name) {\n Object.defineProperty(HTMLElement.prototype, name, {\n value: function() {\n scope.renderAllPending();\n return this.impl[name].apply(this.impl, arguments);\n },\n configurable: true,\n enumerable: true\n });\n }\n\n [\n 'getBoundingClientRect',\n 'getClientRects',\n 'scrollIntoView'\n ].forEach(methodRequiresRendering);\n\n // HTMLElement is abstract so we use a subclass that has no members.\n registerWrapper(OriginalHTMLElement, HTMLElement,\n document.createElement('b'));\n\n scope.wrappers.HTMLElement = HTMLElement;\n\n // TODO: Find a better way to share these two with WrapperShadowRoot.\n scope.getInnerHTML = getInnerHTML;\n scope.setInnerHTML = setInnerHTML\n})(window.ShadowDOMPolyfill);\n","// Copyright 2013 The Polymer Authors. All rights reserved.\n// Use of this source code is goverened by a BSD-style\n// license that can be found in the LICENSE file.\n\n(function(scope) {\n 'use strict';\n\n var HTMLElement = scope.wrappers.HTMLElement;\n var mixin = scope.mixin;\n var registerWrapper = scope.registerWrapper;\n var wrap = scope.wrap;\n\n var OriginalHTMLCanvasElement = window.HTMLCanvasElement;\n\n function HTMLCanvasElement(node) {\n HTMLElement.call(this, node);\n }\n HTMLCanvasElement.prototype = Object.create(HTMLElement.prototype);\n\n mixin(HTMLCanvasElement.prototype, {\n getContext: function() {\n var context = this.impl.getContext.apply(this.impl, arguments);\n return context && wrap(context);\n }\n });\n\n registerWrapper(OriginalHTMLCanvasElement, HTMLCanvasElement,\n document.createElement('canvas'));\n\n scope.wrappers.HTMLCanvasElement = HTMLCanvasElement;\n})(window.ShadowDOMPolyfill);\n","// Copyright 2013 The Polymer Authors. All rights reserved.\n// Use of this source code is goverened by a BSD-style\n// license that can be found in the LICENSE file.\n\n(function(scope) {\n 'use strict';\n\n var HTMLElement = scope.wrappers.HTMLElement;\n var mixin = scope.mixin;\n var registerWrapper = scope.registerWrapper;\n\n var OriginalHTMLContentElement = window.HTMLContentElement;\n\n function HTMLContentElement(node) {\n HTMLElement.call(this, node);\n }\n HTMLContentElement.prototype = Object.create(HTMLElement.prototype);\n mixin(HTMLContentElement.prototype, {\n get select() {\n return this.getAttribute('select');\n },\n set select(value) {\n this.setAttribute('select', value);\n },\n\n setAttribute: function(n, v) {\n HTMLElement.prototype.setAttribute.call(this, n, v);\n if (String(n).toLowerCase() === 'select')\n this.invalidateShadowRenderer(true);\n }\n\n // getDistributedNodes is added in ShadowRenderer\n });\n\n if (OriginalHTMLContentElement)\n registerWrapper(OriginalHTMLContentElement, HTMLContentElement);\n\n scope.wrappers.HTMLContentElement = HTMLContentElement;\n})(window.ShadowDOMPolyfill);\n","/*\n * Copyright 2014 The Polymer Authors. All rights reserved.\n * Use of this source code is governed by a BSD-style\n * license that can be found in the LICENSE file.\n */\n\n(function(scope) {\n 'use strict';\n\n var HTMLElement = scope.wrappers.HTMLElement;\n var mixin = scope.mixin;\n var registerWrapper = scope.registerWrapper;\n var wrapHTMLCollection = scope.wrapHTMLCollection;\n var unwrap = scope.unwrap;\n\n var OriginalHTMLFormElement = window.HTMLFormElement;\n\n function HTMLFormElement(node) {\n HTMLElement.call(this, node);\n }\n HTMLFormElement.prototype = Object.create(HTMLElement.prototype);\n mixin(HTMLFormElement.prototype, {\n get elements() {\n // Note: technically this should be an HTMLFormControlsCollection, but\n // that inherits from HTMLCollection, so should be good enough. Spec:\n // http://www.whatwg.org/specs/web-apps/current-work/multipage/common-dom-interfaces.html#htmlformcontrolscollection\n return wrapHTMLCollection(unwrap(this).elements);\n }\n });\n\n registerWrapper(OriginalHTMLFormElement, HTMLFormElement,\n document.createElement('form'));\n\n scope.wrappers.HTMLFormElement = HTMLFormElement;\n})(window.ShadowDOMPolyfill);\n","// Copyright 2013 The Polymer Authors. All rights reserved.\n// Use of this source code is goverened by a BSD-style\n// license that can be found in the LICENSE file.\n\n(function(scope) {\n 'use strict';\n\n var HTMLElement = scope.wrappers.HTMLElement;\n var registerWrapper = scope.registerWrapper;\n var unwrap = scope.unwrap;\n var rewrap = scope.rewrap;\n\n var OriginalHTMLImageElement = window.HTMLImageElement;\n\n function HTMLImageElement(node) {\n HTMLElement.call(this, node);\n }\n HTMLImageElement.prototype = Object.create(HTMLElement.prototype);\n\n registerWrapper(OriginalHTMLImageElement, HTMLImageElement,\n document.createElement('img'));\n\n function Image(width, height) {\n if (!(this instanceof Image)) {\n throw new TypeError(\n 'DOM object constructor cannot be called as a function.');\n }\n\n var node = unwrap(document.createElement('img'));\n HTMLElement.call(this, node);\n rewrap(node, this);\n\n if (width !== undefined)\n node.width = width;\n if (height !== undefined)\n node.height = height;\n }\n\n Image.prototype = HTMLImageElement.prototype;\n\n scope.wrappers.HTMLImageElement = HTMLImageElement;\n scope.wrappers.Image = Image;\n})(window.ShadowDOMPolyfill);\n","// Copyright 2013 The Polymer Authors. All rights reserved.\n// Use of this source code is goverened by a BSD-style\n// license that can be found in the LICENSE file.\n\n(function(scope) {\n 'use strict';\n\n var HTMLElement = scope.wrappers.HTMLElement;\n var mixin = scope.mixin;\n var NodeList = scope.wrappers.NodeList;\n var registerWrapper = scope.registerWrapper;\n\n var OriginalHTMLShadowElement = window.HTMLShadowElement;\n\n function HTMLShadowElement(node) {\n HTMLElement.call(this, node);\n }\n HTMLShadowElement.prototype = Object.create(HTMLElement.prototype);\n\n // getDistributedNodes is added in ShadowRenderer\n\n if (OriginalHTMLShadowElement)\n registerWrapper(OriginalHTMLShadowElement, HTMLShadowElement);\n\n scope.wrappers.HTMLShadowElement = HTMLShadowElement;\n})(window.ShadowDOMPolyfill);\n","// Copyright 2013 The Polymer Authors. All rights reserved.\n// Use of this source code is goverened by a BSD-style\n// license that can be found in the LICENSE file.\n\n(function(scope) {\n 'use strict';\n\n var HTMLElement = scope.wrappers.HTMLElement;\n var mixin = scope.mixin;\n var registerWrapper = scope.registerWrapper;\n var unwrap = scope.unwrap;\n var wrap = scope.wrap;\n\n var contentTable = new WeakMap();\n var templateContentsOwnerTable = new WeakMap();\n\n // http://dvcs.w3.org/hg/webcomponents/raw-file/tip/spec/templates/index.html#dfn-template-contents-owner\n function getTemplateContentsOwner(doc) {\n if (!doc.defaultView)\n return doc;\n var d = templateContentsOwnerTable.get(doc);\n if (!d) {\n // TODO(arv): This should either be a Document or HTMLDocument depending\n // on doc.\n d = doc.implementation.createHTMLDocument('');\n while (d.lastChild) {\n d.removeChild(d.lastChild);\n }\n templateContentsOwnerTable.set(doc, d);\n }\n return d;\n }\n\n function extractContent(templateElement) {\n // templateElement is not a wrapper here.\n var doc = getTemplateContentsOwner(templateElement.ownerDocument);\n var df = unwrap(doc.createDocumentFragment());\n var child;\n while (child = templateElement.firstChild) {\n df.appendChild(child);\n }\n return df;\n }\n\n var OriginalHTMLTemplateElement = window.HTMLTemplateElement;\n\n function HTMLTemplateElement(node) {\n HTMLElement.call(this, node);\n if (!OriginalHTMLTemplateElement) {\n var content = extractContent(node);\n contentTable.set(this, wrap(content));\n }\n }\n HTMLTemplateElement.prototype = Object.create(HTMLElement.prototype);\n\n mixin(HTMLTemplateElement.prototype, {\n get content() {\n if (OriginalHTMLTemplateElement)\n return wrap(this.impl.content);\n return contentTable.get(this);\n },\n\n // TODO(arv): cloneNode needs to clone content.\n\n });\n\n if (OriginalHTMLTemplateElement)\n registerWrapper(OriginalHTMLTemplateElement, HTMLTemplateElement);\n\n scope.wrappers.HTMLTemplateElement = HTMLTemplateElement;\n})(window.ShadowDOMPolyfill);\n","// Copyright 2013 The Polymer Authors. All rights reserved.\n// Use of this source code is goverened by a BSD-style\n// license that can be found in the LICENSE file.\n\n(function(scope) {\n 'use strict';\n\n var HTMLElement = scope.wrappers.HTMLElement;\n var registerWrapper = scope.registerWrapper;\n\n var OriginalHTMLMediaElement = window.HTMLMediaElement;\n\n function HTMLMediaElement(node) {\n HTMLElement.call(this, node);\n }\n HTMLMediaElement.prototype = Object.create(HTMLElement.prototype);\n\n registerWrapper(OriginalHTMLMediaElement, HTMLMediaElement,\n document.createElement('audio'));\n\n scope.wrappers.HTMLMediaElement = HTMLMediaElement;\n})(window.ShadowDOMPolyfill);\n","// Copyright 2013 The Polymer Authors. All rights reserved.\n// Use of this source code is goverened by a BSD-style\n// license that can be found in the LICENSE file.\n\n(function(scope) {\n 'use strict';\n\n var HTMLMediaElement = scope.wrappers.HTMLMediaElement;\n var registerWrapper = scope.registerWrapper;\n var unwrap = scope.unwrap;\n var rewrap = scope.rewrap;\n\n var OriginalHTMLAudioElement = window.HTMLAudioElement;\n\n function HTMLAudioElement(node) {\n HTMLMediaElement.call(this, node);\n }\n HTMLAudioElement.prototype = Object.create(HTMLMediaElement.prototype);\n\n registerWrapper(OriginalHTMLAudioElement, HTMLAudioElement,\n document.createElement('audio'));\n\n function Audio(src) {\n if (!(this instanceof Audio)) {\n throw new TypeError(\n 'DOM object constructor cannot be called as a function.');\n }\n\n var node = unwrap(document.createElement('audio'));\n HTMLMediaElement.call(this, node);\n rewrap(node, this);\n\n node.setAttribute('preload', 'auto');\n if (src !== undefined)\n node.setAttribute('src', src);\n }\n\n Audio.prototype = HTMLAudioElement.prototype;\n\n scope.wrappers.HTMLAudioElement = HTMLAudioElement;\n scope.wrappers.Audio = Audio;\n})(window.ShadowDOMPolyfill);\n","// Copyright 2013 The Polymer Authors. All rights reserved.\n// Use of this source code is goverened by a BSD-style\n// license that can be found in the LICENSE file.\n\n(function(scope) {\n 'use strict';\n\n var HTMLElement = scope.wrappers.HTMLElement;\n var mixin = scope.mixin;\n var registerWrapper = scope.registerWrapper;\n var rewrap = scope.rewrap;\n var unwrap = scope.unwrap;\n var wrap = scope.wrap;\n\n var OriginalHTMLOptionElement = window.HTMLOptionElement;\n\n function trimText(s) {\n return s.replace(/\\s+/g, ' ').trim();\n }\n\n function HTMLOptionElement(node) {\n HTMLElement.call(this, node);\n }\n HTMLOptionElement.prototype = Object.create(HTMLElement.prototype);\n mixin(HTMLOptionElement.prototype, {\n get text() {\n return trimText(this.textContent);\n },\n set text(value) {\n this.textContent = trimText(String(value));\n },\n get form() {\n return wrap(unwrap(this).form);\n }\n });\n\n registerWrapper(OriginalHTMLOptionElement, HTMLOptionElement,\n document.createElement('option'));\n\n function Option(text, value, defaultSelected, selected) {\n if (!(this instanceof Option)) {\n throw new TypeError(\n 'DOM object constructor cannot be called as a function.');\n }\n\n var node = unwrap(document.createElement('option'));\n HTMLElement.call(this, node);\n rewrap(node, this);\n\n if (text !== undefined)\n node.text = text;\n if (value !== undefined)\n node.setAttribute('value', value);\n if (defaultSelected === true)\n node.setAttribute('selected', '');\n node.selected = selected === true;\n }\n\n Option.prototype = HTMLOptionElement.prototype;\n\n scope.wrappers.HTMLOptionElement = HTMLOptionElement;\n scope.wrappers.Option = Option;\n})(window.ShadowDOMPolyfill);\n","// Copyright 2014 The Polymer Authors. All rights reserved.\n// Use of this source code is goverened by a BSD-style\n// license that can be found in the LICENSE file.\n\n(function(scope) {\n 'use strict';\n\n var HTMLElement = scope.wrappers.HTMLElement;\n var mixin = scope.mixin;\n var registerWrapper = scope.registerWrapper;\n var unwrap = scope.unwrap;\n var wrap = scope.wrap;\n\n var OriginalHTMLSelectElement = window.HTMLSelectElement;\n\n function HTMLSelectElement(node) {\n HTMLElement.call(this, node);\n }\n HTMLSelectElement.prototype = Object.create(HTMLElement.prototype);\n mixin(HTMLSelectElement.prototype, {\n add: function(element, before) {\n if (typeof before === 'object') // also includes null\n before = unwrap(before);\n unwrap(this).add(unwrap(element), before);\n },\n\n remove: function(indexOrNode) {\n // Spec only allows index but implementations allow index or node.\n // remove() is also allowed which is same as remove(undefined)\n if (indexOrNode === undefined) {\n HTMLElement.prototype.remove.call(this);\n return;\n }\n\n if (typeof indexOrNode === 'object')\n indexOrNode = unwrap(indexOrNode);\n\n unwrap(this).remove(indexOrNode);\n },\n\n get form() {\n return wrap(unwrap(this).form);\n }\n });\n\n registerWrapper(OriginalHTMLSelectElement, HTMLSelectElement,\n document.createElement('select'));\n\n scope.wrappers.HTMLSelectElement = HTMLSelectElement;\n})(window.ShadowDOMPolyfill);\n","/*\n * Copyright 2014 The Polymer Authors. All rights reserved.\n * Use of this source code is goverened by a BSD-style\n * license that can be found in the LICENSE file.\n */\n\n(function(scope) {\n 'use strict';\n\n var HTMLElement = scope.wrappers.HTMLElement;\n var mixin = scope.mixin;\n var registerWrapper = scope.registerWrapper;\n var unwrap = scope.unwrap;\n var wrap = scope.wrap;\n var wrapHTMLCollection = scope.wrapHTMLCollection;\n\n var OriginalHTMLTableElement = window.HTMLTableElement;\n\n function HTMLTableElement(node) {\n HTMLElement.call(this, node);\n }\n HTMLTableElement.prototype = Object.create(HTMLElement.prototype);\n mixin(HTMLTableElement.prototype, {\n get caption() {\n return wrap(unwrap(this).caption);\n },\n createCaption: function() {\n return wrap(unwrap(this).createCaption());\n },\n\n get tHead() {\n return wrap(unwrap(this).tHead);\n },\n createTHead: function() {\n return wrap(unwrap(this).createTHead());\n },\n\n createTFoot: function() {\n return wrap(unwrap(this).createTFoot());\n },\n get tFoot() {\n return wrap(unwrap(this).tFoot);\n },\n\n get tBodies() {\n return wrapHTMLCollection(unwrap(this).tBodies);\n },\n createTBody: function() {\n return wrap(unwrap(this).createTBody());\n },\n\n get rows() {\n return wrapHTMLCollection(unwrap(this).rows);\n },\n insertRow: function(index) {\n return wrap(unwrap(this).insertRow(index));\n }\n });\n\n registerWrapper(OriginalHTMLTableElement, HTMLTableElement,\n document.createElement('table'));\n\n scope.wrappers.HTMLTableElement = HTMLTableElement;\n})(window.ShadowDOMPolyfill);\n","/*\n * Copyright 2014 The Polymer Authors. All rights reserved.\n * Use of this source code is goverened by a BSD-style\n * license that can be found in the LICENSE file.\n */\n\n(function(scope) {\n 'use strict';\n\n var HTMLElement = scope.wrappers.HTMLElement;\n var mixin = scope.mixin;\n var registerWrapper = scope.registerWrapper;\n var wrapHTMLCollection = scope.wrapHTMLCollection;\n var unwrap = scope.unwrap;\n var wrap = scope.wrap;\n\n var OriginalHTMLTableSectionElement = window.HTMLTableSectionElement;\n\n function HTMLTableSectionElement(node) {\n HTMLElement.call(this, node);\n }\n HTMLTableSectionElement.prototype = Object.create(HTMLElement.prototype);\n mixin(HTMLTableSectionElement.prototype, {\n get rows() {\n return wrapHTMLCollection(unwrap(this).rows);\n },\n insertRow: function(index) {\n return wrap(unwrap(this).insertRow(index));\n }\n });\n\n registerWrapper(OriginalHTMLTableSectionElement, HTMLTableSectionElement,\n document.createElement('thead'));\n\n scope.wrappers.HTMLTableSectionElement = HTMLTableSectionElement;\n})(window.ShadowDOMPolyfill);\n","/*\n * Copyright 2014 The Polymer Authors. All rights reserved.\n * Use of this source code is goverened by a BSD-style\n * license that can be found in the LICENSE file.\n */\n\n(function(scope) {\n 'use strict';\n\n var HTMLElement = scope.wrappers.HTMLElement;\n var mixin = scope.mixin;\n var registerWrapper = scope.registerWrapper;\n var wrapHTMLCollection = scope.wrapHTMLCollection;\n var unwrap = scope.unwrap;\n var wrap = scope.wrap;\n\n var OriginalHTMLTableRowElement = window.HTMLTableRowElement;\n\n function HTMLTableRowElement(node) {\n HTMLElement.call(this, node);\n }\n HTMLTableRowElement.prototype = Object.create(HTMLElement.prototype);\n mixin(HTMLTableRowElement.prototype, {\n get cells() {\n return wrapHTMLCollection(unwrap(this).cells);\n },\n\n insertCell: function(index) {\n return wrap(unwrap(this).insertCell(index));\n }\n });\n\n registerWrapper(OriginalHTMLTableRowElement, HTMLTableRowElement,\n document.createElement('tr'));\n\n scope.wrappers.HTMLTableRowElement = HTMLTableRowElement;\n})(window.ShadowDOMPolyfill);\n","// Copyright 2013 The Polymer Authors. All rights reserved.\n// Use of this source code is goverened by a BSD-style\n// license that can be found in the LICENSE file.\n\n(function(scope) {\n 'use strict';\n\n var HTMLContentElement = scope.wrappers.HTMLContentElement;\n var HTMLElement = scope.wrappers.HTMLElement;\n var HTMLShadowElement = scope.wrappers.HTMLShadowElement;\n var HTMLTemplateElement = scope.wrappers.HTMLTemplateElement;\n var mixin = scope.mixin;\n var registerWrapper = scope.registerWrapper;\n\n var OriginalHTMLUnknownElement = window.HTMLUnknownElement;\n\n function HTMLUnknownElement(node) {\n switch (node.localName) {\n case 'content':\n return new HTMLContentElement(node);\n case 'shadow':\n return new HTMLShadowElement(node);\n case 'template':\n return new HTMLTemplateElement(node);\n }\n HTMLElement.call(this, node);\n }\n HTMLUnknownElement.prototype = Object.create(HTMLElement.prototype);\n registerWrapper(OriginalHTMLUnknownElement, HTMLUnknownElement);\n scope.wrappers.HTMLUnknownElement = HTMLUnknownElement;\n})(window.ShadowDOMPolyfill);\n","// Copyright 2014 The Polymer Authors. All rights reserved.\n// Use of this source code is goverened by a BSD-style\n// license that can be found in the LICENSE file.\n\n(function(scope) {\n 'use strict';\n\n var Element = scope.wrappers.Element;\n var HTMLElement = scope.wrappers.HTMLElement;\n var registerObject = scope.registerObject;\n\n var SVG_NS = 'http://www.w3.org/2000/svg';\n var svgTitleElement = document.createElementNS(SVG_NS, 'title');\n var SVGTitleElement = registerObject(svgTitleElement);\n var SVGElement = Object.getPrototypeOf(SVGTitleElement.prototype).constructor;\n\n // IE11 does not have classList for SVG elements. The spec says that classList\n // is an accessor on Element, but IE11 puts classList on HTMLElement, leaving\n // SVGElement without a classList property. We therefore move the accessor for\n // IE11.\n if (!('classList' in svgTitleElement)) {\n var descr = Object.getOwnPropertyDescriptor(Element.prototype, 'classList');\n Object.defineProperty(HTMLElement.prototype, 'classList', descr);\n delete Element.prototype.classList;\n }\n\n scope.wrappers.SVGElement = SVGElement;\n})(window.ShadowDOMPolyfill);\n","// Copyright 2014 The Polymer Authors. All rights reserved.\n// Use of this source code is goverened by a BSD-style\n// license that can be found in the LICENSE file.\n\n(function(scope) {\n 'use strict';\n\n var mixin = scope.mixin;\n var registerWrapper = scope.registerWrapper;\n var unwrap = scope.unwrap;\n var wrap = scope.wrap;\n\n var OriginalSVGUseElement = window.SVGUseElement;\n\n // IE uses SVGElement as parent interface, SVG2 (Blink & Gecko) uses\n // SVGGraphicsElement. Use the <g> element to get the right prototype.\n\n var SVG_NS = 'http://www.w3.org/2000/svg';\n var gWrapper = wrap(document.createElementNS(SVG_NS, 'g'));\n var useElement = document.createElementNS(SVG_NS, 'use');\n var SVGGElement = gWrapper.constructor;\n var parentInterfacePrototype = Object.getPrototypeOf(SVGGElement.prototype);\n var parentInterface = parentInterfacePrototype.constructor;\n\n function SVGUseElement(impl) {\n parentInterface.call(this, impl);\n }\n\n SVGUseElement.prototype = Object.create(parentInterfacePrototype);\n\n // Firefox does not expose instanceRoot.\n if ('instanceRoot' in useElement) {\n mixin(SVGUseElement.prototype, {\n get instanceRoot() {\n return wrap(unwrap(this).instanceRoot);\n },\n get animatedInstanceRoot() {\n return wrap(unwrap(this).animatedInstanceRoot);\n },\n });\n }\n\n registerWrapper(OriginalSVGUseElement, SVGUseElement, useElement);\n\n scope.wrappers.SVGUseElement = SVGUseElement;\n})(window.ShadowDOMPolyfill);\n","// Copyright 2014 The Polymer Authors. All rights reserved.\n// Use of this source code is goverened by a BSD-style\n// license that can be found in the LICENSE file.\n\n(function(scope) {\n 'use strict';\n\n var EventTarget = scope.wrappers.EventTarget;\n var mixin = scope.mixin;\n var registerWrapper = scope.registerWrapper;\n var wrap = scope.wrap;\n\n var OriginalSVGElementInstance = window.SVGElementInstance;\n if (!OriginalSVGElementInstance)\n return;\n\n function SVGElementInstance(impl) {\n EventTarget.call(this, impl);\n }\n\n SVGElementInstance.prototype = Object.create(EventTarget.prototype);\n mixin(SVGElementInstance.prototype, {\n /** @type {SVGElement} */\n get correspondingElement() {\n return wrap(this.impl.correspondingElement);\n },\n\n /** @type {SVGUseElement} */\n get correspondingUseElement() {\n return wrap(this.impl.correspondingUseElement);\n },\n\n /** @type {SVGElementInstance} */\n get parentNode() {\n return wrap(this.impl.parentNode);\n },\n\n /** @type {SVGElementInstanceList} */\n get childNodes() {\n throw new Error('Not implemented');\n },\n\n /** @type {SVGElementInstance} */\n get firstChild() {\n return wrap(this.impl.firstChild);\n },\n\n /** @type {SVGElementInstance} */\n get lastChild() {\n return wrap(this.impl.lastChild);\n },\n\n /** @type {SVGElementInstance} */\n get previousSibling() {\n return wrap(this.impl.previousSibling);\n },\n\n /** @type {SVGElementInstance} */\n get nextSibling() {\n return wrap(this.impl.nextSibling);\n }\n });\n\n registerWrapper(OriginalSVGElementInstance, SVGElementInstance);\n\n scope.wrappers.SVGElementInstance = SVGElementInstance;\n})(window.ShadowDOMPolyfill);\n","// Copyright 2013 The Polymer Authors. All rights reserved.\n// Use of this source code is goverened by a BSD-style\n// license that can be found in the LICENSE file.\n\n(function(scope) {\n 'use strict';\n\n var mixin = scope.mixin;\n var registerWrapper = scope.registerWrapper;\n var unwrap = scope.unwrap;\n var unwrapIfNeeded = scope.unwrapIfNeeded;\n var wrap = scope.wrap;\n\n var OriginalCanvasRenderingContext2D = window.CanvasRenderingContext2D;\n\n function CanvasRenderingContext2D(impl) {\n this.impl = impl;\n }\n\n mixin(CanvasRenderingContext2D.prototype, {\n get canvas() {\n return wrap(this.impl.canvas);\n },\n\n drawImage: function() {\n arguments[0] = unwrapIfNeeded(arguments[0]);\n this.impl.drawImage.apply(this.impl, arguments);\n },\n\n createPattern: function() {\n arguments[0] = unwrap(arguments[0]);\n return this.impl.createPattern.apply(this.impl, arguments);\n }\n });\n\n registerWrapper(OriginalCanvasRenderingContext2D, CanvasRenderingContext2D,\n document.createElement('canvas').getContext('2d'));\n\n scope.wrappers.CanvasRenderingContext2D = CanvasRenderingContext2D;\n})(window.ShadowDOMPolyfill);\n","// Copyright 2013 The Polymer Authors. All rights reserved.\n// Use of this source code is goverened by a BSD-style\n// license that can be found in the LICENSE file.\n\n(function(scope) {\n 'use strict';\n\n var mixin = scope.mixin;\n var registerWrapper = scope.registerWrapper;\n var unwrapIfNeeded = scope.unwrapIfNeeded;\n var wrap = scope.wrap;\n\n var OriginalWebGLRenderingContext = window.WebGLRenderingContext;\n\n // IE10 does not have WebGL.\n if (!OriginalWebGLRenderingContext)\n return;\n\n function WebGLRenderingContext(impl) {\n this.impl = impl;\n }\n\n mixin(WebGLRenderingContext.prototype, {\n get canvas() {\n return wrap(this.impl.canvas);\n },\n\n texImage2D: function() {\n arguments[5] = unwrapIfNeeded(arguments[5]);\n this.impl.texImage2D.apply(this.impl, arguments);\n },\n\n texSubImage2D: function() {\n arguments[6] = unwrapIfNeeded(arguments[6]);\n this.impl.texSubImage2D.apply(this.impl, arguments);\n }\n });\n\n // Blink/WebKit has broken DOM bindings. Usually we would create an instance\n // of the object and pass it into registerWrapper as a \"blueprint\" but\n // creating WebGL contexts is expensive and might fail so we use a dummy\n // object with dummy instance properties for these broken browsers.\n var instanceProperties = /WebKit/.test(navigator.userAgent) ?\n {drawingBufferHeight: null, drawingBufferWidth: null} : {};\n\n registerWrapper(OriginalWebGLRenderingContext, WebGLRenderingContext,\n instanceProperties);\n\n scope.wrappers.WebGLRenderingContext = WebGLRenderingContext;\n})(window.ShadowDOMPolyfill);\n","// Copyright 2013 The Polymer Authors. All rights reserved.\n// Use of this source code is goverened by a BSD-style\n// license that can be found in the LICENSE file.\n\n(function(scope) {\n 'use strict';\n\n var registerWrapper = scope.registerWrapper;\n var unwrap = scope.unwrap;\n var unwrapIfNeeded = scope.unwrapIfNeeded;\n var wrap = scope.wrap;\n\n var OriginalRange = window.Range;\n\n function Range(impl) {\n this.impl = impl;\n }\n Range.prototype = {\n get startContainer() {\n return wrap(this.impl.startContainer);\n },\n get endContainer() {\n return wrap(this.impl.endContainer);\n },\n get commonAncestorContainer() {\n return wrap(this.impl.commonAncestorContainer);\n },\n setStart: function(refNode,offset) {\n this.impl.setStart(unwrapIfNeeded(refNode), offset);\n },\n setEnd: function(refNode,offset) {\n this.impl.setEnd(unwrapIfNeeded(refNode), offset);\n },\n setStartBefore: function(refNode) {\n this.impl.setStartBefore(unwrapIfNeeded(refNode));\n },\n setStartAfter: function(refNode) {\n this.impl.setStartAfter(unwrapIfNeeded(refNode));\n },\n setEndBefore: function(refNode) {\n this.impl.setEndBefore(unwrapIfNeeded(refNode));\n },\n setEndAfter: function(refNode) {\n this.impl.setEndAfter(unwrapIfNeeded(refNode));\n },\n selectNode: function(refNode) {\n this.impl.selectNode(unwrapIfNeeded(refNode));\n },\n selectNodeContents: function(refNode) {\n this.impl.selectNodeContents(unwrapIfNeeded(refNode));\n },\n compareBoundaryPoints: function(how, sourceRange) {\n return this.impl.compareBoundaryPoints(how, unwrap(sourceRange));\n },\n extractContents: function() {\n return wrap(this.impl.extractContents());\n },\n cloneContents: function() {\n return wrap(this.impl.cloneContents());\n },\n insertNode: function(node) {\n this.impl.insertNode(unwrapIfNeeded(node));\n },\n surroundContents: function(newParent) {\n this.impl.surroundContents(unwrapIfNeeded(newParent));\n },\n cloneRange: function() {\n return wrap(this.impl.cloneRange());\n },\n isPointInRange: function(node, offset) {\n return this.impl.isPointInRange(unwrapIfNeeded(node), offset);\n },\n comparePoint: function(node, offset) {\n return this.impl.comparePoint(unwrapIfNeeded(node), offset);\n },\n intersectsNode: function(node) {\n return this.impl.intersectsNode(unwrapIfNeeded(node));\n },\n toString: function() {\n return this.impl.toString();\n }\n };\n\n // IE9 does not have createContextualFragment.\n if (OriginalRange.prototype.createContextualFragment) {\n Range.prototype.createContextualFragment = function(html) {\n return wrap(this.impl.createContextualFragment(html));\n };\n }\n\n registerWrapper(window.Range, Range, document.createRange());\n\n scope.wrappers.Range = Range;\n\n})(window.ShadowDOMPolyfill);\n","// Copyright 2013 The Polymer Authors. All rights reserved.\n// Use of this source code is goverened by a BSD-style\n// license that can be found in the LICENSE file.\n\n(function(scope) {\n 'use strict';\n\n var GetElementsByInterface = scope.GetElementsByInterface;\n var ParentNodeInterface = scope.ParentNodeInterface;\n var SelectorsInterface = scope.SelectorsInterface;\n var mixin = scope.mixin;\n var registerObject = scope.registerObject;\n\n var DocumentFragment = registerObject(document.createDocumentFragment());\n mixin(DocumentFragment.prototype, ParentNodeInterface);\n mixin(DocumentFragment.prototype, SelectorsInterface);\n mixin(DocumentFragment.prototype, GetElementsByInterface);\n\n var Comment = registerObject(document.createComment(''));\n\n scope.wrappers.Comment = Comment;\n scope.wrappers.DocumentFragment = DocumentFragment;\n\n})(window.ShadowDOMPolyfill);\n","// Copyright 2013 The Polymer Authors. All rights reserved.\n// Use of this source code is goverened by a BSD-style\n// license that can be found in the LICENSE file.\n\n(function(scope) {\n 'use strict';\n\n var DocumentFragment = scope.wrappers.DocumentFragment;\n var TreeScope = scope.TreeScope;\n var elementFromPoint = scope.elementFromPoint;\n var getInnerHTML = scope.getInnerHTML;\n var getTreeScope = scope.getTreeScope;\n var mixin = scope.mixin;\n var rewrap = scope.rewrap;\n var setInnerHTML = scope.setInnerHTML;\n var unwrap = scope.unwrap;\n\n var shadowHostTable = new WeakMap();\n var nextOlderShadowTreeTable = new WeakMap();\n\n var spaceCharRe = /[ \\t\\n\\r\\f]/;\n\n function ShadowRoot(hostWrapper) {\n var node = unwrap(hostWrapper.impl.ownerDocument.createDocumentFragment());\n DocumentFragment.call(this, node);\n\n // createDocumentFragment associates the node with a wrapper\n // DocumentFragment instance. Override that.\n rewrap(node, this);\n\n var oldShadowRoot = hostWrapper.shadowRoot;\n nextOlderShadowTreeTable.set(this, oldShadowRoot);\n\n this.treeScope_ =\n new TreeScope(this, getTreeScope(oldShadowRoot || hostWrapper));\n\n shadowHostTable.set(this, hostWrapper);\n }\n ShadowRoot.prototype = Object.create(DocumentFragment.prototype);\n mixin(ShadowRoot.prototype, {\n get innerHTML() {\n return getInnerHTML(this);\n },\n set innerHTML(value) {\n setInnerHTML(this, value);\n this.invalidateShadowRenderer();\n },\n\n get olderShadowRoot() {\n return nextOlderShadowTreeTable.get(this) || null;\n },\n\n get host() {\n return shadowHostTable.get(this) || null;\n },\n\n invalidateShadowRenderer: function() {\n return shadowHostTable.get(this).invalidateShadowRenderer();\n },\n\n elementFromPoint: function(x, y) {\n return elementFromPoint(this, this.ownerDocument, x, y);\n },\n\n getElementById: function(id) {\n if (spaceCharRe.test(id))\n return null;\n return this.querySelector('[id=\"' + id + '\"]');\n }\n });\n\n scope.wrappers.ShadowRoot = ShadowRoot;\n\n})(window.ShadowDOMPolyfill);\n","// Copyright 2013 The Polymer Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\n(function(scope) {\n 'use strict';\n\n var Element = scope.wrappers.Element;\n var HTMLContentElement = scope.wrappers.HTMLContentElement;\n var HTMLShadowElement = scope.wrappers.HTMLShadowElement;\n var Node = scope.wrappers.Node;\n var ShadowRoot = scope.wrappers.ShadowRoot;\n var assert = scope.assert;\n var getTreeScope = scope.getTreeScope;\n var mixin = scope.mixin;\n var oneOf = scope.oneOf;\n var unwrap = scope.unwrap;\n var wrap = scope.wrap;\n\n /**\n * Updates the fields of a wrapper to a snapshot of the logical DOM as needed.\n * Up means parentNode\n * Sideways means previous and next sibling.\n * @param {!Node} wrapper\n */\n function updateWrapperUpAndSideways(wrapper) {\n wrapper.previousSibling_ = wrapper.previousSibling;\n wrapper.nextSibling_ = wrapper.nextSibling;\n wrapper.parentNode_ = wrapper.parentNode;\n }\n\n /**\n * Updates the fields of a wrapper to a snapshot of the logical DOM as needed.\n * Down means first and last child\n * @param {!Node} wrapper\n */\n function updateWrapperDown(wrapper) {\n wrapper.firstChild_ = wrapper.firstChild;\n wrapper.lastChild_ = wrapper.lastChild;\n }\n\n function updateAllChildNodes(parentNodeWrapper) {\n assert(parentNodeWrapper instanceof Node);\n for (var childWrapper = parentNodeWrapper.firstChild;\n childWrapper;\n childWrapper = childWrapper.nextSibling) {\n updateWrapperUpAndSideways(childWrapper);\n }\n updateWrapperDown(parentNodeWrapper);\n }\n\n function insertBefore(parentNodeWrapper, newChildWrapper, refChildWrapper) {\n var parentNode = unwrap(parentNodeWrapper);\n var newChild = unwrap(newChildWrapper);\n var refChild = refChildWrapper ? unwrap(refChildWrapper) : null;\n\n remove(newChildWrapper);\n updateWrapperUpAndSideways(newChildWrapper);\n\n if (!refChildWrapper) {\n parentNodeWrapper.lastChild_ = parentNodeWrapper.lastChild;\n if (parentNodeWrapper.lastChild === parentNodeWrapper.firstChild)\n parentNodeWrapper.firstChild_ = parentNodeWrapper.firstChild;\n\n var lastChildWrapper = wrap(parentNode.lastChild);\n if (lastChildWrapper)\n lastChildWrapper.nextSibling_ = lastChildWrapper.nextSibling;\n } else {\n if (parentNodeWrapper.firstChild === refChildWrapper)\n parentNodeWrapper.firstChild_ = refChildWrapper;\n\n refChildWrapper.previousSibling_ = refChildWrapper.previousSibling;\n }\n\n parentNode.insertBefore(newChild, refChild);\n }\n\n function remove(nodeWrapper) {\n var node = unwrap(nodeWrapper)\n var parentNode = node.parentNode;\n if (!parentNode)\n return;\n\n var parentNodeWrapper = wrap(parentNode);\n updateWrapperUpAndSideways(nodeWrapper);\n\n if (nodeWrapper.previousSibling)\n nodeWrapper.previousSibling.nextSibling_ = nodeWrapper;\n if (nodeWrapper.nextSibling)\n nodeWrapper.nextSibling.previousSibling_ = nodeWrapper;\n\n if (parentNodeWrapper.lastChild === nodeWrapper)\n parentNodeWrapper.lastChild_ = nodeWrapper;\n if (parentNodeWrapper.firstChild === nodeWrapper)\n parentNodeWrapper.firstChild_ = nodeWrapper;\n\n parentNode.removeChild(node);\n }\n\n var distributedNodesTable = new WeakMap();\n var destinationInsertionPointsTable = new WeakMap();\n var rendererForHostTable = new WeakMap();\n\n function resetDistributedNodes(insertionPoint) {\n distributedNodesTable.set(insertionPoint, []);\n }\n\n function getDistributedNodes(insertionPoint) {\n var rv = distributedNodesTable.get(insertionPoint);\n if (!rv)\n distributedNodesTable.set(insertionPoint, rv = []);\n return rv;\n }\n\n function getChildNodesSnapshot(node) {\n var result = [], i = 0;\n for (var child = node.firstChild; child; child = child.nextSibling) {\n result[i++] = child;\n }\n return result;\n }\n\n var request = oneOf(window, [\n 'requestAnimationFrame',\n 'mozRequestAnimationFrame',\n 'webkitRequestAnimationFrame',\n 'setTimeout'\n ]);\n\n var pendingDirtyRenderers = [];\n var renderTimer;\n\n function renderAllPending() {\n // TODO(arv): Order these in document order. That way we do not have to\n // render something twice.\n for (var i = 0; i < pendingDirtyRenderers.length; i++) {\n var renderer = pendingDirtyRenderers[i];\n var parentRenderer = renderer.parentRenderer;\n if (parentRenderer && parentRenderer.dirty)\n continue;\n renderer.render();\n }\n\n pendingDirtyRenderers = [];\n }\n\n function handleRequestAnimationFrame() {\n renderTimer = null;\n renderAllPending();\n }\n\n /**\n * Returns existing shadow renderer for a host or creates it if it is needed.\n * @params {!Element} host\n * @return {!ShadowRenderer}\n */\n function getRendererForHost(host) {\n var renderer = rendererForHostTable.get(host);\n if (!renderer) {\n renderer = new ShadowRenderer(host);\n rendererForHostTable.set(host, renderer);\n }\n return renderer;\n }\n\n function getShadowRootAncestor(node) {\n var root = getTreeScope(node).root;\n if (root instanceof ShadowRoot)\n return root;\n return null;\n }\n\n function getRendererForShadowRoot(shadowRoot) {\n return getRendererForHost(shadowRoot.host);\n }\n\n var spliceDiff = new ArraySplice();\n spliceDiff.equals = function(renderNode, rawNode) {\n return unwrap(renderNode.node) === rawNode;\n };\n\n /**\n * RenderNode is used as an in memory \"render tree\". When we render the\n * composed tree we create a tree of RenderNodes, then we diff this against\n * the real DOM tree and make minimal changes as needed.\n */\n function RenderNode(node) {\n this.skip = false;\n this.node = node;\n this.childNodes = [];\n }\n\n RenderNode.prototype = {\n append: function(node) {\n var rv = new RenderNode(node);\n this.childNodes.push(rv);\n return rv;\n },\n\n sync: function(opt_added) {\n if (this.skip)\n return;\n\n var nodeWrapper = this.node;\n // plain array of RenderNodes\n var newChildren = this.childNodes;\n // plain array of real nodes.\n var oldChildren = getChildNodesSnapshot(unwrap(nodeWrapper));\n var added = opt_added || new WeakMap();\n\n var splices = spliceDiff.calculateSplices(newChildren, oldChildren);\n\n var newIndex = 0, oldIndex = 0;\n var lastIndex = 0;\n for (var i = 0; i < splices.length; i++) {\n var splice = splices[i];\n for (; lastIndex < splice.index; lastIndex++) {\n oldIndex++;\n newChildren[newIndex++].sync(added);\n }\n\n var removedCount = splice.removed.length;\n for (var j = 0; j < removedCount; j++) {\n var wrapper = wrap(oldChildren[oldIndex++]);\n if (!added.get(wrapper))\n remove(wrapper);\n }\n\n var addedCount = splice.addedCount;\n var refNode = oldChildren[oldIndex] && wrap(oldChildren[oldIndex]);\n for (var j = 0; j < addedCount; j++) {\n var newChildRenderNode = newChildren[newIndex++];\n var newChildWrapper = newChildRenderNode.node;\n insertBefore(nodeWrapper, newChildWrapper, refNode);\n\n // Keep track of added so that we do not remove the node after it\n // has been added.\n added.set(newChildWrapper, true);\n\n newChildRenderNode.sync(added);\n }\n\n lastIndex += addedCount;\n }\n\n for (var i = lastIndex; i < newChildren.length; i++) {\n newChildren[i].sync(added);\n }\n }\n };\n\n function ShadowRenderer(host) {\n this.host = host;\n this.dirty = false;\n this.invalidateAttributes();\n this.associateNode(host);\n }\n\n ShadowRenderer.prototype = {\n\n // http://dvcs.w3.org/hg/webcomponents/raw-file/tip/spec/shadow/index.html#rendering-shadow-trees\n render: function(opt_renderNode) {\n if (!this.dirty)\n return;\n\n this.invalidateAttributes();\n\n var host = this.host;\n\n this.distribution(host);\n var renderNode = opt_renderNode || new RenderNode(host);\n this.buildRenderTree(renderNode, host);\n\n var topMostRenderer = !opt_renderNode;\n if (topMostRenderer)\n renderNode.sync();\n\n this.dirty = false;\n },\n\n get parentRenderer() {\n return getTreeScope(this.host).renderer;\n },\n\n invalidate: function() {\n if (!this.dirty) {\n this.dirty = true;\n var parentRenderer = this.parentRenderer;\n if (parentRenderer)\n parentRenderer.invalidate();\n pendingDirtyRenderers.push(this);\n if (renderTimer)\n return;\n renderTimer = window[request](handleRequestAnimationFrame, 0);\n }\n },\n\n // http://w3c.github.io/webcomponents/spec/shadow/#distribution-algorithms\n distribution: function(root) {\n this.resetAll(root);\n this.distributionResolution(root);\n },\n\n resetAll: function(node) {\n if (isInsertionPoint(node))\n resetDistributedNodes(node);\n else\n resetDestinationInsertionPoints(node);\n\n for (var child = node.firstChild; child; child = child.nextSibling) {\n this.resetAll(child);\n }\n\n if (node.shadowRoot)\n this.resetAll(node.shadowRoot);\n\n if (node.olderShadowRoot)\n this.resetAll(node.olderShadowRoot);\n },\n\n // http://w3c.github.io/webcomponents/spec/shadow/#distribution-results\n distributionResolution: function(node) {\n if (isShadowHost(node)) {\n var shadowHost = node;\n // 1.1\n var pool = poolPopulation(shadowHost);\n\n var shadowTrees = getShadowTrees(shadowHost);\n\n // 1.2\n for (var i = 0; i < shadowTrees.length; i++) {\n // 1.2.1\n this.poolDistribution(shadowTrees[i], pool);\n }\n\n // 1.3\n for (var i = shadowTrees.length - 1; i >= 0; i--) {\n var shadowTree = shadowTrees[i];\n\n // 1.3.1\n // TODO(arv): We should keep the shadow insertion points on the\n // shadow root (or renderer) so we don't have to search the tree\n // every time.\n var shadow = getShadowInsertionPoint(shadowTree);\n\n // 1.3.2\n if (shadow) {\n\n // 1.3.2.1\n var olderShadowRoot = shadowTree.olderShadowRoot;\n if (olderShadowRoot) {\n // 1.3.2.1.1\n pool = poolPopulation(olderShadowRoot);\n }\n\n // 1.3.2.2\n for (var j = 0; j < pool.length; j++) {\n // 1.3.2.2.1\n destributeNodeInto(pool[j], shadow);\n }\n }\n\n // 1.3.3\n this.distributionResolution(shadowTree);\n }\n }\n\n for (var child = node.firstChild; child; child = child.nextSibling) {\n this.distributionResolution(child);\n }\n },\n\n // http://w3c.github.io/webcomponents/spec/shadow/#dfn-pool-distribution-algorithm\n poolDistribution: function (node, pool) {\n if (node instanceof HTMLShadowElement)\n return;\n\n if (node instanceof HTMLContentElement) {\n var content = node;\n this.updateDependentAttributes(content.getAttribute('select'));\n\n var anyDistributed = false;\n\n // 1.1\n for (var i = 0; i < pool.length; i++) {\n var node = pool[i];\n if (!node)\n continue;\n if (matches(node, content)) {\n destributeNodeInto(node, content);\n pool[i] = undefined;\n anyDistributed = true;\n }\n }\n\n // 1.2\n // Fallback content\n if (!anyDistributed) {\n for (var child = content.firstChild;\n child;\n child = child.nextSibling) {\n destributeNodeInto(child, content);\n }\n }\n\n return;\n }\n\n for (var child = node.firstChild; child; child = child.nextSibling) {\n this.poolDistribution(child, pool);\n }\n },\n\n buildRenderTree: function(renderNode, node) {\n var children = this.compose(node);\n for (var i = 0; i < children.length; i++) {\n var child = children[i];\n var childRenderNode = renderNode.append(child);\n this.buildRenderTree(childRenderNode, child);\n }\n\n if (isShadowHost(node)) {\n var renderer = getRendererForHost(node);\n renderer.dirty = false;\n }\n\n },\n\n compose: function(node) {\n var children = [];\n var p = node.shadowRoot || node;\n for (var child = p.firstChild; child; child = child.nextSibling) {\n if (isInsertionPoint(child)) {\n this.associateNode(p);\n var distributedNodes = getDistributedNodes(child);\n for (var j = 0; j < distributedNodes.length; j++) {\n var distributedNode = distributedNodes[j];\n if (isFinalDestination(child, distributedNode))\n children.push(distributedNode);\n }\n } else {\n children.push(child);\n }\n }\n return children;\n },\n\n /**\n * Invalidates the attributes used to keep track of which attributes may\n * cause the renderer to be invalidated.\n */\n invalidateAttributes: function() {\n this.attributes = Object.create(null);\n },\n\n /**\n * Parses the selector and makes this renderer dependent on the attribute\n * being used in the selector.\n * @param {string} selector\n */\n updateDependentAttributes: function(selector) {\n if (!selector)\n return;\n\n var attributes = this.attributes;\n\n // .class\n if (/\\.\\w+/.test(selector))\n attributes['class'] = true;\n\n // #id\n if (/#\\w+/.test(selector))\n attributes['id'] = true;\n\n selector.replace(/\\[\\s*([^\\s=\\|~\\]]+)/g, function(_, name) {\n attributes[name] = true;\n });\n\n // Pseudo selectors have been removed from the spec.\n },\n\n dependsOnAttribute: function(name) {\n return this.attributes[name];\n },\n\n associateNode: function(node) {\n node.impl.polymerShadowRenderer_ = this;\n }\n };\n\n // http://w3c.github.io/webcomponents/spec/shadow/#dfn-pool-population-algorithm\n function poolPopulation(node) {\n var pool = [];\n for (var child = node.firstChild; child; child = child.nextSibling) {\n if (isInsertionPoint(child)) {\n pool.push.apply(pool, getDistributedNodes(child));\n } else {\n pool.push(child);\n }\n }\n return pool;\n }\n\n function getShadowInsertionPoint(node) {\n if (node instanceof HTMLShadowElement)\n return node;\n if (node instanceof HTMLContentElement)\n return null;\n for (var child = node.firstChild; child; child = child.nextSibling) {\n var res = getShadowInsertionPoint(child);\n if (res)\n return res;\n }\n return null;\n }\n\n function destributeNodeInto(child, insertionPoint) {\n getDistributedNodes(insertionPoint).push(child);\n var points = destinationInsertionPointsTable.get(child);\n if (!points)\n destinationInsertionPointsTable.set(child, [insertionPoint]);\n else\n points.push(insertionPoint);\n }\n\n function getDestinationInsertionPoints(node) {\n return destinationInsertionPointsTable.get(node);\n }\n\n function resetDestinationInsertionPoints(node) {\n // IE11 crashes when delete is used.\n destinationInsertionPointsTable.set(node, undefined);\n }\n\n // AllowedSelectors :\n // TypeSelector\n // *\n // ClassSelector\n // IDSelector\n // AttributeSelector\n var selectorStartCharRe = /^[*.#[a-zA-Z_|]/;\n\n function matches(node, contentElement) {\n var select = contentElement.getAttribute('select');\n if (!select)\n return true;\n\n // Here we know the select attribute is a non empty string.\n select = select.trim();\n if (!select)\n return true;\n\n if (!(node instanceof Element))\n return false;\n\n if (!selectorStartCharRe.test(select))\n return false;\n\n try {\n return node.matches(select);\n } catch (ex) {\n // Invalid selector.\n return false;\n }\n }\n\n function isFinalDestination(insertionPoint, node) {\n var points = getDestinationInsertionPoints(node);\n return points && points[points.length - 1] === insertionPoint;\n }\n\n function isInsertionPoint(node) {\n return node instanceof HTMLContentElement ||\n node instanceof HTMLShadowElement;\n }\n\n function isShadowHost(shadowHost) {\n return shadowHost.shadowRoot;\n }\n\n // Returns the shadow trees as an array, with the youngest tree at the\n // beginning of the array.\n function getShadowTrees(host) {\n var trees = [];\n\n for (var tree = host.shadowRoot; tree; tree = tree.olderShadowRoot) {\n trees.push(tree);\n }\n return trees;\n }\n\n function render(host) {\n new ShadowRenderer(host).render();\n };\n\n // Need to rerender shadow host when:\n //\n // - a direct child to the ShadowRoot is added or removed\n // - a direct child to the host is added or removed\n // - a new shadow root is created\n // - a direct child to a content/shadow element is added or removed\n // - a sibling to a content/shadow element is added or removed\n // - content[select] is changed\n // - an attribute in a direct child to a host is modified\n\n /**\n * This gets called when a node was added or removed to it.\n */\n Node.prototype.invalidateShadowRenderer = function(force) {\n var renderer = this.impl.polymerShadowRenderer_;\n if (renderer) {\n renderer.invalidate();\n return true;\n }\n\n return false;\n };\n\n HTMLContentElement.prototype.getDistributedNodes =\n HTMLShadowElement.prototype.getDistributedNodes = function() {\n // TODO(arv): We should only rerender the dirty ancestor renderers (from\n // the root and down).\n renderAllPending();\n return getDistributedNodes(this);\n };\n\n Element.prototype.getDestinationInsertionPoints = function() {\n renderAllPending();\n return getDestinationInsertionPoints(this) || [];\n };\n\n HTMLContentElement.prototype.nodeIsInserted_ =\n HTMLShadowElement.prototype.nodeIsInserted_ = function() {\n // Invalidate old renderer if any.\n this.invalidateShadowRenderer();\n\n var shadowRoot = getShadowRootAncestor(this);\n var renderer;\n if (shadowRoot)\n renderer = getRendererForShadowRoot(shadowRoot);\n this.impl.polymerShadowRenderer_ = renderer;\n if (renderer)\n renderer.invalidate();\n };\n\n scope.getRendererForHost = getRendererForHost;\n scope.getShadowTrees = getShadowTrees;\n scope.renderAllPending = renderAllPending;\n\n scope.getDestinationInsertionPoints = getDestinationInsertionPoints;\n\n // Exposed for testing\n scope.visual = {\n insertBefore: insertBefore,\n remove: remove,\n };\n\n})(window.ShadowDOMPolyfill);\n","// Copyright 2013 The Polymer Authors. All rights reserved.\n// Use of this source code is goverened by a BSD-style\n// license that can be found in the LICENSE file.\n\n(function(scope) {\n 'use strict';\n\n var HTMLElement = scope.wrappers.HTMLElement;\n var assert = scope.assert;\n var mixin = scope.mixin;\n var registerWrapper = scope.registerWrapper;\n var unwrap = scope.unwrap;\n var wrap = scope.wrap;\n\n var elementsWithFormProperty = [\n 'HTMLButtonElement',\n 'HTMLFieldSetElement',\n 'HTMLInputElement',\n 'HTMLKeygenElement',\n 'HTMLLabelElement',\n 'HTMLLegendElement',\n 'HTMLObjectElement',\n // HTMLOptionElement is handled in HTMLOptionElement.js\n 'HTMLOutputElement',\n // HTMLSelectElement is handled in HTMLSelectElement.js\n 'HTMLTextAreaElement',\n ];\n\n function createWrapperConstructor(name) {\n if (!window[name])\n return;\n\n // Ensure we are not overriding an already existing constructor.\n assert(!scope.wrappers[name]);\n\n var GeneratedWrapper = function(node) {\n // At this point all of them extend HTMLElement.\n HTMLElement.call(this, node);\n }\n GeneratedWrapper.prototype = Object.create(HTMLElement.prototype);\n mixin(GeneratedWrapper.prototype, {\n get form() {\n return wrap(unwrap(this).form);\n },\n });\n\n registerWrapper(window[name], GeneratedWrapper,\n document.createElement(name.slice(4, -7)));\n scope.wrappers[name] = GeneratedWrapper;\n }\n\n elementsWithFormProperty.forEach(createWrapperConstructor);\n\n})(window.ShadowDOMPolyfill);\n","// Copyright 2014 The Polymer Authors. All rights reserved.\n// Use of this source code is goverened by a BSD-style\n// license that can be found in the LICENSE file.\n\n(function(scope) {\n 'use strict';\n\n var registerWrapper = scope.registerWrapper;\n var unwrap = scope.unwrap;\n var unwrapIfNeeded = scope.unwrapIfNeeded;\n var wrap = scope.wrap;\n\n var OriginalSelection = window.Selection;\n\n function Selection(impl) {\n this.impl = impl;\n }\n Selection.prototype = {\n get anchorNode() {\n return wrap(this.impl.anchorNode);\n },\n get focusNode() {\n return wrap(this.impl.focusNode);\n },\n addRange: function(range) {\n this.impl.addRange(unwrap(range));\n },\n collapse: function(node, index) {\n this.impl.collapse(unwrapIfNeeded(node), index);\n },\n containsNode: function(node, allowPartial) {\n return this.impl.containsNode(unwrapIfNeeded(node), allowPartial);\n },\n extend: function(node, offset) {\n this.impl.extend(unwrapIfNeeded(node), offset);\n },\n getRangeAt: function(index) {\n return wrap(this.impl.getRangeAt(index));\n },\n removeRange: function(range) {\n this.impl.removeRange(unwrap(range));\n },\n selectAllChildren: function(node) {\n this.impl.selectAllChildren(unwrapIfNeeded(node));\n },\n toString: function() {\n return this.impl.toString();\n }\n };\n\n // WebKit extensions. Not implemented.\n // readonly attribute Node baseNode;\n // readonly attribute long baseOffset;\n // readonly attribute Node extentNode;\n // readonly attribute long extentOffset;\n // [RaisesException] void setBaseAndExtent([Default=Undefined] optional Node baseNode,\n // [Default=Undefined] optional long baseOffset,\n // [Default=Undefined] optional Node extentNode,\n // [Default=Undefined] optional long extentOffset);\n // [RaisesException, ImplementedAs=collapse] void setPosition([Default=Undefined] optional Node node,\n // [Default=Undefined] optional long offset);\n\n registerWrapper(window.Selection, Selection, window.getSelection());\n\n scope.wrappers.Selection = Selection;\n\n})(window.ShadowDOMPolyfill);\n","// Copyright 2013 The Polymer Authors. All rights reserved.\n// Use of this source code is goverened by a BSD-style\n// license that can be found in the LICENSE file.\n\n(function(scope) {\n 'use strict';\n\n var GetElementsByInterface = scope.GetElementsByInterface;\n var Node = scope.wrappers.Node;\n var ParentNodeInterface = scope.ParentNodeInterface;\n var Selection = scope.wrappers.Selection;\n var SelectorsInterface = scope.SelectorsInterface;\n var ShadowRoot = scope.wrappers.ShadowRoot;\n var TreeScope = scope.TreeScope;\n var cloneNode = scope.cloneNode;\n var defineWrapGetter = scope.defineWrapGetter;\n var elementFromPoint = scope.elementFromPoint;\n var forwardMethodsToWrapper = scope.forwardMethodsToWrapper;\n var matchesNames = scope.matchesNames;\n var mixin = scope.mixin;\n var registerWrapper = scope.registerWrapper;\n var renderAllPending = scope.renderAllPending;\n var rewrap = scope.rewrap;\n var unwrap = scope.unwrap;\n var wrap = scope.wrap;\n var wrapEventTargetMethods = scope.wrapEventTargetMethods;\n var wrapNodeList = scope.wrapNodeList;\n\n var implementationTable = new WeakMap();\n\n function Document(node) {\n Node.call(this, node);\n this.treeScope_ = new TreeScope(this, null);\n }\n Document.prototype = Object.create(Node.prototype);\n\n defineWrapGetter(Document, 'documentElement');\n\n // Conceptually both body and head can be in a shadow but suporting that seems\n // overkill at this point.\n defineWrapGetter(Document, 'body');\n defineWrapGetter(Document, 'head');\n\n // document cannot be overridden so we override a bunch of its methods\n // directly on the instance.\n\n function wrapMethod(name) {\n var original = document[name];\n Document.prototype[name] = function() {\n return wrap(original.apply(this.impl, arguments));\n };\n }\n\n [\n 'createComment',\n 'createDocumentFragment',\n 'createElement',\n 'createElementNS',\n 'createEvent',\n 'createEventNS',\n 'createRange',\n 'createTextNode',\n 'getElementById'\n ].forEach(wrapMethod);\n\n var originalAdoptNode = document.adoptNode;\n\n function adoptNodeNoRemove(node, doc) {\n originalAdoptNode.call(doc.impl, unwrap(node));\n adoptSubtree(node, doc);\n }\n\n function adoptSubtree(node, doc) {\n if (node.shadowRoot)\n doc.adoptNode(node.shadowRoot);\n if (node instanceof ShadowRoot)\n adoptOlderShadowRoots(node, doc);\n for (var child = node.firstChild; child; child = child.nextSibling) {\n adoptSubtree(child, doc);\n }\n }\n\n function adoptOlderShadowRoots(shadowRoot, doc) {\n var oldShadowRoot = shadowRoot.olderShadowRoot;\n if (oldShadowRoot)\n doc.adoptNode(oldShadowRoot);\n }\n\n var originalGetSelection = document.getSelection;\n\n mixin(Document.prototype, {\n adoptNode: function(node) {\n if (node.parentNode)\n node.parentNode.removeChild(node);\n adoptNodeNoRemove(node, this);\n return node;\n },\n elementFromPoint: function(x, y) {\n return elementFromPoint(this, this, x, y);\n },\n importNode: function(node, deep) {\n return cloneNode(node, deep, this.impl);\n },\n getSelection: function() {\n renderAllPending();\n return new Selection(originalGetSelection.call(unwrap(this)));\n },\n getElementsByName: function(name) {\n return SelectorsInterface.querySelectorAll.call(this,\n '[name=' + JSON.stringify(String(name)) + ']');\n }\n });\n\n if (document.registerElement) {\n var originalRegisterElement = document.registerElement;\n Document.prototype.registerElement = function(tagName, object) {\n var prototype, extendsOption;\n if (object !== undefined) {\n prototype = object.prototype;\n extendsOption = object.extends;\n }\n\n if (!prototype)\n prototype = Object.create(HTMLElement.prototype);\n\n\n // If we already used the object as a prototype for another custom\n // element.\n if (scope.nativePrototypeTable.get(prototype)) {\n // TODO(arv): DOMException\n throw new Error('NotSupportedError');\n }\n\n // Find first object on the prototype chain that already have a native\n // prototype. Keep track of all the objects before that so we can create\n // a similar structure for the native case.\n var proto = Object.getPrototypeOf(prototype);\n var nativePrototype;\n var prototypes = [];\n while (proto) {\n nativePrototype = scope.nativePrototypeTable.get(proto);\n if (nativePrototype)\n break;\n prototypes.push(proto);\n proto = Object.getPrototypeOf(proto);\n }\n\n if (!nativePrototype) {\n // TODO(arv): DOMException\n throw new Error('NotSupportedError');\n }\n\n // This works by creating a new prototype object that is empty, but has\n // the native prototype as its proto. The original prototype object\n // passed into register is used as the wrapper prototype.\n\n var newPrototype = Object.create(nativePrototype);\n for (var i = prototypes.length - 1; i >= 0; i--) {\n newPrototype = Object.create(newPrototype);\n }\n\n // Add callbacks if present.\n // Names are taken from:\n // https://code.google.com/p/chromium/codesearch#chromium/src/third_party/WebKit/Source/bindings/v8/CustomElementConstructorBuilder.cpp&sq=package:chromium&type=cs&l=156\n // and not from the spec since the spec is out of date.\n [\n 'createdCallback',\n 'attachedCallback',\n 'detachedCallback',\n 'attributeChangedCallback',\n ].forEach(function(name) {\n var f = prototype[name];\n if (!f)\n return;\n newPrototype[name] = function() {\n // if this element has been wrapped prior to registration,\n // the wrapper is stale; in this case rewrap\n if (!(wrap(this) instanceof CustomElementConstructor)) {\n rewrap(this);\n }\n f.apply(wrap(this), arguments);\n };\n });\n\n var p = {prototype: newPrototype};\n if (extendsOption)\n p.extends = extendsOption;\n\n function CustomElementConstructor(node) {\n if (!node) {\n if (extendsOption) {\n return document.createElement(extendsOption, tagName);\n } else {\n return document.createElement(tagName);\n }\n }\n this.impl = node;\n }\n CustomElementConstructor.prototype = prototype;\n CustomElementConstructor.prototype.constructor = CustomElementConstructor;\n\n scope.constructorTable.set(newPrototype, CustomElementConstructor);\n scope.nativePrototypeTable.set(prototype, newPrototype);\n\n // registration is synchronous so do it last\n var nativeConstructor = originalRegisterElement.call(unwrap(this),\n tagName, p);\n return CustomElementConstructor;\n };\n\n forwardMethodsToWrapper([\n window.HTMLDocument || window.Document, // Gecko adds these to HTMLDocument\n ], [\n 'registerElement',\n ]);\n }\n\n // We also override some of the methods on document.body and document.head\n // for convenience.\n forwardMethodsToWrapper([\n window.HTMLBodyElement,\n window.HTMLDocument || window.Document, // Gecko adds these to HTMLDocument\n window.HTMLHeadElement,\n window.HTMLHtmlElement,\n ], [\n 'appendChild',\n 'compareDocumentPosition',\n 'contains',\n 'getElementsByClassName',\n 'getElementsByTagName',\n 'getElementsByTagNameNS',\n 'insertBefore',\n 'querySelector',\n 'querySelectorAll',\n 'removeChild',\n 'replaceChild',\n ].concat(matchesNames));\n\n forwardMethodsToWrapper([\n window.HTMLDocument || window.Document, // Gecko adds these to HTMLDocument\n ], [\n 'adoptNode',\n 'importNode',\n 'contains',\n 'createComment',\n 'createDocumentFragment',\n 'createElement',\n 'createElementNS',\n 'createEvent',\n 'createEventNS',\n 'createRange',\n 'createTextNode',\n 'elementFromPoint',\n 'getElementById',\n 'getElementsByName',\n 'getSelection',\n ]);\n\n mixin(Document.prototype, GetElementsByInterface);\n mixin(Document.prototype, ParentNodeInterface);\n mixin(Document.prototype, SelectorsInterface);\n\n mixin(Document.prototype, {\n get implementation() {\n var implementation = implementationTable.get(this);\n if (implementation)\n return implementation;\n implementation =\n new DOMImplementation(unwrap(this).implementation);\n implementationTable.set(this, implementation);\n return implementation;\n },\n\n get defaultView() {\n return wrap(unwrap(this).defaultView);\n }\n });\n\n registerWrapper(window.Document, Document,\n document.implementation.createHTMLDocument(''));\n\n // Both WebKit and Gecko uses HTMLDocument for document. HTML5/DOM only has\n // one Document interface and IE implements the standard correctly.\n if (window.HTMLDocument)\n registerWrapper(window.HTMLDocument, Document);\n\n wrapEventTargetMethods([\n window.HTMLBodyElement,\n window.HTMLDocument || window.Document, // Gecko adds these to HTMLDocument\n window.HTMLHeadElement,\n ]);\n\n function DOMImplementation(impl) {\n this.impl = impl;\n }\n\n function wrapImplMethod(constructor, name) {\n var original = document.implementation[name];\n constructor.prototype[name] = function() {\n return wrap(original.apply(this.impl, arguments));\n };\n }\n\n function forwardImplMethod(constructor, name) {\n var original = document.implementation[name];\n constructor.prototype[name] = function() {\n return original.apply(this.impl, arguments);\n };\n }\n\n wrapImplMethod(DOMImplementation, 'createDocumentType');\n wrapImplMethod(DOMImplementation, 'createDocument');\n wrapImplMethod(DOMImplementation, 'createHTMLDocument');\n forwardImplMethod(DOMImplementation, 'hasFeature');\n\n registerWrapper(window.DOMImplementation, DOMImplementation);\n\n forwardMethodsToWrapper([\n window.DOMImplementation,\n ], [\n 'createDocumentType',\n 'createDocument',\n 'createHTMLDocument',\n 'hasFeature',\n ]);\n\n scope.adoptNodeNoRemove = adoptNodeNoRemove;\n scope.wrappers.DOMImplementation = DOMImplementation;\n scope.wrappers.Document = Document;\n\n})(window.ShadowDOMPolyfill);\n","// Copyright 2013 The Polymer Authors. All rights reserved.\n// Use of this source code is goverened by a BSD-style\n// license that can be found in the LICENSE file.\n\n(function(scope) {\n 'use strict';\n\n var EventTarget = scope.wrappers.EventTarget;\n var Selection = scope.wrappers.Selection;\n var mixin = scope.mixin;\n var registerWrapper = scope.registerWrapper;\n var renderAllPending = scope.renderAllPending;\n var unwrap = scope.unwrap;\n var unwrapIfNeeded = scope.unwrapIfNeeded;\n var wrap = scope.wrap;\n\n var OriginalWindow = window.Window;\n var originalGetComputedStyle = window.getComputedStyle;\n var originalGetDefaultComputedStyle = window.getDefaultComputedStyle;\n var originalGetSelection = window.getSelection;\n\n function Window(impl) {\n EventTarget.call(this, impl);\n }\n Window.prototype = Object.create(EventTarget.prototype);\n\n OriginalWindow.prototype.getComputedStyle = function(el, pseudo) {\n return wrap(this || window).getComputedStyle(unwrapIfNeeded(el), pseudo);\n };\n\n // Mozilla proprietary extension.\n if (originalGetDefaultComputedStyle) {\n OriginalWindow.prototype.getDefaultComputedStyle = function(el, pseudo) {\n return wrap(this || window).getDefaultComputedStyle(\n unwrapIfNeeded(el), pseudo);\n };\n }\n\n OriginalWindow.prototype.getSelection = function() {\n return wrap(this || window).getSelection();\n };\n\n // Work around for https://bugzilla.mozilla.org/show_bug.cgi?id=943065\n delete window.getComputedStyle;\n delete window.getSelection;\n\n ['addEventListener', 'removeEventListener', 'dispatchEvent'].forEach(\n function(name) {\n OriginalWindow.prototype[name] = function() {\n var w = wrap(this || window);\n return w[name].apply(w, arguments);\n };\n\n // Work around for https://bugzilla.mozilla.org/show_bug.cgi?id=943065\n delete window[name];\n });\n\n mixin(Window.prototype, {\n getComputedStyle: function(el, pseudo) {\n renderAllPending();\n return originalGetComputedStyle.call(unwrap(this), unwrapIfNeeded(el),\n pseudo);\n },\n getSelection: function() {\n renderAllPending();\n return new Selection(originalGetSelection.call(unwrap(this)));\n },\n\n get document() {\n return wrap(unwrap(this).document);\n }\n });\n\n // Mozilla proprietary extension.\n if (originalGetDefaultComputedStyle) {\n Window.prototype.getDefaultComputedStyle = function(el, pseudo) {\n renderAllPending();\n return originalGetDefaultComputedStyle.call(unwrap(this),\n unwrapIfNeeded(el),pseudo);\n };\n }\n\n registerWrapper(OriginalWindow, Window, window);\n\n scope.wrappers.Window = Window;\n\n})(window.ShadowDOMPolyfill);\n","/**\n * Copyright 2014 The Polymer Authors. All rights reserved.\n * Use of this source code is goverened by a BSD-style\n * license that can be found in the LICENSE file.\n */\n\n(function(scope) {\n 'use strict';\n\n var unwrap = scope.unwrap;\n\n // DataTransfer (Clipboard in old Blink/WebKit) has a single method that\n // requires wrapping. Since it is only a method we do not need a real wrapper,\n // we can just override the method.\n\n var OriginalDataTransfer = window.DataTransfer || window.Clipboard;\n var OriginalDataTransferSetDragImage =\n OriginalDataTransfer.prototype.setDragImage;\n\n if (OriginalDataTransferSetDragImage) {\n OriginalDataTransfer.prototype.setDragImage = function(image, x, y) {\n OriginalDataTransferSetDragImage.call(this, unwrap(image), x, y);\n };\n }\n\n})(window.ShadowDOMPolyfill);\n","/**\n * Copyright 2014 The Polymer Authors. All rights reserved.\n * Use of this source code is goverened by a BSD-style\n * license that can be found in the LICENSE file.\n */\n\n(function(scope) {\n 'use strict';\n\n var registerWrapper = scope.registerWrapper;\n var unwrap = scope.unwrap;\n\n var OriginalFormData = window.FormData;\n\n function FormData(formElement) {\n if (formElement instanceof OriginalFormData)\n this.impl = formElement;\n else\n this.impl = new OriginalFormData(formElement && unwrap(formElement));\n }\n\n registerWrapper(OriginalFormData, FormData, new OriginalFormData());\n\n scope.wrappers.FormData = FormData;\n\n})(window.ShadowDOMPolyfill);\n","// Copyright 2013 The Polymer Authors. All rights reserved.\n// Use of this source code is goverened by a BSD-style\n// license that can be found in the LICENSE file.\n\n(function(scope) {\n 'use strict';\n\n var isWrapperFor = scope.isWrapperFor;\n\n // This is a list of the elements we currently override the global constructor\n // for.\n var elements = {\n 'a': 'HTMLAnchorElement',\n // Do not create an applet element by default since it shows a warning in\n // IE.\n // https://github.com/Polymer/polymer/issues/217\n // 'applet': 'HTMLAppletElement',\n 'area': 'HTMLAreaElement',\n 'audio': 'HTMLAudioElement',\n 'base': 'HTMLBaseElement',\n 'body': 'HTMLBodyElement',\n 'br': 'HTMLBRElement',\n 'button': 'HTMLButtonElement',\n 'canvas': 'HTMLCanvasElement',\n 'caption': 'HTMLTableCaptionElement',\n 'col': 'HTMLTableColElement',\n // 'command': 'HTMLCommandElement', // Not fully implemented in Gecko.\n 'content': 'HTMLContentElement',\n 'data': 'HTMLDataElement',\n 'datalist': 'HTMLDataListElement',\n 'del': 'HTMLModElement',\n 'dir': 'HTMLDirectoryElement',\n 'div': 'HTMLDivElement',\n 'dl': 'HTMLDListElement',\n 'embed': 'HTMLEmbedElement',\n 'fieldset': 'HTMLFieldSetElement',\n 'font': 'HTMLFontElement',\n 'form': 'HTMLFormElement',\n 'frame': 'HTMLFrameElement',\n 'frameset': 'HTMLFrameSetElement',\n 'h1': 'HTMLHeadingElement',\n 'head': 'HTMLHeadElement',\n 'hr': 'HTMLHRElement',\n 'html': 'HTMLHtmlElement',\n 'iframe': 'HTMLIFrameElement',\n 'img': 'HTMLImageElement',\n 'input': 'HTMLInputElement',\n 'keygen': 'HTMLKeygenElement',\n 'label': 'HTMLLabelElement',\n 'legend': 'HTMLLegendElement',\n 'li': 'HTMLLIElement',\n 'link': 'HTMLLinkElement',\n 'map': 'HTMLMapElement',\n 'marquee': 'HTMLMarqueeElement',\n 'menu': 'HTMLMenuElement',\n 'menuitem': 'HTMLMenuItemElement',\n 'meta': 'HTMLMetaElement',\n 'meter': 'HTMLMeterElement',\n 'object': 'HTMLObjectElement',\n 'ol': 'HTMLOListElement',\n 'optgroup': 'HTMLOptGroupElement',\n 'option': 'HTMLOptionElement',\n 'output': 'HTMLOutputElement',\n 'p': 'HTMLParagraphElement',\n 'param': 'HTMLParamElement',\n 'pre': 'HTMLPreElement',\n 'progress': 'HTMLProgressElement',\n 'q': 'HTMLQuoteElement',\n 'script': 'HTMLScriptElement',\n 'select': 'HTMLSelectElement',\n 'shadow': 'HTMLShadowElement',\n 'source': 'HTMLSourceElement',\n 'span': 'HTMLSpanElement',\n 'style': 'HTMLStyleElement',\n 'table': 'HTMLTableElement',\n 'tbody': 'HTMLTableSectionElement',\n // WebKit and Moz are wrong:\n // https://bugs.webkit.org/show_bug.cgi?id=111469\n // https://bugzilla.mozilla.org/show_bug.cgi?id=848096\n // 'td': 'HTMLTableCellElement',\n 'template': 'HTMLTemplateElement',\n 'textarea': 'HTMLTextAreaElement',\n 'thead': 'HTMLTableSectionElement',\n 'time': 'HTMLTimeElement',\n 'title': 'HTMLTitleElement',\n 'tr': 'HTMLTableRowElement',\n 'track': 'HTMLTrackElement',\n 'ul': 'HTMLUListElement',\n 'video': 'HTMLVideoElement',\n };\n\n function overrideConstructor(tagName) {\n var nativeConstructorName = elements[tagName];\n var nativeConstructor = window[nativeConstructorName];\n if (!nativeConstructor)\n return;\n var element = document.createElement(tagName);\n var wrapperConstructor = element.constructor;\n window[nativeConstructorName] = wrapperConstructor;\n }\n\n Object.keys(elements).forEach(overrideConstructor);\n\n Object.getOwnPropertyNames(scope.wrappers).forEach(function(name) {\n window[name] = scope.wrappers[name]\n });\n\n})(window.ShadowDOMPolyfill);\n","/*\n * Copyright (c) 2014 The Polymer Project Authors. All rights reserved.\n * This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt\n * The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt\n * The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt\n * Code distributed by Google as part of the polymer project is also\n * subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt\n */\n\n(function(scope) {\n\n // convenient global\n window.wrap = ShadowDOMPolyfill.wrapIfNeeded;\n window.unwrap = ShadowDOMPolyfill.unwrapIfNeeded;\n\n // users may want to customize other types\n // TODO(sjmiles): 'button' is now supported by ShadowDOMPolyfill, but\n // I've left this code here in case we need to temporarily patch another\n // type\n /*\n (function() {\n var elts = {HTMLButtonElement: 'button'};\n for (var c in elts) {\n window[c] = function() { throw 'Patched Constructor'; };\n window[c].prototype = Object.getPrototypeOf(\n document.createElement(elts[c]));\n }\n })();\n */\n\n // patch in prefixed name\n Object.defineProperty(Element.prototype, 'webkitShadowRoot',\n Object.getOwnPropertyDescriptor(Element.prototype, 'shadowRoot'));\n\n var originalCreateShadowRoot = Element.prototype.createShadowRoot;\n Element.prototype.createShadowRoot = function() {\n var root = originalCreateShadowRoot.call(this);\n CustomElements.watchShadow(this);\n return root;\n };\n\n Element.prototype.webkitCreateShadowRoot = Element.prototype.createShadowRoot;\n\n function queryShadow(node, selector) {\n var m, el = node.firstElementChild;\n var shadows, sr, i;\n shadows = [];\n sr = node.shadowRoot;\n while(sr) {\n shadows.push(sr);\n sr = sr.olderShadowRoot;\n }\n for(i = shadows.length - 1; i >= 0; i--) {\n m = shadows[i].querySelector(selector);\n if (m) {\n return m;\n }\n }\n while(el) {\n m = queryShadow(el, selector);\n if (m) {\n return m;\n }\n el = el.nextElementSibling;\n }\n return null;\n }\n\n function queryAllShadows(node, selector, results) {\n var el = node.firstElementChild;\n var temp, sr, shadows, i, j;\n shadows = [];\n sr = node.shadowRoot;\n while(sr) {\n shadows.push(sr);\n sr = sr.olderShadowRoot;\n }\n for (i = shadows.length - 1; i >= 0; i--) {\n temp = shadows[i].querySelectorAll(selector);\n for(j = 0; j < temp.length; j++) {\n results.push(temp[j]);\n }\n }\n while (el) {\n queryAllShadows(el, selector, results);\n el = el.nextElementSibling;\n }\n return results;\n }\n\n scope.queryAllShadows = function(node, selector, all) {\n if (all) {\n return queryAllShadows(node, selector, []);\n } else {\n return queryShadow(node, selector);\n }\n };\n})(window.Platform);\n","/*\n * Copyright (c) 2014 The Polymer Project Authors. All rights reserved.\n * This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt\n * The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt\n * The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt\n * Code distributed by Google as part of the polymer project is also\n * subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt\n */\n\n/*\n This is a limited shim for ShadowDOM css styling.\n https://dvcs.w3.org/hg/webcomponents/raw-file/tip/spec/shadow/index.html#styles\n \n The intention here is to support only the styling features which can be \n relatively simply implemented. The goal is to allow users to avoid the \n most obvious pitfalls and do so without compromising performance significantly. \n For ShadowDOM styling that's not covered here, a set of best practices\n can be provided that should allow users to accomplish more complex styling.\n\n The following is a list of specific ShadowDOM styling features and a brief\n discussion of the approach used to shim.\n\n Shimmed features:\n\n * :host, :host-context: ShadowDOM allows styling of the shadowRoot's host\n element using the :host rule. To shim this feature, the :host styles are \n reformatted and prefixed with a given scope name and promoted to a \n document level stylesheet.\n For example, given a scope name of .foo, a rule like this:\n \n :host {\n background: red;\n }\n }\n \n becomes:\n \n .foo {\n background: red;\n }\n \n * encapsultion: Styles defined within ShadowDOM, apply only to \n dom inside the ShadowDOM. Polymer uses one of two techniques to imlement\n this feature.\n \n By default, rules are prefixed with the host element tag name \n as a descendant selector. This ensures styling does not leak out of the 'top'\n of the element's ShadowDOM. For example,\n\n div {\n font-weight: bold;\n }\n \n becomes:\n\n x-foo div {\n font-weight: bold;\n }\n \n becomes:\n\n\n Alternatively, if Platform.ShadowCSS.strictStyling is set to true then \n selectors are scoped by adding an attribute selector suffix to each\n simple selector that contains the host element tag name. Each element \n in the element's ShadowDOM template is also given the scope attribute. \n Thus, these rules match only elements that have the scope attribute.\n For example, given a scope name of x-foo, a rule like this:\n \n div {\n font-weight: bold;\n }\n \n becomes:\n \n div[x-foo] {\n font-weight: bold;\n }\n\n Note that elements that are dynamically added to a scope must have the scope\n selector added to them manually.\n\n * upper/lower bound encapsulation: Styles which are defined outside a\n shadowRoot should not cross the ShadowDOM boundary and should not apply\n inside a shadowRoot.\n\n This styling behavior is not emulated. Some possible ways to do this that \n were rejected due to complexity and/or performance concerns include: (1) reset\n every possible property for every possible selector for a given scope name;\n (2) re-implement css in javascript.\n \n As an alternative, users should make sure to use selectors\n specific to the scope in which they are working.\n \n * ::distributed: This behavior is not emulated. It's often not necessary\n to style the contents of a specific insertion point and instead, descendants\n of the host element can be styled selectively. Users can also create an \n extra node around an insertion point and style that node's contents\n via descendent selectors. For example, with a shadowRoot like this:\n \n <style>\n ::content(div) {\n background: red;\n }\n </style>\n <content></content>\n \n could become:\n \n <style>\n / *@polyfill .content-container div * / \n ::content(div) {\n background: red;\n }\n </style>\n <div class=\"content-container\">\n <content></content>\n </div>\n \n Note the use of @polyfill in the comment above a ShadowDOM specific style\n declaration. This is a directive to the styling shim to use the selector \n in comments in lieu of the next selector when running under polyfill.\n*/\n(function(scope) {\n\nvar ShadowCSS = {\n strictStyling: false,\n registry: {},\n // Shim styles for a given root associated with a name and extendsName\n // 1. cache root styles by name\n // 2. optionally tag root nodes with scope name\n // 3. shim polyfill directives /* @polyfill */ and /* @polyfill-rule */\n // 4. shim :host and scoping\n shimStyling: function(root, name, extendsName) {\n var scopeStyles = this.prepareRoot(root, name, extendsName);\n var typeExtension = this.isTypeExtension(extendsName);\n var scopeSelector = this.makeScopeSelector(name, typeExtension);\n // use caching to make working with styles nodes easier and to facilitate\n // lookup of extendee\n var cssText = stylesToCssText(scopeStyles, true);\n cssText = this.scopeCssText(cssText, scopeSelector);\n // cache shimmed css on root for user extensibility\n if (root) {\n root.shimmedStyle = cssText;\n }\n // add style to document\n this.addCssToDocument(cssText, name);\n },\n /*\n * Shim a style element with the given selector. Returns cssText that can\n * be included in the document via Platform.ShadowCSS.addCssToDocument(css).\n */\n shimStyle: function(style, selector) {\n return this.shimCssText(style.textContent, selector);\n },\n /*\n * Shim some cssText with the given selector. Returns cssText that can\n * be included in the document via Platform.ShadowCSS.addCssToDocument(css).\n */\n shimCssText: function(cssText, selector) {\n cssText = this.insertDirectives(cssText);\n return this.scopeCssText(cssText, selector);\n },\n makeScopeSelector: function(name, typeExtension) {\n if (name) {\n return typeExtension ? '[is=' + name + ']' : name;\n }\n return '';\n },\n isTypeExtension: function(extendsName) {\n return extendsName && extendsName.indexOf('-') < 0;\n },\n prepareRoot: function(root, name, extendsName) {\n var def = this.registerRoot(root, name, extendsName);\n this.replaceTextInStyles(def.rootStyles, this.insertDirectives);\n // remove existing style elements\n this.removeStyles(root, def.rootStyles);\n // apply strict attr\n if (this.strictStyling) {\n this.applyScopeToContent(root, name);\n }\n return def.scopeStyles;\n },\n removeStyles: function(root, styles) {\n for (var i=0, l=styles.length, s; (i<l) && (s=styles[i]); i++) {\n s.parentNode.removeChild(s);\n }\n },\n registerRoot: function(root, name, extendsName) {\n var def = this.registry[name] = {\n root: root,\n name: name,\n extendsName: extendsName\n }\n var styles = this.findStyles(root);\n def.rootStyles = styles;\n def.scopeStyles = def.rootStyles;\n var extendee = this.registry[def.extendsName];\n if (extendee) {\n def.scopeStyles = extendee.scopeStyles.concat(def.scopeStyles);\n }\n return def;\n },\n findStyles: function(root) {\n if (!root) {\n return [];\n }\n var styles = root.querySelectorAll('style');\n return Array.prototype.filter.call(styles, function(s) {\n return !s.hasAttribute(NO_SHIM_ATTRIBUTE);\n });\n },\n applyScopeToContent: function(root, name) {\n if (root) {\n // add the name attribute to each node in root.\n Array.prototype.forEach.call(root.querySelectorAll('*'),\n function(node) {\n node.setAttribute(name, '');\n });\n // and template contents too\n Array.prototype.forEach.call(root.querySelectorAll('template'),\n function(template) {\n this.applyScopeToContent(template.content, name);\n },\n this);\n }\n },\n insertDirectives: function(cssText) {\n cssText = this.insertPolyfillDirectivesInCssText(cssText);\n return this.insertPolyfillRulesInCssText(cssText);\n },\n /*\n * Process styles to convert native ShadowDOM rules that will trip\n * up the css parser; we rely on decorating the stylesheet with inert rules.\n * \n * For example, we convert this rule:\n * \n * polyfill-next-selector { content: ':host menu-item'; }\n * ::content menu-item {\n * \n * to this:\n * \n * scopeName menu-item {\n *\n **/\n insertPolyfillDirectivesInCssText: function(cssText) {\n // TODO(sorvell): remove either content or comment\n cssText = cssText.replace(cssCommentNextSelectorRe, function(match, p1) {\n // remove end comment delimiter and add block start\n return p1.slice(0, -2) + '{';\n });\n return cssText.replace(cssContentNextSelectorRe, function(match, p1) {\n return p1 + ' {';\n });\n },\n /*\n * Process styles to add rules which will only apply under the polyfill\n * \n * For example, we convert this rule:\n * \n * polyfill-rule {\n * content: ':host menu-item';\n * ...\n * }\n * \n * to this:\n * \n * scopeName menu-item {...}\n *\n **/\n insertPolyfillRulesInCssText: function(cssText) {\n // TODO(sorvell): remove either content or comment\n cssText = cssText.replace(cssCommentRuleRe, function(match, p1) {\n // remove end comment delimiter\n return p1.slice(0, -1);\n });\n return cssText.replace(cssContentRuleRe, function(match, p1, p2, p3) {\n var rule = match.replace(p1, '').replace(p2, '');\n return p3 + rule;\n });\n },\n /* Ensure styles are scoped. Pseudo-scoping takes a rule like:\n * \n * .foo {... } \n * \n * and converts this to\n * \n * scopeName .foo { ... }\n */\n scopeCssText: function(cssText, scopeSelector) {\n var unscoped = this.extractUnscopedRulesFromCssText(cssText);\n cssText = this.insertPolyfillHostInCssText(cssText);\n cssText = this.convertColonHost(cssText);\n cssText = this.convertColonHostContext(cssText);\n cssText = this.convertShadowDOMSelectors(cssText);\n if (scopeSelector) {\n var self = this, cssText;\n withCssRules(cssText, function(rules) {\n cssText = self.scopeRules(rules, scopeSelector);\n });\n\n }\n cssText = cssText + '\\n' + unscoped;\n return cssText.trim();\n },\n /*\n * Process styles to add rules which will only apply under the polyfill\n * and do not process via CSSOM. (CSSOM is destructive to rules on rare \n * occasions, e.g. -webkit-calc on Safari.)\n * For example, we convert this rule:\n * \n * (comment start) @polyfill-unscoped-rule menu-item { \n * ... } (comment end)\n * \n * to this:\n * \n * menu-item {...}\n *\n **/\n extractUnscopedRulesFromCssText: function(cssText) {\n // TODO(sorvell): remove either content or comment\n var r = '', m;\n while (m = cssCommentUnscopedRuleRe.exec(cssText)) {\n r += m[1].slice(0, -1) + '\\n\\n';\n }\n while (m = cssContentUnscopedRuleRe.exec(cssText)) {\n r += m[0].replace(m[2], '').replace(m[1], m[3]) + '\\n\\n';\n }\n return r;\n },\n /*\n * convert a rule like :host(.foo) > .bar { }\n *\n * to\n *\n * scopeName.foo > .bar\n */\n convertColonHost: function(cssText) {\n return this.convertColonRule(cssText, cssColonHostRe,\n this.colonHostPartReplacer);\n },\n /*\n * convert a rule like :host-context(.foo) > .bar { }\n *\n * to\n *\n * scopeName.foo > .bar, .foo scopeName > .bar { }\n * \n * and\n *\n * :host-context(.foo:host) .bar { ... }\n * \n * to\n * \n * scopeName.foo .bar { ... }\n */\n convertColonHostContext: function(cssText) {\n return this.convertColonRule(cssText, cssColonHostContextRe,\n this.colonHostContextPartReplacer);\n },\n convertColonRule: function(cssText, regExp, partReplacer) {\n // p1 = :host, p2 = contents of (), p3 rest of rule\n return cssText.replace(regExp, function(m, p1, p2, p3) {\n p1 = polyfillHostNoCombinator;\n if (p2) {\n var parts = p2.split(','), r = [];\n for (var i=0, l=parts.length, p; (i<l) && (p=parts[i]); i++) {\n p = p.trim();\n r.push(partReplacer(p1, p, p3));\n }\n return r.join(',');\n } else {\n return p1 + p3;\n }\n });\n },\n colonHostContextPartReplacer: function(host, part, suffix) {\n if (part.match(polyfillHost)) {\n return this.colonHostPartReplacer(host, part, suffix);\n } else {\n return host + part + suffix + ', ' + part + ' ' + host + suffix;\n }\n },\n colonHostPartReplacer: function(host, part, suffix) {\n return host + part.replace(polyfillHost, '') + suffix;\n },\n /*\n * Convert combinators like ::shadow and pseudo-elements like ::content\n * by replacing with space.\n */\n convertShadowDOMSelectors: function(cssText) {\n for (var i=0; i < shadowDOMSelectorsRe.length; i++) {\n cssText = cssText.replace(shadowDOMSelectorsRe[i], ' ');\n }\n return cssText;\n },\n // change a selector like 'div' to 'name div'\n scopeRules: function(cssRules, scopeSelector) {\n var cssText = '';\n if (cssRules) {\n Array.prototype.forEach.call(cssRules, function(rule) {\n if (rule.selectorText && (rule.style && rule.style.cssText !== undefined)) {\n cssText += this.scopeSelector(rule.selectorText, scopeSelector, \n this.strictStyling) + ' {\\n\\t';\n cssText += this.propertiesFromRule(rule) + '\\n}\\n\\n';\n } else if (rule.type === CSSRule.MEDIA_RULE) {\n cssText += '@media ' + rule.media.mediaText + ' {\\n';\n cssText += this.scopeRules(rule.cssRules, scopeSelector);\n cssText += '\\n}\\n\\n';\n } else {\n // TODO(sjmiles): KEYFRAMES_RULE in IE11 throws when we query cssText\n // 'cssText' in rule returns true, but rule.cssText throws anyway\n // We can test the rule type, e.g.\n // else if (rule.type !== CSSRule.KEYFRAMES_RULE && rule.cssText) {\n // but this will prevent cssText propagation in other browsers which\n // support it.\n // KEYFRAMES_RULE has a CSSRuleSet, so the text can probably be reconstructed\n // from that collection; this would be a proper fix.\n // For now, I'm trapping the exception so IE11 is unblocked in other areas.\n try {\n if (rule.cssText) {\n cssText += rule.cssText + '\\n\\n';\n }\n } catch(x) {\n // squelch\n }\n }\n }, this);\n }\n return cssText;\n },\n scopeSelector: function(selector, scopeSelector, strict) {\n var r = [], parts = selector.split(',');\n parts.forEach(function(p) {\n p = p.trim();\n if (this.selectorNeedsScoping(p, scopeSelector)) {\n p = (strict && !p.match(polyfillHostNoCombinator)) ? \n this.applyStrictSelectorScope(p, scopeSelector) :\n this.applySelectorScope(p, scopeSelector);\n }\n r.push(p);\n }, this);\n return r.join(', ');\n },\n selectorNeedsScoping: function(selector, scopeSelector) {\n if (Array.isArray(scopeSelector)) {\n return true;\n }\n var re = this.makeScopeMatcher(scopeSelector);\n return !selector.match(re);\n },\n makeScopeMatcher: function(scopeSelector) {\n scopeSelector = scopeSelector.replace(/\\[/g, '\\\\[').replace(/\\[/g, '\\\\]');\n return new RegExp('^(' + scopeSelector + ')' + selectorReSuffix, 'm');\n },\n applySelectorScope: function(selector, selectorScope) {\n return Array.isArray(selectorScope) ?\n this.applySelectorScopeList(selector, selectorScope) :\n this.applySimpleSelectorScope(selector, selectorScope);\n },\n // apply an array of selectors\n applySelectorScopeList: function(selector, scopeSelectorList) {\n var r = [];\n for (var i=0, s; (s=scopeSelectorList[i]); i++) {\n r.push(this.applySimpleSelectorScope(selector, s));\n }\n return r.join(', ');\n },\n // scope via name and [is=name]\n applySimpleSelectorScope: function(selector, scopeSelector) {\n if (selector.match(polyfillHostRe)) {\n selector = selector.replace(polyfillHostNoCombinator, scopeSelector);\n return selector.replace(polyfillHostRe, scopeSelector + ' ');\n } else {\n return scopeSelector + ' ' + selector;\n }\n },\n // return a selector with [name] suffix on each simple selector\n // e.g. .foo.bar > .zot becomes .foo[name].bar[name] > .zot[name]\n applyStrictSelectorScope: function(selector, scopeSelector) {\n scopeSelector = scopeSelector.replace(/\\[is=([^\\]]*)\\]/g, '$1');\n var splits = [' ', '>', '+', '~'],\n scoped = selector,\n attrName = '[' + scopeSelector + ']';\n splits.forEach(function(sep) {\n var parts = scoped.split(sep);\n scoped = parts.map(function(p) {\n // remove :host since it should be unnecessary\n var t = p.trim().replace(polyfillHostRe, '');\n if (t && (splits.indexOf(t) < 0) && (t.indexOf(attrName) < 0)) {\n p = t.replace(/([^:]*)(:*)(.*)/, '$1' + attrName + '$2$3')\n }\n return p;\n }).join(sep);\n });\n return scoped;\n },\n insertPolyfillHostInCssText: function(selector) {\n return selector.replace(colonHostContextRe, polyfillHostContext).replace(\n colonHostRe, polyfillHost);\n },\n propertiesFromRule: function(rule) {\n var cssText = rule.style.cssText;\n // TODO(sorvell): Safari cssom incorrectly removes quotes from the content\n // property. (https://bugs.webkit.org/show_bug.cgi?id=118045)\n // don't replace attr rules\n if (rule.style.content && !rule.style.content.match(/['\"]+|attr/)) {\n cssText = cssText.replace(/content:[^;]*;/g, 'content: \\'' + \n rule.style.content + '\\';');\n }\n // TODO(sorvell): we can workaround this issue here, but we need a list\n // of troublesome properties to fix https://github.com/Polymer/platform/issues/53\n //\n // inherit rules can be omitted from cssText\n // TODO(sorvell): remove when Blink bug is fixed:\n // https://code.google.com/p/chromium/issues/detail?id=358273\n var style = rule.style;\n for (var i in style) {\n if (style[i] === 'initial') {\n cssText += i + ': initial; ';\n }\n }\n return cssText;\n },\n replaceTextInStyles: function(styles, action) {\n if (styles && action) {\n if (!(styles instanceof Array)) {\n styles = [styles];\n }\n Array.prototype.forEach.call(styles, function(s) {\n s.textContent = action.call(this, s.textContent);\n }, this);\n }\n },\n addCssToDocument: function(cssText, name) {\n if (cssText.match('@import')) {\n addOwnSheet(cssText, name);\n } else {\n addCssToDocument(cssText);\n }\n }\n};\n\nvar selectorRe = /([^{]*)({[\\s\\S]*?})/gim,\n cssCommentRe = /\\/\\*[^*]*\\*+([^/*][^*]*\\*+)*\\//gim,\n // TODO(sorvell): remove either content or comment\n cssCommentNextSelectorRe = /\\/\\*\\s*@polyfill ([^*]*\\*+([^/*][^*]*\\*+)*\\/)([^{]*?){/gim,\n cssContentNextSelectorRe = /polyfill-next-selector[^}]*content\\:[\\s]*?['\"](.*?)['\"][;\\s]*}([^{]*?){/gim, \n // TODO(sorvell): remove either content or comment\n cssCommentRuleRe = /\\/\\*\\s@polyfill-rule([^*]*\\*+([^/*][^*]*\\*+)*)\\//gim,\n cssContentRuleRe = /(polyfill-rule)[^}]*(content\\:[\\s]*['\"](.*?)['\"])[;\\s]*[^}]*}/gim,\n // TODO(sorvell): remove either content or comment\n cssCommentUnscopedRuleRe = /\\/\\*\\s@polyfill-unscoped-rule([^*]*\\*+([^/*][^*]*\\*+)*)\\//gim,\n cssContentUnscopedRuleRe = /(polyfill-unscoped-rule)[^}]*(content\\:[\\s]*['\"](.*?)['\"])[;\\s]*[^}]*}/gim,\n cssPseudoRe = /::(x-[^\\s{,(]*)/gim,\n cssPartRe = /::part\\(([^)]*)\\)/gim,\n // note: :host pre-processed to -shadowcsshost.\n polyfillHost = '-shadowcsshost',\n // note: :host-context pre-processed to -shadowcsshostcontext.\n polyfillHostContext = '-shadowcsscontext',\n parenSuffix = ')(?:\\\\((' +\n '(?:\\\\([^)(]*\\\\)|[^)(]*)+?' +\n ')\\\\))?([^,{]*)';\n cssColonHostRe = new RegExp('(' + polyfillHost + parenSuffix, 'gim'),\n cssColonHostContextRe = new RegExp('(' + polyfillHostContext + parenSuffix, 'gim'),\n selectorReSuffix = '([>\\\\s~+\\[.,{:][\\\\s\\\\S]*)?$',\n colonHostRe = /\\:host/gim,\n colonHostContextRe = /\\:host-context/gim,\n /* host name without combinator */\n polyfillHostNoCombinator = polyfillHost + '-no-combinator',\n polyfillHostRe = new RegExp(polyfillHost, 'gim'),\n polyfillHostContextRe = new RegExp(polyfillHostContext, 'gim'),\n shadowDOMSelectorsRe = [\n /\\^\\^/g,\n /\\^/g,\n /\\/shadow\\//g,\n /\\/shadow-deep\\//g,\n /::shadow/g,\n /\\/deep\\//g,\n /::content/g\n ];\n\nfunction stylesToCssText(styles, preserveComments) {\n var cssText = '';\n Array.prototype.forEach.call(styles, function(s) {\n cssText += s.textContent + '\\n\\n';\n });\n // strip comments for easier processing\n if (!preserveComments) {\n cssText = cssText.replace(cssCommentRe, '');\n }\n return cssText;\n}\n\nfunction cssTextToStyle(cssText) {\n var style = document.createElement('style');\n style.textContent = cssText;\n return style;\n}\n\nfunction cssToRules(cssText) {\n var style = cssTextToStyle(cssText);\n document.head.appendChild(style);\n var rules = [];\n if (style.sheet) {\n // TODO(sorvell): Firefox throws when accessing the rules of a stylesheet\n // with an @import\n // https://bugzilla.mozilla.org/show_bug.cgi?id=625013\n try {\n rules = style.sheet.cssRules;\n } catch(e) {\n //\n }\n } else {\n console.warn('sheet not found', style);\n }\n style.parentNode.removeChild(style);\n return rules;\n}\n\nvar frame = document.createElement('iframe');\nframe.style.display = 'none';\n\nfunction initFrame() {\n frame.initialized = true;\n document.body.appendChild(frame);\n var doc = frame.contentDocument;\n var base = doc.createElement('base');\n base.href = document.baseURI;\n doc.head.appendChild(base);\n}\n\nfunction inFrame(fn) {\n if (!frame.initialized) {\n initFrame();\n }\n document.body.appendChild(frame);\n fn(frame.contentDocument);\n document.body.removeChild(frame);\n}\n\n// TODO(sorvell): use an iframe if the cssText contains an @import to workaround\n// https://code.google.com/p/chromium/issues/detail?id=345114\nvar isChrome = navigator.userAgent.match('Chrome');\nfunction withCssRules(cssText, callback) {\n if (!callback) {\n return;\n }\n var rules;\n if (cssText.match('@import') && isChrome) {\n var style = cssTextToStyle(cssText);\n inFrame(function(doc) {\n doc.head.appendChild(style.impl);\n rules = style.sheet.cssRules;\n callback(rules);\n });\n } else {\n rules = cssToRules(cssText);\n callback(rules);\n }\n}\n\nfunction rulesToCss(cssRules) {\n for (var i=0, css=[]; i < cssRules.length; i++) {\n css.push(cssRules[i].cssText);\n }\n return css.join('\\n\\n');\n}\n\nfunction addCssToDocument(cssText) {\n if (cssText) {\n getSheet().appendChild(document.createTextNode(cssText));\n }\n}\n\nfunction addOwnSheet(cssText, name) {\n var style = cssTextToStyle(cssText);\n style.setAttribute(name, '');\n style.setAttribute(SHIMMED_ATTRIBUTE, '');\n document.head.appendChild(style);\n}\n\nvar SHIM_ATTRIBUTE = 'shim-shadowdom';\nvar SHIMMED_ATTRIBUTE = 'shim-shadowdom-css';\nvar NO_SHIM_ATTRIBUTE = 'no-shim';\n\nvar sheet;\nfunction getSheet() {\n if (!sheet) {\n sheet = document.createElement(\"style\");\n sheet.setAttribute(SHIMMED_ATTRIBUTE, '');\n sheet[SHIMMED_ATTRIBUTE] = true;\n }\n return sheet;\n}\n\n// add polyfill stylesheet to document\nif (window.ShadowDOMPolyfill) {\n addCssToDocument('style { display: none !important; }\\n');\n var doc = wrap(document);\n var head = doc.querySelector('head');\n head.insertBefore(getSheet(), head.childNodes[0]);\n\n // TODO(sorvell): monkey-patching HTMLImports is abusive;\n // consider a better solution.\n document.addEventListener('DOMContentLoaded', function() {\n var urlResolver = scope.urlResolver;\n \n if (window.HTMLImports && !HTMLImports.useNative) {\n var SHIM_SHEET_SELECTOR = 'link[rel=stylesheet]' +\n '[' + SHIM_ATTRIBUTE + ']';\n var SHIM_STYLE_SELECTOR = 'style[' + SHIM_ATTRIBUTE + ']';\n HTMLImports.importer.documentPreloadSelectors += ',' + SHIM_SHEET_SELECTOR;\n HTMLImports.importer.importsPreloadSelectors += ',' + SHIM_SHEET_SELECTOR;\n\n HTMLImports.parser.documentSelectors = [\n HTMLImports.parser.documentSelectors,\n SHIM_SHEET_SELECTOR,\n SHIM_STYLE_SELECTOR\n ].join(',');\n \n var originalParseGeneric = HTMLImports.parser.parseGeneric;\n\n HTMLImports.parser.parseGeneric = function(elt) {\n if (elt[SHIMMED_ATTRIBUTE]) {\n return;\n }\n var style = elt.__importElement || elt;\n if (!style.hasAttribute(SHIM_ATTRIBUTE)) {\n originalParseGeneric.call(this, elt);\n return;\n }\n if (elt.__resource) {\n style = elt.ownerDocument.createElement('style');\n style.textContent = urlResolver.resolveCssText(\n elt.__resource, elt.href);\n } else {\n urlResolver.resolveStyle(style); \n }\n style.textContent = ShadowCSS.shimStyle(style);\n style.removeAttribute(SHIM_ATTRIBUTE, '');\n style.setAttribute(SHIMMED_ATTRIBUTE, '');\n style[SHIMMED_ATTRIBUTE] = true;\n // place in document\n if (style.parentNode !== head) {\n // replace links in head\n if (elt.parentNode === head) {\n head.replaceChild(style, elt);\n } else {\n this.addElementToDocument(style);\n }\n }\n style.__importParsed = true;\n this.markParsingComplete(elt);\n this.parseNext();\n }\n\n var hasResource = HTMLImports.parser.hasResource;\n HTMLImports.parser.hasResource = function(node) {\n if (node.localName === 'link' && node.rel === 'stylesheet' &&\n node.hasAttribute(SHIM_ATTRIBUTE)) {\n return (node.__resource);\n } else {\n return hasResource.call(this, node);\n }\n }\n\n }\n });\n}\n\n// exports\nscope.ShadowCSS = ShadowCSS;\n\n})(window.Platform);\n","/*\n * Copyright (c) 2014 The Polymer Project Authors. All rights reserved.\n * This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt\n * The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt\n * The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt\n * Code distributed by Google as part of the polymer project is also\n * subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt\n */\n\n(function(scope) {\n\n // so we can call wrap/unwrap without testing for ShadowDOMPolyfill\n window.wrap = window.unwrap = function(n){\n return n;\n }\n\n addEventListener('DOMContentLoaded', function() {\n if (CustomElements.useNative === false) {\n var originalCreateShadowRoot = Element.prototype.createShadowRoot;\n Element.prototype.createShadowRoot = function() {\n var root = originalCreateShadowRoot.call(this);\n CustomElements.watchShadow(this);\n return root;\n };\n }\n });\n\n Platform.templateContent = function(inTemplate) {\n // if MDV exists, it may need to boostrap this template to reveal content\n if (window.HTMLTemplateElement && HTMLTemplateElement.bootstrap) {\n HTMLTemplateElement.bootstrap(inTemplate);\n }\n // fallback when there is no Shadow DOM polyfill, no MDV polyfill, and no\n // native template support\n if (!inTemplate.content && !inTemplate._content) {\n var frag = document.createDocumentFragment();\n while (inTemplate.firstChild) {\n frag.appendChild(inTemplate.firstChild);\n }\n inTemplate._content = frag;\n }\n return inTemplate.content || inTemplate._content;\n };\n\n})(window.Platform);\n","/* Any copyright is dedicated to the Public Domain.\n * http://creativecommons.org/publicdomain/zero/1.0/ */\n\n(function(scope) {\n 'use strict';\n\n // feature detect for URL constructor\n var hasWorkingUrl = false;\n if (!scope.forceJURL) {\n try {\n var u = new URL('b', 'http://a');\n hasWorkingUrl = u.href === 'http://a/b';\n } catch(e) {}\n }\n\n if (hasWorkingUrl)\n return;\n\n var relative = Object.create(null);\n relative['ftp'] = 21;\n relative['file'] = 0;\n relative['gopher'] = 70;\n relative['http'] = 80;\n relative['https'] = 443;\n relative['ws'] = 80;\n relative['wss'] = 443;\n\n var relativePathDotMapping = Object.create(null);\n relativePathDotMapping['%2e'] = '.';\n relativePathDotMapping['.%2e'] = '..';\n relativePathDotMapping['%2e.'] = '..';\n relativePathDotMapping['%2e%2e'] = '..';\n\n function isRelativeScheme(scheme) {\n return relative[scheme] !== undefined;\n }\n\n function invalid() {\n clear.call(this);\n this._isInvalid = true;\n }\n\n function IDNAToASCII(h) {\n if ('' == h) {\n invalid.call(this)\n }\n // XXX\n return h.toLowerCase()\n }\n\n function percentEscape(c) {\n var unicode = c.charCodeAt(0);\n if (unicode > 0x20 &&\n unicode < 0x7F &&\n // \" # < > ? `\n [0x22, 0x23, 0x3C, 0x3E, 0x3F, 0x60].indexOf(unicode) == -1\n ) {\n return c;\n }\n return encodeURIComponent(c);\n }\n\n function percentEscapeQuery(c) {\n // XXX This actually needs to encode c using encoding and then\n // convert the bytes one-by-one.\n\n var unicode = c.charCodeAt(0);\n if (unicode > 0x20 &&\n unicode < 0x7F &&\n // \" # < > ` (do not escape '?')\n [0x22, 0x23, 0x3C, 0x3E, 0x60].indexOf(unicode) == -1\n ) {\n return c;\n }\n return encodeURIComponent(c);\n }\n\n var EOF = undefined,\n ALPHA = /[a-zA-Z]/,\n ALPHANUMERIC = /[a-zA-Z0-9\\+\\-\\.]/;\n\n function parse(input, stateOverride, base) {\n function err(message) {\n errors.push(message)\n }\n\n var state = stateOverride || 'scheme start',\n cursor = 0,\n buffer = '',\n seenAt = false,\n seenBracket = false,\n errors = [];\n\n loop: while ((input[cursor - 1] != EOF || cursor == 0) && !this._isInvalid) {\n var c = input[cursor];\n switch (state) {\n case 'scheme start':\n if (c && ALPHA.test(c)) {\n buffer += c.toLowerCase(); // ASCII-safe\n state = 'scheme';\n } else if (!stateOverride) {\n buffer = '';\n state = 'no scheme';\n continue;\n } else {\n err('Invalid scheme.');\n break loop;\n }\n break;\n\n case 'scheme':\n if (c && ALPHANUMERIC.test(c)) {\n buffer += c.toLowerCase(); // ASCII-safe\n } else if (':' == c) {\n this._scheme = buffer;\n buffer = '';\n if (stateOverride) {\n break loop;\n }\n if (isRelativeScheme(this._scheme)) {\n this._isRelative = true;\n }\n if ('file' == this._scheme) {\n state = 'relative';\n } else if (this._isRelative && base && base._scheme == this._scheme) {\n state = 'relative or authority';\n } else if (this._isRelative) {\n state = 'authority first slash';\n } else {\n state = 'scheme data';\n }\n } else if (!stateOverride) {\n buffer = '';\n cursor = 0;\n state = 'no scheme';\n continue;\n } else if (EOF == c) {\n break loop;\n } else {\n err('Code point not allowed in scheme: ' + c)\n break loop;\n }\n break;\n\n case 'scheme data':\n if ('?' == c) {\n query = '?';\n state = 'query';\n } else if ('#' == c) {\n this._fragment = '#';\n state = 'fragment';\n } else {\n // XXX error handling\n if (EOF != c && '\\t' != c && '\\n' != c && '\\r' != c) {\n this._schemeData += percentEscape(c);\n }\n }\n break;\n\n case 'no scheme':\n if (!base || !(isRelativeScheme(base._scheme))) {\n err('Missing scheme.');\n invalid.call(this);\n } else {\n state = 'relative';\n continue;\n }\n break;\n\n case 'relative or authority':\n if ('/' == c && '/' == input[cursor+1]) {\n state = 'authority ignore slashes';\n } else {\n err('Expected /, got: ' + c);\n state = 'relative';\n continue\n }\n break;\n\n case 'relative':\n this._isRelative = true;\n if ('file' != this._scheme)\n this._scheme = base._scheme;\n if (EOF == c) {\n this._host = base._host;\n this._port = base._port;\n this._path = base._path.slice();\n this._query = base._query;\n break loop;\n } else if ('/' == c || '\\\\' == c) {\n if ('\\\\' == c)\n err('\\\\ is an invalid code point.');\n state = 'relative slash';\n } else if ('?' == c) {\n this._host = base._host;\n this._port = base._port;\n this._path = base._path.slice();\n this._query = '?';\n state = 'query';\n } else if ('#' == c) {\n this._host = base._host;\n this._port = base._port;\n this._path = base._path.slice();\n this._query = base._query;\n this._fragment = '#';\n state = 'fragment';\n } else {\n var nextC = input[cursor+1]\n var nextNextC = input[cursor+2]\n if (\n 'file' != this._scheme || !ALPHA.test(c) ||\n (nextC != ':' && nextC != '|') ||\n (EOF != nextNextC && '/' != nextNextC && '\\\\' != nextNextC && '?' != nextNextC && '#' != nextNextC)) {\n this._host = base._host;\n this._port = base._port;\n this._path = base._path.slice();\n this._path.pop();\n }\n state = 'relative path';\n continue;\n }\n break;\n\n case 'relative slash':\n if ('/' == c || '\\\\' == c) {\n if ('\\\\' == c) {\n err('\\\\ is an invalid code point.');\n }\n if ('file' == this._scheme) {\n state = 'file host';\n } else {\n state = 'authority ignore slashes';\n }\n } else {\n if ('file' != this._scheme) {\n this._host = base._host;\n this._port = base._port;\n }\n state = 'relative path';\n continue;\n }\n break;\n\n case 'authority first slash':\n if ('/' == c) {\n state = 'authority second slash';\n } else {\n err(\"Expected '/', got: \" + c);\n state = 'authority ignore slashes';\n continue;\n }\n break;\n\n case 'authority second slash':\n state = 'authority ignore slashes';\n if ('/' != c) {\n err(\"Expected '/', got: \" + c);\n continue;\n }\n break;\n\n case 'authority ignore slashes':\n if ('/' != c && '\\\\' != c) {\n state = 'authority';\n continue;\n } else {\n err('Expected authority, got: ' + c);\n }\n break;\n\n case 'authority':\n if ('@' == c) {\n if (seenAt) {\n err('@ already seen.');\n buffer += '%40';\n }\n seenAt = true;\n for (var i = 0; i < buffer.length; i++) {\n var cp = buffer[i];\n if ('\\t' == cp || '\\n' == cp || '\\r' == cp) {\n err('Invalid whitespace in authority.');\n continue;\n }\n // XXX check URL code points\n if (':' == cp && null === this._password) {\n this._password = '';\n continue;\n }\n var tempC = percentEscape(cp);\n (null !== this._password) ? this._password += tempC : this._username += tempC;\n }\n buffer = '';\n } else if (EOF == c || '/' == c || '\\\\' == c || '?' == c || '#' == c) {\n cursor -= buffer.length;\n buffer = '';\n state = 'host';\n continue;\n } else {\n buffer += c;\n }\n break;\n\n case 'file host':\n if (EOF == c || '/' == c || '\\\\' == c || '?' == c || '#' == c) {\n if (buffer.length == 2 && ALPHA.test(buffer[0]) && (buffer[1] == ':' || buffer[1] == '|')) {\n state = 'relative path';\n } else if (buffer.length == 0) {\n state = 'relative path start';\n } else {\n this._host = IDNAToASCII.call(this, buffer);\n buffer = '';\n state = 'relative path start';\n }\n continue;\n } else if ('\\t' == c || '\\n' == c || '\\r' == c) {\n err('Invalid whitespace in file host.');\n } else {\n buffer += c;\n }\n break;\n\n case 'host':\n case 'hostname':\n if (':' == c && !seenBracket) {\n // XXX host parsing\n this._host = IDNAToASCII.call(this, buffer);\n buffer = '';\n state = 'port';\n if ('hostname' == stateOverride) {\n break loop;\n }\n } else if (EOF == c || '/' == c || '\\\\' == c || '?' == c || '#' == c) {\n this._host = IDNAToASCII.call(this, buffer);\n buffer = '';\n state = 'relative path start';\n if (stateOverride) {\n break loop;\n }\n continue;\n } else if ('\\t' != c && '\\n' != c && '\\r' != c) {\n if ('[' == c) {\n seenBracket = true;\n } else if (']' == c) {\n seenBracket = false;\n }\n buffer += c;\n } else {\n err('Invalid code point in host/hostname: ' + c);\n }\n break;\n\n case 'port':\n if (/[0-9]/.test(c)) {\n buffer += c;\n } else if (EOF == c || '/' == c || '\\\\' == c || '?' == c || '#' == c || stateOverride) {\n if ('' != buffer) {\n var temp = parseInt(buffer, 10);\n if (temp != relative[this._scheme]) {\n this._port = temp + '';\n }\n buffer = '';\n }\n if (stateOverride) {\n break loop;\n }\n state = 'relative path start';\n continue;\n } else if ('\\t' == c || '\\n' == c || '\\r' == c) {\n err('Invalid code point in port: ' + c);\n } else {\n invalid.call(this);\n }\n break;\n\n case 'relative path start':\n if ('\\\\' == c)\n err(\"'\\\\' not allowed in path.\");\n state = 'relative path';\n if ('/' != c && '\\\\' != c) {\n continue;\n }\n break;\n\n case 'relative path':\n if (EOF == c || '/' == c || '\\\\' == c || (!stateOverride && ('?' == c || '#' == c))) {\n if ('\\\\' == c) {\n err('\\\\ not allowed in relative path.');\n }\n var tmp;\n if (tmp = relativePathDotMapping[buffer.toLowerCase()]) {\n buffer = tmp;\n }\n if ('..' == buffer) {\n this._path.pop();\n if ('/' != c && '\\\\' != c) {\n this._path.push('');\n }\n } else if ('.' == buffer && '/' != c && '\\\\' != c) {\n this._path.push('');\n } else if ('.' != buffer) {\n if ('file' == this._scheme && this._path.length == 0 && buffer.length == 2 && ALPHA.test(buffer[0]) && buffer[1] == '|') {\n buffer = buffer[0] + ':';\n }\n this._path.push(buffer);\n }\n buffer = '';\n if ('?' == c) {\n this._query = '?';\n state = 'query';\n } else if ('#' == c) {\n this._fragment = '#';\n state = 'fragment';\n }\n } else if ('\\t' != c && '\\n' != c && '\\r' != c) {\n buffer += percentEscape(c);\n }\n break;\n\n case 'query':\n if (!stateOverride && '#' == c) {\n this._fragment = '#';\n state = 'fragment';\n } else if (EOF != c && '\\t' != c && '\\n' != c && '\\r' != c) {\n this._query += percentEscapeQuery(c);\n }\n break;\n\n case 'fragment':\n if (EOF != c && '\\t' != c && '\\n' != c && '\\r' != c) {\n this._fragment += c;\n }\n break;\n }\n\n cursor++;\n }\n }\n\n function clear() {\n this._scheme = '';\n this._schemeData = '';\n this._username = '';\n this._password = null;\n this._host = '';\n this._port = '';\n this._path = [];\n this._query = '';\n this._fragment = '';\n this._isInvalid = false;\n this._isRelative = false;\n }\n\n // Does not process domain names or IP addresses.\n // Does not handle encoding for the query parameter.\n function jURL(url, base /* , encoding */) {\n if (base !== undefined && !(base instanceof jURL))\n base = new jURL(String(base));\n\n this._url = url;\n clear.call(this);\n\n var input = url.replace(/^[ \\t\\r\\n\\f]+|[ \\t\\r\\n\\f]+$/g, '');\n // encoding = encoding || 'utf-8'\n\n parse.call(this, input, null, base);\n }\n\n jURL.prototype = {\n get href() {\n if (this._isInvalid)\n return this._url;\n\n var authority = '';\n if ('' != this._username || null != this._password) {\n authority = this._username +\n (null != this._password ? ':' + this._password : '') + '@';\n }\n\n return this.protocol +\n (this._isRelative ? '//' + authority + this.host : '') +\n this.pathname + this._query + this._fragment;\n },\n set href(href) {\n clear.call(this);\n parse.call(this, href);\n },\n\n get protocol() {\n return this._scheme + ':';\n },\n set protocol(protocol) {\n if (this._isInvalid)\n return;\n parse.call(this, protocol + ':', 'scheme start');\n },\n\n get host() {\n return this._isInvalid ? '' : this._port ?\n this._host + ':' + this._port : this._host;\n },\n set host(host) {\n if (this._isInvalid || !this._isRelative)\n return;\n parse.call(this, host, 'host');\n },\n\n get hostname() {\n return this._host;\n },\n set hostname(hostname) {\n if (this._isInvalid || !this._isRelative)\n return;\n parse.call(this, hostname, 'hostname');\n },\n\n get port() {\n return this._port;\n },\n set port(port) {\n if (this._isInvalid || !this._isRelative)\n return;\n parse.call(this, port, 'port');\n },\n\n get pathname() {\n return this._isInvalid ? '' : this._isRelative ?\n '/' + this._path.join('/') : this._schemeData;\n },\n set pathname(pathname) {\n if (this._isInvalid || !this._isRelative)\n return;\n this._path = [];\n parse.call(this, pathname, 'relative path start');\n },\n\n get search() {\n return this._isInvalid || !this._query || '?' == this._query ?\n '' : this._query;\n },\n set search(search) {\n if (this._isInvalid || !this._isRelative)\n return;\n this._query = '?';\n if ('?' == search[0])\n search = search.slice(1);\n parse.call(this, search, 'query');\n },\n\n get hash() {\n return this._isInvalid || !this._fragment || '#' == this._fragment ?\n '' : this._fragment;\n },\n set hash(hash) {\n if (this._isInvalid)\n return;\n this._fragment = '#';\n if ('#' == hash[0])\n hash = hash.slice(1);\n parse.call(this, hash, 'fragment');\n }\n };\n\n // Copy over the static methods\n var OriginalURL = scope.URL;\n if (OriginalURL) {\n jURL.createObjectURL = function(blob) {\n // IE extension allows a second optional options argument.\n // http://msdn.microsoft.com/en-us/library/ie/hh772302(v=vs.85).aspx\n return OriginalURL.createObjectURL.apply(OriginalURL, arguments);\n };\n jURL.revokeObjectURL = function(url) {\n OriginalURL.revokeObjectURL(url);\n };\n }\n\n scope.URL = jURL;\n\n})(this);\n","/*\n * Copyright (c) 2014 The Polymer Project Authors. All rights reserved.\n * This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt\n * The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt\n * The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt\n * Code distributed by Google as part of the polymer project is also\n * subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt\n */\n\n(function(scope) {\n\n// Old versions of iOS do not have bind.\n\nif (!Function.prototype.bind) {\n Function.prototype.bind = function(scope) {\n var self = this;\n var args = Array.prototype.slice.call(arguments, 1);\n return function() {\n var args2 = args.slice();\n args2.push.apply(args2, arguments);\n return self.apply(scope, args2);\n };\n };\n}\n\n// mixin\n\n// copy all properties from inProps (et al) to inObj\nfunction mixin(inObj/*, inProps, inMoreProps, ...*/) {\n var obj = inObj || {};\n for (var i = 1; i < arguments.length; i++) {\n var p = arguments[i];\n try {\n for (var n in p) {\n copyProperty(n, p, obj);\n }\n } catch(x) {\n }\n }\n return obj;\n}\n\n// copy property inName from inSource object to inTarget object\nfunction copyProperty(inName, inSource, inTarget) {\n var pd = getPropertyDescriptor(inSource, inName);\n Object.defineProperty(inTarget, inName, pd);\n}\n\n// get property descriptor for inName on inObject, even if\n// inName exists on some link in inObject's prototype chain\nfunction getPropertyDescriptor(inObject, inName) {\n if (inObject) {\n var pd = Object.getOwnPropertyDescriptor(inObject, inName);\n return pd || getPropertyDescriptor(Object.getPrototypeOf(inObject), inName);\n }\n}\n\n// export\n\nscope.mixin = mixin;\n\n})(window.Platform);\n","/*\n * Copyright (c) 2014 The Polymer Project Authors. All rights reserved.\n * This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt\n * The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt\n * The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt\n * Code distributed by Google as part of the polymer project is also\n * subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt\n */\n\n(function(scope) {\n\n 'use strict';\n\n // polyfill DOMTokenList\n // * add/remove: allow these methods to take multiple classNames\n // * toggle: add a 2nd argument which forces the given state rather\n // than toggling.\n\n var add = DOMTokenList.prototype.add;\n var remove = DOMTokenList.prototype.remove;\n DOMTokenList.prototype.add = function() {\n for (var i = 0; i < arguments.length; i++) {\n add.call(this, arguments[i]);\n }\n };\n DOMTokenList.prototype.remove = function() {\n for (var i = 0; i < arguments.length; i++) {\n remove.call(this, arguments[i]);\n }\n };\n DOMTokenList.prototype.toggle = function(name, bool) {\n if (arguments.length == 1) {\n bool = !this.contains(name);\n }\n bool ? this.add(name) : this.remove(name);\n };\n DOMTokenList.prototype.switch = function(oldName, newName) {\n oldName && this.remove(oldName);\n newName && this.add(newName);\n };\n\n // add array() to NodeList, NamedNodeMap, HTMLCollection\n\n var ArraySlice = function() {\n return Array.prototype.slice.call(this);\n };\n\n var namedNodeMap = (window.NamedNodeMap || window.MozNamedAttrMap || {});\n\n NodeList.prototype.array = ArraySlice;\n namedNodeMap.prototype.array = ArraySlice;\n HTMLCollection.prototype.array = ArraySlice;\n\n // polyfill performance.now\n\n if (!window.performance) {\n var start = Date.now();\n // only at millisecond precision\n window.performance = {now: function(){ return Date.now() - start }};\n }\n\n // polyfill for requestAnimationFrame\n\n if (!window.requestAnimationFrame) {\n window.requestAnimationFrame = (function() {\n var nativeRaf = window.webkitRequestAnimationFrame ||\n window.mozRequestAnimationFrame;\n\n return nativeRaf ?\n function(callback) {\n return nativeRaf(function() {\n callback(performance.now());\n });\n } :\n function( callback ){\n return window.setTimeout(callback, 1000 / 60);\n };\n })();\n }\n\n if (!window.cancelAnimationFrame) {\n window.cancelAnimationFrame = (function() {\n return window.webkitCancelAnimationFrame ||\n window.mozCancelAnimationFrame ||\n function(id) {\n clearTimeout(id);\n };\n })();\n }\n\n // utility\n\n function createDOM(inTagOrNode, inHTML, inAttrs) {\n var dom = typeof inTagOrNode == 'string' ?\n document.createElement(inTagOrNode) : inTagOrNode.cloneNode(true);\n dom.innerHTML = inHTML;\n if (inAttrs) {\n for (var n in inAttrs) {\n dom.setAttribute(n, inAttrs[n]);\n }\n }\n return dom;\n }\n // Make a stub for Polymer() for polyfill purposes; under the HTMLImports\n // polyfill, scripts in the main document run before imports. That means\n // if (1) polymer is imported and (2) Polymer() is called in the main document\n // in a script after the import, 2 occurs before 1. We correct this here\n // by specfiically patching Polymer(); this is not necessary under native\n // HTMLImports.\n var elementDeclarations = [];\n\n var polymerStub = function(name, dictionary) {\n elementDeclarations.push(arguments);\n }\n window.Polymer = polymerStub;\n\n // deliver queued delcarations\n scope.deliverDeclarations = function() {\n scope.deliverDeclarations = function() {\n throw 'Possible attempt to load Polymer twice';\n };\n return elementDeclarations;\n }\n\n // Once DOMContent has loaded, any main document scripts that depend on\n // Polymer() should have run. Calling Polymer() now is an error until\n // polymer is imported.\n window.addEventListener('DOMContentLoaded', function() {\n if (window.Polymer === polymerStub) {\n window.Polymer = function() {\n console.error('You tried to use polymer without loading it first. To ' +\n 'load polymer, <link rel=\"import\" href=\"' + \n 'components/polymer/polymer.html\">');\n };\n }\n });\n\n // exports\n scope.createDOM = createDOM;\n\n})(window.Platform);\n","/*\n * Copyright (c) 2014 The Polymer Project Authors. All rights reserved.\n * This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt\n * The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt\n * The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt\n * Code distributed by Google as part of the polymer project is also\n * subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt\n */\n\n// poor man's adapter for template.content on various platform scenarios\n(function(scope) {\n scope.templateContent = scope.templateContent || function(inTemplate) {\n return inTemplate.content;\n };\n})(window.Platform);\n","/*\n * Copyright (c) 2014 The Polymer Project Authors. All rights reserved.\n * This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt\n * The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt\n * The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt\n * Code distributed by Google as part of the polymer project is also\n * subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt\n */\n\n(function(scope) {\n \n scope = scope || (window.Inspector = {});\n \n var inspector;\n\n window.sinspect = function(inNode, inProxy) {\n if (!inspector) {\n inspector = window.open('', 'ShadowDOM Inspector', null, true);\n inspector.document.write(inspectorHTML);\n //inspector.document.close();\n inspector.api = {\n shadowize: shadowize\n };\n }\n inspect(inNode || wrap(document.body), inProxy);\n };\n\n var inspectorHTML = [\n '<!DOCTYPE html>',\n '<html>',\n ' <head>',\n ' <title>ShadowDOM Inspector</title>',\n ' <style>',\n ' body {',\n ' }',\n ' pre {',\n ' font: 9pt \"Courier New\", monospace;',\n ' line-height: 1.5em;',\n ' }',\n ' tag {',\n ' color: purple;',\n ' }',\n ' ul {',\n ' margin: 0;',\n ' padding: 0;',\n ' list-style: none;',\n ' }',\n ' li {',\n ' display: inline-block;',\n ' background-color: #f1f1f1;',\n ' padding: 4px 6px;',\n ' border-radius: 4px;',\n ' margin-right: 4px;',\n ' }',\n ' </style>',\n ' </head>',\n ' <body>',\n ' <ul id=\"crumbs\">',\n ' </ul>',\n ' <div id=\"tree\"></div>',\n ' </body>',\n '</html>'\n ].join('\\n');\n \n var crumbs = [];\n\n var displayCrumbs = function() {\n // alias our document\n var d = inspector.document;\n // get crumbbar\n var cb = d.querySelector('#crumbs');\n // clear crumbs\n cb.textContent = '';\n // build new crumbs\n for (var i=0, c; c=crumbs[i]; i++) {\n var a = d.createElement('a');\n a.href = '#';\n a.textContent = c.localName;\n a.idx = i;\n a.onclick = function(event) {\n var c;\n while (crumbs.length > this.idx) {\n c = crumbs.pop();\n }\n inspect(c.shadow || c, c);\n event.preventDefault();\n };\n cb.appendChild(d.createElement('li')).appendChild(a);\n }\n };\n\n var inspect = function(inNode, inProxy) {\n // alias our document\n var d = inspector.document;\n // reset list of drillable nodes\n drillable = [];\n // memoize our crumb proxy\n var proxy = inProxy || inNode;\n crumbs.push(proxy);\n // update crumbs\n displayCrumbs();\n // reflect local tree\n d.body.querySelector('#tree').innerHTML =\n '<pre>' + output(inNode, inNode.childNodes) + '</pre>';\n };\n\n var forEach = Array.prototype.forEach.call.bind(Array.prototype.forEach);\n\n var blacklisted = {STYLE:1, SCRIPT:1, \"#comment\": 1, TEMPLATE: 1};\n var blacklist = function(inNode) {\n return blacklisted[inNode.nodeName];\n };\n\n var output = function(inNode, inChildNodes, inIndent) {\n if (blacklist(inNode)) {\n return '';\n }\n var indent = inIndent || '';\n if (inNode.localName || inNode.nodeType == 11) {\n var name = inNode.localName || 'shadow-root';\n //inChildNodes = ShadowDOM.localNodes(inNode);\n var info = indent + describe(inNode);\n // if only textNodes\n // TODO(sjmiles): make correct for ShadowDOM\n /*if (!inNode.children.length && inNode.localName !== 'content' && inNode.localName !== 'shadow') {\n info += catTextContent(inChildNodes);\n } else*/ {\n // TODO(sjmiles): native <shadow> has no reference to its projection\n if (name == 'content' /*|| name == 'shadow'*/) {\n inChildNodes = inNode.getDistributedNodes();\n }\n info += '<br/>';\n var ind = indent + ' ';\n forEach(inChildNodes, function(n) {\n info += output(n, n.childNodes, ind);\n });\n info += indent;\n }\n if (!({br:1}[name])) {\n info += '<tag></' + name + '></tag>';\n info += '<br/>';\n }\n } else {\n var text = inNode.textContent.trim();\n info = text ? indent + '\"' + text + '\"' + '<br/>' : '';\n }\n return info;\n };\n\n var catTextContent = function(inChildNodes) {\n var info = '';\n forEach(inChildNodes, function(n) {\n info += n.textContent.trim();\n });\n return info;\n };\n\n var drillable = [];\n\n var describe = function(inNode) {\n var tag = '<tag>' + '<';\n var name = inNode.localName || 'shadow-root';\n if (inNode.webkitShadowRoot || inNode.shadowRoot) {\n tag += ' <button idx=\"' + drillable.length +\n '\" onclick=\"api.shadowize.call(this)\">' + name + '</button>';\n drillable.push(inNode);\n } else {\n tag += name || 'shadow-root';\n }\n if (inNode.attributes) {\n forEach(inNode.attributes, function(a) {\n tag += ' ' + a.name + (a.value ? '=\"' + a.value + '\"' : '');\n });\n }\n tag += '>'+ '</tag>';\n return tag;\n };\n\n // remote api\n\n shadowize = function() {\n var idx = Number(this.attributes.idx.value);\n //alert(idx);\n var node = drillable[idx];\n if (node) {\n inspect(node.webkitShadowRoot || node.shadowRoot, node)\n } else {\n console.log(\"bad shadowize node\");\n console.dir(this);\n }\n };\n \n // export\n \n scope.output = output;\n \n})(window.Inspector);\n","/*\n * Copyright (c) 2014 The Polymer Project Authors. All rights reserved.\n * This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt\n * The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt\n * The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt\n * Code distributed by Google as part of the polymer project is also\n * subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt\n */\n\n(function(scope) {\n\n // TODO(sorvell): It's desireable to provide a default stylesheet \n // that's convenient for styling unresolved elements, but\n // it's cumbersome to have to include this manually in every page.\n // It would make sense to put inside some HTMLImport but \n // the HTMLImports polyfill does not allow loading of stylesheets \n // that block rendering. Therefore this injection is tolerated here.\n\n var style = document.createElement('style');\n style.textContent = ''\n + 'body {'\n + 'transition: opacity ease-in 0.2s;' \n + ' } \\n'\n + 'body[unresolved] {'\n + 'opacity: 0; display: block; overflow: hidden;' \n + ' } \\n'\n ;\n var head = document.querySelector('head');\n head.insertBefore(style, head.firstChild);\n\n})(Platform);\n","/*\n * Copyright (c) 2014 The Polymer Project Authors. All rights reserved.\n * This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt\n * The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt\n * The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt\n * Code distributed by Google as part of the polymer project is also\n * subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt\n */\n\n(function(scope) {\n\n function withDependencies(task, depends) {\n depends = depends || [];\n if (!depends.map) {\n depends = [depends];\n }\n return task.apply(this, depends.map(marshal));\n }\n\n function module(name, dependsOrFactory, moduleFactory) {\n var module;\n switch (arguments.length) {\n case 0:\n return;\n case 1:\n module = null;\n break;\n case 2:\n // dependsOrFactory is `factory` in this case\n module = dependsOrFactory.apply(this);\n break;\n default:\n // dependsOrFactory is `depends` in this case\n module = withDependencies(moduleFactory, dependsOrFactory);\n break;\n }\n modules[name] = module;\n };\n\n function marshal(name) {\n return modules[name];\n }\n\n var modules = {};\n\n function using(depends, task) {\n HTMLImports.whenImportsReady(function() {\n withDependencies(task, depends);\n });\n };\n\n // exports\n\n scope.marshal = marshal;\n // `module` confuses commonjs detectors\n scope.modularize = module;\n scope.using = using;\n\n})(window);\n","/*\n * Copyright (c) 2014 The Polymer Project Authors. All rights reserved.\n * This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt\n * The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt\n * The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt\n * Code distributed by Google as part of the polymer project is also\n * subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt\n */\n\n(function(scope) {\n\nvar iterations = 0;\nvar callbacks = [];\nvar twiddle = document.createTextNode('');\n\nfunction endOfMicrotask(callback) {\n twiddle.textContent = iterations++;\n callbacks.push(callback);\n}\n\nfunction atEndOfMicrotask() {\n while (callbacks.length) {\n callbacks.shift()();\n }\n}\n\nnew (window.MutationObserver || JsMutationObserver)(atEndOfMicrotask)\n .observe(twiddle, {characterData: true})\n ;\n\n// exports\n\nscope.endOfMicrotask = endOfMicrotask;\n\n})(Platform);\n\n","/*\n * Copyright (c) 2014 The Polymer Project Authors. All rights reserved.\n * This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt\n * The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt\n * The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt\n * Code distributed by Google as part of the polymer project is also\n * subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt\n */\n\n(function(scope) {\n\nvar urlResolver = {\n resolveDom: function(root, url) {\n url = url || root.ownerDocument.baseURI;\n this.resolveAttributes(root, url);\n this.resolveStyles(root, url);\n // handle template.content\n var templates = root.querySelectorAll('template');\n if (templates) {\n for (var i = 0, l = templates.length, t; (i < l) && (t = templates[i]); i++) {\n if (t.content) {\n this.resolveDom(t.content, url);\n }\n }\n }\n },\n resolveTemplate: function(template) {\n this.resolveDom(template.content, template.ownerDocument.baseURI);\n },\n resolveStyles: function(root, url) {\n var styles = root.querySelectorAll('style');\n if (styles) {\n for (var i = 0, l = styles.length, s; (i < l) && (s = styles[i]); i++) {\n this.resolveStyle(s, url);\n }\n }\n },\n resolveStyle: function(style, url) {\n url = url || style.ownerDocument.baseURI;\n style.textContent = this.resolveCssText(style.textContent, url);\n },\n resolveCssText: function(cssText, baseUrl, keepAbsolute) {\n cssText = replaceUrlsInCssText(cssText, baseUrl, keepAbsolute, CSS_URL_REGEXP);\n return replaceUrlsInCssText(cssText, baseUrl, keepAbsolute, CSS_IMPORT_REGEXP);\n },\n resolveAttributes: function(root, url) {\n if (root.hasAttributes && root.hasAttributes()) {\n this.resolveElementAttributes(root, url);\n }\n // search for attributes that host urls\n var nodes = root && root.querySelectorAll(URL_ATTRS_SELECTOR);\n if (nodes) {\n for (var i = 0, l = nodes.length, n; (i < l) && (n = nodes[i]); i++) {\n this.resolveElementAttributes(n, url);\n }\n }\n },\n resolveElementAttributes: function(node, url) {\n url = url || node.ownerDocument.baseURI;\n URL_ATTRS.forEach(function(v) {\n var attr = node.attributes[v];\n var value = attr && attr.value;\n var replacement;\n if (value && value.search(URL_TEMPLATE_SEARCH) < 0) {\n if (v === 'style') {\n replacement = replaceUrlsInCssText(value, url, false, CSS_URL_REGEXP);\n } else {\n replacement = resolveRelativeUrl(url, value);\n }\n attr.value = replacement;\n }\n });\n }\n};\n\nvar CSS_URL_REGEXP = /(url\\()([^)]*)(\\))/g;\nvar CSS_IMPORT_REGEXP = /(@import[\\s]+(?!url\\())([^;]*)(;)/g;\nvar URL_ATTRS = ['href', 'src', 'action', 'style', 'url'];\nvar URL_ATTRS_SELECTOR = '[' + URL_ATTRS.join('],[') + ']';\nvar URL_TEMPLATE_SEARCH = '{{.*}}';\n\nfunction replaceUrlsInCssText(cssText, baseUrl, keepAbsolute, regexp) {\n return cssText.replace(regexp, function(m, pre, url, post) {\n var urlPath = url.replace(/[\"']/g, '');\n urlPath = resolveRelativeUrl(baseUrl, urlPath, keepAbsolute);\n return pre + '\\'' + urlPath + '\\'' + post;\n });\n}\n\nfunction resolveRelativeUrl(baseUrl, url, keepAbsolute) {\n // do not resolve '/' absolute urls\n if (url && url[0] === '/') {\n return url;\n }\n var u = new URL(url, baseUrl);\n return keepAbsolute ? u.href : makeDocumentRelPath(u.href);\n}\n\nfunction makeDocumentRelPath(url) {\n var root = new URL(document.baseURI);\n var u = new URL(url, root);\n if (u.host === root.host && u.port === root.port &&\n u.protocol === root.protocol) {\n return makeRelPath(root, u);\n } else {\n return url;\n }\n}\n\n// make a relative path from source to target\nfunction makeRelPath(sourceUrl, targetUrl) {\n var source = sourceUrl.pathname;\n var target = targetUrl.pathname;\n var s = source.split('/');\n var t = target.split('/');\n while (s.length && s[0] === t[0]){\n s.shift();\n t.shift();\n }\n for (var i = 0, l = s.length - 1; i < l; i++) {\n t.unshift('..');\n }\n return t.join('/') + targetUrl.search + targetUrl.hash;\n}\n\n// exports\nscope.urlResolver = urlResolver;\n\n})(Platform);\n","/*\n * Copyright 2012 The Polymer Authors. All rights reserved.\n * Use of this source code is goverened by a BSD-style\n * license that can be found in the LICENSE file.\n */\n\n(function(global) {\n\n var registrationsTable = new WeakMap();\n\n // We use setImmediate or postMessage for our future callback.\n var setImmediate = window.msSetImmediate;\n\n // Use post message to emulate setImmediate.\n if (!setImmediate) {\n var setImmediateQueue = [];\n var sentinel = String(Math.random());\n window.addEventListener('message', function(e) {\n if (e.data === sentinel) {\n var queue = setImmediateQueue;\n setImmediateQueue = [];\n queue.forEach(function(func) {\n func();\n });\n }\n });\n setImmediate = function(func) {\n setImmediateQueue.push(func);\n window.postMessage(sentinel, '*');\n };\n }\n\n // This is used to ensure that we never schedule 2 callas to setImmediate\n var isScheduled = false;\n\n // Keep track of observers that needs to be notified next time.\n var scheduledObservers = [];\n\n /**\n * Schedules |dispatchCallback| to be called in the future.\n * @param {MutationObserver} observer\n */\n function scheduleCallback(observer) {\n scheduledObservers.push(observer);\n if (!isScheduled) {\n isScheduled = true;\n setImmediate(dispatchCallbacks);\n }\n }\n\n function wrapIfNeeded(node) {\n return window.ShadowDOMPolyfill &&\n window.ShadowDOMPolyfill.wrapIfNeeded(node) ||\n node;\n }\n\n function dispatchCallbacks() {\n // http://dom.spec.whatwg.org/#mutation-observers\n\n isScheduled = false; // Used to allow a new setImmediate call above.\n\n var observers = scheduledObservers;\n scheduledObservers = [];\n // Sort observers based on their creation UID (incremental).\n observers.sort(function(o1, o2) {\n return o1.uid_ - o2.uid_;\n });\n\n var anyNonEmpty = false;\n observers.forEach(function(observer) {\n\n // 2.1, 2.2\n var queue = observer.takeRecords();\n // 2.3. Remove all transient registered observers whose observer is mo.\n removeTransientObserversFor(observer);\n\n // 2.4\n if (queue.length) {\n observer.callback_(queue, observer);\n anyNonEmpty = true;\n }\n });\n\n // 3.\n if (anyNonEmpty)\n dispatchCallbacks();\n }\n\n function removeTransientObserversFor(observer) {\n observer.nodes_.forEach(function(node) {\n var registrations = registrationsTable.get(node);\n if (!registrations)\n return;\n registrations.forEach(function(registration) {\n if (registration.observer === observer)\n registration.removeTransientObservers();\n });\n });\n }\n\n /**\n * This function is used for the \"For each registered observer observer (with\n * observer's options as options) in target's list of registered observers,\n * run these substeps:\" and the \"For each ancestor ancestor of target, and for\n * each registered observer observer (with options options) in ancestor's list\n * of registered observers, run these substeps:\" part of the algorithms. The\n * |options.subtree| is checked to ensure that the callback is called\n * correctly.\n *\n * @param {Node} target\n * @param {function(MutationObserverInit):MutationRecord} callback\n */\n function forEachAncestorAndObserverEnqueueRecord(target, callback) {\n for (var node = target; node; node = node.parentNode) {\n var registrations = registrationsTable.get(node);\n\n if (registrations) {\n for (var j = 0; j < registrations.length; j++) {\n var registration = registrations[j];\n var options = registration.options;\n\n // Only target ignores subtree.\n if (node !== target && !options.subtree)\n continue;\n\n var record = callback(options);\n if (record)\n registration.enqueue(record);\n }\n }\n }\n }\n\n var uidCounter = 0;\n\n /**\n * The class that maps to the DOM MutationObserver interface.\n * @param {Function} callback.\n * @constructor\n */\n function JsMutationObserver(callback) {\n this.callback_ = callback;\n this.nodes_ = [];\n this.records_ = [];\n this.uid_ = ++uidCounter;\n }\n\n JsMutationObserver.prototype = {\n observe: function(target, options) {\n target = wrapIfNeeded(target);\n\n // 1.1\n if (!options.childList && !options.attributes && !options.characterData ||\n\n // 1.2\n options.attributeOldValue && !options.attributes ||\n\n // 1.3\n options.attributeFilter && options.attributeFilter.length &&\n !options.attributes ||\n\n // 1.4\n options.characterDataOldValue && !options.characterData) {\n\n throw new SyntaxError();\n }\n\n var registrations = registrationsTable.get(target);\n if (!registrations)\n registrationsTable.set(target, registrations = []);\n\n // 2\n // If target's list of registered observers already includes a registered\n // observer associated with the context object, replace that registered\n // observer's options with options.\n var registration;\n for (var i = 0; i < registrations.length; i++) {\n if (registrations[i].observer === this) {\n registration = registrations[i];\n registration.removeListeners();\n registration.options = options;\n break;\n }\n }\n\n // 3.\n // Otherwise, add a new registered observer to target's list of registered\n // observers with the context object as the observer and options as the\n // options, and add target to context object's list of nodes on which it\n // is registered.\n if (!registration) {\n registration = new Registration(this, target, options);\n registrations.push(registration);\n this.nodes_.push(target);\n }\n\n registration.addListeners();\n },\n\n disconnect: function() {\n this.nodes_.forEach(function(node) {\n var registrations = registrationsTable.get(node);\n for (var i = 0; i < registrations.length; i++) {\n var registration = registrations[i];\n if (registration.observer === this) {\n registration.removeListeners();\n registrations.splice(i, 1);\n // Each node can only have one registered observer associated with\n // this observer.\n break;\n }\n }\n }, this);\n this.records_ = [];\n },\n\n takeRecords: function() {\n var copyOfRecords = this.records_;\n this.records_ = [];\n return copyOfRecords;\n }\n };\n\n /**\n * @param {string} type\n * @param {Node} target\n * @constructor\n */\n function MutationRecord(type, target) {\n this.type = type;\n this.target = target;\n this.addedNodes = [];\n this.removedNodes = [];\n this.previousSibling = null;\n this.nextSibling = null;\n this.attributeName = null;\n this.attributeNamespace = null;\n this.oldValue = null;\n }\n\n function copyMutationRecord(original) {\n var record = new MutationRecord(original.type, original.target);\n record.addedNodes = original.addedNodes.slice();\n record.removedNodes = original.removedNodes.slice();\n record.previousSibling = original.previousSibling;\n record.nextSibling = original.nextSibling;\n record.attributeName = original.attributeName;\n record.attributeNamespace = original.attributeNamespace;\n record.oldValue = original.oldValue;\n return record;\n };\n\n // We keep track of the two (possibly one) records used in a single mutation.\n var currentRecord, recordWithOldValue;\n\n /**\n * Creates a record without |oldValue| and caches it as |currentRecord| for\n * later use.\n * @param {string} oldValue\n * @return {MutationRecord}\n */\n function getRecord(type, target) {\n return currentRecord = new MutationRecord(type, target);\n }\n\n /**\n * Gets or creates a record with |oldValue| based in the |currentRecord|\n * @param {string} oldValue\n * @return {MutationRecord}\n */\n function getRecordWithOldValue(oldValue) {\n if (recordWithOldValue)\n return recordWithOldValue;\n recordWithOldValue = copyMutationRecord(currentRecord);\n recordWithOldValue.oldValue = oldValue;\n return recordWithOldValue;\n }\n\n function clearRecords() {\n currentRecord = recordWithOldValue = undefined;\n }\n\n /**\n * @param {MutationRecord} record\n * @return {boolean} Whether the record represents a record from the current\n * mutation event.\n */\n function recordRepresentsCurrentMutation(record) {\n return record === recordWithOldValue || record === currentRecord;\n }\n\n /**\n * Selects which record, if any, to replace the last record in the queue.\n * This returns |null| if no record should be replaced.\n *\n * @param {MutationRecord} lastRecord\n * @param {MutationRecord} newRecord\n * @param {MutationRecord}\n */\n function selectRecord(lastRecord, newRecord) {\n if (lastRecord === newRecord)\n return lastRecord;\n\n // Check if the the record we are adding represents the same record. If\n // so, we keep the one with the oldValue in it.\n if (recordWithOldValue && recordRepresentsCurrentMutation(lastRecord))\n return recordWithOldValue;\n\n return null;\n }\n\n /**\n * Class used to represent a registered observer.\n * @param {MutationObserver} observer\n * @param {Node} target\n * @param {MutationObserverInit} options\n * @constructor\n */\n function Registration(observer, target, options) {\n this.observer = observer;\n this.target = target;\n this.options = options;\n this.transientObservedNodes = [];\n }\n\n Registration.prototype = {\n enqueue: function(record) {\n var records = this.observer.records_;\n var length = records.length;\n\n // There are cases where we replace the last record with the new record.\n // For example if the record represents the same mutation we need to use\n // the one with the oldValue. If we get same record (this can happen as we\n // walk up the tree) we ignore the new record.\n if (records.length > 0) {\n var lastRecord = records[length - 1];\n var recordToReplaceLast = selectRecord(lastRecord, record);\n if (recordToReplaceLast) {\n records[length - 1] = recordToReplaceLast;\n return;\n }\n } else {\n scheduleCallback(this.observer);\n }\n\n records[length] = record;\n },\n\n addListeners: function() {\n this.addListeners_(this.target);\n },\n\n addListeners_: function(node) {\n var options = this.options;\n if (options.attributes)\n node.addEventListener('DOMAttrModified', this, true);\n\n if (options.characterData)\n node.addEventListener('DOMCharacterDataModified', this, true);\n\n if (options.childList)\n node.addEventListener('DOMNodeInserted', this, true);\n\n if (options.childList || options.subtree)\n node.addEventListener('DOMNodeRemoved', this, true);\n },\n\n removeListeners: function() {\n this.removeListeners_(this.target);\n },\n\n removeListeners_: function(node) {\n var options = this.options;\n if (options.attributes)\n node.removeEventListener('DOMAttrModified', this, true);\n\n if (options.characterData)\n node.removeEventListener('DOMCharacterDataModified', this, true);\n\n if (options.childList)\n node.removeEventListener('DOMNodeInserted', this, true);\n\n if (options.childList || options.subtree)\n node.removeEventListener('DOMNodeRemoved', this, true);\n },\n\n /**\n * Adds a transient observer on node. The transient observer gets removed\n * next time we deliver the change records.\n * @param {Node} node\n */\n addTransientObserver: function(node) {\n // Don't add transient observers on the target itself. We already have all\n // the required listeners set up on the target.\n if (node === this.target)\n return;\n\n this.addListeners_(node);\n this.transientObservedNodes.push(node);\n var registrations = registrationsTable.get(node);\n if (!registrations)\n registrationsTable.set(node, registrations = []);\n\n // We know that registrations does not contain this because we already\n // checked if node === this.target.\n registrations.push(this);\n },\n\n removeTransientObservers: function() {\n var transientObservedNodes = this.transientObservedNodes;\n this.transientObservedNodes = [];\n\n transientObservedNodes.forEach(function(node) {\n // Transient observers are never added to the target.\n this.removeListeners_(node);\n\n var registrations = registrationsTable.get(node);\n for (var i = 0; i < registrations.length; i++) {\n if (registrations[i] === this) {\n registrations.splice(i, 1);\n // Each node can only have one registered observer associated with\n // this observer.\n break;\n }\n }\n }, this);\n },\n\n handleEvent: function(e) {\n // Stop propagation since we are managing the propagation manually.\n // This means that other mutation events on the page will not work\n // correctly but that is by design.\n e.stopImmediatePropagation();\n\n switch (e.type) {\n case 'DOMAttrModified':\n // http://dom.spec.whatwg.org/#concept-mo-queue-attributes\n\n var name = e.attrName;\n var namespace = e.relatedNode.namespaceURI;\n var target = e.target;\n\n // 1.\n var record = new getRecord('attributes', target);\n record.attributeName = name;\n record.attributeNamespace = namespace;\n\n // 2.\n var oldValue =\n e.attrChange === MutationEvent.ADDITION ? null : e.prevValue;\n\n forEachAncestorAndObserverEnqueueRecord(target, function(options) {\n // 3.1, 4.2\n if (!options.attributes)\n return;\n\n // 3.2, 4.3\n if (options.attributeFilter && options.attributeFilter.length &&\n options.attributeFilter.indexOf(name) === -1 &&\n options.attributeFilter.indexOf(namespace) === -1) {\n return;\n }\n // 3.3, 4.4\n if (options.attributeOldValue)\n return getRecordWithOldValue(oldValue);\n\n // 3.4, 4.5\n return record;\n });\n\n break;\n\n case 'DOMCharacterDataModified':\n // http://dom.spec.whatwg.org/#concept-mo-queue-characterdata\n var target = e.target;\n\n // 1.\n var record = getRecord('characterData', target);\n\n // 2.\n var oldValue = e.prevValue;\n\n\n forEachAncestorAndObserverEnqueueRecord(target, function(options) {\n // 3.1, 4.2\n if (!options.characterData)\n return;\n\n // 3.2, 4.3\n if (options.characterDataOldValue)\n return getRecordWithOldValue(oldValue);\n\n // 3.3, 4.4\n return record;\n });\n\n break;\n\n case 'DOMNodeRemoved':\n this.addTransientObserver(e.target);\n // Fall through.\n case 'DOMNodeInserted':\n // http://dom.spec.whatwg.org/#concept-mo-queue-childlist\n var target = e.relatedNode;\n var changedNode = e.target;\n var addedNodes, removedNodes;\n if (e.type === 'DOMNodeInserted') {\n addedNodes = [changedNode];\n removedNodes = [];\n } else {\n\n addedNodes = [];\n removedNodes = [changedNode];\n }\n var previousSibling = changedNode.previousSibling;\n var nextSibling = changedNode.nextSibling;\n\n // 1.\n var record = getRecord('childList', target);\n record.addedNodes = addedNodes;\n record.removedNodes = removedNodes;\n record.previousSibling = previousSibling;\n record.nextSibling = nextSibling;\n\n forEachAncestorAndObserverEnqueueRecord(target, function(options) {\n // 2.1, 3.2\n if (!options.childList)\n return;\n\n // 2.2, 3.3\n return record;\n });\n\n }\n\n clearRecords();\n }\n };\n\n global.JsMutationObserver = JsMutationObserver;\n\n if (!global.MutationObserver)\n global.MutationObserver = JsMutationObserver;\n\n\n})(this);\n","/*\n * Copyright 2013 The Polymer Authors. All rights reserved.\n * Use of this source code is governed by a BSD-style\n * license that can be found in the LICENSE file.\n */\nwindow.HTMLImports = window.HTMLImports || {flags:{}};","/*\n * Copyright 2013 The Polymer Authors. All rights reserved.\n * Use of this source code is governed by a BSD-style\n * license that can be found in the LICENSE file.\n */\n\n(function(scope) {\n\n // imports\n var path = scope.path;\n var xhr = scope.xhr;\n var flags = scope.flags;\n\n // TODO(sorvell): this loader supports a dynamic list of urls\n // and an oncomplete callback that is called when the loader is done.\n // The polyfill currently does *not* need this dynamism or the onComplete\n // concept. Because of this, the loader could be simplified quite a bit.\n var Loader = function(onLoad, onComplete) {\n this.cache = {};\n this.onload = onLoad;\n this.oncomplete = onComplete;\n this.inflight = 0;\n this.pending = {};\n };\n\n Loader.prototype = {\n addNodes: function(nodes) {\n // number of transactions to complete\n this.inflight += nodes.length;\n // commence transactions\n for (var i=0, l=nodes.length, n; (i<l) && (n=nodes[i]); i++) {\n this.require(n);\n }\n // anything to do?\n this.checkDone();\n },\n addNode: function(node) {\n // number of transactions to complete\n this.inflight++;\n // commence transactions\n this.require(node);\n // anything to do?\n this.checkDone();\n },\n require: function(elt) {\n var url = elt.src || elt.href;\n // ensure we have a standard url that can be used\n // reliably for deduping.\n // TODO(sjmiles): ad-hoc\n elt.__nodeUrl = url;\n // deduplication\n if (!this.dedupe(url, elt)) {\n // fetch this resource\n this.fetch(url, elt);\n }\n },\n dedupe: function(url, elt) {\n if (this.pending[url]) {\n // add to list of nodes waiting for inUrl\n this.pending[url].push(elt);\n // don't need fetch\n return true;\n }\n var resource;\n if (this.cache[url]) {\n this.onload(url, elt, this.cache[url]);\n // finished this transaction\n this.tail();\n // don't need fetch\n return true;\n }\n // first node waiting for inUrl\n this.pending[url] = [elt];\n // need fetch (not a dupe)\n return false;\n },\n fetch: function(url, elt) {\n flags.load && console.log('fetch', url, elt);\n if (url.match(/^data:/)) {\n // Handle Data URI Scheme\n var pieces = url.split(',');\n var header = pieces[0];\n var body = pieces[1];\n if(header.indexOf(';base64') > -1) {\n body = atob(body);\n } else {\n body = decodeURIComponent(body);\n }\n setTimeout(function() {\n this.receive(url, elt, null, body);\n }.bind(this), 0);\n } else {\n var receiveXhr = function(err, resource, redirectedUrl) {\n this.receive(url, elt, err, resource, redirectedUrl);\n }.bind(this);\n xhr.load(url, receiveXhr);\n // TODO(sorvell): blocked on)\n // https://code.google.com/p/chromium/issues/detail?id=257221\n // xhr'ing for a document makes scripts in imports runnable; otherwise\n // they are not; however, it requires that we have doctype=html in\n // the import which is unacceptable. This is only needed on Chrome\n // to avoid the bug above.\n /*\n if (isDocumentLink(elt)) {\n xhr.loadDocument(url, receiveXhr);\n } else {\n xhr.load(url, receiveXhr);\n }\n */\n }\n },\n receive: function(url, elt, err, resource, redirectedUrl) {\n this.cache[url] = resource;\n var $p = this.pending[url];\n if ( redirectedUrl && redirectedUrl !== url ) {\n this.cache[redirectedUrl] = resource;\n $p = $p.concat(this.pending[redirectedUrl]);\n }\n for (var i=0, l=$p.length, p; (i<l) && (p=$p[i]); i++) {\n //if (!err) {\n // If url was redirected, use the redirected location so paths are\n // calculated relative to that.\n this.onload(redirectedUrl || url, p, resource);\n //}\n this.tail();\n }\n this.pending[url] = null;\n if ( redirectedUrl && redirectedUrl !== url ) {\n this.pending[redirectedUrl] = null;\n }\n },\n tail: function() {\n --this.inflight;\n this.checkDone();\n },\n checkDone: function() {\n if (!this.inflight) {\n this.oncomplete();\n }\n }\n };\n\n xhr = xhr || {\n async: true,\n ok: function(request) {\n return (request.status >= 200 && request.status < 300)\n || (request.status === 304)\n || (request.status === 0);\n },\n load: function(url, next, nextContext) {\n var request = new XMLHttpRequest();\n if (scope.flags.debug || scope.flags.bust) {\n url += '?' + Math.random();\n }\n request.open('GET', url, xhr.async);\n request.addEventListener('readystatechange', function(e) {\n if (request.readyState === 4) {\n // Servers redirecting an import can add a Location header to help us\n // polyfill correctly.\n var locationHeader = request.getResponseHeader(\"Location\");\n var redirectedUrl = null;\n if (locationHeader) {\n var redirectedUrl = (locationHeader.substr( 0, 1 ) === \"/\")\n ? location.origin + locationHeader // Location is a relative path\n : redirectedUrl; // Full path\n }\n next.call(nextContext, !xhr.ok(request) && request,\n request.response || request.responseText, redirectedUrl);\n }\n });\n request.send();\n return request;\n },\n loadDocument: function(url, next, nextContext) {\n this.load(url, next, nextContext).responseType = 'document';\n }\n };\n\n // exports\n scope.xhr = xhr;\n scope.Loader = Loader;\n\n})(window.HTMLImports);\n","/*\n * Copyright 2013 The Polymer Authors. All rights reserved.\n * Use of this source code is governed by a BSD-style\n * license that can be found in the LICENSE file.\n */\n\n(function(scope) {\n\nvar IMPORT_LINK_TYPE = 'import';\nvar flags = scope.flags;\nvar isIe = /Trident/.test(navigator.userAgent);\n// TODO(sorvell): SD polyfill intrusion\nvar mainDoc = window.ShadowDOMPolyfill ? \n window.ShadowDOMPolyfill.wrapIfNeeded(document) : document;\n\n// importParser\n// highlander object to manage parsing of imports\n// parses import related elements\n// and ensures proper parse order\n// parse order is enforced by crawling the tree and monitoring which elements\n// have been parsed; async parsing is also supported.\n\n// highlander object for parsing a document tree\nvar importParser = {\n // parse selectors for main document elements\n documentSelectors: 'link[rel=' + IMPORT_LINK_TYPE + ']',\n // parse selectors for import document elements\n importsSelectors: [\n 'link[rel=' + IMPORT_LINK_TYPE + ']',\n 'link[rel=stylesheet]',\n 'style',\n 'script:not([type])',\n 'script[type=\"text/javascript\"]'\n ].join(','),\n map: {\n link: 'parseLink',\n script: 'parseScript',\n style: 'parseStyle'\n },\n // try to parse the next import in the tree\n parseNext: function() {\n var next = this.nextToParse();\n if (next) {\n this.parse(next);\n }\n },\n parse: function(elt) {\n if (this.isParsed(elt)) {\n flags.parse && console.log('[%s] is already parsed', elt.localName);\n return;\n }\n var fn = this[this.map[elt.localName]];\n if (fn) {\n this.markParsing(elt);\n fn.call(this, elt);\n }\n },\n // only 1 element may be parsed at a time; parsing is async so each\n // parsing implementation must inform the system that parsing is complete\n // via markParsingComplete.\n // To prompt the system to parse the next element, parseNext should then be\n // called.\n // Note, parseNext used to be included at the end of markParsingComplete, but\n // we must not do this so that, for example, we can (1) mark parsing complete \n // then (2) fire an import load event, and then (3) parse the next resource.\n markParsing: function(elt) {\n flags.parse && console.log('parsing', elt);\n this.parsingElement = elt;\n },\n markParsingComplete: function(elt) {\n elt.__importParsed = true;\n if (elt.__importElement) {\n elt.__importElement.__importParsed = true;\n }\n this.parsingElement = null;\n flags.parse && console.log('completed', elt);\n },\n invalidateParse: function(doc) {\n if (doc && doc.__importLink) {\n doc.__importParsed = doc.__importLink.__importParsed = false;\n this.parseSoon();\n }\n },\n parseSoon: function() {\n if (this._parseSoon) {\n cancelAnimationFrame(this._parseDelay);\n }\n var parser = this;\n this._parseSoon = requestAnimationFrame(function() {\n parser.parseNext();\n });\n },\n parseImport: function(elt) {\n // TODO(sorvell): consider if there's a better way to do this;\n // expose an imports parsing hook; this is needed, for example, by the\n // CustomElements polyfill.\n if (HTMLImports.__importsParsingHook) {\n HTMLImports.__importsParsingHook(elt);\n }\n elt.import.__importParsed = true;\n this.markParsingComplete(elt);\n // fire load event\n if (elt.__resource) {\n elt.dispatchEvent(new CustomEvent('load', {bubbles: false})); \n } else {\n elt.dispatchEvent(new CustomEvent('error', {bubbles: false}));\n }\n // TODO(sorvell): workaround for Safari addEventListener not working\n // for elements not in the main document.\n if (elt.__pending) {\n var fn;\n while (elt.__pending.length) {\n fn = elt.__pending.shift();\n if (fn) {\n fn({target: elt});\n }\n }\n }\n this.parseNext();\n },\n parseLink: function(linkElt) {\n if (nodeIsImport(linkElt)) {\n this.parseImport(linkElt);\n } else {\n // make href absolute\n linkElt.href = linkElt.href;\n this.parseGeneric(linkElt);\n }\n },\n parseStyle: function(elt) {\n // TODO(sorvell): style element load event can just not fire so clone styles\n var src = elt;\n elt = cloneStyle(elt);\n elt.__importElement = src;\n this.parseGeneric(elt);\n },\n parseGeneric: function(elt) {\n this.trackElement(elt);\n this.addElementToDocument(elt);\n },\n rootImportForElement: function(elt) {\n var n = elt;\n while (n.ownerDocument.__importLink) {\n n = n.ownerDocument.__importLink;\n }\n return n;\n },\n addElementToDocument: function(elt) {\n var port = this.rootImportForElement(elt.__importElement || elt);\n var l = port.__insertedElements = port.__insertedElements || 0;\n var refNode = port.nextElementSibling;\n for (var i=0; i < l; i++) {\n refNode = refNode && refNode.nextElementSibling;\n }\n port.parentNode.insertBefore(elt, refNode);\n },\n // tracks when a loadable element has loaded\n trackElement: function(elt, callback) {\n var self = this;\n var done = function(e) {\n if (callback) {\n callback(e);\n }\n self.markParsingComplete(elt);\n self.parseNext();\n };\n elt.addEventListener('load', done);\n elt.addEventListener('error', done);\n\n // NOTE: IE does not fire \"load\" event for styles that have already loaded\n // This is in violation of the spec, so we try our hardest to work around it\n if (isIe && elt.localName === 'style') {\n var fakeLoad = false;\n // If there's not @import in the textContent, assume it has loaded\n if (elt.textContent.indexOf('@import') == -1) {\n fakeLoad = true;\n // if we have a sheet, we have been parsed\n } else if (elt.sheet) {\n fakeLoad = true;\n var csr = elt.sheet.cssRules;\n var len = csr ? csr.length : 0;\n // search the rules for @import's\n for (var i = 0, r; (i < len) && (r = csr[i]); i++) {\n if (r.type === CSSRule.IMPORT_RULE) {\n // if every @import has resolved, fake the load\n fakeLoad = fakeLoad && Boolean(r.styleSheet);\n }\n }\n }\n // dispatch a fake load event and continue parsing\n if (fakeLoad) {\n elt.dispatchEvent(new CustomEvent('load', {bubbles: false}));\n }\n }\n },\n // NOTE: execute scripts by injecting them and watching for the load/error\n // event. Inline scripts are handled via dataURL's because browsers tend to\n // provide correct parsing errors in this case. If this has any compatibility\n // issues, we can switch to injecting the inline script with textContent.\n // Scripts with dataURL's do not appear to generate load events and therefore\n // we assume they execute synchronously.\n parseScript: function(scriptElt) {\n var script = document.createElement('script');\n script.__importElement = scriptElt;\n script.src = scriptElt.src ? scriptElt.src : \n generateScriptDataUrl(scriptElt);\n scope.currentScript = scriptElt;\n this.trackElement(script, function(e) {\n script.parentNode.removeChild(script);\n scope.currentScript = null; \n });\n this.addElementToDocument(script);\n },\n // determine the next element in the tree which should be parsed\n nextToParse: function() {\n return !this.parsingElement && this.nextToParseInDoc(mainDoc);\n },\n nextToParseInDoc: function(doc, link) {\n var nodes = doc.querySelectorAll(this.parseSelectorsForNode(doc));\n for (var i=0, l=nodes.length, p=0, n; (i<l) && (n=nodes[i]); i++) {\n if (!this.isParsed(n)) {\n if (this.hasResource(n)) {\n return nodeIsImport(n) ? this.nextToParseInDoc(n.import, n) : n;\n } else {\n return;\n }\n }\n }\n // all nodes have been parsed, ready to parse import, if any\n return link;\n },\n // return the set of parse selectors relevant for this node.\n parseSelectorsForNode: function(node) {\n var doc = node.ownerDocument || node;\n return doc === mainDoc ? this.documentSelectors : this.importsSelectors;\n },\n isParsed: function(node) {\n return node.__importParsed;\n },\n hasResource: function(node) {\n if (nodeIsImport(node) && !node.import) {\n return false;\n }\n return true;\n }\n};\n\nfunction nodeIsImport(elt) {\n return (elt.localName === 'link') && (elt.rel === IMPORT_LINK_TYPE);\n}\n\nfunction generateScriptDataUrl(script) {\n var scriptContent = generateScriptContent(script);\n var b64 = 'data:text/javascript';\n // base64 may be smaller, but does not handle unicode characters\n // attempt base64 first, fall back to escaped text\n try {\n b64 += (';base64,' + btoa(scriptContent));\n } catch(e) {\n b64 += (';charset=utf-8,' + encodeURIComponent(scriptContent));\n }\n return b64;\n}\n\nfunction generateScriptContent(script) {\n return script.textContent + generateSourceMapHint(script);\n}\n\n// calculate source map hint\nfunction generateSourceMapHint(script) {\n var moniker = script.__nodeUrl;\n if (!moniker) {\n moniker = script.ownerDocument.baseURI;\n // there could be more than one script this url\n var tag = '[' + Math.floor((Math.random()+1)*1000) + ']';\n // TODO(sjmiles): Polymer hack, should be pluggable if we need to allow \n // this sort of thing\n var matches = script.textContent.match(/Polymer\\(['\"]([^'\"]*)/);\n tag = matches && matches[1] || tag;\n // tag the moniker\n moniker += '/' + tag + '.js';\n }\n return '\\n//# sourceURL=' + moniker + '\\n';\n}\n\n// style/stylesheet handling\n\n// clone style with proper path resolution for main document\n// NOTE: styles are the only elements that require direct path fixup.\nfunction cloneStyle(style) {\n var clone = style.ownerDocument.createElement('style');\n clone.textContent = style.textContent;\n path.resolveUrlsInStyle(clone);\n return clone;\n}\n\n// path fixup: style elements in imports must be made relative to the main \n// document. We fixup url's in url() and @import.\nvar CSS_URL_REGEXP = /(url\\()([^)]*)(\\))/g;\nvar CSS_IMPORT_REGEXP = /(@import[\\s]+(?!url\\())([^;]*)(;)/g;\n\nvar path = {\n resolveUrlsInStyle: function(style) {\n var doc = style.ownerDocument;\n var resolver = doc.createElement('a');\n style.textContent = this.resolveUrlsInCssText(style.textContent, resolver);\n return style; \n },\n resolveUrlsInCssText: function(cssText, urlObj) {\n var r = this.replaceUrls(cssText, urlObj, CSS_URL_REGEXP);\n r = this.replaceUrls(r, urlObj, CSS_IMPORT_REGEXP);\n return r;\n },\n replaceUrls: function(text, urlObj, regexp) {\n return text.replace(regexp, function(m, pre, url, post) {\n var urlPath = url.replace(/[\"']/g, '');\n urlObj.href = urlPath;\n urlPath = urlObj.href;\n return pre + '\\'' + urlPath + '\\'' + post;\n }); \n }\n}\n\n// exports\nscope.parser = importParser;\nscope.path = path;\nscope.isIE = isIe;\n\n})(HTMLImports);\n","/*\n * Copyright 2013 The Polymer Authors. All rights reserved.\n * Use of this source code is governed by a BSD-style\n * license that can be found in the LICENSE file.\n */\n\n(function(scope) {\n\nvar hasNative = ('import' in document.createElement('link'));\nvar useNative = hasNative;\nvar flags = scope.flags;\nvar IMPORT_LINK_TYPE = 'import';\n\n// TODO(sorvell): SD polyfill intrusion\nvar mainDoc = window.ShadowDOMPolyfill ? \n ShadowDOMPolyfill.wrapIfNeeded(document) : document;\n\nif (!useNative) {\n\n // imports\n var xhr = scope.xhr;\n var Loader = scope.Loader;\n var parser = scope.parser;\n\n // importer\n // highlander object to manage loading of imports\n\n // for any document, importer:\n // - loads any linked import documents (with deduping)\n\n var importer = {\n documents: {},\n // nodes to load in the mian document\n documentPreloadSelectors: 'link[rel=' + IMPORT_LINK_TYPE + ']',\n // nodes to load in imports\n importsPreloadSelectors: [\n 'link[rel=' + IMPORT_LINK_TYPE + ']'\n ].join(','),\n loadNode: function(node) {\n importLoader.addNode(node);\n },\n // load all loadable elements within the parent element\n loadSubtree: function(parent) {\n var nodes = this.marshalNodes(parent);\n // add these nodes to loader's queue\n importLoader.addNodes(nodes);\n },\n marshalNodes: function(parent) {\n // all preloadable nodes in inDocument\n return parent.querySelectorAll(this.loadSelectorsForNode(parent));\n },\n // find the proper set of load selectors for a given node\n loadSelectorsForNode: function(node) {\n var doc = node.ownerDocument || node;\n return doc === mainDoc ? this.documentPreloadSelectors :\n this.importsPreloadSelectors;\n },\n loaded: function(url, elt, resource) {\n flags.load && console.log('loaded', url, elt);\n // store generic resource\n // TODO(sorvell): fails for nodes inside <template>.content\n // see https://code.google.com/p/chromium/issues/detail?id=249381.\n elt.__resource = resource;\n if (isDocumentLink(elt)) {\n var doc = this.documents[url];\n // if we've never seen a document at this url\n if (!doc) {\n // generate an HTMLDocument from data\n doc = makeDocument(resource, url);\n doc.__importLink = elt;\n // TODO(sorvell): we cannot use MO to detect parsed nodes because\n // SD polyfill does not report these as mutations.\n this.bootDocument(doc);\n // cache document\n this.documents[url] = doc;\n }\n // don't store import record until we're actually loaded\n // store document resource\n elt.import = doc;\n }\n parser.parseNext();\n },\n bootDocument: function(doc) {\n this.loadSubtree(doc);\n this.observe(doc);\n parser.parseNext();\n },\n loadedAll: function() {\n parser.parseNext();\n }\n };\n\n // loader singleton\n var importLoader = new Loader(importer.loaded.bind(importer), \n importer.loadedAll.bind(importer));\n\n function isDocumentLink(elt) {\n return isLinkRel(elt, IMPORT_LINK_TYPE);\n }\n\n function isLinkRel(elt, rel) {\n return elt.localName === 'link' && elt.getAttribute('rel') === rel;\n }\n\n function isScript(elt) {\n return elt.localName === 'script';\n }\n\n function makeDocument(resource, url) {\n // create a new HTML document\n var doc = resource;\n if (!(doc instanceof Document)) {\n doc = document.implementation.createHTMLDocument(IMPORT_LINK_TYPE);\n }\n // cache the new document's source url\n doc._URL = url;\n // establish a relative path via <base>\n var base = doc.createElement('base');\n base.setAttribute('href', url);\n // add baseURI support to browsers (IE) that lack it.\n if (!doc.baseURI) {\n doc.baseURI = url;\n }\n // ensure UTF-8 charset\n var meta = doc.createElement('meta');\n meta.setAttribute('charset', 'utf-8');\n\n doc.head.appendChild(meta);\n doc.head.appendChild(base);\n // install HTML last as it may trigger CustomElement upgrades\n // TODO(sjmiles): problem wrt to template boostrapping below,\n // template bootstrapping must (?) come before element upgrade\n // but we cannot bootstrap templates until they are in a document\n // which is too late\n if (!(resource instanceof Document)) {\n // install html\n doc.body.innerHTML = resource;\n }\n // TODO(sorvell): ideally this code is not aware of Template polyfill,\n // but for now the polyfill needs help to bootstrap these templates\n if (window.HTMLTemplateElement && HTMLTemplateElement.bootstrap) {\n HTMLTemplateElement.bootstrap(doc);\n }\n return doc;\n }\n} else {\n // do nothing if using native imports\n var importer = {};\n}\n\n// NOTE: We cannot polyfill document.currentScript because it's not possible\n// both to override and maintain the ability to capture the native value;\n// therefore we choose to expose _currentScript both when native imports\n// and the polyfill are in use.\nvar currentScriptDescriptor = {\n get: function() {\n return HTMLImports.currentScript || document.currentScript;\n },\n configurable: true\n};\n\nObject.defineProperty(document, '_currentScript', currentScriptDescriptor);\nObject.defineProperty(mainDoc, '_currentScript', currentScriptDescriptor);\n\n// Polyfill document.baseURI for browsers without it.\nif (!document.baseURI) {\n var baseURIDescriptor = {\n get: function() {\n return window.location.href;\n },\n configurable: true\n };\n\n Object.defineProperty(document, 'baseURI', baseURIDescriptor);\n Object.defineProperty(mainDoc, 'baseURI', baseURIDescriptor);\n}\n\n// call a callback when all HTMLImports in the document at call (or at least\n// document ready) time have loaded.\n// 1. ensure the document is in a ready state (has dom), then \n// 2. watch for loading of imports and call callback when done\nfunction whenImportsReady(callback, doc) {\n doc = doc || mainDoc;\n // if document is loading, wait and try again\n whenDocumentReady(function() {\n watchImportsLoad(callback, doc);\n }, doc);\n}\n\n// call the callback when the document is in a ready state (has dom)\nvar requiredReadyState = HTMLImports.isIE ? 'complete' : 'interactive';\nvar READY_EVENT = 'readystatechange';\nfunction isDocumentReady(doc) {\n return (doc.readyState === 'complete' ||\n doc.readyState === requiredReadyState);\n}\n\n// call <callback> when we ensure the document is in a ready state\nfunction whenDocumentReady(callback, doc) {\n if (!isDocumentReady(doc)) {\n var checkReady = function() {\n if (doc.readyState === 'complete' || \n doc.readyState === requiredReadyState) {\n doc.removeEventListener(READY_EVENT, checkReady);\n whenDocumentReady(callback, doc);\n }\n }\n doc.addEventListener(READY_EVENT, checkReady);\n } else if (callback) {\n callback();\n }\n}\n\n// call <callback> when we ensure all imports have loaded\nfunction watchImportsLoad(callback, doc) {\n var imports = doc.querySelectorAll('link[rel=import]');\n var loaded = 0, l = imports.length;\n function checkDone(d) { \n if (loaded == l) {\n callback && callback();\n }\n }\n function loadedImport(e) {\n loaded++;\n checkDone();\n }\n if (l) {\n for (var i=0, imp; (i<l) && (imp=imports[i]); i++) {\n if (isImportLoaded(imp)) {\n loadedImport.call(imp);\n } else {\n imp.addEventListener('load', loadedImport);\n imp.addEventListener('error', loadedImport);\n }\n }\n } else {\n checkDone();\n }\n}\n\nfunction isImportLoaded(link) {\n return useNative ? (link.import && (link.import.readyState !== 'loading')) || link.__loaded :\n link.__importParsed;\n}\n\n// TODO(sorvell): install a mutation observer to see if HTMLImports have loaded\n// this is a workaround for https://www.w3.org/Bugs/Public/show_bug.cgi?id=25007\n// and should be removed when this bug is addressed.\nif (useNative) {\n new MutationObserver(function(mxns) {\n for (var i=0, l=mxns.length, m; (i < l) && (m=mxns[i]); i++) {\n if (m.addedNodes) {\n handleImports(m.addedNodes);\n }\n }\n }).observe(document.head, {childList: true});\n\n function handleImports(nodes) {\n for (var i=0, l=nodes.length, n; (i<l) && (n=nodes[i]); i++) {\n if (isImport(n)) {\n handleImport(n); \n }\n }\n }\n\n function isImport(element) {\n return element.localName === 'link' && element.rel === 'import';\n }\n\n function handleImport(element) {\n var loaded = element.import;\n if (loaded) {\n markTargetLoaded({target: element});\n } else {\n element.addEventListener('load', markTargetLoaded);\n element.addEventListener('error', markTargetLoaded);\n }\n }\n\n function markTargetLoaded(event) {\n event.target.__loaded = true;\n }\n\n}\n\n// exports\nscope.hasNative = hasNative;\nscope.useNative = useNative;\nscope.importer = importer;\nscope.IMPORT_LINK_TYPE = IMPORT_LINK_TYPE;\nscope.isImportLoaded = isImportLoaded;\nscope.importLoader = importLoader;\nscope.whenReady = whenImportsReady;\n\n// deprecated\nscope.whenImportsReady = whenImportsReady;\n\n})(window.HTMLImports);\n"," /*\nCopyright 2013 The Polymer Authors. All rights reserved.\nUse of this source code is governed by a BSD-style\nlicense that can be found in the LICENSE file.\n*/\n\n(function(scope){\n\nvar IMPORT_LINK_TYPE = scope.IMPORT_LINK_TYPE;\nvar importSelector = 'link[rel=' + IMPORT_LINK_TYPE + ']';\nvar importer = scope.importer;\nvar parser = scope.parser;\n\n// we track mutations for addedNodes, looking for imports\nfunction handler(mutations) {\n for (var i=0, l=mutations.length, m; (i<l) && (m=mutations[i]); i++) {\n if (m.type === 'childList' && m.addedNodes.length) {\n addedNodes(m.addedNodes);\n }\n }\n}\n\n// find loadable elements and add them to the importer\nfunction addedNodes(nodes) {\n var owner;\n for (var i=0, l=nodes.length, n; (i<l) && (n=nodes[i]); i++) {\n owner = owner || n.ownerDocument;\n if (shouldLoadNode(n)) {\n importer.loadNode(n);\n }\n if (n.children && n.children.length) {\n addedNodes(n.children);\n }\n }\n // TODO(sorvell): This is not the right approach here. We shouldn't need to\n // invalidate parsing when an element is added. Disabling this code \n // until a better approach is found.\n /*\n if (owner) {\n parser.invalidateParse(owner);\n }\n */\n}\n\nfunction shouldLoadNode(node) {\n return (node.nodeType === 1) && matches.call(node,\n importer.loadSelectorsForNode(node));\n}\n\n// x-plat matches\nvar matches = HTMLElement.prototype.matches || \n HTMLElement.prototype.matchesSelector || \n HTMLElement.prototype.webkitMatchesSelector ||\n HTMLElement.prototype.mozMatchesSelector ||\n HTMLElement.prototype.msMatchesSelector;\n\nvar observer = new MutationObserver(handler);\n\n// observe the given root for loadable elements\nfunction observe(root) {\n observer.observe(root, {childList: true, subtree: true});\n}\n\n// exports\n// TODO(sorvell): factor so can put on scope\nscope.observe = observe;\nimporter.observe = observe;\n\n})(HTMLImports);\n","/*\n * Copyright 2013 The Polymer Authors. All rights reserved.\n * Use of this source code is governed by a BSD-style\n * license that can be found in the LICENSE file.\n */\n(function(){\n\n// bootstrap\n\n// IE shim for CustomEvent\nif (typeof window.CustomEvent !== 'function') {\n window.CustomEvent = function(inType, dictionary) {\n var e = document.createEvent('HTMLEvents');\n e.initEvent(inType,\n dictionary.bubbles === false ? false : true,\n dictionary.cancelable === false ? false : true,\n dictionary.detail);\n return e;\n };\n}\n\n// TODO(sorvell): SD polyfill intrusion\nvar doc = window.ShadowDOMPolyfill ? \n window.ShadowDOMPolyfill.wrapIfNeeded(document) : document;\n\n// Fire the 'HTMLImportsLoaded' event when imports in document at load time \n// have loaded. This event is required to simulate the script blocking \n// behavior of native imports. A main document script that needs to be sure\n// imports have loaded should wait for this event.\nHTMLImports.whenImportsReady(function() {\n HTMLImports.ready = true;\n HTMLImports.readyTime = new Date().getTime();\n doc.dispatchEvent(\n new CustomEvent('HTMLImportsLoaded', {bubbles: true})\n );\n});\n\n\n// no need to bootstrap the polyfill when native imports is available.\nif (!HTMLImports.useNative) {\n function bootstrap() {\n HTMLImports.importer.bootDocument(doc);\n }\n \n // TODO(sorvell): SD polyfill does *not* generate mutations for nodes added\n // by the parser. For this reason, we must wait until the dom exists to \n // bootstrap.\n if (document.readyState === 'complete' ||\n (document.readyState === 'interactive' && !window.attachEvent)) {\n bootstrap();\n } else {\n document.addEventListener('DOMContentLoaded', bootstrap);\n }\n}\n\n})();\n","/*\n * Copyright (c) 2014 The Polymer Project Authors. All rights reserved.\n * This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt\n * The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt\n * The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt\n * Code distributed by Google as part of the polymer project is also\n * subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt\n */\nwindow.CustomElements = window.CustomElements || {flags:{}};","/*\r\n * Copyright (c) 2014 The Polymer Project Authors. All rights reserved.\r\n * This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt\r\n * The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt\r\n * The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt\r\n * Code distributed by Google as part of the polymer project is also\r\n * subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt\r\n */\r\n\r\n(function(scope){\r\n\r\nvar logFlags = window.logFlags || {};\r\nvar IMPORT_LINK_TYPE = window.HTMLImports ? HTMLImports.IMPORT_LINK_TYPE : 'none';\r\n\r\n// walk the subtree rooted at node, applying 'find(element, data)' function\r\n// to each element\r\n// if 'find' returns true for 'element', do not search element's subtree\r\nfunction findAll(node, find, data) {\r\n var e = node.firstElementChild;\r\n if (!e) {\r\n e = node.firstChild;\r\n while (e && e.nodeType !== Node.ELEMENT_NODE) {\r\n e = e.nextSibling;\r\n }\r\n }\r\n while (e) {\r\n if (find(e, data) !== true) {\r\n findAll(e, find, data);\r\n }\r\n e = e.nextElementSibling;\r\n }\r\n return null;\r\n}\r\n\r\n// walk all shadowRoots on a given node.\r\nfunction forRoots(node, cb) {\r\n var root = node.shadowRoot;\r\n while(root) {\r\n forSubtree(root, cb);\r\n root = root.olderShadowRoot;\r\n }\r\n}\r\n\r\n// walk the subtree rooted at node, including descent into shadow-roots,\r\n// applying 'cb' to each element\r\nfunction forSubtree(node, cb) {\r\n //logFlags.dom && node.childNodes && node.childNodes.length && console.group('subTree: ', node);\r\n findAll(node, function(e) {\r\n if (cb(e)) {\r\n return true;\r\n }\r\n forRoots(e, cb);\r\n });\r\n forRoots(node, cb);\r\n //logFlags.dom && node.childNodes && node.childNodes.length && console.groupEnd();\r\n}\r\n\r\n// manage lifecycle on added node\r\nfunction added(node) {\r\n if (upgrade(node)) {\r\n insertedNode(node);\r\n return true;\r\n }\r\n inserted(node);\r\n}\r\n\r\n// manage lifecycle on added node's subtree only\r\nfunction addedSubtree(node) {\r\n forSubtree(node, function(e) {\r\n if (added(e)) {\r\n return true;\r\n }\r\n });\r\n}\r\n\r\n// manage lifecycle on added node and it's subtree\r\nfunction addedNode(node) {\r\n return added(node) || addedSubtree(node);\r\n}\r\n\r\n// upgrade custom elements at node, if applicable\r\nfunction upgrade(node) {\r\n if (!node.__upgraded__ && node.nodeType === Node.ELEMENT_NODE) {\r\n var type = node.getAttribute('is') || node.localName;\r\n var definition = scope.registry[type];\r\n if (definition) {\r\n logFlags.dom && console.group('upgrade:', node.localName);\r\n scope.upgrade(node);\r\n logFlags.dom && console.groupEnd();\r\n return true;\r\n }\r\n }\r\n}\r\n\r\nfunction insertedNode(node) {\r\n inserted(node);\r\n if (inDocument(node)) {\r\n forSubtree(node, function(e) {\r\n inserted(e);\r\n });\r\n }\r\n}\r\n\r\n// TODO(sorvell): on platforms without MutationObserver, mutations may not be\r\n// reliable and therefore attached/detached are not reliable.\r\n// To make these callbacks less likely to fail, we defer all inserts and removes\r\n// to give a chance for elements to be inserted into dom.\r\n// This ensures attachedCallback fires for elements that are created and\r\n// immediately added to dom.\r\nvar hasPolyfillMutations = (!window.MutationObserver ||\r\n (window.MutationObserver === window.JsMutationObserver));\r\nscope.hasPolyfillMutations = hasPolyfillMutations;\r\n\r\nvar isPendingMutations = false;\r\nvar pendingMutations = [];\r\nfunction deferMutation(fn) {\r\n pendingMutations.push(fn);\r\n if (!isPendingMutations) {\r\n isPendingMutations = true;\r\n var async = (window.Platform && window.Platform.endOfMicrotask) ||\r\n setTimeout;\r\n async(takeMutations);\r\n }\r\n}\r\n\r\nfunction takeMutations() {\r\n isPendingMutations = false;\r\n var $p = pendingMutations;\r\n for (var i=0, l=$p.length, p; (i<l) && (p=$p[i]); i++) {\r\n p();\r\n }\r\n pendingMutations = [];\r\n}\r\n\r\nfunction inserted(element) {\r\n if (hasPolyfillMutations) {\r\n deferMutation(function() {\r\n _inserted(element);\r\n });\r\n } else {\r\n _inserted(element);\r\n }\r\n}\r\n\r\n// TODO(sjmiles): if there are descents into trees that can never have inDocument(*) true, fix this\r\nfunction _inserted(element) {\r\n // TODO(sjmiles): it's possible we were inserted and removed in the space\r\n // of one microtask, in which case we won't be 'inDocument' here\r\n // But there are other cases where we are testing for inserted without\r\n // specific knowledge of mutations, and must test 'inDocument' to determine\r\n // whether to call inserted\r\n // If we can factor these cases into separate code paths we can have\r\n // better diagnostics.\r\n // TODO(sjmiles): when logging, do work on all custom elements so we can\r\n // track behavior even when callbacks not defined\r\n //console.log('inserted: ', element.localName);\r\n if (element.attachedCallback || element.detachedCallback || (element.__upgraded__ && logFlags.dom)) {\r\n logFlags.dom && console.group('inserted:', element.localName);\r\n if (inDocument(element)) {\r\n element.__inserted = (element.__inserted || 0) + 1;\r\n // if we are in a 'removed' state, bluntly adjust to an 'inserted' state\r\n if (element.__inserted < 1) {\r\n element.__inserted = 1;\r\n }\r\n // if we are 'over inserted', squelch the callback\r\n if (element.__inserted > 1) {\r\n logFlags.dom && console.warn('inserted:', element.localName,\r\n 'insert/remove count:', element.__inserted)\r\n } else if (element.attachedCallback) {\r\n logFlags.dom && console.log('inserted:', element.localName);\r\n element.attachedCallback();\r\n }\r\n }\r\n logFlags.dom && console.groupEnd();\r\n }\r\n}\r\n\r\nfunction removedNode(node) {\r\n removed(node);\r\n forSubtree(node, function(e) {\r\n removed(e);\r\n });\r\n}\r\n\r\nfunction removed(element) {\r\n if (hasPolyfillMutations) {\r\n deferMutation(function() {\r\n _removed(element);\r\n });\r\n } else {\r\n _removed(element);\r\n }\r\n}\r\n\r\nfunction _removed(element) {\r\n // TODO(sjmiles): temporary: do work on all custom elements so we can track\r\n // behavior even when callbacks not defined\r\n if (element.attachedCallback || element.detachedCallback || (element.__upgraded__ && logFlags.dom)) {\r\n logFlags.dom && console.group('removed:', element.localName);\r\n if (!inDocument(element)) {\r\n element.__inserted = (element.__inserted || 0) - 1;\r\n // if we are in a 'inserted' state, bluntly adjust to an 'removed' state\r\n if (element.__inserted > 0) {\r\n element.__inserted = 0;\r\n }\r\n // if we are 'over removed', squelch the callback\r\n if (element.__inserted < 0) {\r\n logFlags.dom && console.warn('removed:', element.localName,\r\n 'insert/remove count:', element.__inserted)\r\n } else if (element.detachedCallback) {\r\n element.detachedCallback();\r\n }\r\n }\r\n logFlags.dom && console.groupEnd();\r\n }\r\n}\r\n\r\n// SD polyfill intrustion due mainly to the fact that 'document'\r\n// is not entirely wrapped\r\nfunction wrapIfNeeded(node) {\r\n return window.ShadowDOMPolyfill ? ShadowDOMPolyfill.wrapIfNeeded(node)\r\n : node;\r\n}\r\n\r\nfunction inDocument(element) {\r\n var p = element;\r\n var doc = wrapIfNeeded(document);\r\n while (p) {\r\n if (p == doc) {\r\n return true;\r\n }\r\n p = p.parentNode || p.host;\r\n }\r\n}\r\n\r\nfunction watchShadow(node) {\r\n if (node.shadowRoot && !node.shadowRoot.__watched) {\r\n logFlags.dom && console.log('watching shadow-root for: ', node.localName);\r\n // watch all unwatched roots...\r\n var root = node.shadowRoot;\r\n while (root) {\r\n watchRoot(root);\r\n root = root.olderShadowRoot;\r\n }\r\n }\r\n}\r\n\r\nfunction watchRoot(root) {\r\n if (!root.__watched) {\r\n observe(root);\r\n root.__watched = true;\r\n }\r\n}\r\n\r\nfunction handler(mutations) {\r\n //\r\n if (logFlags.dom) {\r\n var mx = mutations[0];\r\n if (mx && mx.type === 'childList' && mx.addedNodes) {\r\n if (mx.addedNodes) {\r\n var d = mx.addedNodes[0];\r\n while (d && d !== document && !d.host) {\r\n d = d.parentNode;\r\n }\r\n var u = d && (d.URL || d._URL || (d.host && d.host.localName)) || '';\r\n u = u.split('/?').shift().split('/').pop();\r\n }\r\n }\r\n console.group('mutations (%d) [%s]', mutations.length, u || '');\r\n }\r\n //\r\n mutations.forEach(function(mx) {\r\n //logFlags.dom && console.group('mutation');\r\n if (mx.type === 'childList') {\r\n forEach(mx.addedNodes, function(n) {\r\n //logFlags.dom && console.log(n.localName);\r\n if (!n.localName) {\r\n return;\r\n }\r\n // nodes added may need lifecycle management\r\n addedNode(n);\r\n });\r\n // removed nodes may need lifecycle management\r\n forEach(mx.removedNodes, function(n) {\r\n //logFlags.dom && console.log(n.localName);\r\n if (!n.localName) {\r\n return;\r\n }\r\n removedNode(n);\r\n });\r\n }\r\n //logFlags.dom && console.groupEnd();\r\n });\r\n logFlags.dom && console.groupEnd();\r\n};\r\n\r\nvar observer = new MutationObserver(handler);\r\n\r\nfunction takeRecords() {\r\n // TODO(sjmiles): ask Raf why we have to call handler ourselves\r\n handler(observer.takeRecords());\r\n takeMutations();\r\n}\r\n\r\nvar forEach = Array.prototype.forEach.call.bind(Array.prototype.forEach);\r\n\r\nfunction observe(inRoot) {\r\n observer.observe(inRoot, {childList: true, subtree: true});\r\n}\r\n\r\nfunction observeDocument(doc) {\r\n observe(doc);\r\n}\r\n\r\nfunction upgradeDocument(doc) {\r\n logFlags.dom && console.group('upgradeDocument: ', (doc.baseURI).split('/').pop());\r\n addedNode(doc);\r\n logFlags.dom && console.groupEnd();\r\n}\r\n\r\nfunction upgradeDocumentTree(doc) {\r\n doc = wrapIfNeeded(doc);\r\n //console.log('upgradeDocumentTree: ', (doc.baseURI).split('/').pop());\r\n // upgrade contained imported documents\r\n var imports = doc.querySelectorAll('link[rel=' + IMPORT_LINK_TYPE + ']');\r\n for (var i=0, l=imports.length, n; (i<l) && (n=imports[i]); i++) {\r\n if (n.import && n.import.__parsed) {\r\n upgradeDocumentTree(n.import);\r\n }\r\n }\r\n upgradeDocument(doc);\r\n}\r\n\r\n// exports\r\nscope.IMPORT_LINK_TYPE = IMPORT_LINK_TYPE;\r\nscope.watchShadow = watchShadow;\r\nscope.upgradeDocumentTree = upgradeDocumentTree;\r\nscope.upgradeAll = addedNode;\r\nscope.upgradeSubtree = addedSubtree;\r\nscope.insertedNode = insertedNode;\r\n\r\nscope.observeDocument = observeDocument;\r\nscope.upgradeDocument = upgradeDocument;\r\n\r\nscope.takeRecords = takeRecords;\r\n\r\n})(window.CustomElements);\r\n","/*\n * Copyright (c) 2014 The Polymer Project Authors. All rights reserved.\n * This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt\n * The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt\n * The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt\n * Code distributed by Google as part of the polymer project is also\n * subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt\n */\n\n/**\n * Implements `document.registerElement`\n * @module CustomElements\n*/\n\n/**\n * Polyfilled extensions to the `document` object.\n * @class Document\n*/\n\n(function(scope) {\n\n// imports\n\nif (!scope) {\n scope = window.CustomElements = {flags:{}};\n}\nvar flags = scope.flags;\n\n// native document.registerElement?\n\nvar hasNative = Boolean(document.registerElement);\n// For consistent timing, use native custom elements only when not polyfilling\n// other key related web components features.\nvar useNative = !flags.register && hasNative && !window.ShadowDOMPolyfill && (!window.HTMLImports || HTMLImports.useNative);\n\nif (useNative) {\n\n // stub\n var nop = function() {};\n\n // exports\n scope.registry = {};\n scope.upgradeElement = nop;\n\n scope.watchShadow = nop;\n scope.upgrade = nop;\n scope.upgradeAll = nop;\n scope.upgradeSubtree = nop;\n scope.observeDocument = nop;\n scope.upgradeDocument = nop;\n scope.upgradeDocumentTree = nop;\n scope.takeRecords = nop;\n scope.reservedTagList = [];\n\n} else {\n\n /**\n * Registers a custom tag name with the document.\n *\n * When a registered element is created, a `readyCallback` method is called\n * in the scope of the element. The `readyCallback` method can be specified on\n * either `options.prototype` or `options.lifecycle` with the latter taking\n * precedence.\n *\n * @method register\n * @param {String} name The tag name to register. Must include a dash ('-'),\n * for example 'x-component'.\n * @param {Object} options\n * @param {String} [options.extends]\n * (_off spec_) Tag name of an element to extend (or blank for a new\n * element). This parameter is not part of the specification, but instead\n * is a hint for the polyfill because the extendee is difficult to infer.\n * Remember that the input prototype must chain to the extended element's\n * prototype (or HTMLElement.prototype) regardless of the value of\n * `extends`.\n * @param {Object} options.prototype The prototype to use for the new\n * element. The prototype must inherit from HTMLElement.\n * @param {Object} [options.lifecycle]\n * Callbacks that fire at important phases in the life of the custom\n * element.\n *\n * @example\n * FancyButton = document.registerElement(\"fancy-button\", {\n * extends: 'button',\n * prototype: Object.create(HTMLButtonElement.prototype, {\n * readyCallback: {\n * value: function() {\n * console.log(\"a fancy-button was created\",\n * }\n * }\n * })\n * });\n * @return {Function} Constructor for the newly registered type.\n */\n function register(name, options) {\n //console.warn('document.registerElement(\"' + name + '\", ', options, ')');\n // construct a defintion out of options\n // TODO(sjmiles): probably should clone options instead of mutating it\n var definition = options || {};\n if (!name) {\n // TODO(sjmiles): replace with more appropriate error (EricB can probably\n // offer guidance)\n throw new Error('document.registerElement: first argument `name` must not be empty');\n }\n if (name.indexOf('-') < 0) {\n // TODO(sjmiles): replace with more appropriate error (EricB can probably\n // offer guidance)\n throw new Error('document.registerElement: first argument (\\'name\\') must contain a dash (\\'-\\'). Argument provided was \\'' + String(name) + '\\'.');\n }\n // prevent registering reserved names\n if (isReservedTag(name)) {\n throw new Error('Failed to execute \\'registerElement\\' on \\'Document\\': Registration failed for type \\'' + String(name) + '\\'. The type name is invalid.');\n }\n // elements may only be registered once\n if (getRegisteredDefinition(name)) {\n throw new Error('DuplicateDefinitionError: a type with name \\'' + String(name) + '\\' is already registered');\n }\n // must have a prototype, default to an extension of HTMLElement\n // TODO(sjmiles): probably should throw if no prototype, check spec\n if (!definition.prototype) {\n // TODO(sjmiles): replace with more appropriate error (EricB can probably\n // offer guidance)\n throw new Error('Options missing required prototype property');\n }\n // record name\n definition.__name = name.toLowerCase();\n // ensure a lifecycle object so we don't have to null test it\n definition.lifecycle = definition.lifecycle || {};\n // build a list of ancestral custom elements (for native base detection)\n // TODO(sjmiles): we used to need to store this, but current code only\n // uses it in 'resolveTagName': it should probably be inlined\n definition.ancestry = ancestry(definition.extends);\n // extensions of native specializations of HTMLElement require localName\n // to remain native, and use secondary 'is' specifier for extension type\n resolveTagName(definition);\n // some platforms require modifications to the user-supplied prototype\n // chain\n resolvePrototypeChain(definition);\n // overrides to implement attributeChanged callback\n overrideAttributeApi(definition.prototype);\n // 7.1.5: Register the DEFINITION with DOCUMENT\n registerDefinition(definition.__name, definition);\n // 7.1.7. Run custom element constructor generation algorithm with PROTOTYPE\n // 7.1.8. Return the output of the previous step.\n definition.ctor = generateConstructor(definition);\n definition.ctor.prototype = definition.prototype;\n // force our .constructor to be our actual constructor\n definition.prototype.constructor = definition.ctor;\n // if initial parsing is complete\n if (scope.ready) {\n // upgrade any pre-existing nodes of this type\n scope.upgradeDocumentTree(document);\n }\n return definition.ctor;\n }\n\n function isReservedTag(name) {\n for (var i = 0; i < reservedTagList.length; i++) {\n if (name === reservedTagList[i]) {\n return true;\n }\n }\n }\n\n var reservedTagList = [\n 'annotation-xml', 'color-profile', 'font-face', 'font-face-src',\n 'font-face-uri', 'font-face-format', 'font-face-name', 'missing-glyph'\n ];\n\n function ancestry(extnds) {\n var extendee = getRegisteredDefinition(extnds);\n if (extendee) {\n return ancestry(extendee.extends).concat([extendee]);\n }\n return [];\n }\n\n function resolveTagName(definition) {\n // if we are explicitly extending something, that thing is our\n // baseTag, unless it represents a custom component\n var baseTag = definition.extends;\n // if our ancestry includes custom components, we only have a\n // baseTag if one of them does\n for (var i=0, a; (a=definition.ancestry[i]); i++) {\n baseTag = a.is && a.tag;\n }\n // our tag is our baseTag, if it exists, and otherwise just our name\n definition.tag = baseTag || definition.__name;\n if (baseTag) {\n // if there is a base tag, use secondary 'is' specifier\n definition.is = definition.__name;\n }\n }\n\n function resolvePrototypeChain(definition) {\n // if we don't support __proto__ we need to locate the native level\n // prototype for precise mixing in\n if (!Object.__proto__) {\n // default prototype\n var nativePrototype = HTMLElement.prototype;\n // work out prototype when using type-extension\n if (definition.is) {\n var inst = document.createElement(definition.tag);\n var expectedPrototype = Object.getPrototypeOf(inst);\n // only set nativePrototype if it will actually appear in the definition's chain\n if (expectedPrototype === definition.prototype) {\n nativePrototype = expectedPrototype;\n }\n }\n // ensure __proto__ reference is installed at each point on the prototype\n // chain.\n // NOTE: On platforms without __proto__, a mixin strategy is used instead\n // of prototype swizzling. In this case, this generated __proto__ provides\n // limited support for prototype traversal.\n var proto = definition.prototype, ancestor;\n while (proto && (proto !== nativePrototype)) {\n ancestor = Object.getPrototypeOf(proto);\n proto.__proto__ = ancestor;\n proto = ancestor;\n }\n // cache this in case of mixin\n definition.native = nativePrototype;\n }\n }\n\n // SECTION 4\n\n function instantiate(definition) {\n // 4.a.1. Create a new object that implements PROTOTYPE\n // 4.a.2. Let ELEMENT by this new object\n //\n // the custom element instantiation algorithm must also ensure that the\n // output is a valid DOM element with the proper wrapper in place.\n //\n return upgrade(domCreateElement(definition.tag), definition);\n }\n\n function upgrade(element, definition) {\n // some definitions specify an 'is' attribute\n if (definition.is) {\n element.setAttribute('is', definition.is);\n }\n // make 'element' implement definition.prototype\n implement(element, definition);\n // flag as upgraded\n element.__upgraded__ = true;\n // lifecycle management\n created(element);\n // attachedCallback fires in tree order, call before recursing\n scope.insertedNode(element);\n // there should never be a shadow root on element at this point\n scope.upgradeSubtree(element);\n // OUTPUT\n return element;\n }\n\n function implement(element, definition) {\n // prototype swizzling is best\n if (Object.__proto__) {\n element.__proto__ = definition.prototype;\n } else {\n // where above we can re-acquire inPrototype via\n // getPrototypeOf(Element), we cannot do so when\n // we use mixin, so we install a magic reference\n customMixin(element, definition.prototype, definition.native);\n element.__proto__ = definition.prototype;\n }\n }\n\n function customMixin(inTarget, inSrc, inNative) {\n // TODO(sjmiles): 'used' allows us to only copy the 'youngest' version of\n // any property. This set should be precalculated. We also need to\n // consider this for supporting 'super'.\n var used = {};\n // start with inSrc\n var p = inSrc;\n // The default is HTMLElement.prototype, so we add a test to avoid mixing in\n // native prototypes\n while (p !== inNative && p !== HTMLElement.prototype) {\n var keys = Object.getOwnPropertyNames(p);\n for (var i=0, k; k=keys[i]; i++) {\n if (!used[k]) {\n Object.defineProperty(inTarget, k,\n Object.getOwnPropertyDescriptor(p, k));\n used[k] = 1;\n }\n }\n p = Object.getPrototypeOf(p);\n }\n }\n\n function created(element) {\n // invoke createdCallback\n if (element.createdCallback) {\n element.createdCallback();\n }\n }\n\n // attribute watching\n\n function overrideAttributeApi(prototype) {\n // overrides to implement callbacks\n // TODO(sjmiles): should support access via .attributes NamedNodeMap\n // TODO(sjmiles): preserves user defined overrides, if any\n if (prototype.setAttribute._polyfilled) {\n return;\n }\n var setAttribute = prototype.setAttribute;\n prototype.setAttribute = function(name, value) {\n changeAttribute.call(this, name, value, setAttribute);\n }\n var removeAttribute = prototype.removeAttribute;\n prototype.removeAttribute = function(name) {\n changeAttribute.call(this, name, null, removeAttribute);\n }\n prototype.setAttribute._polyfilled = true;\n }\n\n // https://dvcs.w3.org/hg/webcomponents/raw-file/tip/spec/custom/\n // index.html#dfn-attribute-changed-callback\n function changeAttribute(name, value, operation) {\n name = name.toLowerCase();\n var oldValue = this.getAttribute(name);\n operation.apply(this, arguments);\n var newValue = this.getAttribute(name);\n if (this.attributeChangedCallback\n && (newValue !== oldValue)) {\n this.attributeChangedCallback(name, oldValue, newValue);\n }\n }\n\n // element registry (maps tag names to definitions)\n\n var registry = {};\n\n function getRegisteredDefinition(name) {\n if (name) {\n return registry[name.toLowerCase()];\n }\n }\n\n function registerDefinition(name, definition) {\n registry[name] = definition;\n }\n\n function generateConstructor(definition) {\n return function() {\n return instantiate(definition);\n };\n }\n\n var HTML_NAMESPACE = 'http://www.w3.org/1999/xhtml';\n function createElementNS(namespace, tag, typeExtension) {\n // NOTE: we do not support non-HTML elements,\n // just call createElementNS for non HTML Elements\n if (namespace === HTML_NAMESPACE) {\n return createElement(tag, typeExtension);\n } else {\n return domCreateElementNS(namespace, tag);\n }\n }\n\n function createElement(tag, typeExtension) {\n // TODO(sjmiles): ignore 'tag' when using 'typeExtension', we could\n // error check it, or perhaps there should only ever be one argument\n var definition = getRegisteredDefinition(typeExtension || tag);\n if (definition) {\n if (tag == definition.tag && typeExtension == definition.is) {\n return new definition.ctor();\n }\n // Handle empty string for type extension.\n if (!typeExtension && !definition.is) {\n return new definition.ctor();\n }\n }\n\n if (typeExtension) {\n var element = createElement(tag);\n element.setAttribute('is', typeExtension);\n return element;\n }\n var element = domCreateElement(tag);\n // Custom tags should be HTMLElements even if not upgraded.\n if (tag.indexOf('-') >= 0) {\n implement(element, HTMLElement);\n }\n return element;\n }\n\n function upgradeElement(element) {\n if (!element.__upgraded__ && (element.nodeType === Node.ELEMENT_NODE)) {\n var is = element.getAttribute('is');\n var definition = getRegisteredDefinition(is || element.localName);\n if (definition) {\n if (is && definition.tag == element.localName) {\n return upgrade(element, definition);\n } else if (!is && !definition.extends) {\n return upgrade(element, definition);\n }\n }\n }\n }\n\n function cloneNode(deep) {\n // call original clone\n var n = domCloneNode.call(this, deep);\n // upgrade the element and subtree\n scope.upgradeAll(n);\n // return the clone\n return n;\n }\n // capture native createElement before we override it\n\n var domCreateElement = document.createElement.bind(document);\n var domCreateElementNS = document.createElementNS.bind(document);\n\n // capture native cloneNode before we override it\n\n var domCloneNode = Node.prototype.cloneNode;\n\n // exports\n\n document.registerElement = register;\n document.createElement = createElement; // override\n document.createElementNS = createElementNS; // override\n Node.prototype.cloneNode = cloneNode; // override\n\n scope.registry = registry;\n\n /**\n * Upgrade an element to a custom element. Upgrading an element\n * causes the custom prototype to be applied, an `is` attribute\n * to be attached (as needed), and invocation of the `readyCallback`.\n * `upgrade` does nothing if the element is already upgraded, or\n * if it matches no registered custom tag name.\n *\n * @method ugprade\n * @param {Element} element The element to upgrade.\n * @return {Element} The upgraded element.\n */\n scope.upgrade = upgradeElement;\n}\n\n// Create a custom 'instanceof'. This is necessary when CustomElements\n// are implemented via a mixin strategy, as for example on IE10.\nvar isInstance;\nif (!Object.__proto__ && !useNative) {\n isInstance = function(obj, ctor) {\n var p = obj;\n while (p) {\n // NOTE: this is not technically correct since we're not checking if\n // an object is an instance of a constructor; however, this should\n // be good enough for the mixin strategy.\n if (p === ctor.prototype) {\n return true;\n }\n p = p.__proto__;\n }\n return false;\n }\n} else {\n isInstance = function(obj, base) {\n return obj instanceof base;\n }\n}\n\n// exports\nscope.instanceof = isInstance;\nscope.reservedTagList = reservedTagList;\n\n// bc\ndocument.register = document.registerElement;\n\nscope.hasNative = hasNative;\nscope.useNative = useNative;\n\n})(window.CustomElements);\n","/*\n * Copyright (c) 2014 The Polymer Project Authors. All rights reserved.\n * This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt\n * The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt\n * The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt\n * Code distributed by Google as part of the polymer project is also\n * subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt\n */\n\n(function(scope) {\n\n// import\n\nvar IMPORT_LINK_TYPE = scope.IMPORT_LINK_TYPE;\n\n// highlander object for parsing a document tree\n\nvar parser = {\n selectors: [\n 'link[rel=' + IMPORT_LINK_TYPE + ']'\n ],\n map: {\n link: 'parseLink'\n },\n parse: function(inDocument) {\n if (!inDocument.__parsed) {\n // only parse once\n inDocument.__parsed = true;\n // all parsable elements in inDocument (depth-first pre-order traversal)\n var elts = inDocument.querySelectorAll(parser.selectors);\n // for each parsable node type, call the mapped parsing method\n forEach(elts, function(e) {\n parser[parser.map[e.localName]](e);\n });\n // upgrade all upgradeable static elements, anything dynamically\n // created should be caught by observer\n CustomElements.upgradeDocument(inDocument);\n // observe document for dom changes\n CustomElements.observeDocument(inDocument);\n }\n },\n parseLink: function(linkElt) {\n // imports\n if (isDocumentLink(linkElt)) {\n this.parseImport(linkElt);\n }\n },\n parseImport: function(linkElt) {\n if (linkElt.import) {\n parser.parse(linkElt.import);\n }\n }\n};\n\nfunction isDocumentLink(inElt) {\n return (inElt.localName === 'link'\n && inElt.getAttribute('rel') === IMPORT_LINK_TYPE);\n}\n\nvar forEach = Array.prototype.forEach.call.bind(Array.prototype.forEach);\n\n// exports\n\nscope.parser = parser;\nscope.IMPORT_LINK_TYPE = IMPORT_LINK_TYPE;\n\n})(window.CustomElements);","/*\n * Copyright (c) 2014 The Polymer Project Authors. All rights reserved.\n * This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt\n * The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt\n * The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt\n * Code distributed by Google as part of the polymer project is also\n * subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt\n */\n(function(scope){\n\n// bootstrap parsing\nfunction bootstrap() {\n // parse document\n CustomElements.parser.parse(document);\n // one more pass before register is 'live'\n CustomElements.upgradeDocument(document);\n // choose async\n var async = window.Platform && Platform.endOfMicrotask ? \n Platform.endOfMicrotask :\n setTimeout;\n async(function() {\n // set internal 'ready' flag, now document.registerElement will trigger \n // synchronous upgrades\n CustomElements.ready = true;\n // capture blunt profiling data\n CustomElements.readyTime = Date.now();\n if (window.HTMLImports) {\n CustomElements.elapsed = CustomElements.readyTime - HTMLImports.readyTime;\n }\n // notify the system that we are bootstrapped\n document.dispatchEvent(\n new CustomEvent('WebComponentsReady', {bubbles: true})\n );\n\n // install upgrade hook if HTMLImports are available\n if (window.HTMLImports) {\n HTMLImports.__importsParsingHook = function(elt) {\n CustomElements.parser.parse(elt.import);\n }\n }\n });\n}\n\n// CustomEvent shim for IE\nif (typeof window.CustomEvent !== 'function') {\n window.CustomEvent = function(inType, params) {\n params = params || {};\n var e = document.createEvent('CustomEvent');\n e.initCustomEvent(inType, Boolean(params.bubbles), Boolean(params.cancelable), params.detail);\n return e;\n };\n window.CustomEvent.prototype = window.Event.prototype;\n}\n\n// When loading at readyState complete time (or via flag), boot custom elements\n// immediately.\n// If relevant, HTMLImports must already be loaded.\nif (document.readyState === 'complete' || scope.flags.eager) {\n bootstrap();\n// When loading at readyState interactive time, bootstrap only if HTMLImports\n// are not pending. Also avoid IE as the semantics of this state are unreliable.\n} else if (document.readyState === 'interactive' && !window.attachEvent &&\n (!window.HTMLImports || window.HTMLImports.ready)) {\n bootstrap();\n// When loading at other readyStates, wait for the appropriate DOM event to \n// bootstrap.\n} else {\n var loadEvent = window.HTMLImports && !HTMLImports.ready ?\n 'HTMLImportsLoaded' : 'DOMContentLoaded';\n window.addEventListener(loadEvent, bootstrap);\n}\n\n})(window.CustomElements);\n","/*\n * Copyright (c) 2014 The Polymer Project Authors. All rights reserved.\n * This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt\n * The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt\n * The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt\n * Code distributed by Google as part of the polymer project is also\n * subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt\n */\n\n(function() {\n\nif (window.ShadowDOMPolyfill) {\n\n // ensure wrapped inputs for these functions\n var fns = ['upgradeAll', 'upgradeSubtree', 'observeDocument',\n 'upgradeDocument'];\n\n // cache originals\n var original = {};\n fns.forEach(function(fn) {\n original[fn] = CustomElements[fn];\n });\n\n // override\n fns.forEach(function(fn) {\n CustomElements[fn] = function(inNode) {\n return original[fn](wrap(inNode));\n };\n });\n\n}\n\n})();\n","/*\n * Copyright (c) 2014 The Polymer Project Authors. All rights reserved.\n * This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt\n * The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt\n * The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt\n * Code distributed by Google as part of the polymer project is also\n * subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt\n */\n\n(function(scope) {\n var endOfMicrotask = scope.endOfMicrotask;\n\n // Generic url loader\n function Loader(regex) {\n this.cache = Object.create(null);\n this.map = Object.create(null);\n this.requests = 0;\n this.regex = regex;\n }\n Loader.prototype = {\n\n // TODO(dfreedm): there may be a better factoring here\n // extract absolute urls from the text (full of relative urls)\n extractUrls: function(text, base) {\n var matches = [];\n var matched, u;\n while ((matched = this.regex.exec(text))) {\n u = new URL(matched[1], base);\n matches.push({matched: matched[0], url: u.href});\n }\n return matches;\n },\n // take a text blob, a root url, and a callback and load all the urls found within the text\n // returns a map of absolute url to text\n process: function(text, root, callback) {\n var matches = this.extractUrls(text, root);\n\n // every call to process returns all the text this loader has ever received\n var done = callback.bind(null, this.map);\n this.fetch(matches, done);\n },\n // build a mapping of url -> text from matches\n fetch: function(matches, callback) {\n var inflight = matches.length;\n\n // return early if there is no fetching to be done\n if (!inflight) {\n return callback();\n }\n\n // wait for all subrequests to return\n var done = function() {\n if (--inflight === 0) {\n callback();\n }\n };\n\n // start fetching all subrequests\n var m, req, url;\n for (var i = 0; i < inflight; i++) {\n m = matches[i];\n url = m.url;\n req = this.cache[url];\n // if this url has already been requested, skip requesting it again\n if (!req) {\n req = this.xhr(url);\n req.match = m;\n this.cache[url] = req;\n }\n // wait for the request to process its subrequests\n req.wait(done);\n }\n },\n handleXhr: function(request) {\n var match = request.match;\n var url = match.url;\n\n // handle errors with an empty string\n var response = request.response || request.responseText || '';\n this.map[url] = response;\n this.fetch(this.extractUrls(response, url), request.resolve);\n },\n xhr: function(url) {\n this.requests++;\n var request = new XMLHttpRequest();\n request.open('GET', url, true);\n request.send();\n request.onerror = request.onload = this.handleXhr.bind(this, request);\n\n // queue of tasks to run after XHR returns\n request.pending = [];\n request.resolve = function() {\n var pending = request.pending;\n for(var i = 0; i < pending.length; i++) {\n pending[i]();\n }\n request.pending = null;\n };\n\n // if we have already resolved, pending is null, async call the callback\n request.wait = function(fn) {\n if (request.pending) {\n request.pending.push(fn);\n } else {\n endOfMicrotask(fn);\n }\n };\n\n return request;\n }\n };\n\n scope.Loader = Loader;\n})(window.Platform);\n","/*\n * Copyright (c) 2014 The Polymer Project Authors. All rights reserved.\n * This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt\n * The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt\n * The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt\n * Code distributed by Google as part of the polymer project is also\n * subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt\n */\n\n(function(scope) {\n\nvar urlResolver = scope.urlResolver;\nvar Loader = scope.Loader;\n\nfunction StyleResolver() {\n this.loader = new Loader(this.regex);\n}\nStyleResolver.prototype = {\n regex: /@import\\s+(?:url)?[\"'\\(]*([^'\"\\)]*)['\"\\)]*;/g,\n // Recursively replace @imports with the text at that url\n resolve: function(text, url, callback) {\n var done = function(map) {\n callback(this.flatten(text, url, map));\n }.bind(this);\n this.loader.process(text, url, done);\n },\n // resolve the textContent of a style node\n resolveNode: function(style, url, callback) {\n var text = style.textContent;\n var done = function(text) {\n style.textContent = text;\n callback(style);\n };\n this.resolve(text, url, done);\n },\n // flatten all the @imports to text\n flatten: function(text, base, map) {\n var matches = this.loader.extractUrls(text, base);\n var match, url, intermediate;\n for (var i = 0; i < matches.length; i++) {\n match = matches[i];\n url = match.url;\n // resolve any css text to be relative to the importer, keep absolute url\n intermediate = urlResolver.resolveCssText(map[url], url, true);\n // flatten intermediate @imports\n intermediate = this.flatten(intermediate, base, map);\n text = text.replace(match.matched, intermediate);\n }\n return text;\n },\n loadStyles: function(styles, base, callback) {\n var loaded=0, l = styles.length;\n // called in the context of the style\n function loadedStyle(style) {\n loaded++;\n if (loaded === l && callback) {\n callback();\n }\n }\n for (var i=0, s; (i<l) && (s=styles[i]); i++) {\n this.resolveNode(s, base, loadedStyle);\n }\n }\n};\n\nvar styleResolver = new StyleResolver();\n\n// exports\nscope.styleResolver = styleResolver;\n\n})(window.Platform);\n","// Copyright (c) 2014 The Polymer Project Authors. All rights reserved.\n// This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt\n// The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt\n// The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt\n// Code distributed by Google as part of the polymer project is also\n// subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt\n\n(function(global) {\n 'use strict';\n\n var filter = Array.prototype.filter.call.bind(Array.prototype.filter);\n\n function getTreeScope(node) {\n while (node.parentNode) {\n node = node.parentNode;\n }\n\n return typeof node.getElementById === 'function' ? node : null;\n }\n\n Node.prototype.bind = function(name, observable) {\n console.error('Unhandled binding to Node: ', this, name, observable);\n };\n\n Node.prototype.bindFinished = function() {};\n\n function updateBindings(node, name, binding) {\n var bindings = node.bindings_;\n if (!bindings)\n bindings = node.bindings_ = {};\n\n if (bindings[name])\n binding[name].close();\n\n return bindings[name] = binding;\n }\n\n function returnBinding(node, name, binding) {\n return binding;\n }\n\n function sanitizeValue(value) {\n return value == null ? '' : value;\n }\n\n function updateText(node, value) {\n node.data = sanitizeValue(value);\n }\n\n function textBinding(node) {\n return function(value) {\n return updateText(node, value);\n };\n }\n\n var maybeUpdateBindings = returnBinding;\n\n Object.defineProperty(Platform, 'enableBindingsReflection', {\n get: function() {\n return maybeUpdateBindings === updateBindings;\n },\n set: function(enable) {\n maybeUpdateBindings = enable ? updateBindings : returnBinding;\n return enable;\n },\n configurable: true\n });\n\n Text.prototype.bind = function(name, value, oneTime) {\n if (name !== 'textContent')\n return Node.prototype.bind.call(this, name, value, oneTime);\n\n if (oneTime)\n return updateText(this, value);\n\n var observable = value;\n updateText(this, observable.open(textBinding(this)));\n return maybeUpdateBindings(this, name, observable);\n }\n\n function updateAttribute(el, name, conditional, value) {\n if (conditional) {\n if (value)\n el.setAttribute(name, '');\n else\n el.removeAttribute(name);\n return;\n }\n\n el.setAttribute(name, sanitizeValue(value));\n }\n\n function attributeBinding(el, name, conditional) {\n return function(value) {\n updateAttribute(el, name, conditional, value);\n };\n }\n\n Element.prototype.bind = function(name, value, oneTime) {\n var conditional = name[name.length - 1] == '?';\n if (conditional) {\n this.removeAttribute(name);\n name = name.slice(0, -1);\n }\n\n if (oneTime)\n return updateAttribute(this, name, conditional, value);\n\n\n var observable = value;\n updateAttribute(this, name, conditional,\n observable.open(attributeBinding(this, name, conditional)));\n\n return maybeUpdateBindings(this, name, observable);\n };\n\n var checkboxEventType;\n (function() {\n // Attempt to feature-detect which event (change or click) is fired first\n // for checkboxes.\n var div = document.createElement('div');\n var checkbox = div.appendChild(document.createElement('input'));\n checkbox.setAttribute('type', 'checkbox');\n var first;\n var count = 0;\n checkbox.addEventListener('click', function(e) {\n count++;\n first = first || 'click';\n });\n checkbox.addEventListener('change', function() {\n count++;\n first = first || 'change';\n });\n\n var event = document.createEvent('MouseEvent');\n event.initMouseEvent(\"click\", true, true, window, 0, 0, 0, 0, 0, false,\n false, false, false, 0, null);\n checkbox.dispatchEvent(event);\n // WebKit/Blink don't fire the change event if the element is outside the\n // document, so assume 'change' for that case.\n checkboxEventType = count == 1 ? 'change' : first;\n })();\n\n function getEventForInputType(element) {\n switch (element.type) {\n case 'checkbox':\n return checkboxEventType;\n case 'radio':\n case 'select-multiple':\n case 'select-one':\n return 'change';\n case 'range':\n if (/Trident|MSIE/.test(navigator.userAgent))\n return 'change';\n default:\n return 'input';\n }\n }\n\n function updateInput(input, property, value, santizeFn) {\n input[property] = (santizeFn || sanitizeValue)(value);\n }\n\n function inputBinding(input, property, santizeFn) {\n return function(value) {\n return updateInput(input, property, value, santizeFn);\n }\n }\n\n function noop() {}\n\n function bindInputEvent(input, property, observable, postEventFn) {\n var eventType = getEventForInputType(input);\n\n function eventHandler() {\n observable.setValue(input[property]);\n observable.discardChanges();\n (postEventFn || noop)(input);\n Platform.performMicrotaskCheckpoint();\n }\n input.addEventListener(eventType, eventHandler);\n\n return {\n close: function() {\n input.removeEventListener(eventType, eventHandler);\n observable.close();\n },\n\n observable_: observable\n }\n }\n\n function booleanSanitize(value) {\n return Boolean(value);\n }\n\n // |element| is assumed to be an HTMLInputElement with |type| == 'radio'.\n // Returns an array containing all radio buttons other than |element| that\n // have the same |name|, either in the form that |element| belongs to or,\n // if no form, in the document tree to which |element| belongs.\n //\n // This implementation is based upon the HTML spec definition of a\n // \"radio button group\":\n // http://www.whatwg.org/specs/web-apps/current-work/multipage/number-state.html#radio-button-group\n //\n function getAssociatedRadioButtons(element) {\n if (element.form) {\n return filter(element.form.elements, function(el) {\n return el != element &&\n el.tagName == 'INPUT' &&\n el.type == 'radio' &&\n el.name == element.name;\n });\n } else {\n var treeScope = getTreeScope(element);\n if (!treeScope)\n return [];\n var radios = treeScope.querySelectorAll(\n 'input[type=\"radio\"][name=\"' + element.name + '\"]');\n return filter(radios, function(el) {\n return el != element && !el.form;\n });\n }\n }\n\n function checkedPostEvent(input) {\n // Only the radio button that is getting checked gets an event. We\n // therefore find all the associated radio buttons and update their\n // check binding manually.\n if (input.tagName === 'INPUT' &&\n input.type === 'radio') {\n getAssociatedRadioButtons(input).forEach(function(radio) {\n var checkedBinding = radio.bindings_.checked;\n if (checkedBinding) {\n // Set the value directly to avoid an infinite call stack.\n checkedBinding.observable_.setValue(false);\n }\n });\n }\n }\n\n HTMLInputElement.prototype.bind = function(name, value, oneTime) {\n if (name !== 'value' && name !== 'checked')\n return HTMLElement.prototype.bind.call(this, name, value, oneTime);\n\n this.removeAttribute(name);\n var sanitizeFn = name == 'checked' ? booleanSanitize : sanitizeValue;\n var postEventFn = name == 'checked' ? checkedPostEvent : noop;\n\n if (oneTime)\n return updateInput(this, name, value, sanitizeFn);\n\n\n var observable = value;\n var binding = bindInputEvent(this, name, observable, postEventFn);\n updateInput(this, name,\n observable.open(inputBinding(this, name, sanitizeFn)),\n sanitizeFn);\n\n // Checkboxes may need to update bindings of other checkboxes.\n return updateBindings(this, name, binding);\n }\n\n HTMLTextAreaElement.prototype.bind = function(name, value, oneTime) {\n if (name !== 'value')\n return HTMLElement.prototype.bind.call(this, name, value, oneTime);\n\n this.removeAttribute('value');\n\n if (oneTime)\n return updateInput(this, 'value', value);\n\n var observable = value;\n var binding = bindInputEvent(this, 'value', observable);\n updateInput(this, 'value',\n observable.open(inputBinding(this, 'value', sanitizeValue)));\n return maybeUpdateBindings(this, name, binding);\n }\n\n function updateOption(option, value) {\n var parentNode = option.parentNode;;\n var select;\n var selectBinding;\n var oldValue;\n if (parentNode instanceof HTMLSelectElement &&\n parentNode.bindings_ &&\n parentNode.bindings_.value) {\n select = parentNode;\n selectBinding = select.bindings_.value;\n oldValue = select.value;\n }\n\n option.value = sanitizeValue(value);\n\n if (select && select.value != oldValue) {\n selectBinding.observable_.setValue(select.value);\n selectBinding.observable_.discardChanges();\n Platform.performMicrotaskCheckpoint();\n }\n }\n\n function optionBinding(option) {\n return function(value) {\n updateOption(option, value);\n }\n }\n\n HTMLOptionElement.prototype.bind = function(name, value, oneTime) {\n if (name !== 'value')\n return HTMLElement.prototype.bind.call(this, name, value, oneTime);\n\n this.removeAttribute('value');\n\n if (oneTime)\n return updateOption(this, value);\n\n var observable = value;\n var binding = bindInputEvent(this, 'value', observable);\n updateOption(this, observable.open(optionBinding(this)));\n return maybeUpdateBindings(this, name, binding);\n }\n\n HTMLSelectElement.prototype.bind = function(name, value, oneTime) {\n if (name === 'selectedindex')\n name = 'selectedIndex';\n\n if (name !== 'selectedIndex' && name !== 'value')\n return HTMLElement.prototype.bind.call(this, name, value, oneTime);\n\n this.removeAttribute(name);\n\n if (oneTime)\n return updateInput(this, name, value);\n\n var observable = value;\n var binding = bindInputEvent(this, name, observable);\n updateInput(this, name,\n observable.open(inputBinding(this, name)));\n\n // Option update events may need to access select bindings.\n return updateBindings(this, name, binding);\n }\n})(this);\n","// Copyright (c) 2014 The Polymer Project Authors. All rights reserved.\n// This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt\n// The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt\n// The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt\n// Code distributed by Google as part of the polymer project is also\n// subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt\n\n(function(global) {\n 'use strict';\n\n function assert(v) {\n if (!v)\n throw new Error('Assertion failed');\n }\n\n var forEach = Array.prototype.forEach.call.bind(Array.prototype.forEach);\n\n function getFragmentRoot(node) {\n var p;\n while (p = node.parentNode) {\n node = p;\n }\n\n return node;\n }\n\n function searchRefId(node, id) {\n if (!id)\n return;\n\n var ref;\n var selector = '#' + id;\n while (!ref) {\n node = getFragmentRoot(node);\n\n if (node.protoContent_)\n ref = node.protoContent_.querySelector(selector);\n else if (node.getElementById)\n ref = node.getElementById(id);\n\n if (ref || !node.templateCreator_)\n break\n\n node = node.templateCreator_;\n }\n\n return ref;\n }\n\n function getInstanceRoot(node) {\n while (node.parentNode) {\n node = node.parentNode;\n }\n return node.templateCreator_ ? node : null;\n }\n\n var Map;\n if (global.Map && typeof global.Map.prototype.forEach === 'function') {\n Map = global.Map;\n } else {\n Map = function() {\n this.keys = [];\n this.values = [];\n };\n\n Map.prototype = {\n set: function(key, value) {\n var index = this.keys.indexOf(key);\n if (index < 0) {\n this.keys.push(key);\n this.values.push(value);\n } else {\n this.values[index] = value;\n }\n },\n\n get: function(key) {\n var index = this.keys.indexOf(key);\n if (index < 0)\n return;\n\n return this.values[index];\n },\n\n delete: function(key, value) {\n var index = this.keys.indexOf(key);\n if (index < 0)\n return false;\n\n this.keys.splice(index, 1);\n this.values.splice(index, 1);\n return true;\n },\n\n forEach: function(f, opt_this) {\n for (var i = 0; i < this.keys.length; i++)\n f.call(opt_this || this, this.values[i], this.keys[i], this);\n }\n };\n }\n\n // JScript does not have __proto__. We wrap all object literals with\n // createObject which uses Object.create, Object.defineProperty and\n // Object.getOwnPropertyDescriptor to create a new object that does the exact\n // same thing. The main downside to this solution is that we have to extract\n // all those property descriptors for IE.\n var createObject = ('__proto__' in {}) ?\n function(obj) { return obj; } :\n function(obj) {\n var proto = obj.__proto__;\n if (!proto)\n return obj;\n var newObject = Object.create(proto);\n Object.getOwnPropertyNames(obj).forEach(function(name) {\n Object.defineProperty(newObject, name,\n Object.getOwnPropertyDescriptor(obj, name));\n });\n return newObject;\n };\n\n // IE does not support have Document.prototype.contains.\n if (typeof document.contains != 'function') {\n Document.prototype.contains = function(node) {\n if (node === this || node.parentNode === this)\n return true;\n return this.documentElement.contains(node);\n }\n }\n\n var BIND = 'bind';\n var REPEAT = 'repeat';\n var IF = 'if';\n\n var templateAttributeDirectives = {\n 'template': true,\n 'repeat': true,\n 'bind': true,\n 'ref': true\n };\n\n var semanticTemplateElements = {\n 'THEAD': true,\n 'TBODY': true,\n 'TFOOT': true,\n 'TH': true,\n 'TR': true,\n 'TD': true,\n 'COLGROUP': true,\n 'COL': true,\n 'CAPTION': true,\n 'OPTION': true,\n 'OPTGROUP': true\n };\n\n var hasTemplateElement = typeof HTMLTemplateElement !== 'undefined';\n if (hasTemplateElement) {\n // TODO(rafaelw): Remove when fix for\n // https://codereview.chromium.org/164803002/\n // makes it to Chrome release.\n (function() {\n var t = document.createElement('template');\n var d = t.content.ownerDocument;\n var html = d.appendChild(d.createElement('html'));\n var head = html.appendChild(d.createElement('head'));\n var base = d.createElement('base');\n base.href = document.baseURI;\n head.appendChild(base);\n })();\n }\n\n var allTemplatesSelectors = 'template, ' +\n Object.keys(semanticTemplateElements).map(function(tagName) {\n return tagName.toLowerCase() + '[template]';\n }).join(', ');\n\n function isSVGTemplate(el) {\n return el.tagName == 'template' &&\n el.namespaceURI == 'http://www.w3.org/2000/svg';\n }\n\n function isHTMLTemplate(el) {\n return el.tagName == 'TEMPLATE' &&\n el.namespaceURI == 'http://www.w3.org/1999/xhtml';\n }\n\n function isAttributeTemplate(el) {\n return Boolean(semanticTemplateElements[el.tagName] &&\n el.hasAttribute('template'));\n }\n\n function isTemplate(el) {\n if (el.isTemplate_ === undefined)\n el.isTemplate_ = el.tagName == 'TEMPLATE' || isAttributeTemplate(el);\n\n return el.isTemplate_;\n }\n\n // FIXME: Observe templates being added/removed from documents\n // FIXME: Expose imperative API to decorate and observe templates in\n // \"disconnected tress\" (e.g. ShadowRoot)\n document.addEventListener('DOMContentLoaded', function(e) {\n bootstrapTemplatesRecursivelyFrom(document);\n // FIXME: Is this needed? Seems like it shouldn't be.\n Platform.performMicrotaskCheckpoint();\n }, false);\n\n function forAllTemplatesFrom(node, fn) {\n var subTemplates = node.querySelectorAll(allTemplatesSelectors);\n\n if (isTemplate(node))\n fn(node)\n forEach(subTemplates, fn);\n }\n\n function bootstrapTemplatesRecursivelyFrom(node) {\n function bootstrap(template) {\n if (!HTMLTemplateElement.decorate(template))\n bootstrapTemplatesRecursivelyFrom(template.content);\n }\n\n forAllTemplatesFrom(node, bootstrap);\n }\n\n if (!hasTemplateElement) {\n /**\n * This represents a <template> element.\n * @constructor\n * @extends {HTMLElement}\n */\n global.HTMLTemplateElement = function() {\n throw TypeError('Illegal constructor');\n };\n }\n\n var hasProto = '__proto__' in {};\n\n function mixin(to, from) {\n Object.getOwnPropertyNames(from).forEach(function(name) {\n Object.defineProperty(to, name,\n Object.getOwnPropertyDescriptor(from, name));\n });\n }\n\n // http://dvcs.w3.org/hg/webcomponents/raw-file/tip/spec/templates/index.html#dfn-template-contents-owner\n function getOrCreateTemplateContentsOwner(template) {\n var doc = template.ownerDocument\n if (!doc.defaultView)\n return doc;\n var d = doc.templateContentsOwner_;\n if (!d) {\n // TODO(arv): This should either be a Document or HTMLDocument depending\n // on doc.\n d = doc.implementation.createHTMLDocument('');\n while (d.lastChild) {\n d.removeChild(d.lastChild);\n }\n doc.templateContentsOwner_ = d;\n }\n return d;\n }\n\n function getTemplateStagingDocument(template) {\n if (!template.stagingDocument_) {\n var owner = template.ownerDocument;\n if (!owner.stagingDocument_) {\n owner.stagingDocument_ = owner.implementation.createHTMLDocument('');\n owner.stagingDocument_.isStagingDocument = true;\n // TODO(rafaelw): Remove when fix for\n // https://codereview.chromium.org/164803002/\n // makes it to Chrome release.\n var base = owner.stagingDocument_.createElement('base');\n base.href = document.baseURI;\n owner.stagingDocument_.head.appendChild(base);\n\n owner.stagingDocument_.stagingDocument_ = owner.stagingDocument_;\n }\n\n template.stagingDocument_ = owner.stagingDocument_;\n }\n\n return template.stagingDocument_;\n }\n\n // For non-template browsers, the parser will disallow <template> in certain\n // locations, so we allow \"attribute templates\" which combine the template\n // element with the top-level container node of the content, e.g.\n //\n // <tr template repeat=\"{{ foo }}\"\" class=\"bar\"><td>Bar</td></tr>\n //\n // becomes\n //\n // <template repeat=\"{{ foo }}\">\n // + #document-fragment\n // + <tr class=\"bar\">\n // + <td>Bar</td>\n //\n function extractTemplateFromAttributeTemplate(el) {\n var template = el.ownerDocument.createElement('template');\n el.parentNode.insertBefore(template, el);\n\n var attribs = el.attributes;\n var count = attribs.length;\n while (count-- > 0) {\n var attrib = attribs[count];\n if (templateAttributeDirectives[attrib.name]) {\n if (attrib.name !== 'template')\n template.setAttribute(attrib.name, attrib.value);\n el.removeAttribute(attrib.name);\n }\n }\n\n return template;\n }\n\n function extractTemplateFromSVGTemplate(el) {\n var template = el.ownerDocument.createElement('template');\n el.parentNode.insertBefore(template, el);\n\n var attribs = el.attributes;\n var count = attribs.length;\n while (count-- > 0) {\n var attrib = attribs[count];\n template.setAttribute(attrib.name, attrib.value);\n el.removeAttribute(attrib.name);\n }\n\n el.parentNode.removeChild(el);\n return template;\n }\n\n function liftNonNativeTemplateChildrenIntoContent(template, el, useRoot) {\n var content = template.content;\n if (useRoot) {\n content.appendChild(el);\n return;\n }\n\n var child;\n while (child = el.firstChild) {\n content.appendChild(child);\n }\n }\n\n var templateObserver;\n if (typeof MutationObserver == 'function') {\n templateObserver = new MutationObserver(function(records) {\n for (var i = 0; i < records.length; i++) {\n records[i].target.refChanged_();\n }\n });\n }\n\n /**\n * Ensures proper API and content model for template elements.\n * @param {HTMLTemplateElement} opt_instanceRef The template element which\n * |el| template element will return as the value of its ref(), and whose\n * content will be used as source when createInstance() is invoked.\n */\n HTMLTemplateElement.decorate = function(el, opt_instanceRef) {\n if (el.templateIsDecorated_)\n return false;\n\n var templateElement = el;\n templateElement.templateIsDecorated_ = true;\n\n var isNativeHTMLTemplate = isHTMLTemplate(templateElement) &&\n hasTemplateElement;\n var bootstrapContents = isNativeHTMLTemplate;\n var liftContents = !isNativeHTMLTemplate;\n var liftRoot = false;\n\n if (!isNativeHTMLTemplate) {\n if (isAttributeTemplate(templateElement)) {\n assert(!opt_instanceRef);\n templateElement = extractTemplateFromAttributeTemplate(el);\n templateElement.templateIsDecorated_ = true;\n isNativeHTMLTemplate = hasTemplateElement;\n liftRoot = true;\n } else if (isSVGTemplate(templateElement)) {\n templateElement = extractTemplateFromSVGTemplate(el);\n templateElement.templateIsDecorated_ = true;\n isNativeHTMLTemplate = hasTemplateElement;\n }\n }\n\n if (!isNativeHTMLTemplate) {\n fixTemplateElementPrototype(templateElement);\n var doc = getOrCreateTemplateContentsOwner(templateElement);\n templateElement.content_ = doc.createDocumentFragment();\n }\n\n if (opt_instanceRef) {\n // template is contained within an instance, its direct content must be\n // empty\n templateElement.instanceRef_ = opt_instanceRef;\n } else if (liftContents) {\n liftNonNativeTemplateChildrenIntoContent(templateElement,\n el,\n liftRoot);\n } else if (bootstrapContents) {\n bootstrapTemplatesRecursivelyFrom(templateElement.content);\n }\n\n return true;\n };\n\n // TODO(rafaelw): This used to decorate recursively all templates from a given\n // node. This happens by default on 'DOMContentLoaded', but may be needed\n // in subtrees not descendent from document (e.g. ShadowRoot).\n // Review whether this is the right public API.\n HTMLTemplateElement.bootstrap = bootstrapTemplatesRecursivelyFrom;\n\n var htmlElement = global.HTMLUnknownElement || HTMLElement;\n\n var contentDescriptor = {\n get: function() {\n return this.content_;\n },\n enumerable: true,\n configurable: true\n };\n\n if (!hasTemplateElement) {\n // Gecko is more picky with the prototype than WebKit. Make sure to use the\n // same prototype as created in the constructor.\n HTMLTemplateElement.prototype = Object.create(htmlElement.prototype);\n\n Object.defineProperty(HTMLTemplateElement.prototype, 'content',\n contentDescriptor);\n }\n\n function fixTemplateElementPrototype(el) {\n if (hasProto)\n el.__proto__ = HTMLTemplateElement.prototype;\n else\n mixin(el, HTMLTemplateElement.prototype);\n }\n\n function ensureSetModelScheduled(template) {\n if (!template.setModelFn_) {\n template.setModelFn_ = function() {\n template.setModelFnScheduled_ = false;\n var map = getBindings(template,\n template.delegate_ && template.delegate_.prepareBinding);\n processBindings(template, map, template.model_);\n };\n }\n\n if (!template.setModelFnScheduled_) {\n template.setModelFnScheduled_ = true;\n Observer.runEOM_(template.setModelFn_);\n }\n }\n\n mixin(HTMLTemplateElement.prototype, {\n bind: function(name, value, oneTime) {\n if (name != 'ref')\n return Element.prototype.bind.call(this, name, value, oneTime);\n\n var self = this;\n var ref = oneTime ? value : value.open(function(ref) {\n self.setAttribute('ref', ref);\n self.refChanged_();\n });\n\n this.setAttribute('ref', ref);\n this.refChanged_();\n if (oneTime)\n return;\n\n if (!this.bindings_) {\n this.bindings_ = { ref: value };\n } else {\n this.bindings_.ref = value;\n }\n\n return value;\n },\n\n processBindingDirectives_: function(directives) {\n if (this.iterator_)\n this.iterator_.closeDeps();\n\n if (!directives.if && !directives.bind && !directives.repeat) {\n if (this.iterator_) {\n this.iterator_.close();\n this.iterator_ = undefined;\n }\n\n return;\n }\n\n if (!this.iterator_) {\n this.iterator_ = new TemplateIterator(this);\n }\n\n this.iterator_.updateDependencies(directives, this.model_);\n\n if (templateObserver) {\n templateObserver.observe(this, { attributes: true,\n attributeFilter: ['ref'] });\n }\n\n return this.iterator_;\n },\n\n createInstance: function(model, bindingDelegate, delegate_) {\n if (bindingDelegate)\n delegate_ = this.newDelegate_(bindingDelegate);\n else if (!delegate_)\n delegate_ = this.delegate_;\n\n if (!this.refContent_)\n this.refContent_ = this.ref_.content;\n var content = this.refContent_;\n if (content.firstChild === null)\n return emptyInstance;\n\n var map = getInstanceBindingMap(content, delegate_);\n var stagingDocument = getTemplateStagingDocument(this);\n var instance = stagingDocument.createDocumentFragment();\n instance.templateCreator_ = this;\n instance.protoContent_ = content;\n instance.bindings_ = [];\n instance.terminator_ = null;\n var instanceRecord = instance.templateInstance_ = {\n firstNode: null,\n lastNode: null,\n model: model\n };\n\n var i = 0;\n var collectTerminator = false;\n for (var child = content.firstChild; child; child = child.nextSibling) {\n // The terminator of the instance is the clone of the last child of the\n // content. If the last child is an active template, it may produce\n // instances as a result of production, so simply collecting the last\n // child of the instance after it has finished producing may be wrong.\n if (child.nextSibling === null)\n collectTerminator = true;\n\n var clone = cloneAndBindInstance(child, instance, stagingDocument,\n map.children[i++],\n model,\n delegate_,\n instance.bindings_);\n clone.templateInstance_ = instanceRecord;\n if (collectTerminator)\n instance.terminator_ = clone;\n }\n\n instanceRecord.firstNode = instance.firstChild;\n instanceRecord.lastNode = instance.lastChild;\n instance.templateCreator_ = undefined;\n instance.protoContent_ = undefined;\n return instance;\n },\n\n get model() {\n return this.model_;\n },\n\n set model(model) {\n this.model_ = model;\n ensureSetModelScheduled(this);\n },\n\n get bindingDelegate() {\n return this.delegate_ && this.delegate_.raw;\n },\n\n refChanged_: function() {\n if (!this.iterator_ || this.refContent_ === this.ref_.content)\n return;\n\n this.refContent_ = undefined;\n this.iterator_.valueChanged();\n this.iterator_.updateIteratedValue(this.iterator_.getUpdatedValue());\n },\n\n clear: function() {\n this.model_ = undefined;\n this.delegate_ = undefined;\n if (this.bindings_ && this.bindings_.ref)\n this.bindings_.ref.close()\n this.refContent_ = undefined;\n if (!this.iterator_)\n return;\n this.iterator_.valueChanged();\n this.iterator_.close()\n this.iterator_ = undefined;\n },\n\n setDelegate_: function(delegate) {\n this.delegate_ = delegate;\n this.bindingMap_ = undefined;\n if (this.iterator_) {\n this.iterator_.instancePositionChangedFn_ = undefined;\n this.iterator_.instanceModelFn_ = undefined;\n }\n },\n\n newDelegate_: function(bindingDelegate) {\n if (!bindingDelegate)\n return;\n\n function delegateFn(name) {\n var fn = bindingDelegate && bindingDelegate[name];\n if (typeof fn != 'function')\n return;\n\n return function() {\n return fn.apply(bindingDelegate, arguments);\n };\n }\n\n return {\n bindingMaps: {},\n raw: bindingDelegate,\n prepareBinding: delegateFn('prepareBinding'),\n prepareInstanceModel: delegateFn('prepareInstanceModel'),\n prepareInstancePositionChanged:\n delegateFn('prepareInstancePositionChanged')\n };\n },\n\n set bindingDelegate(bindingDelegate) {\n if (this.delegate_) {\n throw Error('Template must be cleared before a new bindingDelegate ' +\n 'can be assigned');\n }\n\n this.setDelegate_(this.newDelegate_(bindingDelegate));\n },\n\n get ref_() {\n var ref = searchRefId(this, this.getAttribute('ref'));\n if (!ref)\n ref = this.instanceRef_;\n\n if (!ref)\n return this;\n\n var nextRef = ref.ref_;\n return nextRef ? nextRef : ref;\n }\n });\n\n // Returns\n // a) undefined if there are no mustaches.\n // b) [TEXT, (ONE_TIME?, PATH, DELEGATE_FN, TEXT)+] if there is at least one mustache.\n function parseMustaches(s, name, node, prepareBindingFn) {\n if (!s || !s.length)\n return;\n\n var tokens;\n var length = s.length;\n var startIndex = 0, lastIndex = 0, endIndex = 0;\n var onlyOneTime = true;\n while (lastIndex < length) {\n var startIndex = s.indexOf('{{', lastIndex);\n var oneTimeStart = s.indexOf('[[', lastIndex);\n var oneTime = false;\n var terminator = '}}';\n\n if (oneTimeStart >= 0 &&\n (startIndex < 0 || oneTimeStart < startIndex)) {\n startIndex = oneTimeStart;\n oneTime = true;\n terminator = ']]';\n }\n\n endIndex = startIndex < 0 ? -1 : s.indexOf(terminator, startIndex + 2);\n\n if (endIndex < 0) {\n if (!tokens)\n return;\n\n tokens.push(s.slice(lastIndex)); // TEXT\n break;\n }\n\n tokens = tokens || [];\n tokens.push(s.slice(lastIndex, startIndex)); // TEXT\n var pathString = s.slice(startIndex + 2, endIndex).trim();\n tokens.push(oneTime); // ONE_TIME?\n onlyOneTime = onlyOneTime && oneTime;\n var delegateFn = prepareBindingFn &&\n prepareBindingFn(pathString, name, node);\n // Don't try to parse the expression if there's a prepareBinding function\n if (delegateFn == null) {\n tokens.push(Path.get(pathString)); // PATH\n } else {\n tokens.push(null);\n }\n tokens.push(delegateFn); // DELEGATE_FN\n lastIndex = endIndex + 2;\n }\n\n if (lastIndex === length)\n tokens.push(''); // TEXT\n\n tokens.hasOnePath = tokens.length === 5;\n tokens.isSimplePath = tokens.hasOnePath &&\n tokens[0] == '' &&\n tokens[4] == '';\n tokens.onlyOneTime = onlyOneTime;\n\n tokens.combinator = function(values) {\n var newValue = tokens[0];\n\n for (var i = 1; i < tokens.length; i += 4) {\n var value = tokens.hasOnePath ? values : values[(i - 1) / 4];\n if (value !== undefined)\n newValue += value;\n newValue += tokens[i + 3];\n }\n\n return newValue;\n }\n\n return tokens;\n };\n\n function processOneTimeBinding(name, tokens, node, model) {\n if (tokens.hasOnePath) {\n var delegateFn = tokens[3];\n var value = delegateFn ? delegateFn(model, node, true) :\n tokens[2].getValueFrom(model);\n return tokens.isSimplePath ? value : tokens.combinator(value);\n }\n\n var values = [];\n for (var i = 1; i < tokens.length; i += 4) {\n var delegateFn = tokens[i + 2];\n values[(i - 1) / 4] = delegateFn ? delegateFn(model, node) :\n tokens[i + 1].getValueFrom(model);\n }\n\n return tokens.combinator(values);\n }\n\n function processSinglePathBinding(name, tokens, node, model) {\n var delegateFn = tokens[3];\n var observer = delegateFn ? delegateFn(model, node, false) :\n new PathObserver(model, tokens[2]);\n\n return tokens.isSimplePath ? observer :\n new ObserverTransform(observer, tokens.combinator);\n }\n\n function processBinding(name, tokens, node, model) {\n if (tokens.onlyOneTime)\n return processOneTimeBinding(name, tokens, node, model);\n\n if (tokens.hasOnePath)\n return processSinglePathBinding(name, tokens, node, model);\n\n var observer = new CompoundObserver();\n\n for (var i = 1; i < tokens.length; i += 4) {\n var oneTime = tokens[i];\n var delegateFn = tokens[i + 2];\n\n if (delegateFn) {\n var value = delegateFn(model, node, oneTime);\n if (oneTime)\n observer.addPath(value)\n else\n observer.addObserver(value);\n continue;\n }\n\n var path = tokens[i + 1];\n if (oneTime)\n observer.addPath(path.getValueFrom(model))\n else\n observer.addPath(model, path);\n }\n\n return new ObserverTransform(observer, tokens.combinator);\n }\n\n function processBindings(node, bindings, model, instanceBindings) {\n for (var i = 0; i < bindings.length; i += 2) {\n var name = bindings[i]\n var tokens = bindings[i + 1];\n var value = processBinding(name, tokens, node, model);\n var binding = node.bind(name, value, tokens.onlyOneTime);\n if (binding && instanceBindings)\n instanceBindings.push(binding);\n }\n\n node.bindFinished();\n if (!bindings.isTemplate)\n return;\n\n node.model_ = model;\n var iter = node.processBindingDirectives_(bindings);\n if (instanceBindings && iter)\n instanceBindings.push(iter);\n }\n\n function parseWithDefault(el, name, prepareBindingFn) {\n var v = el.getAttribute(name);\n return parseMustaches(v == '' ? '{{}}' : v, name, el, prepareBindingFn);\n }\n\n function parseAttributeBindings(element, prepareBindingFn) {\n assert(element);\n\n var bindings = [];\n var ifFound = false;\n var bindFound = false;\n\n for (var i = 0; i < element.attributes.length; i++) {\n var attr = element.attributes[i];\n var name = attr.name;\n var value = attr.value;\n\n // Allow bindings expressed in attributes to be prefixed with underbars.\n // We do this to allow correct semantics for browsers that don't implement\n // <template> where certain attributes might trigger side-effects -- and\n // for IE which sanitizes certain attributes, disallowing mustache\n // replacements in their text.\n while (name[0] === '_') {\n name = name.substring(1);\n }\n\n if (isTemplate(element) &&\n (name === IF || name === BIND || name === REPEAT)) {\n continue;\n }\n\n var tokens = parseMustaches(value, name, element,\n prepareBindingFn);\n if (!tokens)\n continue;\n\n bindings.push(name, tokens);\n }\n\n if (isTemplate(element)) {\n bindings.isTemplate = true;\n bindings.if = parseWithDefault(element, IF, prepareBindingFn);\n bindings.bind = parseWithDefault(element, BIND, prepareBindingFn);\n bindings.repeat = parseWithDefault(element, REPEAT, prepareBindingFn);\n\n if (bindings.if && !bindings.bind && !bindings.repeat)\n bindings.bind = parseMustaches('{{}}', BIND, element, prepareBindingFn);\n }\n\n return bindings;\n }\n\n function getBindings(node, prepareBindingFn) {\n if (node.nodeType === Node.ELEMENT_NODE)\n return parseAttributeBindings(node, prepareBindingFn);\n\n if (node.nodeType === Node.TEXT_NODE) {\n var tokens = parseMustaches(node.data, 'textContent', node,\n prepareBindingFn);\n if (tokens)\n return ['textContent', tokens];\n }\n\n return [];\n }\n\n function cloneAndBindInstance(node, parent, stagingDocument, bindings, model,\n delegate,\n instanceBindings,\n instanceRecord) {\n var clone = parent.appendChild(stagingDocument.importNode(node, false));\n\n var i = 0;\n for (var child = node.firstChild; child; child = child.nextSibling) {\n cloneAndBindInstance(child, clone, stagingDocument,\n bindings.children[i++],\n model,\n delegate,\n instanceBindings);\n }\n\n if (bindings.isTemplate) {\n HTMLTemplateElement.decorate(clone, node);\n if (delegate)\n clone.setDelegate_(delegate);\n }\n\n processBindings(clone, bindings, model, instanceBindings);\n return clone;\n }\n\n function createInstanceBindingMap(node, prepareBindingFn) {\n var map = getBindings(node, prepareBindingFn);\n map.children = {};\n var index = 0;\n for (var child = node.firstChild; child; child = child.nextSibling) {\n map.children[index++] = createInstanceBindingMap(child, prepareBindingFn);\n }\n\n return map;\n }\n\n var contentUidCounter = 1;\n\n // TODO(rafaelw): Setup a MutationObserver on content which clears the id\n // so that bindingMaps regenerate when the template.content changes.\n function getContentUid(content) {\n var id = content.id_;\n if (!id)\n id = content.id_ = contentUidCounter++;\n return id;\n }\n\n // Each delegate is associated with a set of bindingMaps, one for each\n // content which may be used by a template. The intent is that each binding\n // delegate gets the opportunity to prepare the instance (via the prepare*\n // delegate calls) once across all uses.\n // TODO(rafaelw): Separate out the parse map from the binding map. In the\n // current implementation, if two delegates need a binding map for the same\n // content, the second will have to reparse.\n function getInstanceBindingMap(content, delegate_) {\n var contentId = getContentUid(content);\n if (delegate_) {\n var map = delegate_.bindingMaps[contentId];\n if (!map) {\n map = delegate_.bindingMaps[contentId] =\n createInstanceBindingMap(content, delegate_.prepareBinding) || [];\n }\n return map;\n }\n\n var map = content.bindingMap_;\n if (!map) {\n map = content.bindingMap_ =\n createInstanceBindingMap(content, undefined) || [];\n }\n return map;\n }\n\n Object.defineProperty(Node.prototype, 'templateInstance', {\n get: function() {\n var instance = this.templateInstance_;\n return instance ? instance :\n (this.parentNode ? this.parentNode.templateInstance : undefined);\n }\n });\n\n var emptyInstance = document.createDocumentFragment();\n emptyInstance.bindings_ = [];\n emptyInstance.terminator_ = null;\n\n function TemplateIterator(templateElement) {\n this.closed = false;\n this.templateElement_ = templateElement;\n this.instances = [];\n this.deps = undefined;\n this.iteratedValue = [];\n this.presentValue = undefined;\n this.arrayObserver = undefined;\n }\n\n TemplateIterator.prototype = {\n closeDeps: function() {\n var deps = this.deps;\n if (deps) {\n if (deps.ifOneTime === false)\n deps.ifValue.close();\n if (deps.oneTime === false)\n deps.value.close();\n }\n },\n\n updateDependencies: function(directives, model) {\n this.closeDeps();\n\n var deps = this.deps = {};\n var template = this.templateElement_;\n\n var ifValue = true;\n if (directives.if) {\n deps.hasIf = true;\n deps.ifOneTime = directives.if.onlyOneTime;\n deps.ifValue = processBinding(IF, directives.if, template, model);\n\n ifValue = deps.ifValue;\n\n // oneTime if & predicate is false. nothing else to do.\n if (deps.ifOneTime && !ifValue) {\n this.valueChanged();\n return;\n }\n\n if (!deps.ifOneTime)\n ifValue = ifValue.open(this.updateIfValue, this);\n }\n\n if (directives.repeat) {\n deps.repeat = true;\n deps.oneTime = directives.repeat.onlyOneTime;\n deps.value = processBinding(REPEAT, directives.repeat, template, model);\n } else {\n deps.repeat = false;\n deps.oneTime = directives.bind.onlyOneTime;\n deps.value = processBinding(BIND, directives.bind, template, model);\n }\n\n var value = deps.value;\n if (!deps.oneTime)\n value = value.open(this.updateIteratedValue, this);\n\n if (!ifValue) {\n this.valueChanged();\n return;\n }\n\n this.updateValue(value);\n },\n\n /**\n * Gets the updated value of the bind/repeat. This can potentially call\n * user code (if a bindingDelegate is set up) so we try to avoid it if we\n * already have the value in hand (from Observer.open).\n */\n getUpdatedValue: function() {\n var value = this.deps.value;\n if (!this.deps.oneTime)\n value = value.discardChanges();\n return value;\n },\n\n updateIfValue: function(ifValue) {\n if (!ifValue) {\n this.valueChanged();\n return;\n }\n\n this.updateValue(this.getUpdatedValue());\n },\n\n updateIteratedValue: function(value) {\n if (this.deps.hasIf) {\n var ifValue = this.deps.ifValue;\n if (!this.deps.ifOneTime)\n ifValue = ifValue.discardChanges();\n if (!ifValue) {\n this.valueChanged();\n return;\n }\n }\n\n this.updateValue(value);\n },\n\n updateValue: function(value) {\n if (!this.deps.repeat)\n value = [value];\n var observe = this.deps.repeat &&\n !this.deps.oneTime &&\n Array.isArray(value);\n this.valueChanged(value, observe);\n },\n\n valueChanged: function(value, observeValue) {\n if (!Array.isArray(value))\n value = [];\n\n if (value === this.iteratedValue)\n return;\n\n this.unobserve();\n this.presentValue = value;\n if (observeValue) {\n this.arrayObserver = new ArrayObserver(this.presentValue);\n this.arrayObserver.open(this.handleSplices, this);\n }\n\n this.handleSplices(ArrayObserver.calculateSplices(this.presentValue,\n this.iteratedValue));\n },\n\n getLastInstanceNode: function(index) {\n if (index == -1)\n return this.templateElement_;\n var instance = this.instances[index];\n var terminator = instance.terminator_;\n if (!terminator)\n return this.getLastInstanceNode(index - 1);\n\n if (terminator.nodeType !== Node.ELEMENT_NODE ||\n this.templateElement_ === terminator) {\n return terminator;\n }\n\n var subtemplateIterator = terminator.iterator_;\n if (!subtemplateIterator)\n return terminator;\n\n return subtemplateIterator.getLastTemplateNode();\n },\n\n getLastTemplateNode: function() {\n return this.getLastInstanceNode(this.instances.length - 1);\n },\n\n insertInstanceAt: function(index, fragment) {\n var previousInstanceLast = this.getLastInstanceNode(index - 1);\n var parent = this.templateElement_.parentNode;\n this.instances.splice(index, 0, fragment);\n\n parent.insertBefore(fragment, previousInstanceLast.nextSibling);\n },\n\n extractInstanceAt: function(index) {\n var previousInstanceLast = this.getLastInstanceNode(index - 1);\n var lastNode = this.getLastInstanceNode(index);\n var parent = this.templateElement_.parentNode;\n var instance = this.instances.splice(index, 1)[0];\n\n while (lastNode !== previousInstanceLast) {\n var node = previousInstanceLast.nextSibling;\n if (node == lastNode)\n lastNode = previousInstanceLast;\n\n instance.appendChild(parent.removeChild(node));\n }\n\n return instance;\n },\n\n getDelegateFn: function(fn) {\n fn = fn && fn(this.templateElement_);\n return typeof fn === 'function' ? fn : null;\n },\n\n handleSplices: function(splices) {\n if (this.closed || !splices.length)\n return;\n\n var template = this.templateElement_;\n\n if (!template.parentNode) {\n this.close();\n return;\n }\n\n ArrayObserver.applySplices(this.iteratedValue, this.presentValue,\n splices);\n\n var delegate = template.delegate_;\n if (this.instanceModelFn_ === undefined) {\n this.instanceModelFn_ =\n this.getDelegateFn(delegate && delegate.prepareInstanceModel);\n }\n\n if (this.instancePositionChangedFn_ === undefined) {\n this.instancePositionChangedFn_ =\n this.getDelegateFn(delegate &&\n delegate.prepareInstancePositionChanged);\n }\n\n // Instance Removals\n var instanceCache = new Map;\n var removeDelta = 0;\n for (var i = 0; i < splices.length; i++) {\n var splice = splices[i];\n var removed = splice.removed;\n for (var j = 0; j < removed.length; j++) {\n var model = removed[j];\n var instance = this.extractInstanceAt(splice.index + removeDelta);\n if (instance !== emptyInstance) {\n instanceCache.set(model, instance);\n }\n }\n\n removeDelta -= splice.addedCount;\n }\n\n // Instance Insertions\n for (var i = 0; i < splices.length; i++) {\n var splice = splices[i];\n var addIndex = splice.index;\n for (; addIndex < splice.index + splice.addedCount; addIndex++) {\n var model = this.iteratedValue[addIndex];\n var instance = instanceCache.get(model);\n if (instance) {\n instanceCache.delete(model);\n } else {\n if (this.instanceModelFn_) {\n model = this.instanceModelFn_(model);\n }\n\n if (model === undefined) {\n instance = emptyInstance;\n } else {\n instance = template.createInstance(model, undefined, delegate);\n }\n }\n\n this.insertInstanceAt(addIndex, instance);\n }\n }\n\n instanceCache.forEach(function(instance) {\n this.closeInstanceBindings(instance);\n }, this);\n\n if (this.instancePositionChangedFn_)\n this.reportInstancesMoved(splices);\n },\n\n reportInstanceMoved: function(index) {\n var instance = this.instances[index];\n if (instance === emptyInstance)\n return;\n\n this.instancePositionChangedFn_(instance.templateInstance_, index);\n },\n\n reportInstancesMoved: function(splices) {\n var index = 0;\n var offset = 0;\n for (var i = 0; i < splices.length; i++) {\n var splice = splices[i];\n if (offset != 0) {\n while (index < splice.index) {\n this.reportInstanceMoved(index);\n index++;\n }\n } else {\n index = splice.index;\n }\n\n while (index < splice.index + splice.addedCount) {\n this.reportInstanceMoved(index);\n index++;\n }\n\n offset += splice.addedCount - splice.removed.length;\n }\n\n if (offset == 0)\n return;\n\n var length = this.instances.length;\n while (index < length) {\n this.reportInstanceMoved(index);\n index++;\n }\n },\n\n closeInstanceBindings: function(instance) {\n var bindings = instance.bindings_;\n for (var i = 0; i < bindings.length; i++) {\n bindings[i].close();\n }\n },\n\n unobserve: function() {\n if (!this.arrayObserver)\n return;\n\n this.arrayObserver.close();\n this.arrayObserver = undefined;\n },\n\n close: function() {\n if (this.closed)\n return;\n this.unobserve();\n for (var i = 0; i < this.instances.length; i++) {\n this.closeInstanceBindings(this.instances[i]);\n }\n\n this.instances.length = 0;\n this.closeDeps();\n this.templateElement_.iterator_ = undefined;\n this.closed = true;\n }\n };\n\n // Polyfill-specific API.\n HTMLTemplateElement.forAllTemplatesFrom_ = forAllTemplatesFrom;\n})(this);\n","/*\n * Copyright (c) 2014 The Polymer Project Authors. All rights reserved.\n * This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt\n * The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt\n * The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt\n * Code distributed by Google as part of the polymer project is also\n * subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt\n */\n\n(function(scope) {\n\n// inject style sheet\nvar style = document.createElement('style');\nstyle.textContent = 'template {display: none !important;} /* injected by platform.js */';\nvar head = document.querySelector('head');\nhead.insertBefore(style, head.firstChild);\n\n// flush (with logging)\nvar flushing;\nfunction flush() {\n if (!flushing) {\n flushing = true;\n scope.endOfMicrotask(function() {\n flushing = false;\n logFlags.data && console.group('Platform.flush()');\n scope.performMicrotaskCheckpoint();\n logFlags.data && console.groupEnd();\n });\n }\n};\n\n// polling dirty checker\n// flush periodically if platform does not have object observe.\nif (!Observer.hasObjectObserve) {\n var FLUSH_POLL_INTERVAL = 125;\n window.addEventListener('WebComponentsReady', function() {\n flush();\n scope.flushPoll = setInterval(flush, FLUSH_POLL_INTERVAL);\n });\n} else {\n // make flush a no-op when we have Object.observe\n flush = function() {};\n}\n\nif (window.CustomElements && !CustomElements.useNative) {\n var originalImportNode = Document.prototype.importNode;\n Document.prototype.importNode = function(node, deep) {\n var imported = originalImportNode.call(this, node, deep);\n CustomElements.upgradeAll(imported);\n return imported;\n }\n}\n\n// exports\nscope.flush = flush;\n\n})(window.Platform);\n\n"]}
\ No newline at end of file diff --git a/third_party/polymer/components/web-animations-js/.bower.json b/third_party/polymer/components/web-animations-js/.bower.json deleted file mode 100644 index b02edc5..0000000 --- a/third_party/polymer/components/web-animations-js/.bower.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "name": "web-animations-js", - "homepage": "https://github.com/web-animations/web-animations-js", - "_release": "7605c531e2", - "_resolution": { - "type": "commit", - "commit": "7605c531e22b9a61b4d708c0bc17793bac1cd7ff" - }, - "_source": "git://github.com/web-animations/web-animations-js.git", - "_target": "7605c531e22b9a61b4d708c0bc17793bac1cd7ff", - "_originalSource": "web-animations/web-animations-js" -}
\ No newline at end of file diff --git a/third_party/polymer/components/web-animations-js/.gitignore b/third_party/polymer/components/web-animations-js/.gitignore deleted file mode 100644 index f0f51a0..0000000 --- a/third_party/polymer/components/web-animations-js/.gitignore +++ /dev/null @@ -1,12 +0,0 @@ -*.pyc -*~ -.nfs* -.*.swp -.*.swo -*.pyc* -*.log* -tools/* -.testrepository -*.png -web-animations-4lint.js -load-list.txt diff --git a/third_party/polymer/components/web-animations-js/.gitmodules b/third_party/polymer/components/web-animations-js/.gitmodules deleted file mode 100644 index cf532e7..0000000 --- a/third_party/polymer/components/web-animations-js/.gitmodules +++ /dev/null @@ -1,15 +0,0 @@ -[submodule "test/testharness"] - path = test/testharness - url = https://github.com/jgraham/testharness.js.git -[submodule "test/coverage/istanbul"] - path = test/coverage/istanbul - url = https://github.com/gotwarlost/istanbul -[submodule "test/coverage/escodegen"] - path = test/coverage/escodegen - url = https://github.com/Constellation/escodegen -[submodule "test/coverage/esprima"] - path = test/coverage/esprima - url = https://github.com/ariya/esprima -[submodule "test/browserdetect"] - path = test/browserdetect - url = https://github.com/web-animations/bowser.git diff --git a/third_party/polymer/components/web-animations-js/.testr.conf b/third_party/polymer/components/web-animations-js/.testr.conf deleted file mode 100644 index 7969a00..0000000 --- a/third_party/polymer/components/web-animations-js/.testr.conf +++ /dev/null @@ -1,4 +0,0 @@ -[DEFAULT] -test_command=python run-tests.py -b Chrome --subunit $LISTOPT $IDOPTION -test_list_option=--list -test_id_option=--load-list $IDFILE diff --git a/third_party/polymer/components/web-animations-js/.travis-run.sh b/third_party/polymer/components/web-animations-js/.travis-run.sh deleted file mode 100755 index 24c204c..0000000 --- a/third_party/polymer/components/web-animations-js/.travis-run.sh +++ /dev/null @@ -1,29 +0,0 @@ -#! /bin/bash - -set -x - -if [ x$MODE == x'check' ]; then - SUCCESS=0 - - # Check that the testcases json file has been updated - echo "Checking test cases is up to date..." - python ./test/update-testcases.py --dry-run - let "SUCCESS += $?" - - # Check that the web-animations.js file passes lint checks - ./run-lint.sh - let "SUCCESS += $?" - - exit $SUCCESS -else - # For pull requests we don't have access to secure environment variables, so we just return true. - if [ x$BROWSER == "xRemote" -a x$SAUCE_ACCESS_KEY == x"" ]; then - exit 0 - fi - - if [ x$BROWSER == "xAndroid-Chrome" ]; then - echo ./run-tests-android.sh $ARGS | bash || exit 1 - else - echo ./run-tests.sh $ARGS | bash || exit 1 - fi -fi diff --git a/third_party/polymer/components/web-animations-js/.travis-setup.sh b/third_party/polymer/components/web-animations-js/.travis-setup.sh deleted file mode 100755 index 093488a..0000000 --- a/third_party/polymer/components/web-animations-js/.travis-setup.sh +++ /dev/null @@ -1,83 +0,0 @@ -#! /bin/bash - -set -x -set -e - -# Make sure /dev/shm has correct permissions. -ls -l /dev/shm -sudo chmod 1777 /dev/shm -ls -l /dev/shm - -uname -a -cat /etc/lsb-release - -sudo apt-get update --fix-missing - -# Install python-imaging from the environment rather then build it. -# If the below fails, pip will build it via the requirements.txt -sudo apt-get install python-imaging -VIRTUAL_ENV_site_packages=$(echo $VIRTUAL_ENV/lib/*/site-packages) -VIRTUAL_ENV_python_version=$(echo $VIRTUAL_ENV_site_packages | sed -e's@.*/\(.*\)/site-packages@\1@') -ln -s /usr/lib/$VIRTUAL_ENV_python_version/dist-packages/PIL.pth $VIRTUAL_ENV_site_packages/PIL.pth -ln -s /usr/lib/$VIRTUAL_ENV_python_version/dist-packages/PIL $VIRTUAL_ENV_site_packages/PIL - -export VERSION=$(echo $BROWSER | sed -e's/[^-]*-//') -export BROWSER=$(echo $BROWSER | sed -e's/-.*//') - -echo BROWSER=$BROWSER -echo VERSION=$VERSION - -sudo ln -sf $(which true) $(which xdg-desktop-menu) - -case $BROWSER in -Android) - sudo apt-get install -qq --force-yes \ - libc6:i386 libgcc1:i386 gcc-4.6-base:i386 libstdc++5:i386 \ - libstdc++6:i386 lib32z1 libreadline6-dev:i386 \ - libncurses5-dev:i386 - bash tools/android/setup.sh - ;; - -Chrome) - echo "Getting $VERSION of $BROWSER" - export CHROME=google-chrome-${VERSION}_current_amd64.deb - wget https://dl.google.com/linux/direct/$CHROME - sudo dpkg --install $CHROME || sudo apt-get -f install - which google-chrome - ls -l `which google-chrome` - - if [ -f /opt/google/chrome/chrome-sandbox ]; then - export CHROME_SANDBOX=/opt/google/chrome/chrome-sandbox - else - export CHROME_SANDBOX=$(ls /opt/google/chrome*/chrome-sandbox) - fi - - # Download a custom chrome-sandbox which works inside OpenVC containers (used on travis). - sudo rm -f $CHROME_SANDBOX - sudo wget https://googledrive.com/host/0B5VlNZ_Rvdw6NTJoZDBSVy1ZdkE -O $CHROME_SANDBOX - sudo chown root:root $CHROME_SANDBOX; sudo chmod 4755 $CHROME_SANDBOX - sudo md5sum $CHROME_SANDBOX - - google-chrome --version - ;; - -Firefox) - sudo rm -f /usr/local/bin/firefox - case $VERSION in - beta) - yes "\n" | sudo add-apt-repository -y ppa:mozillateam/firefox-next - ;; - aurora) - yes "\n" | sudo add-apt-repository -y ppa:ubuntu-mozilla-daily/firefox-aurora - ;; - esac - sudo apt-get update --fix-missing - sudo apt-get install firefox - which firefox - ls -l `which firefox` - firefox --version - ;; -esac - -R=tools/python/requirements.txt -pip install -r $R --use-mirrors || pip install -r $R diff --git a/third_party/polymer/components/web-animations-js/.travis.yml b/third_party/polymer/components/web-animations-js/.travis.yml deleted file mode 100644 index a23e669..0000000 --- a/third_party/polymer/components/web-animations-js/.travis.yml +++ /dev/null @@ -1,50 +0,0 @@ -language: python - -env: - global: - - secure: "bM0peKHrlwFKXxrajgJb/qP+au1JnrUHtqGrwSe1pGV4vdK24P0/JWwa02wBgysqLkWyhOZSdPARP+AQwuyeo2uTBZsNArkNBob+3kBZJMIMa8UY2xuPM7km+XmQLur9X9Z9iR89hC/5hUbv0z2C57O2BzsRCTSK2dNs4K/dc5A=" # alancutter/web-animations-js - - secure: "GySwb9k2LVdRXwj6Ben8kt9qJ9q682TNHUVd/b2R7PR723o08jMGNoQldLAHTmTuLD77g8yb6JQGZRW9TTB1Rz/gqNHRWV3Uwj98HZ+RAUhgb4M+sEDcoEi5GXSZBzAX5bK3Eqa2WOLxWSno7yOBIxpFfJEixFo8l3R/EpXcOYQ=" # dstockwell/web-animations-js - - secure: "CavzDoVPfR5zYYudQJdRMxrfyMuXzwDv6lGuhti4TFW4MbK4u+cXFnuryhADVGBZacISs/TtIGJ9fzbvYvqEDovDBUNaXvpr6bL7Qxg2T74Q+EE/f+LLgkhz4jtKEFqxLuz+vQDapzfBAIE+nZpQMIr1FX32yewNqleFsSW1oXs=" # mithro/web-animations-js - - secure: "OWULN5n4QlXak8aAyH8YjSndZI736zlYJTLNpPpM2m2RDZGPwfNr27as5VBWkmXRcfOgtfD5bUvmbZMP4n0zpphz4Y4rFHZ0Qj/ftzJmA9NrKSOfVmubXWIq9GdaeGlzop+Zpo0uvrl1/U1ro4aNojZZQ+wW1LKysziaGGhukHU=" # web-animations/web-animations-js - - matrix: - - MODE='check' - - BROWSER=Android-Chrome ARGS='' - - BROWSER=Chrome-stable ARGS='-x -b Chrome -u' - - BROWSER=Chrome-beta ARGS='-x -b Chrome -u' - - BROWSER=Chrome-unstable ARGS='-x -b Chrome -u' - - BROWSER=Chrome-unstable ARGS='-x -b Chrome -u --flag=--enable-experimental-web-platform-features' - - BROWSER=Firefox-stable ARGS='-x -b Firefox -u' - - BROWSER=Firefox-beta ARGS='-x -b Firefox -u' - - BROWSER=Firefox-aurora ARGS='-x -b Firefox -u' - - BROWSER=Remote ARGS='--verbose -b Remote --sauce --remote-caps=INTERNETEXPLORER --remote-caps=version=10 --remote-caps=platform="Windows 8"' - - BROWSER=Remote ARGS='--verbose -b Remote --sauce --remote-caps=SAFARI --remote-caps=version=6 --remote-caps=platform="OS X 10.8"' - - BROWSER=Remote ARGS='--verbose -b Remote --sauce --remote-caps=IPHONE --remote-caps=version=6 --remote-caps=platform="OS X 10.8"' - - BROWSER=Remote ARGS='--verbose -b Remote --sauce --remote-caps=ANDROID --remote-caps=version=4.0 --remote-caps=platform=Linux' - -matrix: -# Disabled until travis-ci/travis-ci#1696 is fixed. -# fast_finish: true - allow_failures: - - env: BROWSER=Android-Chrome ARGS='' - - env: BROWSER=Remote ARGS='--verbose -b Remote --sauce --remote-caps=INTERNETEXPLORER --remote-caps=version=10 --remote-caps=platform="Windows 8"' - - env: BROWSER=Remote ARGS='--verbose -b Remote --sauce --remote-caps=SAFARI --remote-caps=version=6 --remote-caps=platform="OS X 10.8"' - - env: BROWSER=Remote ARGS='--verbose -b Remote --sauce --remote-caps=IPHONE --remote-caps=version=6 --remote-caps=platform="OS X 10.8"' - - env: BROWSER=Remote ARGS='--verbose -b Remote --sauce --remote-caps=ANDROID --remote-caps=version=4.0 --remote-caps=platform=Linux' - # Firefox Aurora PPA has stopped updating as of 2014-06-09, sent email to ubuntu-mozilla-daily@lists.launchpad.net regarding issue. - - env: BROWSER=Firefox-aurora ARGS='-x -b Firefox -u' - -notifications: - irc: "irc.freenode.org#webanimations" - skip_join: true - template: - - "%{repository}#%{build_number} %{branch}: %{message}" - -install: - - ./.travis-setup.sh - -script: - - ./.travis-run.sh - -after_failure: - - for file in *.log; do echo $file; echo "======================"; cat $file; done || true diff --git a/third_party/polymer/components/web-animations-js/COPYING b/third_party/polymer/components/web-animations-js/COPYING deleted file mode 100644 index d645695..0000000 --- a/third_party/polymer/components/web-animations-js/COPYING +++ /dev/null @@ -1,202 +0,0 @@ - - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright [yyyy] [name of copyright owner] - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. diff --git a/third_party/polymer/components/web-animations-js/README.md b/third_party/polymer/components/web-animations-js/README.md deleted file mode 100644 index 2c5e49b..0000000 --- a/third_party/polymer/components/web-animations-js/README.md +++ /dev/null @@ -1,237 +0,0 @@ -[![Build Status](https://travis-ci.org/web-animations/web-animations-js.png?branch=master)](https://travis-ci.org/web-animations/web-animations-js) - -Latest specification at http://w3c.github.io/web-animations/. - -## Learn the tech - -### Why Web Animations? - -Four animation-related specifications already exist on the web platform: [CSS Transitions](http://dev.w3.org/csswg/css-transitions/), -[CSS Animations](http://dev.w3.org/csswg/css-animations/), [SVG Animations](http://www.w3.org/TR/SVG/animate.html) / [SMIL](http://www.w3.org/TR/2001/REC-smil-animation-20010904/), and `requestAnimationFrame()`. However: - -- *CSS Transitions / CSS Animations are not very expressive* - animations can't -be composed, or sequenced, or even reliably run in parallel; and animations can't be tweaked from script. -- *SVG Animations are very expressive, but also very complicated*. SVG Animations -can't be applied to HTML content. -- *`requestAnimationFrame()` is not a declarative approach* - it requires the use -of the main thread, and will therefore jank if the main thread is busy. - -Web Animations is a new specification for animated content on the web. It's being -developed as a W3C specification as part of the CSS and SVG working groups. It aims -to address the deficiencies inherent in these four specifications. Web Animations also aims to replace the underlying implementations of CSS Transitions, CSS Animations and SVG Animations, so that: - -- The code cost of supporting animations on the web is reduced. -- The various animations specifications are interoperable. -- Spec authors and browser vendors have a single place to experiment with new animation innovations to improve the Web for the future. - -### Basic usage - -Here's a simple example of an animation that scales and changes the opacity of -a `<div>` over 0.5 seconds. The animation alternates producing a pulsing effect. - - <div class="pulse" style="width:150px;">Hello world!</div> - <script> - var elem = document.querySelector('.pulse'); - var player = document.timeline.play(new Animation(elem, [ - {opacity: "0.5", transform: "scale(0.5)"}, - {opacity: "1.0", transform: "scale(1)"} - ], - { - direction: "alternate", duration: 500, iterations: Infinity - })); - </script> - -### The animation model - -The Web Animations model is a description of an engine for animation content on the web. The engine is sufficiently powerful to support CSS Transitions, CSS Animations and SVG Animations. - -Web Animations also exposes a JS API to the model. This API defines a number of -new interfaces that are exposed to JavaScript. We'll go through some of the more -important ones here: Animations, AnimationEffects, TimingDictionaries, TimingGroups, and AnimationPlayers. - -An `Animation` object defines a single animation effect that applies to a single element target. For example: - - var animation = new Animation(targetElement, - [{left: '0px'}, {left: '100px'}], 2000); - -Here, the target element's "left" CSS property is modified smoothly from `0px` to `100px` over 2 seconds. - -### Specifying animation effects - -An `AnimationEffect` object controls which CSS properties and SVG attributes are -modified by an animation, and the values that those properties and attributes -vary between. AnimationEffect objects also control whether the effect replaces -or adds to the underlying value. - -There are three major kinds of effects: `KeyframeEffect`, `MotionPathEffect`, and `EffectCallback`. - -#### Animating between keyframes - -A `KeyframeEffect` controls one or more properties/attributes by linearly -interpolating values between specified keyframes. KeyframeEffects are usually -defined by specifying the keyframe offset and the property-value pair in a -dictionary: - - [ - {offset: 0.2, left: "35px"}, - {offset: 0.6, left: "50px"}, - {offset: 0.9, left: "70px"}, - ] - -If the offset is not specified, keyframes are evenly distributed at offsets -between 0 and 1. - - [{left: "35px"}, {left: "50px"}, {left: "70px"}] - -See the [specification](http://www.w3.org/TR/web-animations/#keyframe-animation-effects) for the details -of the keyframe distribution procedure, and how KeyframeEffects are -evaluated at offsets outside those specified by the keyframes. - -#### Animating along paths - -A `MotionPathEffect` allows elements to be animated along SVG-style paths. For example: - - <svg xmlns="http://www.w3.org/2000/svg" version="1.1"> - <defs> - <path id=path d="M 100,100 a 75,75 0 1,0 150,0 a 75,75 0 1,0 -150,0"/> - </defs> - </svg> - <script> - var animFunc = new MotionPathEffect(document.querySelector('#path').pathSegList); - var animation = new Animation(targetElement, animFunc, 2000); - </script> - -#### Custom animation effects - -An `EffectCallback` allows animations to generate call-outs to JavaScript -rather than manipulating properties directly. Please see the -[specification](http://www.w3.org/TR/web-animations/#custom-effects) for more details on this -feature. - -### Sequencing and synchronizing animations - -Two different types of TimingGroups (`AnimationGroup` and `AnimationSequence`) allow animations to be synchronized and sequenced. - -To play a list of animations in parallel: - - var animationGroup = new AnimationGroup([new Animation(...), new Animation(...)]); - -To play a list in sequence: - - var animationSequence = new AnimationSequence([new Animation(...), new Animation(...)]); - -Because `Animation`, `AnimationGroup`, `AnimationSequence` are all TimedItems, groups can be nested: - - var animationGroup = new AnimationGroup([ - new AnimationSequence([ - new Animation(...), - new Animation(...), - ]), - new Animation(...) - ]); - -Groups also take an optional TimingDictionary parameter (see below), which among other things allows iteration and timing functions to apply at the group level: - - var animationGroup = new AnimationGroup([new Animation(...), new Animation(...)], {iterations: 4}); - -### Controlling the animation timing - -TimingDictionaries are used to control the internal timing of an animation (players control how an animation progresses relative to document time). TimingDictionaries have several properties that can be tweaked: - -- **duration**: the duration of a single iteration of the animation -- **iterations**: the number of iterations of the animation that will be played (fractional iterations are allowed) -- **iterationStart**: the start offset of the first iteration -- **fill**: whether the animation has effect before starting the first iteration and/or after finishing the final iteration -- **delay**: the time between the animation's start time and the first animation effect of the animation -- **playbackRate**: the rate at which the animation progresses relative to external time -- **direction**: the direction in which successive iterations of the animation play back -- **easing**: fine-grained control over how external time impacts an animation across the total active duration of the animation. - -The values provided within TimingDictionaries combine with the animation hierarchy -to generate concrete start and end values for animation iterations, animation -backwards fills, and animation forwards fills. There are a few simple rules which govern this: - -- Animations never extend beyond the start or end values of their parent iteration. -- Animations only fill beyond their parent iteration if: - - the relevant fill value is selected for the animation; - - the matching fill value is selected for the parent; and - - this is the first parent iteration (for `fill: 'backwards'`) or last parent iteration (for `fill: 'forwards'`) -- Missing `duration` values for TimingGroups are generated based on the calculated durations of the child animations. - -The following example illustrates these rules: - - var animationGroup = new AnimationGroup([ - new AnimationSequence([ - new Animation(..., {duration: 3000}), - new Animation(..., {duration: 5000, fill: 'both'}) - ], {duration: 6000, delay: 3000, fill: 'none'}), - new Animation(..., {duration: 8000, fill: 'forwards'}) - ], {iterations: 2, fill: 'forwards'}); - -In this example: - -- The `AnimationSequence` has an explicit `duration` of 6 seconds, and so the -second child animation will only play for the first 3 of its 5 second duration -- The `AnimationGroup` has no explicit duration, and will be provided with a -calculated duration of the max (`duration + delay`) of its children - in this case 9 seconds. -- Although `fill: "both"` is specified for the second `Animation` within the `AnimationSequence`, the `AnimationSequence` itself has a `fill` of "none". Hence, as the animation ends right at the end of the `AnimationSequence`, the animation will only fill backwards, and only up until the boundary of the `AnimationSequence` (i.e. 3 seconds after the start of the `AnimationGroup`). -- The `Animation` inside the `AnimationGroup` and the `AnimationGroup` are both `fill: "forwards"`. Therefore the animation will fill forward in two places: - - from 8 seconds after the `AnimationGroup` starts until the second iteration of the `AnimationGroup` starts (i.e. for 1 second) - - from 17 seconds after the `AnimationGroup` starts, extending forward indefinitely. - -### Playing Animations - -In order to play an `Animation` or `TimingGroup`, an `AnimationPlayer` must be constructed: - - var player = document.timeline.play(myAnimation); - -AnimationPlayers provide complete control the start time and current playback head of their attached animation. However, players can't modify any internal details of an animation. - -AnimationPlayers can be used to pause, seek, reverse, or modify the playback rate of an animation. - -`document.timeline.currentTime` is a timeline's global time. It gives the number -of seconds since the document fired its load event. - -## Polyfill details - -### Getting started - -Include `web-animations.js` in your project: - - <script src="web-animations-js/web-animations.js"></script> - -### Polyfill notes - -#### Prefix handling - -In order to work in as many browsers as feasible, we have decided to take the -following approach to prefix handling: - -- the polyfill will automatically detect the correctly prefixed name to use when -writing animated properties back to the platform. -- where possible, the polyfill will *only* accept unprefixed versions of experimental features. For example: - - var animation = new Animation(elem, {"transform": "translate(100px, 100px)"}, 2000); - - will work in all browsers that implement a conforming version of `transform`, but - - var animation = new Animation(elem, {"-webkit-transform": "translate(100px, 100px)"}, 2000); - - will not work anywhere. - -#### Experimental features - -When the polyfill requires features to implement functionality that is not inherently specified using those -features (for example, CSS `calc()` is required in order to implement merging between lengths with different units) -then the polyfill will provide a console warning in browsers where these features are absent. - -## Tools & testing - -For running tests or building minified files, consult the -[tooling information](http://www.polymer-project.org/resources/tooling-strategy.html). - -## Breaking changes - -When we make a potentially breaking change to the polyfill's API surface (like a rename) we'll continue supporting the old version, deprecated, for three months and ensure that there are console warnings that a change is pending. After three months, the old version of the API surface (e.g. the old version of a function name) will be removed. If you see deprecation warnings you can't avoid it by not updating. - -We also announce anything that isn't a bug fix on web-animations-changes@googlegroups.com (https://groups.google.com/forum/#!forum/web-animations-changes). diff --git a/third_party/polymer/components/web-animations-js/run-lint.sh b/third_party/polymer/components/web-animations-js/run-lint.sh deleted file mode 100755 index 832a30a..0000000 --- a/third_party/polymer/components/web-animations-js/run-lint.sh +++ /dev/null @@ -1,19 +0,0 @@ -#! /bin/bash - -# Update git submodules -git submodule init -git submodule update - -# If already in a VIRTUAL_ENV assume the person knows what they are doing, -# otherwise set up a python virtualenv with all the needed requirements. -if [ x$VIRTUAL_ENV == x"" ]; then - cd tools/python - source setup.sh - cd ../.. -fi - -# Comment out the (function() {} ) wrapper -sed -e'17s-^-//-' -e'$s-^-//-' web-animations.js > web-animations-4lint.js - -gjslint --summary --nojsdoc web-animations-4lint.js -exit $? diff --git a/third_party/polymer/components/web-animations-js/run-tests-android.sh b/third_party/polymer/components/web-animations-js/run-tests-android.sh deleted file mode 100755 index e7aacea..0000000 --- a/third_party/polymer/components/web-animations-js/run-tests-android.sh +++ /dev/null @@ -1,25 +0,0 @@ -#! /bin/bash - -# Update git submodules -git submodule init -git submodule update - -# Set up the android environment -source tools/android/setup.sh - -function run_tests() { - ./run-tests.sh \ - -b Remote \ - --remote-executor http://localhost:9515 \ - --remote-caps="chromeOptions=androidPackage=$CHROME_APP" \ - --load-list load-list.txt \ - --verbose || exit 1 -} - -# We split the test runs into two groups to avoid running out of memory in Travis. -echo "^[a].*" > load-list.txt -run_tests -echo "^[^a].*" > load-list.txt -run_tests - -echo "Run $ANDROID_DIR/stop.sh if finished." diff --git a/third_party/polymer/components/web-animations-js/run-tests.sh b/third_party/polymer/components/web-animations-js/run-tests.sh deleted file mode 100755 index 92709dc..0000000 --- a/third_party/polymer/components/web-animations-js/run-tests.sh +++ /dev/null @@ -1,15 +0,0 @@ -#! /bin/bash - -# Update git submodules -git submodule init -git submodule update - -# If already in a VIRTUAL_ENV assume the person knows what they are doing, -# otherwise set up a python virtualenv with all the needed requirements. -if [ x$VIRTUAL_ENV == x"" ]; then - cd tools/python - source setup.sh - cd ../.. -fi - -exec python tools/python/run-tests.py "$@" diff --git a/third_party/polymer/components/web-animations-js/test/bootstrap.js b/third_party/polymer/components/web-animations-js/test/bootstrap.js deleted file mode 100644 index 224045f..0000000 --- a/third_party/polymer/components/web-animations-js/test/bootstrap.js +++ /dev/null @@ -1,1266 +0,0 @@ -/** - * Copyright 2013 Google Inc. All Rights Reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -'use strict'; - -(function() { - -var log_element = document.createElement('pre'); -log_element.id = 'debug'; - -var log_element_parent = setInterval(function() { - if (log_element.parentNode == null && document.body != null) { - document.body.appendChild(log_element); - clearInterval(log_element_parent); - } -}, 100); - -function log() { - - var output = []; - for (var i = 0; i < arguments.length; i++) { - if (typeof arguments[i] === "function") { - arguments[i] = '' + arguments[i]; - } - if (typeof arguments[i] === "string") { - var bits = arguments[i].replace(/\s*$/, '').split('\n'); - if (bits.length > 5) { - bits.splice(3, bits.length-5, '...'); - } - output.push(bits.join('\n')); - } else if (typeof arguments[i] === "object" && typeof arguments[i].name === "string") { - output.push('"'+arguments[i].name+'"'); - } else { - output.push(JSON.stringify(arguments[i], undefined, 2)); - } - output.push(' '); - } - log_element.appendChild(document.createTextNode(output.join('') + '\n')); -} - -var thisScript = document.querySelector("script[src$='bootstrap.js']"); -var coverageMode = Boolean(parent.window.__coverage__) || /coverage/.test(window.location.hash); - -// Inherit these properties from the parent test-runner if any. -window.__resources__ = parent.window.__resources__ || {original: {}}; -window.__coverage__ = parent.window.__coverage__; - -function getSync(src) { - var xhr = new XMLHttpRequest(); - xhr.open('GET', src, false); - xhr.send(); - if (xhr.responseCode > 400) { - console.error('Error loading ' + src); - return ''; - } - return xhr.responseText; -} - -function loadScript(src, options) { - // Add changing parameter to prevent script caching. - options = options || {coverage: true}; - if (window.__resources__[src]) { - document.write('<script type="text/javascript">eval(window.__resources__["'+src+'"]);</script>'); - } else if (coverageMode && options.coverage) { - instrument(src); - loadScript(src); - } else { - if (!inExploreMode()) { - src += '?' + getCacheBuster(); - } - document.write('<script type="text/javascript" src="'+ src + '"></script>'); - } -} - -function loadCSS(src) { - document.write('<link rel="stylesheet" type="text/css" href="' + src + '">'); -} - -function forEach(array, callback, thisObj) { - for (var i=0; i < array.length; i++) { - if (array.hasOwnProperty(i)) { - callback.call(thisObj, array[i], i, array); - } - } -} - -function hasFlag(flag) { - return thisScript && thisScript.getAttribute(flag) !== null; -} - -function testType() { - var p = location.pathname; - p = p.replace(/^disabled-/, ''); - - var match = /(auto|impl|manual|unit)-test[^\\\/]*$/.exec(p); - return match ? match[1]: 'unknown'; -} - -function inExploreMode() { - return '#explore' == window.location.hash || window.location.hash.length == 0; -} - -/** - * Get a value for busting the cache. If we got given a cache buster, pass it - * along, otherwise generate a new one. - */ -var cacheBusterValue = '' + window.Date.now(); -function getCacheBuster() { - if (window.location.search.length > 0) - cacheBusterValue = window.location.search.substr(1, window.location.search.length); - return cacheBusterValue; -} - -var instrumentationDepsLoaded = false; -/** - * Instrument the source at {@code location} and store it in - * {@code window.__resources__[name]}. - */ -function instrument(src) { - if (__resources__[src]) { - return; - } - if (!instrumentationDepsLoaded) { - instrumentationDepsLoaded = true; - (function() { - eval(getSync('../coverage/esprima/esprima.js')); - eval(getSync('../coverage/escodegen/escodegen.browser.js')); - eval(getSync('../coverage/istanbul/lib/instrumenter.js')); - }).call(window); - } - var js = getSync(src); - window.__resources__.original[src] = js; - var inst = window.__resources__[src] = new Instrumenter().instrumentSync(js, src); -} - -var svg_namespace_uri = 'http://www.w3.org/2000/svg'; - -/** - * Figure out a useful name for an element. - * - * @param {Element} element Element to get the name for. - * - * @private - */ -function _element_name(element) { - if (element.id) { - return element.tagName.toLowerCase() + '#' + element.id; - } else { - return 'An anonymous ' + element.tagName.toLowerCase(); - } -} - -/** - * Get the style for a given element. - * - * @param {Array.<Object.<string, string>>|Object.<string, string>} style - * Either; - * * A list of dictionaries, each node returned is checked against the - * associated dictionary, or - * * A single dictionary, each node returned is checked against the - * given dictionary. - * Each dictionary should be of the form {style_name: style_value}. - * - * @private - */ -function _assert_style_get(style, i) { - if (typeof style[i] === 'undefined') { - return style; - } else { - return style[i]; - } -} - -/** - * Extract all the informative parts of a string. Ignores spacing, punctuation - * and other random extra characters. - */ -function _extract_important(input) { - var re = /([-+]?[0-9]+\.?[0-9]*(?:[eE][-+]?[0-9]+)?)|[A-Za-z%]+/g; - - var match; - var result = []; - while (match = re.exec(input)) { - var value = match[0]; - if (typeof match[1] != "undefined") { - value = Number(match[1]); - } - result.push(value); - } - return result; -} -window.assert_styles_extract_important = _extract_important; - -function AssertionError(message) { - this.message = message; -} -window.assert_styles_assertion_error = AssertionError; - -/** - * Asserts that a string is in the array of expected only comparing the - * important parts. Ignores spacing, punctuation and other random extra - * characters. - */ -function _assert_important_in_array(actual, expected, message) { - var actual_array = _extract_important(actual); - - var expected_array_array = []; - for (var i = 0; i < expected.length; i++) { - expected_array_array.push(_extract_important(expected[i])); - } - - var errors = []; - for (var i = 0; i < expected_array_array.length; i++) { - var expected_array = expected_array_array[i]; - - var element_errors = []; - if (actual_array.length != expected_array.length) { - element_errors.push('Number of elements don\'t match'); - } - - for (var j = 0; j < expected_array.length; j++) { - var actual = actual_array[j]; - var expected = expected_array[j]; - - try { - assert_equals(typeof actual, typeof expected); - - if (typeof actual === 'number') { - if (Math.abs(actual) < 1e-10) { - actual = 0; - } - actual = '' + actual.toPrecision(4); - } - if (typeof expected === 'number') { - if (Math.abs(expected) < 1e-10) { - expected = 0; - } - expected = '' + expected.toPrecision(4); - } - - assert_equals(actual, expected); - } catch (e) { - element_errors.push( - 'Element ' + j + ' - ' + e.message); - } - } - - if (element_errors.length == 0) { - return; - } else { - errors.push( - ' Expectation ' + JSON.stringify(expected_array) + ' did not match\n' + - ' ' + element_errors.join('\n ')); - } - } - if (expected_array_array.length > 1) - errors.unshift(' ' + expected_array_array.length + ' possible expectations'); - - errors.unshift(' Actual - ' + JSON.stringify(actual_array)); - if (typeof message !== 'undefined') { - errors.unshift(message); - } - throw new AssertionError(errors.join('\n')); -} -window.assert_styles_assert_important_in_array = _assert_important_in_array; - -/** - * asserts that actual has the same styles as the dictionary given by - * expected. - * - * @param {Element} object DOM node to check the styles on - * @param {Object.<string, string>} styles Dictionary of {style_name: style_value} to check - * on the object. - * @param {String} description Human readable description of what you are - * trying to check. - * - * @private - */ -function _assert_style_element(object, style, description) { - if (typeof message == 'undefined') - description = ''; - - // Create an element of the same type as testing so the style can be applied - // from the test. This is so the css property (not the -webkit-does-something - // tag) can be read. - var reference_element = (object.namespaceURI == svg_namespace_uri) ? - document.createElementNS(svg_namespace_uri, object.nodeName) : - document.createElement(object.nodeName); - var computedObjectStyle = getComputedStyle(object, null); - for (var i = 0; i < computedObjectStyle.length; i++) { - var property = computedObjectStyle[i]; - reference_element.style.setProperty(property, - computedObjectStyle.getPropertyValue(property)); - } - reference_element.style.position = 'absolute'; - if (object.parentNode) { - object.parentNode.appendChild(reference_element); - } - - try { - // Apply the style - for (var prop_name in style) { - // If the passed in value is an element then grab its current style for - // that property - if (style[prop_name] instanceof HTMLElement || - style[prop_name] instanceof SVGElement) { - - var prop_value = getComputedStyle(style[prop_name], null)[prop_name]; - } else { - var prop_value = style[prop_name]; - } - - prop_value = '' + prop_value; - - var output_prop_name = _WebAnimationsTestingUtilities._prefixProperty(prop_name); - - var is_svg = _WebAnimationsTestingUtilities._propertyIsSVGAttrib(prop_name, object); - if (is_svg) { - reference_element.setAttribute(prop_name, prop_value); - - var current_style = object.attributes; - var target_style = reference_element.attributes; - } else { - reference_element.style[output_prop_name] = prop_value; - - var current_style = computedObjectStyle; - var target_style = getComputedStyle(reference_element, null); - - _assert_important_in_array( - prop_value, [reference_element.style[output_prop_name], target_style[output_prop_name]], - 'Tried to set the reference element\'s '+ output_prop_name + - ' to ' + JSON.stringify(prop_value) + - ' but neither the style' + - ' ' + JSON.stringify(reference_element.style[output_prop_name]) + - ' nor computedStyle ' + JSON.stringify(target) + - ' ended up matching requested value.'); - } - - if (prop_name == 'ctm') { - var ctm = object.getCTM(); - var curr = '{' + ctm.a + ', ' + - ctm.b + ', ' + ctm.c + ', ' + ctm.d + ', ' + - ctm.e + ', ' + ctm.f + '}'; - - var target = prop_value; - - } else if (is_svg) { - var target = target_style[prop_name].value; - var curr = current_style[prop_name].value; - } else { - var target = target_style[output_prop_name]; - var curr = current_style[output_prop_name]; - } - - var description_extra = '\n Property ' + prop_name; - if (prop_name != output_prop_name) - description_extra += '(actually ' + output_prop_name + ')'; - - _assert_important_in_array(curr, [target], description + description_extra); - } - } finally { - if (reference_element.parentNode) { - reference_element.parentNode.removeChild(reference_element); - } - } -} - -/** - * asserts that elements in the list have given styles. - * - * @param {Array.<Element>} objects List of DOM nodes to check the styles on - * @param {Array.<Object.<string, string>>|Object.<string, string>} style - * See _assert_style_get for information. - * @param {String} description Human readable description of what you are - * trying to check. - * - * @private - */ -function _assert_style_element_list(objects, style, description) { - var error = ''; - forEach(objects, function(object, i) { - try { - _assert_style_element( - object, _assert_style_get(style, i), - description + ' ' + _element_name(object) - ); - } catch (e) { - if (error) { - error += '; '; - } - error += 'Element ' + _element_name(object) + ' at index ' + i + ' failed ' + e.message + '\n'; - } - }); - if (error) { - throw error; - } -} - -/** - * asserts that elements returned from a query selector have a list of styles. - * - * @param {string} qs A query selector to use to get the DOM nodes. - * @param {Array.<Object.<string, string>>|Object.<string, string>} style - * See _assert_style_get for information. - * @param {String} description Human readable description of what you are - * trying to check. - * - * @private - */ -function _assert_style_queryselector(qs, style, description) { - var objects = document.querySelectorAll(qs); - assert_true(objects.length > 0, description + - ' is invalid, no elements match query selector: ' + qs); - _assert_style_element_list(objects, style, description); -} - -/** - * asserts that elements returned from a query selector have a list of styles. - * - * Assert the element with id #hello is 100px wide; - * assert_styles(document.getElementById('hello'), {'width': '100px'}) - * assert_styles('#hello'), {'width': '100px'}) - * - * Assert all divs are 100px wide; - * assert_styles(document.getElementsByTagName('div'), {'width': '100px'}) - * assert_styles('div', {'width': '100px'}) - * - * Assert all objects with class 'red' are 100px wide; - * assert_styles(document.getElementsByClassName('red'), {'width': '100px'}) - * assert_styles('.red', {'width': '100px'}) - * - * Assert first div is 100px wide, second div is 200px wide; - * assert_styles(document.getElementsByTagName('div'), - * [{'width': '100px'}, {'width': '200px'}]) - * assert_styles('div', - * [{'width': '100px'}, {'width': '200px'}]) - * - * @param {string|Element|Array.<Element>} objects Either; - * * A query selector to use to get DOM nodes, - * * A DOM node. - * * A list of DOM nodes. - * @param {Array.<Object.<string, string>>|Object.<string, string>} style - * See _assert_style_get for information. - */ -function assert_styles(objects, style, description) { - switch (typeof objects) { - case 'string': - _assert_style_queryselector(objects, style, description); - break; - - case 'object': - if (objects instanceof Array || objects instanceof NodeList) { - _assert_style_element_list(objects, style, description); - } else if (objects instanceof Element) { - _assert_style_element(objects, style, description); - } else { - throw new Error('Expected Array, NodeList or Element but got ' + objects); - } - break; - } -} -window.assert_styles = assert_styles; - -/** - * Schedule something to be called at a given time. - * - * @constructor - * @param {number} millis Milliseconds after start at which the callback should - * be called. - * @param {bool} autostart Auto something... - */ -function TestTimelineGroup(millis) { - this.millis = millis; - - /** - * @type {bool} - */ - this.autorun_ = false; - - /** - * @type {!Array.<function(): ?Object>} - */ - this.startCallbacks = null; - - /** - * Callbacks which are added after the timeline has started. We clear them - * when going backwards. - * - * @type {?Array.<function(): ?Object>} - */ - this.lateCallbacks = null; - - /** - * @type {Element} - */ - this.marker = document.createElement('img'); - /** - * @type {Element} - */ - this.info = document.createElement('div'); - - this.setup_(); -} - -TestTimelineGroup.prototype.setup_ = function() { - this.endTime_ = 0; - this.startCallbacks = new Array(); - this.lateCallbacks = null; - this.marker.innerHTML = ''; - this.info.innerHTML = ''; -}; - -/** - * Add a new callback to the event group - * - * @param {function(): ?Object} callback Callback given the currentTime of - * callback. - */ -TestTimelineGroup.prototype.add = function(callback) { - if (this.lateCallbacks === null) { - this.startCallbacks.unshift(callback); - } else { - this.lateCallbacks.unshift(callback); - } - - // Trim out extra 'function() { ... }' - var callbackString = callback.name; - // FIXME: This should probably unindent too.... - this.info.innerHTML += '<div>' + callbackString + '</div>'; -}; - -/** - * Reset this event group to the state before start was called. - */ -TestTimelineGroup.prototype.reset = function() { - this.lateCallbacks = null; - - var callbacks = this.startCallbacks.slice(0); - this.setup_(); - while (callbacks.length > 0) { - var callback = callbacks.shift(); - this.add(callback); - } -}; - -/** - * Tell the event group that the timeline has started and that any callbacks - * added from now are dynamically generated and hence should be cleared when a - * reset is called. - */ -TestTimelineGroup.prototype.start = function() { - this.lateCallbacks = new Array(); -}; - -/** - * Call all the callbacks in the EventGroup. - */ -TestTimelineGroup.prototype.call = function() { - var callbacks = (this.startCallbacks.slice(0)).concat(this.lateCallbacks); - var statuses = this.info.children; - - var overallResult = true; - while (callbacks.length > 0) { - var callback = callbacks.pop(); - - var status_ = statuses[statuses.length - callbacks.length - 1]; - - if (typeof callback == 'function') { - log('TestTimelineGroup', 'calling function', callback); - try { - callback(); - } catch (e) { - // On IE the only way to get the real stack is to do this - window.onerror(e.message, e.fileName, e.lineNumber, e); - // On other browsers we want to throw the error later - setTimeout(function () { throw e; }, 0); - } - } else { - log('TestTimelineGroup', 'calling test', callback); - var result = callback.step(callback.f); - callback.done(); - } - - if (result === undefined || result == null) { - overallResult = overallResult && true; - - status_.style.color = 'green'; - } else { - overallResult = overallResult && false; - status_.style.color = 'red'; - status_.innerHTML += '<div>' + result.toString() + '</div>'; - } - } - if (overallResult) { - this.marker.src = '../img/success.png'; - } else { - this.marker.src = '../img/error.png'; - } -} - -/** - * Draw the EventGroup's marker at the correct position on the timeline. - * - * FIXME(mithro): This mixes display and control :( - * - * @param {number} endTime The endtime of the timeline in millis. Used to - * display the marker at the right place on the timeline. - */ -TestTimelineGroup.prototype.draw = function(container, endTime) { - this.marker.title = this.millis + 'ms'; - this.marker.className = 'marker'; - this.marker.src = '../img/unknown.png'; - - var mleft = 'calc(100% - 10px)'; - if (endTime != 0) { - mleft = 'calc(' + (this.millis / endTime) * 100.0 + '%' + ' - 10px)'; - } - this.marker.style.left = mleft; - - container.appendChild(this.marker); - - this.info.className = 'info'; - container.appendChild(this.info); - - // Display details about the events at this time period when hovering over - // the marker. - this.marker.onmouseover = function() { - this.style.display = 'block'; - }.bind(this.info); - - this.marker.onmouseout = function() { - this.style.display = 'none'; - }.bind(this.info); - - - var offset = Math.ceil(this.info.offsetWidth / 2); - var ileft = 'calc(100% - ' + offset + 'px)'; - if (endTime != 0) { - ileft = 'calc(' + (this.millis / endTime) * 100.0 + '%' + ' - ' + offset + - 'px)'; - } - this.info.style.left = ileft; - - this.info.style.display = 'none'; -}; - - - -/** - * Moves the testharness_timeline in "real time". - * (IE 1 test second takes 1 real second). - * - * @constructor - */ -function RealtimeRunner(timeline) { - this.timeline = timeline; - - // Capture the real requestAnimationFrame so we can run in 'real time' mode - // rather than as fast as possible. - var nativeRequestAnimationFrame = window.requestAnimationFrame || window.mozRequestAnimationFrame; - this.boundRequestAnimationFrame = function(f) { - nativeRequestAnimationFrame(f.bind(this)) - }; - this.now = window.Date.now; - - this.zeroTime = null; // Time the page loaded - this.pauseStartTime = null; // Time at which we paused raf - this.timeDrift = 0; // Amount we have been stopped for -} - -/** - * Callback called from nativeRequestAnimationFrame. - * - * @private - * @param {number} timestamp The current time for the animation frame - * (in millis). - */ -RealtimeRunner.prototype.animationFrame_ = function(timestamp) { - if (this.zeroTime === null) { - this.zeroTime = timestamp; - } - - // Are we paused? Stop calling requestAnimationFrame. - if (this.pauseStartTime != null) { - return; - } - - var virtualAnimationTime = timestamp - this.zeroTime - this.timeDrift; - var endTime = this.timeline.endTime_; - // If we have no events paste t=0, endTime is going to be zero. Instead - // make the test run for 2 minutes. - if (endTime == 0) { - endTime = 120e3; - } - - // Do we still have time to go? - if (virtualAnimationTime < endTime) { - try { - this.timeline.setTime(virtualAnimationTime); - } finally { - this.boundRequestAnimationFrame(this.animationFrame_); - } - - } else { - // Have we gone past endTime_? Force the harness to its endTime_. - - this.timeline.setTime(endTime); - // Don't continue to raf - } -}; - -RealtimeRunner.prototype.start = function() { - if (this.pauseStartTime != null) { - this.timeDrift += (this.now() - this.pauseStartTime); - this.pauseStartTime = null; - } - this.boundRequestAnimationFrame(this.animationFrame_); -}; - -RealtimeRunner.prototype.pause = function() { - if (this.pauseStartTime != null) { - return; - } - this.pauseStartTime = this.now(); -}; - - -/** - * Class for storing events that happen during at given times (such as - * animation checks, or setTimeout). - * - * @constructor - */ -function TestTimeline(everyFrame) { - log('TestTimeline', 'constructor', everyFrame); - /** - * Stores the events which are upcoming. - * - * @type Object.<number, TestTimelineGroup> - * @private - */ - this.timeline_ = new Array(); - - this.everyFrame = everyFrame; - this.frameMillis = 1000.0 / 60; //60fps - - this.currentTime_ = -this.frameMillis; - - // Schedule an event at t=0, needed temporarily. - this.schedule(function() {}, 0); - - this.reset(); - - this.runner_ = new RealtimeRunner(this); -} - -/** - * Create the GUI controller for the timeline. - * @param {Element} body DOM element to add the GUI too, normally the <body> - * element. - */ -TestTimeline.prototype.createGUI = function(body) { - // HTML needed to create the timeline UI - this.div = document.createElement('div'); - this.div.id = 'timeline'; - - this.timelinebar = document.createElement('div'); - this.timelinebar.className = 'bar'; - - this.timelineprogress = document.createElement('div'); - this.timelineprogress.className = 'progress'; - - this.timelinebar.appendChild(this.timelineprogress); - this.div.appendChild(this.timelinebar); - - this.next = document.createElement('button'); - this.next.innerText = '>'; - this.next.id = 'next'; - this.next.onclick = this.toNextEvent.bind(this); - this.div.appendChild(this.next); - - this.prev = document.createElement('button'); - this.prev.innerText = '<'; - this.prev.id = 'prev'; - this.prev.onclick = this.toPrevEvent.bind(this); - this.div.appendChild(this.prev); - - this.control = document.createElement('button'); - this.control.innerText = 'Pause'; - this.control.id = 'control'; - this.control.onclick = function() { - if (this.control.innerText == 'Go!') { - this.runner_.start(); - this.control.innerText = 'Pause'; - } else { - this.runner_.pause(); - this.control.innerText = 'Go!'; - } - }.bind(this); - this.div.appendChild(this.control); - - body.appendChild(this.div); -} - -/** - * Update GUI elements. - * - * @private - */ -TestTimeline.prototype.updateGUI = function () { - // Update the timeline - var width = "100%"; - if (this.endTime_ != 0) { - width = (this.currentTime_ / this.endTime_) * 100.0 +'%' - } - this.timelineprogress.style.width = width; - this.timelinebar.title = (this.currentTime_).toFixed(0) + 'ms'; -}; - - -/** - * Sort the timeline into run order. Should be called after adding something to - * the timeline. - * - * @private - */ -TestTimeline.prototype.sort_ = function() { - this.timeline_.sort(function(a,b) { - return a.millis - b.millis; - }); -}; - -/** - * Schedule something to be called at a given time. - * - * @param {function(number)} callback Callback to call after the number of millis - * have elapsed. - * @param {number} millis Milliseconds after start at which the callback should - * be called. - */ -TestTimeline.prototype.schedule = function(callback, millis) { - log('TestTimeline', 'schedule', millis, callback); - if (millis < this.currentTime_) { - // Can't schedule something in the past? - return; - } - - // See if there is something at that time in the timeline already? - var timeline = this.timeline_.slice(0); - var group = null; - while (timeline.length > 0) { - if (timeline[0].millis == millis) { - group = timeline[0]; - break; - } else { - timeline.shift(); - } - } - - // If not, create a node at that time. - if (group === null) { - group = new TestTimelineGroup(millis); - this.timeline_.unshift(group); - this.sort_(); - } - group.add(callback); - - var newEndTime = this.timeline_.slice(-1)[0].millis * 1.1; - if (this.endTime_ != newEndTime) { - this.endTime_ = newEndTime; - } -}; - -/** - * Return the current time in milliseconds. - */ -TestTimeline.prototype.now = function() { - log('TestTimeline', 'now', Math.max(this.currentTime_, 0)); - return Math.max(this.currentTime_, 0); -}; - -/** - * Set the current time to a given value. - * - * @param {number} millis Time in milliseconds to set the current time too. - */ -TestTimeline.prototype.setTime = function(millis) { - log('TestTimeline', 'setTime', millis); - // Time is going backwards, we actually have to reset and go forwards as - // events can cause the creation of more events. - if (this.currentTime_ > millis) { - this.reset(); - this.start(); - } - - var events = this.timeline_.slice(0); - - // Already processed events - while (events.length > 0 && events[0].millis <= this.currentTime_) { - events.shift(); - } - - while (this.currentTime_ < millis) { - var event_ = null; - var moveTo = millis; - - if (events.length > 0 && events[0].millis <= millis) { - event_ = events.shift(); - moveTo = event_.millis; - } - - // Call the callback - if (this.currentTime_ != moveTo) { - log('TestTimeline', 'setting time to', moveTo); - this.currentTime_ = moveTo; - this.animationFrame(this.currentTime_); - } - - if (event_) { - event_.call(); - } - } - - this.updateGUI(); - - if (millis >= this.endTime_) { - this.done(); - } -}; - -/** - * Call all callbacks registered for the next (virtual) animation frame. - * - * @param {number} millis Time in milliseconds. - * @private - */ -TestTimeline.prototype.animationFrame = function(millis) { - /* FIXME(mithro): Code should appear here to allow testing of running - * every animation frame. - - if (this.everyFrame) { - } - - */ - - var callbacks = this.animationFrameCallbacks; - callbacks.reverse(); - this.animationFrameCallbacks = []; - for (var i = 0; i < callbacks.length; i++) { - log('TestTimeline raf callback', callbacks[i], millis); - try { - callbacks[i](millis); - } catch (e) { - // On IE the only way to get the real stack is to do this - window.onerror(e.message, e.fileName, e.lineNumber, e); - // On other browsers we want to throw the error later - setTimeout(function () { throw e; }, 0); - } - } -}; - -/** - * Set a callback to run at the next (virtual) animation frame. - * - * @param {function(millis)} millis Time in milliseconds to set the current - * time too. - */ -TestTimeline.prototype.requestAnimationFrame = function(callback) { - // FIXME: This should return a reference that allows people to cancel the - // animationFrame callback. - this.animationFrameCallbacks.push(callback); - return -1; -}; - -/** - * Go to next scheduled event in timeline. - */ -TestTimeline.prototype.toNextEvent = function() { - var events = this.timeline_.slice(0); - while (events.length > 0 && events[0].millis <= this.currentTime_) { - events.shift(); - } - if (events.length > 0) { - this.setTime(events[0].millis); - - if (this.autorun_) { - setTimeout(this.toNextEvent.bind(this), 0); - } - - return true; - } else { - this.setTime(this.endTime_); - return false; - } - -}; - -/** - * Go to previous scheduled event in timeline. - * (This actually goes back to time zero and then forward to this event.) - */ -TestTimeline.prototype.toPrevEvent = function() { - var events = this.timeline_.slice(0); - while (events.length > 0 && - events[events.length - 1].millis >= this.currentTime_) { - events.pop(); - } - if (events.length > 0) { - this.setTime(events[events.length - 1].millis); - return true; - } else { - this.setTime(0); - return false; - } -}; - -/** - * Reset the timeline to time zero. - */ -TestTimeline.prototype.reset = function () { - for (var t in this.timeline_) { - this.timeline_[t].reset(); - } - - this.currentTime_ = -this.frameMillis; - this.animationFrameCallbacks = []; - this.started_ = false; -}; - -/** - * Call to initiate starting??? - */ -TestTimeline.prototype.start = function () { - this.started_ = true; - - var parent = this; - - for (var t in this.timeline_) { - this.timeline_[t].start(); - // FIXME(mithro) this is confusing... - this.timeline_[t].draw(this.timelinebar, this.endTime_); - - this.timeline_[t].marker.onclick = function(event) { - parent.setTime(this.millis); - event.stopPropagation(); - }.bind(this.timeline_[t]); - } - - this.timelinebar.onclick = function(evt) { - var setPercent = - ((evt.clientX - this.offsetLeft) / this.offsetWidth); - parent.setTime(setPercent * parent.endTime_); - }.bind(this.timelinebar); -}; - -TestTimeline.prototype.done = function () { - log('TestTime', 'done'); - done(); -}; - -TestTimeline.prototype.autorun = function() { - this.autorun_ = true; - this.toNextEvent(); -}; - -function testharness_timeline_setup() { - log('testharness_timeline_setup'); - testharness_timeline.createGUI(document.getElementsByTagName('body')[0]); - testharness_timeline.start(); - testharness_timeline.updateGUI(); - - // Start running the test on message - if ('#message' == window.location.hash) { - window.addEventListener('message', function(evt) { - switch (evt.data['type']) { - case 'start': - if (evt.data['url'] == window.location.href) { - testharness_timeline.autorun(); - } - break; - } - }); - } else if ('#auto' == window.location.hash || '#coverage' == window.location.hash) { - // Run the test as fast as possible, skipping time. - - // Need non-zero timeout to allow chrome to run other code. - setTimeout(testharness_timeline.autorun.bind(testharness_timeline), 1); - - } else if (inExploreMode()) { - setTimeout(testharness_timeline.runner_.start.bind(testharness_timeline.runner_), 1); - } else { - alert('Unknown start mode.'); - } -} - -// Capture testharness's test as we are about to screw with it. -var testharness_test = window.test; - -function override_at(replacement_at, f, args) { - var orig_at = window.at; - window.at = replacement_at; - f.apply(null, args); - window.at = orig_at; -} - -function timing_test(f, desc) { - /** - * at function inside a timing_test function allows testing things at a - * given time rather then onload. - * @param {number} millis Milliseconds after page load to run the tests. - * @param {function()} f Closure containing the asserts to be run. - * @param {string} desc Description - */ - var at = function(millis, f, desc_at) { - assert_true(typeof millis == 'number', "at's first argument shoud be a number."); - assert_true(!isNaN(millis), "at's first argument should be a number not NaN!"); - assert_true(millis >= 0, "at's first argument should be greater then 0."); - assert_true(isFinite(millis), "at's first argument should be finite."); - - assert_true(typeof f == 'function', "at's second argument should be a function."); - - // Deliberately hoist the desc if we where not given one. - if (typeof desc_at == 'undefined' || desc_at == null || desc_at.length == 0) { - desc_at = desc; - } - - // And then provide 'Unnamed' as a default - if (typeof desc_at == 'undefined' || desc_at == null || desc_at.length == 0) { - desc_at = 'Unnamed assert'; - } - - var t = async_test(desc_at + ' at t=' + millis + 'ms'); - t.f = f; - window.testharness_timeline.schedule(t, millis); - }; - override_at(at, f); -} - -function test_without_at(f, desc) { - // Make sure calling at inside a test() function is a failure. - override_at(function() { - throw {'message': 'Can not use at() inside a test, use a timing_test instead.'}; - }, function() { testharness_test(f, desc); }); -} - -/** - * at function schedules a to be called at a given point. - * @param {number} millis Milliseconds after page load to run the function. - * @param {function()} f Function to be called. Called with no arguments - */ -function at(millis, f) { - assert_true(typeof millis == 'number', "at's first argument shoud be a number."); - assert_true(typeof f == 'function', "at's second argument should be a function."); - - window.testharness_timeline.schedule(f, millis); -} - -window.testharness_after_loaded = function() { - log('testharness_after_loaded'); - /** - * These steps needs to occur after testharness is loaded. - */ - setup(function() {}, { - explicit_timeout: true, - explicit_done: ((typeof window.testharness_timeline) !== 'undefined')}); - - /** - * Create an testharness test which makes sure the page contains no - * javascript errors. This is needed otherwise if the page contains errors - * then preventing the tests loading it will look like it passed. - */ - var pageerror_test = async_test('Page contains no errors'); - - window.onerror = function(msg, url, line, e) { - var msg = '\nError in ' + url + '\n' + - 'Line ' + line + ': ' + msg + '\n'; - - if (typeof e != "undefined") { - msg += e.stack; - } - - pageerror_test.is_done = true; - pageerror_test.step(function() { - throw new AssertionError(msg); - }); - pageerror_test.is_done = false; - }; - - var pageerror_tests; - function pageerror_othertests_finished(test, harness) { - if (harness == null && pageerror_tests == null) { - return; - } - - if (pageerror_tests == null) { - pageerror_tests = harness; - } - - if (pageerror_tests.all_loaded && pageerror_tests.num_pending == 1) { - pageerror_test.done(); - } - } - add_result_callback(pageerror_othertests_finished); - addEventListener('load', pageerror_othertests_finished); - -}; - -loadScript('../testharness/testharness.js', {coverage: false}); -document.write('<script type="text/javascript">window.testharness_after_loaded();</script>'); -loadCSS('../testharness/testharness.css'); -loadCSS('../testharness_timing.css'); - -if (testType() == 'auto') { - var checksFile = location.pathname; - checksFile = checksFile.replace(/disabled-/, ''); - checksFile = checksFile.replace(/.html$/, '-checks.js') - loadScript(checksFile, {coverage: false}); -} - -document.write('<div id="log"></div>'); -loadScript('../testharness/testharnessreport.js', {coverage: false}); - -if (!hasFlag('nopolyfill')) { - loadScript('../../web-animations.js'); -} - -addEventListener('load', function() { - if (window._WebAnimationsTestingUtilities) { - // Currently enabling asserts breaks auto-test-initial in IE. - //_WebAnimationsTestingUtilities._enableAsserts(); - } -}); - -// Don't export the timing functions in unittests. -if (testType() != 'unit') { - addEventListener('load', testharness_timeline_setup); - - window.at = at; - window.timing_test = timing_test; - window.test = test_without_at; - - // Expose the extra API - window.testharness_timeline = new TestTimeline(); - - // Override existing timing functions - window.requestAnimationFrame = - testharness_timeline.requestAnimationFrame.bind(testharness_timeline); - window.performance.now = null; - window.Date.now = testharness_timeline.now.bind(testharness_timeline); -} - -window.inExploreMode = inExploreMode; - -})(); diff --git a/third_party/polymer/components/web-animations-js/test/img/error.png b/third_party/polymer/components/web-animations-js/test/img/error.png Binary files differdeleted file mode 100644 index 7ebb1cb..0000000 --- a/third_party/polymer/components/web-animations-js/test/img/error.png +++ /dev/null diff --git a/third_party/polymer/components/web-animations-js/test/img/success.png b/third_party/polymer/components/web-animations-js/test/img/success.png Binary files differdeleted file mode 100644 index 3d8249e..0000000 --- a/third_party/polymer/components/web-animations-js/test/img/success.png +++ /dev/null diff --git a/third_party/polymer/components/web-animations-js/test/img/unknown.png b/third_party/polymer/components/web-animations-js/test/img/unknown.png Binary files differdeleted file mode 100644 index 4bf842e..0000000 --- a/third_party/polymer/components/web-animations-js/test/img/unknown.png +++ /dev/null diff --git a/third_party/polymer/components/web-animations-js/test/perf/balls-add-compositing.html b/third_party/polymer/components/web-animations-js/test/perf/balls-add-compositing.html deleted file mode 100644 index 049f26f..0000000 --- a/third_party/polymer/components/web-animations-js/test/perf/balls-add-compositing.html +++ /dev/null @@ -1,147 +0,0 @@ -<!-- -Copyright 2013 Google Inc. All Rights Reserved. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. - -This test is based on code written by Cameron Adams and imported from - http://themaninblue.com/experiment/AnimationBenchmark/html ---> -<!doctype html> -<head> -<style> -.ball { - position: absolute; - width: 12px; - height: 12px; - border-radius: 100%; -} -</style> -</head> -<script src="perf.js"></script> -<script src="../../web-animations.js"></script> -<script> -'use strict'; - -var stageWidth = 600; -var stageHeight = 600; -var particleCount = 2500; -var minVelocity = 50; -var maxVelocity = 500; -var particleRadius = 6; -var colors = ['#cc0000', '#ffcc00', '#aaff00', '#0099cc', '#194c99', '#661999']; -var animationDuration = 10; - -var particles = []; -var player; - -var Particle = function() { - this.element = document.createElement('div'); - this.element.className = 'ball'; - this.element.style.backgroundColor = colors[Math.floor(Perf.random() * colors.length)]; - this.element.style.left = (stageWidth / 2 - particleRadius) + 'px'; - this.element.style.top = (stageHeight / 2 - particleRadius) + 'px'; - document.body.appendChild(this.element); -}; - -Particle.prototype.generateAnimation = function(duration) { - var keyframes = []; - - var angle = Math.PI * 2 * Perf.random(); - var velocity = minVelocity + ((maxVelocity - minVelocity) * Perf.random()); - var x = 0; - var y = 0; - var dx = Math.cos(angle) * velocity; - var dy = Math.sin(angle) * velocity; - - var nextCollision = function(lineX, normalX, lineY, normalY) { - var dtx = Infinity; - var dty = Infinity; - if (dx * normalX < 0) - dtx = (lineX - x) / dx; - if (dy * normalY < 0) - dty = (lineY - y) / dy; - var dt = Math.min(dtx, dty); - var hitX = (dtx < dty); - return { - dt: dt, - x: hitX ? lineX : x + (dx * dt), - y: hitX ? y + (dy * dt) : lineY, - dx: hitX ? -dx : dx, - dy: hitX ? dy : -dy, - }; - }; - - var t = 0; - keyframes.push(this.createKeyframe(0, x, y)); - while (t < duration) { - var collisionA = nextCollision(-stageWidth / 2, 1, -stageHeight / 2, 1); - var collisionB = nextCollision(stageWidth / 2, -1, stageHeight / 2, -1); - var collision = collisionA.dt < collisionB.dt ? collisionA : collisionB; - if (t + collision.dt > duration) { - var dt = duration - t; - t = duration; - x += dx * dt; - y += dy * dt; - } else { - t += collision.dt; - x = collision.x; - y = collision.y; - dx = collision.dx; - dy = collision.dy; - } - keyframes.push(this.createKeyframe(t / duration, x, y)); - } - - return new Animation(this.element, keyframes, duration); -}; - -Particle.prototype.createKeyframe = function(offset, x, y) { - return { - composite: 'add', - offset: offset, - left: x + 'px', - top: y + 'px', - }; -}; - -Particle.prototype.destroy = function() { - document.body.removeChild(this.element); -}; - -function cleanUp() { - player.source = null; - for (var i = 0; i < particles.length; i++) { - particles[i].destroy(); - } - particles = []; -} - -window.addEventListener('load', function () { - var spacing = document.createElement('div'); - spacing.style.display = 'inline-block'; - spacing.style.width = '600px'; - document.body.appendChild(spacing); - - var animationGroup = new AnimationGroup([], {iterations: Infinity, direction: 'alternate'}); - for (var i = 0; i < particleCount; i++) { - var particle = new Particle(); - animationGroup.append(particle.generateAnimation(animationDuration)); - particles.push(particle); - } - player = document.timeline.play(animationGroup); - - Perf.oncomplete = cleanUp; - Perf.start(); -}); - -</script> diff --git a/third_party/polymer/components/web-animations-js/test/perf/balls-replace-compositing.html b/third_party/polymer/components/web-animations-js/test/perf/balls-replace-compositing.html deleted file mode 100644 index 92e2870..0000000 --- a/third_party/polymer/components/web-animations-js/test/perf/balls-replace-compositing.html +++ /dev/null @@ -1,144 +0,0 @@ -<!-- -Copyright 2013 Google Inc. All Rights Reserved. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. - -This test is based on code written by Cameron Adams and imported from - http://themaninblue.com/experiment/AnimationBenchmark/html ---> -<!doctype html> -<head> -<style> -.ball { - position: absolute; - width: 12px; - height: 12px; - border-radius: 100%; -} -</style> -</head> -<script src="perf.js"></script> -<script src="../../web-animations.js"></script> -<script> -'use strict'; - -var stageWidth = 600; -var stageHeight = 600; -var particleCount = 2500; -var minVelocity = 50; -var maxVelocity = 500; -var particleRadius = 6; -var colors = ['#cc0000', '#ffcc00', '#aaff00', '#0099cc', '#194c99', '#661999']; -var animationDuration = 10; - -var particles = []; -var player; - -var Particle = function() { - this.element = document.createElement('div'); - this.element.className = 'ball'; - this.element.style.backgroundColor = colors[Math.floor(Perf.random() * colors.length)]; - document.body.appendChild(this.element); -}; - -Particle.prototype.generateAnimation = function(duration) { - var keyframes = []; - - var angle = Math.PI * 2 * Perf.random(); - var velocity = minVelocity + ((maxVelocity - minVelocity) * Perf.random()); - var x = stageWidth / 2 - particleRadius; - var y = stageHeight / 2 - particleRadius; - var dx = Math.cos(angle) * velocity; - var dy = Math.sin(angle) * velocity; - - var nextCollision = function(lineX, normalX, lineY, normalY) { - var dtx = Infinity; - var dty = Infinity; - if (dx * normalX < 0) - dtx = (lineX - x) / dx; - if (dy * normalY < 0) - dty = (lineY - y) / dy; - var dt = Math.min(dtx, dty); - var hitX = (dtx < dty); - return { - dt: dt, - x: hitX ? lineX : x + (dx * dt), - y: hitX ? y + (dy * dt) : lineY, - dx: hitX ? -dx : dx, - dy: hitX ? dy : -dy, - }; - }; - - var t = 0; - keyframes.push(this.createKeyframe(0, x, y)); - while (t < duration) { - var collisionA = nextCollision(0, 1, 0, 1); - var collisionB = nextCollision(stageWidth, -1, stageHeight, -1); - var collision = collisionA.dt < collisionB.dt ? collisionA : collisionB; - if (t + collision.dt > duration) { - var dt = duration - t; - t = duration; - x += dx * dt; - y += dy * dt; - } else { - t += collision.dt; - x = collision.x; - y = collision.y; - dx = collision.dx; - dy = collision.dy; - } - keyframes.push(this.createKeyframe(t / duration, x, y)); - } - - return new Animation(this.element, keyframes, duration); -}; - -Particle.prototype.createKeyframe = function(offset, x, y) { - return { - offset: offset, - left: x + 'px', - top: y + 'px', - }; -}; - -Particle.prototype.destroy = function() { - document.body.removeChild(this.element); -}; - -function cleanUp() { - player.source = null; - for (var i = 0; i < particles.length; i++) { - particles[i].destroy(); - } - particles = []; -} - -window.addEventListener('load', function () { - var spacing = document.createElement('div'); - spacing.style.display = 'inline-block'; - spacing.style.width = '600px'; - document.body.appendChild(spacing); - - var animationGroup = new AnimationGroup([], {iterations: Infinity, direction: 'alternate'}); - for (var i = 0; i < particleCount; i++) { - var particle = new Particle(); - animationGroup.append(particle.generateAnimation(animationDuration)); - particles.push(particle); - } - player = document.timeline.play(animationGroup); - - Perf.oncomplete = cleanUp; - Perf.start(); -}); - -</script> diff --git a/third_party/polymer/components/web-animations-js/test/perf/perf.js b/third_party/polymer/components/web-animations-js/test/perf/perf.js deleted file mode 100644 index 8b5bb0d..0000000 --- a/third_party/polymer/components/web-animations-js/test/perf/perf.js +++ /dev/null @@ -1,158 +0,0 @@ -/** - * Copyright 2013 Google Inc. All Rights Reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -(function(){ -'use strict'; - -var disregardFramesCount = 10; -var framesPerTimeReading = 10; -var maxTimeReadings = 60; -var maxFPSReadings = 31; - -var frameCount = 0; -var timeReadings = []; -var fpsReadings = []; -var onCompleteHandler; -var outputElement; -var running = false; -var visibilityLost = false; - -var getTime = (typeof window.performance === 'object' && - typeof window.performance.now === 'function') ? - function() { return window.performance.now(); } : - function() { return Date.now(); }; - -var raf = window.requestAnimationFrame || - window.webkitRequestAnimationFrame || - window.mozRequestAnimationFrame || - function(callback) { setTimeout(callback, 1000 / 60); }; - -var visibilityChangeEvent = null; -var hidden = null; -if (typeof document.hidden !== 'undefined') { - visibilityChangeEvent = 'visibilitychange'; - hidden = 'hidden'; -} else if (typeof document.mozHidden !== 'undefined') { - visibilityChangeEvent = 'mozvisibilitychange'; - hidden = 'mozHidden'; -} else if (typeof document.msHidden !== 'undefined') { - visibilityChangeEvent = 'msvisibilitychange'; - hidden = 'msHidden'; -} else if (typeof document.webkitHidden !== 'undefined') { - visibilityChangeEvent = 'webkitvisibilitychange'; - hidden = 'webkitHidden'; -} -if (visibilityChangeEvent) { - document.addEventListener(visibilityChangeEvent, function() { - if (running && document[hidden]) { - visibilityLost = true; - } - }); -} - -var randomSeed = 3384413; -function random() { - var temp = randomSeed; - // Robert Jenkins' 32 bit integer hash function. - temp = ((temp + 0x7ed55d16) + (temp << 12)) & 0xffffffff; - temp = ((temp ^ 0xc761c23c) ^ (temp >>> 19)) & 0xffffffff; - temp = ((temp + 0x165667b1) + (temp << 5)) & 0xffffffff; - temp = ((temp + 0xd3a2646c) ^ (temp << 9)) & 0xffffffff; - temp = ((temp + 0xfd7046c5) + (temp << 3)) & 0xffffffff; - temp = ((temp ^ 0xb55a4f09) ^ (temp >>> 16)) & 0xffffffff; - randomSeed = temp; - return (randomSeed & 0xfffffff) / 0x10000000; -} - -function disregardFrames() { - raf((frameCount++ < disregardFramesCount) ? disregardFrames : trackFrameRate); -} - -function trackFrameRate() -{ - frameCount++; - if (frameCount % framesPerTimeReading === 0) { - timeReadings.unshift(getTime()); - if (timeReadings.length > maxTimeReadings) { - timeReadings.pop(); - } - if (timeReadings.length > 1) { - var fpsReading = 1000 * (timeReadings.length - 1) * framesPerTimeReading / - (timeReadings[0] - timeReadings[timeReadings.length - 1]); - fpsReadings.push(fpsReading); - output(fpsReading + ' FPS\n'); - if (fpsReadings.length >= maxFPSReadings) { - outputSummary(); - running = false; - if (typeof onCompleteHandler === 'function') { - onCompleteHandler(); - } - return; - } - } - } - raf(trackFrameRate); -} - -function output(text) { - outputElement.value += text; -} - -function outputSummary() { - if (visibilityLost) { - output('Warning: Document lost visibility during test, ' + - 'results may be inaccurate.\n'); - } - var total = 0; - fpsReadings.forEach(function(fpsReading) { total += fpsReading; }); - var average = total / maxFPSReadings; - output('Average: ' + average + ' FPS\n'); - var temp = 0; - fpsReadings.forEach(function(fpsReading) { - temp += (fpsReading - average) * (fpsReading - average); - }); - output('Stddev: ' + Math.sqrt(temp / fpsReadings.length) + ' FPS\n'); - fpsReadings.sort(); - output('Min: ' + fpsReadings[0] + ' FPS\n'); - output('Max: ' + fpsReadings[fpsReadings.length - 1] + ' FPS\n'); - var median = fpsReadings[fpsReadings.length >> 1]; - if (fpsReadings.length % 2 !== 0) { - median = (median + fpsReadings[(fpsReadings.length >> 1) + 1]) / 2; - } - output('Median: ' + median + ' FPS\n'); -} - -var start = function() { - outputElement = document.createElement('textarea'); - outputElement.setAttribute('rows', maxFPSReadings + 6); - outputElement.setAttribute('cols', 32); - document.body.appendChild(outputElement); - - output('Disregarding initial ' + disregardFramesCount + ' frames.\n') - raf(disregardFrames); - - running = true; -}; - -window.Perf = { - set oncomplete(callback) { - onCompleteHandler = callback; - }, - start: start, - random: random, -}; - -})(); diff --git a/third_party/polymer/components/web-animations-js/test/perf/updating-inline-style-during-animation.html b/third_party/polymer/components/web-animations-js/test/perf/updating-inline-style-during-animation.html deleted file mode 100644 index 51f9f67..0000000 --- a/third_party/polymer/components/web-animations-js/test/perf/updating-inline-style-during-animation.html +++ /dev/null @@ -1,165 +0,0 @@ -<!-- -Copyright 2013 Google Inc. All Rights Reserved. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. - -This test is based on code written by Cameron Adams and imported from - http://themaninblue.com/experiment/AnimationBenchmark/html ---> -<!doctype html> -<head> -<style> -.ball { - position: absolute; - width: 12px; - height: 12px; - border-radius: 100%; -} -</style> -</head> -<script src="perf.js"></script> -<script src="../../web-animations.js"></script> -<script> -'use strict'; - -var stageWidth = 600; -var stageHeight = 600; -var particleCount = 2500; -var minVelocity = 50; -var maxVelocity = 500; -var particleRadius = 6; -var colors = ['#cc0000', '#ffcc00', '#aaff00', '#0099cc', '#194c99', '#661999']; -var animationDuration = 10; - -var particles = []; -var player; -var testing = true; - -var Particle = function() { - this.element = document.createElement('div'); - this.element.className = 'ball'; - this.element.style.backgroundColor = colors[Math.floor(Perf.random() * colors.length)]; - document.body.appendChild(this.element); -}; - -Particle.prototype.generateAnimation = function(duration) { - var keyframes = []; - - var angle = Math.PI * 2 * Perf.random(); - var velocity = minVelocity + ((maxVelocity - minVelocity) * Perf.random()); - var x = stageWidth / 2; - var y = stageHeight / 2; - var dx = Math.cos(angle) * velocity; - var dy = Math.sin(angle) * velocity; - - var nextCollision = function(lineX, normalX, lineY, normalY) { - var dtx = Infinity; - var dty = Infinity; - if (dx * normalX < 0) - dtx = (lineX - x) / dx; - if (dy * normalY < 0) - dty = (lineY - y) / dy; - var dt = Math.min(dtx, dty); - var hitX = (dtx < dty); - return { - dt: dt, - x: hitX ? lineX : x + (dx * dt), - y: hitX ? y + (dy * dt) : lineY, - dx: hitX ? -dx : dx, - dy: hitX ? dy : -dy, - }; - }; - - var t = 0; - keyframes.push(this.createKeyframe(0, x, y)); - while (t < duration) { - var collisionA = nextCollision(0, 1, 0, 1); - var collisionB = nextCollision(stageWidth, -1, stageHeight, -1); - var collision = collisionA.dt < collisionB.dt ? collisionA : collisionB; - if (t + collision.dt > duration) { - var dt = duration - t; - t = duration; - x += dx * dt; - y += dy * dt; - } else { - t += collision.dt; - x = collision.x; - y = collision.y; - dx = collision.dx; - dy = collision.dy; - } - keyframes.push(this.createKeyframe(t / duration, x, y)); - } - - return new Animation(this.element, keyframes, duration); -}; - -Particle.prototype.createKeyframe = function(offset, x, y) { - return { - composite: 'add', - offset: offset, - left: x + 'px', - top: y + 'px', - }; -}; - -Particle.prototype.destroy = function() { - document.body.removeChild(this.element); -}; - -var cleanUp = function() { - player.source = null; - for (var i = 0; i < particles.length; i++) { - particles[i].destroy(); - } - particles = []; -}; - -var raf = window.requestAnimationFrame || - window.webkitRequestAnimationFrame || - window.mozRequestAnimationFrame || - function(callback) { setTimeout(callback, 1000 / 60); }; - -var shake = 0; -var shakeParticles = function() { - shake = 20 - shake; - for (var i = 0; i < particles.length; i++) { - particles[i].element.style.setProperty('left', shake + 'px'); - particles[i].element.style.setProperty('top', shake + 'px'); - } - if (testing) { - raf(shakeParticles); - } -}; - -window.addEventListener('load', function () { - var spacing = document.createElement('div'); - spacing.style.display = 'inline-block'; - spacing.style.width = '600px'; - document.body.appendChild(spacing); - - var animationGroup = new AnimationGroup([], {iterations: Infinity, direction: 'alternate'}); - for (var i = 0; i < particleCount; i++) { - var particle = new Particle(); - animationGroup.append(particle.generateAnimation(animationDuration)); - particles.push(particle); - } - player = document.timeline.play(animationGroup); - - raf(shakeParticles); - - Perf.oncomplete = cleanUp; - Perf.start(); -}); - -</script> diff --git a/third_party/polymer/components/web-animations-js/test/test-generator.html b/third_party/polymer/components/web-animations-js/test/test-generator.html deleted file mode 100644 index a15f062..0000000 --- a/third_party/polymer/components/web-animations-js/test/test-generator.html +++ /dev/null @@ -1,240 +0,0 @@ -<!-- -Copyright 2012 Google Inc. All Rights Reserved. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. ---> -<style> -iframe { - width: 100%; - height: 600px; -} -.textBox { - width:800px; - height:200px; -} -input#iframeSrc { - width: 200px; -} -</style> - -<input type="text" id="iframeSrc"> -<button id="load-button" onclick="loadFile()">Load</button><br> -<iframe id="frame" src=""></iframe> -<div id="userOptions"> - <input type="number" id="interval" value=1> Interval <br> - Objects and properties - <button id="generate-button" onclick="startGeneratingExpectations()">Generate</button><br> - <textarea id = "obProp" class = textBox></textarea> <br> -</div> -<div> Outputted Checks </div> -<pre id = "checks"></pre> - -<script src="../web-animations.js"></script> -<script> -"use strict"; - -function detectFeatures() { - var style = document.createElement('style'); - style.textContent = '' + - 'dummyRuleForTesting {' + - 'width: calc(0px);' + - 'width: -webkit-calc(0px); }'; - document.head.appendChild(style); - var transformCandidates = [ - 'transform', - 'webkitTransform', - 'msTransform' - ]; - var transformProperty = transformCandidates.filter(function(property) { - return property in style.sheet.cssRules[0].style; - })[0]; - var calcFunction = style.sheet.cssRules[0].style.width.split('(')[0]; - document.head.removeChild(style); - return { - transformProperty: transformProperty, - calcFunction: calcFunction - }; -} - -var features = detectFeatures(); - -var testCurrentTime; -var testLength = 0; -var lastRun = false; -var frameTime = 100; -var checks = []; -var interval; - -document.getElementById("iframeSrc").value = window.location.search.substring(1) || "testcases/auto-test-calc.html"; -document.getElementById("interval").value = "1"; -document.getElementById("obProp").value = ".anim, width"; - - -function ToCheck(object, initSelctor, properties){ - this.object = object; - this.initSelctor = initSelctor; - this.properties = properties; -} - -function getEndTime(timeline) { - var players = timeline.getCurrentPlayers(); - - var endTime = 0; - players.forEach(function(player) { - endTime = Math.max(endTime, player.source.endTime); - }); - return endTime; -} - -function loadFile(mode, callback) { - if (typeof mode == 'undefined') { - mode = ''; - } - - var file = document.getElementById("iframeSrc").value; - - var iframe = document.getElementById("frame"); - // We want the frame to always reload even if the src is the same, hence we - // force it to null and then to the value we want. - iframe.onload = function() { - iframe.onload = callback; - iframe.src = file + '#' + mode; - }; - iframe.src = ''; -} - -function startGeneratingExpectations() { - var obProp = document.getElementById("obProp").value; - - var output = document.getElementById("checks"); - output.innerHTML = ""; - - loadFile("message", function () { - findElementsToCheck(obProp); - - output.innerHTML += "timing_test(function() {\n"; - var testWindow = document.getElementById("frame").contentWindow; - var interval = parseFloat(document.getElementById("interval").value); - - var endTime = Infinity; - - var t = 0; - while(t <= endTime) { - if (typeof testWindow.testharness_timeline == 'undefined') { - alert("Your page doesn't contain testharness_timline, can not generate anything!"); - return; - } - - testWindow.testharness_timeline.setTime(t); - - // Update the endTime as it can change dependent on the running animations - // and modifications to them. - endTime = getEndTime(testWindow.window.document.timeline); - - generate(t); - t += interval; - } - - output.innerHTML += '}, "Auto generated tests");\n'; - }); -} - -function findElementsToCheck(rawString){ - // Put all checks into checkStack - checks = []; - rawString = rawString.split("\n"); - - for (var x in rawString){ - rawString[x] = rawString[x].replace(/\s/g, ""); - rawString[x] = rawString[x].split(","); - if (rawString[x][0].length == 0) - continue; - var object = window.frames[0].document.querySelectorAll(rawString[x][0]); - var prop = []; - for (var i = 1; i < rawString[x].length; i++){ - prop.push(rawString[x][i]); - } - checks.push(new ToCheck(object, rawString[x][0], prop)); - } -} - -function generate(time){ - console.log("Generating checks for t=", time); - - // Produce checks at this time - var outputText = " at(" + time + ", function() {\n"; - for (var x in checks){ - var propslist = []; - for (var i = 0; i < checks[x].object.length; i++){ - var propsPrint = "{"; - for (var j in checks[x].properties){ - var p = checks[x].properties[j]; - var isSVG = _WebAnimationsTestingUtilities._propertyIsSVGAttrib(p, checks[x].object[i]); - - if(isSVG) var props = checks[x].object[i].attributes; - else var props = checks[x].object[i].currentStyle || - getComputedStyle(checks[x].object[i], null); - - if (p == 'ctm') { - var ctm = checks[x].object[i].getCTM(); - var value = '{' + ctm.a + ', ' + ctm.b + ', ' + ctm.c + ', ' + ctm.d + ', ' + ctm.e + ', ' + ctm.f + '}' - } else if (p == 'transform') { - var value = props[features.transformProperty]; - } else { - var value = isSVG ? props[p].value : props[p]; - } - console.log("Node:", checks[x].object[i].cloneNode(), "Property:", checks[x].properties[j], "Value:", value); - - value = value.replace(/[-+]?[0-9]+\.?[0-9]*(?:[eE][-+]?[0-9]+)?/g, function(v) { - v = Number(v); - if (Math.abs(v) < 1e-10) { - v = 0; - } - return ("" + v.toPrecision(4)).replace(/\.?0+$/, ''); - }); - - propsPrint += "'"+ p + "':'" + value + "'"; - if (j < checks[x].properties.length -1) propsPrint += ","; - } - propsPrint += "}"; - propslist.push(propsPrint); - } - outputText += printCheck(checks[x].initSelctor, i, propslist, time); - } - outputText += ' });'; - var output = document.getElementById("checks"); - output.innerHTML += outputText + "<br>"; -} - -function printCheck(object, number, properties, time){ - - var newCheck = ' assert_styles("' + object + '",'; - - // If all the properties are the same for every object, just pass the list. - var allsame = properties.every(function(x) { return x === properties[0] }); - if (allsame) { - newCheck += properties[0] + ");\n"; - - } else { - // Otherwise give a list with each - - newCheck += " [\n"; - for (var j in properties) { - newCheck += ' ' + properties[j] + ",\n"; - } - newCheck += " ]);\n"; - } - - return newCheck; -} -</script> diff --git a/third_party/polymer/components/web-animations-js/test/test-results-post.html b/third_party/polymer/components/web-animations-js/test/test-results-post.html deleted file mode 100644 index 3422406..0000000 --- a/third_party/polymer/components/web-animations-js/test/test-results-post.html +++ /dev/null @@ -1,3 +0,0 @@ -<html><body> -<form method="post" id=form><textarea id=data name=data></textarea></form> -</body></html> diff --git a/third_party/polymer/components/web-animations-js/test/test-runner.html b/third_party/polymer/components/web-animations-js/test/test-runner.html deleted file mode 100644 index 5b9d2f9..0000000 --- a/third_party/polymer/components/web-animations-js/test/test-runner.html +++ /dev/null @@ -1,810 +0,0 @@ -<!-- -Copyright 2012 Google Inc. All Rights Reserved. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. ---> -<!DOCTYPE html> -<meta charset="UTF-8"> - -<style> - -#status-box { - position: fixed; - bottom: 0; - right: 0; - background: white; - border: 1px solid black; - padding-right: 5px; -} - -h1 { - display: inline; -} - -table { - border-collapse: collapse; -} - -td { - border: 1px solid black; -} - -iframe { - width: 800px; - height: 600px; -} - -tbody { - color: gray; -} - -td.log ul li { - white-space: pre; - font-family: monospace; -} - -/* Fail styles */ -tbody.fail { - color: red; -} - -li.fail { - color: red; -} - -tbody.timeout { - color: yellow; -} - -li.timeout { - color: yellow; -} - - -/* Pass styles */ -tbody.pass { - color: green; -} - -li.pass { - color: green; -} - -tbody.pass-expected-failure { - color: #00aa00; -} - -li.pass-expected-failure { - color: #00aa00; -} - -tbody.skipped { - color: #00aa00; -} - -li.skipped { - color: #00aa00; -} - -/* No-test styles */ -tbody.no-tests { - color: #ff8a00; -} - -</style> -<script src="browserdetect/bowser.js"></script> -<script src="testcases.js"></script> - -<div id=status-box> -<h1 id=status>Pending</h1> -Tests: <span id=tests></span> -Loading: <span id=loading></span> (<span id=loaded></span>) -Running: <span id=running></span> (<span id=finished></span>) -Posting: <span id=posting></span> (<span id=posted></span>) -</div> - -<table id="results"></table> -<div id="spacer"></div> - -<script> -'use strict'; -window.onerror = function(msg, url, line) { - // Ignore errors caused by webdriver - if (msg.match(/webdriver/)) - return; - - if (document.getElementById('javascript-errors') == null) { - document.body.innerHTML = '<pre id="javascript-errors">JAVASCRIPT ERRORS\n\n</pre>'; - } - - var e = document.getElementById('javascript-errors'); - var msg = 'Javascript Error in ' + url + '\n' + - 'Line ' + line + ': ' + msg + '\n'; - e.innerHTML += msg; -}; -</script> - -<script> -'use strict'; - -(function() { -window.finished = false; -window.getTestRunnerProgress = function() { - return { - completed: testStates['POSTED'].length, - total: tests.length, - }; -} - -var results = []; - -if (/coverage/.test(window.location.hash)) { - // Trigger coverage runs for child tests. - window.__coverage__ = {}; - // Share resources loaded by child tests to avoid instrumenting the same - // source file multiple times. - window.__resources__ = {original: {}}; -} - -window.addEventListener('load', function() { - document.querySelector('#spacer').style.height = - getComputedStyle(document.querySelector('body')).height; -}); -function trueOffsetTop(element) { - var t = 0; - if (element.offsetParent) { - do { - t += element.offsetTop; - } while (element = element.offsetParent); - return t; - } -} - -/** - * Get a value for busting the cache. - */ -var cacheBuster = '' + window.Date.now(); - -/** - * Get the most accurate version of time possible. - * - * @return {number} Time as this very moment. - */ -function now() { - try { - return window.performance.now(); - } catch (e) { - return Date.now(); - } -} - -/** - * Creates HTML elements in a table for a test. - * - * +-----------+------+-------+ - * | Test Name | Link | Count | - * +-----------+------+-------+ - * | Log of test run. | - * +--------------------------+ - * | iFrame containing test | - * +--------------------------+ - * - * @param {String} testName Name of the test suite being run. - * @param {String} testURL The url of the test suite. - * @return {Element} tbody containing newly created table rows. - */ -function createTestRows(testName, testURL) { - var tableGroup = document.createElement('tbody'); - tableGroup.id = testName.replace('.', '-'); - - var basicInfoRow = document.createElement('tr'); - basicInfoRow.className = 'info-row'; - tableGroup.appendChild(basicInfoRow); - var iframeRow = document.createElement('tr'); - tableGroup.appendChild(iframeRow); - var logRow = document.createElement('tr'); - tableGroup.appendChild(logRow); - - // Name - var header = document.createElement('h1'); - header.textContent = testName; - - var headerCell = document.createElement('td'); - headerCell.appendChild(header); - basicInfoRow.appendChild(headerCell); - - // Link - var link = document.createElement('a'); - link.textContent = testName; - link.href = testURL; - - var linkCell = document.createElement('td'); - linkCell.appendChild(link); - basicInfoRow.appendChild(linkCell); - - // Test count - var countCell = document.createElement('td'); - countCell.className = 'count'; - basicInfoRow.appendChild(countCell); - - // Timing info - var timingCell = document.createElement('td'); - timingCell.className = 'timing'; - basicInfoRow.appendChild(timingCell); - - // iframe containing a preview of object - var iframe = document.createElement('iframe'); - iframe.src = testURL + '?' + cacheBuster + '#message'; - - var iframeCell = document.createElement('td'); - iframeCell.colSpan = '4'; - iframeCell.appendChild(iframe); - iframeRow.appendChild(iframeCell); - - // table row containing the complete test log - var logCell = document.createElement('td'); - logCell.className = 'log'; - logCell.colSpan = '4'; - logRow.appendChild(logCell); - - /** - * Normally we would use "display: none;" but that causes Firefox to return - * null for getComputedStyle, so instead we have to use this visibility hack. - */ - tableGroup.showInfo = function() { - logRow.style.visibility = 'visible'; - logRow.style.position = ''; - logRow.style.height = 'auto'; - - iframeRow.style.visibility = 'visible'; - iframeRow.style.position = ''; - iframeRow.style.height = 'auto'; - }; - tableGroup.hideInfo = function() { - logRow.style.visibility = 'hidden'; - logRow.style.position = 'absolute'; - logRow.style.height = '0'; - - iframeRow.style.visibility = 'hidden'; - iframeRow.style.position = 'absolute'; - iframeRow.style.height = '0'; - }; - tableGroup.toggleInfo = function() { - if (logRow.style.visibility == 'hidden') { - tableGroup.showInfo(); - } else { - tableGroup.hideInfo(); - } - }; - basicInfoRow.onclick = tableGroup.toggleInfo; - - tableGroup.hideInfo(); - - return tableGroup; -} - -/* @type {?number} */ var runTestsId = null; - -/** - * Checks all the tests are in the loaded state and then kicks of running - * the tests. - */ -function runTestsIfLoaded() { - if (testStates['LOADING'].length > 0) - return; - - if (runTestsId == null) { - runTestsId = window.setInterval(runTests, 10); - } -} - -function generateCoverageReport() { - // TODO: generate a pretty report, prompt to save the JSON, post it somewhere - for (var file in window.__coverage__) { - var results = window.__coverage__[file]; - var hits = 0; - var statements = 0; - for (var stmt in results.s) { - statements++; - if (results.s[stmt] > 0) { - hits++; - } - } - var percent = (100 * hits / statements).toFixed(2); - console.log(file + ' statement coverage ' + - percent + '% (' + hits + '/' + statements + ')'); - } -} - -/** - * This object tracks which state a test is in. An individual test should only - * ever be in one of the lists. You use the changeTestState() function to move - * from one state to another. - * - * Tests start off in the loading state and move downwards until ending up in - * the finished state. - */ -var testStates = {}; -testStates['LOADING'] = []; /* Test which is being loaded. */ -testStates['LOADED'] = []; /* Test which have yet to start. */ -testStates['RUNNING'] = []; /* Test that is currently running. */ -testStates['FINISHED'] = []; /* Test that are finished. */ -testStates['POSTING'] = []; /* Test that is currently posting results to server. */ -testStates['POSTED'] = []; /* Test which have completed and sent their - results to the server. */ - -/** - * Track if we should skip the POSTING state, occurs if posting returns an error. - */ -/* @type {Boolean} */ var skipPosting = false; - -/** - * Changes the state of the given test to the given state. - * This function doesn't check that the state transition actually make sense. - * - * @param {Element} test DOM object representing the test. The id will contain - * the test name. - * @param {States} The new state to transition too. - */ -function changeTestState(test, newState) { - var i = null; - - if (newState == 'POSTING' && skipPosting) { - newState = 'POSTED'; - } - - var oldState = test.state; - - // If we have already posted, we should never leave... - if (oldState == 'POSTED') { - throw 'Unexpected state change! Trying to leave POSTED state to ' + newState; - return; - } - - if (typeof oldState != 'undefined') { - var i = testStates[oldState].indexOf(test); - testStates[oldState].splice(i, 1); - } - - test.state = newState; - testStates[test.state].unshift(test); - - function testSort(a, b) { - return a.id.localeCompare(b.id); - } - testStates[test.state].sort(testSort); - - switch(newState) { - case 'LOADING': - runTestsIfLoaded(); - break; - - case 'LOADED': - if (oldState != 'LOADING') { - throw 'Unexpected state change! ' + oldState + ' changing to LOADED'; - } - break; - - case 'RUNNING': - if (oldState != 'LOADED') { - throw 'Unexpected state change! ' + oldState + ' changing to RUNNING'; - } - - test.start = now(); - var testWindow = test.querySelector('iframe').contentWindow; - var msg = {type: 'start', url: testWindow.location.href + ''}; - testWindow.postMessage(msg, '*'); - break; - - case 'FINISHED': - // If a test doesn't use any timing stuff it could come from the LOADING or - // LOADED state into the FINISHED state bypassing the RUNNING state. - if (oldState != 'LOADING' && oldState != 'LOADED' && oldState != 'RUNNING') { - throw 'Unexpected state change! ' + oldState + ' changing to FINISHED'; - } - - var timingInfo = test.querySelector('.timing'); - if (test.start) { - test.finished = now(); - timingInfo.textContent = (test.finished - test.start).toFixed(2) + 'ms'; - } else { - timingInfo.textContent = '(Load only)'; - } - - var test_iframe = test.querySelector('iframe'); - processResults(test, expectedFailuresForBrowser(test_iframe.contentWindow.expected_failures)); - - break; - - case 'POSTING': - if (oldState != 'FINISHED') { - throw 'Unexpected state change! ' + oldState + ' changing to POSTING'; - } - - if (test.className == 'fail') { - // Open up the window of the failed result - test.showInfo(); - // Scroll to it. - window.scroll(0, trueOffsetTop(test)); - } - - // Open the status window for taking of screenshots - var data = new FormData(); - data.append('data', JSON.stringify(test.results_processed)); - - var xhr = new XMLHttpRequest(); - xhr.onload = function (e) { - if (e.target.status >= 400) { - skipPosting = true; - } - // Move from running to finished state - changeTestState(this, 'POSTED'); - }.bind(test); - xhr.open('POST', 'test-results-post.html', true); - xhr.send(data); - - break; - - case 'POSTED': - // If we are skipping POSTING, tests can transition straight from FINISHED - // state into the POSTED state. - if (oldState != 'POSTING' && (!skipPosting || oldState != 'FINISHED')) { - throw 'Unexpected state change! ' + oldState + ' changing to POSTED'; - } - break; - } -} - -/** - * Elements for reporting the overall status. - */ -/* @type {Element} */ var statusElement = document.querySelector('#status'); - -/* @type {Element} */ var testElement = document.querySelector('#tests'); - -/* @type {Element} */ var loadingElement = document.querySelector('#loading'); -/* @type {Element} */ var loadedElement = document.querySelector('#loaded'); - -/* @type {Element} */ var runningElement = document.querySelector('#running'); -/* @type {Element} */ var finishedElement = document.querySelector('#finished'); - -/* @type {Element} */ var postingElement = document.querySelector('#posting'); -/* @type {Element} */ var postedElement = document.querySelector('#posted'); - -/** - * Update the status dialog with information about the current status. - */ -function updateStatus() { - testElement.textContent = tests.length; - - loadingElement.textContent = testStates['LOADING'].length; - loadedElement.textContent = testStates['LOADED'].length; - - runningElement.textContent = testStates['RUNNING'].length; - finishedElement.textContent = testStates['FINISHED'].length; - - postingElement.textContent = testStates['POSTING'].length; - postedElement.textContent = testStates['POSTED'].length; - - if (testStates['LOADED'].length > 0) { - statusElement.textContent = 'Loading'; - } else if (testStates['RUNNING'].length > 0) { - statusElement.textContent = 'Running'; - } else if (testStates['POSTING'].length > 0) { - statusElement.textContent = 'Posting results'; - } else if (testStates['POSTED'].length == tests.length) { - statusElement.textContent = 'Finished'; - - window.clearInterval(updateStatusId); - window.clearInterval(runTestsId); - window.finished = true; - if (window.__coverage__) { - generateCoverageReport(); - } - } -} - -/* @type {?number} */ var updateStatusId = setInterval(updateStatus, 100); - - -var testRunners = []; - -/** - * Create the iframes for each test. - */ -window.onload = function createTestRunners() { - // Filter the tests - var filter = window.location.href.split('?')[1]; - if (filter) { - filter = new RegExp(filter); - tests = tests.filter(function(v) { - return filter.exec(v); - }); - } - - function testSort(a, b) { - a = a.replace('.', '-'); - b = b.replace('.', '-'); - return a.localeCompare(b); - } - tests.sort(testSort); - - for (var i = 0; i < tests.length; i++) { - var testName = tests[i]; - var testURL = 'testcases/' + testName; - - var test = createTestRows(testName, testURL); - testRunners.unshift(test); - - changeTestState(test, 'LOADING'); - - document.querySelector('#results').appendChild(test); - test.querySelector('iframe').contentWindow.onload = function() { - // You can get multiple onload events, only deal with the first one. - if (this.state == 'LOADING') { - changeTestState(this, 'LOADED'); - runTestsIfLoaded(); - } - }.bind(test); - } - -}; - -/** - * Start as many loaded tests as possible, wait for results and then post - * them. - */ -function runTests() { - // Start a test running - if (testStates['LOADED'].length > 0 && - testStates['RUNNING'].length < 1) { - changeTestState(testStates['LOADED'][0], 'RUNNING'); - } - - // Start a test posting - if (testStates['FINISHED'].length > 0 && - testStates['POSTING'].length < 1) { - changeTestState(testStates['FINISHED'][0], 'POSTING'); - } - - // Deal with tests which are taking too long... - for (var i in testStates['RUNNING']) { - var test = testStates['RUNNING'][i]; - if (now() - test.start > 300e3) { - // Only way to stop all the javascript and anything else running in the - // test is to clear the document. - var test_iframe = test.querySelector('iframe'); - test_iframe.src = "data:text/html;charset=utf-8,<!DOCTYPE html><html><body>TIMEOUT</body></html>"; - - test.results_raw = []; - changeTestState(test, 'FINISHED'); - } - } -} - -/* @type {Object.<string, Object>} */ var testResults = {}; -/** - * Callback that occurs when the test has finished running. - */ -window.addEventListener( - 'message', - function(evt) { - // If the test timed out, this will fail with a cross-origin error. - try { - var testname = evt.source.location.pathname.split('/').pop().replace('.', '-'); - } catch (e) { - return; - } - - var test = document.getElementById(testname); - - // We only respond to complete as postMessage doesn't guarantee order so - // result messages can come in after the complete message. - if (evt.data['type'] != 'complete') - return; - - // Try changing to state FINISHED, but this message may be after the a - // timeout or transition. - try { - test.results_raw = evt.data['tests']; - changeTestState(test, 'FINISHED'); - } catch (e) { - console.warn(e); - } - }, - false); - - -/** - * Filters expected test failures for ones that match the current browser - * configuration. - * - * @param {Array.<Object>} Test failure expectations for all browser - * configurations. - * @return {Object.<string, string>} Mapping from test regex to failure reason - * for current browser. - */ -function expectedFailuresForBrowser(expected_failures) { - var browser_expected_failures = {}; - if (typeof expected_failures === 'object') { - expected_failures.forEach(function(expected_failure) { - if (expected_failure.browser_configurations.some( - browserConfigurationMatches)) { - expected_failure.tests.forEach(function(test) { - browser_expected_failures[test] = expected_failure.message; - }); - } - }); - } - return browser_expected_failures; -} - -/** - * Returns whether the browser configuration pattern matches the browser - * configuration reported by bowser.js. - * Example: - * { name: 'Chrome', version: '28|29' } - * matches browser configuration: - * { name: 'Chrome', webkit: true, chrome: true, version: '28.0' } - * - * @param {Object} Key - RegExp value pairs to check against. - * @return {bool} - */ -function browserConfigurationMatches(browser_configuration) { - for (var browser_feature in browser_configuration) { - var valueRegex = new RegExp(browser_configuration[browser_feature]); - if (!valueRegex.test(bowser[browser_feature])) { - return false; - } - } - return true; -} - -/** - * Processes the test's results and put the information into the test object. - * - * @param {Element} test DOM object representing the test. - * @param {Array.<Object>} results List of testharness.js result objects. - */ -function processResults(test, browser_expected_failures) { - var counts = { - passed: 0, - failed: 0, - skipped: 0, - expected_failed: 0, // This count is included in the above - total: test.results_raw.length - }; - var results = []; - var newResultsDiv = document.createElement('ul'); - - for(var i = 0; i < test.results_raw.length; i++) { - var result = test.results_raw[i]; - results[i] = result; - - // Invert expected_failures - var expected_failure = null; - for(var tname in browser_expected_failures) { - var tomatch = tname; - if (tname.charAt(0) == '/' && tname.charAt(tname.length-1) == '/') { - tomatch = new RegExp(tname.substr(1, tname.length-2)); - } - if (result['name'].match(tomatch)) { - expected_failure = browser_expected_failures[tname]; - } - } - if (expected_failure !== null && result.status != result.NOTRUN) { - if (result.status != result.FAIL) { - result.message = "Expected failure (" + expected_failure + "), actually " + - {0: 'PASS', 2: 'TIMEOUT', 3:'NOTRUN'}[result.status] + " " + - result.message; - result.status = result.FAIL; - } else { - result.status = result.PASS; - result.message = "Expected failure (" + expected_failure + "): " + result.message; - } - counts.expected_failed++; - } - - var output = document.createElement('li'); - output.innerHTML += result.name + ': '; - - switch (result.status) { - case result.PASS: - if (!expected_failure) { - output.className = 'pass'; - } else { - output.className = 'pass-expected-failure'; - } - counts.passed++; - break; - - case result.TIMEOUT: - output.className = 'timeout'; - counts.failed++; - break; - - case result.NOTRUN: - output.className = 'skipped'; - counts.skipped++; - break; - - case result.FAIL: - default: - output.className = 'failed'; - counts.failed++; - } - - output.innerHTML += output.className; - if (result.message != null) { - output.innerHTML += ' - ' + result.message; - } - newResultsDiv.appendChild(output); - } - test.querySelector('.log').appendChild(newResultsDiv); - - var debug = ''; - try { - debug = test.querySelector('iframe').contentDocument.getElementById('debug').innerText; - } catch (e) { - debug = 'No debug... :('; - } - - if (counts.total > 0) { - test.results_processed = { - type: 'result', - testName: test.id, - results: results, - debug: debug - }; - - if (counts.failed == 0) { - if (counts.expected_failed > 0) { - test.className = 'pass-expected-failure'; - } else if (counts.skipped > 0) { - test.className = 'skipped'; - } else { - test.className = 'pass'; - } - } else { - test.className = 'fail'; - } - - var summary = counts.total + ' tests; '; - if (counts.passed > 0) { - summary += ' ' + counts.passed + ' passed'; - if (counts.expected_failed > 0) { - summary += ' (with ' + counts.expected_failed + ' expected failures)'; - } - } - if (counts.failed > 0) { - summary += ' ' + counts.failed + ' failed'; - } - if (counts.skipped > 0) { - summary += ' ' + counts.skipped + ' skipped'; - } - test.querySelector('.count').textContent = summary; - } else { - test.results_processed = { - type: 'result', - testName: test.id, - results: [], - }; - test.className = 'no-tests'; - test.querySelector('.count').textContent = 'TIMEOUT'; - } -} - -})(); - - -</script> diff --git a/third_party/polymer/components/web-animations-js/test/testcases.js b/third_party/polymer/components/web-animations-js/test/testcases.js deleted file mode 100644 index 790f7ac..0000000 --- a/third_party/polymer/components/web-animations-js/test/testcases.js +++ /dev/null @@ -1,93 +0,0 @@ -// This file is automatically generated by test/update-testcases.py. -// Disable tests by adding them to test/disabled-testcases -var tests = [ - 'auto-test-box-shadow.html', - 'auto-test-calc.html', - 'auto-test-circular-path.html', - 'auto-test-color.html', - 'auto-test-color-names.html', - 'auto-test-composite-transforms.html', - 'auto-test-compositor.html', - 'auto-test-delay.html', - 'auto-test-element-animate.html', - 'auto-test-fill-values.html', - 'auto-test-font-weight.html', - 'auto-test-initial.html', - 'auto-test-inline-style.html', - 'auto-test-inline-style-fallback.html', - 'auto-test-inline-style-methods.html', - 'auto-test-integer.html', - 'auto-test-iteration-start.html', - 'auto-test-iterations-alternate.html', - 'auto-test-iterations-alternate-holes.html', - 'auto-test-iterations-basic.html', - 'auto-test-iterations-fill.html', - 'auto-test-keyframe-creation.html', - 'auto-test-keyframe-easing.html', - 'auto-test-length-units.html', - 'auto-test-matrix-transforms.html', - 'auto-test-motion-path.html', - 'auto-test-non-numeric.html', - 'auto-test-parent.html', - 'auto-test-partial-keyframes.html', - 'auto-test-path.html', - 'auto-test-pause.html', - 'auto-test-perspective.html', - 'auto-test-perspective-origin.html', - 'auto-test-playback-rate.html', - 'auto-test-rectangle.html', - 'auto-test-reparent.html', - 'auto-test-seq-speed.html', - 'auto-test-shorthand.html', - 'auto-test-start-time.html', - 'auto-test-start-time-iterations.html', - 'auto-test-svg-anim.html', - 'auto-test-svg-circle.html', - 'auto-test-svg-color.html', - 'auto-test-text-shadow.html', - 'auto-test-timing-functions.html', - 'auto-test-to-animation.html', - 'auto-test-transform-3d.html', - 'auto-test-transform-functions.html', - 'auto-test-transform-origin.html', - 'auto-test-transform-primitives.html', - 'auto-test-transform-units.html', - 'auto-test-visibility.html', - 'auto-test-wrapping-bug.html', - 'impl-test-deprecation.html', - 'impl-test-from-css-value.html', - 'impl-test-paced-timing-function.html', - 'impl-test-totimelinetime.html', - 'impl-unit-test-position-type.html', - 'test-bounds.html', - 'test-document-timeline.html', - 'test-dynamic-load.html', - 'test-fill-auto.html', - 'test-getcurrent.html', - 'test-keyframe-animation-effect.html', - 'test-keyframe-composite-operation.html', - 'test-null-target.html', - 'test-pause-for-testing.html', - 'test-player.html', - 'test-player-addeventlistener.html', - 'test-player-cleanup.html', - 'test-player-finish-event.html', - 'test-player-sort.html', - 'test-pseudo-element-reference.html', - 'test-repeated-pause.html', - 'test-restart.html', - 'test-reversed-player-active-phase.html', - 'test-rotation-not-reversed.html', - 'test-update-state.html', - 'unit-test-clone.html', - 'unit-test-delay.html', - 'unit-test-dom-operations.html', - 'unit-test-duration.html', - 'unit-test-get-siblings.html', - 'unit-test-modify-timing-params.html', - 'unit-test-null-effect.html', - 'unit-test-set-parent.html', - 'unit-test-testharness.html', - 'unit-test-testharness-failure.html', - 'unit-test-unpause.html', -]; diff --git a/third_party/polymer/components/web-animations-js/test/testcases/auto-test-box-shadow-checks.js b/third_party/polymer/components/web-animations-js/test/testcases/auto-test-box-shadow-checks.js deleted file mode 100644 index 025971a..0000000 --- a/third_party/polymer/components/web-animations-js/test/testcases/auto-test-box-shadow-checks.js +++ /dev/null @@ -1,42 +0,0 @@ -timing_test(function() { - at(0 * 1000, function() { - assert_styles(".anim", [ - {'boxShadow':'rgb(0, 0, 255) -20px -20px 0px 0px'}, - {'boxShadow':'rgb(0, 0, 255) -20px -20px 8px 0px inset'}, - {'boxShadow':'rgb(0, 0, 255) 20px 20px 8px 0px inset'}, - {'boxShadow':'none'}, - ]); - }); - at(1 * 1000, function() { - assert_styles(".anim", [ - {'boxShadow':'rgb(0, 32, 191) -10px -10px 3px 2px'}, - {'boxShadow':'rgb(0, 32, 191) -10px -10px 9px 2px inset'}, - {'boxShadow':'rgb(0, 0, 255) 20px 20px 8px 0px inset'}, - {'boxShadow':'none'}, - ]); - }); - at(2 * 1000, function() { - assert_styles(".anim", [ - {'boxShadow':'rgb(0, 64, 128) 0px 0px 6px 4px'}, - {'boxShadow':'rgb(0, 64, 128) 0px 0px 10px 4px inset'}, - {'boxShadow':'rgb(0, 128, 0) 20px 20px 12px 8px'}, - {'boxShadow':'rgb(0, 128, 0) 20px 20px 12px 8px'}, - ]); - }); - at(3 * 1000, function() { - assert_styles(".anim", [ - {'boxShadow':'rgb(0, 96, 64) 10px 10px 9px 6px'}, - {'boxShadow':'rgb(0, 96, 64) 10px 10px 11px 6px inset'}, - {'boxShadow':'rgb(0, 128, 0) 20px 20px 12px 8px'}, - {'boxShadow':'rgb(0, 128, 0) 20px 20px 12px 8px'}, - ]); - }); - at(4 * 1000, function() { - assert_styles(".anim", [ - {'boxShadow':'rgb(0, 128, 0) 20px 20px 12px 8px'}, - {'boxShadow':'rgb(0, 128, 0) 20px 20px 12px 8px inset'}, - {'boxShadow':'rgb(0, 128, 0) 20px 20px 12px 8px'}, - {'boxShadow':'rgb(0, 128, 0) 20px 20px 12px 8px'}, - ]); - }); -}, "Auto generated tests");
\ No newline at end of file diff --git a/third_party/polymer/components/web-animations-js/test/testcases/auto-test-box-shadow.html b/third_party/polymer/components/web-animations-js/test/testcases/auto-test-box-shadow.html deleted file mode 100644 index 5895876..0000000 --- a/third_party/polymer/components/web-animations-js/test/testcases/auto-test-box-shadow.html +++ /dev/null @@ -1,40 +0,0 @@ -<!-- -Copyright 2013 Google Inc. All Rights Reserved. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. ---> - -<!DOCTYPE html><meta charset="UTF-8"> -<script src="../bootstrap.js"></script> -<style> -.anim { - margin: 50px; - width: 50px; - height: 50px; - background-color: black; - display: inline-block; -} -</style> - -<div class="anim" id="a"></div> -<div class="anim" id="b"></div> -<div class="anim" id="c"></div> -<div class="anim" id="d"></div> - -<script> -'use strict'; -a.animate([{boxShadow: '-20px -20px blue'}, {boxShadow: '20px 20px 12px 8px green'}], {duration: 4 * 1000, fill: 'forwards'}); -b.animate([{boxShadow: 'inset -20px -20px 8px blue'}, {boxShadow: 'inset 20px 20px 12px 8px green'}], {duration: 4 * 1000, fill: 'forwards'}); -c.animate([{boxShadow: 'inset 20px 20px 8px blue'}, {boxShadow: '20px 20px 12px 8px green'}], {duration: 4 * 1000, fill: 'forwards'}); -d.animate([{boxShadow: '20px 20px 12px 8px green'}], {duration: 4 * 1000, fill: 'forwards'}); -</script> diff --git a/third_party/polymer/components/web-animations-js/test/testcases/auto-test-calc-checks.js b/third_party/polymer/components/web-animations-js/test/testcases/auto-test-calc-checks.js deleted file mode 100644 index 3eecd82..0000000 --- a/third_party/polymer/components/web-animations-js/test/testcases/auto-test-calc-checks.js +++ /dev/null @@ -1,41 +0,0 @@ -timing_test(function() { - at(0 * 1000, function() { - assert_styles(".anim",{'width':'50px'}); - }); - at(0.5 * 1000, function() { - assert_styles(".anim", [ - {'width':'81.25px'}, - {'width':'81.25px'}, - {'width':'137.5px'}, - {'width':'81.25px'}, - {'width':'95.3125px'}, - {'width':'95.3125px'}, - {'width':'95.3125px'}, - ]); - }); - at(1 * 1000, function() { - assert_styles(".anim", [ - {'width':'150px'}, - {'width':'150px'}, - {'width':'225px'}, - {'width':'150px'}, - {'width':'168.75px'}, - {'width':'168.75px'}, - {'width':'168.75px'}, - ]); - }); - at(1.5 * 1000, function() { - assert_styles(".anim", [ - {'width':'256.25px'}, - {'width':'256.25px'}, - {'width':'312.5px'}, - {'width':'256.25px'}, - {'width':'270.3125px'}, - {'width':'270.3125px'}, - {'width':'270.3125px'}, - ]); - }); - at(2 * 1000, function() { - assert_styles(".anim",{'width':'400px'}); - }); -}, "Auto generated tests"); diff --git a/third_party/polymer/components/web-animations-js/test/testcases/auto-test-calc.html b/third_party/polymer/components/web-animations-js/test/testcases/auto-test-calc.html deleted file mode 100644 index adee142..0000000 --- a/third_party/polymer/components/web-animations-js/test/testcases/auto-test-calc.html +++ /dev/null @@ -1,156 +0,0 @@ -<!-- -Copyright 2012 Google Inc. All Rights Reserved. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. ---> - -<!DOCTYPE html><meta charset="UTF-8"> - -<style> -.anim { - fill: lightsteelblue; - background-color: lightsteelblue; - height: 50px; - position: absolute; -} - -#a { - width: 50px; -} - -#b { - width: 25%; - top: 50px; -} - -#c { - width: 50px; - top: 100px; -} - -#d { - width: calc(25px + 12.5%); - top: 150px; -} - -#e { - width: 50px; - top: 200px; -} - -#f { - width: 25%; - top: 250px; -} - -#g { - width: calc(100px - 25%); - top: 300px; -} - -.expectation { - background-color: red; - position: absolute; - left: 0px; - height: 50px; -} - -.expectation2 { - background-color: #F88; - position: absolute; - top: 0px; - left: 0px; - width: 400px; - height: 350px; -} - -.outer { - width: 200px; - background-color: green; - position: absolute; - top: 50px; - left: 50px; - height: 350px; -} - -.spacer { - height: 400px; -} - -</style> - -Blue lines should all hit the deep red boundary at the same time, then -completely cover the light red box when the animation has finished. - -<div class="outer"> - <div class="expectation2"></div> - <div class="expectation" style="top: 0px; width: 150px"></div> - <div class="anim" id="a"></div> - <div class="expectation" style="top: 50px; width: 187.5px"></div> - <div class="anim" id="b"></div> - <div class="expectation" style="top: 100px; width: 225px"></div> - <div class="anim" id="c"></div> - <div class="expectation" style="top: 150px; width: 168.75px"></div> - <div class="anim" id="d"></div> - <div class="expectation" style="top: 200px; width: 168.75px"></div> - <div class="anim" id="e"></div> - <div class="expectation" style="top: 250px; width: 218.75px"></div> - <div class="anim" id="f"></div> - <div class="expectation" style="top: 300px; width: 131.25px"></div> - <div class="anim" id="g"></div> -</div> -<div class="spacer"> -</div> - -<script> -var expected_failures = [ - { - browser_configurations: [ - { firefox: true }, - { msie: true }, - ], - tests: ['Auto generated tests at t=500ms'], - message: 'Floating point issues.', - } -]; -</script> -<script src="../bootstrap.js"></script> -<script> -"use strict"; - -var dt = document.timeline; -var timing = {duration: 2 * 1000, fill: 'forwards'}; - -dt.play(new Animation(document.querySelector(".outer"), - {width: "800px"}, timing)); - -// 50px -> 0px linear, 0% -> 50% (0px -> 400px quadratic) -dt.play(new Animation(document.querySelector("#a"), {width: "50%"}, timing)); -// 25% -> 50% (50px -> 400px quadratic) -dt.play(new Animation(document.querySelector("#b"), {width: "50%"}, timing)); -// 50px -> 400px linear -dt.play(new Animation(document.querySelector("#c"), - {width: "400px"}, timing)); -// 25px -> 0px linear, 12.5% -> 50% (25px -> 400px quadratic) -dt.play(new Animation(document.querySelector("#d"), {width: "50%"}, timing)); -// 50px -> 100px linear, 0% -> 37.5% (0px -> 300px quadratic) -dt.play(new Animation(document.querySelector("#e"), - {width: "calc(37.5% + 100px)"}, timing)); -// 0px -> 100px linear, 25% -> 37.5% (50px -> 300px quadratic) -dt.play(new Animation(document.querySelector("#f"), - {width: "calc(37.5% + 100px)"}, timing)); -// 100px -> 100px linear, -25% -> 37.5% (-50px -> 300px quadratic) -dt.play(new Animation(document.querySelector("#g"), - {width: "calc(37.5% + 100px)"}, timing)); - -</script> diff --git a/third_party/polymer/components/web-animations-js/test/testcases/auto-test-change-playback-rate-checks.js b/third_party/polymer/components/web-animations-js/test/testcases/auto-test-change-playback-rate-checks.js deleted file mode 100644 index 3cc30d1..0000000 --- a/third_party/polymer/components/web-animations-js/test/testcases/auto-test-change-playback-rate-checks.js +++ /dev/null @@ -1,23 +0,0 @@ -timing_test(function() { - at( 0.0, function() {assert_styles('#a', {'left':'0px'})}, "Autogenerated test at t= 0.0"); - at( 1.0, function() {assert_styles('#a', {'left':'50px'})}, "Autogenerated test at t= 1.0"); - at( 2.0, function() {assert_styles('#a', {'left':'100px'})}, "Autogenerated test at t= 2.0"); - at( 3.0, function() {assert_styles('#a', {'left':'150px'})}, "Autogenerated test at t= 3.0"); - at( 4.0, function() {assert_styles('#a', {'left':'200px'})}, "Autogenerated test at t= 4.0"); - at( 5.0, function() {assert_styles('#a', {'left':'250px'})}, "Autogenerated test at t= 5.0"); - at( 6.0, function() {assert_styles('#a', {'left':'300px'})}, "Autogenerated test at t= 6.0"); - at( 7.0, function() {assert_styles('#a', {'left':'350px'})}, "Autogenerated test at t= 7.0"); - at( 8.0, function() {assert_styles('#a', {'left':'400px'})}, "Autogenerated test at t= 8.0"); - at( 9.0, function() {assert_styles('#a', {'left':'450px'})}, "Autogenerated test at t= 9.0"); - at(10.0 * 1000, function() {assert_styles('#a', {'left':'500px'})}, "Autogenerated"); - at(11.0 * 1000, function() {assert_styles('#a', {'left':'450px'})}, "Autogenerated"); - at(12.0 * 1000, function() {assert_styles('#a', {'left':'400px'})}, "Autogenerated"); - at(13.0 * 1000, function() {assert_styles('#a', {'left':'350px'})}, "Autogenerated"); - at(14.0 * 1000, function() {assert_styles('#a', {'left':'300px'})}, "Autogenerated"); - at(15.0 * 1000, function() {assert_styles('#a', {'left':'250px'})}, "Autogenerated"); - at(16.0 * 1000, function() {assert_styles('#a', {'left':'200px'})}, "Autogenerated"); - at(17.0 * 1000, function() {assert_styles('#a', {'left':'150px'})}, "Autogenerated"); - at(18.0 * 1000, function() {assert_styles('#a', {'left':'100px'})}, "Autogenerated"); - at(19.0 * 1000, function() {assert_styles('#a', {'left':'50px'})}, "Autogenerated"); - at(20.0 * 1000, function() {assert_styles('#a', {'left':'0px'})}, "Autogenerated"); -}, "Autogenerated checks."); diff --git a/third_party/polymer/components/web-animations-js/test/testcases/auto-test-circular-path-checks.js b/third_party/polymer/components/web-animations-js/test/testcases/auto-test-circular-path-checks.js deleted file mode 100644 index 4be4f4a..0000000 --- a/third_party/polymer/components/web-animations-js/test/testcases/auto-test-circular-path-checks.js +++ /dev/null @@ -1,65 +0,0 @@ -timing_test(function() { - at(0, function() { - assert_styles("#anim",{'transform':'matrix(0.7924, 0.61, -0.61, 0.7924, 117.5, 87.5)'}); - }); - at(1000, function() { - assert_styles("#anim",{'transform':'matrix(0.9836, 0.1802, -0.1802, 0.9836, 145.7, 146.2)'}); - }); - at(2000, function() { - assert_styles("#anim",{'transform':'matrix(0.9755, -0.2198, 0.2198, 0.9755, 209.2, 160.6)'}); - }); - at(3000, function() { - assert_styles("#anim",{'transform':'matrix(0.4368, -0.8996, 0.8996, 0.4368, 260.1, 120)'}); - }); - at(4000, function() { - assert_styles("#anim",{'transform':'matrix(-0.9328, -0.3605, 0.3605, -0.9328, 260.2, 54.85)'}); - }); - at(5000, function() { - assert_styles("#anim",{'transform':'matrix(-0.9995, -0.03009, 0.03009, -0.9995, 209.2, 14.32)'}); - }); - at(6000, function() { - assert_styles("#anim",{'transform':'matrix(-0.7815, 0.6239, -0.6239, -0.7815, 145.7, 28.86)'}); - }); - at(7000, function() { - assert_styles("#anim",{'transform':'matrix(0.7924, 0.61, -0.61, 0.7924, 247.5, 187.5)'}); - }); - at(8000, function() { - assert_styles("#anim",{'transform':'matrix(0.9836, 0.1802, -0.1802, 0.9836, 275.7, 246.2)'}); - }); - at(9000, function() { - assert_styles("#anim",{'transform':'matrix(0.9755, -0.2198, 0.2198, 0.9755, 339.2, 260.6)'}); - }); - at(10000, function() { - assert_styles("#anim",{'transform':'matrix(0.4368, -0.8996, 0.8996, 0.4368, 390.1, 220)'}); - }); - at(11000, function() { - assert_styles("#anim",{'transform':'matrix(-0.9328, -0.3605, 0.3605, -0.9328, 390.2, 154.8)'}); - }); - at(12000, function() { - assert_styles("#anim",{'transform':'matrix(-0.9995, -0.03009, 0.03009, -0.9995, 339.2, 114.3)'}); - }); - at(13000, function() { - assert_styles("#anim",{'transform':'matrix(-0.7815, 0.6239, -0.6239, -0.7815, 275.7, 128.9)'}); - }); - at(14000, function() { - assert_styles("#anim",{'transform':'matrix(0.7924, 0.61, -0.61, 0.7924, 377.5, 287.5)'}); - }); - at(15000, function() { - assert_styles("#anim",{'transform':'matrix(0.9836, 0.1802, -0.1802, 0.9836, 405.7, 346.2)'}); - }); - at(16000, function() { - assert_styles("#anim",{'transform':'matrix(0.9755, -0.2198, 0.2198, 0.9755, 469.2, 360.6)'}); - }); - at(17000, function() { - assert_styles("#anim",{'transform':'matrix(0.4368, -0.8996, 0.8996, 0.4368, 520.1, 320)'}); - }); - at(18000, function() { - assert_styles("#anim",{'transform':'matrix(-0.9328, -0.3605, 0.3605, -0.9328, 520.2, 254.8)'}); - }); - at(19000, function() { - assert_styles("#anim",{'transform':'matrix(-0.9995, -0.03009, 0.03009, -0.9995, 469.2, 214.3)'}); - }); - at(20000, function() { - assert_styles("#anim",{'transform':'matrix(-0.7815, 0.6239, -0.6239, -0.7815, 405.7, 228.9)'}); - }); -}, "Auto generated tests"); diff --git a/third_party/polymer/components/web-animations-js/test/testcases/auto-test-circular-path.html b/third_party/polymer/components/web-animations-js/test/testcases/auto-test-circular-path.html deleted file mode 100644 index a8e7acc..0000000 --- a/third_party/polymer/components/web-animations-js/test/testcases/auto-test-circular-path.html +++ /dev/null @@ -1,83 +0,0 @@ -<!-- -Copyright 2012 Google Inc. All Rights Reserved. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. ---> - -<!DOCTYPE html><meta charset="UTF-8"> -<style> -.animation { - position: absolute; - width: 25px; - height: 25px; - top: 0px; - left: 0px; - background: lightsteelblue; -} -.expectation { - background: red; - position: absolute; - width: 25px; - height: 25px; - top: 0px; - left: 0px; -} -#e { - -webkit-transform: translate(117.5px, 87.5px); - transform: translate(117.5px, 87.5px); -} -svg { -position:absolute; -top: 0px; -left: 0px; -width: 800px; -height: 600px; -} -</style> - -<svg xmlns="http://www.w3.org/2000/svg" version="1.1"> - <path id="path" d="M 130,100 a 75,75 0 1,0 150,0 a 75,75 0 1,0 -150,0 " /> - <path d="M 130,100 a 75,75 0 1,0 150,0 a 75,75 0 1,0 -150,0 " - stroke="black" stroke-width="1" fill="none" /> - <path d="M 260,200 a 75,75 0 1,0 150,0 a 75,75 0 1,0 -150,0 " - stroke="black" stroke-width="1" fill="none" /> - <path d="M 390,300 a 75,75 0 1,0 150,0 a 75,75 0 1,0 -150,0 " - stroke="black" stroke-width="1" fill="none" /> -</svg> - -<div id="e" class="expectation"></div> -<div id="anim" class="animation">→</div> - -<script> -var expected_failures = [ - { - browser_configurations: [ - { firefox: true }, - { msie: true }, - ], - tests: ['Auto generated tests'], - message: 'Doesn\'t quite follow path correctly.', - } -]; -</script> -<script src="../bootstrap.js"></script> -<script> -"use strict"; - -var options = {autoRotate: 'auto-rotate', iterationComposite: 'accumulate'}; -var animFunc = new MotionPathEffect( - document.querySelector('#path').pathSegList, options); -document.timeline.play(new Animation(document.querySelector("#anim"), - animFunc, {duration: 7 * 1000, iterations: 3})); - -</script> diff --git a/third_party/polymer/components/web-animations-js/test/testcases/auto-test-color-checks.js b/third_party/polymer/components/web-animations-js/test/testcases/auto-test-color-checks.js deleted file mode 100644 index c08bace..0000000 --- a/third_party/polymer/components/web-animations-js/test/testcases/auto-test-color-checks.js +++ /dev/null @@ -1,101 +0,0 @@ -timing_test(function() { - at(0 * 1000, function() { - assert_styles(".anim", [ - {'background-color':'rgb(255, 0, 0)'}, - {'background-color':'rgb(176, 196, 222)'}, - {'background-color':'rgb(0, 128, 0)'}, - {'background-color':'rgba(0, 0, 0, 0)'}, - {'background-color':'rgba(255, 0, 255, 0)'}, - {'background-color':'rgb(0, 0, 0)'}, - {'background-color':'rgb(0, 0, 0)'}, - ]); - }); - at(0.25 * 1000, function() { - assert_styles(".anim", [ - {'background-color':'rgb(223, 16, 0)'}, - {'background-color':'rgb(154, 188, 194)'}, - {'background-color':'rgb(128, 128, 0)'}, - {'background-color':'rgba(255, 255, 255, 0.2471)'}, - {'background-color':'rgba(255, 255, 255, 0.2471)'}, - {'background-color':'rgb(32, 32, 32)'}, - {'background-color':'rgb(32, 32, 32)'}, - ]); - }); - at(0.5 * 1000, function() { - assert_styles(".anim", [ - {'background-color':'rgb(191, 32, 0)'}, - {'background-color':'rgb(132, 179, 167)'}, - {'background-color':'rgb(255, 128, 0)'}, - {'background-color':'rgba(255, 255, 255, 0.498)'}, - {'background-color':'rgba(255, 255, 255, 0.498)'}, - {'background-color':'rgb(64, 64, 64)'}, - {'background-color':'rgb(64, 64, 64)'}, - ]); - }); - at(0.75 * 1000, function() { - assert_styles(".anim", [ - {'background-color':'rgb(159, 48, 0)'}, - {'background-color':'rgb(110, 171, 139)'}, - {'background-color':'rgb(191, 128, 64)'}, - {'background-color':'rgba(255, 255, 255, 0.749)'}, - {'background-color':'rgba(255, 255, 255, 0.749)'}, - {'background-color':'rgb(96, 96, 96)'}, - {'background-color':'rgb(96, 96, 96)'}, - ]); - }); - at(1 * 1000, function() { - assert_styles(".anim", [ - {'background-color':'rgb(128, 64, 0)'}, - {'background-color':'rgb(88, 162, 111)'}, - {'background-color':'rgb(128, 128, 128)'}, - {'background-color':'rgb(255, 255, 255)'}, - {'background-color':'rgb(255, 255, 255)'}, - {'background-color':'rgb(128, 128, 128)'}, - {'background-color':'rgb(128, 128, 128)'}, - ]); - }); - at(1.25 * 1000, function() { - assert_styles(".anim", [ - {'background-color':'rgb(96, 80, 0)'}, - {'background-color':'rgb(66, 154, 83)'}, - {'background-color':'rgb(64, 128, 191)'}, - {'background-color':'rgba(255, 255, 255, 0.749)'}, - {'background-color':'rgba(255, 255, 255, 0.749)'}, - {'background-color':'rgb(159, 159, 159)'}, - {'background-color':'rgb(159, 159, 159)'}, - ]); - }); - at(1.5 * 1000, function() { - assert_styles(".anim", [ - {'background-color':'rgb(64, 96, 0)'}, - {'background-color':'rgb(44, 145, 56)'}, - {'background-color':'rgb(0, 128, 255)'}, - {'background-color':'rgba(255, 255, 255, 0.498)'}, - {'background-color':'rgba(255, 255, 255, 0.498)'}, - {'background-color':'rgb(191, 191, 191)'}, - {'background-color':'rgb(191, 191, 191)'}, - ]); - }); - at(1.75 * 1000, function() { - assert_styles(".anim", [ - {'background-color':'rgb(32, 112, 0)'}, - {'background-color':'rgb(22, 137, 28)'}, - {'background-color':'rgb(0, 128, 128)'}, - {'background-color':'rgba(255, 255, 255, 0.2471)'}, - {'background-color':'rgba(255, 255, 255, 0.2471)'}, - {'background-color':'rgb(223, 223, 223)'}, - {'background-color':'rgb(223, 223, 223)'}, - ]); - }); - at(2 * 1000, function() { - assert_styles(".anim", [ - {'background-color':'rgb(0, 128, 0)'}, - {'background-color':'rgb(0, 128, 0)'}, - {'background-color':'rgb(0, 128, 0)'}, - {'background-color':'rgba(0, 0, 0, 0)'}, - {'background-color':'rgba(255, 0, 255, 0)'}, - {'background-color':'rgb(255, 255, 255)'}, - {'background-color':'rgb(255, 255, 255)'}, - ]); - }); -}, "Auto generated tests"); diff --git a/third_party/polymer/components/web-animations-js/test/testcases/auto-test-color-names-checks.js b/third_party/polymer/components/web-animations-js/test/testcases/auto-test-color-names-checks.js deleted file mode 100644 index 8821afe..0000000 --- a/third_party/polymer/components/web-animations-js/test/testcases/auto-test-color-names-checks.js +++ /dev/null @@ -1,431 +0,0 @@ -timing_test(function() { - at(0.0 * 1000, function() { - assert_styles( - '.anim', - [{'backgroundColor':'rgb(240, 248, 255)'}, - {'backgroundColor':'rgb(255, 127, 80)'}, - {'backgroundColor':'rgb(139, 0, 0)'}, - {'backgroundColor':'rgb(220, 220, 220)'}, - {'backgroundColor':'rgb(124, 252, 0)'}, - {'backgroundColor':'rgb(255, 255, 224)'}, - {'backgroundColor':'rgb(255, 228, 225)'}, - {'backgroundColor':'rgb(205, 133, 63)'}, - {'backgroundColor':'rgb(106, 90, 205)'}]); - }, "Autogenerated"); - at(0.125 * 1000, function() { - assert_styles( - '.anim', - [{'backgroundColor':'rgb(245, 242, 236)'}, - {'backgroundColor':'rgb(182, 137, 154)'}, - {'backgroundColor':'rgb(186, 75, 61)'}, - {'backgroundColor':'rgb(233, 233, 236)'}, - {'backgroundColor':'rgb(185, 251, 96)'}, - {'backgroundColor':'rgb(128, 255, 112)'}, - {'backgroundColor':'rgb(255, 228, 204)'}, - {'backgroundColor':'rgb(228, 161, 129)'}, - {'backgroundColor':'rgb(109, 109, 175)'}]); - }, "Autogenerated"); - at(0.25 * 1000, function() { - assert_styles( - '.anim', - [{'backgroundColor':'rgb(249, 236, 218)'}, - {'backgroundColor':'rgb(110, 148, 227)'}, - {'backgroundColor':'rgb(233, 150, 122)'}, - {'backgroundColor':'rgb(246, 246, 253)'}, - {'backgroundColor':'rgb(247, 250, 192)'}, - {'backgroundColor':'rgb(0, 255, 0)'}, - {'backgroundColor':'rgb(255, 228, 184)'}, - {'backgroundColor':'rgb(252, 188, 194)'}, - {'backgroundColor':'rgb(112, 128, 144)'}]); - }, "Autogenerated"); - at(0.375 * 1000, function() { - assert_styles( - '.anim', - [{'backgroundColor':'rgb(148, 243, 231)'}, - {'backgroundColor':'rgb(163, 189, 230)'}, - {'backgroundColor':'rgb(188, 169, 133)'}, - {'backgroundColor':'rgb(251, 235, 151)'}, - {'backgroundColor':'rgb(222, 236, 215)'}, - {'backgroundColor':'rgb(25, 230, 25)'}, - {'backgroundColor':'rgb(255, 226, 178)'}, - {'backgroundColor':'rgb(241, 179, 210)'}, - {'backgroundColor':'rgb(112, 128, 144)'}]); - }, "Autogenerated"); - at(0.5 * 1000, function() { - assert_styles( - '.anim', - [{'backgroundColor':'rgb(31, 253, 250)'}, - {'backgroundColor':'rgb(236, 236, 222)'}, - {'backgroundColor':'rgb(143, 188, 143)'}, - {'backgroundColor':'rgb(254, 219, 32)'}, - {'backgroundColor':'rgb(183, 220, 227)'}, - {'backgroundColor':'rgb(50, 205, 50)'}, - {'backgroundColor':'rgb(255, 223, 174)'}, - {'backgroundColor':'rgb(225, 164, 219)'}, - {'backgroundColor':'rgb(112, 128, 144)'}]); - }, "Autogenerated"); - at(0.625 * 1000, function() { - assert_styles( - '.anim', - [{'backgroundColor':'rgb(44, 255, 240)'}, - {'backgroundColor':'rgb(243, 170, 165)'}, - {'backgroundColor':'rgb(108, 125, 141)'}, - {'backgroundColor':'rgb(242, 198, 11)'}, - {'backgroundColor':'rgb(196, 186, 195)'}, - {'backgroundColor':'rgb(150, 223, 140)'}, - {'backgroundColor':'rgb(167, 146, 158)'}, - {'backgroundColor':'rgb(206, 182, 224)'}, - {'backgroundColor':'rgb(184, 189, 197)'}]); - }, "Autogenerated"); - at(0.75 * 1000, function() { - assert_styles( - '.anim', - [{'backgroundColor':'rgb(103, 255, 220)'}, - {'backgroundColor':'rgb(227, 63, 90)'}, - {'backgroundColor':'rgb(72, 61, 139)'}, - {'backgroundColor':'rgb(225, 174, 26)'}, - {'backgroundColor':'rgb(227, 145, 147)'}, - {'backgroundColor':'rgb(250, 240, 230)'}, - {'backgroundColor':'rgb(48, 42, 136)'}, - {'backgroundColor':'rgb(184, 212, 228)'}, - {'backgroundColor':'rgb(255, 250, 250)'}]); - }, "Autogenerated"); - at(0.875 * 1000, function() { - assert_styles( - '.anim', - [{'backgroundColor':'rgb(159, 255, 224)'}, - {'backgroundColor':'rgb(158, 86, 115)'}, - {'backgroundColor':'rgb(60, 70, 109)'}, - {'backgroundColor':'rgb(193, 155, 59)'}, - {'backgroundColor':'rgb(236, 164, 164)'}, - {'backgroundColor':'rgb(253, 120, 243)'}, - {'backgroundColor':'rgb(71, 69, 157)'}, - {'backgroundColor':'rgb(163, 161, 201)'}, - {'backgroundColor':'rgb(128, 253, 189)'}]); - }, "Autogenerated"); - at(1.0 * 1000, function() { - assert_styles( - '.anim', - [{'backgroundColor':'rgb(212, 255, 244)'}, - {'backgroundColor':'rgb(55, 196, 206)'}, - {'backgroundColor':'rgb(47, 79, 79)'}, - {'backgroundColor':'rgb(151, 137, 104)'}, - {'backgroundColor':'rgb(228, 223, 223)'}, - {'backgroundColor':'rgb(255, 0, 255)'}, - {'backgroundColor':'rgb(190, 184, 205)'}, - {'backgroundColor':'rgb(140, 56, 154)'}, - {'backgroundColor':'rgb(0, 255, 127)'}]); - }, "Autogenerated"); - at(1.125 * 1000, function() { - assert_styles( - '.anim', - [{'backgroundColor':'rgb(241, 253, 247)'}, - {'backgroundColor':'rgb(0, 199, 230)'}, - {'backgroundColor':'rgb(47, 79, 79)'}, - {'backgroundColor':'rgb(100, 128, 100)'}, - {'backgroundColor':'rgb(230, 254, 245)'}, - {'backgroundColor':'rgb(192, 0, 128)'}, - {'backgroundColor':'rgb(226, 219, 180)'}, - {'backgroundColor':'rgb(156, 0, 100)'}, - {'backgroundColor':'rgb(35, 193, 154)'}]); - }, "Autogenerated"); - at(1.25 * 1000, function() { - assert_styles( - '.anim', - [{'backgroundColor':'rgb(243, 248, 231)'}, - {'backgroundColor':'rgb(0, 80, 175)'}, - {'backgroundColor':'rgb(47, 79, 79)'}, - {'backgroundColor':'rgb(40, 128, 40)'}, - {'backgroundColor':'rgb(242, 252, 224)'}, - {'backgroundColor':'rgb(128, 0, 0)'}, - {'backgroundColor':'rgb(167, 165, 72)'}, - {'backgroundColor':'rgb(215, 0, 40)'}, - {'backgroundColor':'rgb(70, 130, 180)'}]); - }, "Autogenerated"); - at(1.375 * 1000, function() { - assert_styles( - '.anim', - [{'backgroundColor':'rgb(247, 242, 216)'}, - {'backgroundColor':'rgb(0, 22, 139)'}, - {'backgroundColor':'rgb(24, 143, 144)'}, - {'backgroundColor':'rgb(27, 148, 7)'}, - {'backgroundColor':'rgb(244, 244, 210)'}, - {'backgroundColor':'rgb(115, 103, 85)'}, - {'backgroundColor':'rgb(125, 130, 5)'}, - {'backgroundColor':'rgb(245, 22, 22)'}, - {'backgroundColor':'rgb(140, 155, 160)'}]); - }, "Autogenerated"); - at(1.5 * 1000, function() { - assert_styles( - '.anim', - [{'backgroundColor':'rgb(251, 234, 205)'}, - {'backgroundColor':'rgb(0, 87, 139)'}, - {'backgroundColor':'rgb(0, 206, 209)'}, - {'backgroundColor':'rgb(108, 207, 29)'}, - {'backgroundColor':'rgb(226, 226, 211)'}, - {'backgroundColor':'rgb(102, 205, 170)'}, - {'backgroundColor':'rgb(115, 137, 22)'}, - {'backgroundColor':'rgb(213, 89, 89)'}, - {'backgroundColor':'rgb(210, 180, 140)'}]); - }, "Autogenerated"); - at(1.625 * 1000, function() { - assert_styles( - '.anim', - [{'backgroundColor':'rgb(231, 207, 178)'}, - {'backgroundColor':'rgb(17, 139, 127)'}, - {'backgroundColor':'rgb(74, 103, 210)'}, - {'backgroundColor':'rgb(169, 243, 55)'}, - {'backgroundColor':'rgb(205, 214, 205)'}, - {'backgroundColor':'rgb(51, 103, 188)'}, - {'backgroundColor':'rgb(121, 144, 32)'}, - {'backgroundColor':'rgb(176, 139, 151)'}, - {'backgroundColor':'rgb(105, 154, 134)'}]); - }, "Autogenerated"); - at(1.75 * 1000, function() { - assert_styles( - '.anim', - [{'backgroundColor':'rgb(112, 100, 86)'}, - {'backgroundColor':'rgb(103, 136, 67)'}, - {'backgroundColor':'rgb(148, 0, 211)'}, - {'backgroundColor':'rgb(148, 184, 93)'}, - {'backgroundColor':'rgb(173, 226, 173)'}, - {'backgroundColor':'rgb(0, 0, 205)'}, - {'backgroundColor':'rgb(190, 155, 15)'}, - {'backgroundColor':'rgb(119, 122, 189)'}, - {'backgroundColor':'rgb(0, 128, 128)'}]); - }, "Autogenerated"); - at(1.875 * 1000, function() { - assert_styles( - '.anim', - [{'backgroundColor':'rgb(8, 7, 6)'}, - {'backgroundColor':'rgb(184, 135, 16)'}, - {'backgroundColor':'rgb(202, 10, 179)'}, - {'backgroundColor':'rgb(132, 132, 132)'}, - {'backgroundColor':'rgb(146, 237, 146)'}, - {'backgroundColor':'rgb(93, 43, 208)'}, - {'backgroundColor':'rgb(255, 162, 0)'}, - {'backgroundColor':'rgb(67, 104, 219)'}, - {'backgroundColor':'rgb(108, 160, 172)'}]); - }, "Autogenerated"); - at(2.0 * 1000, function() { - assert_styles( - '.anim', - [{'backgroundColor':'rgb(128, 118, 103)'}, - {'backgroundColor':'rgb(177, 152, 90)'}, - {'backgroundColor':'rgb(255, 20, 147)'}, - {'backgroundColor':'rgb(184, 192, 184)'}, - {'backgroundColor':'rgb(178, 225, 178)'}, - {'backgroundColor':'rgb(186, 85, 211)'}, - {'backgroundColor':'rgb(255, 117, 0)'}, - {'backgroundColor':'rgb(102, 87, 122)'}, - {'backgroundColor':'rgb(216, 191, 216)'}]); - }, "Autogenerated"); - at(2.125 * 1000, function() { - assert_styles( - '.anim', - [{'backgroundColor':'rgb(247, 228, 199)'}, - {'backgroundColor':'rgb(169, 168, 164)'}, - {'backgroundColor':'rgb(128, 106, 201)'}, - {'backgroundColor':'rgb(237, 251, 237)'}, - {'backgroundColor':'rgb(209, 212, 209)'}, - {'backgroundColor':'rgb(167, 99, 215)'}, - {'backgroundColor':'rgb(255, 72, 0)'}, - {'backgroundColor':'rgb(137, 70, 25)'}, - {'backgroundColor':'rgb(236, 145, 144)'}]); - }, "Autogenerated"); - at(2.25 * 1000, function() { - assert_styles( - '.anim', - [{'backgroundColor':'rgb(143, 132, 227)'}, - {'backgroundColor':'rgb(95, 139, 95)'}, - {'backgroundColor':'rgb(0, 191, 255)'}, - {'backgroundColor':'rgb(247, 189, 214)'}, - {'backgroundColor':'rgb(230, 198, 203)'}, - {'backgroundColor':'rgb(147, 112, 219)'}, - {'backgroundColor':'rgb(239, 88, 94)'}, - {'backgroundColor':'rgb(188, 95, 61)'}, - {'backgroundColor':'rgb(255, 99, 71)'}]); - }, "Autogenerated"); - at(2.375 * 1000, function() { - assert_styles( - '.anim', - [{'backgroundColor':'rgb(24, 22, 250)'}, - {'backgroundColor':'rgb(16, 106, 16)'}, - {'backgroundColor':'rgb(53, 148, 180)'}, - {'backgroundColor':'rgb(254, 119, 186)'}, - {'backgroundColor':'rgb(251, 185, 195)'}, - {'backgroundColor':'rgb(104, 146, 166)'}, - {'backgroundColor':'rgb(221, 108, 194)'}, - {'backgroundColor':'rgb(240, 122, 105)'}, - {'backgroundColor':'rgb(160, 162, 140)'}]); - }, "Autogenerated"); - at(2.5 * 1000, function() { - assert_styles( - '.anim', - [{'backgroundColor':'rgb(52, 16, 244)'}, - {'backgroundColor':'rgb(63, 126, 63)'}, - {'backgroundColor':'rgb(105, 105, 105)'}, - {'backgroundColor':'rgb(236, 100, 147)'}, - {'backgroundColor':'rgb(255, 174, 166)'}, - {'backgroundColor':'rgb(60, 179, 113)'}, - {'backgroundColor':'rgb(226, 157, 198)'}, - {'backgroundColor':'rgb(248, 142, 107)'}, - {'backgroundColor':'rgb(64, 224, 208)'}]); - }, "Autogenerated"); - at(2.625 * 1000, function() { - assert_styles( - '.anim', - [{'backgroundColor':'rgb(116, 36, 231)'}, - {'backgroundColor':'rgb(143, 158, 143)'}, - {'backgroundColor':'rgb(105, 105, 105)'}, - {'backgroundColor':'rgb(213, 94, 106)'}, - {'backgroundColor':'rgb(255, 163, 133)'}, - {'backgroundColor':'rgb(92, 142, 176)'}, - {'backgroundColor':'rgb(235, 213, 177)'}, - {'backgroundColor':'rgb(245, 158, 99)'}, - {'backgroundColor':'rgb(151, 177, 223)'}]); - }, "Autogenerated"); - at(2.75 * 1000, function() { - assert_styles( - '.anim', - [{'backgroundColor':'rgb(146, 43, 168)'}, - {'backgroundColor':'rgb(175, 173, 150)'}, - {'backgroundColor':'rgb(105, 105, 105)'}, - {'backgroundColor':'rgb(164, 63, 104)'}, - {'backgroundColor':'rgb(185, 166, 137)'}, - {'backgroundColor':'rgb(123, 104, 238)'}, - {'backgroundColor':'rgb(211, 238, 164)'}, - {'backgroundColor':'rgb(182, 156, 93)'}, - {'backgroundColor':'rgb(238, 130, 238)'}]); - }, "Autogenerated"); - at(2.875 * 1000, function() { - assert_styles( - '.anim', - [{'backgroundColor':'rgb(159, 42, 82)'}, - {'backgroundColor':'rgb(185, 180, 121)'}, - {'backgroundColor':'rgb(68, 125, 180)'}, - {'backgroundColor':'rgb(103, 20, 122)'}, - {'backgroundColor':'rgb(81, 174, 160)'}, - {'backgroundColor':'rgb(62, 177, 196)'}, - {'backgroundColor':'rgb(171, 247, 156)'}, - {'backgroundColor':'rgb(89, 144, 89)'}, - {'backgroundColor':'rgb(242, 176, 209)'}]); - }, "Autogenerated"); - at(3.0 * 1000, function() { - assert_styles( - '.anim', - [{'backgroundColor':'rgb(179, 78, 65)'}, - {'backgroundColor':'rgb(176, 137, 115)'}, - {'backgroundColor':'rgb(30, 144, 255)'}, - {'backgroundColor':'rgb(120, 64, 158)'}, - {'backgroundColor':'rgb(58, 185, 190)'}, - {'backgroundColor':'rgb(0, 250, 154)'}, - {'backgroundColor':'rgb(158, 248, 174)'}, - {'backgroundColor':'rgb(98, 166, 125)'}, - {'backgroundColor':'rgb(245, 222, 179)'}]); - }, "Autogenerated"); - at(3.125 * 1000, function() { - assert_styles( - '.anim', - [{'backgroundColor':'rgb(206, 144, 109)'}, - {'backgroundColor':'rgb(153, 51, 130)'}, - {'backgroundColor':'rgb(104, 89, 145)'}, - {'backgroundColor':'rgb(204, 183, 209)'}, - {'backgroundColor':'rgb(106, 198, 227)'}, - {'backgroundColor':'rgb(36, 230, 179)'}, - {'backgroundColor':'rgb(169, 242, 214)'}, - {'backgroundColor':'rgb(196, 215, 196)'}, - {'backgroundColor':'rgb(250, 239, 217)'}]); - }, "Autogenerated"); - at(3.25 * 1000, function() { - assert_styles( - '.anim', - [{'backgroundColor':'rgb(198, 179, 140)'}, - {'backgroundColor':'rgb(129, 20, 122)'}, - {'backgroundColor':'rgb(178, 34, 34)'}, - {'backgroundColor':'rgb(252, 250, 221)'}, - {'backgroundColor':'rgb(132, 193, 232)'}, - {'backgroundColor':'rgb(72, 209, 204)'}, - {'backgroundColor':'rgb(183, 214, 221)'}, - {'backgroundColor':'rgb(237, 214, 202)'}, - {'backgroundColor':'rgb(255, 255, 255)'}]); - }, "Autogenerated"); - at(3.375 * 1000, function() { - assert_styles( - '.anim', - [{'backgroundColor':'rgb(139, 167, 151)'}, - {'backgroundColor':'rgb(104, 70, 79)'}, - {'backgroundColor':'rgb(217, 142, 137)'}, - {'backgroundColor':'rgb(245, 239, 174)'}, - {'backgroundColor':'rgb(125, 160, 186)'}, - {'backgroundColor':'rgb(136, 115, 169)'}, - {'backgroundColor':'rgb(204, 155, 178)'}, - {'backgroundColor':'rgb(193, 138, 111)'}, - {'backgroundColor':'rgb(250, 250, 250)'}]); - }, "Autogenerated"); - at(3.5 * 1000, function() { - assert_styles( - '.anim', - [{'backgroundColor':'rgb(99, 170, 140)'}, - {'backgroundColor':'rgb(106, 111, 41)'}, - {'backgroundColor':'rgb(255, 250, 240)'}, - {'backgroundColor':'rgb(239, 230, 154)'}, - {'backgroundColor':'rgb(119, 136, 153)'}, - {'backgroundColor':'rgb(199, 21, 133)'}, - {'backgroundColor':'rgb(223, 128, 155)'}, - {'backgroundColor':'rgb(164, 96, 63)'}, - {'backgroundColor':'rgb(245, 245, 245)'}]); - }, "Autogenerated"); - at(3.625 * 1000, function() { - assert_styles( - '.anim', - [{'backgroundColor':'rgb(114, 216, 65)'}, - {'backgroundColor':'rgb(186, 127, 19)'}, - {'backgroundColor':'rgb(145, 195, 137)'}, - {'backgroundColor':'rgb(234, 230, 205)'}, - {'backgroundColor':'rgb(119, 136, 153)'}, - {'backgroundColor':'rgb(112, 23, 123)'}, - {'backgroundColor':'rgb(240, 187, 186)'}, - {'backgroundColor':'rgb(179, 147, 132)'}, - {'backgroundColor':'rgb(250, 250, 123)'}]); - }, "Autogenerated"); - at(3.75 * 1000, function() { - assert_styles( - '.anim', - [{'backgroundColor':'rgb(132, 246, 2)'}, - {'backgroundColor':'rgb(249, 134, 13)'}, - {'backgroundColor':'rgb(34, 139, 34)'}, - {'backgroundColor':'rgb(232, 231, 250)'}, - {'backgroundColor':'rgb(123, 140, 157)'}, - {'backgroundColor':'rgb(25, 25, 112)'}, - {'backgroundColor':'rgb(255, 238, 211)'}, - {'backgroundColor':'rgb(188, 193, 195)'}, - {'backgroundColor':'rgb(255, 255, 0)'}]); - }, "Autogenerated"); - at(3.875 * 1000, function() { - assert_styles( - '.anim', - [{'backgroundColor':'rgb(171, 175, 16)'}, - {'backgroundColor':'rgb(201, 92, 108)'}, - {'backgroundColor':'rgb(145, 70, 145)'}, - {'backgroundColor':'rgb(243, 235, 247)'}, - {'backgroundColor':'rgb(149, 168, 190)'}, - {'backgroundColor':'rgb(135, 140, 181)'}, - {'backgroundColor':'rgb(255, 228, 198)'}, - {'backgroundColor':'rgb(162, 199, 215)'}, - {'backgroundColor':'rgb(205, 230, 25)'}]); - }, "Autogenerated"); - at(4.0 * 1000, function() { - assert_styles( - '.anim', - [{'backgroundColor':'rgb(210, 105, 30)'}, - {'backgroundColor':'rgb(153, 50, 204)'}, - {'backgroundColor':'rgb(255, 0, 255)'}, - {'backgroundColor':'rgb(255, 240, 245)'}, - {'backgroundColor':'rgb(176, 196, 222)'}, - {'backgroundColor':'rgb(245, 255, 250)'}, - {'backgroundColor':'rgb(255, 218, 185)'}, - {'backgroundColor':'rgb(135, 206, 235)'}, - {'backgroundColor':'rgb(154, 205, 50)'}]); - }, "Autogenerated"); -}, "Autogenerated checks."); diff --git a/third_party/polymer/components/web-animations-js/test/testcases/auto-test-color-names.html b/third_party/polymer/components/web-animations-js/test/testcases/auto-test-color-names.html deleted file mode 100644 index 3efa76c..0000000 --- a/third_party/polymer/components/web-animations-js/test/testcases/auto-test-color-names.html +++ /dev/null @@ -1,204 +0,0 @@ -<!-- -Copyright 2012 Google Inc. All Rights Reserved. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. ---> - -<!DOCTYPE html><meta charset="UTF-8"> -<style> -td.anim { - height: 200px; - width: 200px; -} -</style> -<table> -<tr><td id="a" class="anim"></td><td id="b" class="anim"></td><td id="c" class="anim"></td></tr> -<tr><td id="d" class="anim"></td><td id="e" class="anim"></td><td id="f" class="anim"></td></tr> -<tr><td id="g" class="anim"></td><td id="h" class="anim"></td><td id="i" class="anim"></td></tr> -</table> - -<script> -var expected_failures = [ - { - browser_configurations: [{ msie: true }], - tests: ['Auto.*'], - message: 'IE returns rgba always.', - } -]; -</script> -<script src="../bootstrap.js"></script> -<script> -"use strict"; - -var colors = [ - 'aliceblue', - 'antiquewhite', - 'aqua', - 'aquamarine', - 'azure', - 'beige', - 'bisque', - 'black', - 'blanchedalmond', - 'blue', - 'blueviolet', - 'brown', - 'burlywood', - 'cadetblue', - 'chartreuse', - 'chocolate', - 'coral', - 'cornflowerblue', - 'cornsilk', - 'crimson', - 'cyan', - 'darkblue', - 'darkcyan', - 'darkgoldenrod', - 'darkgray', - 'darkgreen', - 'darkgrey', - 'darkkhaki', - 'darkmagenta', - 'darkolivegreen', - 'darkorange', - 'darkorchid', - 'darkred', - 'darksalmon', - 'darkseagreen', - 'darkslateblue', - 'darkslategray', - 'darkslategrey', - 'darkturquoise', - 'darkviolet', - 'deeppink', - 'deepskyblue', - 'dimgray', - 'dimgrey', - 'dodgerblue', - 'firebrick', - 'floralwhite', - 'forestgreen', - 'fuchsia', - 'gainsboro', - 'ghostwhite', - 'gold', - 'goldenrod', - 'gray', - 'green', - 'greenyellow', - 'grey', - 'honeydew', - 'hotpink', - 'indianred', - 'indigo', - 'ivory', - 'khaki', - 'lavender', - 'lavenderblush', - 'lawngreen', - 'lemonchiffon', - 'lightblue', - 'lightcoral', - 'lightcyan', - 'lightgoldenrodyellow', - 'lightgray', - 'lightgreen', - 'lightgrey', - 'lightpink', - 'lightsalmon', - 'lightseagreen', - 'lightskyblue', - 'lightslategray', - 'lightslategrey', - 'lightsteelblue', - 'lightyellow', - 'lime', - 'limegreen', - 'linen', - 'magenta', - 'maroon', - 'mediumaquamarine', - 'mediumblue', - 'mediumorchid', - 'mediumpurple', - 'mediumseagreen', - 'mediumslateblue', - 'mediumspringgreen', - 'mediumturquoise', - 'mediumvioletred', - 'midnightblue', - 'mintcream', - 'mistyrose', - 'moccasin', - 'navajowhite', - 'navy', - 'oldlace', - 'olive', - 'olivedrab', - 'orange', - 'orangered', - 'orchid', - 'palegoldenrod', - 'palegreen', - 'paleturquoise', - 'palevioletred', - 'papayawhip', - 'peachpuff', - 'peru', - 'pink', - 'plum', - 'powderblue', - 'purple', - 'red', - 'rosybrown', - 'royalblue', - 'saddlebrown', - 'salmon', - 'sandybrown', - 'seagreen', - 'seashell', - 'sienna', - 'silver', - 'skyblue', - 'slateblue', - 'slategray', - 'slategrey', - 'snow', - 'springgreen', - 'steelblue', - 'tan', - 'teal', - 'thistle', - 'tomato', - 'turquoise', - 'violet', - 'wheat', - 'white', - 'whitesmoke', - 'yellow', - 'yellowgreen']; - -var divs = document.querySelectorAll('td.anim'); -var sliceSize = colors.length / 9; -for (var i = 0; i < divs.length; i++) { - var colorsToAnimate = colors.slice(i * sliceSize, (i + 1) * sliceSize); - var effect = colorsToAnimate.map(function(value) { - return { backgroundColor: value }; - }); - document.timeline.play(new Animation(divs[i], effect, {duration: 4 * 1000, fill: 'forwards'})); -} - -//document.timeline.play(new Animation(document.body, -// {'backgroundColor': colors}, colors.length * 2 / 60)); -</script> diff --git a/third_party/polymer/components/web-animations-js/test/testcases/auto-test-color.html b/third_party/polymer/components/web-animations-js/test/testcases/auto-test-color.html deleted file mode 100644 index 30a03cf..0000000 --- a/third_party/polymer/components/web-animations-js/test/testcases/auto-test-color.html +++ /dev/null @@ -1,117 +0,0 @@ -<!-- -Copyright 2012 Google Inc. All Rights Reserved. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. ---> - -<!DOCTYPE html><meta charset="UTF-8"> -<style> -.anim { - top: 50px; - width: 100px; - height: 100px; - background-color: lightsteelblue; - position: absolute; -} - -#a { - left: 50px -} - -#b { - left: 150px; -} - -#c { - left: 250px; - background-color: green; -} - -#d { - left: 350px; - background-color: rgba(0, 0, 0, 0); -} - -#e { - left: 450px; - background-color: rgba(255, 0, 255, 0); -} - -#f { - left: 550px -} - -#g { - left: 650px -} - -#container { - position: absolute; - left: 0px; - top: 50px; - width: 800px; - height: 200px; - background-color: green; -} - -</style> - -All three boxes should end up the same color as the outline. - -<div id="container"> - <div id="a" class="anim"></div> - <div id="b" class="anim"></div> - <div id="c" class="anim"></div> - <div id="d" class="anim"></div> - <div id="e" class="anim"></div> - <div id="f" class="anim"></div> - <div id="g" class="anim"></div> -</div> - -<script> -var expected_failures = [ - { - browser_configurations: [{ msie: true }], - tests: ['Auto.*'], - message: 'IE returns rgba always.', - } -]; -</script> -<script src="../bootstrap.js"></script> -<script> -"use strict"; - -var dt = document.timeline; -var timing = {duration: 2 * 1000, fill: 'forwards'}; - -dt.play(new Animation(document.querySelector("#a"), - [{backgroundColor: "red"}, {backgroundColor: "green"}], timing)); -dt.play(new Animation(document.querySelector("#b"), - {backgroundColor: "rgb(0, 128, 0)"}, timing)); -dt.play(new Animation(document.querySelector("#c"), - new KeyframeEffect([ - {offset: 0.25, backgroundColor: "rgb(255, 0, 0)"}, - {offset: 0.75, backgroundColor: "rgb(0, 0, 255)"}, - ], 'add'), timing)); -dt.play(new Animation(document.querySelector("#d"), - {offset: 0.5, backgroundColor: "white"}, timing)); -dt.play(new Animation(document.querySelector("#e"), - {offset: 0.5, backgroundColor: "white"}, timing)); - -dt.play(new Animation(document.querySelector("#f"), - [{backgroundColor: "#000000"}, {backgroundColor: "#ffffff"}], timing)); - -dt.play(new Animation(document.querySelector("#g"), - [{backgroundColor: "#000"}, {backgroundColor: "#fff"}], timing)); - -</script> diff --git a/third_party/polymer/components/web-animations-js/test/testcases/auto-test-composite-transforms-checks.js b/third_party/polymer/components/web-animations-js/test/testcases/auto-test-composite-transforms-checks.js deleted file mode 100644 index eb9b301..0000000 --- a/third_party/polymer/components/web-animations-js/test/testcases/auto-test-composite-transforms-checks.js +++ /dev/null @@ -1,45 +0,0 @@ -timing_test(function() { - at(0 * 1000, function() { - assert_styles(".anim",{'transform':'matrix(1, 0, 0, 1, 0, 0)'}); - }); - at(0.4 * 1000, function() { - assert_styles(".anim", [ - {'transform':'matrix(1, 0, 0, 1, 40, 0)'}, - {'transform':'matrix(0.9511, 0.309, -0.309, 0.9511, 0, 0)'}, - {'transform':'matrix(0.9511, 0.309, -0.309, 0.9511, 40, 0)'}, - {'transform':'matrix(0.9511, 0.309, -0.309, 0.9511, 38.04, 12.36)'}, - ]); - }); - at(0.8 * 1000, function() { - assert_styles(".anim", [ - {'transform':'matrix(1, 0, 0, 1, 80, 0)'}, - {'transform':'matrix(0.809, 0.5878, -0.5878, 0.809, 0, 0)'}, - {'transform':'matrix(0.809, 0.5878, -0.5878, 0.809, 80, 0)'}, - {'transform':'matrix(0.809, 0.5878, -0.5878, 0.809, 64.72, 47.02)'}, - ]); - }); - at(1.2000000000000002 * 1000, function() { - assert_styles(".anim", [ - {'transform':'matrix(1, 0, 0, 1, 120, 0)'}, - {'transform':'matrix(0.5878, 0.809, -0.809, 0.5878, 0, 0)'}, - {'transform':'matrix(0.5878, 0.809, -0.809, 0.5878, 120, 0)'}, - {'transform':'matrix(0.5878, 0.809, -0.809, 0.5878, 70.53, 97.08)'}, - ]); - }); - at(1.6 * 1000, function() { - assert_styles(".anim", [ - {'transform':'matrix(1, 0, 0, 1, 160, 0)'}, - {'transform':'matrix(0.309, 0.9511, -0.9511, 0.309, 0, 0)'}, - {'transform':'matrix(0.309, 0.9511, -0.9511, 0.309, 160, 0)'}, - {'transform':'matrix(0.309, 0.9511, -0.9511, 0.309, 49.44, 152.2)'}, - ]); - }); - at(2 * 1000, function() { - assert_styles(".anim", [ - {'transform':'matrix(1, 0, 0, 1, 200, 0)'}, - {'transform':'matrix(0, 1, -1, 0, 0, 0)'}, - {'transform':'matrix(0, 1, -1, 0, 200, 0)'}, - {'transform':'matrix(0, 1, -1, 0, 0, 200)'}, - ]); - }); -}, "Auto generated tests"); diff --git a/third_party/polymer/components/web-animations-js/test/testcases/auto-test-composite-transforms.html b/third_party/polymer/components/web-animations-js/test/testcases/auto-test-composite-transforms.html deleted file mode 100644 index 4ecdfaf..0000000 --- a/third_party/polymer/components/web-animations-js/test/testcases/auto-test-composite-transforms.html +++ /dev/null @@ -1,97 +0,0 @@ -<!-- -Copyright 2012 Google Inc. All Rights Reserved. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. ---> - -<!DOCTYPE html><meta charset="UTF-8"> -<style> -.anim { - left: 0px; - width: 100px; - height: 100px; - background-color: #FAA; - position: absolute; -} - -.expected { - width: 100px; - height: 100px; - position: absolute; - border-right: 1px solid black; -} - -#a { - top: 50px -} - -#b { - top: 150px; -} - -#c { - top: 250px; -} - -#d { - top: 350px; -} - -</style> - -<div>Right edge of each box should align with black line at end of test.</div> -<div id="a" class="anim"></div> -<div id="a" style="top: 50px; left: 200px;" class="expected"></div> -<div id="b" class="anim"></div> -<div id="b" style="top: 150px; left: 0px;" class="expected"></div> -<div id="c" class="anim"></div> -<div id="c" style="top: 250px; left: 200px;" class="expected"></div> -<div id="d" class="anim"></div> -<div id="d" style="top: 550px; left: 0px;" class="expected"></div> - -<div style="height: 700px;"></div> - -<script> -var expected_failures = [ - { - browser_configurations: [{ msie: true }], - tests: ['Auto generated tests at t=2000ms'], - message: 'Floating point issues.', - } -]; -</script> -<script src="../bootstrap.js"></script> -<script> -"use strict"; - -var divs = document.querySelectorAll(".anim"); - -var dt = document.timeline; - -var timing = {duration: 2 * 1000, fill: 'forwards'}; - -dt.play(new Animation(divs[0], - [{transform: "translate(0px, 0px)"}, {transform: "translate(200px, 0px)"}], - timing)); -dt.play(new Animation(divs[1], - [{transform: "rotate(0deg)"}, {transform: "rotate(90deg)"}], timing)); -dt.play(new Animation(divs[2], [ - {transform: "translate(0px, 0px) rotate(0deg)"}, - {transform: "translate(200px, 0px) rotate(90deg)"}, -], timing)); -dt.play(new Animation(divs[3], [ - {transform: "rotate(0deg) translate(0px, 0px)"}, - {transform: "rotate(90deg) translate(200px, 0px)"}, -], timing)); - -</script> diff --git a/third_party/polymer/components/web-animations-js/test/testcases/auto-test-compositor-checks.js b/third_party/polymer/components/web-animations-js/test/testcases/auto-test-compositor-checks.js deleted file mode 100644 index a779d6d..0000000 --- a/third_party/polymer/components/web-animations-js/test/testcases/auto-test-compositor-checks.js +++ /dev/null @@ -1,26 +0,0 @@ -timing_test(function() { - at(0 * 1000, function() { - assert_styles(".anim",{'x':'0px'}); - assert_styles(".anim2",{'ctm':'{1, 0, 0, 1, 0, 0}'}); - }); - at(1 * 1000, function() { - assert_styles(".anim",{'x':'133.3px'}); - assert_styles(".anim2",{'ctm':'{1, 0, 0, 1, 66.67, 66.67}'}); - }); - at(2 * 1000, function() { - assert_styles(".anim",{'x':'316.7px'}); - assert_styles(".anim2",{'ctm':'{0.9239, 0.3827, -0.3827, 0.9239, 156.4, 142.9}'}); - }); - at(3 * 1000, function() { - assert_styles(".anim",{'x':'500px'}); - assert_styles(".anim2",{'ctm':'{0.7071, 0.7071, -0.7071, 0.7071, 235.4, 235.4}'}); - }); - at(4 * 1000, function() { - assert_styles(".anim",{'x':'550px'}); - assert_styles(".anim2",{'ctm':'{0.3827, 0.9239, -0.9239, 0.3827, 228.7, 269.3}'}); - }); - at(5 * 1000, function() { - assert_styles(".anim",{'x':'600px'}); - assert_styles(".anim2",{'ctm':'{0, 1, -1, 0, 200, 300}'}); - }); -}, "Auto generated tests"); diff --git a/third_party/polymer/components/web-animations-js/test/testcases/auto-test-compositor.html b/third_party/polymer/components/web-animations-js/test/testcases/auto-test-compositor.html deleted file mode 100644 index 2c0f544..0000000 --- a/third_party/polymer/components/web-animations-js/test/testcases/auto-test-compositor.html +++ /dev/null @@ -1,68 +0,0 @@ -<!-- -Copyright 2012 Google Inc. All Rights Reserved. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. ---> - -<!DOCTYPE html><meta charset="UTF-8"> -<style> -.anim, .anim2 { - fill: lightsteelblue; -} - -.expectation { - fill: red; -} -</style> -<svg> - <rect class="expectation" x="200px" y="10px" width="100px" height="100px"> - </rect> - <rect class="expectation" x="200px" y="20px" width="200px" height="200px"> - </rect> - <rect class="anim" x="100px" y="10px" width="100px" height="100px"></rect> - <rect class="anim2" x="100px" y="10px" width="100px" height="100px"></rect> -</svg> -<script> -var expected_failures = [ - { - browser_configurations: [ - { firefox: true }, - { msie: true }, - ], - tests: ['Auto generated tests at t=(1|2|3|4|5|6)000ms'], - message: 'Getting weird numbers in ctm.', - } -]; -</script> -<script src="../bootstrap.js"></script> -<script> -"use strict"; -var rect = document.querySelector(".anim") -var rect2 = document.querySelector(".anim2") - -var dt = document.timeline; - -dt.play(new Animation(rect, [{x: "0px"}, {x: "400px"}], {duration: 3 * 1000, fill: 'forwards'})); -dt.play(new Animation(rect, - new KeyframeEffect([{x: "0px"}, {x: "200px"}], 'add'), - {delay: 1 * 1000, duration: 4 * 1000, fill: 'forwards'})); - -dt.play(new Animation(rect2, [ - {transform: "translate(0px, 0px)"}, - {transform: "translate(200px, 200px)"}, -], {duration: 3 * 1000, fill: 'forwards'})); -dt.play(new Animation(rect2, new KeyframeEffect([ - {transform: "rotate(0deg) translate(0px, 0px)"}, - {transform: "rotate(90deg) translate(100px, 0px)"}, -], 'add'), {delay: 1 * 1000, duration: 4 * 1000, fill: 'forwards'})); -</script> diff --git a/third_party/polymer/components/web-animations-js/test/testcases/auto-test-delay-checks.js b/third_party/polymer/components/web-animations-js/test/testcases/auto-test-delay-checks.js deleted file mode 100644 index e0a5ade..0000000 --- a/third_party/polymer/components/web-animations-js/test/testcases/auto-test-delay-checks.js +++ /dev/null @@ -1,92 +0,0 @@ -timing_test(function() { - at(0 * 1000, function() { - assert_styles(".anim",{'left':'100px'}); - }); - at(0.1 * 1000, function() { - assert_styles(".anim",{'left':'100px'}); - }); - at(0.2 * 1000, function() { - assert_styles(".anim",{'left':'100px'}); - }); - at(0.30000000000000004 * 1000, function() { - assert_styles(".anim",{'left':'133.3px'}); - }); - at(0.4 * 1000, function() { - assert_styles(".anim",{'left':'166.7px'}); - }); - at(0.5 * 1000, function() { - assert_styles(".anim",{'left':'100px'}); - }); - at(0.6 * 1000, function() { - assert_styles(".anim",{'left':'133.3px'}); - }); - at(0.7 * 1000, function() { - assert_styles(".anim",{'left':'166.7px'}); - }); - at(800, function() { - assert_styles(".anim",{'left':'100px'}); - }); - at(0.8999999999999999 * 1000, function() { - assert_styles(".anim",{'left':'133.3px'}); - }); - at(0.9999999999999999 * 1000, function() { - assert_styles(".anim",{'left':'166.7px'}); - }); - at(1.0999999999999999 * 1000, function() { - assert_styles(".anim",{'left':'200px'}); - }); - at(1.2 * 1000, function() { - assert_styles(".anim",{'left':'200px'}); - }); - at(1.3 * 1000, function() { - assert_styles(".anim",{'left':'200px'}); - }); - at(1.4000000000000001 * 1000, function() { - assert_styles(".anim",{'left':'200px'}); - }); - at(1.5000000000000002 * 1000, function() { - assert_styles(".anim",{'left':'100px'}); - }); - at(1.6000000000000003 * 1000, function() { - assert_styles(".anim",{'left':'100px'}); - }); - at(1.7000000000000004 * 1000, function() { - assert_styles(".anim",{'left':'100px'}); - }); - at(1.8000000000000005 * 1000, function() { - assert_styles(".anim",{'left':'133.3px'}); - }); - at(1.9000000000000006 * 1000, function() { - assert_styles(".anim",{'left':'166.7px'}); - }); - at(2.0000000000000004 * 1000, function() { - assert_styles(".anim",{'left':'100px'}); - }); - at(2.1000000000000005 * 1000, function() { - assert_styles(".anim",{'left':'133.3px'}); - }); - at(2.2000000000000006 * 1000, function() { - assert_styles(".anim",{'left':'166.7px'}); - }); - at(2.3000000000000007 * 1000, function() { - assert_styles(".anim",{'left':'100px'}); - }); - at(2.400000000000001 * 1000, function() { - assert_styles(".anim",{'left':'133.3px'}); - }); - at(2.500000000000001 * 1000, function() { - assert_styles(".anim",{'left':'166.7px'}); - }); - at(2.600000000000001 * 1000, function() { - assert_styles(".anim",{'left':'200px'}); - }); - at(2.700000000000001 * 1000, function() { - assert_styles(".anim",{'left':'200px'}); - }); - at(2.800000000000001 * 1000, function() { - assert_styles(".anim",{'left':'200px'}); - }); - at(2.9000000000000012 * 1000, function() { - assert_styles(".anim",{'left':'200px'}); - }); -}, "Auto generated tests"); diff --git a/third_party/polymer/components/web-animations-js/test/testcases/auto-test-delay.html b/third_party/polymer/components/web-animations-js/test/testcases/auto-test-delay.html deleted file mode 100644 index d5556a9..0000000 --- a/third_party/polymer/components/web-animations-js/test/testcases/auto-test-delay.html +++ /dev/null @@ -1,39 +0,0 @@ -<!-- -Copyright 2012 Google Inc. All Rights Reserved. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. ---> - -<!DOCTYPE html><meta charset="UTF-8"> -<style> -.anim { - left: 0px; - width: 100px; - height: 100px; - background-color: #FAA; - position: relative; -} -</style> -<div class='anim' id='a'></div> -<script src="../bootstrap.js"></script> -<script> -"use strict"; - -var anim = new Animation(a, [{ left: '100px'}, {left: '200px'}], - {delay: 0.2 * 1000, duration: 0.3 * 1000, endDelay: 0.4 * 1000, iterations: 3, fill: 'both'}); - -var par = new AnimationGroup([anim], {fill: 'none', iterations: 2}) - -document.timeline.play(par); - -</script> diff --git a/third_party/polymer/components/web-animations-js/test/testcases/auto-test-element-animate-checks.js b/third_party/polymer/components/web-animations-js/test/testcases/auto-test-element-animate-checks.js deleted file mode 100644 index a020ab4..0000000 --- a/third_party/polymer/components/web-animations-js/test/testcases/auto-test-element-animate-checks.js +++ /dev/null @@ -1,8 +0,0 @@ -timing_test(function() { - at(0 * 1000, function() { - assert_styles('body', {'display':'none'}); - }, "Autogenerated"); - at(0.5 * 1000, function() { - assert_styles('body', {'display':'block'}); - }, "Autogenerated"); -}, "Autogenerated checks."); diff --git a/third_party/polymer/components/web-animations-js/test/testcases/auto-test-element-animate.html b/third_party/polymer/components/web-animations-js/test/testcases/auto-test-element-animate.html deleted file mode 100644 index 2f498b4..0000000 --- a/third_party/polymer/components/web-animations-js/test/testcases/auto-test-element-animate.html +++ /dev/null @@ -1,30 +0,0 @@ -<!-- -Copyright 2013 Google Inc. All Rights Reserved. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. ---> - -<!DOCTYPE html><meta charset="UTF-8"> -<style> -body { - display: none; - background-color: green; -} -</style> -<body> -PASS -<script src="../bootstrap.js"></script> -<script> -"use strict"; -document.body.animate({display: 'block'}, 1000); -</script> diff --git a/third_party/polymer/components/web-animations-js/test/testcases/auto-test-fill-values-checks.js b/third_party/polymer/components/web-animations-js/test/testcases/auto-test-fill-values-checks.js deleted file mode 100644 index 3491e5c..0000000 --- a/third_party/polymer/components/web-animations-js/test/testcases/auto-test-fill-values-checks.js +++ /dev/null @@ -1,266 +0,0 @@ -timing_test(function() { - at(0 * 1000, function() { - assert_styles( - '.anim', - [{'left':'100px'}, - {'left':'0px'}, - {'left':'100px'}, - {'left':'0px'}, - {'left':'100px'}, - {'left':'200px'}, - {'left':'100px'}, - {'left':'200px'}, - {'left':'100px'}, - {'left':'0px'}, - {'left':'200px'}, - {'left':'0px'}, - {'left':'200px'}, - {'left':'0px'}, - {'left':'200px'}, - {'left':'100px'}, - {'left':'200px'}, - {'left':'100px'}, - {'left':'200px'}, - {'left':'0px'}, - {'left':'100px'}, - {'left':'0px'}, - {'left':'100px'}, - {'left':'0px'}, - {'left':'100px'}, - {'left':'100px'}, - {'left':'100px'}, - {'left':'100px'}, - {'left':'100px'}, - {'left':'0px'}, - {'left':'200px'}, - {'left':'0px'}, - {'left':'200px'}, - {'left':'0px'}, - {'left':'200px'}, - {'left':'200px'}, - {'left':'200px'}, - {'left':'200px'}, - {'left':'200px'}, - {'left':'0px'}]); - }, "Autogenerated"); - at(1 * 1000, function() { - assert_styles( - '.anim', - [{'left':'100px'}, - {'left':'0px'}, - {'left':'100px'}, - {'left':'0px'}, - {'left':'100px'}, - {'left':'200px'}, - {'left':'100px'}, - {'left':'200px'}, - {'left':'100px'}, - {'left':'0px'}, - {'left':'200px'}, - {'left':'0px'}, - {'left':'200px'}, - {'left':'0px'}, - {'left':'200px'}, - {'left':'100px'}, - {'left':'200px'}, - {'left':'100px'}, - {'left':'200px'}, - {'left':'0px'}, - {'left':'200px'}, - {'left':'0px'}, - {'left':'200px'}, - {'left':'0px'}, - {'left':'200px'}, - {'left':'100px'}, - {'left':'200px'}, - {'left':'100px'}, - {'left':'200px'}, - {'left':'0px'}, - {'left':'100px'}, - {'left':'0px'}, - {'left':'100px'}, - {'left':'0px'}, - {'left':'100px'}, - {'left':'200px'}, - {'left':'100px'}, - {'left':'200px'}, - {'left':'100px'}, - {'left':'0px'}]); - }, "Autogenerated"); - at(2 * 1000, function() { - assert_styles( - '.anim', - [{'left':'100px'}, - {'left':'0px'}, - {'left':'100px'}, - {'left':'0px'}, - {'left':'100px'}, - {'left':'200px'}, - {'left':'100px'}, - {'left':'200px'}, - {'left':'100px'}, - {'left':'0px'}, - {'left':'200px'}, - {'left':'0px'}, - {'left':'200px'}, - {'left':'0px'}, - {'left':'200px'}, - {'left':'100px'}, - {'left':'200px'}, - {'left':'100px'}, - {'left':'200px'}, - {'left':'0px'}, - {'left':'100px'}, - {'left':'0px'}, - {'left':'100px'}, - {'left':'0px'}, - {'left':'100px'}, - {'left':'100px'}, - {'left':'100px'}, - {'left':'100px'}, - {'left':'100px'}, - {'left':'0px'}, - {'left':'200px'}, - {'left':'0px'}, - {'left':'200px'}, - {'left':'0px'}, - {'left':'200px'}, - {'left':'200px'}, - {'left':'200px'}, - {'left':'200px'}, - {'left':'200px'}, - {'left':'0px'}]); - }, "Autogenerated"); - at(3 * 1000, function() { - assert_styles( - '.anim', - [{'left':'100px'}, - {'left':'0px'}, - {'left':'100px'}, - {'left':'0px'}, - {'left':'100px'}, - {'left':'200px'}, - {'left':'100px'}, - {'left':'200px'}, - {'left':'100px'}, - {'left':'0px'}, - {'left':'200px'}, - {'left':'0px'}, - {'left':'200px'}, - {'left':'0px'}, - {'left':'200px'}, - {'left':'100px'}, - {'left':'200px'}, - {'left':'100px'}, - {'left':'200px'}, - {'left':'0px'}, - {'left':'200px'}, - {'left':'0px'}, - {'left':'200px'}, - {'left':'0px'}, - {'left':'200px'}, - {'left':'100px'}, - {'left':'200px'}, - {'left':'100px'}, - {'left':'200px'}, - {'left':'0px'}, - {'left':'100px'}, - {'left':'0px'}, - {'left':'100px'}, - {'left':'0px'}, - {'left':'100px'}, - {'left':'200px'}, - {'left':'100px'}, - {'left':'200px'}, - {'left':'100px'}, - {'left':'0px'}]); - }, "Autogenerated"); - at(4 * 1000, function() { - assert_styles( - '.anim', - [{'left':'0px'}, - {'left':'0px'}, - {'left':'0px'}, - {'left':'0px'}, - {'left':'200px'}, - {'left':'200px'}, - {'left':'200px'}, - {'left':'200px'}, - {'left':'0px'}, - {'left':'0px'}, - {'left':'0px'}, - {'left':'0px'}, - {'left':'0px'}, - {'left':'0px'}, - {'left':'100px'}, - {'left':'100px'}, - {'left':'100px'}, - {'left':'100px'}, - {'left':'0px'}, - {'left':'0px'}, - {'left':'0px'}, - {'left':'0px'}, - {'left':'0px'}, - {'left':'0px'}, - {'left':'100px'}, - {'left':'100px'}, - {'left':'100px'}, - {'left':'100px'}, - {'left':'0px'}, - {'left':'0px'}, - {'left':'0px'}, - {'left':'0px'}, - {'left':'0px'}, - {'left':'0px'}, - {'left':'200px'}, - {'left':'200px'}, - {'left':'200px'}, - {'left':'200px'}, - {'left':'0px'}, - {'left':'0px'}]); - }, "Autogenerated"); - at(5 * 1000, function() { - assert_styles( - '.anim', - [{'left':'0px'}, - {'left':'0px'}, - {'left':'0px'}, - {'left':'0px'}, - {'left':'200px'}, - {'left':'200px'}, - {'left':'200px'}, - {'left':'200px'}, - {'left':'0px'}, - {'left':'0px'}, - {'left':'0px'}, - {'left':'0px'}, - {'left':'0px'}, - {'left':'0px'}, - {'left':'100px'}, - {'left':'100px'}, - {'left':'100px'}, - {'left':'100px'}, - {'left':'0px'}, - {'left':'0px'}, - {'left':'0px'}, - {'left':'0px'}, - {'left':'0px'}, - {'left':'0px'}, - {'left':'100px'}, - {'left':'100px'}, - {'left':'100px'}, - {'left':'100px'}, - {'left':'0px'}, - {'left':'0px'}, - {'left':'0px'}, - {'left':'0px'}, - {'left':'0px'}, - {'left':'0px'}, - {'left':'200px'}, - {'left':'200px'}, - {'left':'200px'}, - {'left':'200px'}, - {'left':'0px'}, - {'left':'0px'}]); - }, "Autogenerated"); -}, "Autogenerated checks."); diff --git a/third_party/polymer/components/web-animations-js/test/testcases/auto-test-fill-values.html b/third_party/polymer/components/web-animations-js/test/testcases/auto-test-fill-values.html deleted file mode 100644 index e74d73d..0000000 --- a/third_party/polymer/components/web-animations-js/test/testcases/auto-test-fill-values.html +++ /dev/null @@ -1,114 +0,0 @@ -<!-- -Copyright 2012 Google Inc. All Rights Reserved. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. ---> - -<!DOCTYPE html><meta charset="UTF-8"> -<style> -.animContainer { - position: absolute; - left: 0px; - height: 10px; -} - -.anim { - left: 0px; - width: 400px; - height: 25px; - background-color: #FAA; - position: relative; - font-size: 13px; - border-top: 1px solid black; -} - -.expect { border-right: 1px solid black; } -.expect.no-effect { width: 400px; } -.expect.first-frame { width: 500px; } -.expect.last-frame { width: 600px; } - -.dir-normal { top: 50px; } -.dir-reverse { top: 350px; } -.dir-alternate { top: 650px; } -.dir-alternate-reverse { top: 950px; } - -.spacing { height: 1200px; } -</style> - -<div>Right edge of each box should align with black line at end of test.</div> - -<div class="animContainer dir-normal"> - <div class="expect no-effect"><div class="anim fill-none"></div></div> - <div class="expect no-effect"><div class="anim fill-backwards"></div></div> - <div class="expect last-frame"><div class="anim fill-forwards"></div></div> - <div class="expect last-frame"><div class="anim fill-both"></div></div> - <div class="expect no-effect"><div class="anim fill-auto"></div></div> -</div> - -<div class="animContainer dir-reverse"> - <div class="expect no-effect"><div class="anim fill-none"></div></div> - <div class="expect no-effect"><div class="anim fill-backwards"></div></div> - <div class="expect first-frame"><div class="anim fill-forwards"></div></div> - <div class="expect first-frame"><div class="anim fill-both"></div></div> - <div class="expect no-effect"><div class="anim fill-auto"></div></div> -</div> - -<div class="animContainer dir-alternate"> - <div class="expect no-effect"><div class="anim fill-none"></div></div> - <div class="expect no-effect"><div class="anim fill-backwards"></div></div> - <div class="expect first-frame"><div class="anim fill-forwards"></div></div> - <div class="expect first-frame"><div class="anim fill-both"></div></div> - <div class="expect no-effect"><div class="anim fill-auto"></div></div> -</div> - -<div class="animContainer dir-alternate-reverse"> - <div class="expect no-effect"><div class="anim fill-none"></div></div> - <div class="expect no-effect"><div class="anim fill-backwards"></div></div> - <div class="expect last-frame"><div class="anim fill-forwards"></div></div> - <div class="expect last-frame"><div class="anim fill-both"></div></div> - <div class="expect no-effect"><div class="anim fill-auto"></div></div> -</div> - -<div class="spacing"></div> - -<script src="../bootstrap.js"></script> -<script> -'use strict'; - -var directions = ['normal', 'reverse', 'alternate', 'alternate-reverse']; -var fills = ['none', 'backwards', 'forwards', 'both', 'auto']; -var effect = [{left: '100px'}, {left: '200px'}]; -var nextId = 0; - -function testCase(element, direction, fill, duration) { - document.timeline.play( - new Animation(element, effect, { - iterations: 4, - direction: direction, - fill: fill, - duration: duration, - })); - element.id = 'anim' + (nextId++); - element.textContent = 'ID: ' + element.id + ' | dir: ' + direction + ' | fill: ' + fill + ' | dur: ' + duration; -} - -directions.forEach(function (direction) { - fills.forEach(function (fill) { - var dur0 = document.querySelector('.dir-' + direction + ' .fill-' + fill); - var dur1 = dur0.cloneNode(true); - dur0.parentElement.insertBefore(dur1, dur0); - testCase(dur1, direction, fill, 1000); - testCase(dur0, direction, fill, 0); - }); -}); -</script> diff --git a/third_party/polymer/components/web-animations-js/test/testcases/auto-test-font-weight-checks.js b/third_party/polymer/components/web-animations-js/test/testcases/auto-test-font-weight-checks.js deleted file mode 100644 index fa6e94a..0000000 --- a/third_party/polymer/components/web-animations-js/test/testcases/auto-test-font-weight-checks.js +++ /dev/null @@ -1,26 +0,0 @@ -timing_test(function() { - at(0 * 1000, function() { - assert_styles( '#test', {'font-weight':'100'}); - }, "Autogenerated"); - at(0.3 * 1000, function() { - assert_styles( '#test', {'font-weight':'100'}); - }, "Autogenerated"); - at(0.6 * 1000, function() { - assert_styles( '#test', {'font-weight':'100'}); - }, "Autogenerated"); - at(0.8999999999999999 * 1000, function() { - assert_styles( '#test', {'font-weight':'100'}); - }, "Autogenerated"); - at(1.2 * 1000, function() { - assert_styles( '#test', {'font-weight':'300'}); - }, "Autogenerated"); - at(1.5 * 1000, function() { - assert_styles( '#test', {'font-weight':'500'}); - }, "Autogenerated"); - at(1.8 * 1000, function() { - assert_styles( '#test', {'font-weight':'bold'}); - }, "Autogenerated"); - at(2.1 * 1000, function() { - assert_styles( '#test', {'font-weight':'900'}); - }, "Autogenerated"); -}, "Autogenerated checks."); diff --git a/third_party/polymer/components/web-animations-js/test/testcases/auto-test-font-weight.html b/third_party/polymer/components/web-animations-js/test/testcases/auto-test-font-weight.html deleted file mode 100644 index cacaf82..0000000 --- a/third_party/polymer/components/web-animations-js/test/testcases/auto-test-font-weight.html +++ /dev/null @@ -1,43 +0,0 @@ -<!-- -Copyright 2012 Google Inc. All Rights Reserved. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. ---> - -<!DOCTYPE html><meta charset="UTF-8"> -<head> -<link - href='http://fonts.googleapis.com/css?family=Raleway:400,100,200,300,500,600,700,800,900' - rel='stylesheet' type='text/css'> -<style> - div.test { - font-family: Raleway; - font-size: 75px; - } - div.target { - position: absolute; - color: red; - z-index: -1; - } -</style> -</head> -<body> -<div class='test target' style='font-weight: 900;'>Testing font-weight!</div> -<div class='test' style='font-weight: 100' id='test'>Testing font-weight!</div> -<script src="../bootstrap.js"></script> -<script> -"use strict"; -document.timeline.play(new Animation(document.querySelector('#test'), - [{fontWeight: '100'}, {fontWeight: '900'}], - {duration: 1 * 1000, delay: 1 * 1000, fill: 'forwards'})); -</script> diff --git a/third_party/polymer/components/web-animations-js/test/testcases/auto-test-initial-checks.js b/third_party/polymer/components/web-animations-js/test/testcases/auto-test-initial-checks.js deleted file mode 100644 index 63e6f8d..0000000 --- a/third_party/polymer/components/web-animations-js/test/testcases/auto-test-initial-checks.js +++ /dev/null @@ -1,74 +0,0 @@ -timing_test(function() { - at(0 * 1000, function() { - assert_styles("#background",{'backgroundColor':'rgba(0, 0, 0, 0)'}); - }, "#background"); - at(0 * 1000, function() { - assert_styles("#border",{'borderBottomColor':'rgb(0, 0, 0)','borderBottomLeftRadius':'0px','borderBottomRightRadius':'0px','borderBottomWidth':'3px','borderLeftColor':'rgb(0, 0, 0)','borderLeftWidth':'3px','borderRightColor':'rgb(0, 0, 0)','borderRightWidth':'3px','borderTopColor':'rgb(0, 0, 0)','borderTopLeftRadius':'0px','borderTopRightRadius':'0px','borderTopWidth':'3px'}); - }, "#border"); - at(0 * 1000, function() { - assert_styles("#table",{'borderSpacing':'2px 2px','verticalAlign':'0px'}); - }, "#table"); - at(0 * 1000, function() { - assert_styles("#opacity",{'opacity':'1'}); - }, "#opacity"); - at(0 * 1000, function() { - assert_styles("#outline",{'outlineWidth':'3px','outlineOffset':'0px'}); - }, "#outline"); - at(0 * 1000, function() { - assert_styles("#padding",{'paddingBottom':'0px','paddingLeft':'0px','paddingRight':'0px','paddingTop':'0px'}); - }, "#padding"); - at(0 * 1000, function() { - assert_styles("#transform",{'transform':'none'}); - }, "#transform"); - at(0 * 1000, function() { - assert_styles("#text",{'color':'rgb(0, 0, 0)','fontSize':'13px','fontWeight':'normal','letterSpacing':'normal','lineHeight':'15.600px','textIndent':'0px','textShadow':'rgba(0, 0, 0, 0) 0px 0px 0px','wordSpacing':'0px'}); - }, "#text"); - at(1 * 1000, function() { - assert_styles("#background",{'backgroundColor':'rgba(0, 128, 0, 0.498039)'}); - }, "#background"); - at(1 * 1000, function() { - assert_styles("#border",{'borderBottomColor':'rgb(0, 255, 0)','borderBottomLeftRadius':'25px','borderBottomRightRadius':'25px','borderBottomWidth':'6px','borderLeftColor':'rgb(0, 255, 0)','borderLeftWidth':'6px','borderRightColor':'rgb(0, 255, 0)','borderRightWidth':'6px','borderTopColor':'rgb(0, 255, 0)','borderTopLeftRadius':'25px','borderTopRightRadius':'25px','borderTopWidth':'6px'}); - }, "#border"); - at(1 * 1000, function() { - assert_styles("#table",{'borderSpacing':'6px 6px','verticalAlign':'5px'}); - }, "#table"); - at(1 * 1000, function() { - assert_styles("#opacity",{'opacity':'0.625'}); - }, "#opacity"); - at(1 * 1000, function() { - assert_styles("#outline",{'outlineColor':'rgb(0, 128, 0)','outlineWidth':'6px','outlineOffset':'5px'}); - }, "#outline"); - at(1 * 1000, function() { - assert_styles("#padding",{'paddingBottom':'25px','paddingLeft':'25px','paddingRight':'25px','paddingTop':'25px'}); - }, "#padding"); - at(1 * 1000, function() { - assert_styles("#transform",{'transform':'matrix(-1, 0.00000000000000012246063538223773, -0.00000000000000012246063538223773, -1, 0, 0)'}); - }, "#transform"); - at(1 * 1000, function() { - assert_styles("#text",{'color':'rgb(0, 64, 0)','fontSize':'23px','fontWeight':'bold','letterSpacing':'5px','lineHeight':'36.7999px','textIndent':'25px','textShadow':'rgba(0, 255, 0, 0.498039) 5px 5px 25px','wordSpacing':'100px'}); - }, "#text"); - at(2 * 1000, function() { - assert_styles("#background",{'backgroundColor':'rgb(0, 128, 0)'}); - }, "#background"); - at(2 * 1000, function() { - assert_styles("#border",{'borderBottomColor':'rgb(0, 255, 0)','borderBottomLeftRadius':'50px','borderBottomRightRadius':'50px','borderBottomWidth':'10px','borderLeftColor':'rgb(0, 255, 0)','borderLeftWidth':'10px','borderRightColor':'rgb(0, 255, 0)','borderRightWidth':'10px','borderTopColor':'rgb(0, 255, 0)','borderTopLeftRadius':'50px','borderTopRightRadius':'50px','borderTopWidth':'10px'}); - }, "#border"); - at(2 * 1000, function() { - assert_styles("#table",{'borderSpacing':'10px 10px','verticalAlign':'10px'}); - }, "#table"); - at(2 * 1000, function() { - assert_styles("#opacity",{'opacity':'0.25'}); - }, "#opacity"); - at(2 * 1000, function() { - assert_styles("#outline",{'outlineColor':'rgb(0, 128, 0)','outlineWidth':'10px','outlineOffset':'10px'}); - }, "#outline"); - at(2 * 1000, function() { - assert_styles("#padding",{'paddingBottom':'50px','paddingLeft':'50px','paddingRight':'50px','paddingTop':'50px'}); - }, "#padding"); - at(2 * 1000, function() { - assert_styles("#transform",{'transform':'matrix(1, -0.00000000000000024492127076447545, 0.00000000000000024492127076447545, 1, 0, 0)'}); - }, "#transform"); - at(2 * 1000, function() { - assert_styles("#text",{'color':'rgb(0, 128, 0)','fontSize':'30px','fontWeight':'900','letterSpacing':'5px','lineHeight':'60px','textIndent':'50px','textShadow':'rgb(0, 255, 0) 10px 10px 50px','wordSpacing':'100px'}); - }, "#text"); -}, "Auto generated tests"); diff --git a/third_party/polymer/components/web-animations-js/test/testcases/auto-test-initial.html b/third_party/polymer/components/web-animations-js/test/testcases/auto-test-initial.html deleted file mode 100644 index 801ab01..0000000 --- a/third_party/polymer/components/web-animations-js/test/testcases/auto-test-initial.html +++ /dev/null @@ -1,242 +0,0 @@ -<!-- -Copyright 2012 Google Inc. All Rights Reserved. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. ---> - -<!DOCTYPE html><meta charset="UTF-8"> - -<style> -.anim { - display: inline-block; -} -#allToInitial, #border, #borderSpacing, #padding, #table, td { - border-style: solid; -} -#outline { - outline-style: solid; - left: 20px; - width: 100px; -} -</style> - -<table id="allToInitial" class="anim"><tr><td>All initial.</td><td>All initial.</td></tr></table> -<pre id="background" class="anim">background-color</pre> -<pre id="border" class="anim">border-width -border-radius -border-color</pre> -<table id="table" class="anim"> - <tr> - <td>border-spacing<br>vertical-align</td> - <td>border-spacing<br>vertical-align</td> - </tr> -</table> -<pre id="opacity" class="anim">opacity</pre> -<br> -<pre id="outline" class="anim">outline</pre> -<pre id="padding" class="anim">padding</pre> -<pre id="transform" class="anim">transform</pre> -<br> -<pre id="text" class="anim">color -font-size -font-weight -letter-spacing -line-height -text-indent -text-shadow -word-spacing -word word word word</pre> - -<script> -var expected_failures = [ - { - browser_configurations: [{ firefox: true }], - tests: ['#background at t=0ms'], - message: 'rgb(0, 0, 0) gets converted to transparent in Firefox.', - }, { - browser_configurations: [{ firefox: true }], - tests: ['#background at t=1000ms'], - message: 'FIXME: Transparency is wrong.', - }, { - browser_configurations: [{ firefox: true }], - tests: ['#border at t=2000ms'], - message: 'FIXME: Border is wrong.', - }, { - browser_configurations: [{ msie: true }], - tests: ['#transform at t=0ms'], - message: 'none in IE.', - }, { - browser_configurations: [{ msie: true }], - tests: ['#transform at t=1000ms'], - message: 'Very small value floating point issue.', - }, { - browser_configurations: [{ msie: true }], - tests: [ - '#(background|border) at t=(1|2)000ms', - '#text at t=0000ms', - '#(text|outline) at t=(1|2)000ms', - ], - message: 'IE returns rbga values.', - }, { - browser_configurations: [ - { chrome: true, version: '30|31' }, - { firefox: true }, - ], - tests: ['#text at t=(0|1000)ms'], - message: 'Different initial font-size.', - } -]; -</script> -<script src="../bootstrap.js"></script> -<script> -"use strict"; - -var timing = {duration: 2 * 1000, fill: 'forwards'}; - -document.timeline.play(new Animation(document.querySelector('#allToInitial'), [{ - backgroundColor: 'initial', - backgroundPosition: 'initial', - borderBottomColor: 'initial', - borderBottomLeftRadius: 'initial', - borderBottomRightRadius: 'initial', - borderBottomWidth: 'initial', - borderLeftColor: 'initial', - borderLeftWidth: 'initial', - borderRightColor: 'initial', - borderRightWidth: 'initial', - borderSpacing: 'initial', - borderTopColor: 'initial', - borderTopLeftRadius: 'initial', - borderTopRightRadius: 'initial', - borderTopWidth: 'initial', - bottom: 'initial', - color: 'initial', - fontSize: 'initial', - fontWeight: 'initial', - height: 'initial', - left: 'initial', - letterSpacing: 'initial', - lineHeight: 'initial', - marginBottom: 'initial', - marginLeft: 'initial', - marginRight: 'initial', - marginTop: 'initial', - maxHeight: 'initial', - maxWidth: 'initial', - minHeight: 'initial', - minWidth: 'initial', - opacity: 'initial', - outlineColor: 'initial', - outlineOffset: 'initial', - outlineWidth: 'initial', - paddingBottom: 'initial', - paddingLeft: 'initial', - paddingRight: 'initial', - paddingTop: 'initial', - right: 'initial', - textIndent: 'initial', - textShadow: 'initial', - top: 'initial', - transform: 'initial', - verticalAlign: 'initial', - visibility: 'initial', - width: 'initial', - wordSpacing: 'initial', - zIndex: 'initial', -}], timing)); - -document.timeline.play(new Animation(document.querySelector('#background'), [{ backgroundColor: 'initial' }, { backgroundColor: 'green' }], timing)); - -document.timeline.play(new Animation(document.querySelector('#border'), [{ - borderBottomColor: 'initial', - borderBottomLeftRadius: 'initial', - borderBottomRightRadius: 'initial', - borderBottomWidth: 'initial', - borderLeftColor: 'initial', - borderLeftWidth: 'initial', - borderRightColor: 'initial', - borderRightWidth: 'initial', - borderTopColor: 'initial', - borderTopLeftRadius: 'initial', - borderTopRightRadius: 'initial', - borderTopWidth: 'initial', -}, { - borderBottomColor: 'lime', - borderBottomLeftRadius: '50px', - borderBottomRightRadius: '50px', - borderBottomWidth: '10px', - borderLeftColor: 'lime', - borderLeftWidth: '10px', - borderRightColor: 'lime', - borderRightWidth: '10px', - borderTopColor: 'lime', - borderTopLeftRadius: '50px', - borderTopRightRadius: '50px', - borderTopWidth: '10px', -}], timing)); - -document.timeline.play(new Animation(document.querySelector('#table'), [{ - borderSpacing: 'initial', - verticalAlign: 'initial', -}, { - borderSpacing: '10px', - verticalAlign: '10px', -}], timing)); - -document.timeline.play(new Animation(document.querySelector('#opacity'), [{ opacity: 'initial' }, { opacity: '0.25' }], timing)); - -document.timeline.play(new Animation(document.querySelector('#outline'), [{ - outlineColor: 'initial', - outlineWidth: 'initial', - outlineOffset: 'initial', -}, { - outlineColor: 'green', - outlineWidth: '10px', - outlineOffset: '10px', -}], timing)); - -document.timeline.play(new Animation(document.querySelector('#padding'), [{ - paddingBottom: 'initial', - paddingLeft: 'initial', - paddingRight: 'initial', - paddingTop: 'initial', -}, { -paddingBottom: '50px', - paddingLeft: '50px', - paddingRight: '50px', - paddingTop: '50px', -}], timing)); - -document.timeline.play(new Animation(document.querySelector('#transform'), [{ transform: 'initial' }, { transform: 'rotate(360deg)' }], timing)); - -document.timeline.play(new Animation(document.querySelector('#text'), [{ - color: 'initial', - fontSize: 'initial', - fontWeight: 'initial', - letterSpacing: 'initial', - lineHeight: 'initial', - textIndent: 'initial', - textShadow: 'initial', - wordSpacing: 'initial', -}, { - color: 'green', - fontSize: '30px', - fontWeight: '900', - letterSpacing: '5px', - lineHeight: '200%', - textIndent: '50px', - textShadow: '10px 10px 50px lime', - wordSpacing: '100px', -}], timing)); - -</script> diff --git a/third_party/polymer/components/web-animations-js/test/testcases/auto-test-inline-style-checks.js b/third_party/polymer/components/web-animations-js/test/testcases/auto-test-inline-style-checks.js deleted file mode 100644 index 52961d8..0000000 --- a/third_party/polymer/components/web-animations-js/test/testcases/auto-test-inline-style-checks.js +++ /dev/null @@ -1,17 +0,0 @@ -timing_test(function() { - at(0 * 1000, function() { - assert_styles("#target",{'left':'0px','backgroundColor':'rgb(176, 196, 222)'}); - }); - at(0.5 * 1000, function() { - assert_styles("#target",{'left':'50px','backgroundColor':'rgb(176, 196, 222)'}); - }); - at(1.5 * 1000, function() { - assert_styles("#target",{'left':'100px','backgroundColor':'rgb(176, 196, 222)'}); - }); - at(2 * 1000, function() { - assert_styles("#target",{'left':'50px','backgroundColor':'rgb(176, 196, 222)'}); - }); - at(3 * 1000, function() { - assert_styles("#target",{'left':'100px','backgroundColor':'rgb(0, 128, 0)'}); - }); -}, "Auto generated tests"); diff --git a/third_party/polymer/components/web-animations-js/test/testcases/auto-test-inline-style-fallback-checks.js b/third_party/polymer/components/web-animations-js/test/testcases/auto-test-inline-style-fallback-checks.js deleted file mode 100644 index 52961d8..0000000 --- a/third_party/polymer/components/web-animations-js/test/testcases/auto-test-inline-style-fallback-checks.js +++ /dev/null @@ -1,17 +0,0 @@ -timing_test(function() { - at(0 * 1000, function() { - assert_styles("#target",{'left':'0px','backgroundColor':'rgb(176, 196, 222)'}); - }); - at(0.5 * 1000, function() { - assert_styles("#target",{'left':'50px','backgroundColor':'rgb(176, 196, 222)'}); - }); - at(1.5 * 1000, function() { - assert_styles("#target",{'left':'100px','backgroundColor':'rgb(176, 196, 222)'}); - }); - at(2 * 1000, function() { - assert_styles("#target",{'left':'50px','backgroundColor':'rgb(176, 196, 222)'}); - }); - at(3 * 1000, function() { - assert_styles("#target",{'left':'100px','backgroundColor':'rgb(0, 128, 0)'}); - }); -}, "Auto generated tests"); diff --git a/third_party/polymer/components/web-animations-js/test/testcases/auto-test-inline-style-fallback.html b/third_party/polymer/components/web-animations-js/test/testcases/auto-test-inline-style-fallback.html deleted file mode 100644 index 6d2ef19..0000000 --- a/third_party/polymer/components/web-animations-js/test/testcases/auto-test-inline-style-fallback.html +++ /dev/null @@ -1,78 +0,0 @@ -<!-- -Copyright 2013 Google Inc. All Rights Reserved. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. ---> - -<!doctype html> -<style> -#target { - background-color: lightsteelblue; - width: 50px; - height: 50px; - position: absolute; - left: 0px; -} - -#spacer { - height: 100px; -} -</style> - - -<div id="target"></div> -<div id="spacer"></div> - -<script src="../bootstrap.js"></script> -<script> -'use strict'; - -var target = document.querySelector('#target'); - -// Ensure the target cannot be monkey patched with a different style object. -// This simulates Safari's behaviour in other browsers. -try { - var originalStyle = target.style; - Object.defineProperty(target, 'style', { - get: function () {return originalStyle;}, - configurable: false, - }); -} catch (_) {} - - -document.timeline.play(new Animation(target, {left: '100px', composite: 'add'}, {duration: 1 * 1000, iterations: 2, direction: 'alternate'})); - -at(0.5 * 1000, function() { - assert_in_array(target.style.getPropertyValue('left'), ['', null]); -}); - -testharness_timeline.schedule(function() { - target.style.setProperty('left' , '50px'); - assert_styles(target, {left: '150px'}, 'getComputedStyle() should return correct value after setting inline style.'); -}, 1000); - -at(1.5 * 1000, function() { - assert_equals(target.style.getPropertyValue('left'), '50px'); -}); - -testharness_timeline.schedule(function() { - target.style.setProperty('left', '100px'); - target.style.setProperty('background-color', 'green'); -}, 2500); - -at(3 * 1000, function() { - assert_equals(target.style.getPropertyValue('left'), '100px'); - assert_equals(target.style.getPropertyValue('background-color'), 'green'); -}); - -</script> diff --git a/third_party/polymer/components/web-animations-js/test/testcases/auto-test-inline-style-methods-checks.js b/third_party/polymer/components/web-animations-js/test/testcases/auto-test-inline-style-methods-checks.js deleted file mode 100644 index 52961d8..0000000 --- a/third_party/polymer/components/web-animations-js/test/testcases/auto-test-inline-style-methods-checks.js +++ /dev/null @@ -1,17 +0,0 @@ -timing_test(function() { - at(0 * 1000, function() { - assert_styles("#target",{'left':'0px','backgroundColor':'rgb(176, 196, 222)'}); - }); - at(0.5 * 1000, function() { - assert_styles("#target",{'left':'50px','backgroundColor':'rgb(176, 196, 222)'}); - }); - at(1.5 * 1000, function() { - assert_styles("#target",{'left':'100px','backgroundColor':'rgb(176, 196, 222)'}); - }); - at(2 * 1000, function() { - assert_styles("#target",{'left':'50px','backgroundColor':'rgb(176, 196, 222)'}); - }); - at(3 * 1000, function() { - assert_styles("#target",{'left':'100px','backgroundColor':'rgb(0, 128, 0)'}); - }); -}, "Auto generated tests"); diff --git a/third_party/polymer/components/web-animations-js/test/testcases/auto-test-inline-style-methods.html b/third_party/polymer/components/web-animations-js/test/testcases/auto-test-inline-style-methods.html deleted file mode 100644 index 7212dd7..0000000 --- a/third_party/polymer/components/web-animations-js/test/testcases/auto-test-inline-style-methods.html +++ /dev/null @@ -1,70 +0,0 @@ -<!-- -Copyright 2013 Google Inc. All Rights Reserved. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. ---> - -<!doctype html> -<style> -#target { - background-color: lightsteelblue; - width: 50px; - height: 50px; - position: absolute; - left: 0px; -} - -#spacer { - height: 100px; -} -</style> - - -<div id="target"></div> -<div id="spacer"></div> - -<script src="../bootstrap.js"></script> -<script> -'use strict'; - -var target = document.querySelector('#target'); - -document.timeline.play(new Animation(target, {left: '100px', composite: 'add'}, {duration: 1 * 1000, iterations: 2, direction: 'alternate'})); - -at(0.5 * 1000, function() { - assert_equals(target.style.length, 0); - assert_in_array(target.style.getPropertyValue('left'), ['', null]); -}); - -testharness_timeline.schedule(function() { - target.style.setProperty('left' , '50px'); - assert_styles(target, {left: '150px'}, 'getComputedStyle() should return correct value after setting inline style.'); -}, 1000); - -at(1.5 * 1000, function() { - assert_equals(target.style.length, 1); - assert_equals(target.style.getPropertyValue('left'), '50px'); -}); - -testharness_timeline.schedule(function() { - target.style.setProperty('left' , '100px'); - target.style.setProperty('background-color' , 'green'); -}, 2500); - -at(3 * 1000, function() { - assert_equals(target.style.length, 2); - assert_equals(target.style.getPropertyValue('left'), '100px'); - assert_equals(target.style.getPropertyValue('background-color'), 'green'); -}); - -</script> diff --git a/third_party/polymer/components/web-animations-js/test/testcases/auto-test-inline-style.html b/third_party/polymer/components/web-animations-js/test/testcases/auto-test-inline-style.html deleted file mode 100644 index 31fbe7f..0000000 --- a/third_party/polymer/components/web-animations-js/test/testcases/auto-test-inline-style.html +++ /dev/null @@ -1,69 +0,0 @@ -<!-- -Copyright 2013 Google Inc. All Rights Reserved. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. ---> - -<!doctype html> -<style> -#target { - background-color: lightsteelblue; - width: 50px; - height: 50px; - position: absolute; - left: 0px; -} - -#spacer { - height: 100px; -} -</style> - - -<div id="target"></div> -<div id="spacer"></div> - -<script src="../bootstrap.js"></script> -<script> -'use strict'; - -var target = document.querySelector('#target'); - -document.timeline.play(new Animation(target, {left: '100px', composite: 'add'}, {duration: 1 * 1000, iterations: 2, direction: 'alternate'})); - -at(0.5 * 1000, function() { - assert_equals(0, target.style.length); - assert_equals('', target.style.left); -}); - -testharness_timeline.schedule(function() { - target.style.left = '50px'; - assert_styles(target, {left: '150px'}, 'getComputedStyle() should return correct value after setting inline style.'); -}, 1000); - -at(1.5 * 1000, function() { - assert_equals(1, target.style.length); - assert_equals('50px', target.style.left); -}); - -testharness_timeline.schedule(function() { - target.style.cssText = 'left: 100px; background-color: green;'; -}, 2500); - -at(3 * 1000, function() { - assert_equals(2, target.style.length); - assert_equals('100px', target.style.left); - assert_not_equals('', target.style.backgroundColor); -}); - -</script> diff --git a/third_party/polymer/components/web-animations-js/test/testcases/auto-test-integer-checks.js b/third_party/polymer/components/web-animations-js/test/testcases/auto-test-integer-checks.js deleted file mode 100644 index c2bcf80..0000000 --- a/third_party/polymer/components/web-animations-js/test/testcases/auto-test-integer-checks.js +++ /dev/null @@ -1,38 +0,0 @@ -timing_test(function() { - at(0 * 1000, function() { - assert_styles('#test', {'z-index':'0'}); - }, "Autogenerated"); - at(0.3 * 1000, function() { - assert_styles('#test', {'z-index':'10'}); - }, "Autogenerated"); - at(0.6 * 1000, function() { - assert_styles('#test', {'z-index':'20'}); - }, "Autogenerated"); - at(0.8999999999999999 * 1000, function() { - assert_styles('#test', {'z-index':'30'}); - }, "Autogenerated"); - at(1.2 * 1000, function() { - assert_styles('#test', {'z-index':'40'}); - }, "Autogenerated"); - at(1.5 * 1000, function() { - assert_styles('#test', {'z-index':'50'}); - }, "Autogenerated"); - at(1.8 * 1000, function() { - assert_styles('#test', {'z-index':'60'}); - }, "Autogenerated"); - at(2.1 * 1000, function() { - assert_styles('#test', {'z-index':'70'}); - }, "Autogenerated"); - at(2.4 * 1000, function() { - assert_styles('#test', {'z-index':'80'}); - }, "Autogenerated"); - at(2.6999999999999997 * 1000, function() { - assert_styles('#test', {'z-index':'89'}); - }, "Autogenerated"); - at(2.9999999999999996 * 1000, function() { - assert_styles('#test', {'z-index':'99'}); - }, "Autogenerated"); - at(3.2999999999999994 * 1000, function() { - assert_styles('#test', {'z-index':'100'}); - }, "Autogenerated"); -}, "Autogenerated checks."); diff --git a/third_party/polymer/components/web-animations-js/test/testcases/auto-test-integer.html b/third_party/polymer/components/web-animations-js/test/testcases/auto-test-integer.html deleted file mode 100644 index c6f00ae..0000000 --- a/third_party/polymer/components/web-animations-js/test/testcases/auto-test-integer.html +++ /dev/null @@ -1,52 +0,0 @@ -<!-- -Copyright 2012 Google Inc. All Rights Reserved. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. ---> - -<!DOCTYPE html><meta charset="UTF-8"> -<style> -body { margin: 0px; } -div { display: inline-block; } -#test { -width:800px; -height:50px; -background: lightsteelblue; -position:absolute; -} -</style> -<body> -<div id="test"></div> -<script src="../bootstrap.js"></script> -<script> -"use strict"; -var width = 25; -var totalWidth = 800; -var startZ = 0; -var endZ = 100; -var test = document.querySelector("#test"); -var marker = test.nextSibling; - -for (var i = 0; i < totalWidth; i += width) { - var div = document.createElement("div"); - div.style.width = width + "px"; - div.style.height = "50px"; - div.style.background = "red"; - div.style.zIndex = startZ + - Math.round((i / totalWidth) * (endZ - startZ)); - div.style.position = "relative"; - document.body.insertBefore(div, marker); -} -document.timeline.play(new Animation(document.querySelector("#test"), - [{zIndex: String(startZ)}, {zIndex: String(endZ)}], {duration: 3 * 1000, fill: 'forwards'})); -</script> diff --git a/third_party/polymer/components/web-animations-js/test/testcases/auto-test-iteration-start-checks.js b/third_party/polymer/components/web-animations-js/test/testcases/auto-test-iteration-start-checks.js deleted file mode 100644 index d56942e..0000000 --- a/third_party/polymer/components/web-animations-js/test/testcases/auto-test-iteration-start-checks.js +++ /dev/null @@ -1,506 +0,0 @@ -timing_test(function() { - at(0 * 1000, function() { - assert_styles( - '.anim', - [{'left':'160px'}, - {'left':'260px'}, - {'left':'260px'}, - {'left':'180px'}, - {'left':'140px'}, - {'left':'116px'}, - {'left':'180px'}, - {'left':'180px'}, - {'left':'180px'}, - {'left':'180px'}, - {'left':'180px'}, - {'left':'180px'}, - {'left':'160px'}, - {'left':'260px'}, - {'left':'260px'}, - {'left':'180px'}, - {'left':'140px'}, - {'left':'116px'}, - {'left':'180px'}, - {'left':'180px'}, - {'left':'180px'}, - {'left':'180px'}, - {'left':'180px'}, - {'left':'180px'}]); - }, "Autogenerated"); - at(0.5 * 1000, function() { - assert_styles( - '.anim', - [{'left':'260px'}, - {'left':'160px'}, - {'left':'160px'}, - {'left':'280px'}, - {'left':'240px'}, - {'left':'156px'}, - {'left':'180px'}, - {'left':'160px'}, - {'left':'180px'}, - {'left':'180px'}, - {'left':'180px'}, - {'left':'180px'}, - {'left':'260px'}, - {'left':'160px'}, - {'left':'160px'}, - {'left':'280px'}, - {'left':'240px'}, - {'left':'156px'}, - {'left':'180px'}, - {'left':'160px'}, - {'left':'180px'}, - {'left':'180px'}, - {'left':'180px'}, - {'left':'180px'}]); - }, "Autogenerated"); - at(1 * 1000, function() { - assert_styles( - '.anim', - [{'left':'160px'}, - {'left':'260px'}, - {'left':'260px'}, - {'left':'180px'}, - {'left':'140px'}, - {'left':'116px'}, - {'left':'160px'}, - {'left':'260px'}, - {'left':'180px'}, - {'left':'180px'}, - {'left':'140px'}, - {'left':'180px'}, - {'left':'160px'}, - {'left':'260px'}, - {'left':'260px'}, - {'left':'180px'}, - {'left':'140px'}, - {'left':'116px'}, - {'left':'160px'}, - {'left':'260px'}, - {'left':'180px'}, - {'left':'180px'}, - {'left':'140px'}, - {'left':'180px'}]); - }, "Autogenerated"); - at(1.5 * 1000, function() { - assert_styles( - '.anim', - [{'left':'260px'}, - {'left':'160px'}, - {'left':'160px'}, - {'left':'280px'}, - {'left':'240px'}, - {'left':'156px'}, - {'left':'260px'}, - {'left':'160px'}, - {'left':'180px'}, - {'left':'280px'}, - {'left':'240px'}, - {'left':'156px'}, - {'left':'260px'}, - {'left':'160px'}, - {'left':'160px'}, - {'left':'280px'}, - {'left':'240px'}, - {'left':'156px'}, - {'left':'260px'}, - {'left':'160px'}, - {'left':'180px'}, - {'left':'280px'}, - {'left':'240px'}, - {'left':'156px'}]); - }, "Autogenerated"); - at(2 * 1000, function() { - assert_styles( - '.anim', - [{'left':'160px'}, - {'left':'260px'}, - {'left':'180px'}, - {'left':'180px'}, - {'left':'140px'}, - {'left':'116px'}, - {'left':'160px'}, - {'left':'260px'}, - {'left':'180px'}, - {'left':'180px'}, - {'left':'140px'}, - {'left':'116px'}, - {'left':'160px'}, - {'left':'260px'}, - {'left':'180px'}, - {'left':'180px'}, - {'left':'140px'}, - {'left':'116px'}, - {'left':'160px'}, - {'left':'260px'}, - {'left':'180px'}, - {'left':'180px'}, - {'left':'140px'}, - {'left':'116px'}]); - }, "Autogenerated"); - at(2.5 * 1000, function() { - assert_styles( - '.anim', - [{'left':'260px'}, - {'left':'160px'}, - {'left':'180px'}, - {'left':'280px'}, - {'left':'240px'}, - {'left':'156px'}, - {'left':'260px'}, - {'left':'160px'}, - {'left':'160px'}, - {'left':'280px'}, - {'left':'240px'}, - {'left':'156px'}, - {'left':'260px'}, - {'left':'160px'}, - {'left':'180px'}, - {'left':'280px'}, - {'left':'240px'}, - {'left':'156px'}, - {'left':'260px'}, - {'left':'160px'}, - {'left':'160px'}, - {'left':'280px'}, - {'left':'240px'}, - {'left':'156px'}]); - }, "Autogenerated"); - at(3 * 1000, function() { - assert_styles( - '.anim', - [{'left':'160px'}, - {'left':'260px'}, - {'left':'180px'}, - {'left':'180px'}, - {'left':'140px'}, - {'left':'180px'}, - {'left':'160px'}, - {'left':'260px'}, - {'left':'260px'}, - {'left':'180px'}, - {'left':'140px'}, - {'left':'116px'}, - {'left':'160px'}, - {'left':'260px'}, - {'left':'180px'}, - {'left':'180px'}, - {'left':'140px'}, - {'left':'180px'}, - {'left':'160px'}, - {'left':'260px'}, - {'left':'260px'}, - {'left':'180px'}, - {'left':'140px'}, - {'left':'116px'}]); - }, "Autogenerated"); - at(3.5 * 1000, function() { - assert_styles( - '.anim', - [{'left':'180px'}, - {'left':'160px'}, - {'left':'180px'}, - {'left':'180px'}, - {'left':'180px'}, - {'left':'180px'}, - {'left':'260px'}, - {'left':'160px'}, - {'left':'160px'}, - {'left':'280px'}, - {'left':'240px'}, - {'left':'156px'}, - {'left':'180px'}, - {'left':'160px'}, - {'left':'180px'}, - {'left':'180px'}, - {'left':'180px'}, - {'left':'180px'}, - {'left':'260px'}, - {'left':'160px'}, - {'left':'160px'}, - {'left':'280px'}, - {'left':'240px'}, - {'left':'156px'}]); - }, "Autogenerated"); - at(4 * 1000, function() { - assert_styles( - '.anim', - [{'left':'160px'}, - {'left':'260px'}, - {'left':'260px'}, - {'left':'180px'}, - {'left':'140px'}, - {'left':'116px'}, - {'left':'180px'}, - {'left':'180px'}, - {'left':'180px'}, - {'left':'180px'}, - {'left':'180px'}, - {'left':'180px'}, - {'left':'180px'}, - {'left':'180px'}, - {'left':'180px'}, - {'left':'180px'}, - {'left':'180px'}, - {'left':'180px'}, - {'left':'160px'}, - {'left':'260px'}, - {'left':'260px'}, - {'left':'180px'}, - {'left':'140px'}, - {'left':'116px'}]); - }, "Autogenerated"); - at(4.5 * 1000, function() { - assert_styles( - '.anim', - [{'left':'260px'}, - {'left':'160px'}, - {'left':'160px'}, - {'left':'280px'}, - {'left':'240px'}, - {'left':'156px'}, - {'left':'180px'}, - {'left':'160px'}, - {'left':'180px'}, - {'left':'180px'}, - {'left':'180px'}, - {'left':'180px'}, - {'left':'180px'}, - {'left':'160px'}, - {'left':'180px'}, - {'left':'180px'}, - {'left':'180px'}, - {'left':'180px'}, - {'left':'260px'}, - {'left':'160px'}, - {'left':'160px'}, - {'left':'280px'}, - {'left':'240px'}, - {'left':'156px'}]); - }, "Autogenerated"); - at(5 * 1000, function() { - assert_styles( - '.anim', - [{'left':'160px'}, - {'left':'260px'}, - {'left':'260px'}, - {'left':'180px'}, - {'left':'140px'}, - {'left':'116px'}, - {'left':'160px'}, - {'left':'260px'}, - {'left':'180px'}, - {'left':'180px'}, - {'left':'140px'}, - {'left':'180px'}, - {'left':'160px'}, - {'left':'260px'}, - {'left':'180px'}, - {'left':'180px'}, - {'left':'140px'}, - {'left':'180px'}, - {'left':'160px'}, - {'left':'260px'}, - {'left':'260px'}, - {'left':'180px'}, - {'left':'140px'}, - {'left':'116px'}]); - }, "Autogenerated"); - at(5.5 * 1000, function() { - assert_styles( - '.anim', - [{'left':'260px'}, - {'left':'160px'}, - {'left':'160px'}, - {'left':'280px'}, - {'left':'240px'}, - {'left':'156px'}, - {'left':'260px'}, - {'left':'160px'}, - {'left':'180px'}, - {'left':'280px'}, - {'left':'240px'}, - {'left':'156px'}, - {'left':'260px'}, - {'left':'160px'}, - {'left':'180px'}, - {'left':'280px'}, - {'left':'240px'}, - {'left':'156px'}, - {'left':'260px'}, - {'left':'160px'}, - {'left':'160px'}, - {'left':'280px'}, - {'left':'240px'}, - {'left':'156px'}]); - }, "Autogenerated"); - at(6 * 1000, function() { - assert_styles( - '.anim', - [{'left':'160px'}, - {'left':'260px'}, - {'left':'180px'}, - {'left':'180px'}, - {'left':'140px'}, - {'left':'116px'}, - {'left':'160px'}, - {'left':'260px'}, - {'left':'180px'}, - {'left':'180px'}, - {'left':'140px'}, - {'left':'116px'}, - {'left':'160px'}, - {'left':'260px'}, - {'left':'180px'}, - {'left':'180px'}, - {'left':'140px'}, - {'left':'116px'}, - {'left':'160px'}, - {'left':'260px'}, - {'left':'180px'}, - {'left':'180px'}, - {'left':'140px'}, - {'left':'116px'}]); - }, "Autogenerated"); - at(6.5 * 1000, function() { - assert_styles( - '.anim', - [{'left':'260px'}, - {'left':'160px'}, - {'left':'180px'}, - {'left':'280px'}, - {'left':'240px'}, - {'left':'156px'}, - {'left':'260px'}, - {'left':'160px'}, - {'left':'160px'}, - {'left':'280px'}, - {'left':'240px'}, - {'left':'156px'}, - {'left':'260px'}, - {'left':'160px'}, - {'left':'160px'}, - {'left':'280px'}, - {'left':'240px'}, - {'left':'156px'}, - {'left':'260px'}, - {'left':'160px'}, - {'left':'180px'}, - {'left':'280px'}, - {'left':'240px'}, - {'left':'156px'}]); - }, "Autogenerated"); - at(7 * 1000, function() { - assert_styles( - '.anim', - [{'left':'160px'}, - {'left':'260px'}, - {'left':'180px'}, - {'left':'180px'}, - {'left':'140px'}, - {'left':'180px'}, - {'left':'160px'}, - {'left':'260px'}, - {'left':'260px'}, - {'left':'180px'}, - {'left':'140px'}, - {'left':'116px'}, - {'left':'160px'}, - {'left':'260px'}, - {'left':'260px'}, - {'left':'180px'}, - {'left':'140px'}, - {'left':'116px'}, - {'left':'160px'}, - {'left':'260px'}, - {'left':'180px'}, - {'left':'180px'}, - {'left':'140px'}, - {'left':'180px'}]); - }, "Autogenerated"); - at(7.5 * 1000, function() { - assert_styles( - '.anim', - [{'left':'180px'}, - {'left':'160px'}, - {'left':'180px'}, - {'left':'180px'}, - {'left':'180px'}, - {'left':'180px'}, - {'left':'260px'}, - {'left':'160px'}, - {'left':'160px'}, - {'left':'280px'}, - {'left':'240px'}, - {'left':'156px'}, - {'left':'260px'}, - {'left':'160px'}, - {'left':'160px'}, - {'left':'280px'}, - {'left':'240px'}, - {'left':'156px'}, - {'left':'180px'}, - {'left':'160px'}, - {'left':'180px'}, - {'left':'180px'}, - {'left':'180px'}, - {'left':'180px'}]); - }, "Autogenerated"); - at(8 * 1000, function() { - assert_styles( - '.anim', - [{'left':'180px'}, - {'left':'180px'}, - {'left':'180px'}, - {'left':'180px'}, - {'left':'180px'}, - {'left':'180px'}, - {'left':'160px'}, - {'left':'260px'}, - {'left':'260px'}, - {'left':'180px'}, - {'left':'140px'}, - {'left':'116px'}, - {'left':'160px'}, - {'left':'260px'}, - {'left':'260px'}, - {'left':'180px'}, - {'left':'140px'}, - {'left':'116px'}, - {'left':'180px'}, - {'left':'180px'}, - {'left':'180px'}, - {'left':'180px'}, - {'left':'180px'}, - {'left':'180px'}]); - }, "Autogenerated"); - at(8.5 * 1000, function() { - assert_styles( - '.anim', - [{'left':'180px'}, - {'left':'180px'}, - {'left':'180px'}, - {'left':'180px'}, - {'left':'180px'}, - {'left':'180px'}, - {'left':'160px'}, - {'left':'260px'}, - {'left':'260px'}, - {'left':'180px'}, - {'left':'140px'}, - {'left':'116px'}, - {'left':'160px'}, - {'left':'260px'}, - {'left':'260px'}, - {'left':'180px'}, - {'left':'140px'}, - {'left':'116px'}, - {'left':'180px'}, - {'left':'180px'}, - {'left':'180px'}, - {'left':'180px'}, - {'left':'180px'}, - {'left':'180px'}]); - }, "Autogenerated"); -}, "Autogenerated checks."); diff --git a/third_party/polymer/components/web-animations-js/test/testcases/auto-test-iteration-start.html b/third_party/polymer/components/web-animations-js/test/testcases/auto-test-iteration-start.html deleted file mode 100644 index bd380cf..0000000 --- a/third_party/polymer/components/web-animations-js/test/testcases/auto-test-iteration-start.html +++ /dev/null @@ -1,160 +0,0 @@ -<!-- -Copyright 2012 Google Inc. All Rights Reserved. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. ---> - -<!DOCTYPE html><meta charset="UTF-8"> -<style> -.animContainer { - position: absolute; - left: 0px; - height: 100px; -} - -.anim { - left: 0px; - width: 100px; - height: 25px; - background-color: lightsteelblue; - position: relative; -} - -#ca { - top: 50px; -} - -#cb { - top: 250px; -} - -#cc { - top: 450px; -} - -#cd { - top: 650px; -} - -.expectation { - position: absolute; - background-color: red; - width: 100px; -} -</style> - -<div>All squares should line up at the end of each iteration (or start if -reversed).</div> - -<div class="expectation" style="top: 50px; left: 180px; height: 150px;"></div> - -<div class="expectation" style="top: 250px; left: 160px; height: 25px;"></div> -<div class="expectation" style="top: 275px; left: 260px; height: 50px;"></div> -<div class="expectation" style="top: 325px; left: 180px; height: 25px;"></div> -<div class="expectation" style="top: 350px; left: 140px; height: 25px;"></div> -<div class="expectation" style="top: 375px; left: 116px; height: 25px;"></div> - -<div class="expectation" style="top: 450px; left: 160px; height: 25px;"></div> -<div class="expectation" style="top: 475px; left: 260px; height: 50px;"></div> -<div class="expectation" style="top: 525px; left: 180px; height: 25px;"></div> -<div class="expectation" style="top: 550px; left: 140px; height: 25px;"></div> -<div class="expectation" style="top: 575px; left: 116px; height: 25px;"></div> - -<div class="expectation" style="top: 650px; left: 180px; height: 150px;"></div> - -<div class="animContainer" id="ca"> - <div class="anim a" id="a"></div> - <div class="anim b" id="b"></div> - <div class="anim c" id="c"></div> - <div class="anim d" id="d"></div> - <div class="anim e" id="e"></div> - <div class="anim f" id="f"></div> -</div> - -<div class="animContainer" id="cb"> - <div class="anim a" id="g"></div> - <div class="anim b" id="h"></div> - <div class="anim c" id="i"></div> - <div class="anim d" id="j"></div> - <div class="anim e" id="k"></div> - <div class="anim f" id="l"></div> -</div> - -<div class="animContainer" id="cc"> - <div class="anim a" id="m"></div> - <div class="anim b" id="n"></div> - <div class="anim c" id="o"></div> - <div class="anim d" id="p"></div> - <div class="anim e" id="q"></div> - <div class="anim f" id="r"></div> -</div> - -<div class="animContainer" id="cd"> - <div class="anim a" id="s"></div> - <div class="anim b" id="t"></div> - <div class="anim c" id="u"></div> - <div class="anim d" id="v"></div> - <div class="anim e" id="w"></div> - <div class="anim f" id="x"></div> -</div> - -<div style="height: 800px;"></div> - -<script src="../bootstrap.js"></script> -<script> -"use strict"; - -var containers = ["ca", "cb", "cc", "cd"]; - -var directions = ["normal", "reverse", "alternate", "alternate-reverse"]; -var groups = []; - -var effect100To300 = [{left: "100px"}, {left: "300px"}]; -var effect100To180 = [{left: "100px"}, {left: "180px"}]; - -for (var i = 0; i < directions.length; i++) { - var dir = directions[i]; - groups.push( - new AnimationGroup([], {iterations: 2, direction: dir, duration: 4 * 1000, fill: 'forwards'})); -} - -for (var i = 0; i < containers.length; i++) { - var container = document.getElementById(containers[i]); - // Test basic use. - groups[i].append(new Animation(container.getElementsByClassName("a")[0], - effect100To300, - {duration: 1 * 1000, iterations: 3.1, iterationStart: 0.3, fill: 'forwards'})); - groups[i].append(new Animation(container.getElementsByClassName("b")[0], - effect100To300, - {duration: 1 * 1000, iterations: 3.6, iterationStart: -0.2, fill: 'forwards'})); - // Test that iterationStart is not clipped to iterations. - groups[i].append(new Animation(container.getElementsByClassName("c")[0], - effect100To300, - {duration: 1 * 1000, iterations: 1.6, iterationStart: 1.8, fill: 'forwards'})); - // Test that nothing odd happens when iterations is an integer. - groups[i].append(new Animation(container.getElementsByClassName("d")[0], - effect100To300, - {duration: 1 * 1000, iterations: 3.0, iterationStart: 0.4, fill: 'forwards'})); - // Test that nothing odd happens when (iterations - iterationStart) is an - // integer. - groups[i].append(new Animation(container.getElementsByClassName("e")[0], - effect100To300, - {duration: 1 * 1000, iterations: 3.2, iterationStart: 0.2, fill: 'forwards'})); - // Test that nothing odd happens when (iterations + iterationStart) is an - // integer. - groups[i].append(new Animation(container.getElementsByClassName("f")[0], - effect100To180, - {duration: 1 * 1000, iterations: 2.8, iterationStart: 0.2, fill: 'forwards'})); - document.timeline.play(groups[i]); -} -</script> diff --git a/third_party/polymer/components/web-animations-js/test/testcases/auto-test-iterations-alternate-checks.js b/third_party/polymer/components/web-animations-js/test/testcases/auto-test-iterations-alternate-checks.js deleted file mode 100644 index 5d172fc..0000000 --- a/third_party/polymer/components/web-animations-js/test/testcases/auto-test-iterations-alternate-checks.js +++ /dev/null @@ -1,44 +0,0 @@ -timing_test(function() { - at(0 * 1000, function() { - assert_styles('.anim', {'left':'100px'}); - }, "Autogenerated"); - at(0.25 * 1000, function() { - assert_styles('.anim', {'left':'200px'}); - }, "Autogenerated"); - at(0.5 * 1000, function() { - assert_styles('.anim', {'left':'300px'}); - }, "Autogenerated"); - at(0.75 * 1000, function() { - assert_styles('.anim', {'left':'400px'}); - }, "Autogenerated"); - at(1 * 1000, function() { - assert_styles('.anim', {'left':'500px'}); - }, "Autogenerated"); - at(1.25 * 1000, function() { - assert_styles('.anim', {'left':'400px'}); - }, "Autogenerated"); - at(1.5 * 1000, function() { - assert_styles('.anim', {'left':'300px'}); - }, "Autogenerated"); - at(1.75 * 1000, function() { - assert_styles('.anim', {'left':'200px'}); - }, "Autogenerated"); - at(2 * 1000, function() { - assert_styles('.anim', {'left':'100px'}); - }, "Autogenerated"); - at(2.25 * 1000, function() { - assert_styles('.anim', {'left':'200px'}); - }, "Autogenerated"); - at(2.5 * 1000, function() { - assert_styles('.anim', {'left':'300px'}); - }, "Autogenerated"); - at(2.75 * 1000, function() { - assert_styles('.anim', {'left':'400px'}); - }, "Autogenerated"); - at(3.0 * 1000, function() { - assert_styles('.anim', {'left':'500px'}); - }, "Autogenerated"); - at(4.0 * 1000, function() { - assert_styles('.anim', {'left':'500px'}); - }, "Autogenerated"); -}, "Autogenerated checks."); diff --git a/third_party/polymer/components/web-animations-js/test/testcases/auto-test-iterations-alternate-holes-checks.js b/third_party/polymer/components/web-animations-js/test/testcases/auto-test-iterations-alternate-holes-checks.js deleted file mode 100644 index c3ff863..0000000 --- a/third_party/polymer/components/web-animations-js/test/testcases/auto-test-iterations-alternate-holes-checks.js +++ /dev/null @@ -1,41 +0,0 @@ -timing_test(function() { - at(0.25 * 1000, function() { - assert_styles('#a', {'left':'200px'}); - }, "Autogenerated test for #a at t=3.25"); - at(0.5 * 1000, function() { - assert_styles('#a', {'left':'300px'}); - }, "Autogenerated test for #a at t=3.5"); - at(0.75 * 1000, function() { - assert_styles('#a', {'left':'400px'}); - }, "Autogenerated test for #a at t=3.75"); - at(1 * 1000, function() { - assert_styles('#a', {'left':'100px'}); - }, "Autogenerated test for #a at t=4"); - at(1.25 * 1000, function() { - assert_styles('#a', {'left':'400px'}); - }, "Autogenerated test for #a at t=4.25"); - at(1.5 * 1000, function() { - assert_styles('#a', {'left':'300px'}); - }, "Autogenerated test for #a at t=4.5"); - at(1.75 * 1000, function() { - assert_styles('#a', {'left':'200px'}); - }, "Autogenerated test for #a at t=4.75"); - at(2 * 1000, function() { - assert_styles('#a', {'left':'100px'}); - }, "Autogenerated test for #a at t=5"); - at(2.25 * 1000, function() { - assert_styles('#a', {'left':'200px'}); - }, "Autogenerated test for #a at t=5.25"); - at(2.5 * 1000, function() { - assert_styles('#a', {'left':'300px'}); - }, "Autogenerated test for #a at t=5.5"); - at(2.75 * 1000, function() { - assert_styles('#a', {'left':'400px'}); - }, "Autogenerated test for #a at t=5.75"); - at(3.0 * 1000, function() { - assert_styles('#a', {'left':'100px'}); - }, "Autogenerated test for #a at t=6.0"); - at(4.0 * 1000, function() { - assert_styles('#a', {'left':'100px'}); - }, "Autogenerated test for #a at t=7.0"); -}, "Autogenerated checks."); diff --git a/third_party/polymer/components/web-animations-js/test/testcases/auto-test-iterations-alternate-holes.html b/third_party/polymer/components/web-animations-js/test/testcases/auto-test-iterations-alternate-holes.html deleted file mode 100644 index cf05b85..0000000 --- a/third_party/polymer/components/web-animations-js/test/testcases/auto-test-iterations-alternate-holes.html +++ /dev/null @@ -1,48 +0,0 @@ -<!-- -Copyright 2012 Google Inc. All Rights Reserved. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. ---> - -<!DOCTYPE html><meta charset="UTF-8"> -<style> -.anim { - left: 0px; - width: 100px; - height: 25px; - background-color: #FAA; - position: relative; -} -</style> - -<div id="a" class="anim"></div> - -<script src="../bootstrap.js"></script> -<script> -"use strict"; - -// This test case exhibits the kinda weird behavour that occurs when you have -// an inner animation which has a duration which is a multiple of the -// outer group's duration *and* you use direction: "alternate" -// -// See Bug 22402 about the specification -// https://www.w3.org/Bugs/Public/show_bug.cgi?id=22402 - -var anim = new Animation( - document.getElementById("a"), [{left: "100px"}, {left: "500px"}], - {iterations: Infinity, duration: 1.0 * 1000, fill: 'forwards'}); -var animationGroup = new AnimationGroup([anim], - {direction: "alternate", duration: 1.0 * 1000, iterations: 3.0, fill: 'forwards'}); - -document.timeline.play(animationGroup); -</script> diff --git a/third_party/polymer/components/web-animations-js/test/testcases/auto-test-iterations-alternate.html b/third_party/polymer/components/web-animations-js/test/testcases/auto-test-iterations-alternate.html deleted file mode 100644 index 4aa7e09..0000000 --- a/third_party/polymer/components/web-animations-js/test/testcases/auto-test-iterations-alternate.html +++ /dev/null @@ -1,50 +0,0 @@ -<!-- -Copyright 2012 Google Inc. All Rights Reserved. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. ---> - -<!DOCTYPE html><meta charset="UTF-8"> -<style> -.anim { - left: 0px; - width: 100px; - height: 25px; - background-color: #FAA; - position: relative; -} -</style> - -<div id="a" class="anim"></div> -<div id="b" class="anim"></div> - -<script src="../bootstrap.js"></script> -<script> -"use strict"; - -var effect = [{left: "100px"}, {left: "500px"}]; - -var anim1 = new Animation( - document.getElementById("a"), effect, - {duration: 1.0 * 1000, iterations: 3.0, direction: "alternate", fill: 'forwards'}); - -var anim2 = new Animation( - document.getElementById("b"), effect, - {duration: 1.0 * 1000, fill: 'forwards'}); -var animationGroup = new AnimationGroup( - [anim2], - {duration: 1.0 * 1000, iterations: 3.0, direction: "alternate", fill: 'forwards'}); - -document.timeline.play(anim1); -document.timeline.play(animationGroup); -</script> diff --git a/third_party/polymer/components/web-animations-js/test/testcases/auto-test-iterations-basic-checks.js b/third_party/polymer/components/web-animations-js/test/testcases/auto-test-iterations-basic-checks.js deleted file mode 100644 index 5d36f93..0000000 --- a/third_party/polymer/components/web-animations-js/test/testcases/auto-test-iterations-basic-checks.js +++ /dev/null @@ -1,162 +0,0 @@ -timing_test(function() { - at(0 * 1000, function() { - assert_styles( - '.anim', - [{'left':'100px'}, - {'left':'100px'}, - {'left':'180px'}, - {'left':'180px'}, - {'left':'180px'}, - {'left':'180px'}, - {'left':'100px'}, - {'left':'100px'}, - {'left':'180px'}, - {'left':'180px'}, - {'left':'180px'}, - {'left':'180px'}]); - }, "Autogenerated"); - at(0.9 * 1000, function() { - assert_styles( - '.anim', - [{'left':'280px'}, - {'left':'172px'}, - {'left':'180px'}, - {'left':'120px'}, - {'left':'180px'}, - {'left':'180px'}, - {'left':'280px'}, - {'left':'172px'}, - {'left':'180px'}, - {'left':'120px'}, - {'left':'180px'}, - {'left':'180px'}]); - }, "Autogenerated"); - at(1.8 * 1000, function() { - assert_styles( - '.anim', - [{'left':'260px'}, - {'left':'164px'}, - {'left':'180px'}, - {'left':'140px'}, - {'left':'116px'}, - {'left':'180px'}, - {'left':'260px'}, - {'left':'164px'}, - {'left':'180px'}, - {'left':'140px'}, - {'left':'116px'}, - {'left':'180px'}]); - }, "Autogenerated"); - at(2.7 * 1000, function() { - assert_styles( - '.anim', - [{'left':'240px'}, - {'left':'156px'}, - {'left':'180px'}, - {'left':'160px'}, - {'left':'124px'}, - {'left':'180px'}, - {'left':'240px'}, - {'left':'156px'}, - {'left':'180px'}, - {'left':'160px'}, - {'left':'124px'}, - {'left':'180px'}]); - }, "Autogenerated"); - at(3.6 * 1000, function() { - assert_styles( - '.anim', - [{'left':'180px'}, - {'left':'180px'}, - {'left':'180px'}, - {'left':'180px'}, - {'left':'132px'}, - {'left':'180px'}, - {'left':'180px'}, - {'left':'180px'}, - {'left':'180px'}, - {'left':'180px'}, - {'left':'132px'}, - {'left':'180px'}]); - }, "Autogenerated"); - at(4.5 * 1000, function() { - assert_styles( - '.anim', - [{'left':'200px'}, - {'left':'140px'}, - {'left':'180px'}, - {'left':'180px'}, - {'left':'180px'}, - {'left':'180px'}, - {'left':'180px'}, - {'left':'180px'}, - {'left':'180px'}, - {'left':'200px'}, - {'left':'140px'}, - {'left':'180px'}]); - }, "Autogenerated"); - at(5.4 * 1000, function() { - assert_styles( - '.anim', - [{'left':'180px'}, - {'left':'132px'}, - {'left':'180px'}, - {'left':'220px'}, - {'left':'148px'}, - {'left':'180px'}, - {'left':'220px'}, - {'left':'148px'}, - {'left':'180px'}, - {'left':'180px'}, - {'left':'132px'}, - {'left':'180px'}]); - }, "Autogenerated"); - at(6.300000000000001 * 1000, function() { - assert_styles( - '.anim', - [{'left':'160px'}, - {'left':'124px'}, - {'left':'180px'}, - {'left':'240px'}, - {'left':'156px'}, - {'left':'180px'}, - {'left':'240px'}, - {'left':'156px'}, - {'left':'180px'}, - {'left':'160px'}, - {'left':'124px'}, - {'left':'180px'}]); - }, "Autogenerated"); - at(7.200000000000001 * 1000, function() { - assert_styles( - '.anim', - [{'left':'140px'}, - {'left':'180px'}, - {'left':'180px'}, - {'left':'260px'}, - {'left':'164px'}, - {'left':'180px'}, - {'left':'260px'}, - {'left':'164px'}, - {'left':'180px'}, - {'left':'140px'}, - {'left':'180px'}, - {'left':'180px'}]); - }, "Autogenerated"); - at(8.100000000000001 * 1000, function() { - assert_styles( - '.anim', - [{'left':'180px'}, - {'left':'180px'}, - {'left':'180px'}, - {'left':'100px'}, - {'left':'100px'}, - {'left':'180px'}, - {'left':'100px'}, - {'left':'100px'}, - {'left':'180px'}, - {'left':'180px'}, - {'left':'180px'}, - {'left':'180px'}]); - }, "Autogenerated"); -}, "Autogenerated checks."); diff --git a/third_party/polymer/components/web-animations-js/test/testcases/auto-test-iterations-basic.html b/third_party/polymer/components/web-animations-js/test/testcases/auto-test-iterations-basic.html deleted file mode 100644 index 0dca313..0000000 --- a/third_party/polymer/components/web-animations-js/test/testcases/auto-test-iterations-basic.html +++ /dev/null @@ -1,116 +0,0 @@ -<!-- -Copyright 2012 Google Inc. All Rights Reserved. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. ---> - -<!DOCTYPE html><meta charset="UTF-8"> -<style> -.animContainer { - position: absolute; - left: 0px; -} - -.anim { - left: 0px; - width: 100px; - height: 25px; - background-color: #FAA; - position: relative; -} - -.expected { - height: 25px; - border-right: 1px solid black; -} - -#ca { - top: 50px; - width: 280px; -} - -#cb { - top: 150px; - width: 100px; -} - -#cc { - top: 250px; - width: 100px; -} - -#cd { - top: 350px; - width: 280px; -} -</style> - -<div>Boxes in each group should line up with each other at end of each -iteration (or start if reversed).</div> -<div>Right edge of each box should align with black line at end of test.</div> - -<div class="animContainer" id="ca"> - <div class="expected" style="width: 280px;"><div class="anim a" id="a"></div></div> - <div class="expected" style="width: 280px;"><div class="anim b" id="b"></div></div> - <div class="expected" style="width: 280px;"><div class="anim c" id="c"></div></div> -</div> - -<div class="animContainer" id="cb"> - <div class="expected" style="width: 200px;"><div class="anim a" id="d"></div></div> - <div class="expected" style="width: 200px;"><div class="anim b" id="e"></div></div> - <div class="expected" style="width: 280px;"><div class="anim c" id="f"></div></div> -</div> - -<div class="animContainer" id="cc"> - <div class="expected" style="width: 200px;"><div class="anim a" id="g"></div></div> - <div class="expected" style="width: 200px;"><div class="anim b" id="h"></div></div> - <div class="expected" style="width: 280px;"><div class="anim c" id="i"></div></div> -</div> - -<div class="animContainer" id="cd"> - <div class="expected" style="width: 280px;"><div class="anim a" id="j"></div></div> - <div class="expected" style="width: 280px;"><div class="anim b" id="k"></div></div> - <div class="expected" style="width: 280px;"><div class="anim c" id="l"></div></div> -</div> - -<div style="height: 400px;"></div> - -<script src="../bootstrap.js"></script> -<script> -"use strict"; - -var containers = ["ca", "cb", "cc", "cd"]; - -var directions = ["normal", "reverse", "alternate", "alternate-reverse"]; - -for (var i = 0; i < directions.length; i++) { - var dir = directions[i]; - var container = document.getElementById(containers[i]); - - document.timeline.play( - new AnimationGroup([ - // Test basic use. - new Animation(container.getElementsByClassName("a")[0], - [{left: "100px"}, {left: "300px"}], - {duration: 1 * 1000, iterations: 3.4, fill: 'forwards'}), - // Test integer iterations. - new Animation(container.getElementsByClassName("b")[0], - [{left: "100px"}, {left: "180px"}], - {duration: 1 * 1000, iterations: 3.0, fill: 'forwards'}), - // Test zero iterations. - new Animation(container.getElementsByClassName("c")[0], - [{left: "180px"}, {left: "300px"}], - {duration: 1 * 1000, iterations: 0.0, fill: 'forwards'}), - ], {iterations: 2, direction: dir, duration: 4 * 1000, fill: 'forwards'})); -} -</script> diff --git a/third_party/polymer/components/web-animations-js/test/testcases/auto-test-iterations-fill-checks.js b/third_party/polymer/components/web-animations-js/test/testcases/auto-test-iterations-fill-checks.js deleted file mode 100644 index 7f19c92..0000000 --- a/third_party/polymer/components/web-animations-js/test/testcases/auto-test-iterations-fill-checks.js +++ /dev/null @@ -1,602 +0,0 @@ -timing_test(function() { - at(0 * 1000, function() { - assert_styles( - '.anim', - [{'left':'0px'}, - {'left':'0px'}, - {'left':'0px'}, - {'left':'0px'}, - {'left':'0px'}, - {'left':'0px'}, - {'left':'0px'}, - {'left':'0px'}, - {'left':'0px'}, - {'left':'0px'}, - {'left':'0px'}, - {'left':'0px'}, - {'left':'0px'}, - {'left':'0px'}, - {'left':'0px'}, - {'left':'0px'}]); - }, "Autogenerated"); - at(0.45 * 1000, function() { - assert_styles( - '.anim', - [{'left':'0px'}, - {'left':'0px'}, - {'left':'0px'}, - {'left':'0px'}, - {'left':'0px'}, - {'left':'0px'}, - {'left':'0px'}, - {'left':'0px'}, - {'left':'0px'}, - {'left':'0px'}, - {'left':'0px'}, - {'left':'0px'}, - {'left':'0px'}, - {'left':'0px'}, - {'left':'0px'}, - {'left':'0px'}]); - }, "Autogenerated"); - at(0.9 * 1000, function() { - assert_styles( - '.anim', - [{'left':'0px'}, - {'left':'0px'}, - {'left':'0px'}, - {'left':'0px'}, - {'left':'0px'}, - {'left':'0px'}, - {'left':'0px'}, - {'left':'0px'}, - {'left':'0px'}, - {'left':'0px'}, - {'left':'0px'}, - {'left':'0px'}, - {'left':'0px'}, - {'left':'0px'}, - {'left':'0px'}, - {'left':'0px'}]); - }, "Autogenerated"); - at(1.35 * 1000, function() { - assert_styles( - '.anim', - [{'left':'0px'}, - {'left':'100px'}, - {'left':'0px'}, - {'left':'100px'}, - {'left':'0px'}, - {'left':'0px'}, - {'left':'200px'}, - {'left':'200px'}, - {'left':'0px'}, - {'left':'100px'}, - {'left':'0px'}, - {'left':'100px'}, - {'left':'0px'}, - {'left':'0px'}, - {'left':'200px'}, - {'left':'200px'}]); - }, "Autogenerated"); - at(1.8 * 1000, function() { - assert_styles( - '.anim', - [{'left':'148px'}, - {'left':'148px'}, - {'left':'148px'}, - {'left':'148px'}, - {'left':'0px'}, - {'left':'0px'}, - {'left':'200px'}, - {'left':'200px'}, - {'left':'148px'}, - {'left':'148px'}, - {'left':'148px'}, - {'left':'148px'}, - {'left':'0px'}, - {'left':'0px'}, - {'left':'200px'}, - {'left':'200px'}]); - }, "Autogenerated"); - at(2.25 * 1000, function() { - assert_styles( - '.anim', - [{'left':'120px'}, - {'left':'120px'}, - {'left':'120px'}, - {'left':'120px'}, - {'left':'0px'}, - {'left':'0px'}, - {'left':'200px'}, - {'left':'200px'}, - {'left':'120px'}, - {'left':'120px'}, - {'left':'120px'}, - {'left':'120px'}, - {'left':'0px'}, - {'left':'0px'}, - {'left':'200px'}, - {'left':'200px'}]); - }, "Autogenerated"); - at(2.7 * 1000, function() { - assert_styles( - '.anim', - [{'left':'192px'}, - {'left':'192px'}, - {'left':'192px'}, - {'left':'192px'}, - {'left':'0px'}, - {'left':'0px'}, - {'left':'200px'}, - {'left':'200px'}, - {'left':'192px'}, - {'left':'192px'}, - {'left':'192px'}, - {'left':'192px'}, - {'left':'0px'}, - {'left':'0px'}, - {'left':'200px'}, - {'left':'200px'}]); - }, "Autogenerated"); - at(3.1500000000000004 * 1000, function() { - assert_styles( - '.anim', - [{'left':'0px'}, - {'left':'0px'}, - {'left':'200px'}, - {'left':'200px'}, - {'left':'0px'}, - {'left':'0px'}, - {'left':'200px'}, - {'left':'200px'}, - {'left':'0px'}, - {'left':'0px'}, - {'left':'200px'}, - {'left':'200px'}, - {'left':'0px'}, - {'left':'0px'}, - {'left':'200px'}, - {'left':'200px'}]); - }, "Autogenerated"); - at(3.6000000000000005 * 1000, function() { - assert_styles( - '.anim', - [{'left':'0px'}, - {'left':'0px'}, - {'left':'200px'}, - {'left':'200px'}, - {'left':'144px'}, - {'left':'144px'}, - {'left':'144px'}, - {'left':'144px'}, - {'left':'0px'}, - {'left':'0px'}, - {'left':'200px'}, - {'left':'200px'}, - {'left':'144px'}, - {'left':'144px'}, - {'left':'144px'}, - {'left':'144px'}]); - }, "Autogenerated"); - at(4.050000000000001 * 1000, function() { - assert_styles( - '.anim', - [{'left':'0px'}, - {'left':'0px'}, - {'left':'200px'}, - {'left':'200px'}, - {'left':'172px'}, - {'left':'172px'}, - {'left':'172px'}, - {'left':'172px'}, - {'left':'0px'}, - {'left':'0px'}, - {'left':'200px'}, - {'left':'200px'}, - {'left':'172px'}, - {'left':'172px'}, - {'left':'172px'}, - {'left':'172px'}]); - }, "Autogenerated"); - at(4.500000000000001 * 1000, function() { - assert_styles( - '.anim', - [{'left':'0px'}, - {'left':'0px'}, - {'left':'200px'}, - {'left':'200px'}, - {'left':'0px'}, - {'left':'100px'}, - {'left':'0px'}, - {'left':'100px'}, - {'left':'0px'}, - {'left':'0px'}, - {'left':'200px'}, - {'left':'200px'}, - {'left':'0px'}, - {'left':'100px'}, - {'left':'0px'}, - {'left':'100px'}]); - }, "Autogenerated"); - at(4.950000000000001 * 1000, function() { - assert_styles( - '.anim', - [{'left':'0px'}, - {'left':'0px'}, - {'left':'200px'}, - {'left':'200px'}, - {'left':'0px'}, - {'left':'100px'}, - {'left':'0px'}, - {'left':'100px'}, - {'left':'0px'}, - {'left':'0px'}, - {'left':'200px'}, - {'left':'200px'}, - {'left':'0px'}, - {'left':'100px'}, - {'left':'0px'}, - {'left':'100px'}]); - }, "Autogenerated"); - at(5.400000000000001 * 1000, function() { - assert_styles( - '.anim', - [{'left':'0px'}, - {'left':'100px'}, - {'left':'0px'}, - {'left':'100px'}, - {'left':'0px'}, - {'left':'0px'}, - {'left':'200px'}, - {'left':'200px'}, - {'left':'0px'}, - {'left':'0px'}, - {'left':'200px'}, - {'left':'200px'}, - {'left':'0px'}, - {'left':'100px'}, - {'left':'0px'}, - {'left':'100px'}]); - }, "Autogenerated"); - at(5.850000000000001 * 1000, function() { - assert_styles( - '.anim', - [{'left':'156px'}, - {'left':'156px'}, - {'left':'156px'}, - {'left':'156px'}, - {'left':'0px'}, - {'left':'0px'}, - {'left':'200px'}, - {'left':'200px'}, - {'left':'0px'}, - {'left':'0px'}, - {'left':'200px'}, - {'left':'200px'}, - {'left':'156px'}, - {'left':'156px'}, - {'left':'156px'}, - {'left':'156px'}]); - }, "Autogenerated"); - at(6.300000000000002 * 1000, function() { - assert_styles( - '.anim', - [{'left':'128px'}, - {'left':'128px'}, - {'left':'128px'}, - {'left':'128px'}, - {'left':'0px'}, - {'left':'0px'}, - {'left':'200px'}, - {'left':'200px'}, - {'left':'0px'}, - {'left':'0px'}, - {'left':'200px'}, - {'left':'200px'}, - {'left':'128px'}, - {'left':'128px'}, - {'left':'128px'}, - {'left':'128px'}]); - }, "Autogenerated"); - at(6.750000000000002 * 1000, function() { - assert_styles( - '.anim', - [{'left':'0px'}, - {'left':'0px'}, - {'left':'200px'}, - {'left':'200px'}, - {'left':'0px'}, - {'left':'0px'}, - {'left':'200px'}, - {'left':'200px'}, - {'left':'0px'}, - {'left':'0px'}, - {'left':'200px'}, - {'left':'200px'}, - {'left':'0px'}, - {'left':'0px'}, - {'left':'200px'}, - {'left':'200px'}]); - }, "Autogenerated"); - at(7.200000000000002 * 1000, function() { - assert_styles( - '.anim', - [{'left':'0px'}, - {'left':'0px'}, - {'left':'200px'}, - {'left':'200px'}, - {'left':'0px'}, - {'left':'0px'}, - {'left':'200px'}, - {'left':'200px'}, - {'left':'0px'}, - {'left':'0px'}, - {'left':'200px'}, - {'left':'200px'}, - {'left':'0px'}, - {'left':'0px'}, - {'left':'200px'}, - {'left':'200px'}]); - }, "Autogenerated"); - at(7.650000000000002 * 1000, function() { - assert_styles( - '.anim', - [{'left':'0px'}, - {'left':'0px'}, - {'left':'200px'}, - {'left':'200px'}, - {'left':'136px'}, - {'left':'136px'}, - {'left':'136px'}, - {'left':'136px'}, - {'left':'136px'}, - {'left':'136px'}, - {'left':'136px'}, - {'left':'136px'}, - {'left':'0px'}, - {'left':'0px'}, - {'left':'200px'}, - {'left':'200px'}]); - }, "Autogenerated"); - at(8.100000000000001 * 1000, function() { - assert_styles( - '.anim', - [{'left':'0px'}, - {'left':'0px'}, - {'left':'200px'}, - {'left':'200px'}, - {'left':'164px'}, - {'left':'164px'}, - {'left':'164px'}, - {'left':'164px'}, - {'left':'164px'}, - {'left':'164px'}, - {'left':'164px'}, - {'left':'164px'}, - {'left':'0px'}, - {'left':'0px'}, - {'left':'200px'}, - {'left':'200px'}]); - }, "Autogenerated"); - at(8.55 * 1000, function() { - assert_styles( - '.anim', - [{'left':'0px'}, - {'left':'0px'}, - {'left':'200px'}, - {'left':'200px'}, - {'left':'0px'}, - {'left':'100px'}, - {'left':'0px'}, - {'left':'100px'}, - {'left':'0px'}, - {'left':'100px'}, - {'left':'0px'}, - {'left':'100px'}, - {'left':'0px'}, - {'left':'0px'}, - {'left':'200px'}, - {'left':'200px'}]); - }, "Autogenerated"); - at(9 * 1000, function() { - assert_styles( - '.anim', - [{'left':'0px'}, - {'left':'100px'}, - {'left':'0px'}, - {'left':'100px'}, - {'left':'0px'}, - {'left':'0px'}, - {'left':'200px'}, - {'left':'200px'}, - {'left':'0px'}, - {'left':'100px'}, - {'left':'0px'}, - {'left':'100px'}, - {'left':'0px'}, - {'left':'0px'}, - {'left':'200px'}, - {'left':'200px'}]); - }, "Autogenerated"); - at(9.45 * 1000, function() { - assert_styles( - '.anim', - [{'left':'0px'}, - {'left':'100px'}, - {'left':'0px'}, - {'left':'100px'}, - {'left':'0px'}, - {'left':'0px'}, - {'left':'200px'}, - {'left':'200px'}, - {'left':'0px'}, - {'left':'100px'}, - {'left':'0px'}, - {'left':'100px'}, - {'left':'0px'}, - {'left':'0px'}, - {'left':'200px'}, - {'left':'200px'}]); - }, "Autogenerated"); - at(9.899999999999999 * 1000, function() { - assert_styles( - '.anim', - [{'left':'164px'}, - {'left':'164px'}, - {'left':'164px'}, - {'left':'164px'}, - {'left':'0px'}, - {'left':'0px'}, - {'left':'200px'}, - {'left':'200px'}, - {'left':'164px'}, - {'left':'164px'}, - {'left':'164px'}, - {'left':'164px'}, - {'left':'0px'}, - {'left':'0px'}, - {'left':'200px'}, - {'left':'200px'}]); - }, "Autogenerated"); - at(10.349999999999998 * 1000, function() { - assert_styles( - '.anim', - [{'left':'136px'}, - {'left':'136px'}, - {'left':'136px'}, - {'left':'136px'}, - {'left':'0px'}, - {'left':'0px'}, - {'left':'200px'}, - {'left':'200px'}, - {'left':'136px'}, - {'left':'136px'}, - {'left':'136px'}, - {'left':'136px'}, - {'left':'0px'}, - {'left':'0px'}, - {'left':'200px'}, - {'left':'200px'}]); - }, "Autogenerated"); - at(10.799999999999997 * 1000, function() { - assert_styles( - '.anim', - [{'left':'0px'}, - {'left':'0px'}, - {'left':'200px'}, - {'left':'200px'}, - {'left':'0px'}, - {'left':'0px'}, - {'left':'200px'}, - {'left':'200px'}, - {'left':'0px'}, - {'left':'0px'}, - {'left':'200px'}, - {'left':'200px'}, - {'left':'0px'}, - {'left':'0px'}, - {'left':'200px'}, - {'left':'200px'}]); - }, "Autogenerated"); - at(11.249999999999996 * 1000, function() { - assert_styles( - '.anim', - [{'left':'0px'}, - {'left':'0px'}, - {'left':'200px'}, - {'left':'200px'}, - {'left':'0px'}, - {'left':'0px'}, - {'left':'200px'}, - {'left':'200px'}, - {'left':'0px'}, - {'left':'0px'}, - {'left':'200px'}, - {'left':'200px'}, - {'left':'0px'}, - {'left':'0px'}, - {'left':'200px'}, - {'left':'200px'}]); - }, "Autogenerated"); - at(11.699999999999996 * 1000, function() { - assert_styles( - '.anim', - [{'left':'0px'}, - {'left':'0px'}, - {'left':'200px'}, - {'left':'200px'}, - {'left':'128px'}, - {'left':'128px'}, - {'left':'128px'}, - {'left':'128px'}, - {'left':'0px'}, - {'left':'0px'}, - {'left':'200px'}, - {'left':'200px'}, - {'left':'128px'}, - {'left':'128px'}, - {'left':'128px'}, - {'left':'128px'}]); - }, "Autogenerated"); - at(12.149999999999995 * 1000, function() { - assert_styles( - '.anim', - [{'left':'0px'}, - {'left':'0px'}, - {'left':'200px'}, - {'left':'200px'}, - {'left':'156px'}, - {'left':'156px'}, - {'left':'156px'}, - {'left':'156px'}, - {'left':'0px'}, - {'left':'0px'}, - {'left':'200px'}, - {'left':'200px'}, - {'left':'156px'}, - {'left':'156px'}, - {'left':'156px'}, - {'left':'156px'}]); - }, "Autogenerated"); - at(12.599999999999994 * 1000, function() { - assert_styles( - '.anim', - [{'left':'0px'}, - {'left':'0px'}, - {'left':'200px'}, - {'left':'200px'}, - {'left':'0px'}, - {'left':'100px'}, - {'left':'0px'}, - {'left':'100px'}, - {'left':'0px'}, - {'left':'0px'}, - {'left':'200px'}, - {'left':'200px'}, - {'left':'0px'}, - {'left':'100px'}, - {'left':'0px'}, - {'left':'100px'}]); - }, "Autogenerated"); - at(13.049999999999994 * 1000, function() { - assert_styles( - '.anim', - [{'left':'0px'}, - {'left':'0px'}, - {'left':'200px'}, - {'left':'200px'}, - {'left':'0px'}, - {'left':'100px'}, - {'left':'0px'}, - {'left':'100px'}, - {'left':'0px'}, - {'left':'0px'}, - {'left':'200px'}, - {'left':'200px'}, - {'left':'0px'}, - {'left':'100px'}, - {'left':'0px'}, - {'left':'100px'}]); - }, "Autogenerated"); -}, "Autogenerated checks."); diff --git a/third_party/polymer/components/web-animations-js/test/testcases/auto-test-iterations-fill.html b/third_party/polymer/components/web-animations-js/test/testcases/auto-test-iterations-fill.html deleted file mode 100644 index 99384c5..0000000 --- a/third_party/polymer/components/web-animations-js/test/testcases/auto-test-iterations-fill.html +++ /dev/null @@ -1,167 +0,0 @@ -<!-- -Copyright 2012 Google Inc. All Rights Reserved. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. ---> - -<!DOCTYPE html><meta charset="UTF-8"> -<style> -.animContainer { - position: absolute; - left: 0px; - height: 100px; -} - -.anim { - left: 0px; - width: 100px; - height: 25px; - background-color: #FAA; - position: relative; -} - -.expected { - border-right: 1px solid black; -} - -.a { - top: 0px -} - -.b { - top: 0px; -} - -.c { - top: 0px; -} - -.d { - top: 0px; -} - -#ca { - top: 50px; -} - -#cb { - top: 200px; -} - -#cc { - top: 350px; -} - - -#cd { - top: 500px; -} -</style> - -<div>Right edge of each box should align with black line at end of test.</div> - -<div class="animContainer" id="ca"> - <div style="width: 100px;" class="expected"><div class="anim a" id="a"></div> - </div> - <div style="width: 100px;" class="expected"><div class="anim b" id="b"></div> - </div> - <div style="width: 300px;" class="expected"><div class="anim c" id="c"></div> - </div> - <div style="width: 300px;" class="expected"><div class="anim d" id="d"></div> - </div> -</div> - -<div class="animContainer" id="cb"> - <div style="width: 100px;" class="expected"><div class="anim a" id="e"></div> - </div> - <div style="width: 200px;" class="expected"><div class="anim b" id="f"></div> - </div> - <div style="width: 100px;" class="expected"><div class="anim c" id="g"></div> - </div> - <div style="width: 200px;" class="expected"><div class="anim d" id="h"></div> - </div> -</div> - -<div class="animContainer" id="cc"> - <div style="width: 100px;" class="expected"><div class="anim a" id="i"></div> - </div> - <div style="width: 100px;" class="expected"><div class="anim b" id="j"></div> - </div> - <div style="width: 300px;" class="expected"><div class="anim c" id="k"></div> - </div> - <div style="width: 300px;" class="expected"><div class="anim d" id="l"></div> - </div> -</div> - -<div class="animContainer" id="cd"> - <div style="width: 100px;" class="expected"><div class="anim a" id="m"></div> - </div> - <div style="width: 200px;" class="expected"><div class="anim b" id="n"></div> - </div> - <div style="width: 100px;" class="expected"><div class="anim c" id="o"></div> - </div> - <div style="width: 200px;" class="expected"><div class="anim d" id="p"></div> - </div> -</div> - -<div style="height: 700px"></div> - -<script src="../bootstrap.js"></script> -<script> -"use strict"; - -var fills = ["none", "backwards", "forwards", "both"]; -var categories = [".a", ".b", ".c", ".d"] - -var directions = ["normal", "reverse", "alternate", "alternate-reverse"] -var groups = []; - -for (var i = 0; i < directions.length; i++) { - var dir = directions[i]; - groups.push(new AnimationGroup([], { - delay: 1 * 1000, - duration: 8 * 1000, - iterations: 3, - playbackRate: 2, - direction: dir, - fill: 'forwards', - })); -} - -function sampleFunc(timeFraction, target, animation) { - target.innerHTML = Math.floor(timeFraction * 1000) / 1000 + " : " + animation.currentIteration; -} - -for (var i = 0; i < fills.length; i++) { - var divs = document.querySelectorAll(categories[i]); - for (var j = 0; j < divs.length; j++) { - groups[j].append(new Animation(divs[j], [{left: "100px"}, {left: "200px"}], { - delay: 1 * 1000, - duration: 1 * 1000, - iterations: 2, - fill: fills[i], - playbackRate: 0.8 - })); - groups[j].append(new Animation(divs[j], sampleFunc, { - delay: 1 * 1000, - duration: 1 * 1000, - iterations: 2, - fill: fills[i], - playbackRate: 0.8 - })); - } -} -for (var j = 0; j < divs.length; j++) { - document.timeline.play(groups[j]); -} -</script> diff --git a/third_party/polymer/components/web-animations-js/test/testcases/auto-test-keyframe-creation-checks.js b/third_party/polymer/components/web-animations-js/test/testcases/auto-test-keyframe-creation-checks.js deleted file mode 100644 index 29ca6f4..0000000 --- a/third_party/polymer/components/web-animations-js/test/testcases/auto-test-keyframe-creation-checks.js +++ /dev/null @@ -1,67 +0,0 @@ -timing_test(function() { - at(0 * 1000, function() { - assert_styles( - '.anim', - [{'left':'50px'}, - {'left':'50px'}, - {'left':'100px'}, - {'left':'50px'}, - {'left':'100px'}, - {'left':'200px'}, - {'left':'200px'}]); - }, "Autogenerated"); - at(0.4 * 1000, function() { - assert_styles( - '.anim', - [{'left':'50px'}, - {'left':'50px'}, - {'left':'120px'}, - {'left':'80px'}, - {'left':'120px'}, - {'left':'120px'}, - {'left':'360px'}]); - }, "Autogenerated"); - at(0.8 * 1000, function() { - assert_styles( - '.anim', - [{'left':'50px'}, - {'left':'50px'}, - {'left':'140px'}, - {'left':'110px'}, - {'left':'140px'}, - {'left':'120px'}, - {'left':'340px'}]); - }, "Autogenerated"); - at(1.2000000000000002 * 1000, function() { - assert_styles( - '.anim', - [{'left':'120px'}, - {'left':'80px'}, - {'left':'160px'}, - {'left':'140px'}, - {'left':'160px'}, - {'left':'146.6666717529297px'}, - {'left':'340px'}]); - }, "Autogenerated"); - at(1.6 * 1000, function() { - assert_styles( - '.anim', - [{'left':'160px'}, - {'left':'140px'}, - {'left':'180px'}, - {'left':'170px'}, - {'left':'180px'}, - {'left':'173.3333282470703px'}, - {'left':'360px'}]); - }, "Autogenerated"); - at(2 * 1000, function() { - assert_styles( - '.anim', - {'left':'200px'}); - }, "Autogenerated"); - at(2.4 * 1000, function() { - assert_styles( - '.anim', - {'left':'200px'}); - }, "Autogenerated"); -}, "Autogenerated checks."); diff --git a/third_party/polymer/components/web-animations-js/test/testcases/auto-test-keyframe-creation.html b/third_party/polymer/components/web-animations-js/test/testcases/auto-test-keyframe-creation.html deleted file mode 100644 index 831343e..0000000 --- a/third_party/polymer/components/web-animations-js/test/testcases/auto-test-keyframe-creation.html +++ /dev/null @@ -1,109 +0,0 @@ -<!-- -Copyright 2012 Google Inc. All Rights Reserved. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. ---> - -<!DOCTYPE html><meta charset="UTF-8"> -<style> -.anim { - left: 50px; - width: 100px; - height: 100px; - background-color: lightsteelblue; - position: absolute; -} - -#a { - top: 0px -} - -#b { - top: 100px; -} - -#c { - top: 200px -} - -#d { - top: 300px; -} - -#e { - top: 400px; -} - -#f { - top: 500px; -} - -#g { - top: 600px; - left: 200px; -} - -#expectation { - position: absolute; - top: 0px; - left: 200px; - width: 100px; - height: 700px; - background: red; -} -</style> - -<div id=expectation></div> - -<div> - <div id="a" class="anim"></div> - <div id="b" class="anim"></div> - <div id="c" class="anim"></div> - <div id="d" class="anim"></div> - <div id="e" class="anim"></div> - <div id="f" class="anim"></div> - <div id="g" class="anim"></div> -</div> - -<div style="height: 750px"></div> - -<script src="../bootstrap.js"></script> -<script> -"use strict"; - -var dt = document.timeline; - -dt.play(new Animation(document.querySelector("#a"), - [{left: "100px"}, {left: "200px"}], {delay: 1 * 1000, duration: 1 * 1000, fill: 'forwards'})); -dt.play(new Animation(document.querySelector("#b"), {left: "200px"}, - {delay: 1 * 1000, duration: 1 * 1000, fill: 'forwards'})); -dt.play(new Animation(document.querySelector("#c"), - [{left: "100px"}, {left: "200px"}], {duration: 2 * 1000, fill: 'forwards'})); -dt.play(new Animation(document.querySelector("#d"), {left: "200px"}, - {duration: 2 * 1000, fill: 'forwards'})); -dt.play(new Animation(document.querySelector("#e"), [ - {offset: 0, left: "100px"}, - {offset: 1, left: "200px"}, -], {duration: 2 * 1000, fill: 'forwards'})); -dt.play(new Animation(document.querySelector("#f"), [ - {offset: 0, left: "200px"}, - {offset: 0.25, left: "100px"}, - {offset: 1, left: "200px"} -], {duration: 2 * 1000, fill: 'forwards'})); -dt.play(new Animation(document.querySelector("#g"), new KeyframeEffect([ - {offset: 0.25, left: "200px"}, - {offset: 0.5, left: "100px"}, - {offset: 0.75, left: "200px"} -], "add"), {duration: 2 * 1000, fill: 'forwards'})); - -</script> diff --git a/third_party/polymer/components/web-animations-js/test/testcases/auto-test-keyframe-easing-checks.js b/third_party/polymer/components/web-animations-js/test/testcases/auto-test-keyframe-easing-checks.js deleted file mode 100644 index ed27dc6..0000000 --- a/third_party/polymer/components/web-animations-js/test/testcases/auto-test-keyframe-easing-checks.js +++ /dev/null @@ -1,65 +0,0 @@ -timing_test(function() { - at(0 * 1000, function() { - assert_styles("#target",{'height':'0px'}); - }); - at(0.25 * 1000, function() { - assert_styles("#target",{'height':'12.5px'}); - }); - at(0.5 * 1000, function() { - assert_styles("#target",{'height':'25px'}); - }); - at(0.75 * 1000, function() { - assert_styles("#target",{'height':'37.5px'}); - }); - at(1 * 1000, function() { - assert_styles("#target",{'height':'50px'}); - }); - at(1.25 * 1000, function() { - assert_styles("#target",{'height':'62.5px'}); - }); - at(1.5 * 1000, function() { - assert_styles("#target",{'height':'75px'}); - }); - at(1.75 * 1000, function() { - assert_styles("#target",{'height':'87.5px'}); - }); - at(2 * 1000, function() { - assert_styles("#target",{'height':'100px'}); - }); - at(2.25 * 1000, function() { - assert_styles("#target",{'height':'106.5px'}); - }); - at(2.5 * 1000, function() { - assert_styles("#target",{'height':'125px'}); - }); - at(2.75 * 1000, function() { - assert_styles("#target",{'height':'143.5px'}); - }); - at(3 * 1000, function() { - assert_styles("#target",{'height':'150px'}); - }); - at(3.25 * 1000, function() { - assert_styles("#target",{'height':'150px'}); - }); - at(3.5 * 1000, function() { - assert_styles("#target",{'height':'150px'}); - }); - at(3.75 * 1000, function() { - assert_styles("#target",{'height':'200px'}); - }); - at(4 * 1000, function() { - assert_styles("#target",{'height':'200px'}); - }); - at(4.25 * 1000, function() { - assert_styles("#target",{'height':'200px'}); - }); - at(4.5 * 1000, function() { - assert_styles("#target",{'height':'225px'}); - }); - at(4.75 * 1000, function() { - assert_styles("#target",{'height':'225px'}); - }); - at(5 * 1000, function() { - assert_styles("#target",{'height':'250px'}); - }); -}, "Auto generated tests"); diff --git a/third_party/polymer/components/web-animations-js/test/testcases/auto-test-keyframe-easing.html b/third_party/polymer/components/web-animations-js/test/testcases/auto-test-keyframe-easing.html deleted file mode 100644 index 005d9cc..0000000 --- a/third_party/polymer/components/web-animations-js/test/testcases/auto-test-keyframe-easing.html +++ /dev/null @@ -1,64 +0,0 @@ -<style> -#container { - position: relative; -} - -#control { - position: absolute; - background-color: black; - width: 20px; - height: 0px; -} - -#target { - position: absolute; - left: 20px; - background-color: rgba(0, 128, 0, 0.25); - width: 280px; - height: 0px; -} - -.block { - padding-left: 30px; - border-bottom: 1px solid black; - box-sizing: border-box; - width: 300px; - height: 50px; - font-size: 20px; -} -</style> - -<div id="container"> - <div id="control"></div> - <div id="target"></div> -</div> -<script src="../bootstrap.js"></script> -<script> -var easings = [ - '', - 'linear', - 'ease-in-out', - 'step-middle', - 'steps(4, end)', -]; - -var keyframeHeight = 50; -var timing = {duration: easings.length * 1000, fill: 'forwards'}; - -control.animate({height: easings.length * keyframeHeight + 'px'}, timing); - -var keyframes = []; -easings.forEach(function (easing, i) { - var textBlock = document.createElement('div'); - textBlock.textContent = easing.length ? easing : '<default>'; - textBlock.classList.add('block'); - container.appendChild(textBlock); - var keyframe = {height: i * keyframeHeight + 'px'}; - if (easing.length) { - keyframe.easing = easing; - } - keyframes.push(keyframe); -}); -keyframes.push({height: easings.length * keyframeHeight + 'px'}); -target.animate(keyframes, timing); -</script> diff --git a/third_party/polymer/components/web-animations-js/test/testcases/auto-test-length-units-checks.js b/third_party/polymer/components/web-animations-js/test/testcases/auto-test-length-units-checks.js deleted file mode 100644 index eabad36..0000000 --- a/third_party/polymer/components/web-animations-js/test/testcases/auto-test-length-units-checks.js +++ /dev/null @@ -1,342 +0,0 @@ -timing_test(function() { - at(0 * 1000, function() { - assert_styles( - '.anim', - [{'width':'160px'}, - {'width':'50px'}, - {'width':'80px'}, - {'width':'94.484375px'}, - {'width':'75.578125px'}, - {'width':'192px'}, - {'width':'66.65625px'}, - {'width':'80px'}, - {'width':'160px'}, - {'width':'50px'}, - {'width':'80px'}, - {'width':'94.484375px'}, - {'width':'75.578125px'}, - {'width':'192px'}, - {'width':'66.65625px'}, - {'width':'80px'}, - {'width':'160px'}, - {'width':'50px'}, - {'width':'80px'}, - {'width':'94.484375px'}, - {'width':'75.578125px'}, - {'width':'192px'}, - {'width':'66.65625px'}, - {'width':'80px'}, - {'width':'160px'}, - {'width':'50px'}, - {'width':'80px'}, - {'width':'94.484375px'}, - {'width':'75.578125px'}, - {'width':'192px'}, - {'width':'66.65625px'}, - {'width':'80px'}, - {'width':'160px'}, - {'width':'50px'}, - {'width':'80px'}, - {'width':'94.484375px'}, - {'width':'75.578125px'}, - {'width':'192px'}, - {'width':'66.65625px'}, - {'width':'80px'}, - {'width':'160px'}, - {'width':'50px'}, - {'width':'80px'}, - {'width':'94.484375px'}, - {'width':'75.578125px'}, - {'width':'192px'}, - {'width':'66.65625px'}, - {'width':'80px'}, - {'width':'160px'}, - {'width':'50px'}, - {'width':'80px'}, - {'width':'94.484375px'}, - {'width':'75.578125px'}, - {'width':'192px'}, - {'width':'66.65625px'}, - {'width':'80px'}, - {'width':'160px'}, - {'width':'50px'}, - {'width':'80px'}, - {'width':'94.484375px'}, - {'width':'75.578125px'}, - {'width':'192px'}, - {'width':'66.65625px'}, - {'width':'80px'}]); - }, "Autogenerated"); - at(0.6 * 1000, function() { - assert_styles( - '.anim', - [{'width':'83.1875px'}, - {'width':'26px'}, - {'width':'41.59375px'}, - {'width':'49.125px'}, - {'width':'52.90625px'}, - {'width':'134.390625px'}, - {'width':'34.65625px'}, - {'width':'41.59375px'}, - {'width':'83.1875px'}, - {'width':'26px'}, - {'width':'41.59375px'}, - {'width':'49.125px'}, - {'width':'52.90625px'}, - {'width':'134.390625px'}, - {'width':'34.65625px'}, - {'width':'41.59375px'}, - {'width':'83.1875px'}, - {'width':'26px'}, - {'width':'41.59375px'}, - {'width':'49.125px'}, - {'width':'52.90625px'}, - {'width':'134.390625px'}, - {'width':'34.65625px'}, - {'width':'41.59375px'}, - {'width':'83.1875px'}, - {'width':'26px'}, - {'width':'41.59375px'}, - {'width':'49.125px'}, - {'width':'52.90625px'}, - {'width':'134.390625px'}, - {'width':'34.65625px'}, - {'width':'41.59375px'}, - {'width':'83.1875px'}, - {'width':'26px'}, - {'width':'41.59375px'}, - {'width':'49.125px'}, - {'width':'52.90625px'}, - {'width':'134.390625px'}, - {'width':'34.65625px'}, - {'width':'41.59375px'}, - {'width':'83.1875px'}, - {'width':'26px'}, - {'width':'41.59375px'}, - {'width':'49.125px'}, - {'width':'52.90625px'}, - {'width':'134.390625px'}, - {'width':'34.65625px'}, - {'width':'41.59375px'}, - {'width':'83.1875px'}, - {'width':'26px'}, - {'width':'41.59375px'}, - {'width':'49.125px'}, - {'width':'52.90625px'}, - {'width':'134.390625px'}, - {'width':'34.65625px'}, - {'width':'41.59375px'}, - {'width':'83.1875px'}, - {'width':'26px'}, - {'width':'41.59375px'}, - {'width':'49.125px'}, - {'width':'52.90625px'}, - {'width':'134.390625px'}, - {'width':'34.65625px'}, - {'width':'41.59375px'}]); - }, "Autogenerated"); - at(1.2 * 1000, function() { - assert_styles( - '.anim', - [{'width':'57.59375px'}, - {'width':'40px'}, - {'width':'44.796875px'}, - {'width':'47.109375px'}, - {'width':'62.234375px'}, - {'width':'108.796875px'}, - {'width':'42.65625px'}, - {'width':'44.796875px'}, - {'width':'35.59375px'}, - {'width':'18px'}, - {'width':'22.796875px'}, - {'width':'25.109375px'}, - {'width':'40.234375px'}, - {'width':'86.796875px'}, - {'width':'20.65625px'}, - {'width':'22.796875px'}, - {'width':'41.59375px'}, - {'width':'24px'}, - {'width':'28.796875px'}, - {'width':'31.109375px'}, - {'width':'46.234375px'}, - {'width':'92.796875px'}, - {'width':'26.65625px'}, - {'width':'28.796875px'}, - {'width':'44.484375px'}, - {'width':'26.890625px'}, - {'width':'31.6875px'}, - {'width':'34.015625px'}, - {'width':'49.125px'}, - {'width':'95.6875px'}, - {'width':'29.5625px'}, - {'width':'31.6875px'}, - {'width':'40.703125px'}, - {'width':'23.109375px'}, - {'width':'27.90625px'}, - {'width':'30.234375px'}, - {'width':'45.34375px'}, - {'width':'91.90625px'}, - {'width':'25.78125px'}, - {'width':'27.90625px'}, - {'width':'64px'}, - {'width':'46.390625px'}, - {'width':'51.1875px'}, - {'width':'53.515625px'}, - {'width':'68.625px'}, - {'width':'115.1875px'}, - {'width':'49.0625px'}, - {'width':'51.1875px'}, - {'width':'38.921875px'}, - {'width':'21.328125px'}, - {'width':'26.125px'}, - {'width':'28.4375px'}, - {'width':'43.5625px'}, - {'width':'90.125px'}, - {'width':'24px'}, - {'width':'26.125px'}, - {'width':'41.59375px'}, - {'width':'24px'}, - {'width':'28.796875px'}, - {'width':'31.109375px'}, - {'width':'46.234375px'}, - {'width':'92.796875px'}, - {'width':'26.65625px'}, - {'width':'28.796875px'}]); - }, "Autogenerated"); - at(1.7999999999999998 * 1000, function() { - assert_styles( - '.anim', - [{'width':'134.390625px'}, - {'width':'130px'}, - {'width':'131.1875px'}, - {'width':'131.765625px'}, - {'width':'135.546875px'}, - {'width':'147.1875px'}, - {'width':'130.65625px'}, - {'width':'131.1875px'}, - {'width':'46.390625px'}, - {'width':'42px'}, - {'width':'43.1875px'}, - {'width':'43.765625px'}, - {'width':'47.546875px'}, - {'width':'59.1875px'}, - {'width':'42.65625px'}, - {'width':'43.1875px'}, - {'width':'70.390625px'}, - {'width':'66px'}, - {'width':'67.1875px'}, - {'width':'67.765625px'}, - {'width':'71.546875px'}, - {'width':'83.1875px'}, - {'width':'66.65625px'}, - {'width':'67.1875px'}, - {'width':'81.984375px'}, - {'width':'77.578125px'}, - {'width':'78.78125px'}, - {'width':'79.359375px'}, - {'width':'83.140625px'}, - {'width':'94.78125px'}, - {'width':'78.25px'}, - {'width':'78.78125px'}, - {'width':'66.859375px'}, - {'width':'62.46875px'}, - {'width':'63.671875px'}, - {'width':'64.25px'}, - {'width':'68.03125px'}, - {'width':'79.671875px'}, - {'width':'63.125px'}, - {'width':'63.671875px'}, - {'width':'160px'}, - {'width':'155.59375px'}, - {'width':'156.796875px'}, - {'width':'157.375px'}, - {'width':'161.15625px'}, - {'width':'172.796875px'}, - {'width':'156.265625px'}, - {'width':'156.796875px'}, - {'width':'59.71875px'}, - {'width':'55.328125px'}, - {'width':'56.53125px'}, - {'width':'57.109375px'}, - {'width':'60.890625px'}, - {'width':'72.53125px'}, - {'width':'56px'}, - {'width':'56.53125px'}, - {'width':'70.390625px'}, - {'width':'66px'}, - {'width':'67.1875px'}, - {'width':'67.765625px'}, - {'width':'71.546875px'}, - {'width':'83.1875px'}, - {'width':'66.65625px'}, - {'width':'67.1875px'}]); - }, "Autogenerated"); - at(2.4 * 1000, function() { - assert_styles( - '.anim', - [{'width':'160px'}, - {'width':'160px'}, - {'width':'160px'}, - {'width':'160px'}, - {'width':'160px'}, - {'width':'160px'}, - {'width':'160px'}, - {'width':'160px'}, - {'width':'50px'}, - {'width':'50px'}, - {'width':'50px'}, - {'width':'50px'}, - {'width':'50px'}, - {'width':'50px'}, - {'width':'50px'}, - {'width':'50px'}, - {'width':'80px'}, - {'width':'80px'}, - {'width':'80px'}, - {'width':'80px'}, - {'width':'80px'}, - {'width':'80px'}, - {'width':'80px'}, - {'width':'80px'}, - {'width':'94.484375px'}, - {'width':'94.484375px'}, - {'width':'94.484375px'}, - {'width':'94.484375px'}, - {'width':'94.484375px'}, - {'width':'94.484375px'}, - {'width':'94.484375px'}, - {'width':'94.484375px'}, - {'width':'75.578125px'}, - {'width':'75.578125px'}, - {'width':'75.578125px'}, - {'width':'75.578125px'}, - {'width':'75.578125px'}, - {'width':'75.578125px'}, - {'width':'75.578125px'}, - {'width':'75.578125px'}, - {'width':'192px'}, - {'width':'192px'}, - {'width':'192px'}, - {'width':'192px'}, - {'width':'192px'}, - {'width':'192px'}, - {'width':'192px'}, - {'width':'192px'}, - {'width':'66.65625px'}, - {'width':'66.65625px'}, - {'width':'66.65625px'}, - {'width':'66.65625px'}, - {'width':'66.65625px'}, - {'width':'66.65625px'}, - {'width':'66.65625px'}, - {'width':'66.65625px'}, - {'width':'80px'}, - {'width':'80px'}, - {'width':'80px'}, - {'width':'80px'}, - {'width':'80px'}, - {'width':'80px'}, - {'width':'80px'}, - {'width':'80px'}]); - }, "Autogenerated"); -}, "Autogenerated checks."); diff --git a/third_party/polymer/components/web-animations-js/test/testcases/auto-test-length-units.html b/third_party/polymer/components/web-animations-js/test/testcases/auto-test-length-units.html deleted file mode 100644 index 574d6d1..0000000 --- a/third_party/polymer/components/web-animations-js/test/testcases/auto-test-length-units.html +++ /dev/null @@ -1,103 +0,0 @@ -<!-- -Copyright 2012 Google Inc. All Rights Reserved. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. ---> - -<!DOCTYPE html><meta charset="UTF-8"> -<style> -.anim { - fill: lightsteelblue; - background-color: lightsteelblue; - height: 50px; - position: absolute; -} - -.expectation { - background-color: red; - position: absolute; - left: 0px; - height: 50px; -} - -.container { - position: relative; - width: 2in; - height: 50px; -} - -#test { - font-size: 2rem; -} - -</style> - -Each cell in the table will start at the first value for the column (e.g. 5em, -5ex, 50px, etc.), then animate to the second value for the column (e.g. 1em, -1ex, etc.), then animate to the 'to' value for the row. - -<table id="test"></table> - -<script> -var expected_failures = [ - { - browser_configurations: [ - { firefox: true }, - { msie: true }, - ], - tests: ['Autogenerated'], - message: 'Floating point issues.', - } -]; -</script> -<script src="../bootstrap.js"></script> -<script> -"use strict"; - - -// ex is font specific and there is no common webfont found on *all* browsers -// (including mobile). -var from = ["1em", "10px", "1rem", "5mm", "1cm", "1in", "10pt", "1pc"]; -var to = ["5em", "50px", "5rem", "25mm", "2cm", "2in", "50pt", "5pc"]; - -var table = "<tr><td>from -><br>to v</td>" -for (var i = 0; i < from.length; i++) { - table += "<td>" + to[i] + "<br>" + from[i] + "</td>"; -} -table += "</tr>" - -var anims = {} - -for (var j = 0; j < to.length; j++) { - var toVal = to[j]; - table += "<tr><td>" + toVal + "</td>"; - for (var i = 0; i < from.length; i++) { - var fromVal = from[i]; - var id = 'a' + toVal + fromVal; - table += - "<td><div class='container'><div class='expectation' style='width: " + - toVal + "'</div><div id="+id+" class='anim'></div></div></td>"; - anims['#' + id] = [{width: to[i]}, {width: fromVal}, {width: toVal}]; - } - table += "</tr>" -} - -document.querySelector("table").innerHTML = table; -</script> -<script> -"use strict"; -for (var id in anims) { - document.timeline.play( - new Animation(document.querySelector(id), anims[id], {duration: 2 * 1000, fill: 'forwards'})); -} -</script> diff --git a/third_party/polymer/components/web-animations-js/test/testcases/auto-test-matrix-transforms-checks.js b/third_party/polymer/components/web-animations-js/test/testcases/auto-test-matrix-transforms-checks.js deleted file mode 100644 index 0561c78..0000000 --- a/third_party/polymer/components/web-animations-js/test/testcases/auto-test-matrix-transforms-checks.js +++ /dev/null @@ -1,56 +0,0 @@ -timing_test(function() { - at(0 * 1000, function() { - assert_styles(".anim", [ - {'transform':'none'}, - {'transform':'matrix(0.5, 0, 0, 0.5, 0, 0)'}, - {'transform':'matrix(0.7071, 0.7071, -0.7071, 0.7071, 0, 0)'}, - {'transform':'matrix(0.7071, 0.7071, -0.7071, 0.7071, 70.7107, 70.7107)'}, - {'transform':'matrix(1.4142, 1.4142, -1.4142, 1.4142, 141.4214, 141.4214)'}, - ]); - }); - at(0.4 * 1000, function() { - assert_styles(".anim", [ - {'transform':'matrix(1, 0, 0, 1, 20, 0)'}, - {'transform':'matrix(0.6, 0, 0, 0.6, 20, 0)'}, - {'transform':'matrix(0.809, 0.5878, -0.5878, 0.809, 20, 0)'}, - {'transform':'matrix(0.7071, 0.7071, -0.7071, 0.7071, 76.5685, 56.5685)'}, - {'transform':'matrix(1.3023, 1.0927, -1.0927, 1.3023, 133.1371, 113.1371)'}, - ]); - }); - at(0.8 * 1000, function() { - assert_styles(".anim", [ - {'transform':'matrix(1, 0, 0, 1, 40, 0)'}, - {'transform':'matrix(0.7, 0, 0, 0.7, 40, 0)'}, - {'transform':'matrix(0.891, 0.454, -0.454, 0.891, 40, 0)'}, - {'transform':'matrix(0.7071, 0.7071, -0.7071, 0.7071, 82.4264, 42.4264)'}, - {'transform':'matrix(1.1468, 0.803, -0.803, 1.1468, 124.8528, 84.8528)'}, - ]); - }); - at(1.2000000000000002 * 1000, function() { - assert_styles(".anim", [ - {'transform':'matrix(1, 0, 0, 1, 60, 0)'}, - {'transform':'matrix(0.8, 0, 0, 0.8, 60, 0)'}, - {'transform':'matrix(0.9511, 0.309, -0.309, 0.9511, 60, 0)'}, - {'transform':'matrix(0.7071, 0.7071, -0.7071, 0.7071, 88.2843, 28.2843)'}, - {'transform':'matrix(0.9526, 0.55, -0.55, 0.9526, 116.5685, 56.5685)'}, - ]); - }); - at(1.6 * 1000, function() { - assert_styles(".anim", [ - {'transform':'matrix(1, 0, 0, 1, 80, 0)'}, - {'transform':'matrix(0.9, 0, 0, 0.9, 80, 0)'}, - {'transform':'matrix(0.9877, 0.1564, -0.1564, 0.9877, 80, 0)'}, - {'transform':'matrix(0.7071, 0.7071, -0.7071, 0.7071, 94.1421, 14.1421)'}, - {'transform':'matrix(0.725, 0.3381, -0.3381, 0.725, 108.2843, 28.2843)'}, - ]); - }); - at(2 * 1000, function() { - assert_styles(".anim", [ - {'transform':'matrix(1, 0, 0, 1, 100, 0)'}, - {'transform':'matrix(1, 0, 0, 1, 100, 0)'}, - {'transform':'matrix(1, 0, 0, 1, 100, 0)'}, - {'transform':'matrix(0.7071067811865476, 0.7071067811865475, -0.7071067811865475, 0.7071067811865476, 100, 0)'}, - {'transform':'matrix(0.4698463103929542, 0.17101007166283436, -0.17101007166283436, 0.4698463103929542, 100, 0)'}, - ]); - }); -}, "Auto generated tests"); diff --git a/third_party/polymer/components/web-animations-js/test/testcases/auto-test-matrix-transforms.html b/third_party/polymer/components/web-animations-js/test/testcases/auto-test-matrix-transforms.html deleted file mode 100644 index 4034693..0000000 --- a/third_party/polymer/components/web-animations-js/test/testcases/auto-test-matrix-transforms.html +++ /dev/null @@ -1,90 +0,0 @@ -<!-- -Copyright 2012 Google Inc. All Rights Reserved. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. ---> - -<!DOCTYPE html><meta charset="UTF-8"> -<style> -.anim { - background-color: lightsteelblue; - position: absolute; - width: 100px; - height: 100px; - top: 0px; - left: 0px; -} - -#b { - top: 100px; - -webkit-transform: scale(0.5); - transform: scale(0.5); -} - -#c { - top: 200px; - -webkit-transform: rotate(45deg); - transform: rotate(45deg); -} - -#d { - top: 300px; - -webkit-transform: rotate(45deg) translate(100px); - transform: rotate(45deg) translate(100px); -} - -#e { - top: 400px; - -webkit-transform: scale(2) rotate(45deg) translate(100px); - transform: scale(2) rotate(45deg) translate(100px); -} -.expectation { - fill: red; -} -</style> -<div class="anim" id="a"></div> -<div class="anim" id="b"></div> -<div class="anim" id="c"></div> -<div class="anim" id="d"></div> -<div class="anim" id="e"></div> -<div style="height: 550px"></div> - -<script> -var expected_failures = [ - { - browser_configurations: [{ msie: true }], - tests: ['Auto generated tests at t=((?!(4|8|1200.0+1|16|2))[0-9.]+)ms'], - message: 'Getting weird numbers.', - } -]; -</script> -<script src="../bootstrap.js"></script> -<script> -"use strict"; -var a = document.querySelector("#a") -var b = document.querySelector("#b") -var c = document.querySelector("#c") -var d = document.querySelector("#d") -var e = document.querySelector("#e") - -var dt = document.timeline; - -var timing = {duration: 2 * 1000, fill: 'forwards'}; - -dt.play(new Animation(a, {transform: "translate(100px)"}, timing)); -dt.play(new Animation(b, {transform: "translate(100px)"}, timing)); -dt.play(new Animation(c, {transform: "translate(100px)"}, timing)); -dt.play(new Animation(d, {transform: "translate(100px) rotate(45deg)"}, timing)); -dt.play(new Animation(e, - {transform: "translate(100px) rotate(20deg) scale(0.5)"}, timing)); -</script> diff --git a/third_party/polymer/components/web-animations-js/test/testcases/auto-test-motion-path-checks.js b/third_party/polymer/components/web-animations-js/test/testcases/auto-test-motion-path-checks.js deleted file mode 100644 index 1912689..0000000 --- a/third_party/polymer/components/web-animations-js/test/testcases/auto-test-motion-path-checks.js +++ /dev/null @@ -1,110 +0,0 @@ -timing_test(function() { - at(0 * 1000, function() { - assert_styles("#animTR", {'transform':'matrix(0.9701425001453319, 0.24253562503633294, -0.24253562503633294, 0.9701425001453319, 387.5, 87.5)'}); - }, "Check #animTR at t=0ms"); - at(0 * 1000, function() { - assert_styles("#animBL", {'transform':'matrix(0.315770091409682, 0.9488357336078364, -0.9488357336078364, 0.315770091409682, 87.5, 287.5)'}); - }, "Check #animBL at t=0ms"); - at(0 * 1000, function() { - assert_styles("#animBR", {'transform':'matrix(0.7992672511833444, 0.6009757575691558, -0.6009757575691558, 0.7992672511833444, 387.5, 287.5)'}); - }, "Check #animBR at t=0ms"); - at(1 * 1000, function() { - assert_styles("#animTR", {'transform':'matrix(0.9701425001453319, 0.24253562503633294, -0.24253562503633294, 0.9701425001453319, 387.5, 87.5)'}); - }, "Check #animTR at t=1000ms"); - at(1 * 1000, function() { - assert_styles("#animBL", {'transform':'matrix(0.00000000000000006123031769111886, -1, 1, 0.00000000000000006123031769111886, 87.5, 237.5)'}); - }, "Check #animBL at t=1000ms"); - at(1 * 1000, function() { - assert_styles("#animBR", {'transform':'matrix(0.00000000000000006123031769111886, -1, 1, 0.00000000000000006123031769111886, 387.5, 237.5)'}); - }, "Check #animBR at t=1000ms"); - at(2 * 1000, function() { - assert_styles("#animTR", {'transform':'matrix(0.9701425001453319, 0.24253562503633294, -0.24253562503633294, 0.9701425001453319, 387.5, 87.5)'}); - }, "Check #animTR at t=2000ms"); - at(2 * 1000, function() { - assert_styles("#animBL", {'transform':'matrix(1, 0, 0, 1, 137.5, 237.5)'}); - }, "Check #animBL at t=2000ms"); - at(2 * 1000, function() { - assert_styles("#animBR", {'transform':'matrix(1, 0, 0, 1, 437.5, 237.5)'}); - }, "Check #animBR at t=2000ms"); - at(3 * 1000, function() { - assert_styles("#animTR", {'transform':'matrix(0.00000000000000006123031769111886, -1, 1, 0.00000000000000006123031769111886, 387.5, 62.5)'}); - }, "Check #animTR at t=3000ms"); - at(3 * 1000, function() { - assert_styles("#animBL", {'transform':'matrix(1, 0, 0, 1, 187.5, 237.5)'}); - }, "Check #animBL at t=3000ms"); - at(3 * 1000, function() { - assert_styles("#animBR", {'transform':'matrix(1, 0, 0, 1, 487.5, 237.5)'}); - }, "Check #animBR at t=3000ms"); - at(4 * 1000, function() { - assert_styles("#animTR", {'transform':'matrix(0.00000000000000006123031769111886, -1, 1, 0.00000000000000006123031769111886, 387.5, 37.5)'}); - }, "Check #animTR at t=4000ms"); - at(4 * 1000, function() { - assert_styles("#animBL", {'transform':'matrix(0.5753043900207572, 0.8179393980135964, -0.8179393980135964, 0.5753043900207572, 216.27749633789063, 278.3883361816406)'}); - }, "Check #animBL at t=4000ms"); - at(4 * 1000, function() { - assert_styles("#animBR", {'transform':'matrix(0.309, -0.9511, 0.9511, 0.309, 387.5, 287.5)'}); - }, "Check #animBR at t=4000ms"); - at(5 * 1000, function() { - assert_styles("#animTR", {'transform':'matrix(1, 0, 0, 1, 437.5, 37.5)'}); - }, "Check #animTR at t=5000ms"); - at(5 * 1000, function() { - assert_styles("#animBL", {'transform':'matrix(0.5742821086196931, 0.818657473989775, -0.818657473989775, 0.5742821086196931, 245.05499267578125, 319.27667236328125)'}); - }, "Check #animBL at t=5000ms"); - at(5 * 1000, function() { - assert_styles("#animBR", {'transform':'matrix(0, -1, 1, 0, 387.5, 287.5)'}); - }, "Check #animBR at t=5000ms"); - at(6 * 1000, function() { - assert_styles("#animTR", {'transform':'matrix(1, 0, 0, 1, 487.5, 37.5)'}); - }, "Check #animTR at t=6000ms"); - at(6 * 1000, function() { - assert_styles("#animBL", {'transform':'matrix(0.5763239825284185, 0.8172213085588157, -0.8172213085588157, 0.5763239825284185, 273.8324890136719, 360.1650085449219)'}); - }, "Check #animBL at t=6000ms"); - at(6 * 1000, function() { - assert_styles("#animBR", {'transform':'matrix(-0.309, -0.9511, 0.9511, -0.309, 387.5, 287.5)'}); - }, "Check #animBR at t=6000ms"); - at(7 * 1000, function() { - assert_styles("#animTR", {'transform':'matrix(0.5742821086196931, 0.818657473989775, -0.818657473989775, 0.5742821086196931, 530.666259765625, 98.83250427246094)'}); - }, "Check #animTR at t=7000ms"); - at(7 * 1000, function() { - assert_styles("#animBL", {'transform':'matrix(-0.9318041877673755, -0.36296136937583534, 0.36296136937583534, -0.9318041877673755, 227.24935913085938, 341.998779296875)'}); - }, "Check #animBL at t=7000ms"); - at(7 * 1000, function() { - assert_styles("#animBR", {'transform':'matrix(-0.931197578528315, -0.3645148415949653, 0.3645148415949653, -0.931197578528315, 527.2493896484375, 341.998779296875)'}); - }, "Check #animBR at t=7000ms"); - at(8 * 1000, function() { - assert_styles("#animTR", {'transform':'matrix(0.5742821086196931, 0.818657473989775, -0.818657473989775, 0.5742821086196931, 573.83251953125, 160.16500854492188)'}); - }, "Check #animTR at t=8000ms"); - at(8 * 1000, function() { - assert_styles("#animBL", {'transform':'matrix(-0.932004671541296, -0.36244626115494827, 0.36244626115494827, -0.932004671541296, 180.66622924804688, 323.83251953125)'}); - }, "Check #animBL at t=8000ms"); - at(8 * 1000, function() { - assert_styles("#animBR", {'transform':'matrix(-0.932004671541296, -0.36244626115494827, 0.36244626115494827, -0.932004671541296, 480.6662292480469, 323.83251953125)'}); - }, "Check #animBR at t=8000ms"); - at(9 * 1000, function() { - assert_styles("#animTR", {'transform':'matrix(-0.932004671541296, -0.36244626115494827, 0.36244626115494827, -0.932004671541296, 480.6662292480469, 123.83251953125)'}); - }, "Check #animTR at t=9000ms"); - at(9 * 1000, function() { - assert_styles("#animBL", {'transform':'matrix(-0.9318041877673755, -0.36296136937583534, 0.36296136937583534, -0.9318041877673755, 134.08311462402344, 305.666259765625)'}); - }, "Check #animBL at t=9000ms"); - at(9 * 1000, function() { - assert_styles("#animBR", {'transform':'matrix(-0.9316028474785737, -0.3634778322949191, 0.3634778322949191, -0.9316028474785737, 434.0831298828125, 305.666259765625)'}); - }, "Check #animBR at t=9000ms"); - at(10 * 1000, function() { - assert_styles("#animTR", {'transform':'matrix(0.9701425001453319, 0.24253562503633294, -0.24253562503633294, 0.9701425001453319, 387.5, 87.5)'}); - }, "Check #animTR at t=10000ms"); - at(10 * 1000, function() { - assert_styles("#animBL", {'transform':'matrix(0.315770091409682, 0.9488357336078364, -0.9488357336078364, 0.315770091409682, 87.5, 287.5)'}); - }, "Check #animBL at t=10000ms"); - at(10 * 1000, function() { - assert_styles("#animBR", {'transform':'matrix(0.7992672511833444, 0.6009757575691558, -0.6009757575691558, 0.7992672511833444, 387.5, 287.5)'}); - }, "Check #animBR at t=10000ms"); - at(11 * 1000, function() { - assert_styles("#animTR", {'transform':'matrix(0.9701425001453319, 0.24253562503633294, -0.24253562503633294, 0.9701425001453319, 387.5, 87.5)'}); - }, "Check #animTR at t=11000ms"); - at(11 * 1000, function() { - assert_styles("#animBL", {'transform':'matrix(0.00000000000000006123031769111886, -1, 1, 0.00000000000000006123031769111886, 87.5, 237.5)'}); - }, "Check #animBL at t=11000ms"); - at(11 * 1000, function() { - assert_styles("#animBR", {'transform':'matrix(0.00000000000000006123031769111886, -1, 1, 0.00000000000000006123031769111886, 387.5, 237.5)'}); - }, "Check #animBR at t=11000ms"); -}, "Autogenerated checks."); diff --git a/third_party/polymer/components/web-animations-js/test/testcases/auto-test-motion-path.html b/third_party/polymer/components/web-animations-js/test/testcases/auto-test-motion-path.html deleted file mode 100644 index 8110309..0000000 --- a/third_party/polymer/components/web-animations-js/test/testcases/auto-test-motion-path.html +++ /dev/null @@ -1,133 +0,0 @@ -<!-- -Copyright 2012 Google Inc. All Rights Reserved. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. ---> - -<!DOCTYPE html><meta charset="UTF-8"> -<style> -.animation { - position: absolute; - width: 25px; - height: 25px; - top: 0px; - left: 0px; - background: lightsteelblue; -} -.expectation { - background: red; - position: absolute; - width: 25px; - height: 25px; - top: 0px; - left: 0px; -} -#eTR { - -webkit-transform: translate(387.5px, 87.5px); - transform: translate(387.5px, 87.5px); -} -#eBL { - -webkit-transform: translate(87.5px, 287.5px); - transform: translate(87.5px, 287.5px); -} -#eBR, #animBR { - -webkit-transform: translate(387.5px, 287.5px); - transform: translate(387.5px, 287.5px); -} -svg { -position:absolute; -top: 0px; -left: 0px; -width: 800px; -height: 600px; -} -</style> - -<svg xmlns="http://www.w3.org/2000/svg" version="1.1"> - <path id=pathTR d="M400,100l0,0l0,-50l100,0l86.3325,122.665z" /> - <path d="M400,100l0,0l0,-50l100,0l86.3325,122.665z" stroke="black" - stroke-width="1" fill="none" /> - <path id=pathBL d="M100,300l0,0l0,-50l100,0l86.3325,122.665z" /> - <path d="M100,300l0,0l0,-50l100,0l86.3325,122.665z" stroke="black" - stroke-width="1" fill="none" /> - <path id=pathBR d="M400,300l0,0l0,-50l100,0l86.3325,122.665z" /> - <path d="M400,300l0,0l0,-50l100,0l86.3325,122.665z" stroke="black" - stroke-width="1" fill="none" /> -</svg> - -<div id="eTR" class="expectation"></div> -<div id="animTR" class="animation">→</div> -<div id="eBL" class="expectation"></div> -<div id="animBL" class="animation">→</div> -<div id="eBR" class="expectation"></div> -<div id="animBR" class="animation">→</div> - -<script> -var expected_failures = [ - { - browser_configurations: [{ firefox: true }], - tests: [ - '#animTR at t=(0|(1|2|10|11)000)ms', - '#animBL at t=(0|(7|8|10)000)ms', - '#animBR at t=(0|10000)ms', - ], - message: 'Doesn\'t quite follow path correctly.', - }, { - browser_configurations: [{ firefox: true, version: '29|30|31' }], - tests: [ - '#animTR at t=9000ms', - '#animBL at t=5000ms', - '#animBR at t=(3|8|9)000ms', - ], - message: 'Doesn\'t quite follow path correctly.', - }, { - browser_configurations: [{ msie: true }], - tests: [ - '#animTR at t=(0|(1|2|3|4|9|10|11)000)ms', - '#animBL at t=(0|(1|3|4|7|8|10|11)000)ms', - '#animBR at t=(0|(1|3|9|10|11)000)ms', - ], - message: 'Doesn\'t quite follow path correctly.', - } -]; -</script> -<script src="../bootstrap.js"></script> -<script> -"use strict"; - -var animFuncTR = new MotionPathEffect( - document.querySelector('#pathTR').pathSegList, 'auto-rotate'); -document.timeline.play(new Animation(document.querySelector("#animTR"), - animFuncTR, {duration: 10 * 1000, iterations: 2})); - -var animFuncBL = new MotionPathEffect( - document.querySelector('#pathBL').pathSegList, 'auto-rotate'); -document.timeline.play(new Animation( - document.querySelector("#animBL"), animFuncBL, - {duration: 10 * 1000, iterations: 2, easing: "paced"})); - -var animFuncBRKeyFrames = new KeyframeEffect( - [{transform: "translate(387.5px, 287.5px) rotate(180deg)"}], "replace"); -var animFuncBRPath = new MotionPathEffect( - document.querySelector('#pathBR').pathSegList, 'auto-rotate'); -var animBR = new Animation(document.querySelector("#animBR"), animFuncBRPath, - {duration: 10 * 1000, iterations: 2, easing: "paced"}); -document.timeline.play(animBR); - -testharness_timeline.schedule(function() { - animBR.effect = animFuncBRKeyFrames; -}, 3000); -testharness_timeline.schedule(function() { - animBR.effect = animFuncBRPath; -}, 6000); -</script> diff --git a/third_party/polymer/components/web-animations-js/test/testcases/auto-test-non-numeric-checks.js b/third_party/polymer/components/web-animations-js/test/testcases/auto-test-non-numeric-checks.js deleted file mode 100644 index 79c992d..0000000 --- a/third_party/polymer/components/web-animations-js/test/testcases/auto-test-non-numeric-checks.js +++ /dev/null @@ -1,26 +0,0 @@ -timing_test(function() { - at(0 * 1000, function() { - assert_styles('#test', {'display':'none'}); - }, "Autogenerated"); - at(0.08 * 1000, function() { - assert_styles('#test', {'display':'block'}); - }, "Autogenerated"); - at(0.16 * 1000, function() { - assert_styles('#test', {'display':'none'}); - }, "Autogenerated"); - at(0.24 * 1000, function() { - assert_styles('#test', {'display':'block'}); - }, "Autogenerated"); - at(0.32 * 1000, function() { - assert_styles('#test', {'display':'none'}); - }, "Autogenerated"); - at(0.4 * 1000, function() { - assert_styles('#test', {'display':'block'}); - }, "Autogenerated"); - at(0.48000000000000004 * 1000, function() { - assert_styles('#test', {'display':'none'}); - }, "Autogenerated"); - at(0.56 * 1000, function() { - assert_styles('#test', {'display':'none'}); - }, "Autogenerated"); -}, "Autogenerated checks."); diff --git a/third_party/polymer/components/web-animations-js/test/testcases/auto-test-non-numeric.html b/third_party/polymer/components/web-animations-js/test/testcases/auto-test-non-numeric.html deleted file mode 100644 index ca12b2a..0000000 --- a/third_party/polymer/components/web-animations-js/test/testcases/auto-test-non-numeric.html +++ /dev/null @@ -1,42 +0,0 @@ -<!-- -Copyright 2012 Google Inc. All Rights Reserved. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. ---> - -<!DOCTYPE html><meta charset="UTF-8"> -<style> -#parent, #test { - height: 600px; -} -body { - margin: 0px; -} -</style> -<body> -<div id="parent" style='background:lightsteelblue'> - <div style='background:red' id='test'></div> -</div> -<script src="../bootstrap.js"></script> -<script> -"use strict"; -document.timeline.play(new Animation(document.querySelector('#test'), [ - {display: 'none'}, - {display: 'block'}, - {display: 'none'}, - {display: 'block'}, - {display: 'none'}, - {display: 'block'}, - {display: 'none'}, -], {duration: 0.5 * 1000, fill: 'forwards'})); -</script> diff --git a/third_party/polymer/components/web-animations-js/test/testcases/auto-test-parent-checks.js b/third_party/polymer/components/web-animations-js/test/testcases/auto-test-parent-checks.js deleted file mode 100644 index f408463..0000000 --- a/third_party/polymer/components/web-animations-js/test/testcases/auto-test-parent-checks.js +++ /dev/null @@ -1,38 +0,0 @@ -timing_test(function() { - at(0 * 1000, function() { - assert_styles('.anim', {'left':'100px'}); - }, "Autogenerated"); - at(0.5 * 1000, function() { - assert_styles('.anim', {'left':'150px'}); - }, "Autogenerated"); - at(1 * 1000, function() { - assert_styles( - '.anim', - [{'left':'200px'}, - {'left':'100px'}]); - }, "Autogenerated"); - at(1.5 * 1000, function() { - assert_styles( - '.anim', - [{'left':'200px'}, - {'left':'150px'}]); - }, "Autogenerated"); - at(2 * 1000, function() { - assert_styles( - '.anim', - [{'left':'200px'}, - {'left':'100px'}]); - }, "Autogenerated"); - at(2.5 * 1000, function() { - assert_styles( - '.anim', - [{'left':'200px'}, - {'left':'150px'}]); - }, "Autogenerated"); - at(3 * 1000, function() { - assert_styles('.anim', {'left':'200px'}); - }, "Autogenerated"); - at(3.5 * 1000, function() { - assert_styles('.anim', {'left':'200px'}); - }, "Autogenerated"); -}, "Autogenerated checks."); diff --git a/third_party/polymer/components/web-animations-js/test/testcases/auto-test-parent.html b/third_party/polymer/components/web-animations-js/test/testcases/auto-test-parent.html deleted file mode 100644 index c044441..0000000 --- a/third_party/polymer/components/web-animations-js/test/testcases/auto-test-parent.html +++ /dev/null @@ -1,52 +0,0 @@ -<!-- -Copyright 2012 Google Inc. All Rights Reserved. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. ---> - -<!DOCTYPE html><meta charset="UTF-8"> -<style> -.anim { - left: 0px; - width: 100px; - height: 25px; - background-color: #FAA; - position: relative; -} -.expect { - border-right: 1px solid black; -} - -</style> - -<div>Right edge of each box should align with black line at end of test.</div> -<div style="width: 300px;" class="expect"><div id="a" class="anim"></div></div> -<div style="width: 300px;" class="expect"><div id="c" class="anim"></div></div> - -<script src="../bootstrap.js"></script> -<script> -"use strict"; - -var effect = [{left: "100px"}, {left: "200px"}]; -var timing = {duration: 1 * 1000, fill: 'forwards'}; - -// Top level animation. -document.timeline.play(new Animation(document.getElementById("a"), - effect, timing)); - -// Animation in group. -document.timeline.play(new AnimationGroup([ - new Animation(document.getElementById("c"), effect, timing) -], {iterations: 3})); - -</script> diff --git a/third_party/polymer/components/web-animations-js/test/testcases/auto-test-partial-keyframes-checks.js b/third_party/polymer/components/web-animations-js/test/testcases/auto-test-partial-keyframes-checks.js deleted file mode 100644 index 86abfcb..0000000 --- a/third_party/polymer/components/web-animations-js/test/testcases/auto-test-partial-keyframes-checks.js +++ /dev/null @@ -1,27 +0,0 @@ -timing_test(function() { - at(0 * 1000, function() { - assert_styles( - '.anim', - [{'x':'100px','y':'300px','width':'100px'}]); - }, "Autogenerated"); - at(0.3 * 1000, function() { - assert_styles( - '.anim', - [{'x':'190px','y':'270px','width':'52px'}]); - }, "Autogenerated"); - at(0.6 * 1000, function() { - assert_styles( - '.anim', - [{'x':'280px','y':'240px','width':'26px'}]); - }, "Autogenerated"); - at(0.8999999999999999 * 1000, function() { - assert_styles( - '.anim', - [{'x':'369.99999999999994px','y':'210px','width':'44px'}]); - }, "Autogenerated"); - at(1.2 * 1000, function() { - assert_styles( - '.anim', - [{'x':'400px','y':'200px','width':'50px'}]); - }, "Autogenerated"); -}, "Autogenerated checks."); diff --git a/third_party/polymer/components/web-animations-js/test/testcases/auto-test-partial-keyframes.html b/third_party/polymer/components/web-animations-js/test/testcases/auto-test-partial-keyframes.html deleted file mode 100644 index 5695854..0000000 --- a/third_party/polymer/components/web-animations-js/test/testcases/auto-test-partial-keyframes.html +++ /dev/null @@ -1,43 +0,0 @@ -<!-- -Copyright 2012 Google Inc. All Rights Reserved. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. ---> - -<!DOCTYPE html><meta charset="UTF-8"> -<style> -.anim { - fill: lightsteelblue; -} -.expectation { - fill: red; -} -</style> -<svg width='800px' height='800px'> - <rect class="expectation" x="400px" y="200px" width="50px" height="100px"> - </rect> - <rect class="anim" x="100px" y="10px" width="100px" height="100px"> - </rect> -</svg> -<script src="../bootstrap.js"></script> -<script> -"use strict"; -var rect = document.querySelector(".anim"); - -document.timeline.play(new Animation(rect, [ - {y: "300px", width: "100px"}, - {width: "20px"}, - {x: "400px", y: "200px", width: "50px"}, -], {duration: 1 * 1000, fill: 'forwards'})); - -</script> diff --git a/third_party/polymer/components/web-animations-js/test/testcases/auto-test-path-checks.js b/third_party/polymer/components/web-animations-js/test/testcases/auto-test-path-checks.js deleted file mode 100644 index b646b32..0000000 --- a/third_party/polymer/components/web-animations-js/test/testcases/auto-test-path-checks.js +++ /dev/null @@ -1,20 +0,0 @@ -timing_test(function() { - at(0, function() { - assert_styles(".target",{'d':'M10,10v100l100,-50z'}); - }); - at(200, function() { - assert_styles(".target",{'d':'M48,10L48,94.72L52.72,110L112.2,87.89L148,57.64L125.9,38.94L48,10'}); - }); - at(400, function() { - assert_styles(".target",{'d':'M86,10L86,98.54L95.44,110L159.2,93.42L186,55.28L169.4,31.71L86,10'}); - }); - at(600, function() { - assert_styles(".target",{'d':'M124,10L124,102.4L138.2,110L206.1,98.94L224,52.92L212.9,24.47L124,10'}); - }); - at(800, function() { - assert_styles(".target",{'d':'M162,10L162,106.2L180.9,110L253.1,104.5L262,50.56L256.5,17.24L162,10'}); - }); - at(1000, function() { - assert_styles(".target",{'d':'M10,10v100l100,-50z'}); - }); -}, "Auto generated tests"); diff --git a/third_party/polymer/components/web-animations-js/test/testcases/auto-test-path.html b/third_party/polymer/components/web-animations-js/test/testcases/auto-test-path.html deleted file mode 100644 index 9e9e4bf..0000000 --- a/third_party/polymer/components/web-animations-js/test/testcases/auto-test-path.html +++ /dev/null @@ -1,41 +0,0 @@ -<!-- -Copyright 2014 Google Inc. All Rights Reserved. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. ---> - -<!DOCTYPE html><meta charset="UTF-8"> -<svg xmlns="http://www.w3.org/2000/svg" version="1.1" id="svg"></svg> - -<script src="../bootstrap.js"></script> -<script> -'use strict'; - -var startPath = 'M10,10v100l100,-50z'; -var endPath = 'M200,10v100h100v-100z'; - -function addPath(d, fill) { - var path = document.createElementNS('http://www.w3.org/2000/svg', 'path'); - if (d) - path.setAttribute('d', d); - path.setAttribute('fill', fill); - svg.appendChild(path); - return path; -} - -addPath(startPath, 'red'); -addPath(endPath, 'red'); -var target = addPath(startPath, 'green'); -target.classList.add('target'); -target.animate({d: endPath}, 1000); -</script> diff --git a/third_party/polymer/components/web-animations-js/test/testcases/auto-test-pause-checks.js b/third_party/polymer/components/web-animations-js/test/testcases/auto-test-pause-checks.js deleted file mode 100644 index cbe06a3..0000000 --- a/third_party/polymer/components/web-animations-js/test/testcases/auto-test-pause-checks.js +++ /dev/null @@ -1,79 +0,0 @@ -timing_test(function() { - at(0 * 1000, function() { - assert_styles( - '.anim', - [{'left':'100px'}, - {'left':'100px'}, - {'left':'0px'}, - {'left':'0px'}]); - }, "Autogenerated"); - -//pause - at(1 * 1000, function() { - assert_styles( - '.anim', - [{'left':'138.46153259277344px'}, - {'left':'140px'}, - {'left':'0px'}, - {'left':'0px'}]); - }, "Autogenerated"); - at(2 * 1000, function() { - assert_styles( - '.anim', - [{'left':'138.46153259277344px'}, - {'left':'140px'}, - {'left':'0px'}, - {'left':'0px'}]); - }, "Autogenerated"); -//unpause - at(3 * 1000, function() { - assert_styles( - '.anim', - [{'left':'176.92308044433594px'}, - {'left':'180px'}, - {'left':'0px'}, - {'left':'0px'}]); - }, "Autogenerated"); -//pause - at(4 * 1000, function() { - assert_styles( - '.anim', - [{'left':'200px'}, - {'left':'200px'}, - {'left':'116px'}, - {'left':'117.39130401611328px'}]); - }, "Autogenerated"); - at(5 * 1000, function() { - assert_styles( - '.anim', - [{'left':'200px'}, - {'left':'200px'}, - {'left':'116px'}, - {'left':'117.39130401611328px'}]); - }, "Autogenerated"); -//unpause - at(6 * 1000, function() { - assert_styles( - '.anim', - [{'left':'200px'}, - {'left':'200px'}, - {'left':'156px'}, - {'left':'160.86956787109375px'}]); - }, "Autogenerated"); - at(7 * 1000, function() { - assert_styles( - '.anim', - [{'left':'200px'}, - {'left':'200px'}, - {'left':'196px'}, - {'left':'200px'}]); - }, "Autogenerated"); - at(7.1 * 1000, function() { - assert_styles( - '.anim', - [{'left':'200px'}, - {'left':'200px'}, - {'left':'200px'}, - {'left':'200px'}]); - }, "Autogenerated"); -}, "Autogenerated checks."); diff --git a/third_party/polymer/components/web-animations-js/test/testcases/auto-test-pause.html b/third_party/polymer/components/web-animations-js/test/testcases/auto-test-pause.html deleted file mode 100644 index 0d96a4c..0000000 --- a/third_party/polymer/components/web-animations-js/test/testcases/auto-test-pause.html +++ /dev/null @@ -1,82 +0,0 @@ -<!-- -Copyright 2012 Google Inc. All Rights Reserved. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. ---> - -<!DOCTYPE html><meta charset="UTF-8"> -<style> -.anim { - left: 0px; - width: 100px; - height: 100px; - background-color: lightsteelblue; - position: absolute; -} - -#a { - top: 0px -} - -#b { - top: 100px; -} - -#c { - top: 200px; -} - -#d { - top: 300px; -} - -#expectation { - position: absolute; - top: 0px; - left: 200px; - width: 100px; - height: 400px; - background: red; -} -</style> - -<div id="expectation"></div> - -<div id="a" class="anim a"></div> -<div id="b" class="anim b"></div> -<div id="c" class="anim a"></div> -<div id="d" class="anim b"></div> - -<div style="height: 450px"></div> - -<script src="../bootstrap.js"></script> -<script> -"use strict"; - -var effect = [{left: "100px"}, {left: "200px"}]; - -var a1 = new Animation(document.querySelector("#a"), effect, {duration: 2.6 * 1000, fill: "forwards"}); -var a2 = new Animation(document.querySelector("#b"), effect, {duration: 2.5 * 1000, fill: "forwards"}); -var a3 = new Animation(document.querySelector("#c"), effect, {duration: 2.5 * 1000, fill: "forwards"}); -var a4 = new Animation(document.querySelector("#d"), effect, {duration: 2.3 * 1000, fill: "forwards"}); -var pgroup1 = new AnimationGroup([a1, a2], {name: "p1", fill: "forwards"}); -var pgroup2 = new AnimationGroup([a3, a4], {name: "p2", fill: "forwards"}); -var player = document.timeline.play( - new AnimationSequence([pgroup1, pgroup2], {name: "s", fill: "forwards"})); - -at(1.0 * 1000, function() { player.pause(); }); -at(2.0 * 1000, function() { player.play(); }); -at(4.0 * 1000, function() { player.pause(); }); -at(5.0 * 1000, function() { player.play(); }); - -</script> diff --git a/third_party/polymer/components/web-animations-js/test/testcases/auto-test-perspective-checks.js b/third_party/polymer/components/web-animations-js/test/testcases/auto-test-perspective-checks.js deleted file mode 100644 index a2c0353..0000000 --- a/third_party/polymer/components/web-animations-js/test/testcases/auto-test-perspective-checks.js +++ /dev/null @@ -1,37 +0,0 @@ -timing_test(function() { - at(0 * 1000, function() { - assert_styles(".test",{'perspective':'500px'}); - }); - at(0.5 * 1000, function() { - assert_styles(".test", [ - {'perspective':'412.5px'}, - {'perspective':'625px'}, - {'perspective':'500px'}, - {'perspective':'376px'}, - ]); - }); - at(1 * 1000, function() { - assert_styles(".test", [ - {'perspective':'325px'}, - {'perspective':'750px'}, - {'perspective':'none'}, - {'perspective':'252px'}, - ]); - }); - at(1.5 * 1000, function() { - assert_styles(".test", [ - {'perspective':'237.5px'}, - {'perspective':'875px'}, - {'perspective':'none'}, - {'perspective':'128px'}, - ]); - }); - at(2 * 1000, function() { - assert_styles(".test", [ - {'perspective':'150px'}, - {'perspective':'1000px'}, - {'perspective':'none'}, - {'perspective':'4px'}, - ]); - }); -}, "Auto generated tests"); diff --git a/third_party/polymer/components/web-animations-js/test/testcases/auto-test-perspective-origin-checks.js b/third_party/polymer/components/web-animations-js/test/testcases/auto-test-perspective-origin-checks.js deleted file mode 100644 index 2fca78d..0000000 --- a/third_party/polymer/components/web-animations-js/test/testcases/auto-test-perspective-origin-checks.js +++ /dev/null @@ -1,61 +0,0 @@ -timing_test(function() { - at(0 * 1000, function() { - assert_styles(".test",{'perspectiveOrigin':'50px 50px'}); - }); - at(0.5 * 1000, function() { - assert_styles(".test", [ - {'perspectiveOrigin':'37.5px 37.5px'}, - {'perspectiveOrigin':'37.5px 50px'}, - {'perspectiveOrigin':'62.5px 50px'}, - {'perspectiveOrigin':'50px 37.5px'}, - {'perspectiveOrigin':'50px 62.5px'}, - {'perspectiveOrigin':'50px 50px'}, - {'perspectiveOrigin':'37.5px 37.5px'}, - {'perspectiveOrigin':'57.5px 57.5px'}, - {'perspectiveOrigin':'42.5px 52.5px'}, - {'perspectiveOrigin':'37.5px 62.5px'}, - ]); - }); - at(1 * 1000, function() { - assert_styles(".test", [ - {'perspectiveOrigin':'25px 25px'}, - {'perspectiveOrigin':'25px 50px'}, - {'perspectiveOrigin':'75px 50px'}, - {'perspectiveOrigin':'50px 25px'}, - {'perspectiveOrigin':'50px 75px'}, - {'perspectiveOrigin':'50px 50px'}, - {'perspectiveOrigin':'25px 25px'}, - {'perspectiveOrigin':'65px 65px'}, - {'perspectiveOrigin':'35px 55px'}, - {'perspectiveOrigin':'25px 75px'}, - ]); - }); - at(1.5 * 1000, function() { - assert_styles(".test", [ - {'perspectiveOrigin':'12.5px 12.5px'}, - {'perspectiveOrigin':'12.5px 50px'}, - {'perspectiveOrigin':'87.5px 50px'}, - {'perspectiveOrigin':'50px 12.5px'}, - {'perspectiveOrigin':'50px 87.5px'}, - {'perspectiveOrigin':'50px 50px'}, - {'perspectiveOrigin':'12.5px 12.5px'}, - {'perspectiveOrigin':'72.5px 72.5px'}, - {'perspectiveOrigin':'27.5px 57.5px'}, - {'perspectiveOrigin':'12.5px 87.5px'}, - ]); - }); - at(2 * 1000, function() { - assert_styles(".test", [ - {'perspectiveOrigin':'0px 0px'}, - {'perspectiveOrigin':'0px 50px'}, - {'perspectiveOrigin':'100px 50px'}, - {'perspectiveOrigin':'50px 0px'}, - {'perspectiveOrigin':'50px 100px'}, - {'perspectiveOrigin':'50px 50px'}, - {'perspectiveOrigin':'0px 0px'}, - {'perspectiveOrigin':'80px 80px'}, - {'perspectiveOrigin':'20px 60px'}, - {'perspectiveOrigin':'0px 100px'}, - ]); - }); -}, "Auto generated tests"); diff --git a/third_party/polymer/components/web-animations-js/test/testcases/auto-test-perspective-origin.html b/third_party/polymer/components/web-animations-js/test/testcases/auto-test-perspective-origin.html deleted file mode 100644 index 5c787a1..0000000 --- a/third_party/polymer/components/web-animations-js/test/testcases/auto-test-perspective-origin.html +++ /dev/null @@ -1,94 +0,0 @@ -<!-- -Copyright 2014 Google Inc. All Rights Reserved. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. ---> - -<!DOCTYPE html><meta charset="UTF-8"> -<style> -.container { - position: absolute; - top: 10px; - left: 100px; -} -.box { - width: 100px; - height: 100px; - margin: 20px; - margin-bottom: 100px; - display: inline-block; - -webkit-perspective: 500px; - perspective: 500px; -} -.item { - width: 80px; - height: 80px; - margin: 10px; - border-style: solid; - white-space: pre; - -webkit-transform: translateZ(50px) rotateX(30deg) rotateY(30deg); - transform: translateZ(50px) rotateX(30deg) rotateY(30deg); -} -.test > .item { border-color: green; } -.expectation > .item { color: red; } -#spacer { height: 500px; } -</style> - -<div id="spacer"></div> -<div id="expectationContainer" class="container"></div> -<div id="testContainer" class="container"></div> - -<script> -var expected_failures = [ - { - browser_configurations: [{ chrome: true, version: '34|35' }], - tests: ['tests at t=(1000|1500)ms'], - message: '-webkit-perspective-origin shorthand behaviour is broken: crbug.com/361944', - } -]; -</script> -<script src="../bootstrap.js"></script> -<script> -'use strict'; -var perspectiveOrignTestCases = [ - '0 0', - 'left', - 'right', - 'top', - 'bottom', - 'center', - '0 0', - '80px 80px', - '20% 60%', - 'calc(25px - 25%) calc(25px + 75%)', -]; -perspectiveOrignTestCases.forEach(function(testCase) { - var test = createBoxedItem('test', testCase); - test.animate({perspectiveOrigin: testCase}, {duration: 2 * 1000, fill: 'forwards'}); - testContainer.appendChild(test); - - var expectation = createBoxedItem('expectation', testCase); - expectation.style.perspectiveOrigin = expectation.style.webkitPerspectiveOrigin = testCase; - expectationContainer.appendChild(expectation); -}); - -function createBoxedItem(type, text) { - var box = document.createElement('div'); - box.classList.add('box', type); - box.textContent = text; - var item = document.createElement('div'); - item.classList.add('item'); - box.appendChild(item); - return box; -} -</script> diff --git a/third_party/polymer/components/web-animations-js/test/testcases/auto-test-perspective.html b/third_party/polymer/components/web-animations-js/test/testcases/auto-test-perspective.html deleted file mode 100644 index 526905d..0000000 --- a/third_party/polymer/components/web-animations-js/test/testcases/auto-test-perspective.html +++ /dev/null @@ -1,79 +0,0 @@ -<!-- -Copyright 2014 Google Inc. All Rights Reserved. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. ---> - -<!DOCTYPE html><meta charset="UTF-8"> -<style> -.container { - position: absolute; - top: 10px; - left: 100px; -} -.box { - width: 100px; - height: 100px; - margin: 20px; - margin-bottom: 100px; - display: inline-block; - -webkit-perspective: 500px; - perspective: 500px; -} -.item { - width: 80px; - height: 80px; - margin: 10px; - border-style: solid; - white-space: pre; - -webkit-transform: translateZ(50px) rotateX(30deg) rotateY(30deg); - transform: translateZ(50px) rotateX(30deg) rotateY(30deg); -} -.test > .item { border-color: green; } -.expectation > .item { color: red; } -#spacer { height: 300px; } -</style> - -<div id="spacer"></div> -<div id="expectationContainer" class="container"></div> -<div id="testContainer" class="container"></div> - -<script src="../bootstrap.js"></script> -<script> -'use strict'; -var perspectiveTestCases = [ - '150px', - '1000px', - 'none', - '4px', -]; -perspectiveTestCases.forEach(function(testCase) { - var test = createBoxedItem('test', testCase); - test.animate({perspective: testCase}, {duration: 2 * 1000, fill: 'forwards'}); - testContainer.appendChild(test); - - var expectation = createBoxedItem('expectation', testCase); - expectation.style.perspective = expectation.style.webkitPerspective = testCase; - expectationContainer.appendChild(expectation); -}); - -function createBoxedItem(type, text) { - var box = document.createElement('div'); - box.classList.add('box', type); - box.textContent = text; - var item = document.createElement('div'); - item.classList.add('item'); - box.appendChild(item); - return box; -} -</script> diff --git a/third_party/polymer/components/web-animations-js/test/testcases/auto-test-playback-rate-checks.js b/third_party/polymer/components/web-animations-js/test/testcases/auto-test-playback-rate-checks.js deleted file mode 100644 index 69dedc6..0000000 --- a/third_party/polymer/components/web-animations-js/test/testcases/auto-test-playback-rate-checks.js +++ /dev/null @@ -1,146 +0,0 @@ -timing_test(function() { - at(0 * 1000, function() { - assert_styles( - '.anim', - [{'left':'100px'}, - {'left':'100px'}, - {'left':'100px'}, - {'left':'100px'}, - {'left':'100px'}, - {'left':'100px'}, - {'left':'300px'}, - {'left':'300px'}, - {'left':'300px'}, - {'left':'300px'}, - {'left':'300px'}, - {'left':'300px'}, - {'left':'300px'}, - {'left':'300px'}]); - }, "Autogenerated"); - at(0.5 * 1000, function() { - assert_styles( - '.anim', - [{'left':'200px'}, - {'left':'200px'}, - {'left':'200px'}, - {'left':'200px'}, - {'left':'200px'}, - {'left':'200px'}, - {'left':'300px'}, - {'left':'300px'}, - {'left':'300px'}, - {'left':'300px'}, - {'left':'300px'}, - {'left':'300px'}, - {'left':'300px'}, - {'left':'300px'}]); - }, "Autogenerated"); - at(1 * 1000, function() { - assert_styles( - '.anim', - [{'left':'300px'}, - {'left':'300px'}, - {'left':'300px'}, - {'left':'300px'}, - {'left':'300px'}, - {'left':'300px'}, - {'left':'300px'}, - {'left':'300px'}, - {'left':'300px'}, - {'left':'300px'}, - {'left':'300px'}, - {'left':'300px'}, - {'left':'300px'}, - {'left':'300px'}]); - }, "Autogenerated"); - at(1.5 * 1000, function() { - assert_styles( - '.anim', - [{'left':'300px'}, - {'left':'300px'}, - {'left':'300px'}, - {'left':'300px'}, - {'left':'300px'}, - {'left':'300px'}, - {'left':'300px'}, - {'left':'300px'}, - {'left':'300px'}, - {'left':'300px'}, - {'left':'300px'}, - {'left':'300px'}, - {'left':'300px'}, - {'left':'300px'}]); - }, "Autogenerated"); - at(2 * 1000, function() { - assert_styles( - '.anim', - [{'left':'300px'}, - {'left':'300px'}, - {'left':'300px'}, - {'left':'300px'}, - {'left':'300px'}, - {'left':'300px'}, - {'left':'300px'}, - {'left':'300px'}, - {'left':'300px'}, - {'left':'300px'}, - {'left':'300px'}, - {'left':'300px'}, - {'left':'300px'}, - {'left':'300px'}]); - }, "Autogenerated"); - at(2.5 * 1000, function() { - assert_styles( - '.anim', - [{'left':'300px'}, - {'left':'300px'}, - {'left':'300px'}, - {'left':'300px'}, - {'left':'300px'}, - {'left':'300px'}, - {'left':'300px'}, - {'left':'200px'}, - {'left':'200px'}, - {'left':'200px'}, - {'left':'200px'}, - {'left':'200px'}, - {'left':'200px'}, - {'left':'300px'}]); - }, "Autogenerated"); - at(3 * 1000, function() { - assert_styles( - '.anim', - [{'left':'300px'}, - {'left':'300px'}, - {'left':'300px'}, - {'left':'300px'}, - {'left':'300px'}, - {'left':'300px'}, - {'left':'300px'}, - {'left':'100px'}, - {'left':'100px'}, - {'left':'100px'}, - {'left':'100px'}, - {'left':'100px'}, - {'left':'100px'}, - {'left':'300px'}]); - }, "Autogenerated"); - at(3.5 * 1000, function() { - assert_styles( - '.anim', - [{'left':'300px'}, - {'left':'300px'}, - {'left':'300px'}, - {'left':'300px'}, - {'left':'300px'}, - {'left':'300px'}, - {'left':'300px'}, - {'left':'100px'}, - {'left':'100px'}, - {'left':'100px'}, - {'left':'100px'}, - {'left':'100px'}, - {'left':'100px'}, - {'left':'300px'}]); - }, "Autogenerated"); -}, "Autogenerated checks."); diff --git a/third_party/polymer/components/web-animations-js/test/testcases/auto-test-playback-rate.html b/third_party/polymer/components/web-animations-js/test/testcases/auto-test-playback-rate.html deleted file mode 100644 index 8b0657e..0000000 --- a/third_party/polymer/components/web-animations-js/test/testcases/auto-test-playback-rate.html +++ /dev/null @@ -1,128 +0,0 @@ -<!-- -Copyright 2012 Google Inc. All Rights Reserved. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. ---> - -<!DOCTYPE html><meta charset="UTF-8"> -<style> -.animContainer { - position: absolute; - left: 0px; -} - -.anim { - left: 0px; - width: 100px; - height: 25px; - background-color: lightsteelblue; - position: relative; -} - -#ca { - top: 50px; -} - -#cb { - top: 250px; -} - -.expectation { - position: absolute; - width: 100px; - background: red; -} -#expectation1 { - top: 50px; - left: 300px; - height: 175px; -} -#expectation2 { - top: 250px; - left: 100px; - height: 150px; -} -#expectation3 { - top: 400px; - left: 300px; - height: 25px; -} -</style> - -<div>All movement should be at the same speed.</div> - -<div class="expectation" id="expectation1"></div> -<div class="expectation" id="expectation2"></div> -<div class="expectation" id="expectation3"></div> - -<div class="animContainer" id="ca"> - <div class="anim a" id="a"></div> - <div class="anim b" id="b"></div> - <div class="anim c" id="c"></div> - <div class="anim d" id="d"></div> - <div class="anim e" id="e"></div> - <div class="anim f" id="f"></div> - <div class="anim g" id="g"></div> -</div> - -<div class="animContainer" id="cb"> - <div class="anim a" id="h"></div> - <div class="anim b" id="i"></div> - <div class="anim c" id="j"></div> - <div class="anim d" id="k"></div> - <div class="anim e" id="l"></div> - <div class="anim f" id="m"></div> - <div class="anim g" id="n"></div> -</div> - -<div style="height: 450px"></div> - -<script src="../bootstrap.js"></script> -<script> -"use strict"; - -var containers = ["ca", "cb"]; - -var directions = ["normal", "reverse"]; -var groups = []; - -var effect100To300 = [{left: "100px"}, {left: "300px"}]; -var effect300To100 = [{left: "300px"}, {left: "100px"}]; - -for (var i = 0; i < directions.length; i++) { - var dir = directions[i]; - groups.push(new AnimationGroup([], {direction: dir, duration: 3 * 1000})); -} - -for (var i = 0; i < containers.length; i++) { - var container = document.getElementById(containers[i]); - // Test basic use. - groups[i].append(new Animation(container.getElementsByClassName("a")[0], - effect100To300, {duration: 1.0 * 1000, fill: 'forwards'})); - groups[i].append(new Animation(container.getElementsByClassName("b")[0], - effect100To300, {duration: 0.5 * 1000, playbackRate: 0.5, fill: 'forwards'})); - groups[i].append(new Animation(container.getElementsByClassName("c")[0], - effect100To300, {duration: 2.0 * 1000, playbackRate: 2.0, fill: 'forwards'})); - // Test negative values. - groups[i].append(new Animation(container.getElementsByClassName("d")[0], - effect300To100, {duration: 1.0 * 1000, playbackRate: -1.0, fill: 'forwards'})); - groups[i].append(new Animation(container.getElementsByClassName("e")[0], - effect300To100, {duration: 0.5 * 1000, playbackRate: -0.5, fill: 'forwards'})); - groups[i].append(new Animation(container.getElementsByClassName("f")[0], - effect300To100, {duration: 2.0 * 1000, playbackRate: -2.0, fill: 'forwards'})); - // Test zero. - groups[i].append(new Animation(container.getElementsByClassName("g")[0], - effect300To100, {duration: 1.0 * 1000, playbackRate: 0.0, fill: 'forwards'})); - document.timeline.play(groups[i]); -} -</script> diff --git a/third_party/polymer/components/web-animations-js/test/testcases/auto-test-position-list-type-checks.js b/third_party/polymer/components/web-animations-js/test/testcases/auto-test-position-list-type-checks.js deleted file mode 100644 index b3cc708..0000000 --- a/third_party/polymer/components/web-animations-js/test/testcases/auto-test-position-list-type-checks.js +++ /dev/null @@ -1,73 +0,0 @@ -timing_test(function() { - at(0 * 1000, function() { - assert_styles(".anim", [ - {'backgroundPosition':'0% 0%'}, - {'backgroundPosition':'0% 0%'}, - {'backgroundPosition':'0% 0%'}, - {'backgroundPosition':'0% 0%'}, - {'backgroundPosition':'0% 0%'}, - {'backgroundPosition':'0% 0%'}, - {'backgroundPosition':'0% 0%'}, - {'backgroundPosition':'0% 0%'}, - {'backgroundPosition':'0% 0%'}, - {'backgroundPosition':'0% 0%'}, - {'backgroundPosition':'0% 0%'}, - {'backgroundPosition':'0% 0%'}, - {'backgroundPosition':'0% 0%'}, - {'backgroundPosition':'0% 0%'}, - {'backgroundPosition':'0% 0%'}, - {'backgroundPosition':'0% 0%'}, - {'backgroundPosition':'0% 0%'}, - {'backgroundPosition':'0% 0%'}, - {'backgroundPosition':'0% 0%'}, - {'backgroundPosition':'0% 0%'}, - {'backgroundPosition':'0% 0%'}, - {'backgroundPosition':'0% 0%'}, - {'backgroundPosition':'0% 0%'}, - {'backgroundPosition':'0% 0%'}, - {'backgroundPosition':'0% 0%'}, - {'backgroundPosition':'0% 0%'}, - {'backgroundPosition':'0% 0%'}, - {'backgroundPosition':'0% 0%'}, - {'backgroundPosition':'0% 0%'}, - {'backgroundPosition':'0% 0%'}, - {'backgroundPosition':'0% 0%'}, - ]); - }); - // TODO: Generate more inbetween values to compare against. - at(2 * 1000, function() { - assert_styles(".anim", [ - {'backgroundPosition':'0% 50%'}, - {'backgroundPosition':'50% 50%'}, - {'backgroundPosition':'100% 50%'}, - {'backgroundPosition':'50% 0%'}, - {'backgroundPosition':'50% 100%'}, - {'backgroundPosition':'10px 50%'}, - {'backgroundPosition':'20% 50%'}, - {'backgroundPosition':'0% 50%'}, - {'backgroundPosition':'50% 50%'}, - {'backgroundPosition':'100% 100%'}, - {'backgroundPosition':'100% 25%'}, - {'backgroundPosition':'10px 100%'}, - {'backgroundPosition':'10px 40px'}, - {'backgroundPosition':'0% calc(-10px + 100%)'}, - {'backgroundPosition':'50% 20%'}, - {'backgroundPosition':'100% 10px'}, - {'backgroundPosition':'100% 20%'}, - {'backgroundPosition':'20% 100%'}, - {'backgroundPosition':'10px 100%'}, - {'backgroundPosition':'40px calc(-10px + 100%)'}, - {'backgroundPosition':'20% 20%'}, - {'backgroundPosition':'calc(25% - 5px) 50%'}, - {'backgroundPosition':'calc(25% - 5px) 25%'}, - {'backgroundPosition':'50% calc(25% - 5px)'}, - {'backgroundPosition':'10px 10%'}, - {'backgroundPosition':'100% calc(75% + 5px)'}, - {'backgroundPosition':'10px calc(100% - 10px)'}, - {'backgroundPosition':'25% 25%'}, - {'backgroundPosition':'calc(25% - 5px) 10px'}, - {'backgroundPosition':'calc(75% + 5px) 10px'}, - {'backgroundPosition':'10px calc(75% + 5px)'}, - ]); - }); -}, "Auto generated tests"); diff --git a/third_party/polymer/components/web-animations-js/test/testcases/auto-test-rectangle-checks.js b/third_party/polymer/components/web-animations-js/test/testcases/auto-test-rectangle-checks.js deleted file mode 100644 index 3f9eb98..0000000 --- a/third_party/polymer/components/web-animations-js/test/testcases/auto-test-rectangle-checks.js +++ /dev/null @@ -1,23 +0,0 @@ -timing_test(function() { - at(0 * 1000, function() { - assert_styles('#test', {'clip':'rect(300px 400px 300px 400px)'}); - }, "Autogenerated"); - at(0.2 * 1000, function() { - assert_styles('#test', {'clip':'rect(240px 480px 360px 320px)'}); - }, "Autogenerated"); - at(0.4 * 1000, function() { - assert_styles('#test', {'clip':'rect(180px 560px 420px 240px)'}); - }, "Autogenerated"); - at(0.6000000000000001 * 1000, function() { - assert_styles('#test', {'clip':'rect(120px 640px 480px 160px)'}); - }, "Autogenerated"); - at(0.8 * 1000, function() { - assert_styles('#test', {'clip':'rect(60px 720px 540px 80px)'}); - }, "Autogenerated"); - at(1 * 1000, function() { - assert_styles('#test', {'clip':'rect(0px 800px 600px 0px)'}); - }, "Autogenerated"); - at(1.2 * 1000, function() { - assert_styles('#test', {'clip':'rect(0px 800px 600px 0px)'}); - }, "Autogenerated"); -}, "Autogenerated checks."); diff --git a/third_party/polymer/components/web-animations-js/test/testcases/auto-test-rectangle.html b/third_party/polymer/components/web-animations-js/test/testcases/auto-test-rectangle.html deleted file mode 100644 index 3965f34..0000000 --- a/third_party/polymer/components/web-animations-js/test/testcases/auto-test-rectangle.html +++ /dev/null @@ -1,57 +0,0 @@ -<!-- -Copyright 2012 Google Inc. All Rights Reserved. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. ---> - -<!DOCTYPE html><meta charset="UTF-8"> -<body> -<style> -body { - margin: 0px; -} -#test, #expectation { -position: absolute; - width: 800px; - height: 600px; - background: lightsteelblue; -} -#expectation { - background: red; -} -</style> -<div id="expectation"></div> -<div id="test"></div> -<div style="height: 650px"></div> - -<script> -var expected_failures = [ - { - browser_configurations: [{ msie: true }], - tests: ['Autogenerated at t=800ms'], - message: 'Floating point issues.', - } -]; -</script> -<script src="../bootstrap.js"></script> -<script> -"use strict"; - -var anim = [ - {clip: 'rect(300px, 400px, 300px, 400px)'}, - {clip: 'rect(0px, 800px, 600px, 0px)'}, -]; - -document.timeline.play( - new Animation(document.querySelector('#test'), anim, {duration: 1 * 1000, fill: 'forwards'})); -</script> diff --git a/third_party/polymer/components/web-animations-js/test/testcases/auto-test-reparent-checks.js b/third_party/polymer/components/web-animations-js/test/testcases/auto-test-reparent-checks.js deleted file mode 100644 index efbaeca..0000000 --- a/third_party/polymer/components/web-animations-js/test/testcases/auto-test-reparent-checks.js +++ /dev/null @@ -1,95 +0,0 @@ -timing_test(function() { - at(0 * 1000, function() { - assert_styles('.anim', {'left':'100px'}); - }, "Autogenerated"); - at(0.25 * 1000, function() { - assert_styles('.anim', {'left':'150px'}); - }, "Autogenerated"); - at(0.5 * 1000, function() { - assert_styles('.anim', {'left':'200px'}); - }, "Autogenerated"); - at(0.75 * 1000, function() { - assert_styles('.anim', {'left':'250px'}); - }, "Autogenerated"); - at(1 * 1000, function() { - assert_styles('.anim', {'left':'300px'}); - }, "Autogenerated"); - at(1.25 * 1000, function() { - assert_styles('.anim', {'left':'350px'}); - }, "Autogenerated"); - at(1.5 * 1000, function() { - assert_styles('.anim', {'left':'400px'}); - }, "Autogenerated"); - at(1.75 * 1000, function() { - assert_styles('.anim', {'left':'450px'}); - }, "Autogenerated"); - at(2 * 1000, function() { - assert_styles('.anim', {'left':'100px'}); - }, "Autogenerated"); - at(2.25 * 1000, function() { - assert_styles('.anim', {'left':'150px'}); - }, "Autogenerated"); - at(2.5 * 1000, function() { - assert_styles('.anim', {'left':'200px'}); - }, "Autogenerated"); - at(2.75 * 1000, function() { - assert_styles('.anim', {'left':'250px'}); - }, "Autogenerated"); - at(3.25 * 1000, function() { - assert_styles('.anim', {'left':'150px'}); - }, "Autogenerated"); - at(3.5 * 1000, function() { - assert_styles('.anim', {'left':'200px'}); - }, "Autogenerated"); - at(3.75 * 1000, function() { - assert_styles('.anim', {'left':'250px'}); - }, "Autogenerated"); - at(4 * 1000, function() { - assert_styles('.anim', {'left':'100px'}); - }, "Autogenerated"); - at(4.25 * 1000, function() { - assert_styles('.anim', {'left':'150px'}); - }, "Autogenerated"); - at(4.5 * 1000, function() { - assert_styles('.anim', {'left':'200px'}); - }, "Autogenerated"); - at(4.75 * 1000, function() { - assert_styles('.anim', {'left':'250px'}); - }, "Autogenerated"); - at(5 * 1000, function() { - assert_styles('.anim', {'left':'100px'}); - }, "Autogenerated"); - at(5.25 * 1000, function() { - assert_styles('.anim', {'left':'150px'}); - }, "Autogenerated"); - at(5.5 * 1000, function() { - assert_styles('.anim', {'left':'200px'}); - }, "Autogenerated"); - at(5.75 * 1000, function() { - assert_styles('.anim', {'left':'250px'}); - }, "Autogenerated"); - at(6.0 * 1000, function() { - assert_styles('.anim', {'left':'300px'}); - }, "Autogenerated"); - at(7.0 * 1000, function() { - assert_styles('.anim', {'left':'300px'}); - }, "Autogenerated"); - at(8.25 * 1000, function() { - assert_styles('.anim', {'left':'150px'}); - }, "Autogenerated"); - at(8.5 * 1000, function() { - assert_styles('.anim', {'left':'200px'}); - }, "Autogenerated"); - at(8.75 * 1000, function() { - assert_styles('.anim', {'left':'250px'}); - }, "Autogenerated"); - at(9 * 1000, function() { - assert_styles('.anim', {'left':'300px'}); - }, "Autogenerated"); - at(9.25 * 1000, function() { - assert_styles('.anim', {'left':'350px'}); - }, "Autogenerated"); - at(9.5 * 1000, function() { - assert_styles('.anim', {'left':'100px'}); - }, "Autogenerated"); -}, "Autogenerated checks."); diff --git a/third_party/polymer/components/web-animations-js/test/testcases/auto-test-reparent.html b/third_party/polymer/components/web-animations-js/test/testcases/auto-test-reparent.html deleted file mode 100644 index a1d929a..0000000 --- a/third_party/polymer/components/web-animations-js/test/testcases/auto-test-reparent.html +++ /dev/null @@ -1,60 +0,0 @@ -<!-- -Copyright 2012 Google Inc. All Rights Reserved. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. ---> - -<!DOCTYPE html><meta charset="UTF-8"> -<style> -.anim { - left: 0px; - width: 100px; - height: 25px; - background-color: #FAA; - position: relative; -} - -.expected { - border-right: 1px solid black; -} - -</style> - -<div>Right edge of each box should align with black line at end of test.</div> - -<div style="width: 400px;" class="expected"> - <div id="a" class="anim"></div> -</div> - -<script src="../bootstrap.js"></script> -<script> -"use strict"; - -// Run a simple animation. It should animate indefinitely. -var anim = new Animation(document.getElementById("a"), - [{left: "100px"}, {left: "500px"}], {iterations: Infinity, duration: 2.0 * 1000}); -document.timeline.play(anim); - -// After 3.0s, move it to a parallel group and run that. -testharness_timeline.schedule(function() { - document.timeline.play(new AnimationGroup([anim], - {duration: 1.0 * 1000, iterations: 3.0})); - }, 3000); - -// After 3.0s, move it to a parallel group and run that. -testharness_timeline.schedule(function() { - document.timeline.play(new AnimationGroup([anim], - {duration: 1.5 * 1000, iterations: 3.0})); - }, 8000); - -</script> diff --git a/third_party/polymer/components/web-animations-js/test/testcases/auto-test-seq-speed-checks.js b/third_party/polymer/components/web-animations-js/test/testcases/auto-test-seq-speed-checks.js deleted file mode 100644 index 04974be..0000000 --- a/third_party/polymer/components/web-animations-js/test/testcases/auto-test-seq-speed-checks.js +++ /dev/null @@ -1,69 +0,0 @@ -timing_test(function() { - at(0 * 1000, function() { - assert_styles( - '.anim', - [{'left':'100px'}, - {'left':'100px'}, - {'left':'0px'}, - {'left':'0px'}]); - }, "Autogenerated"); - at(0.5 * 1000, function() { - assert_styles( - '.anim', - [{'left':'150px'}, - {'left':'125px'}, - {'left':'0px'}, - {'left':'0px'}]); - }, "Autogenerated"); - at(1.0 * 1000, function() { - assert_styles( - '.anim', - [{'left':'200px'}, - {'left':'150px'}, - {'left':'0px'}, - {'left':'0px'}]); - }, "Autogenerated"); - at(1.5 * 1000, function() { - assert_styles( - '.anim', - [{'left':'200px'}, - {'left':'175px'}, - {'left':'0px'}, - {'left':'0px'}]); - }, "Autogenerated"); - at(2.0 * 1000, function() { - assert_styles( - '.anim', - [{'left':'200px'}, - {'left':'200px'}, - {'left':'100px'}, - {'left':'100px'}]); - }, "Autogenerated"); - at(2.5 * 1000, function() { - assert_styles( - '.anim', - [{'left':'200px'}, - {'left':'200px'}, - {'left':'150px'}, - {'left':'125px'}]); - }, "Autogenerated"); - at(3.0 * 1000, function() { - assert_styles( - '.anim', - [{'left':'200px'}, - {'left':'200px'}, - {'left':'200px'}, - {'left':'150px'}]); - }, "Autogenerated"); - at(3.5 * 1000, function() { - assert_styles( - '.anim', - [{'left':'200px'}, - {'left':'200px'}, - {'left':'200px'}, - {'left':'175px'}]); - }, "Autogenerated"); - at(4.0 * 1000, function() { - assert_styles('.anim', {'left':'200px'}); - }, "Autogenerated"); -}, "Autogenerated checks."); diff --git a/third_party/polymer/components/web-animations-js/test/testcases/auto-test-seq-speed.html b/third_party/polymer/components/web-animations-js/test/testcases/auto-test-seq-speed.html deleted file mode 100644 index 75e84f8..0000000 --- a/third_party/polymer/components/web-animations-js/test/testcases/auto-test-seq-speed.html +++ /dev/null @@ -1,86 +0,0 @@ -<!-- -Copyright 2012 Google Inc. All Rights Reserved. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. ---> - -<!DOCTYPE html><meta charset="UTF-8"> -<style> -.anim { - left: 0px; - width: 100px; - height: 100px; - background-color: lightsteelblue; - position: absolute; -} - -#a { - top: 0px -} - -#b { - top: 100px; -} - -#c { - top: 200px; -} - -#d { - top: 300px; -} - -#expectation { - position: absolute; - top: 0px; - left: 200px; - width: 100px; - height: 400px; - background: red; -} -</style> - -<div id="expectation"></div> - -<div> - <div id="a" class="anim a"></div> - <div id="b" class="anim b"></div> -</div> - -<div id="fromTemplate"> - <div id="c" class="anim a"></div> - <div id="d" class="anim b"></div> -</div> - -<div style="height:450px"></div> - -<script src="../bootstrap.js"></script> -<script> -"use strict"; - -var effect = [{left: "100px"}, {left: "200px"}]; - -var a1 = new Animation( - document.querySelector("#a"), effect, {duration: 1.0 * 1000, fill: "forwards"}); -var a2 = new Animation( - document.querySelector("#b"), effect, {duration: 2.0 * 1000, fill: "forwards"}); -var a3 = new Animation( - document.querySelector("#c"), effect, {duration: 1.0 * 1000, fill: "forwards"}); -var a4 = new Animation( - document.querySelector("#d"), effect, {duration: 2.0 * 1000, fill: "forwards"}); -var pgroup1 = new AnimationGroup([a1, a2], {name: "p1", fill: "forwards"}); -var pgroup2 = new AnimationGroup([a4, a3], {name: "p2", fill: "forwards"}); -document.timeline.play( - new AnimationSequence([pgroup1, pgroup2], {name: "s", fill: "forwards"})); - -</script> diff --git a/third_party/polymer/components/web-animations-js/test/testcases/auto-test-shorthand-checks.js b/third_party/polymer/components/web-animations-js/test/testcases/auto-test-shorthand-checks.js deleted file mode 100644 index b1bef7e..0000000 --- a/third_party/polymer/components/web-animations-js/test/testcases/auto-test-shorthand-checks.js +++ /dev/null @@ -1,197 +0,0 @@ -timing_test(function() { - at(0 * 1000, function() { - assert_styles("#background.test",{'backgroundImage':'none','backgroundPosition':'0% 0%','backgroundSize':'auto','backgroundRepeat':'repeat','backgroundAttachment':'scroll','backgroundOrigin':'padding-box','backgroundClip':'border-box','backgroundColor':'rgb(176, 196, 222)'}); - }, "#background"); - at(0 * 1000, function() { - assert_styles("#border.test",{'borderTopColor':'rgb(0, 0, 0)','borderTopStyle':'none','borderTopWidth':'0px','borderRightColor':'rgb(0, 0, 0)','borderRightStyle':'none','borderRightWidth':'0px','borderBottomColor':'rgb(0, 0, 0)','borderBottomStyle':'none','borderBottomWidth':'0px','borderLeftColor':'rgb(0, 0, 0)','borderLeftStyle':'none','borderLeftWidth':'0px'}); - }, "#border"); - at(0 * 1000, function() { - assert_styles("#borderBottom.test",{'borderBottomWidth':'0px','borderBottomStyle':'none','borderBottomColor':'rgb(0, 0, 0)'}); - }, "#borderBottom"); - at(0 * 1000, function() { - assert_styles("#borderColor.test",{'borderTopColor':'rgb(0, 0, 0)','borderRightColor':'rgb(0, 0, 0)','borderBottomColor':'rgb(0, 0, 0)','borderLeftColor':'rgb(0, 0, 0)'}); - }, "#borderColor"); - at(0 * 1000, function() { - assert_styles("#borderLeft.test",{'borderLeftWidth':'0px','borderLeftStyle':'none','borderLeftColor':'rgb(0, 0, 0)'}); - }, "#borderLeft"); - at(0 * 1000, function() { - assert_styles("#borderRadius.test",{'borderTopLeftRadius':'0px','borderTopRightRadius':'0px','borderBottomRightRadius':'0px','borderBottomLeftRadius':'0px'}); - }, "#borderRadius"); - at(0 * 1000, function() { - assert_styles("#borderRight.test",{'borderRightWidth':'0px','borderRightStyle':'none','borderRightColor':'rgb(0, 0, 0)'}); - }, "#borderRight"); - at(0 * 1000, function() { - assert_styles("#borderTop.test",{'borderTopWidth':'0px','borderTopStyle':'none','borderTopColor':'rgb(0, 0, 0)'}); - }, "#borderTop"); - at(0 * 1000, function() { - assert_styles("#borderWidth.test",{'borderTopWidth':'3px','borderRightWidth':'3px','borderBottomWidth':'3px','borderLeftWidth':'3px'}); - }, "#borderWidth"); - at(0 * 1000, function() { - assert_styles("#font.test",{'fontFamily':'\'DejaVu Sans\', \'Bitstream Vera Sans\', Arial, Sans','fontSize':'16px','fontStyle':'normal','fontVariant':'normal','fontWeight':'normal','lineHeight':'19.2000px'}); - }, "#font"); - at(0 * 1000, function() { - assert_styles("#margin.test",{'marginTop':'0px','marginRight':'10px','marginBottom':'0px','marginLeft':'0px'}); - }, "#margin"); - at(0 * 1000, function() { - assert_styles("#outline.test",{'outlineColor':'rgb(0, 0, 0)','outlineStyle':'none','outlineWidth':'0px'}); - }, "#outline"); - at(0 * 1000, function() { - assert_styles("#padding.test",{'paddingTop':'0px','paddingRight':'0px','paddingBottom':'0px','paddingLeft':'0px'}); - }, "#padding"); - at(0.5 * 1000, function() { - assert_styles("#background.test",{'backgroundImage':'none','backgroundPosition':'12.5% 6.25%','backgroundSize':'auto','backgroundRepeat':'repeat','backgroundAttachment':'scroll','backgroundOrigin':'padding-box','backgroundClip':'border-box','backgroundColor':'rgb(132, 179, 167)'}); - }, "#background"); - at(0.5 * 1000, function() { - assert_styles("#border.test",{'borderTopColor':'rgb(0, 32, 0)','borderTopStyle':'none','borderTopWidth':'0px','borderRightColor':'rgb(0, 32, 0)','borderRightStyle':'none','borderRightWidth':'0px','borderBottomColor':'rgb(0, 32, 0)','borderBottomStyle':'none','borderBottomWidth':'0px','borderLeftColor':'rgb(0, 32, 0)','borderLeftStyle':'none','borderLeftWidth':'0px'}); - }, "#border"); - at(0.5 * 1000, function() { - assert_styles("#borderBottom.test",{'borderBottomWidth':'0px','borderBottomStyle':'none','borderBottomColor':'rgb(0, 32, 0)'}); - }, "#borderBottom"); - at(0.5 * 1000, function() { - assert_styles("#borderColor.test",{'borderTopColor':'rgb(0, 64, 0)','borderRightColor':'rgb(36, 60, 36)','borderBottomColor':'rgb(0, 25, 0)','borderLeftColor':'rgb(0, 32, 0)'}); - }, "#borderColor"); - at(0.5 * 1000, function() { - assert_styles("#borderLeft.test",{'borderLeftWidth':'0px','borderLeftStyle':'none','borderLeftColor':'rgb(0, 32, 0)'}); - }, "#borderLeft"); - at(0.5 * 1000, function() { - assert_styles("#borderRadius.test",{'borderTopLeftRadius':'2.5px','borderTopRightRadius':'5px','borderBottomRightRadius':'calc(0px + 2.5%)','borderBottomLeftRadius':'calc(0px + 12.5%)'}); - }, "#borderRadius"); - at(0.5 * 1000, function() { - assert_styles("#borderRight.test",{'borderRightWidth':'0px','borderRightStyle':'none','borderRightColor':'rgb(0, 32, 0)'}); - }, "#borderRight"); - at(0.5 * 1000, function() { - assert_styles("#borderTop.test",{'borderTopWidth':'0px','borderTopStyle':'none','borderTopColor':'rgb(0, 32, 0)'}); - }, "#borderTop"); - at(0.5 * 1000, function() { - assert_styles("#borderWidth.test",{'borderTopWidth':'2px','borderRightWidth':'3px','borderBottomWidth':'3px','borderLeftWidth':'4px'}); - }, "#borderWidth"); - at(0.5 * 1000, function() { - assert_styles("#font.test",{'fontFamily':'\'DejaVu Sans\', \'Bitstream Vera Sans\', Arial, Sans','fontSize':'19.2000px','fontStyle':'normal','fontVariant':'normal','fontWeight':'500','lineHeight':'26.1333px'}); - }, "#font"); - at(0.5 * 1000, function() { - assert_styles("#margin.test",{'marginTop':'1.25px','marginRight':'10px','marginBottom':'3.75px','marginLeft':'5px'}); - }, "#margin"); - at(0.5 * 1000, function() { - assert_styles("#outline.test",{'outlineColor':'rgb(0, 32, 0)','outlineStyle':'none','outlineWidth':'0px'}); - }, "#outline"); - at(0.5 * 1000, function() { - assert_styles("#padding.test",{'paddingTop':'1.25px','paddingRight':'2.5px','paddingBottom':'3.75px','paddingLeft':'5px'}); - }, "#padding"); - at(1 * 1000, function() { - assert_styles("#background.test",{'backgroundPosition':'25% 12.5%','backgroundSize':'auto','backgroundRepeat':'repeat-y','backgroundAttachment':'scroll','backgroundOrigin':'padding-box','backgroundClip':'border-box','backgroundColor':'rgb(88, 162, 111)'}); - }, "#background"); - at(1 * 1000, function() { - assert_styles("#border.test",{'borderTopColor':'rgb(0, 64, 0)','borderTopStyle':'solid','borderTopWidth':'2px','borderRightColor':'rgb(0, 64, 0)','borderRightStyle':'solid','borderRightWidth':'2px','borderBottomColor':'rgb(0, 64, 0)','borderBottomStyle':'solid','borderBottomWidth':'2px','borderLeftColor':'rgb(0, 64, 0)','borderLeftStyle':'solid','borderLeftWidth':'2px'}); - }, "#border"); - at(1 * 1000, function() { - assert_styles("#borderBottom.test",{'borderBottomWidth':'2px','borderBottomStyle':'solid','borderBottomColor':'rgb(0, 64, 0)'}); - }, "#borderBottom"); - at(1 * 1000, function() { - assert_styles("#borderColor.test",{'borderTopColor':'rgb(0, 128, 0)','borderRightColor':'rgb(72, 119, 72)','borderBottomColor':'rgb(0, 50, 0)','borderLeftColor':'rgb(0, 64, 0)'}); - }, "#borderColor"); - at(1 * 1000, function() { - assert_styles("#borderLeft.test",{'borderLeftWidth':'2px','borderLeftStyle':'solid','borderLeftColor':'rgb(0, 64, 0)'}); - }, "#borderLeft"); - at(1 * 1000, function() { - assert_styles("#borderRadius.test",{'borderTopLeftRadius':'5px','borderTopRightRadius':'10px','borderBottomRightRadius':'calc(0px + 5%)','borderBottomLeftRadius':'calc(0px + 25%)'}); - }, "#borderRadius"); - at(1 * 1000, function() { - assert_styles("#borderRight.test",{'borderRightWidth':'2px','borderRightStyle':'solid','borderRightColor':'rgb(0, 64, 0)'}); - }, "#borderRight"); - at(1 * 1000, function() { - assert_styles("#borderTop.test",{'borderTopWidth':'2px','borderTopStyle':'solid','borderTopColor':'rgb(0, 64, 0)'}); - }, "#borderTop"); - at(1 * 1000, function() { - assert_styles("#borderWidth.test",{'borderTopWidth':'2px','borderRightWidth':'3px','borderBottomWidth':'4px','borderLeftWidth':'6px'}); - }, "#borderWidth"); - at(1 * 1000, function() { - assert_styles("#font.test",{'fontFamily':'serif','fontSize':'21px','fontStyle':'italic','fontVariant':'normal','fontWeight':'600','lineHeight':'34.1333px'}); - }, "#font"); - at(1 * 1000, function() { - assert_styles("#margin.test",{'marginTop':'2.5px','marginRight':'10px','marginBottom':'7.5px','marginLeft':'10px'}); - }, "#margin"); - at(1 * 1000, function() { - assert_styles("#outline.test",{'outlineColor':'rgb(0, 64, 0)','outlineStyle':'solid','outlineWidth':'2px'}); - }, "#outline"); - at(1 * 1000, function() { - assert_styles("#padding.test",{'paddingTop':'2.5px','paddingRight':'5px','paddingBottom':'7.5px','paddingLeft':'10px'}); - }, "#padding"); - at(1.5 * 1000, function() { - assert_styles("#background.test",{'backgroundPosition':'37.5% 18.75%','backgroundSize':'auto','backgroundRepeat':'repeat-y','backgroundAttachment':'scroll','backgroundOrigin':'padding-box','backgroundClip':'border-box','backgroundColor':'rgb(44, 145, 56)'}); - }, "#background"); - at(1.5 * 1000, function() { - assert_styles("#border.test",{'borderTopColor':'rgb(0, 96, 0)','borderTopStyle':'solid','borderTopWidth':'3px','borderRightColor':'rgb(0, 96, 0)','borderRightStyle':'solid','borderRightWidth':'3px','borderBottomColor':'rgb(0, 96, 0)','borderBottomStyle':'solid','borderBottomWidth':'3px','borderLeftColor':'rgb(0, 96, 0)','borderLeftStyle':'solid','borderLeftWidth':'3px'}); - }, "#border"); - at(1.5 * 1000, function() { - assert_styles("#borderBottom.test",{'borderBottomWidth':'3px','borderBottomStyle':'solid','borderBottomColor':'rgb(0, 96, 0)'}); - }, "#borderBottom"); - at(1.5 * 1000, function() { - assert_styles("#borderColor.test",{'borderTopColor':'rgb(0, 191, 0)','borderRightColor':'rgb(108, 179, 108)','borderBottomColor':'rgb(0, 75, 0)','borderLeftColor':'rgb(0, 96, 0)'}); - }, "#borderColor"); - at(1.5 * 1000, function() { - assert_styles("#borderLeft.test",{'borderLeftWidth':'3px','borderLeftStyle':'solid','borderLeftColor':'rgb(0, 96, 0)'}); - }, "#borderLeft"); - at(1.5 * 1000, function() { - assert_styles("#borderRadius.test",{'borderTopLeftRadius':'7.5px','borderTopRightRadius':'15px','borderBottomRightRadius':'calc(0px + 7.5%)','borderBottomLeftRadius':'calc(0px + 37.5%)'}); - }, "#borderRadius"); - at(1.5 * 1000, function() { - assert_styles("#borderRight.test",{'borderRightWidth':'3px','borderRightStyle':'solid','borderRightColor':'rgb(0, 96, 0)'}); - }, "#borderRight"); - at(1.5 * 1000, function() { - assert_styles("#borderTop.test",{'borderTopWidth':'3px','borderTopStyle':'solid','borderTopColor':'rgb(0, 96, 0)'}); - }, "#borderTop"); - at(1.5 * 1000, function() { - assert_styles("#borderWidth.test",{'borderTopWidth':'1px','borderRightWidth':'3px','borderBottomWidth':'4px','borderLeftWidth':'8px'}); - }, "#borderWidth"); - at(1.5 * 1000, function() { - assert_styles("#font.test",{'fontFamily':'serif','fontSize':'24px','fontStyle':'italic','fontVariant':'normal','fontWeight':'600','lineHeight':'43.2000px'}); - }, "#font"); - at(1.5 * 1000, function() { - assert_styles("#margin.test",{'marginTop':'3.75px','marginRight':'10px','marginBottom':'11.25px','marginLeft':'15px'}); - }, "#margin"); - at(1.5 * 1000, function() { - assert_styles("#outline.test",{'outlineColor':'rgb(0, 96, 0)','outlineStyle':'solid','outlineWidth':'3px'}); - }, "#outline"); - at(1.5 * 1000, function() { - assert_styles("#padding.test",{'paddingTop':'3.75px','paddingRight':'7.5px','paddingBottom':'11.25px','paddingLeft':'15px'}); - }, "#padding"); - at(2 * 1000, function() { - assert_styles("#background.test",{'backgroundPosition':'50% 25%','backgroundSize':'auto','backgroundRepeat':'repeat-y','backgroundAttachment':'scroll','backgroundOrigin':'padding-box','backgroundClip':'border-box','backgroundColor':'rgb(0, 128, 0)'}); - }, "#background"); - at(2 * 1000, function() { - assert_styles("#border.test",{'borderTopColor':'rgb(0, 128, 0)','borderTopStyle':'solid','borderTopWidth':'4px','borderRightColor':'rgb(0, 128, 0)','borderRightStyle':'solid','borderRightWidth':'4px','borderBottomColor':'rgb(0, 128, 0)','borderBottomStyle':'solid','borderBottomWidth':'4px','borderLeftColor':'rgb(0, 128, 0)','borderLeftStyle':'solid','borderLeftWidth':'4px'}); - }, "#border"); - at(2 * 1000, function() { - assert_styles("#borderBottom.test",{'borderBottomWidth':'4px','borderBottomStyle':'solid','borderBottomColor':'rgb(0, 128, 0)'}); - }, "#borderBottom"); - at(2 * 1000, function() { - assert_styles("#borderColor.test",{'borderTopColor':'rgb(0, 255, 0)','borderRightColor':'rgb(144, 238, 144)','borderBottomColor':'rgb(0, 100, 0)','borderLeftColor':'rgb(0, 128, 0)'}); - }, "#borderColor"); - at(2 * 1000, function() { - assert_styles("#borderLeft.test",{'borderLeftWidth':'4px','borderLeftStyle':'solid','borderLeftColor':'rgb(0, 128, 0)'}); - }, "#borderLeft"); - at(2 * 1000, function() { - assert_styles("#borderRadius.test",{'borderTopLeftRadius':'10px','borderTopRightRadius':'20px','borderBottomRightRadius':'10%','borderBottomLeftRadius':'50%'}); - }, "#borderRadius"); - at(2 * 1000, function() { - assert_styles("#borderRight.test",{'borderRightWidth':'4px','borderRightStyle':'solid','borderRightColor':'rgb(0, 128, 0)'}); - }, "#borderRight"); - at(2 * 1000, function() { - assert_styles("#borderTop.test",{'borderTopWidth':'4px','borderTopStyle':'solid','borderTopColor':'rgb(0, 128, 0)'}); - }, "#borderTop"); - at(2 * 1000, function() { - assert_styles("#borderWidth.test",{'borderTopWidth':'1px','borderRightWidth':'3px','borderBottomWidth':'5px','borderLeftWidth':'10px'}); - }, "#borderWidth"); - at(2 * 1000, function() { - assert_styles("#font.test",{'fontFamily':'serif','fontSize':'27px','fontStyle':'italic','fontVariant':'normal','fontWeight':'bold','lineHeight':'53.3333px'}); - }, "#font"); - at(2 * 1000, function() { - assert_styles("#margin.test",{'marginTop':'5px','marginRight':'10px','marginBottom':'15px','marginLeft':'20px'}); - }, "#margin"); - at(2 * 1000, function() { - assert_styles("#outline.test",{'outlineColor':'rgb(0, 128, 0)','outlineStyle':'solid','outlineWidth':'5px'}); - }, "#outline"); - at(2 * 1000, function() { - assert_styles("#padding.test",{'paddingTop':'5px','paddingRight':'10px','paddingBottom':'15px','paddingLeft':'20px'}); - }, "#padding"); -}, "Auto generated tests"); diff --git a/third_party/polymer/components/web-animations-js/test/testcases/auto-test-shorthand.html b/third_party/polymer/components/web-animations-js/test/testcases/auto-test-shorthand.html deleted file mode 100644 index 951bcee..0000000 --- a/third_party/polymer/components/web-animations-js/test/testcases/auto-test-shorthand.html +++ /dev/null @@ -1,115 +0,0 @@ -<!-- -Copyright 2013 Google Inc. All Rights Reserved. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. ---> - -<!DOCTYPE html><meta charset="UTF-8"> -<style> -#container { - -webkit-column-width: 250px; - -moz-column-width: 250px; - column-width: 250px; -} - -p { - display: inline-block; -} - -.test, .ref { - background-color: lightsteelblue; - display: inline-block; - width: 100px; - height: 100px; - margin-right: 10px; -} - -#borderWidth, #borderColor { - border-style: solid; -} -#borderWidth { - border-color: green; -} - -</style> -<script> -var expected_failures = [ - { - browser_configurations: [{ firefox: true }], - tests: ['#font at t=(0|500|1000|1500|2000)ms'], - message: 'Floating point issues.', - }, { - browser_configurations: [{ firefox: true }], - tests: ['#background at t=(0|500|1000|1500|2000)ms'], - message: 'Setting background to "auto" gets back "auto auto".', - }, { - browser_configurations: [{ msie: true }], - tests: [ - '#((?!(borderWidth|borderRadius|margin|padding)).*) at t=(0|500|1000|1500|2)ms', - '#borderWidth at t=(500|1000|1500)ms', - ], - message: 'IE returns rgba.', - }, { - browser_configurations: [{ chrome: true, version: '30|31' }], - tests: ['#font'], - message: 'Different initial font-size.', - } -]; -</script> -<script src="../bootstrap.js"></script> -<div id="container"></div> -<script> -"use strict"; - -var testCases = { - background: 'url(background.png) 50% 25% repeat-y green', - border: 'green solid 4px', - borderColor: 'lime lightgreen darkgreen green', - borderLeft: 'green solid 4px', - borderRight: 'green solid 4px', - borderTop: 'green solid 4px', - borderBottom: 'green solid 4px', - borderRadius: '10px 20px 10% 50%', - borderWidth: 'thin medium thick 10px', - font: 'italic bold 20pt / 200% serif', - margin: '5px 10px 15px 20px', - outline: 'green solid 5px', - padding: '5px 10px 15px 20px', -}; - -var container = document.querySelector('#container'); - -for (var shorthand in testCases) { - var p = document.createElement('p'); - var value = testCases[shorthand]; - p.appendChild(document.createTextNode(shorthand)); - p.appendChild(document.createElement('br')); - var refDiv = document.createElement('div'); - refDiv.id = shorthand; - refDiv.style[shorthand] = value; - refDiv.className = 'ref'; - refDiv.appendChild(document.createTextNode('Ref')); - p.appendChild(refDiv); - var testDiv = document.createElement('div'); - testDiv.id = shorthand; - testDiv.className = 'test'; - testDiv.appendChild(document.createTextNode('Test')); - p.appendChild(testDiv); - container.appendChild(p); - - var keyframe = {}; - keyframe[shorthand] = value; - document.timeline.play(new Animation(testDiv, [keyframe], {duration: 2 * 1000, fill: 'forwards'})); -} - -</script> diff --git a/third_party/polymer/components/web-animations-js/test/testcases/auto-test-start-time-checks.js b/third_party/polymer/components/web-animations-js/test/testcases/auto-test-start-time-checks.js deleted file mode 100644 index 62dff63..0000000 --- a/third_party/polymer/components/web-animations-js/test/testcases/auto-test-start-time-checks.js +++ /dev/null @@ -1,58 +0,0 @@ -timing_test(function() { - at(0 * 1000, function() { - assert_styles( - '.anim', - [{'left':'100px'}, - {'left':'100px'}, - {'left':'300px'}, - {'left':'300px'}]); - }, "Autogenerated"); - at(0.4 * 1000, function() { - assert_styles( - '.anim', - [{'left':'180px'}, - {'left':'180px'}, - {'left':'220px'}, - {'left':'220px'}]); - }, "Autogenerated"); - at(0.8 * 1000, function() { - assert_styles( - '.anim', - [{'left':'260px'}, - {'left':'260px'}, - {'left':'140px'}, - {'left':'140px'}]); - }, "Autogenerated"); - at(1.2000000000000002 * 1000, function() { - assert_styles( - '.anim', - [{'left':'140px'}, - {'left':'140px'}, - {'left':'260px'}, - {'left':'260px'}]); - }, "Autogenerated"); - at(1.6 * 1000, function() { - assert_styles( - '.anim', - [{'left':'220px'}, - {'left':'220px'}, - {'left':'180px'}, - {'left':'180px'}]); - }, "Autogenerated"); - at(2 * 1000, function() { - assert_styles( - '.anim', - [{'left':'300px'}, - {'left':'300px'}, - {'left':'100px'}, - {'left':'100px'}]); - }, "Autogenerated"); - at(2.4 * 1000, function() { - assert_styles( - '.anim', - [{'left':'300px'}, - {'left':'300px'}, - {'left':'100px'}, - {'left':'100px'}]); - }, "Autogenerated"); -}, "Autogenerated checks."); diff --git a/third_party/polymer/components/web-animations-js/test/testcases/auto-test-start-time-iterations-checks.js b/third_party/polymer/components/web-animations-js/test/testcases/auto-test-start-time-iterations-checks.js deleted file mode 100644 index 2d01ddc..0000000 --- a/third_party/polymer/components/web-animations-js/test/testcases/auto-test-start-time-iterations-checks.js +++ /dev/null @@ -1,92 +0,0 @@ -timing_test(function() { - at(0 * 1000, function() { - assert_styles("#normal_a",{'left':'0px'}); - assert_styles("#normal_b",{'left':'0px'}); - assert_styles("#reverse_a",{'left':'0px'}); - assert_styles("#reverse_b",{'left':'0px'}); - assert_styles("#alternate_a",{'left':'0px'}); - assert_styles("#alternate_b",{'left':'0px'}); - assert_styles("#alternate-reverse_a",{'left':'0px'}); - assert_styles("#alternate-reverse_b",{'left':'0px'}); - }); - at(1 * 1000, function() { - assert_styles("#normal_a",{'left':'200px'}); - assert_styles("#normal_b",{'left':'500px'}); - assert_styles("#reverse_a",{'left':'400px'}); - assert_styles("#reverse_b",{'left':'500px'}); - assert_styles("#alternate_a",{'left':'200px'}); - assert_styles("#alternate_b",{'left':'500px'}); - assert_styles("#alternate-reverse_a",{'left':'400px'}); - assert_styles("#alternate-reverse_b",{'left':'500px'}); - }); - at(2 * 1000, function() { - assert_styles("#normal_a",{'left':'200px'}); - assert_styles("#normal_b",{'left':'500px'}); - assert_styles("#reverse_a",{'left':'400px'}); - assert_styles("#reverse_b",{'left':'500px'}); - assert_styles("#alternate_a",{'left':'400px'}); - assert_styles("#alternate_b",{'left':'500px'}); - assert_styles("#alternate-reverse_a",{'left':'200px'}); - assert_styles("#alternate-reverse_b",{'left':'500px'}); - }); - at(3 * 1000, function() { - assert_styles("#normal_a",{'left':'500px'}); - assert_styles("#normal_b",{'left':'500px'}); - assert_styles("#reverse_a",{'left':'100px'}); - assert_styles("#reverse_b",{'left':'500px'}); - assert_styles("#alternate_a",{'left':'100px'}); - assert_styles("#alternate_b",{'left':'500px'}); - assert_styles("#alternate-reverse_a",{'left':'500px'}); - assert_styles("#alternate-reverse_b",{'left':'500px'}); - }); - at(4 * 1000, function() { - assert_styles("#normal_a",{'left':'500px'}); - assert_styles("#normal_b",{'left':'100px'}); - assert_styles("#reverse_a",{'left':'100px'}); - assert_styles("#reverse_b",{'left':'500px'}); - assert_styles("#alternate_a",{'left':'100px'}); - assert_styles("#alternate_b",{'left':'500px'}); - assert_styles("#alternate-reverse_a",{'left':'500px'}); - assert_styles("#alternate-reverse_b",{'left':'100px'}); - }); - at(5 * 1000, function() { - assert_styles("#normal_a",{'left':'500px'}); - assert_styles("#normal_b",{'left':'500px'}); - assert_styles("#reverse_a",{'left':'100px'}); - assert_styles("#reverse_b",{'left':'500px'}); - assert_styles("#alternate_a",{'left':'100px'}); - assert_styles("#alternate_b",{'left':'500px'}); - assert_styles("#alternate-reverse_a",{'left':'500px'}); - assert_styles("#alternate-reverse_b",{'left':'500px'}); - }); - at(6 * 1000, function() { - assert_styles("#normal_a",{'left':'500px'}); - assert_styles("#normal_b",{'left':'500px'}); - assert_styles("#reverse_a",{'left':'100px'}); - assert_styles("#reverse_b",{'left':'500px'}); - assert_styles("#alternate_a",{'left':'100px'}); - assert_styles("#alternate_b",{'left':'500px'}); - assert_styles("#alternate-reverse_a",{'left':'500px'}); - assert_styles("#alternate-reverse_b",{'left':'500px'}); - }); - at(7 * 1000, function() { - assert_styles("#normal_a",{'left':'500px'}); - assert_styles("#normal_b",{'left':'500px'}); - assert_styles("#reverse_a",{'left':'100px'}); - assert_styles("#reverse_b",{'left':'500px'}); - assert_styles("#alternate_a",{'left':'100px'}); - assert_styles("#alternate_b",{'left':'500px'}); - assert_styles("#alternate-reverse_a",{'left':'500px'}); - assert_styles("#alternate-reverse_b",{'left':'500px'}); - }); - at(8 * 1000, function() { - assert_styles("#normal_a",{'left':'500px'}); - assert_styles("#normal_b",{'left':'500px'}); - assert_styles("#reverse_a",{'left':'100px'}); - assert_styles("#reverse_b",{'left':'100px'}); - assert_styles("#alternate_a",{'left':'100px'}); - assert_styles("#alternate_b",{'left':'100px'}); - assert_styles("#alternate-reverse_a",{'left':'500px'}); - assert_styles("#alternate-reverse_b",{'left':'500px'}); - }); -}, "Auto generated tests"); diff --git a/third_party/polymer/components/web-animations-js/test/testcases/auto-test-start-time-iterations.html b/third_party/polymer/components/web-animations-js/test/testcases/auto-test-start-time-iterations.html deleted file mode 100644 index b850a30..0000000 --- a/third_party/polymer/components/web-animations-js/test/testcases/auto-test-start-time-iterations.html +++ /dev/null @@ -1,107 +0,0 @@ -<!-- -Copyright 2012 Google Inc. All Rights Reserved. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. ---> - -<!DOCTYPE html><meta charset="UTF-8"> -<style> -.animContainer { - position: absolute; - left: 0px; -} - -.anim { - left: 0px; - width: 100px; - height: 25px; - background-color: #FAA; - position: relative; -} - -.expected { - border-right: 1px solid black; -} - -#normal { - top: 50px; -} - -#reverse { - top: 150px; -} - -#alternate { - top: 250px; -} - -#alternate-reverse { - top: 350px; -} - -</style> - -<div>Right edge of each box should align with black line at end of test. Note -that the position of the last element in each group is approximate.</div> - -<div class="animContainer" id="normal"> - <div style="width: 600px;" class="expected"><div id="normal_a" class="anim"></div></div> - <div style="width: 600px;" class="expected"><div id="normal_b" class="anim"></div></div> -</div> - -<div class="animContainer" id="reverse"> - <div style="width: 200px;" class="expected"><div id="reverse_a" class="anim"></div></div> - <div style="width: 200px;" class="expected"><div id="reverse_b" class="anim"></div></div> -</div> - -<div class="animContainer" id="alternate"> - <div style="width: 200px;" class="expected"><div id="alternate_a" class="anim"></div></div> - <div style="width: 200px;" class="expected"><div id="alternate_b" class="anim"></div></div> -</div> - -<div class="animContainer" id="alternate-reverse"> - <div style="width: 600px;" class="expected"><div id="alternate-reverse_a" class="anim"></div></div> - <div style="width: 600px;" class="expected"><div id="alternate-reverse_b" class="anim"></div></div> -</div> - -<script src="../bootstrap.js"></script> -<script> -"use strict"; - -var directions = ["normal", "reverse", "alternate", "alternate-reverse"]; - -var animation = [{left: "100px"}, {left: "500px"}]; - -for (var i = 0; i < directions.length; i++) { - var direction = directions[i]; - var container = document.getElementById(direction); - - // Interaction of default start time with parent iterations. At the time of - // addition, the child picks up a start time of zero. The parent then updates - // its duration and its iteration time jumps, causing the child to start - // playing part way through the animation. - var intrinsicGroup = new AnimationGroup([], {iterations: 2.0, direction: direction}); - document.timeline.play(intrinsicGroup); - var fixedGroup = new AnimationGroup([], {iterations: 2.0, direction: direction, duration: 4.0 * 1000}); - document.timeline.play(fixedGroup); - - timing_test(function() { - at(0.75 * 1000, (function(container, direction, intrinsicGroup, fixedGroup) { - return function() { - intrinsicGroup.append(new Animation(document.getElementById(direction + '_a'), animation, {duration: 1.0 * 1000, fill: 'forwards'})); - fixedGroup.append(new Animation(document.getElementById(direction + '_b'), animation, {duration: 1.0 * 1000, fill: 'forwards'})); - }; - })(container, direction, intrinsicGroup, fixedGroup)); - }); -} -</script> diff --git a/third_party/polymer/components/web-animations-js/test/testcases/auto-test-start-time.html b/third_party/polymer/components/web-animations-js/test/testcases/auto-test-start-time.html deleted file mode 100644 index fc3f2b5..0000000 --- a/third_party/polymer/components/web-animations-js/test/testcases/auto-test-start-time.html +++ /dev/null @@ -1,90 +0,0 @@ -<!-- -Copyright 2012 Google Inc. All Rights Reserved. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. ---> - -<!DOCTYPE html><meta charset="UTF-8"> -<style> -.animContainer { - position: absolute; - left: 0px; - height: 225px; -} - -.expected { - border-right: 1px solid black; -} - -.anim { - left: 0px; - width: 100px; - height: 25px; - background-color: #FAA; - position: relative; -} - -#ca { - top: 50px; - width: 400px; -} - -#cb { - top: 150px; - width: 200px; -} - -</style> - -<div>Right edge of each box should align with black line at end of test.</div> - -<div class="animContainer" id="ca"> - <div style="width: 400px;" class="expected"><div class="anim a" id="a"></div> - </div> - <div style="width: 400px;" class="expected"><div class="anim b" id="b"></div> - </div> -</div> - -<div class="animContainer" id="cb"> - <div style="width: 200px;" class="expected"><div class="anim a" id="c"></div> - </div> - <div style="width: 200px;" class="expected"><div class="anim b" id="d"></div> - </div> -</div> - -<div style="height:200px;"></div> - -<script src="../bootstrap.js"></script> -<script> -"use strict"; - -var containers = ["ca", "cb"]; - -var directions = ["normal", "reverse"]; - -var animation = [{left: "100px"}, {left: "300px"}]; - -for (var i = 0; i < directions.length; i++) { - var container = document.getElementById(containers[i]); - // Explicit parent duration. - document.timeline.play(new AnimationGroup( - [new Animation(container.getElementsByClassName("a")[0], animation, - {duration: 1.0 * 1000, fill: 'forwards'})], - {iterations: 2.0, direction: directions[i], duration: 1.0 * 1000})); - // Parent calculates intrinsic duration. - document.timeline.play(new AnimationGroup( - [new Animation(container.getElementsByClassName("b")[0], animation, - {duration: 1.0 * 1000, fill: 'forwards'})], - {iterations: 2.0, direction: directions[i]})); -} -</script> diff --git a/third_party/polymer/components/web-animations-js/test/testcases/auto-test-svg-anim-checks.js b/third_party/polymer/components/web-animations-js/test/testcases/auto-test-svg-anim-checks.js deleted file mode 100644 index cefc44c..0000000 --- a/third_party/polymer/components/web-animations-js/test/testcases/auto-test-svg-anim-checks.js +++ /dev/null @@ -1,23 +0,0 @@ -timing_test(function() { - at(0 * 1000, function() { - assert_styles('.anim', {'x':'100px', 'height':'10px'}); - }, "Autogenerated"); - at(0.2 * 1000, function() { - assert_styles('.anim', {'x':'160px', 'height':'16px'}); - }, "Autogenerated"); - at(0.4 * 1000, function() { - assert_styles('.anim', {'x':'220px', 'height':'22px'}); - }, "Autogenerated"); - at(0.6000000000000001 * 1000, function() { - assert_styles('.anim', {'x':'280px', 'height':'28px'}); - }, "Autogenerated"); - at(0.8 * 1000, function() { - assert_styles('.anim', {'x':'340px', 'height':'34px'}); - }, "Autogenerated"); - at(1 * 1000, function() { - assert_styles('.anim', {'x':'400px', 'height':'40px'}); - }, "Autogenerated"); - at(1.2 * 1000, function() { - assert_styles('.anim', {'x':'400px', 'height':'40px'}); - }, "Autogenerated"); -}, "Autogenerated checks."); diff --git a/third_party/polymer/components/web-animations-js/test/testcases/auto-test-svg-anim.html b/third_party/polymer/components/web-animations-js/test/testcases/auto-test-svg-anim.html deleted file mode 100644 index d948718..0000000 --- a/third_party/polymer/components/web-animations-js/test/testcases/auto-test-svg-anim.html +++ /dev/null @@ -1,39 +0,0 @@ -<!-- -Copyright 2012 Google Inc. All Rights Reserved. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. ---> - -<!DOCTYPE html><meta charset="UTF-8"> -<style> -.anim { - fill: lightsteelblue; -} - -.expectation { - fill: red; -} -</style> -<svg width="600px" height="200px"> - <rect class="expectation" x="400px" y="10px" width="100px" height="40px"> - </rect> - <rect class="anim" x="100px" y="10px" width="100px" height="10px"></rect> -</svg> -<script src="../bootstrap.js"></script> -<script> -"use strict"; -var rect = document.querySelector(".anim") - -document.timeline.play(new Animation(rect, {x: "400px", height: "40px"}, {duration: 1 * 1000, fill: 'forwards'})); - -</script> diff --git a/third_party/polymer/components/web-animations-js/test/testcases/auto-test-svg-circle-checks.js b/third_party/polymer/components/web-animations-js/test/testcases/auto-test-svg-circle-checks.js deleted file mode 100644 index f289573..0000000 --- a/third_party/polymer/components/web-animations-js/test/testcases/auto-test-svg-circle-checks.js +++ /dev/null @@ -1,23 +0,0 @@ -timing_test(function() { - at(0 * 1000, function() { - assert_styles('.anim', {'cx':'60px', 'cy':'60px', 'r':'50px'}); - }, "Autogenerated"); - at(0.2 * 1000, function() { - assert_styles('.anim', {'cx':'128px', 'cy':'65px', 'r':'55px'}); - }, "Autogenerated"); - at(0.4 * 1000, function() { - assert_styles('.anim', {'cx':'196px', 'cy':'70px', 'r':'60px'}); - }, "Autogenerated"); - at(0.6000000000000001 * 1000, function() { - assert_styles('.anim', {'cx':'264px', 'cy':'75px', 'r':'65px'}); - }, "Autogenerated"); - at(0.8 * 1000, function() { - assert_styles('.anim', {'cx':'332px', 'cy':'80px', 'r':'70px'}); - }, "Autogenerated"); - at(1 * 1000, function() { - assert_styles('.anim', {'cx':'400px', 'cy':'85px', 'r':'75px'}); - }, "Autogenerated"); - at(1.2 * 1000, function() { - assert_styles('.anim', {'cx':'400px', 'cy':'85px', 'r':'75px'}); - }, "Autogenerated"); -}, "Autogenerated checks."); diff --git a/third_party/polymer/components/web-animations-js/test/testcases/auto-test-svg-circle.html b/third_party/polymer/components/web-animations-js/test/testcases/auto-test-svg-circle.html deleted file mode 100644 index 51dcba1..0000000 --- a/third_party/polymer/components/web-animations-js/test/testcases/auto-test-svg-circle.html +++ /dev/null @@ -1,38 +0,0 @@ -<!-- -Copyright 2012 Google Inc. All Rights Reserved. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. ---> - -<!DOCTYPE html><meta charset="UTF-8"> -<style> -.anim { - fill: lightsteelblue; -} - -.expectation { - fill: red; -} -</style> -<svg width="600px" height="200px"> - <circle class="expectation" cx="400px" cy="85px" r="75px"/> - <circle class="anim" cx="60px" cy="60px" r="50px"/> -</svg> -<script src="../bootstrap.js"></script> -<script> -"use strict"; -var rect = document.querySelector(".anim") - -document.timeline.play(new Animation(rect, {cx: "400px", cy: "85px", r: "75px"}, {duration: 1 * 1000, fill: 'forwards'})); - -</script> diff --git a/third_party/polymer/components/web-animations-js/test/testcases/auto-test-svg-color-checks.js b/third_party/polymer/components/web-animations-js/test/testcases/auto-test-svg-color-checks.js deleted file mode 100644 index aa9c9b3..0000000 --- a/third_party/polymer/components/web-animations-js/test/testcases/auto-test-svg-color-checks.js +++ /dev/null @@ -1,20 +0,0 @@ -timing_test(function() { - at(0 * 1000, function() { - assert_styles(".anim",{'stroke':'rgba(0, 240, 50, 1)'}); - }); - at(0.2 * 1000, function() { - assert_styles(".anim",{'stroke':'rgba(30, 200, 90, 1)'}); - }); - at(0.4 * 1000, function() { - assert_styles(".anim",{'stroke':'rgba(60, 160, 130, 1)'}); - }); - at(0.6000000000000001 * 1000, function() { - assert_styles(".anim",{'stroke':'rgba(90, 120, 170, 1)'}); - }); - at(0.8 * 1000, function() { - assert_styles(".anim",{'stroke':'rgba(120, 80, 210, 1)'}); - }); - at(1 * 1000, function() { - assert_styles(".anim",{'stroke':'rgba(150, 40, 250, 1)'}); - }); -}, "Auto generated tests"); diff --git a/third_party/polymer/components/web-animations-js/test/testcases/auto-test-svg-color.html b/third_party/polymer/components/web-animations-js/test/testcases/auto-test-svg-color.html deleted file mode 100644 index 55d766e..0000000 --- a/third_party/polymer/components/web-animations-js/test/testcases/auto-test-svg-color.html +++ /dev/null @@ -1,36 +0,0 @@ -<!-- -Copyright 2012 Google Inc. All Rights Reserved. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. ---> - -<!DOCTYPE html><meta charset="UTF-8"> -<style> -.anim { - fill: lightsteelblue; -} - -.expectation { - fill: red; -} -</style> -<svg width="600px" height="200px"> - <circle class="expectation" stroke-width="10" cx="400px" cy="85px" r="75px" stroke="rgba(150, 40, 250, 1)"/> - <circle class="anim" stroke-width="10" cx="60px" cy="60px" r="50px" stroke="rgba(0, 240, 50, 1)"/> -</svg> -<script src="../bootstrap.js"></script> -<script> -"use strict"; -var rect = document.querySelector(".anim") -document.timeline.play(new Animation(rect, {cx: "400px", cy: "85px", r: "75px", stroke: "rgba(150, 40, 250, 1)"}, {duration: 1000, fill: 'forwards'})); -</script> diff --git a/third_party/polymer/components/web-animations-js/test/testcases/auto-test-text-shadow-checks.js b/third_party/polymer/components/web-animations-js/test/testcases/auto-test-text-shadow-checks.js deleted file mode 100644 index f87bd8f..0000000 --- a/third_party/polymer/components/web-animations-js/test/testcases/auto-test-text-shadow-checks.js +++ /dev/null @@ -1,20 +0,0 @@ -timing_test(function() { - at(0 * 1000, function() { - assert_styles('body', {'textShadow':'rgb(255, 0, 0) 100px 100px 0px, rgb(255, 0, 0) 0px 100px 20px'}); - }, "Autogenerated"); - at(0.5 * 1000, function() { - assert_styles('body', {'textShadow':'rgba(255, 0, 0, 0.74902) 75px 75px 0px, rgba(255, 0, 0, 0.74902) 0px 75px 15px'}); - }, "Autogenerated"); - at(1 * 1000, function() { - assert_styles('body', {'textShadow':'rgba(255, 0, 0, 0.498039) 50px 50px 0px, rgba(255, 0, 0, 0.498039) 0px 50px 10px'}); - }, "Autogenerated"); - at(1.5 * 1000, function() { - assert_styles('body', {'textShadow':'rgba(255, 0, 0, 0.247059) 25px 25px 0px, rgba(255, 0, 0, 0.247059) 0px 25px 5px'}); - }, "Autogenerated"); - at(2 * 1000, function() { - assert_styles('body', {'textShadow':'rgb(0, 0, 0) 0px 0px 0px'}); - }, "Autogenerated"); - at(2.5 * 1000, function() { - assert_styles('body', {'textShadow':'rgb(0, 0, 0) 0px 0px 0px'}); - }, "Autogenerated"); -}, "Autogenerated checks."); diff --git a/third_party/polymer/components/web-animations-js/test/testcases/auto-test-text-shadow.html b/third_party/polymer/components/web-animations-js/test/testcases/auto-test-text-shadow.html deleted file mode 100644 index aed4081..0000000 --- a/third_party/polymer/components/web-animations-js/test/testcases/auto-test-text-shadow.html +++ /dev/null @@ -1,37 +0,0 @@ -<!-- -Copyright 2012 Google Inc. All Rights Reserved. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. ---> - -<!DOCTYPE html><meta charset="UTF-8"> -<body>The shadows should slide back under the text. -<script> -var expected_failures = [ - { - browser_configurations: [{ firefox: true }], - tests: ['Autogenerated at t=(500|1000|1500)ms'], - message: 'Floating point issues.', - }, { - browser_configurations: [{ msie: true }], - tests: ['Autogenerated'], - message: 'Different shadow format result.', - } -]; -</script> -<script src="../bootstrap.js"></script> -<script> -"use strict"; -document.timeline.play(new Animation(document.body, - [{textShadow: '100px 100px red, 0px 100px 20px red'}, {textShadow: '0px 0px'}], {duration: 2 * 1000, fill: 'forwards'})); -</script> diff --git a/third_party/polymer/components/web-animations-js/test/testcases/auto-test-timing-functions-checks.js b/third_party/polymer/components/web-animations-js/test/testcases/auto-test-timing-functions-checks.js deleted file mode 100644 index f292bc3..0000000 --- a/third_party/polymer/components/web-animations-js/test/testcases/auto-test-timing-functions-checks.js +++ /dev/null @@ -1,89 +0,0 @@ -timing_test(function() { - at(0 * 1000, function() { - assert_styles('.anim', {'left':'0px'}); - }, "Autogenerated"); - at(0.4 * 1000, function() { - assert_styles('.anim', {'left':'0px'}); - }, "Autogenerated"); - at(0.8 * 1000, function() { - assert_styles('.anim', {'left':'0px'}); - }, "Autogenerated"); - at(1.2000000000000002 * 1000, function() { - assert_styles( - '.anim', - [{'left':'20px'}, - {'left':'3.41483736038208px'}, - {'left':'32.11287307739258px'}, - {'left':'40.48971939086914px'}, - {'left':'66.66666412353516px'}, - {'left':'0px'}, - {'left':'0px'}, - {'left':'-48.27153778076172px'}, - {'left':'200px'}, - {'left':'0px'}, - {'left':'0px'}]); - }, "Autogenerated"); - at(1.6 * 1000, function() { - assert_styles( - '.anim', - [{'left':'60px'}, - {'left':'25.923603057861328px'}, - {'left':'89.03398132324219px'}, - {'left':'88.9017333984375px'}, - {'left':'66.66666412353516px'}, - {'left':'66.66666412353516px'}, - {'left':'0px'}, - {'left':'-51.93635177612305px'}, - {'left':'200px'}, - {'left':'0px'}, - {'left':'0px'}]); - }, "Autogenerated"); - at(2 * 1000, function() { - assert_styles( - '.anim', - [{'left':'100px'}, - {'left':'63.07688522338867px'}, - {'left':'136.92311096191406px'}, - {'left':'129.63328552246094px'}, - {'left':'133.3333282470703px'}, - {'left':'133.3333282470703px'}, - {'left':'66.66666412353516px'}, - {'left':'100px'}, - {'left':'200px'}, - {'left':'200px'}, - {'left':'0px'}]); - }, "Autogenerated"); - at(2.4 * 1000, function() { - assert_styles( - '.anim', - [{'left':'140px'}, - {'left':'110.96601867675781px'}, - {'left':'174.07640075683594px'}, - {'left':'165.04061889648438px'}, - {'left':'200px'}, - {'left':'133.3333282470703px'}, - {'left':'133.3333282470703px'}, - {'left':'251.9363555908203px'}, - {'left':'200px'}, - {'left':'200px'}, - {'left':'0px'}]); - }, "Autogenerated"); - at(2.8 * 1000, function() { - assert_styles( - '.anim', - [{'left':'180px'}, - {'left':'167.8871307373047px'}, - {'left':'196.5851593017578px'}, - {'left':'193.0833740234375px'}, - {'left':'200px'}, - {'left':'200px'}, - {'left':'133.3333282470703px'}, - {'left':'248.27154541015625px'}, - {'left':'200px'}, - {'left':'200px'}, - {'left':'0px'}]); - }, "Autogenerated"); - at(3.1999999999999997 * 1000, function() { - assert_styles('.anim', {'left':'200px'}); - }, "Autogenerated"); -}, "Autogenerated checks."); diff --git a/third_party/polymer/components/web-animations-js/test/testcases/auto-test-timing-functions.html b/third_party/polymer/components/web-animations-js/test/testcases/auto-test-timing-functions.html deleted file mode 100644 index d7fd305..0000000 --- a/third_party/polymer/components/web-animations-js/test/testcases/auto-test-timing-functions.html +++ /dev/null @@ -1,77 +0,0 @@ -<!-- -Copyright 2012 Google Inc. All Rights Reserved. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. ---> - -<!DOCTYPE html><meta charset="UTF-8"> -<style> -.anim { - left: 0px; - width: 200px; - height: 24px; - background-color: lightsteelblue; - position: relative; - border-bottom: solid white 1px; -} - -#expectation { - position: absolute; - left: 200px; - width: 200px; - height: 275px; - background: red; -} -body { margin: 0px; } -</style> - -<div id="expectation"></div> - -<div> - <div id="a" class="anim">(default)</div> - <div class="anim test" id="b">ease-in</div> - <div class="anim test" id="c">ease-out</div> - <div class="anim test" id="d">cubic-bezier(0, 0.2, 0.8, 1)</div> - <div class="anim test" id="e">steps(3, start)</div> - <div class="anim test" id="f">steps(3, middle)</div> - <div class="anim test" id="g">steps(3, end)</div> - <div class="anim test" id="h">cubic-bezier(0.5, -1.5, 0.5, 2.5)</div> - <div class="anim test" id="i">step-start</div> - <div class="anim test" id="j">step-middle</div> - <div class="anim test" id="k">step-end</div> -</div> - -<div style="height:50px"></div> - -<script> -var expected_failures = [ - { - browser_configurations: [{ msie: true }], - tests: ['Autogenerated at t=(1200.0*1|1600|2000)ms'], - message: 'Returns matrix3d.', - } -]; -</script> -<script src="../bootstrap.js"></script> -<script> -"use strict"; - -document.timeline.play(new Animation(document.querySelector("#a"), - {left: "200px"}, {delay: 1 * 1000, duration: 2 * 1000, fill: 'forwards'})); -var elems = document.querySelectorAll(".test"); -for (var i = 0; i < elems.length; i++) { - var element = elems[i]; - document.timeline.play(new Animation(element, {left: "200px"}, - {delay: 1 * 1000, duration: 2 * 1000, easing: element.textContent, fill: 'forwards'})); -} -</script> diff --git a/third_party/polymer/components/web-animations-js/test/testcases/auto-test-to-animation-checks.js b/third_party/polymer/components/web-animations-js/test/testcases/auto-test-to-animation-checks.js deleted file mode 100644 index de567f4..0000000 --- a/third_party/polymer/components/web-animations-js/test/testcases/auto-test-to-animation-checks.js +++ /dev/null @@ -1,58 +0,0 @@ -timing_test(function() { - at(0 * 1000, function() { - assert_styles( - '.anim', - [{'left':'200px'}, - {'left':'100px'}, - {'left':'0px'}, - {'left':'200px'}]); - }, "Autogenerated"); - at(0.4 * 1000, function() { - assert_styles( - '.anim', - [{'left':'180px'}, - {'left':'120px'}, - {'left':'60px'}, - {'left':'240px'}]); - }, "Autogenerated"); - at(0.8 * 1000, function() { - assert_styles( - '.anim', - [{'left':'160px'}, - {'left':'140px'}, - {'left':'120px'}, - {'left':'280px'}]); - }, "Autogenerated"); - at(1.2000000000000002 * 1000, function() { - assert_styles( - '.anim', - [{'left':'140px'}, - {'left':'160px'}, - {'left':'180px'}, - {'left':'320px'}]); - }, "Autogenerated"); - at(1.6 * 1000, function() { - assert_styles( - '.anim', - [{'left':'120px'}, - {'left':'180px'}, - {'left':'240px'}, - {'left':'360px'}]); - }, "Autogenerated"); - at(2 * 1000, function() { - assert_styles( - '.anim', - [{'left':'100px'}, - {'left':'200px'}, - {'left':'300px'}, - {'left':'400px'}]); - }, "Autogenerated"); - at(2.4 * 1000, function() { - assert_styles( - '.anim', - [{'left':'100px'}, - {'left':'200px'}, - {'left':'300px'}, - {'left':'400px'}]); - }, "Autogenerated"); -}, "Autogenerated checks."); diff --git a/third_party/polymer/components/web-animations-js/test/testcases/auto-test-to-animation.html b/third_party/polymer/components/web-animations-js/test/testcases/auto-test-to-animation.html deleted file mode 100644 index 3c29907..0000000 --- a/third_party/polymer/components/web-animations-js/test/testcases/auto-test-to-animation.html +++ /dev/null @@ -1,83 +0,0 @@ -<!-- -Copyright 2012 Google Inc. All Rights Reserved. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. ---> - -<!DOCTYPE html><meta charset="UTF-8"> -<style> -.anim { - left: 0px; - width: 100px; - height: 100px; - background-color: lightsteelblue; - position: absolute; -} - -#a { - top: 0px; - left: 200px; -} - -#b { - top: 100px; - left: 100px; -} - -#c { - top: 200px; - left: 0px; -} - -#d { - top: 300px; - left: 200px; -} - -.expectation { - background-color: red; - position: absolute; - width: 100px; - height: 100px; -} - -</style> - -<div class="expectation" style="top: 0px; left: 100px;"></div> -<div class="expectation" style="top: 100px; left: 200px;"></div> -<div class="expectation" style="top: 200px; left: 300px;"></div> -<div class="expectation" style="top: 300px; left: 400px;"></div> - -<div> - <div id="a" class="anim"></div> - <div id="b" class="anim"></div> - <div id="c" class="anim"></div> - <div id="d" class="anim"></div> -</div> - -<div style="height: 500px;"></div> - -<script src="../bootstrap.js"></script> -<script> -"use strict"; - -var divs = document.querySelectorAll(".anim"); - -var group = new AnimationGroup([], 2000); - -for (var i = 0; i < divs.length; i++) { - group.append(new Animation(divs[i], {left: (100 * (i+1)) + "px"}, {duration: 2 * 1000, fill: 'forwards'})); -} -document.timeline.play(group); - -</script> diff --git a/third_party/polymer/components/web-animations-js/test/testcases/auto-test-transform-3d-checks.js b/third_party/polymer/components/web-animations-js/test/testcases/auto-test-transform-3d-checks.js deleted file mode 100644 index f653953..0000000 --- a/third_party/polymer/components/web-animations-js/test/testcases/auto-test-transform-3d-checks.js +++ /dev/null @@ -1,134 +0,0 @@ -timing_test(function() { - at(0 * 1000, function() { - assert_styles( - '.anim', - [{'transform':'matrix(1, 0, 0, 1, 0, 0)'}, - {'transform':'matrix(1, 0, 0, 1, 0, 0)'}, - {'transform':'matrix3d(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 20, 40, 60, 1)'}, - {'transform':'matrix3d(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 20, 40, 60, 1)'}, - {'transform':'matrix3d(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 20, 1)'}, - {'transform':'matrix3d(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 20, 1)'}, - {'transform':'matrix3d(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 50, 1)'}, - {'transform':'matrix3d(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 50, 1)'}, - {'transform':'matrix3d(1.5, 0, 0, 0, 0, 3, 0, 0, 0, 0, 5, 0, 0, 0, 50, 1)'}, - {'transform':'matrix3d(1.5, 0, 0, 0, 0, 3, 0, 0, 0, 0, 5, 0, 0, 0, 50, 1)'}, - {'transform':'matrix3d(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 2, 0, 0, 0, 50, 1)'}, - {'transform':'matrix3d(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 2, 0, 0, 0, 50, 1)'}, - {'transform':'matrix(1, 0, 0, 1, 0, 0)'}, - {'transform':'matrix3d(1, 0, 0, 0, 0, 0.6427876096865394, 0.766044443118978, 0, 0, -0.766044443118978, 0.6427876096865394, 0, 0, 0, 0, 1)'}, - {'transform':'matrix(1, 0, 0, 1, 0, 0)'}, - {'transform':'matrix3d(0.6427876096865394, 0, -0.766044443118978, 0, 0, 1, 0, 0, 0.766044443118978, 0, 0.6427876096865394, 0, 0, 0, 0, 1)'}, - {'transform':'matrix(1, 0, 0, 1, 0, 0)'}, - {'transform':'matrix(0.6427876096865394, 0.766044443118978, -0.766044443118978, 0.6427876096865394, 0, 0)'}]); - }, "Autogenerated"); - at(0.5 * 1000, function() { - assert_styles( - '.anim', - [{'transform':'matrix3d(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 5, 10, 15, 1)'}, - {'transform':'matrix3d(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 5, 1)'}, - {'transform':'matrix3d(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 15, 30, 45, 1)'}, - {'transform':'matrix3d(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 15, 30, 50, 1)'}, - {'transform':'matrix3d(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 15, 1)'}, - {'transform':'matrix3d(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 5, 10, 30, 1)'}, - {'transform':'matrix3d(1.125, 0, 0, 0, 0, 1.5, 0, 0, 0, 0, 2, 0, 0, 0, 50, 1)'}, - {'transform':'matrix3d(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1.25, 0, 0, 0, 50, 1)'}, - {'transform':'matrix3d(1.375, 0, 0, 0, 0, 2.5, 0, 0, 0, 0, 4, 0, 0, 0, 50, 1)'}, - {'transform':'matrix3d(1.375, 0, 0, 0, 0, 2.5, 0, 0, 0, 0, 4.25, 0, 0, 0, 50, 1)'}, - {'transform':'matrix3d(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1.75, 0, 0, 0, 50, 1)'}, - {'transform':'matrix3d(1.125, 0, 0, 0, 0, 1.5, 0, 0, 0, 0, 2.75, 0, 0, 0, 50, 1)'}, - {'transform':'matrix3d(1, 0, 0, 0, 0, 0.9762960071199334, 0.21643961393810288, 0, 0, -0.21643961393810288, 0.9762960071199334, 0, 0, 0, 0, 1)'}, - {'transform':'matrix3d(1, 0, 0, 0, 0, 0.7933533402912352, 0.6087614290087207, 0, 0, -0.6087614290087207, 0.7933533402912352, 0, 0, 0, 0, 1)'}, - {'transform':'matrix3d(0.9762960071199334, 0, -0.21643961393810288, 0, 0, 1, 0, 0, 0.21643961393810288, 0, 0.9762960071199334, 0, 0, 0, 0, 1)'}, - {'transform':'matrix3d(0.7933533402912352, 0, -0.6087614290087207, 0, 0, 1, 0, 0, 0.6087614290087207, 0, 0.7933533402912352, 0, 0, 0, 0, 1)'}, - {'transform':'matrix(0.9762960071199334, 0.21643961393810288, -0.21643961393810288, 0.9762960071199334, 0, 0)'}, - {'transform':'matrix(0.7933533402912352, 0.6087614290087207, -0.6087614290087207, 0.7933533402912352, 0, 0)'}]); - }, "Autogenerated"); - at(1 * 1000, function() { - assert_styles( - '.anim', - [{'transform':'matrix3d(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 10, 20, 30, 1)'}, - {'transform':'matrix3d(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 10, 1)'}, - {'transform':'matrix3d(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 10, 20, 30, 1)'}, - {'transform':'matrix3d(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 10, 20, 40, 1)'}, - {'transform':'matrix3d(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 10, 1)'}, - {'transform':'matrix3d(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 10, 20, 40, 1)'}, - {'transform':'matrix3d(1.25, 0, 0, 0, 0, 2, 0, 0, 0, 0, 3, 0, 0, 0, 50, 1)'}, - {'transform':'matrix3d(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1.5, 0, 0, 0, 50, 1)'}, - {'transform':'matrix3d(1.25, 0, 0, 0, 0, 2, 0, 0, 0, 0, 3, 0, 0, 0, 50, 1)'}, - {'transform':'matrix3d(1.25, 0, 0, 0, 0, 2, 0, 0, 0, 0, 3.5, 0, 0, 0, 50, 1)'}, - {'transform':'matrix3d(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1.5, 0, 0, 0, 50, 1)'}, - {'transform':'matrix3d(1.25, 0, 0, 0, 0, 2, 0, 0, 0, 0, 3.5, 0, 0, 0, 50, 1)'}, - {'transform':'matrix3d(1, 0, 0, 0, 0, 0.9063077870366499, 0.42261826174069944, 0, 0, -0.42261826174069944, 0.9063077870366499, 0, 0, 0, 0, 1)'}, - {'transform':'matrix3d(1, 0, 0, 0, 0, 0.9063077870366499, 0.42261826174069944, 0, 0, -0.42261826174069944, 0.9063077870366499, 0, 0, 0, 0, 1)'}, - {'transform':'matrix3d(0.9063077870366499, 0, -0.42261826174069944, 0, 0, 1, 0, 0, 0.42261826174069944, 0, 0.9063077870366499, 0, 0, 0, 0, 1)'}, - {'transform':'matrix3d(0.9063077870366499, 0, -0.42261826174069944, 0, 0, 1, 0, 0, 0.42261826174069944, 0, 0.9063077870366499, 0, 0, 0, 0, 1)'}, - {'transform':'matrix(0.9063077870366499, 0.42261826174069944, -0.42261826174069944, 0.9063077870366499, 0, 0)'}, - {'transform':'matrix(0.9063077870366499, 0.42261826174069944, -0.42261826174069944, 0.9063077870366499, 0, 0)'}]); - }, "Autogenerated"); - at(1.5 * 1000, function() { - assert_styles( - '.anim', - [{'transform':'matrix3d(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 15, 30, 45, 1)'}, - {'transform':'matrix3d(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 15, 1)'}, - {'transform':'matrix3d(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 5, 10, 15, 1)'}, - {'transform':'matrix3d(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 5, 10, 30, 1)'}, - {'transform':'matrix3d(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 5, 1)'}, - {'transform':'matrix3d(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 15, 30, 50, 1)'}, - {'transform':'matrix3d(1.375, 0, 0, 0, 0, 2.5, 0, 0, 0, 0, 4, 0, 0, 0, 50, 1)'}, - {'transform':'matrix3d(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1.75, 0, 0, 0, 50, 1)'}, - {'transform':'matrix3d(1.125, 0, 0, 0, 0, 1.5, 0, 0, 0, 0, 2, 0, 0, 0, 50, 1)'}, - {'transform':'matrix3d(1.125, 0, 0, 0, 0, 1.5, 0, 0, 0, 0, 2.75, 0, 0, 0, 50, 1)'}, - {'transform':'matrix3d(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1.25, 0, 0, 0, 50, 1)'}, - {'transform':'matrix3d(1.375, 0, 0, 0, 0, 2.5, 0, 0, 0, 0, 4.25, 0, 0, 0, 50, 1)'}, - {'transform':'matrix3d(1, 0, 0, 0, 0, 0.7933533402912352, 0.6087614290087207, 0, 0, -0.6087614290087207, 0.7933533402912352, 0, 0, 0, 0, 1)'}, - {'transform':'matrix3d(1, 0, 0, 0, 0, 0.9762960071199334, 0.21643961393810288, 0, 0, -0.21643961393810288, 0.9762960071199334, 0, 0, 0, 0, 1)'}, - {'transform':'matrix3d(0.7933533402912352, 0, -0.6087614290087207, 0, 0, 1, 0, 0, 0.6087614290087207, 0, 0.7933533402912352, 0, 0, 0, 0, 1)'}, - {'transform':'matrix3d(0.9762960071199334, 0, -0.21643961393810288, 0, 0, 1, 0, 0, 0.21643961393810288, 0, 0.9762960071199334, 0, 0, 0, 0, 1)'}, - {'transform':'matrix(0.7933533402912352, 0.6087614290087207, -0.6087614290087207, 0.7933533402912352, 0, 0)'}, - {'transform':'matrix(0.9762960071199334, 0.21643961393810288, -0.21643961393810288, 0.9762960071199334, 0, 0)'}]); - }, "Autogenerated"); - at(2 * 1000, function() { - assert_styles( - '.anim', - [{'transform':'matrix3d(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 20, 40, 60, 1)'}, - {'transform':'matrix3d(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 20, 1)'}, - {'transform':'matrix(1, 0, 0, 1, 0, 0)'}, - {'transform':'matrix3d(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 20, 1)'}, - {'transform':'matrix(1, 0, 0, 1, 0, 0)'}, - {'transform':'matrix3d(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 20, 40, 60, 1)'}, - {'transform':'matrix3d(1.5, 0, 0, 0, 0, 3, 0, 0, 0, 0, 5, 0, 0, 0, 50, 1)'}, - {'transform':'matrix3d(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 2, 0, 0, 0, 50, 1)'}, - {'transform':'matrix3d(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 50, 1)'}, - {'transform':'matrix3d(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 2, 0, 0, 0, 50, 1)'}, - {'transform':'matrix3d(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 50, 1)'}, - {'transform':'matrix3d(1.5, 0, 0, 0, 0, 3, 0, 0, 0, 0, 5, 0, 0, 0, 50, 1)'}, - {'transform':'matrix3d(1, 0, 0, 0, 0, 0.6427876096865394, 0.766044443118978, 0, 0, -0.766044443118978, 0.6427876096865394, 0, 0, 0, 0, 1)'}, - {'transform':'matrix(1, 0, 0, 1, 0, 0)'}, - {'transform':'matrix3d(0.6427876096865394, 0, -0.766044443118978, 0, 0, 1, 0, 0, 0.766044443118978, 0, 0.6427876096865394, 0, 0, 0, 0, 1)'}, - {'transform':'matrix(1, 0, 0, 1, 0, 0)'}, - {'transform':'matrix(0.6427876096865394, 0.766044443118978, -0.766044443118978, 0.6427876096865394, 0, 0)'}, - {'transform':'matrix(1, 0, 0, 1, 0, 0)'}]); - }, "Autogenerated"); - at(2.5 * 1000, function() { - assert_styles( - '.anim', - [{'transform':'matrix3d(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 20, 40, 60, 1)'}, - {'transform':'matrix3d(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 20, 1)'}, - {'transform':'matrix(1, 0, 0, 1, 0, 0)'}, - {'transform':'matrix3d(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 20, 1)'}, - {'transform':'matrix(1, 0, 0, 1, 0, 0)'}, - {'transform':'matrix3d(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 20, 40, 60, 1)'}, - {'transform':'matrix3d(1.5, 0, 0, 0, 0, 3, 0, 0, 0, 0, 5, 0, 0, 0, 50, 1)'}, - {'transform':'matrix3d(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 2, 0, 0, 0, 50, 1)'}, - {'transform':'matrix3d(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 50, 1)'}, - {'transform':'matrix3d(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 2, 0, 0, 0, 50, 1)'}, - {'transform':'matrix3d(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 50, 1)'}, - {'transform':'matrix3d(1.5, 0, 0, 0, 0, 3, 0, 0, 0, 0, 5, 0, 0, 0, 50, 1)'}, - {'transform':'matrix3d(1, 0, 0, 0, 0, 0.6427876096865394, 0.766044443118978, 0, 0, -0.766044443118978, 0.6427876096865394, 0, 0, 0, 0, 1)'}, - {'transform':'matrix(1, 0, 0, 1, 0, 0)'}, - {'transform':'matrix3d(0.6427876096865394, 0, -0.766044443118978, 0, 0, 1, 0, 0, 0.766044443118978, 0, 0.6427876096865394, 0, 0, 0, 0, 1)'}, - {'transform':'matrix(1, 0, 0, 1, 0, 0)'}, - {'transform':'matrix(0.6427876096865394, 0.766044443118978, -0.766044443118978, 0.6427876096865394, 0, 0)'}, - {'transform':'matrix(1, 0, 0, 1, 0, 0)'}]); - }, "Autogenerated"); -}, "Autogenerated checks."); diff --git a/third_party/polymer/components/web-animations-js/test/testcases/auto-test-transform-3d.html b/third_party/polymer/components/web-animations-js/test/testcases/auto-test-transform-3d.html deleted file mode 100644 index 7384966..0000000 --- a/third_party/polymer/components/web-animations-js/test/testcases/auto-test-transform-3d.html +++ /dev/null @@ -1,123 +0,0 @@ -<!-- -Copyright 2012 Google Inc. All Rights Reserved. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. ---> - -<!DOCTYPE html><meta charset="UTF-8"> -<style> - -.container { - -webkit-perspective: 200px; - perspective: 200px; - -webkit-perspective-origin: 400px 200px; - perspective-origin: 400px 200px; - position: absolute; - top: 300px; -} - -.anim { - left: 0px; - width: 50px; - height: 50px; - background-color: lightsteelblue; - position: absolute; - -webkit-transform-style: preserve-3d; - transform-style: preserve-3d; - font-size: 8px; -} - -.expected { - width: 50px; - height: 50px; - position: absolute; - background-color: red; - font-size: 8px; - -webkit-transform-style: preserve-3d; - transform-style: preserve-3d; -} -</style> -<div class="container"></div> -<div style="height: 700px"></div> - -<script> -var expected_failures = [ - { - browser_configurations: [{ msie: true }], - tests: ['Autogenerated'], - message: 'IE returns matrix3d instead of matrix.', - } -]; -</script> -<script src="../bootstrap.js"></script> -<script> -"use strict"; - -var transformValues = [ - ['translate3d(0px, 0px, 0px)', 'translate3d(20px, 40px, 60px)', - 'translateZ(20px)'], - ['translateZ(50px) scale3d(1, 1, 1)', 'translateZ(50px) scale3d(1.5, 3, 5)', 'translateZ(50px) scaleZ(2)'], - ['rotateX(0deg)', 'rotateX(50deg)'], - ['rotateY(0deg)', 'rotateY(50deg)'], - ['rotateZ(0deg)', 'rotateZ(50deg)'], -]; - -var separation_x = 70; -var separation_y = 70; -var max_x = 1000; - -var toplevel = document.querySelector("div"); - -var animations = []; - -var y = 50; -for (var i = 0; i < transformValues.length; i++) { - var x = 300; - for (var j = 0; j < transformValues[i].length; j++) { - for (var k = 0; k < transformValues[i].length; k++) { - if (j == k) { - continue; - } - toplevel.appendChild(document.createElement("div")); - var div = toplevel.lastChild; - div.className = "expected"; - div.style.top = y + 'px'; - div.style.left = x + 'px'; - div.style[_WebAnimationsTestingUtilities._prefixProperty('transform')] = transformValues[i][k]; - toplevel.appendChild(document.createElement("div")); - var div = toplevel.lastChild; - div.className = "anim"; - div.style.top = y + 'px'; - div.style.left = x + 'px'; - div.textContent = "perspective"; - div.id = "i_" + i + "_" + j + "_" + k; - animations.push(new Animation(div, [ - {transform: transformValues[i][j]}, - {transform: transformValues[i][k]}, - ], {duration: 2 * 1000, fill: 'forwards'})); - - x += separation_x; - if (x > max_x) { - x = 20; - y += separation_y; - } - } - } - y += separation_y; -} - -</script> -<script> -"use strict"; -animations.forEach(function(anim) { document.timeline.play(anim); }); -</script> diff --git a/third_party/polymer/components/web-animations-js/test/testcases/auto-test-transform-functions-checks.js b/third_party/polymer/components/web-animations-js/test/testcases/auto-test-transform-functions-checks.js deleted file mode 100644 index 749c130..0000000 --- a/third_party/polymer/components/web-animations-js/test/testcases/auto-test-transform-functions-checks.js +++ /dev/null @@ -1,160 +0,0 @@ -timing_test(function() { - at(0 * 1000, function() { - assert_styles(".test", [ - {'transform':'none'}, - {'transform':'none'}, - {'transform':'none'}, - {'transform':'matrix(1, 0, 0, 1, 0, 0)'}, - {'transform':'matrix(0.7, 0.7, -0.7, 0.7, 10, 20)'}, - {'transform':'matrix3d(0, 0, -1, 0, 0, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1)'}, - {'transform':'none'}, - {'transform':'none'}, - {'transform':'none'}, - {'transform':'matrix(1, 0.5774, 0.364, 1, 0, 0)'}, - {'transform':'matrix(1, 0, 0.8391, 1, 0, 0)'}, - {'transform':'matrix(1, 0.5774, 0, 1, 0, 0)'}, - {'transform':'none'}, - {'transform':'none'}, - {'transform':'none'}, - {'transform':'none'}, - {'transform':'matrix(1.5, 0, 0, 2, 0, 0)'}, - {'transform':'matrix(2, 0, 0, 1, 0, 0)'}, - {'transform':'matrix(1, 0, 0, 1.5, 0, 0)'}, - {'transform':'matrix3d(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 2, 0, 0, 0, 8, 1)'}, - {'transform':'none'}, - {'transform':'none'}, - {'transform':'none'}, - {'transform':'none'}, - {'transform':'none'}, - {'transform':'matrix(0.5, 0.866, -0.866, 0.5, 0, 0)'}, - {'transform':'matrix3d(1, 0, 0, 0, 0, 0.342, 0.9397, 0, 0, -0.9397, 0.342, 0, 0, 0, 0, 1)'}, - {'transform':'matrix3d(0.1736, 0, -0.9848, 0, 0, 1, 0, 0, 0.9848, 0, 0.1736, 0, 0, 0, 0, 1)'}, - {'transform':'matrix(0.342, 0.9397, -0.9397, 0.342, 0, 0)'}, - {'transform':'matrix3d(0.6667, 0.6667, -0.3333, 0, -0.3333, 0.6667, 0.6667, 0, 0.6667, -0.3333, 0.6667, 0, 0, 0, 0, 1)'}, - {'transform':'none'}, - {'transform':'none'}, - {'transform':'none'}, - {'transform':'none'}, - {'transform':'none'}, - {'transform':'matrix(1, 0, 0, 1, 10, 20)'}, - {'transform':'matrix(1, 0, 0, 1, 10, 0)'}, - {'transform':'matrix(1, 0, 0, 1, 0, 20)'}, - {'transform':'matrix3d(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 30, 1)'}, - {'transform':'matrix3d(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 10, 20, 40, 1)'}, - {'transform':'none'}, - {'transform':'none'}, - {'transform':'none'}, - {'transform':'none'}, - {'transform':'matrix(1, 0, 0, 1, 100, 0)'}, - {'transform':'matrix(0.9397, 0.342, -0.342, 0.9397, 100, 0)'}, - {'transform':'matrix(0.4184, 0.8972, -0.8972, 0.4184, 100, 0)'}, - {'transform':'matrix(0.4698, 0.171, -0.171, 0.4698, 100, 0)'}, - ]); - }); - at(0.5 * 1000, function() { - assert_styles(".test", [ - {'transform':'matrix(1, 0, 0, 1, 0, 0)'}, - {'transform':'matrix(0.9192, 0.3808, -0.3808, 0.9192, 5, 10)'}, - {'transform':'matrix3d(0.7071, 0, -0.7071, 0, 0, 1, 0, 0, 0.7071, 0, 0.7071, 0, 0, 0, 0, 1)'}, - {'transform':'matrix(0.9192, 0.3808, -0.3808, 0.9192, 5, 10)'}, - {'transform':'matrix3d(0.6059, 0.3756, -0.6941, 0, -0.3756, 0.9068, 0.1629, 0, 0.6976, 0.1637, 0.6976, 0, 5, 10, 0, 1)'}, - {'transform':'matrix3d(0.7071, 0, -0.7071, 0, 0, 1, 0, 0, 0.7071, 0, 0.7071, 0, 0, 0, 0, 1)'}, - {'transform':'matrix(1, 0.2679, 0.1763, 1, 0, 0)'}, - {'transform':'matrix(1, 0, 0.364, 1, 0, 0)'}, - {'transform':'matrix(1, 0.2679, 0, 1, 0, 0)'}, - {'transform':'matrix(1.041, 0.2788, 0.6079, 1.035, 0, 0)'}, - {'transform':'matrix(1.041, 0.2788, 0.3968, 1.072, 0, 0)'}, - {'transform':'matrix(1, 0.5774, 0.2062, 1.014, 0, 0)'}, - {'transform':'matrix(1.25, 0, 0, 1.5, 0, 0)'}, - {'transform':'matrix(1.5, 0, 0, 1, 0, 0)'}, - {'transform':'matrix(1, 0, 0, 1.25, 0, 0)'}, - {'transform':'matrix3d(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1.5, 0, 0, 0, 3, 1)'}, - {'transform':'matrix(1.75, 0, 0, 1.5, 0, 0)'}, - {'transform':'matrix(1.5, 0, 0, 1.25, 0, 0)'}, - {'transform':'matrix3d(1, 0, 0, 0, 0, 1.25, 0, 0, 0, 0, 1.5, 0, 0, 0, 4, 1)'}, - {'transform':'matrix3d(1.25, 0, 0, 0, 0, 1.5, 0, 0, 0, 0, 1.5, 0, 0, 0, 4, 1)'}, - {'transform':'matrix(0.866, 0.5, -0.5, 0.866, 0, 0)'}, - {'transform':'matrix3d(1, 0, 0, 0, 0, 0.8192, 0.5736, 0, 0, -0.5736, 0.8192, 0, 0, 0, 0, 1)'}, - {'transform':'matrix3d(0.766, 0, -0.6428, 0, 0, 1, 0, 0, 0.6428, 0, 0.766, 0, 0, 0, 0, 1)'}, - {'transform':'matrix(0.8192, 0.5736, -0.5736, 0.8192, 0, 0)'}, - {'transform':'matrix3d(0.9107, 0.3333, -0.244, 0, -0.244, 0.9107, 0.3333, 0, 0.3333, -0.244, 0.9107, 0, 0, 0, 0, 1)'}, - {'transform':'matrix3d(0.8538, 0.4929, 0.1678, 0, -0.4929, 0.6613, 0.5654, 0, 0.1678, -0.5654, 0.8075, 0, 0, 0, 0, 1)'}, - {'transform':'matrix3d(0.7461, 0.2265, -0.6261, 0, 0.2265, 0.7979, 0.5587, 0, 0.6261, -0.5587, 0.544, 0, 0, 0, 0, 1)'}, - {'transform':'matrix3d(0.544, 0.5587, -0.6261, 0, -0.5587, 0.7979, 0.2265, 0, 0.6261, 0.2265, 0.7461, 0, 0, 0, 0, 1)'}, - {'transform':'matrix3d(0.559, 0.8194, -0.1267, 0, -0.7305, 0.559, 0.3922, 0, 0.3922, -0.1267, 0.9111, 0, 0, 0, 0, 1)'}, - {'transform':'matrix3d(0.6277, 0.7651, -0.1438, 0, -0.6771, 0.6277, 0.3841, 0, 0.3841, -0.1438, 0.912, 0, 0, 0, 0, 1)'}, - {'transform':'matrix(1, 0, 0, 1, 5, 10)'}, - {'transform':'matrix(1, 0, 0, 1, 5, 0)'}, - {'transform':'matrix(1, 0, 0, 1, 0, 10)'}, - {'transform':'matrix3d(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 15, 1)'}, - {'transform':'matrix3d(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 5, 10, 20, 1)'}, - {'transform':'matrix(1, 0, 0, 1, 10, 10)'}, - {'transform':'matrix(1, 0, 0, 1, 5, 10)'}, - {'transform':'matrix3d(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 10, 15, 1)'}, - {'transform':'matrix3d(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 5, 10, 35, 1)'}, - {'transform':'matrix3d(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 10, 20, 20, 1)'}, - {'transform':'matrix(1, 0, 0, 1, 50, 0)'}, - {'transform':'matrix(0.9848, 0.1736, -0.1736, 0.9848, 50, 0)'}, - {'transform':'matrix(0.8392, 0.5346, -0.5346, 0.8392, 50, 0)'}, - {'transform':'matrix(0.7386, 0.1302, -0.1302, 0.7386, 50, 0)'}, - {'transform':'matrix(0.9848, 0.1736, -0.1736, 0.9848, 100, 0)'}, - {'transform':'matrix(0.7335, 0.6722, -0.6722, 0.7335, 100, 0)'}, - {'transform':'matrix(0.5493, 0.5033, -0.5033, 0.5493, 100, 0)'}, - {'transform':'matrix(0.7386, 0.1302, -0.1302, 0.7386, 100, 0)'}, - ]); - }); - // This check is equivalent to checking at t=1000ms, it is placed all the way out here to allow manual viewing - // to inspect multiple cycles of the animation at a time. The animation stops after all checks have completed. - at(100001 * 1000, function() { - assert_styles(".test", [ - {'transform':'matrix(1, 0, 0, 1, 0, 0)'}, - {'transform':'matrix(0.7, 0.7, -0.7, 0.7, 10, 20)'}, - {'transform':'matrix3d(0, 0, -1, 0, 0, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1)'}, - {'transform':'matrix(0.7, 0.7, -0.7, 0.7, 10, 20)'}, - {'transform':'matrix3d(0, 0, -1, 0, 0, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1)'}, - {'transform':'matrix(1, 0, 0, 1, 0, 0)'}, - {'transform':'matrix(1, 0.5774, 0.364, 1, 0, 0)'}, - {'transform':'matrix(1, 0, 0.8391, 1, 0, 0)'}, - {'transform':'matrix(1, 0.5774, 0, 1, 0, 0)'}, - {'transform':'matrix(1, 0, 0.8391, 1, 0, 0)'}, - {'transform':'matrix(1, 0.5774, 0, 1, 0, 0)'}, - {'transform':'matrix(1, 0.5774, 0.364, 1, 0, 0)'}, - {'transform':'matrix(1.5, 0, 0, 2, 0, 0)'}, - {'transform':'matrix(2, 0, 0, 1, 0, 0)'}, - {'transform':'matrix(1, 0, 0, 1.5, 0, 0)'}, - {'transform':'matrix3d(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 2, 0, 0, 0, 8, 1)'}, - {'transform':'matrix(2, 0, 0, 1, 0, 0)'}, - {'transform':'matrix(1, 0, 0, 1.5, 0, 0)'}, - {'transform':'matrix3d(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 2, 0, 0, 0, 8, 1)'}, - {'transform':'matrix(1.5, 0, 0, 2, 0, 0)'}, - {'transform':'matrix(0.5, 0.866, -0.866, 0.5, 0, 0)'}, - {'transform':'matrix3d(1, 0, 0, 0, 0, 0.342, 0.9397, 0, 0, -0.9397, 0.342, 0, 0, 0, 0, 1)'}, - {'transform':'matrix3d(0.1736, 0, -0.9848, 0, 0, 1, 0, 0, 0.9848, 0, 0.1736, 0, 0, 0, 0, 1)'}, - {'transform':'matrix(0.342, 0.9397, -0.9397, 0.342, 0, 0)'}, - {'transform':'matrix3d(0.6667, 0.6667, -0.3333, 0, -0.3333, 0.6667, 0.6667, 0, 0.6667, -0.3333, 0.6667, 0, 0, 0, 0, 1)'}, - {'transform':'matrix3d(1, 0, 0, 0, 0, 0.342, 0.9397, 0, 0, -0.9397, 0.342, 0, 0, 0, 0, 1)'}, - {'transform':'matrix3d(0.1736, 0, -0.9848, 0, 0, 1, 0, 0, 0.9848, 0, 0.1736, 0, 0, 0, 0, 1)'}, - {'transform':'matrix(0.342, 0.9397, -0.9397, 0.342, 0, 0)'}, - {'transform':'matrix3d(0.6667, 0.6667, -0.3333, 0, -0.3333, 0.6667, 0.6667, 0, 0.6667, -0.3333, 0.6667, 0, 0, 0, 0, 1)'}, - {'transform':'matrix(0.5, 0.866, -0.866, 0.5, 0, 0)'}, - {'transform':'matrix(1, 0, 0, 1, 10, 20)'}, - {'transform':'matrix(1, 0, 0, 1, 10, 0)'}, - {'transform':'matrix(1, 0, 0, 1, 0, 20)'}, - {'transform':'matrix3d(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 30, 1)'}, - {'transform':'matrix3d(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 10, 20, 40, 1)'}, - {'transform':'matrix(1, 0, 0, 1, 10, 0)'}, - {'transform':'matrix(1, 0, 0, 1, 0, 20)'}, - {'transform':'matrix3d(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 30, 1)'}, - {'transform':'matrix3d(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 10, 20, 40, 1)'}, - {'transform':'matrix(1, 0, 0, 1, 10, 20)'}, - {'transform':'matrix(1, 0, 0, 1, 100, 0)'}, - {'transform':'matrix(0.9397, 0.342, -0.342, 0.9397, 100, 0)'}, - {'transform':'matrix(0.4184, 0.8972, -0.8972, 0.4184, 100, 0)'}, - {'transform':'matrix(0.4698, 0.171, -0.171, 0.4698, 100, 0)'}, - {'transform':'matrix(0.9397, 0.342, -0.342, 0.9397, 100, 0)'}, - {'transform':'matrix(0.4184, 0.8972, -0.8972, 0.4184, 100, 0)'}, - {'transform':'matrix(0.4698, 0.171, -0.171, 0.4698, 100, 0)'}, - {'transform':'matrix(1, 0, 0, 1, 100, 0)'}, - ]); - }); -}, "Auto generated tests"); diff --git a/third_party/polymer/components/web-animations-js/test/testcases/auto-test-transform-functions.html b/third_party/polymer/components/web-animations-js/test/testcases/auto-test-transform-functions.html deleted file mode 100644 index 392ef82..0000000 --- a/third_party/polymer/components/web-animations-js/test/testcases/auto-test-transform-functions.html +++ /dev/null @@ -1,158 +0,0 @@ -<!-- -Copyright 2012 Google Inc. All Rights Reserved. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. ---> - -<!DOCTYPE html><meta charset="UTF-8"> -<style> -.container { - -webkit-perspective: 400px; - perspective: 400px; - position: absolute; - top: 10px; -} -.box { - display: inline-block; - width: 100px; - height: 100px; - margin: 16px; - border-style: solid; - white-space: pre; -} -.test { - border-color: green; -} -.expectation { - color: red; -} -</style> - -<div id="spacer"></div> -<div id="expectationContainer" class="container"></div> -<div id="testContainer" class="container"></div> - -<script src="../bootstrap.js"></script> -<script> -"use strict"; -var testGroups = [ - [ - 'matrix3d(1,0,0,0, 0,1,0,0, 0,0,1,0, 0,0,0,1)', - 'matrix(0.7, 0.7, -0.7, 0.7, 10, 20)', - 'matrix3d(0,0,-1,0, 0,1,0,0, 1,0,0,0, 0,0,0,1)', - ], [ - 'skew(20deg, 30deg)', - 'skewX(40deg)', - 'skewY(30deg)', - ], [ - 'scale(1.5, 2)', - 'scaleX(2)', - 'scaleY(1.5)', - 'scaleZ(2) translateZ(4px)', - ], [ - 'rotate(60deg)', - 'rotateX(70deg)', - 'rotateY(80deg)', - 'rotateZ(70deg)', - 'rotate3d(1, 1, 1, 60deg)', - ], [ - 'translate(10px, 20px)', - 'translateX(10px)', - 'translateY(20px)', - 'translateZ(30px)', - 'translate3d(10px, 20px, 40px)', - ], [ - 'translate(100px)', - 'translate(100px) rotate(20deg)', - 'translate(100px) rotate(20deg) matrix(0.7, 0.7, -0.7, 0.7, 0, 0)', - 'translate(100px) rotate(20deg) scale(0.5)', - ] -]; - -var animations = []; -var style = document.createElement('style'); -var count = 0; -var showExpectations = inExploreMode(); -var expectationStarters = []; - -function addAnimationTest(from, to) { - var testElement = document.createElement('div'); - testElement.classList.add('box', 'test'); - testContainer.appendChild(testElement); - testElement.textContent = from + '\n' + to; - animations.push(new Animation(testElement, [ - {transform: from}, - {transform: to}, - ], { - duration: 1 * 1000, - direction: 'alternate', - iterations: Infinity, - easing: 'ease-in-out', - })); - - if (!showExpectations) { - return; - } - var expectationElement = document.createElement('div'); - expectationElement.classList.add('box', 'expectation'); - expectationElement.textContent = from + '\n' + to; - var currentCount = count; - expectationStarters.push(function() { - expectationElement.classList.add('animation' + currentCount); - }); - expectationContainer.appendChild(expectationElement); - var keyframes = ' animation' + count + '{' + - 'from{-webkit-transform:' + from + ';transform:' + from +';}' + - 'to{-webkit-transform:' + to + ';transform:' + to +';}}'; - var animation = 'animation' + count + ' 1s alternate infinite ease-in-out'; - style.textContent += '@-webkit-keyframes' + keyframes + '\n'; - style.textContent += '@keyframes' + keyframes + '\n'; - style.textContent += '.animation' + count +'{-webkit-animation:' + animation + ';animation:' + animation + ';}\n'; - count++; -} - -function addBreak() { - testContainer.appendChild(document.createElement('hr')); - if (showExpectations) { - expectationContainer.appendChild(document.createElement('hr')); - } -} - -function addTestGroup(tests) { - tests.forEach(function(transform) { - addAnimationTest('none', transform); - }); - tests.forEach(function(transform, i) { - addAnimationTest(transform, tests[(i + 1) % tests.length]); - }); - addBreak(); -} - -testGroups.forEach(addTestGroup); - -if (showExpectations) { - expectationContainer.appendChild(style); - var startExpectations = function() { - expectationStarters.forEach(function(f) {f();}); - }; - if (navigator.userAgent.toLowerCase().indexOf('firefox') > -1) { - requestAnimationFrame(startExpectations); - } else { - startExpectations(); - } -} -// TODO: Make infinite duration groups work. -animations.forEach(function(animation) {document.timeline.play(animation);}); - -spacer.style.height = testContainer.clientHeight + 'px'; -</script> diff --git a/third_party/polymer/components/web-animations-js/test/testcases/auto-test-transform-origin-checks.js b/third_party/polymer/components/web-animations-js/test/testcases/auto-test-transform-origin-checks.js deleted file mode 100644 index 9bc9a3d..0000000 --- a/third_party/polymer/components/web-animations-js/test/testcases/auto-test-transform-origin-checks.js +++ /dev/null @@ -1,37 +0,0 @@ -timing_test(function() { - at(0 * 1000, function() { - assert_styles(".test",{'webkitTransformOrigin':'50px 50px'}); - }); - at(1 * 1000, function() { - assert_styles(".test", [ - {'webkitTransformOrigin':'50px 50px'}, - {'webkitTransformOrigin':'25px 50px'}, - {'webkitTransformOrigin':'75px 50px'}, - {'webkitTransformOrigin':'50px 25px'}, - {'webkitTransformOrigin':'50px 75px'}, - {'webkitTransformOrigin':'37.5px 50px'}, - {'webkitTransformOrigin':'25px 25px'}, - {'webkitTransformOrigin':'30px 50px'}, - {'webkitTransformOrigin':'30px 50px 50px'}, - {'webkitTransformOrigin':'75px 75px 50px'}, - {'webkitTransformOrigin':'75px 35px'}, - {'webkitTransformOrigin':'75px 35px -100px'}, - ]); - }); - at(2 * 1000, function() { - assert_styles(".test", [ - {'webkitTransformOrigin':'50px 50px'}, - {'webkitTransformOrigin':'0px 50px'}, - {'webkitTransformOrigin':'100px 50px'}, - {'webkitTransformOrigin':'50px 0px'}, - {'webkitTransformOrigin':'50px 100px'}, - {'webkitTransformOrigin':'25px 50px'}, - {'webkitTransformOrigin':'0px 0px'}, - {'webkitTransformOrigin':'10px 50px'}, - {'webkitTransformOrigin':'10px 50px 100px'}, - {'webkitTransformOrigin':'100px 100px 100px'}, - {'webkitTransformOrigin':'100px 20px'}, - {'webkitTransformOrigin':'100px 20px -200px'}, - ]); - }); -}, "Auto generated tests"); diff --git a/third_party/polymer/components/web-animations-js/test/testcases/auto-test-transform-origin.html b/third_party/polymer/components/web-animations-js/test/testcases/auto-test-transform-origin.html deleted file mode 100644 index 7d3f5b0..0000000 --- a/third_party/polymer/components/web-animations-js/test/testcases/auto-test-transform-origin.html +++ /dev/null @@ -1,80 +0,0 @@ -<!-- -Copyright 2014 Google Inc. All Rights Reserved. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. ---> - -<!DOCTYPE html><meta charset="UTF-8"> -<style> -.container { - -webkit-perspective: 1000px; - perspective: 1000px; - position: absolute; - left: 0; - top: 0; -} -.box { - width: 96px; - height: 96px; - border: solid 2px; - display: inline-block; - margin: 50px; - -webkit-transform-style: preserve-3d; - transform-style: preserve-3d; - -webkit-transform: rotate(45deg) rotateY(30deg); - transform: rotate(45deg) rotateY(30deg); -} -.test { border-color: green; } -.expectation { color: red; } -</style> -<div id="expectationContainer" class="container"></div> -<div id="testContainer" class="container"></div> -<div style="height: 700px"></div> - -<script src="../bootstrap.js"></script> -<script> -'use strict'; - -var testCases = [ - 'center', - 'left', - 'right', - 'top', - 'bottom', - '25px', - 'left top', - '10% 50px', - '10% 50px 100px', - 'right bottom 100px', - 'right calc(120% - 100px)', - 'right calc(120% - 100px) -200px', -]; - -function createBox(type) { - var element = document.createElement('div'); - element.classList.add('box', type); - return element; -} - -testCases.forEach(function(testCase) { - var expectation = createBox('expectation') - expectation.style.transformOrigin = expectation.style.webkitTransformOrigin = testCase; - expectation.textContent = testCase; - expectationContainer.appendChild(expectation); - - var test = createBox('test') - test.animate({transformOrigin: testCase}, {duration: 2 * 1000, fill: 'forwards'}); - test.textContent = testCase; - testContainer.appendChild(test); -}); -</script> diff --git a/third_party/polymer/components/web-animations-js/test/testcases/auto-test-transform-primitives-checks.js b/third_party/polymer/components/web-animations-js/test/testcases/auto-test-transform-primitives-checks.js deleted file mode 100644 index 99833e2..0000000 --- a/third_party/polymer/components/web-animations-js/test/testcases/auto-test-transform-primitives-checks.js +++ /dev/null @@ -1,292 +0,0 @@ -timing_test(function() { - at(0 * 1000, function() { - assert_styles(".anim", [ - {'transform':'matrix(1, 0, 0, 1, 0, 0)'}, - {'transform':'matrix(1, 0, 0, 1, 0, 0)'}, - {'transform':'matrix(1, 0, 0, 1, 0, 0)'}, - {'transform':'matrix(1, 0, 0, 1, 0, 0)'}, - {'transform':'matrix(1, 0, 0, 1, 30, 0)'}, - {'transform':'matrix(1, 0, 0, 1, 30, 0)'}, - {'transform':'matrix(1, 0, 0, 1, 30, 0)'}, - {'transform':'matrix(1, 0, 0, 1, 30, 0)'}, - {'transform':'matrix(1, 0, 0, 1, 20, 40)'}, - {'transform':'matrix(1, 0, 0, 1, 20, 40)'}, - {'transform':'matrix(1, 0, 0, 1, 20, 40)'}, - {'transform':'matrix(1, 0, 0, 1, 20, 40)'}, - {'transform':'matrix(1, 0, 0, 1, 20, 0)'}, - {'transform':'matrix(1, 0, 0, 1, 20, 0)'}, - {'transform':'matrix(1, 0, 0, 1, 20, 0)'}, - {'transform':'matrix(1, 0, 0, 1, 20, 0)'}, - {'transform':'matrix(1, 0, 0, 1, 0, 20)'}, - {'transform':'matrix(1, 0, 0, 1, 0, 20)'}, - {'transform':'matrix(1, 0, 0, 1, 0, 20)'}, - {'transform':'matrix(1, 0, 0, 1, 0, 20)'}, - {'transform':'matrix(1, 0, 0, 1, 0, 0)'}, - {'transform':'matrix(1, 0, 0, 1, 0, 0)'}, - {'transform':'matrix(1, 0, 0, 1, 0, 0)'}, - {'transform':'matrix(1, 0, 0, 1, 0, 0)'}, - {'transform':'matrix(1.5, 0, 0, 3, 0, 0)'}, - {'transform':'matrix(1.5, 0, 0, 3, 0, 0)'}, - {'transform':'matrix(1.5, 0, 0, 3, 0, 0)'}, - {'transform':'matrix(1.5, 0, 0, 3, 0, 0)'}, - {'transform':'matrix(2, 0, 0, 2, 0, 0)'}, - {'transform':'matrix(2, 0, 0, 2, 0, 0)'}, - {'transform':'matrix(2, 0, 0, 2, 0, 0)'}, - {'transform':'matrix(2, 0, 0, 2, 0, 0)'}, - {'transform':'matrix(2, 0, 0, 1, 0, 0)'}, - {'transform':'matrix(2, 0, 0, 1, 0, 0)'}, - {'transform':'matrix(2, 0, 0, 1, 0, 0)'}, - {'transform':'matrix(2, 0, 0, 1, 0, 0)'}, - {'transform':'matrix(1, 0, 0, 2, 0, 0)'}, - {'transform':'matrix(1, 0, 0, 2, 0, 0)'}, - {'transform':'matrix(1, 0, 0, 2, 0, 0)'}, - {'transform':'matrix(1, 0, 0, 2, 0, 0)'}, - {'transform':'matrix(1, 0, 0, 1, 0, 0)'}, - {'transform':'matrix(0.6428, 0.766, -0.766, 0.6428, 0, 0)'}, - {'transform':'matrix(1, 0, 0, 1, 0, 0)'}, - {'transform':'matrix(1, 0, 0, 1, 0, 0)'}, - {'transform':'matrix(1, 0, 0.364, 1, 0, 0)'}, - {'transform':'matrix(1, 0, 0.364, 1, 0, 0)'}, - {'transform':'matrix(1, 0.364, 0.8391, 1, 0, 0)'}, - {'transform':'matrix(1, 0.364, 0.8391, 1, 0, 0)'}, - {'transform':'matrix(1, 0, 0, 1, 0, 0)'}, - {'transform':'matrix(1, 0, 0.8391, 1, 0, 0)'}, - {'transform':'matrix(1, 0, 0, 1, 0, 0)'}, - {'transform':'matrix(1, 0.8391, 0, 1, 0, 0)'}, - {'transform':'matrix(1, 0, 0, 1, 0, 0)'}, - {'transform':'matrix(-1, 1, -1, -1, 10, 10)'}, - ]); - }); - at(0.5 * 1000, function() { - assert_styles(".anim", [ - {'transform':'matrix(1, 0, 0, 1, 7.5, 0)'}, - {'transform':'matrix(1, 0, 0, 1, 5, 10)'}, - {'transform':'matrix(1, 0, 0, 1, 5, 0)'}, - {'transform':'matrix(1, 0, 0, 1, 0, 5)'}, - {'transform':'matrix(1, 0, 0, 1, 22.5, 0)'}, - {'transform':'matrix(1, 0, 0, 1, 27.5, 10)'}, - {'transform':'matrix(1, 0, 0, 1, 27.5, 0)'}, - {'transform':'matrix(1, 0, 0, 1, 22.5, 5)'}, - {'transform':'matrix(1, 0, 0, 1, 15, 30)'}, - {'transform':'matrix(1, 0, 0, 1, 22.5, 30)'}, - {'transform':'matrix(1, 0, 0, 1, 20, 30)'}, - {'transform':'matrix(1, 0, 0, 1, 15, 35)'}, - {'transform':'matrix(1, 0, 0, 1, 15, 0)'}, - {'transform':'matrix(1, 0, 0, 1, 22.5, 0)'}, - {'transform':'matrix(1, 0, 0, 1, 20, 10)'}, - {'transform':'matrix(1, 0, 0, 1, 15, 5)'}, - {'transform':'matrix(1, 0, 0, 1, 0, 15)'}, - {'transform':'matrix(1, 0, 0, 1, 7.5, 15)'}, - {'transform':'matrix(1, 0, 0, 1, 5, 25)'}, - {'transform':'matrix(1, 0, 0, 1, 5, 15)'}, - {'transform':'matrix(1.125, 0, 0, 1.5, 0, 0)'}, - {'transform':'matrix(1.25, 0, 0, 1.25, 0, 0)'}, - {'transform':'matrix(1.25, 0, 0, 1, 0, 0)'}, - {'transform':'matrix(1, 0, 0, 1.25, 0, 0)'}, - {'transform':'matrix(1.375, 0, 0, 2.5, 0, 0)'}, - {'transform':'matrix(1.625, 0, 0, 2.75, 0, 0)'}, - {'transform':'matrix(1.625, 0, 0, 2.5, 0, 0)'}, - {'transform':'matrix(1.375, 0, 0, 2.75, 0, 0)'}, - {'transform':'matrix(1.75, 0, 0, 1.75, 0, 0)'}, - {'transform':'matrix(1.875, 0, 0, 2.25, 0, 0)'}, - {'transform':'matrix(2, 0, 0, 1.75, 0, 0)'}, - {'transform':'matrix(1.75, 0, 0, 2, 0, 0)'}, - {'transform':'matrix(1.75, 0, 0, 1, 0, 0)'}, - {'transform':'matrix(1.875, 0, 0, 1.5, 0, 0)'}, - {'transform':'matrix(2, 0, 0, 1.25, 0, 0)'}, - {'transform':'matrix(1.75, 0, 0, 1.25, 0, 0)'}, - {'transform':'matrix(1, 0, 0, 1.75, 0, 0)'}, - {'transform':'matrix(1.125, 0, 0, 2.25, 0, 0)'}, - {'transform':'matrix(1.25, 0, 0, 2, 0, 0)'}, - {'transform':'matrix(1.25, 0, 0, 1.75, 0, 0)'}, - {'transform':'matrix(0.9763, 0.2164, -0.2164, 0.9763, 0, 0)'}, - {'transform':'matrix(0.7934, 0.6088, -0.6088, 0.7934, 0, 0)'}, - {'transform':'matrix(1, 0, 0.08749, 1, 0, 0)'}, - {'transform':'matrix(1, 0.08749, 0.1763, 1, 0, 0)'}, - {'transform':'matrix(1, 0, 0.2679, 1, 0, 0)'}, - {'transform':'matrix(1, 0.08749, 0.4663, 1, 0, 0)'}, - {'transform':'matrix(1, 0.2679, 0.5774, 1, 0, 0)'}, - {'transform':'matrix(1, 0.2679, 0.7002, 1, 0, 0)'}, - {'transform':'matrix(1, 0, 0.1763, 1, 0, 0)'}, - {'transform':'matrix(1, 0, 0.5774, 1, 0, 0)'}, - {'transform':'matrix(1, 0.1763, 0, 1, 0, 0)'}, - {'transform':'matrix(1, 0.5774, 0, 1, 0, 0)'}, - {'transform':'matrix(0.9176, 0.6131, -0.6131, 0.9176, 2.5, 2.5)'}, - {'transform':'matrix(-0.2557, 1.286, -1.286, -0.2557, 7.5, 7.5)'}, - ]); - }); - at(1 * 1000, function() { - assert_styles(".anim", [ - {'transform':'matrix(1, 0, 0, 1, 15, 0)'}, - {'transform':'matrix(1, 0, 0, 1, 10, 20)'}, - {'transform':'matrix(1, 0, 0, 1, 10, 0)'}, - {'transform':'matrix(1, 0, 0, 1, 0, 10)'}, - {'transform':'matrix(1, 0, 0, 1, 15, 0)'}, - {'transform':'matrix(1, 0, 0, 1, 25, 20)'}, - {'transform':'matrix(1, 0, 0, 1, 25, 0)'}, - {'transform':'matrix(1, 0, 0, 1, 15, 10)'}, - {'transform':'matrix(1, 0, 0, 1, 10, 20)'}, - {'transform':'matrix(1, 0, 0, 1, 25, 20)'}, - {'transform':'matrix(1, 0, 0, 1, 20, 20)'}, - {'transform':'matrix(1, 0, 0, 1, 10, 30)'}, - {'transform':'matrix(1, 0, 0, 1, 10, 0)'}, - {'transform':'matrix(1, 0, 0, 1, 25, 0)'}, - {'transform':'matrix(1, 0, 0, 1, 20, 20)'}, - {'transform':'matrix(1, 0, 0, 1, 10, 10)'}, - {'transform':'matrix(1, 0, 0, 1, 0, 10)'}, - {'transform':'matrix(1, 0, 0, 1, 15, 10)'}, - {'transform':'matrix(1, 0, 0, 1, 10, 30)'}, - {'transform':'matrix(1, 0, 0, 1, 10, 10)'}, - {'transform':'matrix(1.25, 0, 0, 2, 0, 0)'}, - {'transform':'matrix(1.5, 0, 0, 1.5, 0, 0)'}, - {'transform':'matrix(1.5, 0, 0, 1, 0, 0)'}, - {'transform':'matrix(1, 0, 0, 1.5, 0, 0)'}, - {'transform':'matrix(1.25, 0, 0, 2, 0, 0)'}, - {'transform':'matrix(1.75, 0, 0, 2.5, 0, 0)'}, - {'transform':'matrix(1.75, 0, 0, 2, 0, 0)'}, - {'transform':'matrix(1.25, 0, 0, 2.5, 0, 0)'}, - {'transform':'matrix(1.5, 0, 0, 1.5, 0, 0)'}, - {'transform':'matrix(1.75, 0, 0, 2.5, 0, 0)'}, - {'transform':'matrix(2, 0, 0, 1.5, 0, 0)'}, - {'transform':'matrix(1.5, 0, 0, 2, 0, 0)'}, - {'transform':'matrix(1.5, 0, 0, 1, 0, 0)'}, - {'transform':'matrix(1.75, 0, 0, 2, 0, 0)'}, - {'transform':'matrix(2, 0, 0, 1.5, 0, 0)'}, - {'transform':'matrix(1.5, 0, 0, 1.5, 0, 0)'}, - {'transform':'matrix(1, 0, 0, 1.5, 0, 0)'}, - {'transform':'matrix(1.25, 0, 0, 2.5, 0, 0)'}, - {'transform':'matrix(1.5, 0, 0, 2, 0, 0)'}, - {'transform':'matrix(1.5, 0, 0, 1.5, 0, 0)'}, - {'transform':'matrix(0.9063, 0.4226, -0.4226, 0.9063, 0, 0)'}, - {'transform':'matrix(0.9063, 0.4226, -0.4226, 0.9063, 0, 0)'}, - {'transform':'matrix(1, 0, 0.1763, 1, 0, 0)'}, - {'transform':'matrix(1, 0.1763, 0.364, 1, 0, 0)'}, - {'transform':'matrix(1, 0, 0.1763, 1, 0, 0)'}, - {'transform':'matrix(1, 0.1763, 0.5774, 1, 0, 0)'}, - {'transform':'matrix(1, 0.1763, 0.364, 1, 0, 0)'}, - {'transform':'matrix(1, 0.1763, 0.5774, 1, 0, 0)'}, - {'transform':'matrix(1, 0, 0.364, 1, 0, 0)'}, - {'transform':'matrix(1, 0, 0.364, 1, 0, 0)'}, - {'transform':'matrix(1, 0.364, 0, 1, 0, 0)'}, - {'transform':'matrix(1, 0.364, 0, 1, 0, 0)'}, - {'transform':'matrix(0.4619, 1.115, -1.115, 0.4619, 5, 5)'}, - {'transform':'matrix(0.4619, 1.115, -1.115, 0.4619, 5, 5)'}, - ]); - }); - at(1.5 * 1000, function() { - assert_styles(".anim", [ - {'transform':'matrix(1, 0, 0, 1, 22.5, 0)'}, - {'transform':'matrix(1, 0, 0, 1, 15, 30)'}, - {'transform':'matrix(1, 0, 0, 1, 15, 0)'}, - {'transform':'matrix(1, 0, 0, 1, 0, 15)'}, - {'transform':'matrix(1, 0, 0, 1, 7.5, 0)'}, - {'transform':'matrix(1, 0, 0, 1, 22.5, 30)'}, - {'transform':'matrix(1, 0, 0, 1, 22.5, 0)'}, - {'transform':'matrix(1, 0, 0, 1, 7.5, 15)'}, - {'transform':'matrix(1, 0, 0, 1, 5, 10)'}, - {'transform':'matrix(1, 0, 0, 1, 27.5, 10)'}, - {'transform':'matrix(1, 0, 0, 1, 20, 10)'}, - {'transform':'matrix(1, 0, 0, 1, 5, 25)'}, - {'transform':'matrix(1, 0, 0, 1, 5, 0)'}, - {'transform':'matrix(1, 0, 0, 1, 27.5, 0)'}, - {'transform':'matrix(1, 0, 0, 1, 20, 30)'}, - {'transform':'matrix(1, 0, 0, 1, 5, 15)'}, - {'transform':'matrix(1, 0, 0, 1, 0, 5)'}, - {'transform':'matrix(1, 0, 0, 1, 22.5, 5)'}, - {'transform':'matrix(1, 0, 0, 1, 15, 35)'}, - {'transform':'matrix(1, 0, 0, 1, 15, 5)'}, - {'transform':'matrix(1.375, 0, 0, 2.5, 0, 0)'}, - {'transform':'matrix(1.75, 0, 0, 1.75, 0, 0)'}, - {'transform':'matrix(1.75, 0, 0, 1, 0, 0)'}, - {'transform':'matrix(1, 0, 0, 1.75, 0, 0)'}, - {'transform':'matrix(1.125, 0, 0, 1.5, 0, 0)'}, - {'transform':'matrix(1.875, 0, 0, 2.25, 0, 0)'}, - {'transform':'matrix(1.875, 0, 0, 1.5, 0, 0)'}, - {'transform':'matrix(1.125, 0, 0, 2.25, 0, 0)'}, - {'transform':'matrix(1.25, 0, 0, 1.25, 0, 0)'}, - {'transform':'matrix(1.625, 0, 0, 2.75, 0, 0)'}, - {'transform':'matrix(2, 0, 0, 1.25, 0, 0)'}, - {'transform':'matrix(1.25, 0, 0, 2, 0, 0)'}, - {'transform':'matrix(1.25, 0, 0, 1, 0, 0)'}, - {'transform':'matrix(1.625, 0, 0, 2.5, 0, 0)'}, - {'transform':'matrix(2, 0, 0, 1.75, 0, 0)'}, - {'transform':'matrix(1.25, 0, 0, 1.75, 0, 0)'}, - {'transform':'matrix(1, 0, 0, 1.25, 0, 0)'}, - {'transform':'matrix(1.375, 0, 0, 2.75, 0, 0)'}, - {'transform':'matrix(1.75, 0, 0, 2, 0, 0)'}, - {'transform':'matrix(1.75, 0, 0, 1.25, 0, 0)'}, - {'transform':'matrix(0.7934, 0.6088, -0.6088, 0.7934, 0, 0)'}, - {'transform':'matrix(0.9763, 0.2164, -0.2164, 0.9763, 0, 0)'}, - {'transform':'matrix(1, 0, 0.2679, 1, 0, 0)'}, - {'transform':'matrix(1, 0.2679, 0.5774, 1, 0, 0)'}, - {'transform':'matrix(1, 0, 0.08749, 1, 0, 0)'}, - {'transform':'matrix(1, 0.2679, 0.7002, 1, 0, 0)'}, - {'transform':'matrix(1, 0.08749, 0.1763, 1, 0, 0)'}, - {'transform':'matrix(1, 0.08749, 0.4663, 1, 0, 0)'}, - {'transform':'matrix(1, 0, 0.5774, 1, 0, 0)'}, - {'transform':'matrix(1, 0, 0.1763, 1, 0, 0)'}, - {'transform':'matrix(1, 0.5774, 0, 1, 0, 0)'}, - {'transform':'matrix(1, 0.1763, 0, 1, 0, 0)'}, - {'transform':'matrix(-0.2557, 1.286, -1.286, -0.2557, 7.5, 7.5)'}, - {'transform':'matrix(0.9176, 0.6131, -0.6131, 0.9176, 2.5, 2.5)'}, - ]); - }); - at(2 * 1000, function() { - assert_styles(".anim", [ - {'transform':'matrix(1, 0, 0, 1, 30, 0)'}, - {'transform':'matrix(1, 0, 0, 1, 20, 40)'}, - {'transform':'matrix(1, 0, 0, 1, 20, 0)'}, - {'transform':'matrix(1, 0, 0, 1, 0, 20)'}, - {'transform':'matrix(1, 0, 0, 1, 0, 0)'}, - {'transform':'matrix(1, 0, 0, 1, 20, 40)'}, - {'transform':'matrix(1, 0, 0, 1, 20, 0)'}, - {'transform':'matrix(1, 0, 0, 1, 0, 20)'}, - {'transform':'matrix(1, 0, 0, 1, 0, 0)'}, - {'transform':'matrix(1, 0, 0, 1, 30, 0)'}, - {'transform':'matrix(1, 0, 0, 1, 20, 0)'}, - {'transform':'matrix(1, 0, 0, 1, 0, 20)'}, - {'transform':'matrix(1, 0, 0, 1, 0, 0)'}, - {'transform':'matrix(1, 0, 0, 1, 30, 0)'}, - {'transform':'matrix(1, 0, 0, 1, 20, 40)'}, - {'transform':'matrix(1, 0, 0, 1, 0, 20)'}, - {'transform':'matrix(1, 0, 0, 1, 0, 0)'}, - {'transform':'matrix(1, 0, 0, 1, 30, 0)'}, - {'transform':'matrix(1, 0, 0, 1, 20, 40)'}, - {'transform':'matrix(1, 0, 0, 1, 20, 0)'}, - {'transform':'matrix(1.5, 0, 0, 3, 0, 0)'}, - {'transform':'matrix(2, 0, 0, 2, 0, 0)'}, - {'transform':'matrix(2, 0, 0, 1, 0, 0)'}, - {'transform':'matrix(1, 0, 0, 2, 0, 0)'}, - {'transform':'matrix(1, 0, 0, 1, 0, 0)'}, - {'transform':'matrix(2, 0, 0, 2, 0, 0)'}, - {'transform':'matrix(2, 0, 0, 1, 0, 0)'}, - {'transform':'matrix(1, 0, 0, 2, 0, 0)'}, - {'transform':'matrix(1, 0, 0, 1, 0, 0)'}, - {'transform':'matrix(1.5, 0, 0, 3, 0, 0)'}, - {'transform':'matrix(2, 0, 0, 1, 0, 0)'}, - {'transform':'matrix(1, 0, 0, 2, 0, 0)'}, - {'transform':'matrix(1, 0, 0, 1, 0, 0)'}, - {'transform':'matrix(1.5, 0, 0, 3, 0, 0)'}, - {'transform':'matrix(2, 0, 0, 2, 0, 0)'}, - {'transform':'matrix(1, 0, 0, 2, 0, 0)'}, - {'transform':'matrix(1, 0, 0, 1, 0, 0)'}, - {'transform':'matrix(1.5, 0, 0, 3, 0, 0)'}, - {'transform':'matrix(2, 0, 0, 2, 0, 0)'}, - {'transform':'matrix(2, 0, 0, 1, 0, 0)'}, - {'transform':'matrix(0.6428, 0.766, -0.766, 0.6428, 0, 0)'}, - {'transform':'matrix(1, 0, 0, 1, 0, 0)'}, - {'transform':'matrix(1, 0, 0.364, 1, 0, 0)'}, - {'transform':'matrix(1, 0.364, 0.8391, 1, 0, 0)'}, - {'transform':'matrix(1, 0, 0, 1, 0, 0)'}, - {'transform':'matrix(1, 0.364, 0.8391, 1, 0, 0)'}, - {'transform':'matrix(1, 0, 0, 1, 0, 0)'}, - {'transform':'matrix(1, 0, 0.364, 1, 0, 0)'}, - {'transform':'matrix(1, 0, 0.8391, 1, 0, 0)'}, - {'transform':'matrix(1, 0, 0, 1, 0, 0)'}, - {'transform':'matrix(1, 0.8391, 0, 1, 0, 0)'}, - {'transform':'matrix(1, 0, 0, 1, 0, 0)'}, - {'transform':'matrix(-1, 1, -1, -1, 10, 10)'}, - {'transform':'matrix(1, 0, 0, 1, 0, 0)'}, - ]); - }); -}, "Auto generated tests"); diff --git a/third_party/polymer/components/web-animations-js/test/testcases/auto-test-transform-primitives.html b/third_party/polymer/components/web-animations-js/test/testcases/auto-test-transform-primitives.html deleted file mode 100644 index 33c6c09..0000000 --- a/third_party/polymer/components/web-animations-js/test/testcases/auto-test-transform-primitives.html +++ /dev/null @@ -1,97 +0,0 @@ -<!-- -Copyright 2012 Google Inc. All Rights Reserved. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. ---> - -<!DOCTYPE html><meta charset="UTF-8"> -<style> -.anim { - left: 0px; - width: 30px; - height: 30px; - background-color: lightsteelblue; - position: absolute; -} - -.expected { - width: 30px; - height: 30px; - position: absolute; - background-color: red; -} -</style> -<div></div> -<div style="height: 600px;"></div> -<script src="../bootstrap.js"></script> -<script> -"use strict"; - -var transformValues = [ - ['translate(0px)', 'translate(30px)', 'translate(20px, 40px)', - 'translateX(20px)', 'translateY(20px)'], - ['scale(1, 1)', 'scale(1.5, 3)', 'scale(2)', 'scaleX(2)', 'scaleY(2)'], - ['rotate(0deg)', 'rotate(50deg)'], - ['skew(0deg)', 'skew(20deg)', 'skew(40deg, 20deg)'], - ['skewX(0deg)', 'skewX(40deg)'], - ['skewY(0deg)', 'skewY(40deg)'], - ['matrix(1, 0, 0, 1, 0, 0)', 'matrix(-1, 1, -1, -1, 10, 10)'], -]; - -var separation_x = 100; -var separation_y = 50; -var max_x = 1000; - -var toplevel = document.querySelector("div"); -var y = 50; - -var animations = []; - -for (var i = 0; i < transformValues.length; i++) { - var x = 10; - for (var j = 0; j < transformValues[i].length; j++) { - for (var k = 0; k < transformValues[i].length; k++) { - if (j == k) { - continue; - } - toplevel.appendChild(document.createElement("div")); - var div = toplevel.lastChild; - div.className = "expected"; - div.style.top = y + 'px'; - div.style.left = x + 'px'; - div.style[_WebAnimationsTestingUtilities._prefixProperty('transform')] = transformValues[i][k]; - toplevel.appendChild(document.createElement("div")); - var div = toplevel.lastChild; - div.className = "anim"; - div.style.top = y + 'px'; - div.style.left = x + 'px'; - div.id = "i" + i + "_" + j + "_" + k - animations.push(new Animation(div, [ - {transform: transformValues[i][j]}, - {transform: transformValues[i][k]}, - ], {duration: 2 * 1000, fill: 'forwards'})); - x += separation_x; - if (x > max_x) { - x = 20; - y += separation_y; - } - } - } - y += separation_y; -} - -</script> -<script> -"use strict"; -animations.forEach(function(anim) { document.timeline.play(anim); }); -</script> diff --git a/third_party/polymer/components/web-animations-js/test/testcases/auto-test-transform-units-checks.js b/third_party/polymer/components/web-animations-js/test/testcases/auto-test-transform-units-checks.js deleted file mode 100644 index fcba750..0000000 --- a/third_party/polymer/components/web-animations-js/test/testcases/auto-test-transform-units-checks.js +++ /dev/null @@ -1,202 +0,0 @@ -timing_test(function() { - at(0.5 * 1000, function() { - assert_styles( - '.anim', - [{'transform':'matrix(1, 0, 0, 1, 40, 0)'}, - {'transform':'matrix(1, 0, 0, 1, 0.75, 24)'}, - {'transform':'matrix(1, 0, 0, 1, 120, 0)'}, - {'transform':'matrix(1, 0, 0, 1, 120.75, 24)'}, - {'transform':'matrix(1, 0, 0, 1, 2.25, 72)'}, - {'transform':'matrix(1, 0, 0, 1, 42.25, 72)'}, - {'transform':'matrix(0.9762960071199334, 0.21643961393810288, -0.21643961393810288, 0.9762960071199334, 0, 0)'}, - {'transform':'matrix(0.7316888688738209, 0.6816387600233341, -0.6816387600233341, 0.7316888688738209, 0, 0)'}, - {'transform':'matrix(0.7071067811865476, 0.7071067811865475, -0.7071067811865475, 0.7071067811865476, 0, 0)'}, - {'transform':'matrix(0.7933533402912352, 0.6087614290087207, -0.6087614290087207, 0.7933533402912352, 0, 0)'}, - {'transform':'matrix(0.16553242255542416, 0.9862043485418894, -0.9862043485418894, 0.16553242255542416, 0, 0)'}, - {'transform':'matrix(0.1305261922200517, 0.9914448613738104, -0.9914448613738104, 0.1305261922200517, 0, 0)'}, - {'transform':'matrix(-0.6281736227227395, 0.778073196887921, -0.778073196887921, -0.6281736227227395, 0, 0)'}, - {'transform':'matrix(-0.781689261992281, 0.62366809898051, -0.62366809898051, -0.781689261992281, 0, 0)'}, - {'transform':'matrix(-0.9943666621687136, 0.1059950053891757, -0.1059950053891757, -0.9943666621687136, 0, 0)'}, - {'transform':'matrix(-0.7071067811865475, 0.7071067811865476, -0.7071067811865476, -0.7071067811865475, 0, 0)'}, - {'transform':'matrix(-0.8433914458128857, 0.5372996083468238, -0.5372996083468238, -0.8433914458128857, 0, 0)'}, - {'transform':'matrix(-0.9993735504314827, 0.035390771367304535, -0.035390771367304535, -0.9993735504314827, 0, 0)'}, - {'transform':'matrix(1, 0, -3.380515006246586, 1, 0, 0)'}, - {'transform':'matrix(1, -3.380515006246586, 0.15838444032453627, 1, 0, 0)'}, - {'transform':'matrix(1, 0, -0.8559934009085187, 1, 0, 0)'}, - {'transform':'matrix(1, -3.380515006246586, -0.6143216646333806, 1, 0, 0)'}, - {'transform':'matrix(1, -0.8559934009085187, 0.5095254494944288, 1, 0, 0)'}, - {'transform':'matrix(1, -0.8559934009085187, -1.0545577214842652, 1, 0, 0)'}, - {'transform':'matrix(1, 0, 0.07870170682461844, 1, 0, 0)'}, - {'transform':'matrix(1, 0, 0.6483608274590866, 1, 0, 0)'}, - {'transform':'matrix(1, 0, 0.24007875908011603, 1, 0, 0)'}, - {'transform':'matrix(1, 0, 1.0522267420378377, 1, 0, 0)'}, - {'transform':'matrix(1, 0, -6.405331196646276, 1, 0, 0)'}, - {'transform':'matrix(1, 0, -4.20622653616987, 1, 0, 0)'}, - {'transform':'matrix(1, -3.380515006246586, 0, 1, 0, 0)'}, - {'transform':'matrix(1, 0.15838444032453627, 0, 1, 0, 0)'}, - {'transform':'matrix(1, -0.8559934009085187, 0, 1, 0, 0)'}, - {'transform':'matrix(1, -0.6143216646333806, 0, 1, 0, 0)'}, - {'transform':'matrix(1, 0.5095254494944288, 0, 1, 0, 0)'}, - {'transform':'matrix(1, -1.0545577214842652, 0, 1, 0, 0)'}]); - }, "Autogenerated"); - at(1 * 1000, function() { - assert_styles( - '.anim', - [{'transform':'matrix(1, 0, 0, 1, 80, 0)'}, - {'transform':'matrix(1, 0, 0, 1, 1.5, 48)'}, - {'transform':'matrix(1, 0, 0, 1, 80, 0)'}, - {'transform':'matrix(1, 0, 0, 1, 81.5, 48)'}, - {'transform':'matrix(1, 0, 0, 1, 1.5, 48)'}, - {'transform':'matrix(1, 0, 0, 1, 81.5, 48)'}, - {'transform':'matrix(0.9063077870366499, 0.42261826174069944, -0.42261826174069944, 0.9063077870366499, 0, 0)'}, - {'transform':'matrix(0.0707372016677029, 0.9974949866040544, -0.9974949866040544, 0.0707372016677029, 0, 0)'}, - {'transform':'matrix(0.00000000000000006123031769111886, 1, -1, 0.00000000000000006123031769111886, 0, 0)'}, - {'transform':'matrix(0.9063077870366499, 0.42261826174069944, -0.42261826174069944, 0.9063077870366499, 0, 0)'}, - {'transform':'matrix(-0.35744992062904685, 0.9339323070984792, -0.9339323070984792, -0.35744992062904685, 0, 0)'}, - {'transform':'matrix(-0.42261826174069933, 0.90630778703665, -0.90630778703665, -0.42261826174069933, 0, 0)'}, - {'transform':'matrix(0.0707372016677029, 0.9974949866040544, -0.9974949866040544, 0.0707372016677029, 0, 0)'}, - {'transform':'matrix(-0.35744992062904685, 0.9339323070984792, -0.9339323070984792, -0.35744992062904685, 0, 0)'}, - {'transform':'matrix(-0.9974949866040544, 0.07073720166770342, -0.07073720166770342, -0.9974949866040544, 0, 0)'}, - {'transform':'matrix(0.00000000000000006123031769111886, 1, -1, 0.00000000000000006123031769111886, 0, 0)'}, - {'transform':'matrix(-0.42261826174069933, 0.90630778703665, -0.90630778703665, -0.42261826174069933, 0, 0)'}, - {'transform':'matrix(-0.9974949866040544, 0.07073720166770342, -0.07073720166770342, -0.9974949866040544, 0, 0)'}, - {'transform':'matrix(1, 0, 0.6483608274590866, 1, 0, 0)'}, - {'transform':'matrix(1, 0.6483608274590866, 0.3249196962329063, 1, 0, 0)'}, - {'transform':'matrix(1, 0, 0.6483608274590866, 1, 0, 0)'}, - {'transform':'matrix(1, 0.6483608274590866, 1.2330389177361016, 1, 0, 0)'}, - {'transform':'matrix(1, 0.6483608274590866, 0.3249196962329063, 1, 0, 0)'}, - {'transform':'matrix(1, 0.6483608274590866, 1.2330389177361016, 1, 0, 0)'}, - {'transform':'matrix(1, 0, 0.15838444032453627, 1, 0, 0)'}, - {'transform':'matrix(1, 0, 2.237160944224742, 1, 0, 0)'}, - {'transform':'matrix(1, 0, 0.15838444032453627, 1, 0, 0)'}, - {'transform':'matrix(1, 0, 3.7101784049164297, 1, 0, 0)'}, - {'transform':'matrix(1, 0, 2.237160944224742, 1, 0, 0)'}, - {'transform':'matrix(1, 0, 3.7101784049164297, 1, 0, 0)'}, - {'transform':'matrix(1, 0.6483608274590866, 0, 1, 0, 0)'}, - {'transform':'matrix(1, 0.3249196962329063, 0, 1, 0, 0)'}, - {'transform':'matrix(1, 0.6483608274590866, 0, 1, 0, 0)'}, - {'transform':'matrix(1, 1.2330389177361016, 0, 1, 0, 0)'}, - {'transform':'matrix(1, 0.3249196962329063, 0, 1, 0, 0)'}, - {'transform':'matrix(1, 1.2330389177361016, 0, 1, 0, 0)'}]); - }, "Autogenerated"); - at(1.5 * 1000, function() { - assert_styles( - '.anim', - [{'transform':'matrix(1, 0, 0, 1, 120, 0)'}, - {'transform':'matrix(1, 0, 0, 1, 2.25, 72)'}, - {'transform':'matrix(1, 0, 0, 1, 40, 0)'}, - {'transform':'matrix(1, 0, 0, 1, 42.25, 72)'}, - {'transform':'matrix(1, 0, 0, 1, 0.75, 24)'}, - {'transform':'matrix(1, 0, 0, 1, 120.75, 24)'}, - {'transform':'matrix(0.7933533402912352, 0.6087614290087207, -0.6087614290087207, 0.7933533402912352, 0, 0)'}, - {'transform':'matrix(-0.6281736227227395, 0.778073196887921, -0.778073196887921, -0.6281736227227395, 0, 0)'}, - {'transform':'matrix(-0.7071067811865475, 0.7071067811865476, -0.7071067811865476, -0.7071067811865475, 0, 0)'}, - {'transform':'matrix(0.9762960071199334, 0.21643961393810288, -0.21643961393810288, 0.9762960071199334, 0, 0)'}, - {'transform':'matrix(-0.781689261992281, 0.62366809898051, -0.62366809898051, -0.781689261992281, 0, 0)'}, - {'transform':'matrix(-0.8433914458128857, 0.5372996083468238, -0.5372996083468238, -0.8433914458128857, 0, 0)'}, - {'transform':'matrix(0.7316888688738209, 0.6816387600233341, -0.6816387600233341, 0.7316888688738209, 0, 0)'}, - {'transform':'matrix(0.16553242255542416, 0.9862043485418894, -0.9862043485418894, 0.16553242255542416, 0, 0)'}, - {'transform':'matrix(-0.9993735504314827, 0.035390771367304535, -0.035390771367304535, -0.9993735504314827, 0, 0)'}, - {'transform':'matrix(0.7071067811865476, 0.7071067811865475, -0.7071067811865475, 0.7071067811865476, 0, 0)'}, - {'transform':'matrix(0.1305261922200517, 0.9914448613738104, -0.9914448613738104, 0.1305261922200517, 0, 0)'}, - {'transform':'matrix(-0.9943666621687136, 0.1059950053891757, -0.1059950053891757, -0.9943666621687136, 0, 0)'}, - {'transform':'matrix(1, 0, -0.8559934009085187, 1, 0, 0)'}, - {'transform':'matrix(1, -0.8559934009085187, 0.5095254494944288, 1, 0, 0)'}, - {'transform':'matrix(1, 0, -3.380515006246586, 1, 0, 0)'}, - {'transform':'matrix(1, -0.8559934009085187, -1.0545577214842652, 1, 0, 0)'}, - {'transform':'matrix(1, -3.380515006246586, 0.15838444032453627, 1, 0, 0)'}, - {'transform':'matrix(1, -3.380515006246586, -0.6143216646333806, 1, 0, 0)'}, - {'transform':'matrix(1, 0, 0.24007875908011603, 1, 0, 0)'}, - {'transform':'matrix(1, 0, -6.405331196646276, 1, 0, 0)'}, - {'transform':'matrix(1, 0, 0.07870170682461844, 1, 0, 0)'}, - {'transform':'matrix(1, 0, -4.20622653616987, 1, 0, 0)'}, - {'transform':'matrix(1, 0, 0.6483608274590866, 1, 0, 0)'}, - {'transform':'matrix(1, 0, 1.0522267420378377, 1, 0, 0)'}, - {'transform':'matrix(1, -0.8559934009085187, 0, 1, 0, 0)'}, - {'transform':'matrix(1, 0.5095254494944288, 0, 1, 0, 0)'}, - {'transform':'matrix(1, -3.380515006246586, 0, 1, 0, 0)'}, - {'transform':'matrix(1, -1.0545577214842652, 0, 1, 0, 0)'}, - {'transform':'matrix(1, 0.15838444032453627, 0, 1, 0, 0)'}, - {'transform':'matrix(1, -0.6143216646333806, 0, 1, 0, 0)'}]); - }, "Autogenerated"); - at(2 * 1000, function() { - assert_styles( - '.anim', - [{'transform':'matrix(1, 0, 0, 1, 160, 0)'}, - {'transform':'matrix(1, 0, 0, 1, 3, 96)'}, - {'transform':'matrix(1, 0, 0, 1, 0, 0)'}, - {'transform':'matrix(1, 0, 0, 1, 3, 96)'}, - {'transform':'matrix(1, 0, 0, 1, 0, 0)'}, - {'transform':'matrix(1, 0, 0, 1, 160, 0)'}, - {'transform':'matrix(0.6427876096865394, 0.766044443118978, -0.766044443118978, 0.6427876096865394, 0, 0)'}, - {'transform':'matrix(-0.9899924966004454, 0.1411200080598672, -0.1411200080598672, -0.9899924966004454, 0, 0)'}, - {'transform':'matrix(-1, 0.00000000000000012246063538223773, -0.00000000000000012246063538223773, -1, 0, 0)'}, - {'transform':'matrix(1, 0, 0, 1, 0, 0)'}, - {'transform':'matrix(-0.9899924966004454, 0.1411200080598672, -0.1411200080598672, -0.9899924966004454, 0, 0)'}, - {'transform':'matrix(-1, 0.00000000000000012246063538223773, -0.00000000000000012246063538223773, -1, 0, 0)'}, - {'transform':'matrix(1, 0, 0, 1, 0, 0)'}, - {'transform':'matrix(0.6427876096865394, 0.766044443118978, -0.766044443118978, 0.6427876096865394, 0, 0)'}, - {'transform':'matrix(-1, 0.00000000000000012246063538223773, -0.00000000000000012246063538223773, -1, 0, 0)'}, - {'transform':'matrix(1, 0, 0, 1, 0, 0)'}, - {'transform':'matrix(0.6427876096865394, 0.766044443118978, -0.766044443118978, 0.6427876096865394, 0, 0)'}, - {'transform':'matrix(-0.9899924966004454, 0.1411200080598672, -0.1411200080598672, -0.9899924966004454, 0, 0)'}, - {'transform':'matrix(1, 0, 2.237160944224742, 1, 0, 0)'}, - {'transform':'matrix(1, 2.237160944224742, 0.7265425280053609, 1, 0, 0)'}, - {'transform':'matrix(1, 0, 0, 1, 0, 0)'}, - {'transform':'matrix(1, 2.237160944224742, 0.7265425280053609, 1, 0, 0)'}, - {'transform':'matrix(1, 0, 0, 1, 0, 0)'}, - {'transform':'matrix(1, 0, 2.237160944224742, 1, 0, 0)'}, - {'transform':'matrix(1, 0, 0.3249196962329063, 1, 0, 0)'}, - {'transform':'matrix(1, 0, -1.117214930923896, 1, 0, 0)'}, - {'transform':'matrix(1, 0, 0, 1, 0, 0)'}, - {'transform':'matrix(1, 0, -1.117214930923896, 1, 0, 0)'}, - {'transform':'matrix(1, 0, 0, 1, 0, 0)'}, - {'transform':'matrix(1, 0, 0.3249196962329063, 1, 0, 0)'}, - {'transform':'matrix(1, 2.237160944224742, 0, 1, 0, 0)'}, - {'transform':'matrix(1, 0.7265425280053609, 0, 1, 0, 0)'}, - {'transform':'matrix(1, 0, 0, 1, 0, 0)'}, - {'transform':'matrix(1, 0.7265425280053609, 0, 1, 0, 0)'}, - {'transform':'matrix(1, 0, 0, 1, 0, 0)'}, - {'transform':'matrix(1, 2.237160944224742, 0, 1, 0, 0)'}]); - }, "Autogenerated"); - at(2.5 * 1000, function() { - assert_styles( - '.anim', - [{'transform':'matrix(1, 0, 0, 1, 160, 0)'}, - {'transform':'matrix(1, 0, 0, 1, 3, 96)'}, - {'transform':'matrix(1, 0, 0, 1, 0, 0)'}, - {'transform':'matrix(1, 0, 0, 1, 3, 96)'}, - {'transform':'matrix(1, 0, 0, 1, 0, 0)'}, - {'transform':'matrix(1, 0, 0, 1, 160, 0)'}, - {'transform':'matrix(0.6427876096865394, 0.766044443118978, -0.766044443118978, 0.6427876096865394, 0, 0)'}, - {'transform':'matrix(-0.9899924966004454, 0.1411200080598672, -0.1411200080598672, -0.9899924966004454, 0, 0)'}, - {'transform':'matrix(-1, 0.00000000000000012246063538223773, -0.00000000000000012246063538223773, -1, 0, 0)'}, - {'transform':'matrix(1, 0, 0, 1, 0, 0)'}, - {'transform':'matrix(-0.9899924966004454, 0.1411200080598672, -0.1411200080598672, -0.9899924966004454, 0, 0)'}, - {'transform':'matrix(-1, 0.00000000000000012246063538223773, -0.00000000000000012246063538223773, -1, 0, 0)'}, - {'transform':'matrix(1, 0, 0, 1, 0, 0)'}, - {'transform':'matrix(0.6427876096865394, 0.766044443118978, -0.766044443118978, 0.6427876096865394, 0, 0)'}, - {'transform':'matrix(-1, 0.00000000000000012246063538223773, -0.00000000000000012246063538223773, -1, 0, 0)'}, - {'transform':'matrix(1, 0, 0, 1, 0, 0)'}, - {'transform':'matrix(0.6427876096865394, 0.766044443118978, -0.766044443118978, 0.6427876096865394, 0, 0)'}, - {'transform':'matrix(-0.9899924966004454, 0.1411200080598672, -0.1411200080598672, -0.9899924966004454, 0, 0)'}, - {'transform':'matrix(1, 0, 2.237160944224742, 1, 0, 0)'}, - {'transform':'matrix(1, 2.237160944224742, 0.7265425280053609, 1, 0, 0)'}, - {'transform':'matrix(1, 0, 0, 1, 0, 0)'}, - {'transform':'matrix(1, 2.237160944224742, 0.7265425280053609, 1, 0, 0)'}, - {'transform':'matrix(1, 0, 0, 1, 0, 0)'}, - {'transform':'matrix(1, 0, 2.237160944224742, 1, 0, 0)'}, - {'transform':'matrix(1, 0, 0.3249196962329063, 1, 0, 0)'}, - {'transform':'matrix(1, 0, -1.117214930923896, 1, 0, 0)'}, - {'transform':'matrix(1, 0, 0, 1, 0, 0)'}, - {'transform':'matrix(1, 0, -1.117214930923896, 1, 0, 0)'}, - {'transform':'matrix(1, 0, 0, 1, 0, 0)'}, - {'transform':'matrix(1, 0, 0.3249196962329063, 1, 0, 0)'}, - {'transform':'matrix(1, 2.237160944224742, 0, 1, 0, 0)'}, - {'transform':'matrix(1, 0.7265425280053609, 0, 1, 0, 0)'}, - {'transform':'matrix(1, 0, 0, 1, 0, 0)'}, - {'transform':'matrix(1, 0.7265425280053609, 0, 1, 0, 0)'}, - {'transform':'matrix(1, 0, 0, 1, 0, 0)'}, - {'transform':'matrix(1, 2.237160944224742, 0, 1, 0, 0)'}]); - }, "Autogenerated"); -}, "Autogenerated checks."); diff --git a/third_party/polymer/components/web-animations-js/test/testcases/auto-test-transform-units.html b/third_party/polymer/components/web-animations-js/test/testcases/auto-test-transform-units.html deleted file mode 100644 index 924fe12..0000000 --- a/third_party/polymer/components/web-animations-js/test/testcases/auto-test-transform-units.html +++ /dev/null @@ -1,98 +0,0 @@ -<!-- -Copyright 2012 Google Inc. All Rights Reserved. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. ---> - -<!DOCTYPE html><meta charset="UTF-8"> -<style> -.anim { - left: 0px; - width: 30px; - height: 30px; - background-color: lightsteelblue; - position: absolute; -} - -.expected { - width: 30px; - height: 30px; - position: absolute; - background-color: red; -} -</style> -<div style="height: 400px"></div> - -<script> -var expected_failures = [ - { - browser_configurations: [{ msie: true }], - tests: ['Autogenerated'], - message: 'Floating point issues.', - } -]; -</script> -<script src="../bootstrap.js"></script> -<script> -"use strict"; - -var transformValues = [ - ['translate(0px, 0px)', 'translate(10em)', 'translate(10%, 1in)'], - ['rotate(0deg)', 'rotate(50deg)', 'rotate(3rad)', 'rotate(200grad)'], - ['skew(0deg)', 'skew(20rad)', 'skew(40grad, 20rad)'], - ['skewX(0deg)', 'skewX(20grad)', 'skewX(40rad)'], - ['skewY(0deg)', 'skewY(20rad)', 'skewY(40grad)'] -]; - -var separation_x = 100; -var separation_y = 50; -var max_x = 1000; - -var toplevel = document.querySelector("div"); -var y = 50; -var animations = []; -for (var i = 0; i < transformValues.length; i++) { - var x = 10; - for (var j = 0; j < transformValues[i].length; j++) { - for (var k = 0; k < transformValues[i].length; k++) { - if (j == k) { - continue; - } - toplevel.appendChild(document.createElement("div")); - var div = toplevel.lastChild; - div.className = "expected"; - div.style.top = y + 'px'; - div.style.left = x + 'px'; - div.style[_WebAnimationsTestingUtilities._prefixProperty('transform')] = transformValues[i][k]; - toplevel.appendChild(document.createElement("div")); - var div = toplevel.lastChild; - div.className = "anim"; - div.style.top = y + 'px'; - div.style.left = x + 'px'; - div.id = "i" + i + "_" + j + "_" + k - animations.push(new Animation(div, [ - {transform: transformValues[i][j]}, - {transform: transformValues[i][k]}, - ], {duration: 2 * 1000, fill: 'forwards'})); - x += separation_x; - if (x > max_x) { - x = 20; - y += separation_y; - } - } - } - y += separation_y; -} - -animations.forEach(function(anim) { document.timeline.play(anim); }); -</script> diff --git a/third_party/polymer/components/web-animations-js/test/testcases/auto-test-visibility-checks.js b/third_party/polymer/components/web-animations-js/test/testcases/auto-test-visibility-checks.js deleted file mode 100644 index 6854ade..0000000 --- a/third_party/polymer/components/web-animations-js/test/testcases/auto-test-visibility-checks.js +++ /dev/null @@ -1,54 +0,0 @@ -timing_test(function() { - at(0 * 1000, function() { - assert_styles( - '.test', - [{'visibility':'visible'}, - {'visibility':'visible'}, - {'visibility':'visible'}, - {'visibility':'hidden'}, - {'visibility':'hidden'}, - {'visibility':'hidden'}, - {'visibility':'collapse'}, - {'visibility':'collapse'}, - {'visibility':'collapse'}]); - }, "Autogenerated"); - at(0.2 * 1000, function() { - assert_styles( - '.test', - [{'visibility':'visible'}, - {'visibility':'visible'}, - {'visibility':'visible'}, - {'visibility':'hidden'}, - {'visibility':'hidden'}, - {'visibility':'hidden'}, - {'visibility':'collapse'}, - {'visibility':'collapse'}, - {'visibility':'collapse'}]); - }, "Autogenerated"); - at(0.4 * 1000, function() { - assert_styles( - '.test', - [{'visibility':'visible'}, - {'visibility':'visible'}, - {'visibility':'visible'}, - {'visibility':'visible'}, - {'visibility':'hidden'}, - {'visibility':'collapse'}, - {'visibility':'visible'}, - {'visibility':'hidden'}, - {'visibility':'collapse'}]); - }, "Autogenerated"); - at(0.6000000000000001 * 1000, function() { - assert_styles( - '.test', - [{'visibility':'visible'}, - {'visibility':'hidden'}, - {'visibility':'collapse'}, - {'visibility':'visible'}, - {'visibility':'hidden'}, - {'visibility':'collapse'}, - {'visibility':'visible'}, - {'visibility':'hidden'}, - {'visibility':'collapse'}]); - }, "Autogenerated"); -}, "Autogenerated checks."); diff --git a/third_party/polymer/components/web-animations-js/test/testcases/auto-test-visibility.html b/third_party/polymer/components/web-animations-js/test/testcases/auto-test-visibility.html deleted file mode 100644 index 7d3b261..0000000 --- a/third_party/polymer/components/web-animations-js/test/testcases/auto-test-visibility.html +++ /dev/null @@ -1,80 +0,0 @@ -<!-- -Copyright 2012 Google Inc. All Rights Reserved. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. ---> - -<!DOCTYPE html><meta charset="UTF-8"> -<body> -<style> -body { - margin: 0px; -} -.test { - height: 50px; - background: lightsteelblue; -} -.red { - background: red; -} -.expectation { - position: relative; - background: red; -} -</style> -<script> -"use strict"; -// Create the elements -var states = {'visible':1, 'hidden':1, 'collapse':1}; -for (var start in states) { - for (var end in states) { - var frames = [start, end]; - var testContainer = document.createElement('div'); - testContainer.textContent = 'visibility: ' + JSON.stringify(frames); - document.body.appendChild(testContainer); - if (end == 'visible') { - var expectation = document.createElement('div'); - expectation.classList.add('expectation'); - testContainer.appendChild(expectation); - } - var testElement = document.createElement('div'); - testElement.classList.add('test'); - testElement.id = start + "_" + end - if (end == 'hidden' || end == 'collapse') { - testElement.classList.add('red'); - } - testContainer.appendChild(testElement); - } -} - -</script> -<script src="../bootstrap.js"></script> -<script> -"use strict"; -var timing = {duration: 0.5 * 1000, easing: 'steps(2, end)', fill: 'forwards'}; - -// Add the animations -var animations = []; -for (var start in states) { - for (var end in states) { - var effect = [{visibility: start}, {visibility: end}]; - var testElement = document.getElementById(start + "_" + end); - animations.push( - new Animation(testElement, effect, timing)); - } -} -</script> -<script> -"use strict"; -animations.forEach(function(anim) { document.timeline.play(anim); }); -</script> diff --git a/third_party/polymer/components/web-animations-js/test/testcases/auto-test-wrapping-bug-checks.js b/third_party/polymer/components/web-animations-js/test/testcases/auto-test-wrapping-bug-checks.js deleted file mode 100644 index 6849677..0000000 --- a/third_party/polymer/components/web-animations-js/test/testcases/auto-test-wrapping-bug-checks.js +++ /dev/null @@ -1,58 +0,0 @@ -timing_test(function() { - at(0 * 1000, function() { - assert_styles( - '.anim', - [{'transform':'matrix(1, 0, 0, 1, -800, 0)'}, - {'transform':'matrix(1, 0, 0, 1, -800, 0)'}, - {'transform':'matrix(1, 0, 0, 1, -800, 0)'}, - {'transform':'matrix(1, 0, 0, 1, -800, 0)'}]); - }, "Autogenerated"); - at(0.1 * 1000, function() { - assert_styles( - '.anim', - [{'transform':'matrix(1, 0, 0, 1, -800, 0)'}, - {'transform':'matrix(1, 0, 0, 1, -800, 0)'}, - {'transform':'matrix(1, 0, 0, 1, -800, 0)'}, - {'transform':'matrix(1, 0, 0, 1, -800, 0)'}]); - }, "Autogenerated"); - at(0.2 * 1000, function() { - assert_styles( - '.anim', - [{'transform':'matrix(1, 0, 0, 1, -800, 0)'}, - {'transform':'matrix(1, 0, 0, 1, -800, 0)'}, - {'transform':'matrix(1, 0, 0, 1, -800, 0)'}, - {'transform':'matrix(1, 0, 0, 1, -800, 0)'}]); - }, "Autogenerated"); - at(0.30000000000000004 * 1000, function() { - assert_styles( - '.anim', - [{'transform':'matrix(1, 0, 0, 1, -666.6666870117188, 0)'}, - {'transform':'matrix(1, 0, 0, 1, -533.3333129882813, 0)'}, - {'transform':'matrix(1, 0, 0, 1, -533.3599853515625, 0)'}, - {'transform':'matrix(1, 0, 0, 1, -533.3333129882813, 0)'}]); - }, "Autogenerated"); - at(0.4 * 1000, function() { - assert_styles( - '.anim', - [{'transform':'matrix(1, 0, 0, 1, -400, 0)'}, - {'transform':'matrix(1, 0, 0, 1, -266.6666564941406, 0)'}, - {'transform':'matrix(1, 0, 0, 1, -266.6933288574219, 0)'}, - {'transform':'matrix(1, 0, 0, 1, -266.6666564941406, 0)'}]); - }, "Autogenerated"); - at(0.5 * 1000, function() { - assert_styles( - '.anim', - [{'transform':'matrix(1, 0, 0, 1, -133.3333282470703, 0)'}, - {'transform':'matrix(1, 0, 0, 1, 0, 0)'}, - {'transform':'matrix(1, 0, 0, 1, -0.02666666731238365, 0)'}, - {'transform':'matrix(1, 0, 0, 1, -800, 0)'}]); - }, "Autogenerated"); - at(0.6 * 1000, function() { - assert_styles( - '.anim', - [{'transform':'matrix(1, 0, 0, 1, 0, 0)'}, - {'transform':'matrix(1, 0, 0, 1, 0, 0)'}, - {'transform':'matrix(1, 0, 0, 1, -800, 0)'}, - {'transform':'matrix(1, 0, 0, 1, -800, 0)'}]); - }, "Autogenerated"); -}, "Autogenerated checks."); diff --git a/third_party/polymer/components/web-animations-js/test/testcases/auto-test-wrapping-bug.html b/third_party/polymer/components/web-animations-js/test/testcases/auto-test-wrapping-bug.html deleted file mode 100644 index 7a4d359..0000000 --- a/third_party/polymer/components/web-animations-js/test/testcases/auto-test-wrapping-bug.html +++ /dev/null @@ -1,60 +0,0 @@ -<!-- -Copyright 2012 Google Inc. All Rights Reserved. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. ---> - -<!DOCTYPE html><meta charset="UTF-8"> -<style> -.anim { - width: 800px; - height: 70px; - -webkit-transform: translate(-800px, 0px); - transform: translate(-800px, 0px); - background-color: lightsteelblue; -} -</style> -<div class="anim" id="overflow"></div> -<div class="anim" id="overflowControl"></div> -<div class="anim" id="underflow"></div> -<div class="anim" id="underflowControl"></div> -<script src="../bootstrap.js"></script> -<script> -"use strict"; - -var effect = [{transform: "translate(-800px,0px)"}, {transform: "translate(0px,0px)"}]; - -var group = new AnimationGroup(); -document.timeline.play(new AnimationGroup([ - new Animation(overflow, - effect, - { duration: 0.3 * 1000, delay: 0.25 * 1000, fill: 'forwards' })])); - -document.timeline.play(new AnimationGroup([ - new Animation(overflowControl, - effect, - { duration: 0.3 * 1000, delay: 0.2 * 1000, fill: 'forwards' })])); - -document.timeline.play(new AnimationGroup([ - new Animation(underflow, - effect, - { duration: 0.3 * 1000, delay: 0.20001 * 1000, fill: 'none' })])); - -document.timeline.play(new AnimationGroup([ - new Animation(underflowControl, - effect, - { duration: 0.3 * 1000, delay: 0.2 * 1000, fill: 'none' })])); - -</script> - - diff --git a/third_party/polymer/components/web-animations-js/test/testcases/background.png b/third_party/polymer/components/web-animations-js/test/testcases/background.png Binary files differdeleted file mode 100644 index ea4e8d5..0000000 --- a/third_party/polymer/components/web-animations-js/test/testcases/background.png +++ /dev/null diff --git a/third_party/polymer/components/web-animations-js/test/testcases/disabled-auto-test-change-playback-rate.html b/third_party/polymer/components/web-animations-js/test/testcases/disabled-auto-test-change-playback-rate.html deleted file mode 100644 index b62317a..0000000 --- a/third_party/polymer/components/web-animations-js/test/testcases/disabled-auto-test-change-playback-rate.html +++ /dev/null @@ -1,65 +0,0 @@ -<!-- -Copyright 2012 Google Inc. All Rights Reserved. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. ---> - - -<!-- -This test is currently broken. -1) The test doesn't work without simulating all the frames -2) The test fails when you simulate on t=0 boundary because currentTime_ ends - up null -3) The test fails when you simulate on t=0 boundary because relativeTime - returns null when zeroTime is null ---> - - -<!DOCTYPE html><meta charset="UTF-8"> -<style> -.anim { - left: 0px; - width: 100px; - height: 100px; - background-color: #FAA; - position: absolute; -} - -#a { - top: 0px -} -</style> - -<div id="a" class="anim a"></div> - - -<script src="../bootstrap.js"></script> -<script> -"use strict"; - -var a1 = new Animation(document.querySelector("#a"), - [{left: "0px"}, {left: "500px"}], - {duration: 10 * 1000, direction: 'alternating', iterations: Infinity}); -var player1 = document.timeline.play(a1); - -var a2 = new Animation(undefined, - function(timeFraction) { - var playbackRate = 0.01 + 10 * timeFraction; - player1.playbackRate = playbackRate - player2.playbackRate = playbackRate; - document.querySelector("#a").textContent = playbackRate; - }, - a1.timing.clone()); -var player2 = document.timeline.play(a2); - -</script> diff --git a/third_party/polymer/components/web-animations-js/test/testcases/disabled-auto-test-position-list-type.html b/third_party/polymer/components/web-animations-js/test/testcases/disabled-auto-test-position-list-type.html deleted file mode 100644 index db84548..0000000 --- a/third_party/polymer/components/web-animations-js/test/testcases/disabled-auto-test-position-list-type.html +++ /dev/null @@ -1,103 +0,0 @@ -<!-- -Copyright 2012 Google Inc. All Rights Reserved. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. ---> - -<!DOCTYPE html><meta charset="UTF-8"> -<style> -.anim { - width: 200px; - height: 200px; - display: inline-block; - border-style: solid; - font-weight: bold; - border-color: white; - color: white; - background-color: #888; - background-repeat: no-repeat; -} -</style> - -All divs should end up with a green block in the top left corner. -<div id="container"></div> - -<script src="../bootstrap.js"></script> -<script> -"use strict"; - -function generateGridLinesURI(size) { - var canvas = document.createElement('canvas'); - canvas.width = size; - canvas.height = size; - var context = canvas.getContext('2d'); - - context.fillStyle = 'green'; - context.fillRect(0.5, 0.5, size - 1, size - 1); - - context.lineWidth = 2; - context.strokeStyle = 'black'; - context.strokeRect(1, 1, size - 2, size - 2); - - return canvas.toDataURL(); -} -var backgroundImage = 'url(' + generateGridLinesURI(150) + ')'; - -var startPosition = '0% 0%'; -var endPositions = [ - 'left', - 'center', - 'right', - 'top', - 'bottom', - '10px', - '20%', - 'center left', - 'center center', - 'right bottom', - 'right 25%', - '10px bottom', - '10px 40px', - 'left bottom 10px', - 'center top 20%', - 'right top 10px', - 'right bottom 80%', - 'right 80% bottom', - 'bottom left 10px', - 'left 40px bottom 10px', - 'left 20% top 20%', - 'calc(25% - 5px)', - 'calc(25% - 5px) 25%', - 'top calc(25% - 5px) center', - 'bottom left 10px', - 'bottom calc(25% - 5px) right', - 'left 10px bottom 10px', - 'left 25% top 25%', - 'left calc(25% - 5px) top 10px', - 'top 10px right calc(25% - 5px)', - 'bottom calc(25% - 5px) left 10px', -]; - -for (var i = 0; i < endPositions.length; i++) { - var endPosition = endPositions[i]; - var pre = document.createElement('pre'); - pre.style.backgroundImage = backgroundImage; - pre.className = 'anim'; - pre.innerText = 'background-position:\nfrom: ' + startPosition + '\nto: ' + endPosition; - document.querySelector('#container').appendChild(pre); - document.timeline.play(new Animation(pre, new KeyframeEffect([ - { backgroundPosition: startPosition }, - { backgroundPosition: endPosition }, - ]), { duration:2, easing: 'ease-in'})); -} -</script> diff --git a/third_party/polymer/components/web-animations-js/test/testcases/disabled-media.html b/third_party/polymer/components/web-animations-js/test/testcases/disabled-media.html deleted file mode 100644 index b5862fc..0000000 --- a/third_party/polymer/components/web-animations-js/test/testcases/disabled-media.html +++ /dev/null @@ -1,439 +0,0 @@ -<!-- -Copyright 2013 Google Inc. All Rights Reserved. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. ---> - -<!-- -Requires the test harness to allow tests to be added after page load. See -https://github.com/web-animations/web-animations-js/issues/321 ---> - -<!DOCTYPE html><meta charset="UTF-8"> -<style type="text/css"> -video { - width: 100px; -} -</style> - -<!-- -Videos are taken from -http://techslides.com/sample-webm-ogg-and-mp4-video-files-for-html5 - -We serve them from a remote host to make sure they are served with a 206 -response code, to work around Chrome bug -https://code.google.com/p/chromium/issues/detail?id=121765. ---> -<div id="videos"> - <video preload="auto"> - <source src="http://web-animations.github.io/web-animations-js/test/testcases/small.webm" type="video/webm"> - <source src="http://web-animations.github.io/web-animations-js/test/testcases/small.mp4" type="video/mp4"> - </video> - <video preload="auto"> - <source src="http://web-animations.github.io/web-animations-js/test/testcases/small.webm" type="video/webm"> - <source src="http://web-animations.github.io/web-animations-js/test/testcases/small.mp4" type="video/mp4"> - </video> - <video preload="auto"> - <source src="http://web-animations.github.io/web-animations-js/test/testcases/small.webm" type="video/webm"> - <source src="http://web-animations.github.io/web-animations-js/test/testcases/small.mp4" type="video/mp4"> - </video> - <video preload="auto"> - <source src="http://web-animations.github.io/web-animations-js/test/testcases/small.webm" type="video/webm"> - <source src="http://web-animations.github.io/web-animations-js/test/testcases/small.mp4" type="video/mp4"> - </video> - <video preload="auto"> - <source src="http://web-animations.github.io/web-animations-js/test/testcases/small.webm" type="video/webm"> - <source src="http://web-animations.github.io/web-animations-js/test/testcases/small.mp4" type="video/mp4"> - </video> - <video preload="auto"> - <source src="http://web-animations.github.io/web-animations-js/test/testcases/small.webm" type="video/webm"> - <source src="http://web-animations.github.io/web-animations-js/test/testcases/small.mp4" type="video/mp4"> - </video> - <video preload="auto"> - <source src="http://web-animations.github.io/web-animations-js/test/testcases/small.webm" type="video/webm"> - <source src="http://web-animations.github.io/web-animations-js/test/testcases/small.mp4" type="video/mp4"> - </video> - <video preload="auto"> - <source src="http://web-animations.github.io/web-animations-js/test/testcases/small.webm" type="video/webm"> - <source src="http://web-animations.github.io/web-animations-js/test/testcases/small.mp4" type="video/mp4"> - </video> - <video preload="auto"> - <source src="http://web-animations.github.io/web-animations-js/test/testcases/small.webm" type="video/webm"> - <source src="http://web-animations.github.io/web-animations-js/test/testcases/small.mp4" type="video/mp4"> - </video> - <video preload="auto"> - <source src="http://web-animations.github.io/web-animations-js/test/testcases/small.webm" type="video/webm"> - <source src="http://web-animations.github.io/web-animations-js/test/testcases/small.mp4" type="video/mp4"> - </video> - <video preload="auto"> - <source src="http://web-animations.github.io/web-animations-js/test/testcases/small.webm" type="video/webm"> - <source src="http://web-animations.github.io/web-animations-js/test/testcases/small.mp4" type="video/mp4"> - </video> - <video preload="auto"> - <source src="http://web-animations.github.io/web-animations-js/test/testcases/small.webm" type="video/webm"> - <source src="http://web-animations.github.io/web-animations-js/test/testcases/small.mp4" type="video/mp4"> - </video> - <video preload="auto"> - <source src="http://web-animations.github.io/web-animations-js/test/testcases/small.webm" type="video/webm"> - <source src="http://web-animations.github.io/web-animations-js/test/testcases/small.mp4" type="video/mp4"> - </video> - <video preload="auto"> - <source src="http://web-animations.github.io/web-animations-js/test/testcases/small.webm" type="video/webm"> - <source src="http://web-animations.github.io/web-animations-js/test/testcases/small.mp4" type="video/mp4"> - </video> - <video preload="auto"> - <source src="http://web-animations.github.io/web-animations-js/test/testcases/small.webm" type="video/webm"> - <source src="http://web-animations.github.io/web-animations-js/test/testcases/small.mp4" type="video/mp4"> - </video> - <video preload="auto"> - <source src="http://web-animations.github.io/web-animations-js/test/testcases/small.webm" type="video/webm"> - <source src="http://web-animations.github.io/web-animations-js/test/testcases/small.mp4" type="video/mp4"> - </video> - <video preload="auto"> - <source src="http://web-animations.github.io/web-animations-js/test/testcases/small.webm" type="video/webm"> - <source src="http://web-animations.github.io/web-animations-js/test/testcases/small.mp4" type="video/mp4"> - </video> - <video preload="auto"> - <source src="http://web-animations.github.io/web-animations-js/test/testcases/small.webm" type="video/webm"> - <source src="http://web-animations.github.io/web-animations-js/test/testcases/small.mp4" type="video/mp4"> - </video> - <video preload="auto"> - <source src="http://web-animations.github.io/web-animations-js/test/testcases/small.webm" type="video/webm"> - <source src="http://web-animations.github.io/web-animations-js/test/testcases/small.mp4" type="video/mp4"> - </video> - <video preload="auto"> - <source src="http://web-animations.github.io/web-animations-js/test/testcases/small.webm" type="video/webm"> - <source src="http://web-animations.github.io/web-animations-js/test/testcases/small.mp4" type="video/mp4"> - </video> -</div> - -<script src="../bootstrap.js" nochecks></script> -<script> -"use strict"; - -var dt = document.timeline; - -// Most of these tests require the video to have loaded before they run. -// However, the test harness does not allow timing_test()s to be started after -// the page has finished loading. This means that we can't add the video -// dynamically then wait for it to load before testing. -// -// As a best-effort work-around, we include all videos in static HTML with -// preload="auto" to hint to the browser that they should be loaded -// immediately. However, this does not guarantee that they will be loaded when -// the page's load event fires, so the tests are flaky. -// -// TODO: Fix the test runner to allow the use of async_test() with -// timing_test(), which will allow the video elements to be created dynamically. -// See https://github.com/web-animations/web-animations-js/issues/321 -var videos = document.getElementById("videos").getElementsByTagName('video'); -// Cache this length, as videos is a live NodeList. -var numStaticVideos = videos.length; -var nextIndex = 0; -function getNextVideo() { - if (nextIndex >= numStaticVideos) { - throw new Error('No more videos!'); - } - return videos[nextIndex++]; -} - -function createVideo() { - // Videos taken from - // http://techslides.com/sample-webm-ogg-and-mp4-video-files-for-html5 - var video = document.createElement("video"); - var webmSource = document.createElement("source"); - webmSource.setAttribute("src", "small.webm"); - webmSource.setAttribute("type", "video/webm"); - video.appendChild(webmSource); - var mp4Source = document.createElement("source"); - mp4Source.setAttribute("src", "small.mp4"); - mp4Source.setAttribute("type", "video/mp4"); - video.appendChild(mp4Source); - document.getElementById("videos").appendChild(video); - return video; -} - -function testOnceVideosLoaded(callback, message) { - timing_test(function() { - at(0.0 * 1000, callback); - }, message); -} - -function createTestMediaReference(mediaElement, timing, parent) { - return new MediaReference(mediaElement, timing, parent, 0.0); -} - -var expectedVideoLength = 5.568; - - -// Test that MediaReference disables looping. -test(function() { - var video = getNextVideo(); - video.loop = true; - createTestMediaReference(video); - assert_false(video.loop); -}, "MediaReference should disable looping"); - -// Test intrinsic iteration duration before media loads. -test(function() { - assert_equals(createTestMediaReference(createVideo()).duration, - Infinity); -}, "Intrinsic duration should be Infinity before media loads"); - -// Test intrinisc iteration duration. -testOnceVideosLoaded(function() { - assert_approx_equals( - createTestMediaReference(getNextVideo()).duration, - expectedVideoLength, 0.001); -}, "Intrinsic iteration duration should be media duration"); - -// Test that iteration duration can be overridden. -testOnceVideosLoaded(function() { - assert_equals(createTestMediaReference(getNextVideo(), 1.0).duration, - 1.0); -}, "Iteration duration should be overridable"); - -// Test basic use. -timing_test(function() { - var video = getNextVideo(); - at(0.0 * 1000, function() { - dt.play(createTestMediaReference(video)); - assert_equals(video.playbackRate, 1.0); - assert_false(video.paused); - }); -}, "Basic use"); - -// Test clipping where duration limits. Video should be frozen at end -// of duration. -timing_test(function() { - var video = getNextVideo(); - at(0.0 * 1000, function() { - dt.play(createTestMediaReference(video, 3.0)); - }); - at(3.0 * 1000, function() { - assert_equals(video.currentTime, 3.0); - assert_true(video.paused); - }); - at(4.0 * 1000, function() { - assert_equals(video.currentTime, 3.0); - assert_true(video.paused); - }); -}, "Video should be frozen at duration"); - -// Test clipping where video length limits. Video should be frozen at end for -// remainder of duration. -timing_test(function() { - var video = getNextVideo(); - at(0.0 * 1000, function() { - dt.play(createTestMediaReference(video, video.duration + 2)); - }); - // We can't use video.duration here because the video isn't yet loaded. - at(expectedVideoLength + 1, function() { - assert_equals(video.currentTime, video.duration); - assert_true(video.paused); - }); - // We can't use video.duration here because the video isn't yet loaded. - at(expectedVideoLength + 2, function() { - assert_equals(video.currentTime, video.duration); - assert_true(video.paused); - }); -}, "Video should be frozen at end"); - -// Test fill with duration limiting. Video should be frozen at end of -// duration. -timing_test(function() { - var video = getNextVideo(); - at(0.0 * 1000, function() { - dt.play(createTestMediaReference(video, 1.0)); - }); - at(2.0 * 1000, function() { - assert_equals(video.currentTime, 1.0); - assert_equals(video.paused, true); - }); -}, "Should freeze video at duration for fill"); - -// Test fill with video length limiting. Video should be at end. -timing_test(function() { - var video = getNextVideo(); - at(0.0 * 1000, function() { - dt.play(createTestMediaReference(video), video.duration + 1.0); - }); - // We can't use video.duration here because the video isn't yet loaded. - at(expectedVideoLength + 2, function() { - assert_equals(video.currentTime, video.duration); - }); -}, "Should freeze video at end for fill"); - -// Test no fill. Video should be frozen at start. -timing_test(function() { - var video = getNextVideo(); - at(0.0 * 1000, function() { - dt.play(createTestMediaReference(video, {fill: "none"})); - }); - // We can't use video.duration here because the video isn't yet loaded. - at(expectedVideoLength + 1, function() { - assert_equals(video.currentTime, 0); - assert_equals(video.paused, true); - }); -}, "Should freeze video at start for no fill"); - -// Test iterations. -timing_test(function() { - var video = getNextVideo(); - at(0.0 * 1000, function() { - dt.play(createTestMediaReference(video, - {iterations: 2.0, duration: 1.0 * 1000})); - }); - at(1.5 * 1000, function() { - assert_equals(video.currentTime, 0.5); - }); -}, "Video should respect iterations"); - -// Test iterationStart. -timing_test(function() { - var video = getNextVideo(); - at(0.0 * 1000, function() { - dt.play(createTestMediaReference(video, - {iterationStart: 0.5, duration: 2.0 * 1000})); - }); - at(0.5 * 1000, function() { - assert_equals(video.currentTime, 1.5); - }); -}, "Video should respect iterationStart"); - -// Test playback rate. -timing_test(function() { - var video = getNextVideo(); - at(0.0 * 1000, function() { - dt.play(createTestMediaReference(video, {playbackRate: 2.0})); - }); - at(1.0 * 1000, function() { - assert_equals(video.currentTime, 2.0); - assert_equals(video.playbackRate, 2.0); - }); -}, "Video should respect playbackRate"); - -// Test heirachy of playback rates. -timing_test(function() { - var video = getNextVideo(); - at(0.0 * 1000, function() { - dt.play(new AnimationGroup([createTestMediaReference(video, {playbackRate: 1.5})], - {playbackRate: 2.5})); - }); - at(1.0 * 1000, function() { - assert_equals(video.currentTime, 3.75); - assert_equals(video.playbackRate, 3.75); - }); -}, "Video should respect playbackRate heirachy"); - -// Test interaction with MediaElement.defaultPlaybackRate. -timing_test(function() { - var video = getNextVideo(); - at(0.0 * 1000, function() { - video.defaultPlaybackRate = 2.5; - dt.play(createTestMediaReference(video, {playbackRate: 1.5})); - }); - at(1.0 * 1000, function() { - assert_equals(video.currentTime, 3.75); - assert_equals(video.playbackRate, 3.75); - }); -}, "Video should respect playbackRate after setting defaultPlaybackRate"); - -// Test reversing. -timing_test(function() { - var video = getNextVideo(); - at(0.0 * 1000, function() { - dt.play(createTestMediaReference(video, {direction: "reverse"})); - }); - at(1.0 * 1000, function() { - assert_approx_equals(video.currentTime, video.duration - 1.0, 0.0001); - assert_equals(video.playbackRate, -1.0); - }); -}, "Video should respect reversing"); - -// Test negative playback rate. -timing_test(function() { - var video = getNextVideo(); - at(0.0 * 1000, function() { - dt.play(createTestMediaReference(video, {playbackRate: -0.5})); - }); - at(1.0 * 1000, function() { - assert_approx_equals(video.currentTime, video.duration - 0.5, 0.0001); - assert_equals(video.playbackRate, -0.5); - }); -}, "Video should respect negative playbackRate"); - -// Test interaction of reversing and playback rate. -timing_test(function() { - var video = getNextVideo(); - at(0.0 * 1000, function() { - dt.play(new AnimationGroup( - [createTestMediaReference(video, {playbackRate: -0.5})], - {playbackRate: 3.0, direction: "reverse"})); - }); - at(1.0 * 1000, function() { - assert_equals(video.currentTime, 1.5); - assert_equals(video.playbackRate, 1.5); - }); -}, "Video should respect reversing and playbackRate"); - -// Test zero duration. -timing_test(function() { - var video = getNextVideo(); - at(0.0 * 1000, function() { - dt.play(createTestMediaReference(video, 0.0)); - assert_equals(video.currentTime, 0.0); - }); - at(1.0 * 1000, function() { - assert_equals(video.currentTime, 0.0); - }); -}, "Video should start at time zero when duration is zero"); - -// Test zero intrinsic duration. -// TODO: Need to find a zero length video. - -// Test that media elements are removed from their MediaController. -timing_test(function() { - var video = getNextVideo(); - at(0.0 * 1000, function() { - video.controller = new MediaController(); - dt.play(createTestMediaReference(video)); - assert_equals(video.controller, null); - }); - // Seeking the video will throw if the controller has not been detached. - at(1.0 * 1000, function() { - assert_equals(video.currentTime, 1.0); - }); -}, "Video should be detached from controller when used in MediaReference"); - -// Test limited seek ranges. -// TODO: Need to find a video with limited seek ranges. - -// Test that video is paused when its MediaReference is detached from its -// AnimationPlayer. -timing_test(function() { - var video = getNextVideo(); - var player; - at(0.0 * 1000, function() { - player = dt.play(createTestMediaReference(video)); - }); - at(1.0 * 1000, function() { - assert_false(video.paused); - player.source = null; - }); - at(2.0 * 1000, function() { - assert_true(video.paused); - }); -}, "Video should be paused when MediaReference is detached from its AnimationPlayer"); - -</script> diff --git a/third_party/polymer/components/web-animations-js/test/testcases/disabled-test-compositing-order.html b/third_party/polymer/components/web-animations-js/test/testcases/disabled-test-compositing-order.html deleted file mode 100644 index f349f90..0000000 --- a/third_party/polymer/components/web-animations-js/test/testcases/disabled-test-compositing-order.html +++ /dev/null @@ -1,112 +0,0 @@ -<!-- -Copyright 2013 Google Inc. All Rights Reserved. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. ---> - -<!DOCTYPE html><meta charset="UTF-8"> - -<style> -div.anim { - position: relative; -} -</style> - -<div id="target1" class="anim"></div> -<div id="target2" class="anim"></div> -<div id="target3" class="anim"></div> -<div id="target4" class="anim"></div> - -<script src="../bootstrap.js" nochecks></script> -<script> -"use strict"; - -var leftToRight = [{left: "100px"}, {left: "200px"}]; -var leftToRightLarge = [{left: "100px"}, {left: "1000px"}]; -var rightToLeft = [{left: "200px"}, {left: "100px"}]; -var noop = {color: "red"}; - -// Test that an animation uses the correct compositing order when it has a -// grandparent that remains active longer than its parent. -// -// The first animation should run between times 0.0 and 1.0 and the second -// between times 2.0 and 3.0. Both use the default fill mode of "forwards", but -// because the second animation has a later start time, it should be composited -// second, so the div should end up on the left. -var target1 = document.getElementById("target1"); -var player = document.timeline.play(new AnimationGroup([ - new AnimationGroup([ - new Animation(target1, leftToRight, 1.0), - ]), - new AnimationSequence([ - new Animation(target1, noop, 2.0), - new Animation(target1, rightToLeft, 1.0), - ]), -])); - -timing_test(function() { - at(3.0, function() {assert_equals(getComputedStyle(target1).getPropertyValue("left"), "100px")}); - }, "First animation should have earlier compositing order"); - -// Test that compositing order takes account of playback rate. -// -// The start time of the first animation is 0.0. The AnimationSequence has a playback -// rate of 4.0, so the effective start time of its child animation is 2.0. So -// the the div should end up on the left at time 3.0. -var target2 = document.getElementById("target2"); -var player = document.timeline.play(new AnimationGroup([ - new Animation(target2, leftToRight, 1.0), - new AnimationSequence([ - new Animation(target1, noop, 8.0), - new Animation(target2, rightToLeft, 4.0), - ], {playbackRate: 4.0}), -])); - -timing_test(function() { - at(3.0, function() {assert_equals(getComputedStyle(target2).getPropertyValue("left"), "100px")}); - }, "Second animation should have later compositing order"); - -// Test compositing order follows AnimationPlayer start time order. -var target3 = document.getElementById("target3"); -var player1 = document.timeline.play( - new Animation(target3, leftToRight, 1.0)); -player1.startTime += 1.0; -var player2 = document.timeline.play( - new Animation(target3, leftToRightLarge, 2.0)); - -timing_test(function() { - at(2.0, function() {assert_equals(getComputedStyle(target3).getPropertyValue("left"), "200px")}); - }, "First animation should have latest compositing order"); - -// Test compositing order follows tree order. -var target4 = document.getElementById("target4"); -var player = document.timeline.play(new AnimationGroup([ - new Animation(target4, leftToRightLarge, 1.0), - new AnimationSequence([ - new Animation(target4, leftToRightLarge, 1.0), - new AnimationGroup([ - new Animation(target4, leftToRightLarge, 1.0), - new Animation(target4, leftToRightLarge, 1.0), - ]), - ]), - new AnimationGroup([ - new Animation(target4, leftToRightLarge, 1.0), - new Animation(target4, leftToRight, 1.0), - ]), -])); - -timing_test(function() { - at(2.0, function() {assert_equals(getComputedStyle(target4).getPropertyValue("left"), "200px")}); - }, "Last animation should have latest compositing order"); - -</script> diff --git a/third_party/polymer/components/web-animations-js/test/testcases/impl-test-deprecation.html b/third_party/polymer/components/web-animations-js/test/testcases/impl-test-deprecation.html deleted file mode 100644 index 7edf3a0..0000000 --- a/third_party/polymer/components/web-animations-js/test/testcases/impl-test-deprecation.html +++ /dev/null @@ -1,85 +0,0 @@ -<!-- -Copyright 2014 Google Inc. All Rights Reserved. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. ---> - -<!DOCTYPE html><meta charset="UTF-8"> -<script src="../bootstrap.js"></script> -<script> -"use strict"; - -var useAncient = function(deprecationDate) { - _WebAnimationsTestingUtilities._deprecated('Ancient', deprecationDate, - 'Please use Modern instead.'); -}; - -var useOld = function(deprecationDate) { - _WebAnimationsTestingUtilities._deprecated('Old', deprecationDate, - 'Please use New instead.'); -}; - -var useSuperseded = function(deprecationDate) { - _WebAnimationsTestingUtilities._deprecated('Superseded', deprecationDate, - 'See Replacement.'); -}; - -test(function() { - var deprecationDate = new Date(); - deprecationDate.setDate(deprecationDate.getDate() - 85); - var cutoffDate = new Date(deprecationDate); - cutoffDate.setMonth(cutoffDate.getMonth() + 3); // 3 months grace period - - var warnings = []; - var savedConsoleWarn = console.warn; - try { - console.warn = function(message) { - warnings.push(message); - }; - - var firstExpectedWarning = 'Web Animations: Old is deprecated and will stop working on ' + cutoffDate.toDateString() + '. Please use New instead.'; - var secondExpectedWarning = 'Web Animations: Superseded is deprecated and will stop working on ' + cutoffDate.toDateString() + '. See Replacement.'; - - useOld(deprecationDate); - assert_equals(warnings.length, 1); - assert_equals(warnings[0], firstExpectedWarning); - - useOld(deprecationDate); - assert_equals(warnings.length, 1); - - useSuperseded(deprecationDate); - assert_equals(warnings.length, 2); - assert_equals(warnings[1], secondExpectedWarning); - - useSuperseded(deprecationDate); - assert_equals(warnings.length, 2); - } finally { - console.warn = savedConsoleWarn; - } -}, 'Warn the first time each recently deprecated feature is used'); - -test(function() { - var deprecationDate = new Date(new Date()); - deprecationDate.setDate(deprecationDate.getDate() - 95); - - for (var i = 0; i < 2; ++i) { - try { - useAncient(); - assert_true(false); - } catch (e) { - assert_equals(e.message, 'Ancient is no longer supported. Please use Modern instead.'); - } - } -}, 'Throw each time an anciently deprecated feature is used'); - -</script> diff --git a/third_party/polymer/components/web-animations-js/test/testcases/impl-test-from-css-value.html b/third_party/polymer/components/web-animations-js/test/testcases/impl-test-from-css-value.html deleted file mode 100644 index 22dfc7d..0000000 --- a/third_party/polymer/components/web-animations-js/test/testcases/impl-test-from-css-value.html +++ /dev/null @@ -1,219 +0,0 @@ -<!-- -Copyright 2013 Google Inc. All Rights Reserved. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. ---> - -<!DOCTYPE html><meta charset="UTF-8"> -<style> -div.anim { - position: relative; - left: 0px; -} -</style> - -<div id="anim" class="anim"></div> - -<script src="../bootstrap.js"></script> -<script> -'use strict'; - -test(function() { - -function assert_object_equals(actual, expected, message) { - assert_equals(JSON.stringify(actual), JSON.stringify(expected), message); -} -function assert_shadow_equals(actual, expected, message) { - assert_not_equals(typeof actual, 'undefined', 'actual not undefined: ' + message); - assert_equals(actual.length, expected.length, 'actual and expected lengths match: ' + message); - for (var i = 0; i < expected.length; i++) { - var a = actual[i]; - var e = expected[i]; - - // hOffset and vOffset are always required - assert_object_equals(a['hOffset'], e['hOffset'], 'hOffset matches: ' + message); - assert_object_equals(a['vOffset'], e['vOffset'], 'vOffset matches: ' + message); - - // Inset is always set - if (typeof e['inset'] != 'undefined') - assert_equals(a['inset'], e['inset'], 'inset matches: ' + message); - - if (typeof e['color'] != 'undefined') - assert_array_equals(a['color'], e['color'], 'color matches: ' + message); - - if (typeof e['blur'] != 'undefined') - assert_object_equals(a['blur'], e['blur'], 'blur matches: ' + message); - - if (typeof e['spread'] != 'undefined') - assert_object_equals(a['spread'], e['spread'], 'spread matches: ' + message); - } -} - -var shadowType = window._WebAnimationsTestingUtilities._types['textShadow']; - -// Test all the different color types as part of a shadow -var expected = [{ - color: [255, 0, 0, 1.0], - hOffset: {px: 10}, - vOffset: {px: 15}, - blur: {px: 5}, - inset: false -}]; -assert_shadow_equals(shadowType.fromCssValue('10px 15px 5px red'), expected, '10px 15px 5px red'); -assert_shadow_equals(shadowType.fromCssValue('10px 15px 5px rgba(255, 0, 0, 1.0)'), expected, '10px 15px 5px rgba(255, 0, 0, 1.0)'); -assert_shadow_equals(shadowType.fromCssValue('10px 15px 5px rgba(100%, 0, 0, 1.0)'), expected, '10px 15px 5px rgba(100%, 0, 0, 1.0)'); -assert_shadow_equals(shadowType.fromCssValue('10px 15px 5px rgb(255, 0, 0)'), expected, '10px 15px 5px rgb(255, 0, 0)'); -assert_shadow_equals(shadowType.fromCssValue('10px 15px 5px rgb(100%, 0, 0)'), expected, '10px 15px 5px rgb(100%, 0, 0)'); -assert_shadow_equals(shadowType.fromCssValue('10px 15px 5px hsl(0, 100%, 50%)'), expected, '10px 15px 5px hsl(0, 100%, 50%)'); -assert_shadow_equals(shadowType.fromCssValue('10px 15px 5px hsla(0, 100%, 50%, 1.0)'), expected, '10px 15px 5px hsla(0, 100%, 50%, 1.0)'); -assert_shadow_equals(shadowType.fromCssValue('10px 15px 5px #ff0000'), expected, '10px 15px 5px #ff0000'); -assert_shadow_equals(shadowType.fromCssValue('red 10px 15px 5px'), expected, 'red 10px 15px 5px'); -assert_shadow_equals(shadowType.fromCssValue('rgba(255, 0, 0, 1.0) 10px 15px 5px'), expected, 'rgba(255, 0, 0, 1.0) 10px 15px 5px'); -assert_shadow_equals(shadowType.fromCssValue('rgba(100%, 0, 0, 1.0) 10px 15px 5px'), expected, 'rgba(100%, 0, 0, 1.0) 10px 15px 5px'); -assert_shadow_equals(shadowType.fromCssValue('rgb(255, 0, 0) 10px 15px 5px'), expected, 'rgb(255, 0, 0) 10px 15px 5px'); -assert_shadow_equals(shadowType.fromCssValue('rgb(100%, 0, 0) 10px 15px 5px'), expected, 'rgb(100%, 0, 0) 10px 15px 5px'); -assert_shadow_equals(shadowType.fromCssValue('hsl(0, 100%, 50%) 10px 15px 5px'), expected, 'hsl(0, 100%, 50%) 10px 15px 5px'); -assert_shadow_equals(shadowType.fromCssValue('hsla(0, 100%, 50%, 1.0) 10px 15px 5px'), expected, 'hsla(0, 100%, 50%, 1.0) 10px 15px 5px'); -assert_shadow_equals(shadowType.fromCssValue('#ff0000 10px 15px 5px'), expected, '#ff0000 10px 15px 5px'); - - -// [ <color>? <offset-x> <offset-y> <blur-radius>? ] -// [ <offset-x> <offset-y> <blur-radius>? <color>? ] -// [inset? && [ <offset-x> <offset-y> <blur-radius>? <spread-radius>? <color>? ] ] - - -assert_shadow_equals( - shadowType.fromCssValue('10px 15px'), [{hOffset:{px: 10}, vOffset:{px: 15}}], - 'just offsets'); -assert_shadow_equals( - shadowType.fromCssValue('10px 15px 5px'), - [{hOffset:{px: 10}, vOffset:{px: 15}, blur: {px: 5}}], - 'no spread'); - -// Test some 'real world examples', taken from the MDN documentation -assert_shadow_equals( - shadowType.fromCssValue('1px 2px 3px black, 0 0 1em blue, 0 0 0.2em blue'), - [{hOffset:{px: 1}, vOffset:{px: 2}, blur: {px: 3}, color: [0, 0, 0, 1.0]}, - {hOffset:{'': 0}, vOffset:{'': 0}, blur: {em: 1}, color: [0, 0, 255, 1.0]}, - {hOffset:{'': 0}, vOffset:{'': 0}, blur: {em: 0.2}, color: [0, 0, 255, 1.0]}], - 'MDN Example 1'); - -assert_shadow_equals( - shadowType.fromCssValue('rgba(0,0,0,0.1) -1px 0, rgba(0,0,0,0.1) 0 -1px, rgba(255,255,255,0.1) 1px 0, rgba(255,255,255,0.1) 0 1px, rgba(0,0,0,0.1) -1px -1px, rgba(255,255,255,0.1) 1px 1px'), - [{hOffset:{px: -1}, vOffset:{'': 0}, color: [0, 0, 0, 0.1]}, - {hOffset:{'': 0}, vOffset:{px: -1}, color: [0, 0, 0, 0.1]}, - {hOffset:{px: 1}, vOffset:{'': 0}, color: [255, 255, 255, 0.1]}, - {hOffset:{'': 0}, vOffset:{px: 1}, color: [255, 255, 255, 0.1]}, - {hOffset:{px: -1}, vOffset:{px: -1}, color: [0, 0, 0, 0.1]}, - {hOffset:{px: 1}, vOffset:{px: 1}, color: [255, 255, 255, 0.1]}], - 'MDN Example 2'); - -assert_shadow_equals( - shadowType.fromCssValue('64px 64px 12px 40px rgba(0,0,0,0.4), 12px 12px 0px 8px rgba(0,0,0,0.4) inset'), - [{hOffset:{px: 64}, vOffset:{px: 64}, blur: {px: 12}, spread: {px: 40}, color: [0, 0, 0, 0.4]}, - {hOffset:{px: 12}, vOffset:{px: 12}, blur: {px: 0}, spread: {px: 8}, color: [0, 0, 0, 0.4], inset: true}], - 'MDN Example 3'); - -assert_shadow_equals( - shadowType.fromCssValue('10px 10px 5px #888'), - [{hOffset:{px: 10}, vOffset:{px: 10}, blur: {px: 5}, color: [136, 136, 136, 1.0]}], - 'MDN Example 4'); - -}, 'shadowType.cssFromValue'); - -test(function() { - -var colorType = window._WebAnimationsTestingUtilities._types.color; - -assert_array_equals(colorType.fromCssValue('#000000'), [0, 0, 0, 1.0], '#000000'); -assert_array_equals(colorType.fromCssValue('#000'), [0, 0, 0, 1.0], '#000'); -assert_array_equals(colorType.fromCssValue('#123456'), [18, 52, 86, 1.0], '#123456'); -assert_array_equals(colorType.fromCssValue('#123'), [17, 34, 51, 1.0], '#123'); -assert_array_equals(colorType.fromCssValue('#ffffff'), [255, 255, 255, 1.0], '#ffffff'); -assert_array_equals(colorType.fromCssValue('#fff'), [255, 255, 255, 1.0], '#fff'); -assert_array_equals(colorType.fromCssValue('#ABCDEF'), [171, 205, 239, 1.0], '#ABCDEF'); -assert_array_equals(colorType.fromCssValue('#ABC'), [170, 187, 204, 1.0], '#ABC'); - -assert_array_equals(colorType.fromCssValue('rgb(0, 0, 0)'), [0, 0, 0, 1.0], 'rgb(0, 0, 0)'); -assert_array_equals(colorType.fromCssValue('rgb(0,0,0)'), [0, 0, 0, 1.0], 'rgb(0,0,0)'); -assert_array_equals(colorType.fromCssValue('rgb(0%, 0%, 0%)'), [0, 0, 0, 1.0], 'rgb(0%, 0%, 0%)'); -assert_array_equals(colorType.fromCssValue('rgb(0%,0%,0%)'), [0, 0, 0, 1.0], 'rgb(0%,0%,0%)'); -assert_array_equals(colorType.fromCssValue('rgb(1, 2, 3)'), [1, 2, 3, 1.0], 'rgb(1, 2, 3)'); -assert_array_equals(colorType.fromCssValue('rgb(10%, 20%, 30%)'), [26, 51, 77, 1.0], 'rgb(10%, 20%, 30%)'); -assert_array_equals(colorType.fromCssValue('rgb(255, 255, 255)'), [255, 255, 255, 1.0], 'rgb(255, 255, 255)'); -assert_array_equals(colorType.fromCssValue('rgb(100%, 100%, 100%)'), [255, 255, 255, 1.0], 'rgb(100%, 100%, 100%)'); - -// Color cliping or RGB - 4.2.1 - RGB color values - Example 6 -// em { color: rgb(300,0,0) } /* clipped to rgb(255,0,0) */ -// em { color: rgb(255,-10,0) } /* clipped to rgb(255,0,0) */ -// em { color: rgb(110%, 0%, 0%) } /* clipped to rgb(100%,0%,0%) */ -assert_array_equals(colorType.fromCssValue('rgb(300, 0, 0)'), [255, 0, 0, 1.0], 'rgb(255, 0, 0)'); -assert_array_equals(colorType.fromCssValue('rgb(255, -10, 0)'), [255, 0, 0, 1.0], 'rgb(255, -10, 0)'); -assert_array_equals(colorType.fromCssValue('rgb(110%, 0%, 0%)'), [255, 0, 0, 1.0], 'rgb(110%, 0, 0)'); - -assert_array_equals(colorType.fromCssValue('rgba(0, 0, 0, 0)'), [0, 0, 0, 0.0], 'rgba(0, 0, 0, 0)'); -assert_array_equals(colorType.fromCssValue('rgba(0,0,0,0)'), [0, 0, 0, 0.0], 'rgba(0,0,0,0)'); -assert_array_equals(colorType.fromCssValue('rgba(1, 2, 3, 0.4)'), [1, 2, 3, 0.4], 'rgba(1, 2, 3, 0.4)'); -assert_array_equals(colorType.fromCssValue('rgba(1,2,3,0.4)'), [1, 2, 3, 0.4], 'rgba(1,2,3,0.4)'); -assert_array_equals(colorType.fromCssValue('rgba(255, 255, 255, 0.5)'), [255, 255, 255, 0.5], 'rgba(255, 255, 255, 0.5)'); - -// hsl and hsla converted to RGB -var hsl2rgb = window._WebAnimationsTestingUtilities._hsl2rgb; -assert_array_equals(hsl2rgb(0, 0, 100), [255, 255, 255]); -assert_array_equals(hsl2rgb(0, 0, 75), [192, 192, 192]); -assert_array_equals(hsl2rgb(0, 0, 50), [128, 128, 128]); -assert_array_equals(hsl2rgb(0, 0, 0), [0, 0, 0]); -assert_array_equals(hsl2rgb(0, 100, 50), [255, 0, 0]); -assert_array_equals(hsl2rgb(0, 100, 25), [128, 0, 0]); -assert_array_equals(hsl2rgb(60, 100, 50), [255, 255, 0]); -assert_array_equals(hsl2rgb(60, 100, 25), [128, 128, 0]); -assert_array_equals(hsl2rgb(120, 100, 50), [0, 255, 0]); -assert_array_equals(hsl2rgb(120, 100, 25), [0, 128, 0]); -assert_array_equals(hsl2rgb(-240, 100, 50), [0, 255, 0]); -assert_array_equals(hsl2rgb(480, 100, 25), [0, 128, 0]); -assert_array_equals(hsl2rgb(180, 100, 50), [0, 255, 255]); -assert_array_equals(hsl2rgb(180, 100, 25), [0, 128, 128]); -assert_array_equals(hsl2rgb(-180, 100, 50), [0, 255, 255]); -assert_array_equals(hsl2rgb(540, 100, 25), [0, 128, 128]); -assert_array_equals(hsl2rgb(240, 100, 50), [0, 0, 255]); -assert_array_equals(hsl2rgb(240, 100, 25), [0, 0, 128]); -assert_array_equals(hsl2rgb(300, 100, 50), [255, 0, 255]); -assert_array_equals(hsl2rgb(300, 100, 25), [128, 0, 128]); - -// hsl -// * { color: hsl(0, 100%, 50%) } /* red */ -// * { color: hsl(120, 100%, 50%) } /* lime */ -// * { color: hsl(120, 100%, 25%) } /* dark green */ -// * { color: hsl(120, 100%, 75%) } /* light green */ -// * { color: hsl(120, 75%, 75%) } /* pastel green, and so on */ -assert_array_equals(colorType.fromCssValue('hsl(0, 0%, 100%)'), [255, 255, 255, 1.0], 'hsl(0, 0%, 100%)'); -assert_array_equals(colorType.fromCssValue('hsl(0,0%,75%)'), [192, 192, 192, 1.0], 'hsl(0,0%,75%)'); -assert_array_equals(colorType.fromCssValue('hsl(-0, 100%, 50%)'), [255, 0, 0, 1.0], 'hsl(0, 100%, 50%)'); -assert_array_equals(colorType.fromCssValue('hsla(120, 100%, 50%, 0.0)'), [0, 255, 0, 0.0], 'hsl(120, 100%, 50%, 0.0)'); -assert_array_equals(colorType.fromCssValue('hsla(120, 100%, 25%, 0.25)'), [0, 128, 0, 0.25], 'hsl(120, 100%, 25%, 0.25)'); -assert_array_equals(colorType.fromCssValue('hsla(180, 100%, 50%, 0.5)'), [0, 255, 255, 0.5], 'hsl(180, 100%, 50%, 0.5)'); -assert_array_equals(colorType.fromCssValue('hsla(180, 100%, 25%, 0.75)'), [0, 128, 128, 0.75], 'hsl(180, 100%, 25%, 0.75)'); -assert_array_equals(colorType.fromCssValue('hsla(240, 100%, 50%, 1.0)'), [0, 0, 255, 1.0], 'hsl(240, 100%, 50%, 1.0)'); -assert_array_equals(colorType.fromCssValue('hsla(240, 100%, 25%, 1.25)'), [0, 0, 128, 1.0], 'hsl(240, 100%, 25%, 1.25)'); - -assert_array_equals(colorType.fromCssValue('transparent'), [0, 0, 0, 0], 'transparent'); - -assert_equals(colorType.fromCssValue('#00'), undefined); -assert_equals(colorType.fromCssValue('#0f0g'), undefined); -assert_equals(colorType.fromCssValue('rgba(0, abc, 0, 0)'), undefined); -assert_equals(colorType.fromCssValue('asdf(0, 0, 0, 0)'), undefined); - -// currentColor ???? -}, 'colorType.cssFromValue'); - -</script> diff --git a/third_party/polymer/components/web-animations-js/test/testcases/impl-test-paced-timing-function.html b/third_party/polymer/components/web-animations-js/test/testcases/impl-test-paced-timing-function.html deleted file mode 100644 index 0e8aa15..0000000 --- a/third_party/polymer/components/web-animations-js/test/testcases/impl-test-paced-timing-function.html +++ /dev/null @@ -1,83 +0,0 @@ -<!-- -Copyright 2013 Google Inc. All Rights Reserved. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. ---> - -<!DOCTYPE html><meta charset="UTF-8"> - -<svg xmlns="http://www.w3.org/2000/svg" version="1.1"> - <path d="M0,0 L10,0 L30,0 L60,0 L100,0 L150,0" id="path" stroke="black" - stroke-width="1" fill="none" /> -</svg> - -<script src="../bootstrap.js"></script> -<script> -"use strict"; - -var PacedTimingFunction = _WebAnimationsTestingUtilities._pacedTimingFunction; - -var effect = - new MotionPathEffect(document.querySelector('#path').pathSegList); - -// Line has 5 segments of lengths 10, 20, 30, 40 and 50, giving a total length -// of 150. -var fullRangeTimingFunction = new PacedTimingFunction(effect); -fullRangeTimingFunction.setRange({min: 0, max: 1}); - -// Partial range runs from midpoint of first segment ot midpoint of last -// segment, giving total length of 5 + 20 + 30 + 40 + 25 = 120. -var partialRangeTimingFunction = new PacedTimingFunction(effect); -partialRangeTimingFunction.setRange({min: 0.1, max: 0.9}); - -test(function() { - assert_equals(fullRangeTimingFunction.scaleTime(0.5), (3 + 15/40) / 5); -}, 'Full range between bounds'); - -test(function() { - assert_equals(fullRangeTimingFunction.scaleTime(0), 0); -}, 'Full range lower bound'); - -test(function() { - assert_equals(fullRangeTimingFunction.scaleTime(1), 1); -}, 'Full range upper bound'); - -test(function() { - assert_equals(fullRangeTimingFunction.scaleTime(-0.5), 0); -}, 'Full range below lower bound'); - -test(function() { - assert_equals(fullRangeTimingFunction.scaleTime(1.5), 1); -}, 'Full range above upper bound'); - -test(function() { - assert_equals(partialRangeTimingFunction.scaleTime(0.5), (3 + 5/40) / 5); -}, 'Partial range between bounds'); - -test(function() { - assert_equals(partialRangeTimingFunction.scaleTime(0), 0.1); -}, 'Partial range lower bound'); - -test(function() { - assert_equals(partialRangeTimingFunction.scaleTime(1), 0.9); -}, 'Partial range upper bound'); - -test(function() { - assert_equals(partialRangeTimingFunction.scaleTime(-0.5), 0.1); -}, 'Partial range below lower bound'); - -test(function() { - assert_equals(partialRangeTimingFunction.scaleTime(1.5), 0.9); -}, 'Partial range above upper bound'); - -</script> diff --git a/third_party/polymer/components/web-animations-js/test/testcases/impl-test-totimelinetime.html b/third_party/polymer/components/web-animations-js/test/testcases/impl-test-totimelinetime.html deleted file mode 100644 index 9f4fe59..0000000 --- a/third_party/polymer/components/web-animations-js/test/testcases/impl-test-totimelinetime.html +++ /dev/null @@ -1,37 +0,0 @@ -<!-- -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. ---> - -<!DOCTYPE html><meta charset="UTF-8"> -<body></body> -<script src="../bootstrap.js" nochecks></script> -<script> -"use strict"; - -var timelineOne = new AnimationTimeline(_WebAnimationsTestingUtilities._constructorToken); -timelineOne._startTime = 3; -var timelineTwo = new AnimationTimeline(_WebAnimationsTestingUtilities._constructorToken); -timelineTwo._startTime = 42; - -test(function() { - var startTimeOne = timelineOne._startTime; - var startTimeTwo = timelineTwo._startTime; - var otherTime = timelineTwo.currentTime; - var timelineOneTime = timelineOne.toTimelineTime(otherTime, timelineTwo); - var timelineOneTimeExpected = otherTime + startTimeTwo - startTimeOne; - - assert_approx_equals(timelineOneTime, timelineOneTimeExpected, 0.00001, 'Unexpected result with fake start times.'); -}, 'toTimelineTime with fake start times'); - -</script> - diff --git a/third_party/polymer/components/web-animations-js/test/testcases/impl-unit-test-position-type.html b/third_party/polymer/components/web-animations-js/test/testcases/impl-unit-test-position-type.html deleted file mode 100644 index 8603434..0000000 --- a/third_party/polymer/components/web-animations-js/test/testcases/impl-unit-test-position-type.html +++ /dev/null @@ -1,256 +0,0 @@ -<!-- -Copyright 2013 Google Inc. All Rights Reserved. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. ---> - -<!DOCTYPE html><meta charset="UTF-8"> - -<pre></pre> - -<script src="../bootstrap.js"></script> -<script> -'use strict'; - -var positionListType = window._WebAnimationsTestingUtilities._positionListType; -var testParse = function(input, expected) { - test(function() { - var result = positionListType.fromCssValue(input); - if (result) { - result = positionListType.toCssValue(result); - } - assert_equals(result, expected); - }, 'from/toCssValue: ' + input); -}; - -var testAdd = function(base, delta, expected) { - test(function() { - assert_equals(positionListType.toCssValue(positionListType.add( - positionListType.fromCssValue(base), - positionListType.fromCssValue(delta))), expected); - }, 'add: ' + base + ' with ' + delta); -}; - -var testInterpolate = function(parameters) { - test(function() { - assert_equals(positionListType.toCssValue(positionListType.interpolate( - positionListType.fromCssValue(parameters.from), - positionListType.fromCssValue(parameters.to), - parameters.fraction)), parameters.expected); - }, 'interpolate: ' + parameters.from + ' to ' + parameters.to + ' at ' + parameters.fraction); -}; - -testParse('', '0% 0%'); - -testParse('left', '0% 50%'); -testParse('center', '50% 50%'); -testParse('right', '100% 50%'); -testParse('top', '50% 0%'); -testParse('bottom', '50% 100%'); -testParse('10px', '10px 50%'); -testParse('25%', '25% 50%'); -testParse('calc(80% - 15px)', 'calc(80% + -15px) 50%'); - -testParse('0% 0%', '0% 0%'); -testParse('0px 0px', '0px 0px'); -testParse('left left', undefined); -testParse('left center', '0% 50%'); -testParse('left right', undefined); -testParse('left top', '0% 0%'); -testParse('left bottom', '0% 100%'); -testParse('left 10px', '0% 10px'); -testParse('left 25%', '0% 25%'); -testParse('left calc(80% - 15px)', '0% calc(80% + -15px)'); -testParse('center left', '0% 50%'); -testParse('center center', '50% 50%'); -testParse('center right', '100% 50%'); -testParse('center top', '50% 0%'); -testParse('center bottom', '50% 100%'); -testParse('center 10px', '50% 10px'); -testParse('center 25%', '50% 25%'); -testParse('center calc(80% - 15px)', '50% calc(80% + -15px)'); -testParse('right left', undefined); -testParse('right center', '100% 50%'); -testParse('right right', undefined); -testParse('right top', '100% 0%'); -testParse('right bottom', '100% 100%'); -testParse('right 10px', '100% 10px'); -testParse('right 25%', '100% 25%'); -testParse('right calc(80% - 15px)', '100% calc(80% + -15px)'); -testParse('top left', '0% 0%'); -testParse('top center', '50% 0%'); -testParse('top right', '100% 0%'); -testParse('top top', undefined); -testParse('top bottom', undefined); -testParse('top 10px', undefined); -testParse('top 25%', undefined); -testParse('top calc(80% - 15px)', undefined); -testParse('bottom left', '0% 100%'); -testParse('bottom center', '50% 100%'); -testParse('bottom right', '100% 100%'); -testParse('bottom top', undefined); -testParse('bottom bottom', undefined); -testParse('bottom 10px', undefined); -testParse('bottom 25%', undefined); -testParse('bottom calc(80% - 15px)', undefined); -testParse('10px left', undefined); -testParse('10px center', '10px 50%'); -testParse('10px right', undefined); -testParse('10px top', '10px 0%'); -testParse('10px bottom', '10px 100%'); -testParse('10px 10px', '10px 10px'); -testParse('10px 25%', '10px 25%'); -testParse('10px calc(80% - 15px)', '10px calc(80% + -15px)'); -testParse('25% left', undefined); -testParse('25% center', '25% 50%'); -testParse('25% right', undefined); -testParse('25% top', '25% 0%'); -testParse('25% bottom', '25% 100%'); -testParse('25% 10px', '25% 10px'); -testParse('25% 25%', '25% 25%'); -testParse('25% calc(80% - 15px)', '25% calc(80% + -15px)'); -testParse('calc(80% - 15px) left', undefined); -testParse('calc(80% - 15px) center', 'calc(80% + -15px) 50%'); -testParse('calc(80% - 15px) right', undefined); -testParse('calc(80% - 15px) top', 'calc(80% + -15px) 0%'); -testParse('calc(80% - 15px) bottom', 'calc(80% + -15px) 100%'); -testParse('calc(80% - 15px) 10px', 'calc(80% + -15px) 10px'); -testParse('calc(80% - 15px) 25%', 'calc(80% + -15px) 25%'); -testParse('calc(80% - 15px) calc(80% - 15px)', 'calc(80% + -15px) calc(80% + -15px)'); - -testParse('left left 10px', undefined); -testParse('left center left', undefined); -testParse('left center 25%', undefined); -testParse('left right center', undefined); -testParse('left right calc(80% - 15px)', undefined); -testParse('left bottom 10px', '0% calc(-10px + 100%)'); -testParse('left 10px right', undefined); -testParse('left 25% 25%', undefined); -testParse('left calc(80% - 15px) top', 'calc(80% + -15px) 0%'); -testParse('center left top', undefined); -testParse('center center left', undefined); -testParse('center center center', undefined); -testParse('center right 10px', 'calc(-10px + 100%) 50%'); -testParse('center top 25%', '50% 25%'); -testParse('center 25% left', undefined); -testParse('right left right', undefined); -testParse('right left 25%', undefined); -testParse('right center 10px', undefined); -testParse('right right 25%', undefined); -testParse('right top 10px', '100% 10px'); -testParse('right bottom 25%', '100% 75%'); -testParse('right 25% bottom', '75% 100%'); -testParse('right 10px 25%', undefined); -testParse('top left 25%', '25% 0%'); -testParse('top center 25%', undefined); -testParse('top 10px right', '100% 10px'); -testParse('top 10px 10px', undefined); -testParse('top calc(80% - 15px) center', '50% calc(80% + -15px)'); -testParse('bottom left 10px', '10px 100%'); -testParse('bottom calc(80% - 15px) right', '100% calc(20% + 15px)'); -testParse('bottom calc(80% - 15px) bottom', undefined); -testParse('10px left center', undefined); -testParse('10px right 25%', undefined); -testParse('10px 25% bottom', undefined); -testParse('25% 25% 25%', undefined); -testParse('calc(80% - 15px) calc(80% - 15px) right', undefined); - -testParse('left 25% left 10px', undefined); -testParse('left center left 10px', undefined); -testParse('left center top 25%', undefined); -testParse('left 10px right calc(80% - 15px)', undefined); -testParse('left 10px bottom 10px', '10px calc(-10px + 100%)'); -testParse('left 25% top 25%', '25% 25%'); -testParse('left calc(80% - 15px) top 10px', 'calc(80% + -15px) 10px'); -testParse('center left top 10px', undefined); -testParse('center center left 25%', undefined); -testParse('center center center 10px', undefined); -testParse('center 25% right 10px', undefined); -testParse('right left right 25%', undefined); -testParse('right 10px right 25%', undefined); -testParse('top 10px center 25%', undefined); -testParse('top 10px right calc(80% - 15px)', 'calc(20% + 15px) 10px'); -testParse('top 10px 10px right', undefined); -testParse('bottom calc(80% - 15px) left 10px', '10px calc(20% + 15px)'); -testParse('calc(80% - 15px) 10px right 25%', undefined); -testParse('10px 25% bottom 25%', undefined); -testParse('25% 25% 25% 25%', undefined); - -testParse('10px right, center center', undefined); -testParse('25% calc(80% - 15px), right 10px', '25% calc(80% + -15px), 100% 10px'); -testParse('left calc(80% - 15px) top, 25% calc(80% - 15px)', 'calc(80% + -15px) 0%, 25% calc(80% + -15px)'); -testParse('right left 25%, left calc(80% - 15px) top', undefined); -testParse('top center 25%, right left 25%', undefined); - -testParse('10px right, center center, 25% calc(80% - 15px), right 10px', undefined); -testParse('right calc(80% - 15px) top, 25% calc(80% - 15px), top left 25%, left calc(80% - 15px) top', 'calc(20% + 15px) 0%, 25% calc(80% + -15px), 25% 0%, calc(80% + -15px) 0%'); -testParse('calc(80% - 15px) 10px right 25%, left calc(80% - 15px) top 10px, center center, calc(80% - 15px) 10px right 25%', undefined); - -testParse('aoeu', undefined); -testParse('aoeu, asdf', undefined); -testParse('laft 45%', undefined); - - -// Last parameter is expected result. -testAdd('0px 0px', '0px 0px', '0px 0px'); -testAdd('0px 0px', '25px 50px', '25px 50px'); -testAdd('0% 0%', '25% 50%', '25% 50%'); -testAdd('10px 10%', '25px 50%', '35px 60%'); -testAdd('10px 10%', '25% 50px', 'calc(10px + 25%) calc(10% + 50px)'); -testAdd('10px 10%, 10px 10px', '25px 50%', '35px 60%, 10px 10px'); -testAdd('10px 10%', '25px 50%, 10px 10px', '35px 60%, 10px 10px'); -testAdd('10px 10%, 5% 5px', '25px 50%, 20% 20px', '35px 60%, 25% 25px'); - - -testInterpolate({ - from: '0px 0px', - to: '0px 0px', - fraction: 0.2, - expected: '0px 0px'}); -testInterpolate({ - from: '0px 0px', - to: '25px 50px', - fraction: 0.2, - expected: '5px 10px'}); -testInterpolate({ - from: '0% 0%', - to: '25% 50%', - fraction: 0.2, - expected: '5% 10%'}); -testInterpolate({ - from: '10px 10%', - to: '25px 50%', - fraction: 0.2, - expected: '13px 18%'}); -testInterpolate({ - from: '10px 10%', - to: '25% 50px', - fraction: 0.2, - expected: 'calc(8px + 5%) calc(8% + 10px)'}); -testInterpolate({ - from: '10px 10%, 10px 10px', - to: '25px 50%', - fraction: 0.2, - expected: '13px 18%, 8px 8px'}); -testInterpolate({ - from: '10px 10%', - to: '25px 50%, 10px 10px', - fraction: 0.2, - expected: '13px 18%, 2px 2px'}); -testInterpolate({ - from: '10px 10%, 5% 5px', - to: '25px 50%, 20% 20px', - fraction: 0.2, - expected: '13px 18%, 8% 8px'}); - -</script> diff --git a/third_party/polymer/components/web-animations-js/test/testcases/manual-test-add-player-onend.html b/third_party/polymer/components/web-animations-js/test/testcases/manual-test-add-player-onend.html deleted file mode 100644 index 8194898..0000000 --- a/third_party/polymer/components/web-animations-js/test/testcases/manual-test-add-player-onend.html +++ /dev/null @@ -1,57 +0,0 @@ -<!-- -Copyright 2013 Google Inc. All Rights Reserved. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. ---> - -<!DOCTYPE html><meta charset="UTF-8"> - -<style> -#target { - background-color: lightsteelblue; - width: 50px; - height: 50px; - position: absolute; - left: 0px; -} -#expected { - background-color: darkred; - width: 50px; - height: 50px; - position: absolute; - left: 100px; -} -</style> - -<div id="expected"></div> -<div id="target"></div> - -<script src="../bootstrap.js"></script> -<script> -'use strict'; - -var test = async_test('Check second animation has fired after being triggered inside onend callback'); -var element = document.querySelector('#target'); -var animation = new Animation(element, {left: '50px'}, 0.5); -animation.addEventListener('end', function() { - var nextAnimation = new Animation(element, {left: '100px'}, 0.5); - nextAnimation.addEventListener('end', function() { - test.step(function() { assert_styles("#target", {left:'100px'}); }); - test.done(); - }); - document.timeline.play(nextAnimation); -}); -document.timeline.play(animation); - -timing_test(function() {at(1 * 1000, function() {});}, 'Force testharness to execute to 1 second.'); -</script> diff --git a/third_party/polymer/components/web-animations-js/test/testcases/manual-test-preset-timings.html b/third_party/polymer/components/web-animations-js/test/testcases/manual-test-preset-timings.html deleted file mode 100644 index 074f48b..0000000 --- a/third_party/polymer/components/web-animations-js/test/testcases/manual-test-preset-timings.html +++ /dev/null @@ -1,71 +0,0 @@ -<!-- -Copyright 2012 Google Inc. All Rights Reserved. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. ---> - -<!DOCTYPE html><meta charset="UTF-8"> -<style> -canvas { - border: silver solid 1px; - padding: 5px; -} -span { - display: inline-block; - padding: 5px; -} -</style> -<body> - -<script src="../../web-animations.js"></script> -<script> -"use strict"; - -var size = 100; -var duration = 3.0 * 1000; - -function testTiming(name) { - var canvas = document.createElement('canvas'); - canvas.width = canvas.height = size; - var ctx = canvas.getContext('2d'); - ctx.strokeStyle = 'blue'; - ctx.beginPath(); - ctx.moveTo(0, size); - var span = document.createElement('span'); - span.appendChild(canvas); - span.appendChild(document.createElement('br')); - span.appendChild(document.createTextNode(name)); - document.body.appendChild(span); - return new Animation(ctx, - function(timeFraction, animation) { - var inputTimeFraction = player.currentTime / duration; - animation.target.lineTo(inputTimeFraction * size, size - timeFraction * size); - animation.target.stroke(); - }, { - duration: duration, - easing: name, - }); -} - -// TODO: Making player global like this is is rather ugly. It would be nice if -// the animation or player were passed to the custom animation effect's sample -// function. -var player = document.timeline.play(new AnimationGroup([ - testTiming('ease'), - testTiming('linear'), - testTiming('ease-in'), - testTiming('ease-out'), - testTiming('ease-in-out'), -])); - -</script> diff --git a/third_party/polymer/components/web-animations-js/test/testcases/manual-test-step.html b/third_party/polymer/components/web-animations-js/test/testcases/manual-test-step.html deleted file mode 100644 index 3b7d3f5..0000000 --- a/third_party/polymer/components/web-animations-js/test/testcases/manual-test-step.html +++ /dev/null @@ -1,88 +0,0 @@ -<!-- -Copyright 2012 Google Inc. All Rights Reserved. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. ---> - -<!DOCTYPE html><meta charset="UTF-8"> -<style> -canvas { - border: silver solid 1px; - padding: 5px; -} -span { - display: inline-block; - padding: 5px; -} -</style> -<body> - -<script src="../../web-animations.js"></script> -<script> -"use strict"; - -var size = 100; -var duration = 3.0 * 1000; - -function testStep(numSteps, position) { - var canvas = document.createElement('canvas'); - canvas.width = canvas.height = size; - var ctx = canvas.getContext('2d'); - ctx.beginPath(); - var span = document.createElement('span'); - span.appendChild(canvas); - span.appendChild(document.createElement('br')); - span.appendChild(document.createTextNode('steps: ' + numSteps)); - span.appendChild(document.createElement('br')); - span.appendChild(document.createTextNode('position: ' + position)); - document.body.appendChild(span); - return new Animation(ctx, - function(timeFraction, animation) { - var target = animation.target; - var inputTimeFraction = player.currentTime / duration; - if (target.lastTimeFraction !== timeFraction) { - target.beginPath(); - target.moveTo(inputTimeFraction * size, - size - target.lastTimeFraction * size); - target.lineTo(inputTimeFraction * size, size - timeFraction * size); - target.strokeStyle = 'silver'; - target.stroke(); - target.beginPath(); - target.strokeStyle = 'blue'; - } else { - target.lineTo(inputTimeFraction * size, size - timeFraction * size); - } - target.lastTimeFraction = timeFraction; - target.stroke(); - }, { - duration: duration, - easing: 'steps(' + numSteps + ', ' + position + ')', - }); -} - -// TODO: Making player global like this is is rather ugly. It would be nice if -// the animation or player were passed to the custom animation effect's sample -// function. -var player = document.timeline.play(new AnimationGroup([ - testStep(1, 'start'), - testStep(1, 'middle'), - testStep(1, 'end'), - testStep(3, 'start'), - testStep(3, 'middle'), - testStep(3, 'end'), - testStep(10, 'start'), - testStep(10, 'middle'), - testStep(10, 'end'), -])); - -</script> diff --git a/third_party/polymer/components/web-animations-js/test/testcases/small.mp4 b/third_party/polymer/components/web-animations-js/test/testcases/small.mp4 Binary files differdeleted file mode 100644 index 1fc4788..0000000 --- a/third_party/polymer/components/web-animations-js/test/testcases/small.mp4 +++ /dev/null diff --git a/third_party/polymer/components/web-animations-js/test/testcases/small.webm b/third_party/polymer/components/web-animations-js/test/testcases/small.webm Binary files differdeleted file mode 100644 index da946da..0000000 --- a/third_party/polymer/components/web-animations-js/test/testcases/small.webm +++ /dev/null diff --git a/third_party/polymer/components/web-animations-js/test/testcases/test-bounds.html b/third_party/polymer/components/web-animations-js/test/testcases/test-bounds.html deleted file mode 100644 index a9ce1f8..0000000 --- a/third_party/polymer/components/web-animations-js/test/testcases/test-bounds.html +++ /dev/null @@ -1,69 +0,0 @@ -<!-- -Copyright 2013 Google Inc. All Rights Reserved. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. ---> - -<!DOCTYPE html><meta charset="UTF-8"> -<style> -div.anim { - position: relative; - left: 0px; -} -</style> - -<div id="anim1" class="anim"></div> -<div id="anim2" class="anim"></div> - -<script src="../bootstrap.js"></script> -<script> -"use strict"; - -var animFunc = [{left: "100px"}, {left: "200px"}]; - -// Test that the animation interval uses inclusive start and end bounds. -var elem1 = document.getElementById("anim1"); -var player1 = - document.timeline.play(new Animation(elem1, animFunc, {duration: 1.0, fill: 'forwards'})); - -timing_test(function() { - at(0, function() { assert_equals(getComputedStyle(elem1).left, "100px") }); - }, - "Start bound should be inclusive"); - -timing_test(function() { - at(1.0, function() { assert_equals(getComputedStyle(elem1).left, "200px") }); - }, - "End bound should be inclusive"); - -// Test that delay is applied correctly. -var elem2 = document.getElementById("anim2"); -var player2 = document.timeline.play( - new Animation(elem2, animFunc, {duration: 1.0, delay: 1.0, fill: 'forwards'})); - -timing_test(function() { - at(0, function() { assert_equals(getComputedStyle(elem2).left, "0px"); }); - }, - "Start bound should include delay"); - -timing_test(function() { - at(1.0, function() { assert_equals(getComputedStyle(elem2).left, "100px"); }); - }, - "Start bound with delay should be inclusive"); - -timing_test(function() { - at(2.0, function() { assert_equals(getComputedStyle(elem2).left, "200px"); }); - }, - "End bound with delay should be inclusive"); - -</script> diff --git a/third_party/polymer/components/web-animations-js/test/testcases/test-document-timeline.html b/third_party/polymer/components/web-animations-js/test/testcases/test-document-timeline.html deleted file mode 100644 index 9c7d126..0000000 --- a/third_party/polymer/components/web-animations-js/test/testcases/test-document-timeline.html +++ /dev/null @@ -1,53 +0,0 @@ -<!-- -Copyright 2013 Google Inc. All Rights Reserved. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. ---> - -<!DOCTYPE html><meta charset="UTF-8"> -<div id="anim"></div> - -<script src="../bootstrap.js"></script> -<script> -"use strict"; - -// Test that document.timeline.currentTime is read-only. -test(function() { - assert_throws(new TypeError(), function() { - document.timeline.currentTime = 12345; - }); - assert_not_equals(document.timeline.currentTime, 12345); -}, "document.timeline.currentTime should be read-only"); - -/* - -This is wrong according to the spec, timing actually continues to move forward -even while Javascript is running. - -// Test that document.timeline.currentTime is constant within a JavaScript -// callstack. -timing_test(function() { - at(0.0, function() {assert_equals(document.timeline.currentTime, 0.0)}); - }, "document.timeline.currentTime time should be constant in JavaScript callstack"); -*/ - -// Test that document.timeline.currentTime is non-null in an onload handler -// when using performance timing. Note that this assumes that web-animations.js -// is loaded before document load time. -var loadtest = async_test("document.timeline.currentTime should be non-null in an onload handler"); -addEventListener("load", function() { - loadtest.step(function() {assert_not_equals(document.timeline.currentTime, null)}); - loadtest.done(); -}); - -</script> diff --git a/third_party/polymer/components/web-animations-js/test/testcases/test-dynamic-load.html b/third_party/polymer/components/web-animations-js/test/testcases/test-dynamic-load.html deleted file mode 100644 index ea5a3b9..0000000 --- a/third_party/polymer/components/web-animations-js/test/testcases/test-dynamic-load.html +++ /dev/null @@ -1,65 +0,0 @@ -<!-- -Copyright 2013 Google Inc. All Rights Reserved. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. ---> - -<!DOCTYPE html><meta charset="UTF-8"> -<style> -.anim { - left: 0px; - width: 100px; - height: 100px; - background-color: #FAA; - position: absolute; -} - -.expected { - width: 100px; - height: 100px; - position: absolute; - border-right: 1px solid black; -} - -#a { - top: 50px -} -</style> - -<div>Right edge of box should align with black line at end of test.</div> -<div id="a" class="anim"></div> -<div id="a-expected" style="top: 50px; left: 200px;" class="expected"></div> - -<script src="../bootstrap.js" nopolyfill></script> -<script> -"use strict"; - -timing_test(function() { - at(0.00, function() { assert_styles(".anim", {"left": "0px"}) }); - at(0.25, function() { assert_styles(".anim", {"left": "100px"}) }); - at(0.50, function() { assert_styles(".anim", {"left": "200px"}) }); - }, "Check left position"); - -window.addEventListener('load', function() { - var s = document.createElement('script'); - s.src = "../../web-animations.js"; - s.addEventListener('load', function() { - document.timeline.play(new Animation(a, - [{left: "0px"}, {left: "200px"}], - {duration: 0.5, fill: 'forwards'} - )); - - }) - document.head.appendChild(s); -}); -</script> diff --git a/third_party/polymer/components/web-animations-js/test/testcases/test-fill-auto.html b/third_party/polymer/components/web-animations-js/test/testcases/test-fill-auto.html deleted file mode 100644 index bd8bdd3..0000000 --- a/third_party/polymer/components/web-animations-js/test/testcases/test-fill-auto.html +++ /dev/null @@ -1,78 +0,0 @@ -<!-- -Copyright 2013 Google Inc. All Rights Reserved. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. ---> - -<!DOCTYPE html><meta charset="UTF-8"> -<script src='../bootstrap.js'></script> -<script> -'use strict'; - -var effect = [{left: '100px'}, {left: '100px'}]; -function inEffect(element) { - return getComputedStyle(element).left === '100px'; -} - -function createAnim(element, fill) { - return new Animation(element, effect, { - delay: 0.1, - duration: 0.1, - fill: fill, - }); -} -function createGroup(element, fill) { - return new AnimationSequence([ - new Animation(element, effect, { - duration: 0.1, - fill: 'both'}) - ], { - delay: 0.1, - }); -} - -function createElement() { - var element = document.createElement('div'); - document.body.appendChild(element); - return element; -} - -timing_test(function() { - var animElement = createElement(); - document.timeline.play(createAnim(animElement, 'auto')); - var changingAnimElement = createElement(); - var changingAnim = createAnim(changingAnimElement, 'both'); - document.timeline.play(changingAnim); - - var groupElement = createElement(); - document.timeline.play(createGroup(groupElement, 'auto')); - var changingGroupElement = createElement(); - var changingGroup = createGroup(changingGroupElement, 'none'); - document.timeline.play(changingGroup); - - at(0, function () { - assert_false(inEffect(animElement), 'Animations should not be in effect by default before they start.'); - assert_true(inEffect(groupElement), 'Timing Groups should be in effect by default before they start.'); - }, 'Before phase'); - - at(0.5, function () { - assert_false(inEffect(animElement), 'Animations should not be in effect by default after they end.'); - assert_true(inEffect(groupElement), 'Timing Groups should be in effect by default before after they end.'); - - changingAnim.timing.fill = 'auto'; - changingGroup.timing.fill = 'auto'; - assert_false(inEffect(changingAnimElement), 'Updating Animation fill mode to auto should take effect immediately.'); - assert_true(inEffect(changingGroupElement), 'Updating Timing Group fill mode to auto should take effect immediately.'); - }, 'After phase'); -}); -</script> diff --git a/third_party/polymer/components/web-animations-js/test/testcases/test-getcurrent.html b/third_party/polymer/components/web-animations-js/test/testcases/test-getcurrent.html deleted file mode 100644 index f25910e..0000000 --- a/third_party/polymer/components/web-animations-js/test/testcases/test-getcurrent.html +++ /dev/null @@ -1,324 +0,0 @@ -<!-- -/* - * Copyright 2013 Google Inc. All Rights Reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ ---> - -<!DOCTYPE html><meta charset="UTF-8"> -<style> -.ball { - position: absolute; - color: white; - width: 3em; - height: 3em; - background-color: black; - border-radius: 100%; - text-align: center; -} - -#a { top: 0px; } -#b { top: 50px; } -</style> - -<div id="a" class="ball">A</div> -<div id="b" class="ball">B</div> - -<script src="../bootstrap.js"></script> -<script> -"use strict"; - -var a = document.querySelector("#a"); -var b = document.querySelector("#b"); - -var animationA = new Animation(a, {"left": "100%"}, {duration: 10}); -var animationB = new Animation(b, {"left": "100%"}, {duration: 10}); -var animationAClone = animationA.clone(); -var animationBClone = animationB.clone(); - -var playerA; -at(1.0, function() { - playerA = document.timeline.play(animationA); - }); -var playerB; -at(2.0, function() { - playerB = document.timeline.play(animationB); - }); -var playerAB; -at(3.0, function() { - playerAB = document.timeline.play(new AnimationGroup([animationAClone, animationBClone])); - }); - -// These test_at calls are not in a *-checks.js file so they -// can be declared after the calls to play() are scheduled. - -timing_test(function () { - at(0.0, function() { - var timelinePlayers = document.timeline.getCurrentPlayers(); - var aPlayers = a.getCurrentPlayers(); - var bPlayers = b.getCurrentPlayers(); - assert_equals(timelinePlayers.length, 0, "timelinePlayers count"); - assert_equals(aPlayers.length, 0, "Players on A length"); - assert_equals(bPlayers.length, 0, "Players on B length"); - }); - }, "Check current players at t=0"); -timing_test(function () { - at(1.0, function() { - var timelinePlayers = document.timeline.getCurrentPlayers(); - var aPlayers = a.getCurrentPlayers(); - var bPlayers = b.getCurrentPlayers(); - assert_equals(timelinePlayers.length, 1, "timelinePlayers count"); - assert_in_array(playerA, timelinePlayers, "timelinePlayers contains playerA"); - assert_equals(aPlayers.length, 1, "Players on A length"); - assert_in_array(playerA, aPlayers, "Players on A contains playerA"); - assert_equals(bPlayers.length, 0, "Players on B length"); - }); - }, "Check current players at t=1"); -timing_test(function () { - at(2.0, function() { - var timelinePlayers = document.timeline.getCurrentPlayers(); - var aPlayers = a.getCurrentPlayers(); - var bPlayers = b.getCurrentPlayers(); - assert_equals(timelinePlayers.length, 2, "timelinePlayers count"); - assert_in_array(playerA, timelinePlayers, "timelinePlayers contains playerA"); - assert_in_array(playerB, timelinePlayers, "timelinePlayers contains playerB"); - assert_equals(aPlayers.length, 1, "Players on A length"); - assert_in_array(playerA, aPlayers, "Players on A contains playerA"); - assert_equals(bPlayers.length, 1, "Players on B length"); - assert_in_array(playerB, bPlayers, "Players on B contains playerB"); - }); - }, "Check current players at t=2"); -timing_test(function () { - at(3.0, function() { - var timelinePlayers = document.timeline.getCurrentPlayers(); - var aPlayers = a.getCurrentPlayers(); - var bPlayers = b.getCurrentPlayers(); - assert_equals(timelinePlayers.length, 3, "timelinePlayers count"); - assert_in_array(playerA, timelinePlayers, "timelinePlayers contains playerA"); - assert_in_array(playerB, timelinePlayers, "timelinePlayers contains playerB"); - assert_in_array(playerAB, timelinePlayers, "timelinePlayers contains playerAB"); - assert_equals(aPlayers.length, 2, "Players on A length"); - assert_in_array(playerA, aPlayers, "Players on A contains playerA"); - assert_in_array(playerAB, aPlayers, "Players on A contains playerAB"); - assert_equals(bPlayers.length, 2, "Players on B length"); - assert_in_array(playerB, bPlayers, "Players on B contains playerB"); - assert_in_array(playerAB, bPlayers, "Players on B contains playerAB"); - }); - }, "Check current players at t=3"); -timing_test(function () { - at(5.0, function() { - var timelinePlayers = document.timeline.getCurrentPlayers(); - var aPlayers = a.getCurrentPlayers(); - var bPlayers = b.getCurrentPlayers(); - assert_equals(timelinePlayers.length, 3, "timelinePlayers count"); - assert_in_array(playerA, timelinePlayers, "timelinePlayers contains playerA"); - assert_in_array(playerB, timelinePlayers, "timelinePlayers contains playerB"); - assert_in_array(playerAB, timelinePlayers, "timelinePlayers contains playerAB"); - assert_equals(aPlayers.length, 2, "Players on A length"); - assert_in_array(playerA, aPlayers, "Players on A contains playerA"); - assert_in_array(playerAB, aPlayers, "Players on A contains playerAB"); - assert_equals(bPlayers.length, 2, "Players on B length"); - assert_in_array(playerB, bPlayers, "Players on B contains playerB"); - assert_in_array(playerAB, bPlayers, "Players on B contains playerAB"); - }); - }, "Check current players at t=5"); -timing_test(function () { - at(11.0, function() { - var timelinePlayers = document.timeline.getCurrentPlayers(); - var aPlayers = a.getCurrentPlayers(); - var bPlayers = b.getCurrentPlayers(); - assert_equals(timelinePlayers.length, 2, "timelinePlayers count"); - assert_in_array(playerB, timelinePlayers, "timelinePlayers contains playerB"); - assert_in_array(playerAB, timelinePlayers, "timelinePlayers contains playerAB"); - assert_equals(aPlayers.length, 1, "Players on A length"); - assert_in_array(playerAB, aPlayers, "Players on A contains playerAB"); - assert_equals(bPlayers.length, 2, "Players on B length"); - assert_in_array(playerB, bPlayers, "Players on B contains playerB"); - assert_in_array(playerAB, bPlayers, "Players on B contains playerAB"); - }); - }, "Check current players at t=11"); -timing_test(function () { - at(11.5, function() { - var timelinePlayers = document.timeline.getCurrentPlayers(); - var aPlayers = a.getCurrentPlayers(); - var bPlayers = b.getCurrentPlayers(); - assert_equals(timelinePlayers.length, 2, "timelinePlayers count"); - assert_in_array(playerB, timelinePlayers, "timelinePlayers contains playerB"); - assert_in_array(playerAB, timelinePlayers, "timelinePlayers contains playerAB"); - assert_equals(aPlayers.length, 1, "Players on A length"); - assert_in_array(playerAB, aPlayers, "Players on A contains playerAB"); - assert_equals(bPlayers.length, 2, "Players on B length"); - assert_in_array(playerB, bPlayers, "Players on B contains playerB"); - assert_in_array(playerAB, bPlayers, "Players on B contains playerAB"); - }); - }, "Check current players at t=11.5"); -timing_test(function () { - at(12.0, function() { - var timelinePlayers = document.timeline.getCurrentPlayers(); - var aPlayers = a.getCurrentPlayers(); - var bPlayers = b.getCurrentPlayers(); - assert_equals(timelinePlayers.length, 1, "timelinePlayers count"); - assert_in_array(playerAB, timelinePlayers, "timelinePlayers contains playerAB"); - assert_equals(aPlayers.length, 1, "Players on A length"); - assert_in_array(playerAB, aPlayers, "Players on A contains playerAB"); - assert_equals(bPlayers.length, 1, "Players on B length"); - assert_in_array(playerAB, bPlayers, "Players on B contains playerAB"); - }); - }, "Check current players at t=12"); -timing_test(function () { - at(12.5, function() { - var timelinePlayers = document.timeline.getCurrentPlayers(); - var aPlayers = a.getCurrentPlayers(); - var bPlayers = b.getCurrentPlayers(); - assert_equals(timelinePlayers.length, 1, "timelinePlayers count"); - assert_in_array(playerAB, timelinePlayers, "timelinePlayers contains playerAB"); - assert_equals(aPlayers.length, 1, "Players on A length"); - assert_in_array(playerAB, aPlayers, "Players on A contains playerAB"); - assert_equals(bPlayers.length, 1, "Players on B length"); - assert_in_array(playerAB, bPlayers, "Players on B contains playerAB"); - }); - }, "Check current players at t=12.5"); -timing_test(function () { - at(13.0, function() { - var timelinePlayers = document.timeline.getCurrentPlayers(); - var aPlayers = a.getCurrentPlayers(); - var bPlayers = b.getCurrentPlayers(); - assert_equals(timelinePlayers.length, 0, "timelinePlayers count"); - assert_equals(aPlayers.length, 0, "Players on A length"); - assert_equals(bPlayers.length, 0, "Players on B length"); - }); - }, "Check current players at t=13"); -timing_test(function () { - at(13.5, function() { - var timelinePlayers = document.timeline.getCurrentPlayers(); - var timelinePlayers = document.timeline.getCurrentPlayers(); - var aPlayers = a.getCurrentPlayers(); - var bPlayers = b.getCurrentPlayers(); - assert_equals(timelinePlayers.length, 0, "timelinePlayers count"); - assert_equals(aPlayers.length, 0, "Players on A length"); - assert_equals(bPlayers.length, 0, "Players on B length"); - }); - }, "Check current players at t=13.5"); - -timing_test(function () { - at(0.0, function() { - var aAnimations = a.getCurrentAnimations(); - var bAnimations = b.getCurrentAnimations(); - assert_equals(aAnimations.length, 0, "Animations on A count"); - assert_equals(bAnimations.length, 0, "Animations on B count"); - }); - }, "Check current animations at t=0"); -timing_test(function () { - at(1.0, function() { - var aAnimations = a.getCurrentAnimations(); - var bAnimations = b.getCurrentAnimations(); - assert_equals(aAnimations.length, 1, "Animations on A count"); - assert_in_array(animationA, aAnimations, "Animations on A contains animationA"); - assert_equals(bAnimations.length, 0, "Animations on B count"); - }); - }, "Check current animations at t=1"); -timing_test(function () { - at(2.0, function() { - var aAnimations = a.getCurrentAnimations(); - var bAnimations = b.getCurrentAnimations(); - assert_equals(aAnimations.length, 1, "Animations on A count"); - assert_in_array(animationA, aAnimations, "Animations on A contains animationA"); - assert_equals(bAnimations.length, 1, "Animations on B count"); - assert_in_array(animationB, bAnimations, "Animations on B contains animationB"); - }); - }, "Check current animations at t=2"); -timing_test(function () { - at(3.0, function() { - var aAnimations = a.getCurrentAnimations(); - var bAnimations = b.getCurrentAnimations(); - assert_equals(aAnimations.length, 2, "Animations on A count"); - assert_in_array(animationA, aAnimations, "Animations on A contains animationA"); - assert_in_array(animationAClone, aAnimations, "Animations on A contains animationAClone"); - assert_equals(bAnimations.length, 2, "Animations on B count"); - assert_in_array(animationB, bAnimations, "Animations on B contains animationB"); - assert_in_array(animationBClone, bAnimations, "Animations on B contains animationBClone"); - }); - }, "Check current animations at t=3"); -timing_test(function () { - at(5.0, function() { - var aAnimations = a.getCurrentAnimations(); - var bAnimations = b.getCurrentAnimations(); - assert_equals(aAnimations.length, 2, "Animations on A count"); - assert_in_array(animationA, aAnimations, "Animations on A contains animationA"); - assert_in_array(animationAClone, aAnimations, "Animations on A contains animationAClone"); - assert_equals(bAnimations.length, 2, "Animations on B count"); - assert_in_array(animationB, bAnimations, "Animations on B contains animationB"); - assert_in_array(animationBClone, bAnimations, "Animations on B contains animationBClone"); - }); - }, "Check current animations at t=5"); -timing_test(function () { - at(11.0, function() { - var aAnimations = a.getCurrentAnimations(); - var bAnimations = b.getCurrentAnimations(); - assert_equals(aAnimations.length, 1, "Animations on A count"); - assert_in_array(animationAClone, aAnimations, "Animations on A contains animationAClone"); - assert_equals(bAnimations.length, 2, "Animations on B count"); - assert_in_array(animationB, bAnimations, "Animations on B contains animationB"); - assert_in_array(animationBClone, bAnimations, "Animations on B contains animationBClone"); - }); - }, "Check current animations at t=11"); -timing_test(function () { - at(11.5, function() { - var aAnimations = a.getCurrentAnimations(); - var bAnimations = b.getCurrentAnimations(); - assert_equals(aAnimations.length, 1, "Animations on A count"); - assert_in_array(animationAClone, aAnimations, "Animations on A contains animationAClone"); - assert_equals(bAnimations.length, 2, "Animations on B count"); - assert_in_array(animationB, bAnimations, "Animations on B contains animationB"); - assert_in_array(animationBClone, bAnimations, "Animations on B contains animationBClone"); - }); - }, "Check current animations at t=11.5"); -timing_test(function () { - at(12.0, function() { - var aAnimations = a.getCurrentAnimations(); - var bAnimations = b.getCurrentAnimations(); - assert_equals(aAnimations.length, 1, "Animations on A count"); - assert_in_array(animationAClone, aAnimations, "Animations on A contains animationAClone"); - assert_equals(bAnimations.length, 1, "Animations on B count"); - assert_in_array(animationBClone, bAnimations, "Animations on B contains animationBClone"); - }); - }, "Check current animations at t=12"); -timing_test(function () { - at(12.5, function() { - var aAnimations = a.getCurrentAnimations(); - var bAnimations = b.getCurrentAnimations(); - assert_equals(aAnimations.length, 1, "Animations on A count"); - assert_in_array(animationAClone, aAnimations, "Animations on A contains animationAClone"); - assert_equals(bAnimations.length, 1, "Animations on B count"); - assert_in_array(animationBClone, bAnimations, "Animations on B contains animationBClone"); - }); - }, "Check current animations at t=12.5"); -timing_test(function () { - at(13.0, function() { - var aAnimations = a.getCurrentAnimations(); - var bAnimations = b.getCurrentAnimations(); - assert_equals(aAnimations.length, 0, "Animations on A count"); - assert_equals(bAnimations.length, 0, "Animations on B count"); - }); - }, "Check current animations at t=13"); -timing_test(function () { - at(13.5, function() { - var aAnimations = a.getCurrentAnimations(); - var bAnimations = b.getCurrentAnimations(); - assert_equals(aAnimations.length, 0, "Animations on A count"); - assert_equals(bAnimations.length, 0, "Animations on B count"); - }); - }, "Check current animations at t=13.5"); - -</script> diff --git a/third_party/polymer/components/web-animations-js/test/testcases/test-keyframe-animation-effect.html b/third_party/polymer/components/web-animations-js/test/testcases/test-keyframe-animation-effect.html deleted file mode 100644 index e7f4a47..0000000 --- a/third_party/polymer/components/web-animations-js/test/testcases/test-keyframe-animation-effect.html +++ /dev/null @@ -1,248 +0,0 @@ -<!-- -Copyright 2013 Google Inc. All Rights Reserved. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. ---> - -<!DOCTYPE html><meta charset="UTF-8"> -<style> - div.anim { - left: 100px; - top: 200px; - } -</style> - -<div id="elem"></div> - -<div id="anim0" class="anim"></div> -<div id="anim1" class="anim"></div> -<div id="anim2" class="anim"></div> -<div id="anim3" class="anim"></div> -<div id="anim4" class="anim"></div> -<div id="anim5" class="anim"></div> -<div id="anim6" class="anim"></div> -<div id="anim7" class="anim"></div> -<div id="anim8" class="anim"></div> -<div id="anim9" class="anim"></div> -<div id="anim10" class="anim"></div> -<div id="anim11" class="anim"></div> - -<script src="../bootstrap.js"></script> -<script> -"use strict"; - -var keyframes = [{left: "200px"}, {left: "300px"}]; - -test(function() { - assert_true(new Animation(document.getElementById("elem"), keyframes).effect - instanceof KeyframeEffect); -}, "Animation.effect should be an instance of KeyframeEffect when " + - "created with a keyframe dictionary"); - -test(function() { - assert_equals(new KeyframeEffect(keyframes).composite, "replace"); -}, "KeyframeEffect.composite should default to 'replace'"); - -test(function() { - var effect = new KeyframeEffect(keyframes); - effect.composite = "foo"; - assert_equals(effect.composite, "replace"); - effect.composite = 42; - assert_equals(effect.composite, "replace"); - effect.composite = "add"; - assert_equals(effect.composite, "add"); -}, "KeyframeEffect.composite should only accept valid values"); - -timing_test(function() { - var animation = new Animation(document.getElementById("anim1"), keyframes, 1); - document.timeline.play(animation); - at(0.5, function() { - assert_styles("#anim1", {left: "250px"}); - animation.effect.composite = "add"; - assert_styles("#anim1", {left: "350px"}); - }); -}, "Setting KeyframeEffect.composite should cause immediate update"); - -test(function() { - var frames = new KeyframeEffect( - [{left: "100px"}, {top: "200px"}]).getFrames(); - assert_equals(frames.length, 2); - assert_equals(frames[0].left, "100px"); - assert_equals(frames[1].top, "200px"); -}, "KeyframeEffect.getFrames() should return the specified keyframes"); - -test(function() { - var frames = new KeyframeEffect({left: "100px"}).getFrames(); - assert_equals(frames.length, 1); - assert_equals(frames[0].left, "100px"); -}, "KeyframeEffect should handle a single keyframe"); - -test(function() { - var frames = new KeyframeEffect({}).getFrames(); - assert_equals(frames.length, 1); - assert_equals(typeof frames[0], "object"); -}, "KeyframeEffect should handle an empty keyframe"); - -test(function() { - var frames = new KeyframeEffect().getFrames(); - assert_equals(frames.length, 1); - assert_equals(typeof frames[0], "object"); -}, "KeyframeEffect should handle no input for keyframe dictionary"); - -test(function() { - var frames = new KeyframeEffect(42).getFrames(); - assert_equals(frames.length, 1); - assert_equals(typeof frames[0], "object"); -}, "KeyframeEffect should handle non-objects for keyframe dictionary"); - -test(function() { - assert_false( - new KeyframeEffect(keyframes).getFrames() === keyframes); -}, "KeyframeEffect.getFrames() should not return the original " + - "keyframe dictionary"); - -test(function() { - var effect = new KeyframeEffect({left: "100px"}); - effect.getFrames().push({top: "200px"}); - var frames = effect.getFrames(); - assert_equals(frames.length, 1); - assert_equals(frames[0].left, "100px"); - assert_equals(frames[0].top, undefined); -}, "KeyframeEffect.getFrames() should not allow internal state to " + - "be modified"); - -test(function() { - assert_equals(new KeyframeEffect(keyframes).getFrames()[0].offset, - null); -}, "Default keyframe offset should be null"); - -test(function() { - assert_equals( - new KeyframeEffect({offset: "foo"}).getFrames()[0].offset, null); - assert_equals(new KeyframeEffect({offset: 42}).getFrames()[0].offset, - 42); -}, "Keyframes should only accept valid values for offset"); - -test(function() { - assert_equals(new KeyframeEffect(keyframes).getFrames()[0].composite, - null); -}, "Default keyframe composite should be null"); - -test(function() { - assert_equals( - new KeyframeEffect({composite: "foo"}).getFrames()[0].composite, - null); - assert_equals( - new KeyframeEffect({composite: 42}).getFrames()[0].composite, - null); - assert_equals( - new KeyframeEffect({composite: "add"}).getFrames()[0].composite, - "add"); - assert_equals(new KeyframeEffect( - {composite: "replace"}).getFrames()[0].composite, - "replace"); -}, "Keyframes should only accept valid values for composite"); - -test(function() { - assert_equals(new KeyframeEffect({left: null}).getFrames()[0].left, - ""); -}, "Keyframe should handle null property values"); - -test(function() { - assert_equals( - typeof new KeyframeEffect({left: 42}).getFrames()[0].left, - "string"); - assert_equals(new KeyframeEffect({left: 42}).getFrames()[0].left, - "42"); - var obj = { toString: function() { return "toString() called"; } }; - assert_equals(new KeyframeEffect({left: obj}).getFrames()[0].left, - obj.toString()); -}, "Keyframe property values should be stringified"); - -timing_test(function() { - document.timeline.play(new Animation( - document.getElementById("anim2"), {left: null, top: ''}, 1)); - at(1.0, function() { - assert_styles("#anim2", {left: "100px"}); - assert_styles("#anim2", {top: "200px"}); - }); -}, "Invalid keyframe property values should be ignored"); - -test(function() { - var effect = new KeyframeEffect(keyframes); - effect.setFrames({top: "200px"}); - var frames = effect.getFrames(); - assert_equals(frames[0].left, undefined); - assert_equals(frames[0].top, "200px"); -}, "KeyframeEffect.setFrames() should replace exisiting keyframes"); - -timing_test(function() { - var animation = new Animation(document.getElementById("anim3"), keyframes, 1); - document.timeline.play(animation); - at(0.5, function() { - assert_styles("#anim3", {left: "250px"}); - animation.effect.setFrames([{left: "300px"}, {left: "400px"}]); - assert_styles("#anim3", {left: "350px"}); - }); -}, "KeyframeEffect.setFrames() should immediately update its target"); -timing_test(function() { - document.timeline.play(new Animation(document.getElementById("anim10"), [ - {left: "100px"}, - {left: "200px"}, - {left: "100px"}, - {left: "300px"}, - {left: "100px"}, - ], 1)); - at(0.0, function() { - assert_styles("#anim10", {left: "100px"}); - }); - at(0.25, function() { - assert_styles("#anim10", {left: "200px"}); - }); - at(0.5, function() { - assert_styles("#anim10", {left: "100px"}); - }); - at(0.75, function() { - assert_styles("#anim10", {left: "300px"}); - }); - at(1.0, function() { - assert_styles("#anim10", {left: "100px"}); - }); -}, "Keyframes should be distributed evenly between offsets 0 and 1"); - -timing_test(function() { - document.timeline.play(new Animation(document.getElementById("anim11"), [ - {left: "100px", offset: 0.0}, - {left: "200px", offset: 0.7}, - {left: "100px"}, - {left: "300px"}, - {left: "100px", offset: 1.0}, - ], 1)); - at(0.0, function() { - assert_styles("#anim11", {left: "100px"}); - }); - at(0.7, function() { - assert_styles("#anim11", {left: "200px"}); - }); - at(0.8, function() { - assert_styles("#anim11", {left: "100px"}); - }); - at(0.9, function() { - assert_styles("#anim11", {left: "300px"}); - }); - at(1.0, function() { - assert_styles("#anim11", {left: "100px"}); - }); -}, "Keyframes should be distributed evenly between keyframes with offsets"); - -</script> diff --git a/third_party/polymer/components/web-animations-js/test/testcases/test-keyframe-composite-operation.html b/third_party/polymer/components/web-animations-js/test/testcases/test-keyframe-composite-operation.html deleted file mode 100644 index de72771..0000000 --- a/third_party/polymer/components/web-animations-js/test/testcases/test-keyframe-composite-operation.html +++ /dev/null @@ -1,182 +0,0 @@ -<!-- -Copyright 2013 Google Inc. All Rights Reserved. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. ---> - -<!DOCTYPE html><meta charset="UTF-8"> -<style> -div#targets { - width: 100px; -} -div#targets div { - /* To allow zIndex to take effect. */ - position: relative; -} -</style> - -<div id="targets"></div> - -<script> -var expected_failures = [ - { - browser_configurations: [{ chrome: true }], - tests: ['Add-composite the neutral value onto a percent length type property with default value'], - message: 'getComputedStyle is broken under Chrome and this will return auto while the specification says it should return pixels. crbug.com/229280', - }, { - browser_configurations: [{ msie: true }], - tests: ['(Add|Replace)-composite a color type property at t=1ms'], - message: 'IE returns rbga values.', - }, { - browser_configurations: [{ msie: true }], - tests: [ - '(Add|Replace)-composite a shadow type property at t=1ms', - 'Add-composite the neutral value onto a shadow type property at t=0ms', - ], - message: 'IE returns different shadow format.', - }, { - browser_configurations: [{ msie: true }], - tests: ['Add-composite the neutral value onto a (percent length|shadow|transform) type property with default value at t=0ms'], - message: 'IE returns auto|none|none.', - } -]; -</script> -<script src="../bootstrap.js"></script> -<script> -"use strict"; - -// Sets up a 'to' animation which acts on a new element and tests for the -// expected value at the specified offset. -function testComposite(property, initialValue, composite, keyframeValue, offset, expectedValue, - message) { - var target = document.createElement('div'); - document.getElementById('targets').appendChild(target); - if (initialValue !== undefined && initialValue !== null) { - target.style[_WebAnimationsTestingUtilities._prefixProperty(property)] = initialValue; - } - var keyframes = {}; - keyframes[property] = keyframeValue; - keyframes.composite = composite; - timing_test(function() { - document.timeline.play(new Animation(target, keyframes, {duration: 1, fill: 'forwards'})); - at(offset, function() { - var styles = {}; - styles[property] = expectedValue; - assert_styles(target, styles); - }); - }, message); -} - -// Test replace composition. -testComposite('color', null, 'replace', 'red', 1.0, 'rgb(255, 0, 0)', - 'Replace-composite a color type property'); -testComposite('left', null, 'replace', '42px', 1.0, '42px', - 'Replace-composite a percent length type property with a number'); -testComposite('left', null, 'replace', '42%', 1.0, '42px', - 'Replace-composite a percent length type property with a percentage'); -testComposite('marginTop', null, 'replace', '42px', 1.0, '42px', - 'Replace-composite a length type property'); -testComposite('clip', null, 'replace', 'rect(1px, 2px, 3px, 4px)', 1.0, 'rect(1px 2px 3px 4px)', - 'Replace-composite a rectangle type property'); -testComposite('fontWeight', null, 'replace', 'bold', 1.0, 'bold', - 'Replace-composite a font weight type property with a number'); -testComposite('fontWeight', null, 'replace', 800, 1.0, 800, - 'Replace-composite a font weight type property with a keyword'); -testComposite('opacity', null, 'replace', 0.42, 1.0, 0.42, - 'Replace-composite a number type property'); -testComposite('zIndex', null, 'replace', 42, 1.0, 42, - 'Replace-composite an integer type property'); -testComposite('textShadow', null, 'replace', '1px 2px red', 1.0, 'rgb(255, 0, 0) 1px 2px 0px', - 'Replace-composite a shadow type property'); -testComposite('transform', null, 'replace', 'scale(42)', 1.0, 'matrix(42, 0, 0, 42, 0, 0)', - 'Replace-composite a transform type property'); -testComposite('visibility', null, 'replace', 'hidden', 1.0, 'hidden', - 'Replace-composite a visibility type property'); - -// Test add composition. -testComposite('color', null, 'add', 'red', 1.0, 'rgb(255, 0, 0)', - 'Add-composite a color type property'); -testComposite('left', null, 'add', '42px', 1.0, '42px', - 'Add-composite a percent length type property with a number'); -testComposite('left', null, 'add', '42%', 1.0, '42px', - 'Add-composite a percent length type property with a percentage'); -testComposite('marginTop', null, 'add', '42px', 1.0, '42px', - 'Add-composite a length type property'); -testComposite('clip', null, 'add', 'rect(1px, 2px, 3px, 4px)', 1.0, 'rect(1px 2px 3px 4px)', - 'Add-composite a rectangle type property'); -testComposite('fontWeight', null, 'add', 'bold', 1.0, 900, - 'Add-composite a font weight type property with a number'); -testComposite('fontWeight', null, 'add', 800, 1.0, 900, - 'Add-composite a font weight type property with a keyword'); -testComposite('opacity', null, 'add', -0.42, 1.0, 0.58, - 'Add-composite a number type property'); -testComposite('zIndex', null, 'add', 42, 1.0, 42, - 'Add-composite an integer type property'); -testComposite('textShadow', null, 'add', '1px 2px red', 1.0, 'rgb(255, 0, 0) 1px 2px 0px', - 'Add-composite a shadow type property'); -testComposite('transform', null, 'add', 'scale(42)', 1.0, 'matrix(42, 0, 0, 42, 0, 0)', - 'Add-composite a transform type property'); -testComposite('visibility', null, 'add', 'hidden', 1.0, 'hidden', - 'Add-composite a visibility type property'); - -// Test add composition with neutral value onto default value. -testComposite('color', null, null, null, 0.0, 'rgb(0, 0, 0)', - 'Add-composite the neutral value onto a color type property with default value'); -testComposite('left', null, null, null, 0.0, '0px', - 'Add-composite the neutral value onto a percent length type property with default value'); -testComposite('marginTop',null, null, null, 0.0, '0%', - 'Add-composite the neutral value onto a length type property with default value'); -testComposite('clip',null, null, null, 0.0, 'auto', - 'Add-composite the neutral value onto a rectangle type property with default value'); -testComposite('fontWeight',null, null, null, 0.0, 'normal', - 'Add-composite the neutral value onto a font weight type property with default value'); -testComposite('opacity',null, null, null, 0.0, 1.0, - 'Add-composite the neutral value onto a number type property with default value'); -testComposite('zIndex',null, null, null, 0.0, 'auto', - 'Add-composite the neutral value onto an integer type property with default value'); -testComposite('textShadow',null, null, null, 0.0, 'none', - 'Add-composite the neutral value onto a shadow type property with default value'); -testComposite('transform',null, null, null, 0.0, 'none', - 'Add-composite the neutral value onto a transform type property with default value'); -testComposite('visibility',null, null, null, 0.0, 'visible', - 'Add-composite the neutral value onto a visibility type property with default value'); - -// Test add composition with neutral value. -testComposite('color', 'blue', null, null, 0.0, 'rgb(0, 0, 255)', - 'Add-composite the neutral value onto a color type property'); -testComposite('left', '42px', null, null, 0.0, '42px', - 'Add-composite the neutral value onto a percent length type property with a number'); -testComposite('left', '42%', null, null, 0.0, '42px', - 'Add-composite the neutral value onto a percent length type property with a percentage'); -testComposite('marginTop', '42px', null, null, 0.0, '42px', - 'Add-composite the neutral value onto a length type property'); -testComposite('clip', 'rect(1px 2px 3px 4px)', null, null, 0.0, 'rect(1px 2px 3px 4px)', - 'Add-composite the neutral value onto a rectangle type property'); -testComposite('fontWeight', 300, null, null, 0.0, 300, - 'Add-composite the neutral value onto a font weight type property with a number'); -testComposite('fontWeight', 'bold', null, null, 0.0, 'bold', - 'Add-composite the neutral value onto a font weight type property with a keyword'); -testComposite('opacity', 0.42, null, null, 0.0, 0.42, - 'Add-composite the neutral value onto a number type property'); -testComposite('zIndex', 42, null, null, 0.0, 42, - 'Add-composite the neutral value onto an integer type property'); -testComposite('textShadow', '1px 2px red', null, null, 0.0, 'rgb(255, 0, 0) 1px 2px 0px', - 'Add-composite the neutral value onto a shadow type property'); -testComposite('transform', 'scale(42)', null, null, 0.0, 'matrix(42, 0, 0, 42, 0, 0)', - 'Add-composite the neutral value onto a transform type property (scale)'); -testComposite('transform', 'rotate(0deg)', null, null, 0.0, 'matrix(1, 0, 0, 1, 0, 0)', - 'Add-composite the neutral value onto a transform type property (rotate)'); -testComposite('visibility', 'hidden', null, null, 0.0, 'hidden', - 'Add-composite the neutral value onto a visibility type property'); - -</script> diff --git a/third_party/polymer/components/web-animations-js/test/testcases/test-null-target.html b/third_party/polymer/components/web-animations-js/test/testcases/test-null-target.html deleted file mode 100644 index a995487..0000000 --- a/third_party/polymer/components/web-animations-js/test/testcases/test-null-target.html +++ /dev/null @@ -1,66 +0,0 @@ -<!-- -Copyright 2012 Google Inc. All Rights Reserved. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. ---> - -<!DOCTYPE html><meta charset="UTF-8"> - -<style> - .anim { - position: absolute; - width: 50px; - height: 50px; - top: 0px; - left: 0px; - border-radius: 50%; - background-color: lightsteelblue; - } -</style> -<div class="anim" id="a"></div> -<script> -var expected_failures = [ - { - browser_configurations: [{ msie: true }], - tests: ['t=0.8s'], - message: 'Floating point issues.', - } -]; -</script> -<script src="../bootstrap.js"></script> -<script> - "use strict"; - var timing = {duration: 0.2, fill: 'forwards'}; - var across = new Animation(document.querySelector("#a"), {left: "450px"}, timing); - var pause1 = new Animation(null, {left: "500px"}, timing); - var pause2 = new Animation(null, null, timing); - var down = new Animation(document.querySelector("#a"), {top: "450px"}, timing); - var combo = new AnimationSequence([across, pause1, pause2, down]); - document.timeline.play(combo); - - timing_test(function() { - at(0.4, function() { - assert_equals(getComputedStyle(a).getPropertyValue("left"), "450px") - assert_equals(getComputedStyle(a).getPropertyValue("top"), "0px") - }); - }, "AnimationPlayer should do nothing for the duration of animations with null targets.") - - timing_test(function() { - at(0.8, function() { - assert_equals(getComputedStyle(a).getPropertyValue("left"), "450px") - assert_equals(getComputedStyle(a).getPropertyValue("top"), "450px") - }); - }, - "AnimationPlayer should do nothing for duration of animations with null targets, " + - "then continue with animations with real targets.") -</script> diff --git a/third_party/polymer/components/web-animations-js/test/testcases/test-pause-for-testing.html b/third_party/polymer/components/web-animations-js/test/testcases/test-pause-for-testing.html deleted file mode 100644 index 917bb5a..0000000 --- a/third_party/polymer/components/web-animations-js/test/testcases/test-pause-for-testing.html +++ /dev/null @@ -1,52 +0,0 @@ -<!-- -Copyright 2013 Google Inc. All Rights Reserved. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. ---> - -<!DOCTYPE html><meta charset="UTF-8"> - -<style> -.anim { - position: absolute; - width: 50px; - height: 50px; - top: 0px; - border-radius: 50%; -} -</style> -<div class='anim' id='a' style='left: 0px; background-color: lightsteelblue'></div> -<div class='anim' id='b' style='left: 450px; background-color: red'></div> -<script src='../bootstrap.js'></script> -<script> -'use strict'; -var downRed = new AnimationGroup( - [new Animation(document.querySelector('#a'), {top: '600px'}, 4)]); -var downBlue = new AnimationGroup( - [new Animation(document.querySelector('#b'), {top: '600px'}, 4)], - {delay: 1}); -document.timeline.play(downRed); -document.timeline.play(downBlue); -document.timeline._pauseAnimationsForTesting(2); - -timing_test(function() { - at(0, function() { - assert_styles('#a', {'top':'300px'}) - assert_styles('#b', {'top':'150px'}) - }); - at(12, function() { - assert_styles('#a', {'top':'300px'}) - assert_styles('#b', {'top':'150px'}) - }); -}, 'Pausing all animations should work when players have different start delays.') -</script> diff --git a/third_party/polymer/components/web-animations-js/test/testcases/test-player-addeventlistener.html b/third_party/polymer/components/web-animations-js/test/testcases/test-player-addeventlistener.html deleted file mode 100644 index 36424e1..0000000 --- a/third_party/polymer/components/web-animations-js/test/testcases/test-player-addeventlistener.html +++ /dev/null @@ -1,161 +0,0 @@ -<!-- -Copyright 2014 Google Inc. All Rights Reserved. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. ---> - -<!DOCTYPE html><meta charset="UTF-8"> -<style> -#target { - position: absolute; - left: 0px; - top: 0px; - width: 100px; - height: 100px; - background-color: green; -} -</style> -<div id="target"></div> -<script src="../bootstrap.js"></script> -<script> -'use strict'; - -function createPlayer() { - return target.animate({ left: '100px' }, { - iterations: 2, - duration: 0.25, - }); -} - -var player; - -player = createPlayer(); -var singleEventHandler = false; -player.addEventListener('finish', function() { singleEventHandler = true; }) -var testA = async_test('Check finish event with single handler'); -player.addEventListener('finish', function() { - testA.step(function() { assert_true(singleEventHandler); }); - testA.done(); -}); - -player = createPlayer(); -var eventHandlingCount = 0; -var addMultipleTimes = function() { eventHandlingCount++; }; -player.addEventListener('finish', addMultipleTimes); -player.addEventListener('finish', addMultipleTimes); -var testB = async_test('Check finish event with single handler added multiple times'); -player.addEventListener('finish', function() { - testB.step(function() { assert_equals(eventHandlingCount, 1); }); - testB.done(); -}); - -player = createPlayer(); -var multiEventHandlerA = false; -var multiEventHandlerB = false; -var multiEventHandlerC = false; -player.addEventListener('finish', function() { multiEventHandlerA = true; }) -player.addEventListener('finish', function() { multiEventHandlerB = true; }) -player.addEventListener('finish', function() { multiEventHandlerC = true; }) -var testC = async_test('Check finish event with multiple handlers'); -player.addEventListener('finish', function() { - testC.step(function() { assert_true(multiEventHandlerA && multiEventHandlerB && multiEventHandlerC); }); - testC.done(); -}); - -player = createPlayer(); -var retainEventHandler = false; -player.addEventListener('finish', function() { retainEventHandler = true; }); -var removeEventHandler = true; -var eventHandlerToRemove = function() { removeEventHandler = false; } -player.addEventListener('finish', eventHandlerToRemove); -player.removeEventListener('finish', eventHandlerToRemove); -var testD = async_test('Check finish event with event handler removed'); -player.addEventListener('finish', function() { - testD.step(function() { assert_true(retainEventHandler && removeEventHandler); }); - testD.done(); -}); - -player = createPlayer(); -var onEventHandler = false; -player.onfinish = function() { onEventHandler = true; }; -var testE = async_test('Check onfinish handler'); -player.addEventListener('finish', function() { - testE.step(function() { assert_true(onEventHandler); }); - testE.done(); -}); - -player = createPlayer(); -var clearOnEventHandler = true; -player.onfinish = function() { clearOnEventHandler = false; }; -player.onfinish = null; -var testF = async_test('Check clearing onfinish handler'); -player.addEventListener('finish', function() { - testF.step(function() { assert_true(clearOnEventHandler); }); - testF.done(); -}); - -player = createPlayer(); -var onEventOrdering = ''; -player.addEventListener('finish', function() { onEventOrdering += 'a'; }); -player.onfinish = function() { onEventOrdering += '!'; }; -player.addEventListener('finish', function() { onEventOrdering += 'b'; }); -player.onfinish = function() { onEventOrdering += 'c'; }; -player.addEventListener('finish', function() { onEventOrdering += 'd'; }); -var testG = async_test('Check onfinish handler ordering and overriding'); -player.addEventListener('finish', function() { - testG.step(function() { assert_equals(onEventOrdering, 'abcd'); }); - testG.done(); -}); - -player = createPlayer(); -var onEventOrderingAfterRemoval = ''; -var eventHandlerToRemoveA = function() { onEventOrderingAfterRemoval += '!'; }; -var eventHandlerToRemoveB = function() { onEventOrderingAfterRemoval += '!!'; }; -player.addEventListener('finish', function() { onEventOrderingAfterRemoval += 'a'; }); -player.addEventListener('finish', eventHandlerToRemoveA); -player.onfinish = function() { onEventOrderingAfterRemoval += 'b'; }; -player.addEventListener('finish', function() { onEventOrderingAfterRemoval += 'c'; }); -player.addEventListener('finish', eventHandlerToRemoveB); -player.removeEventListener('finish', eventHandlerToRemoveA); -player.removeEventListener('finish', eventHandlerToRemoveB); -var testH = async_test('Check onfinish handler ordering after removal'); -player.addEventListener('finish', function() { - testH.step(function() { assert_equals(onEventOrderingAfterRemoval, 'abc'); }); - testH.done(); -}); - -player = createPlayer(); -var onEventDuplication = 0; -var duplicateFunctionA = function() { onEventDuplication += 1; }; -player.addEventListener('finish', duplicateFunctionA); -player.onfinish = duplicateFunctionA; -var testI = async_test('Check onfinish handler duplication'); -player.addEventListener('finish', function() { - testI.step(function() { assert_equals(onEventDuplication, 2); }); - testI.done(); -}); - -player = createPlayer(); -var eventDuplication = 0; -var duplicateFunctionB = function() { eventDuplication += 1; }; -player.addEventListener('finish', duplicateFunctionB); -player.addEventListener('finish', duplicateFunctionB); -var testJ = async_test('Check finish event handler duplication'); -player.addEventListener('finish', function() { - testJ.step(function() { assert_equals(eventDuplication, 1); }); - testJ.done(); -}); - -timing_test(function() { at(1, function(){}); }, 'Force testharness to execute to 1 second.'); - -</script> diff --git a/third_party/polymer/components/web-animations-js/test/testcases/test-player-cleanup.html b/third_party/polymer/components/web-animations-js/test/testcases/test-player-cleanup.html deleted file mode 100644 index 653003d..0000000 --- a/third_party/polymer/components/web-animations-js/test/testcases/test-player-cleanup.html +++ /dev/null @@ -1,79 +0,0 @@ -<!-- -Copyright 2013 Google Inc. All Rights Reserved. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. ---> -<!DOCTYPE html><meta charset="UTF-8"> -<div id='anim'></div> -<script> -var expected_failures = [ - { - browser_configurations: [{ msie: true }], - tests: ['t=(3|5)s'], - message: 'IE returns rgba.', - } -]; -</script> -<script src="../bootstrap.js"></script> -<script> -"use strict"; - - -document.timeline.play(new Animation(null, {}, - {duration: 1, fill: 'forwards'})); -document.timeline.play(new Animation(null, {}, - {duration: 1, fill: 'none'})); -var player = document.timeline.play(new Animation(anim, - [{backgroundColor: 'red'}, {backgroundColor: 'white'}], - {duration: 1, fill: 'none'})); - -timing_test(function() { - at(0.5, function() { - assert_equals(document.timeline.getCurrentPlayers().length, 3, - "All animations current"); - assert_equals(_WebAnimationsTestingUtilities._knownPlayers.length, 3, - "All animations known"); - }); - at(2, function() { - assert_equals(document.timeline.getCurrentPlayers().length, 0, - "No animations current"); - assert_equals(_WebAnimationsTestingUtilities._knownPlayers.length, 1, - "Only animations with forward fill known"); - }); - at(3, function() { - player.currentTime = 0; - assert_equals(document.timeline.getCurrentPlayers().length, 1, - "Only restarted animation current"); - assert_equals(_WebAnimationsTestingUtilities._knownPlayers.length, 2, - "Restarted and forward filling animations known"); - assert_styles('#anim', [{"backgroundColor": 'rgb(255, 0, 0)'}], - "takes effect immediately"); - }); - at(3.5, function() { - assert_equals(document.timeline.getCurrentPlayers().length, 1, - "Only restarted animation current"); - assert_equals(_WebAnimationsTestingUtilities._knownPlayers.length, 2, - "Restarted and forward filling animations known"); - }) - - at(5, function() { - player.source.timing.duration = 4; - assert_equals(document.timeline.getCurrentPlayers().length, 1, - "Only restarted animation current"); - assert_equals(_WebAnimationsTestingUtilities._knownPlayers.length, 2, - "Restarted and forward filling animations known"); - assert_styles('#anim', [{"backgroundColor": 'rgb(255, 64, 64)'}], - "takes effect immediately"); - }); -}); -</script> diff --git a/third_party/polymer/components/web-animations-js/test/testcases/test-player-finish-event.html b/third_party/polymer/components/web-animations-js/test/testcases/test-player-finish-event.html deleted file mode 100644 index f8d646e..0000000 --- a/third_party/polymer/components/web-animations-js/test/testcases/test-player-finish-event.html +++ /dev/null @@ -1,101 +0,0 @@ -<!-- -Copyright 2014 Google Inc. All Rights Reserved. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. ---> - -<!DOCTYPE html><meta charset="UTF-8"> -<script src="../bootstrap.js"></script> -<script> -'use strict'; - -function createPlayer() { - return document.timeline.play(new Animation(null, null, 200)); -} - -function assertFinishEvents(description, player, expectedEvents) { - var i = 0; - - expectedEvents.forEach(function (expectedEvent, expectedIndex) { - var asyncTestHandle = async_test(description + ', t=' + expectedEvent.timelineTime); - // Testharness quirk: async_test won't time out if step is never called. - at(expectedEvent.timelineTime, function() {asyncTestHandle.step(function() {});}); - player.addEventListener('finish', function(event) { - if (i === expectedIndex) { - asyncTestHandle.step(function() { - assert_equals(event.currentTime, expectedEvent.currentTime, 'event.currentTime'); - assert_equals(event.timelineTime, expectedEvent.timelineTime, 'event.timelineTime'); - assert_equals(event.target, player, 'event.target'); - assert_approx_equals(document.timeline.currentTime, expectedEvent.timelineTime, 50, 'timeline.currentTime'); - }); - asyncTestHandle.done(); - } - }); - }); - - player.addEventListener('finish', function(event) { - if (i >= expectedEvents.length) { - test(function() {assert_true(false);}, 'More than ' + expectedEvents.length + ' events fired for test "' + description + '"'); - } - i++; - }); -} - -var player; - -player = createPlayer(); -assertFinishEvents('Players should fire finished events when they complete', player, [ - {timelineTime: 200, currentTime: 200}, -]); - -player = createPlayer(); -player.source = null; -assertFinishEvents('A player with no source should report finished on the next sample', player, [ - {timelineTime: 0, currentTime: 0}, -]); - -player = createPlayer(); -player.currentTime = 200; -assertFinishEvents('Jumping to the end of a player\'s animation should fire the finish event', player, [ - {timelineTime: 0, currentTime: 200}, -]); - -player = createPlayer(); -player.currentTime = 200; -player.currentTime = 1; -player.currentTime = 200; -assertFinishEvents('Jumping to the end of a player\'s animation twice should fire the finish event once', player, [ - {timelineTime: 0, currentTime: 200}, -]); - -var jumpingPlayer = createPlayer(); -jumpingPlayer.currentTime = 200; -at(100, function() {jumpingPlayer.currentTime = 100;}); -at(200, function() {jumpingPlayer.currentTime = 200;}); -assertFinishEvents('Jumping to the end of a player\'s animation twice on different frames should fire the finish event twice', jumpingPlayer, [ - {timelineTime: 0, currentTime: 200}, - {timelineTime: 200, currentTime: 200}, -]); - -var reversedPlayer = createPlayer(); -reversedPlayer.currentTime = 100; -reversedPlayer.reverse(); -assertFinishEvents('Reversed players should fire finish events when they reach the start of their animation', reversedPlayer, [ - {timelineTime: 100, currentTime: 0}, -]); - -// Force the test harness to sample periodically. -for (var t = 0; t < 500; t += 100) { - at(t, function() {}); -} -</script> diff --git a/third_party/polymer/components/web-animations-js/test/testcases/test-player-sort.html b/third_party/polymer/components/web-animations-js/test/testcases/test-player-sort.html deleted file mode 100644 index bdf596d..0000000 --- a/third_party/polymer/components/web-animations-js/test/testcases/test-player-sort.html +++ /dev/null @@ -1,48 +0,0 @@ -<!-- -Copyright 2013 Google Inc. All Rights Reserved. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. ---> - -<!DOCTYPE html><meta charset="UTF-8"> - -<script src="../bootstrap.js"></script> -<script> -"use strict"; - -var globalVar = 0; -var incGlobalVar = function() { - globalVar += 1; -} -var failed = false; - -for (var i = 0; i < 100; i++) { - document.timeline.play(new Animation(null, incGlobalVar, 1)); -} - -document.timeline.play(new Animation(null, function() { - if (globalVar !== 100) { - failed = true; - } - globalVar = 0; -}, 1)); - -// ensure at least one point is sampled -at(0, function() { }); - -timing_test(function() { - at(1, function() { assert_true(!failed); }); - }, - "the 101st animation should always come 101st"); - -</script> diff --git a/third_party/polymer/components/web-animations-js/test/testcases/test-player.html b/third_party/polymer/components/web-animations-js/test/testcases/test-player.html deleted file mode 100644 index 7254669..0000000 --- a/third_party/polymer/components/web-animations-js/test/testcases/test-player.html +++ /dev/null @@ -1,786 +0,0 @@ -<!-- -Copyright 2013 Google Inc. All Rights Reserved. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. - -Written by Steph McArthur ---> - -<!DOCTYPE html><meta charset="UTF-8"> -<div id="anim"></div> - -<script src="../bootstrap.js"></script> -<script> -var animation = new Animation(anim, {left: "100px"}, 100); -var dt = document.timeline; - -// Test AnimationPlayer.timeline. -var player1 = dt.play(animation); -test(function() {assert_equals(player1.timeline, document.timeline)}, - "AnimationPlayer.timeline is document timeline"); - -// Test that TimedItem.player and AnimationPlayer.source are consistent. -test(function() {assert_equals(player1.source, animation)}, - "AnimationPlayer.source should be the Animation"); -test(function() {assert_equals(animation.player, player1)}, - "TimedItem.player should be the AnimationPlayer"); - -// Test that play() always returns a new AnimationPlayer. -var player2 = dt.play(animation); -test(function() {assert_not_equals(player2, player1)}, - "Repeated calls to play() should create a new AnimationPlayer"); -test(function() {assert_equals(animation.player, player2)}, - "Repeated play(): TimedItem.player should be the AnimationPlayer"); -test(function() {assert_equals(player2.source, animation)}, - "Repeated play(): AnimationPlayer.source should be the Animation"); -test(function() {assert_equals(player2.startTime, player1.startTime)}, - "Repeated play(): Players should have same start time"); - -// Test explicit setting of AnimationPlayer.source. -player1.source = animation; -test(function() {assert_equals(player2.source, null)}, - "Set AnimationPlayer.source: Old source should be null"); -test(function() {assert_equals(player1.source, animation)}, - "Set AnimationPlayer.source: New source should be the Animation"); -test(function() {assert_equals(animation.player, player1)}, - "Set AnimationPlayer.source: TimedItem.player should be the AnimationPlayer"); - -// Test that TimedItem.player gives null on a detached tree. -var animation2 = - new Animation(document.getElementById("anim"), {left: "100px"}); -var animationGroup = new AnimationGroup([animation2]); -test(function() {assert_equals(animationGroup.player, null)}, - "TimedItem.player should be null for root"); -test(function() {assert_equals(animation2.player, null)}, - "TimedItem.player should be null for leaf"); - -// Test that TimedItem.player remotes to the root of the tree. -var player3 = dt.play(animationGroup); -test(function() {assert_equals(animation2.player, player3)}, - "TimedItem.player should remote"); - -// Test that calling play() on a TimedItem with a parent results in -// reparenting. -var player4 = dt.play(animation2); -test(function() {assert_equals(animation2.parent, null)}, - "Animation should be reparented"); -test(function() {assert_equals(animationGroup.children.length, 0)}, - "Animation parent should be updated, leaving animationGroup.children.length = 0"); -test(function() {assert_equals(player4.source, animation2)}, - "AnimationPlayer should use reparented animation"); - -// Test that setting a parent on a TimedItem with an AnimationPlayer causes the -// player to be disconnected. -animationGroup.append(animation2); -test(function() {assert_equals(animationGroup.player, player3)}, - "TimedItem.player should be updated for root"); -test(function() {assert_equals(animation2.player, player3)}, - "TimedItem.player should be updated for leaf"); -test(function() {assert_equals(player4.source, null)}, - "AnimationPlayer.source should be updated"); -test(function() {assert_equals(animation2.parent, animationGroup)}, - "Animation.parent should be updated"); -test(function() {assert_equals(animationGroup.children.length, 1)}, - "Animation parent should be updated, leaving animationGroup.children.length = 1"); -test(function() {assert_equals(animationGroup.children[0], animation2)}, - "Animation parent should be updated"); - -// Test that currentTime is zero before timeline starts. -test(function() {assert_equals(document.timeline.play(animation).currentTime, 0)}, - "currentTime should be zero before Timeline starts"); - -// Test that startTime is zero before timeline starts. -test(function() {assert_equals(document.timeline.play(animation).startTime, 0)}, - "startTime should be zero before Timeline starts"); - -// Test that setting currentTime has an effect before the timeline starts. -var player5 = dt.play(animation); -player5.currentTime = 42; -test(function() {assert_equals(player5.currentTime, 42)}, - "player5 can be seeked before timeline starts"); -timing_test(function() { - at(0.1, function() { - assert_equals(player5.currentTime, 42.1); - }); - }, "player5's updates to currentTime should persist after Timeline starts"); - -// Test that setting startTime has an effect before the timeline starts. -var player6 = dt.play(animation.clone()); -player6.startTime = 42; -test(function() {assert_equals(player6.currentTime, -42)}, - "player6's currentTime should always be zero before Timeline starts"); - -// Test that an AnimationPlayer's TimedItem gets a null inherited time until the -// timeline starts. -var animation1 = new Animation(document.getElementById("anim"), {left: "100px"}); -dt.play(animation1); -test(function() {assert_equals(animation1.localTime, null)}, - "TimedItem's inherited time, and thus " + - "localTime should be null before Timeline starts"); -timing_test(function() { - at(0.0, function() {assert_not_equals(animation1.localTime, null)}); - }, "TimedItem's inherited time " + - "and thus localTime should not be null after Timeline starts"); - -// Test that TimedItem is updated immediately on calling Timeline.play() after -// the timeline starts. -var animation4 = new Animation( - document.getElementById("anim"), {left: "100px"}); -test(function() {assert_equals(animation4.localTime, null)}, - "localTime should be null before playing"); -timing_test(function() { - at(0.0, function() { - document.timeline.play(animation4); - assert_equals(animation4.localTime, 0) - }); - }, "localTime should be set by playing"); - -// Test that updates to currentTime take immediate effect. -timing_test(function() { - at(0.0, function() { - var animation5 = new Animation( - document.getElementById("anim"), {left: "100px"}, 100); - document.timeline.play(animation5).currentTime = 42; - assert_equals(animation5.localTime, 42); - }); - }, "Updates to AnimationPlayer.currentTime should take immediate effect"); - -// Test that updates to source take immediate effect. -timing_test(function() { - at(0.0, function() { - var player = document.timeline.play(new Animation( - document.getElementById("anim"), {left: "100px"})); - var animation7 = new Animation( - document.getElementById("anim"), {left: "100px"}); - player.source = animation7; - assert_equals(animation7.localTime, 0); - }); - }, "Updates to AnimationPlayer.source should take immediate effect"); - -function createPlayer(duration) { - return document.timeline.play(new Animation(null, null, duration)); -} - -// Tests the initial values of the AnimationPlayer API. -timing_test(function() { - at(0, function() { - var anim = new Animation(null, null, 3); - assert_equals(anim.player, null, "player should be null initially"); - - // Check state after playing - document.timeline.play(anim); - assert_not_equals(anim.player, null, "player should be not be null when playing"); - assert_equals(anim.player.source, anim, "Initial source content"); - assert_equals(anim.player.timeline, document.timeline, "Initial document timeline"); - assert_equals(anim.player.startTime, document.timeline.currentTime, "Initial start time"); - assert_equals(anim.player.currentTime, 0, "Initial current time"); - assert_equals(anim.player.timeLag, 0, "Initial time lag"); - assert_equals(anim.player.playbackRate, 1, "Initial playback rate"); - assert_false(anim.player.paused, "Initial paused state"); - assert_false(anim.player.finished, "Initial finished state"); - }); - }, "Initial state"); - -// Test paused states after pausing. -test(function() { - var player = createPlayer(3); - - // Pause - player.pause(); - assert_true(player.paused, "Paused state after pausing"); - assert_false(player.finished, "Finished state after pausing"); - - // Unpause - player.play(); - assert_false(player.paused, "Paused state after unpausing"); - assert_false(player.finished, "Finished state after unpausing"); - }, "Pause"); - -// Test seeking behind startTime for a forwards player. -timing_test(function() { - var player = createPlayer(3); - - // Seek before start - player.currentTime = -0.1; - assert_equals(player.currentTime, -0.1, "Current time after seeking before start"); - assert_false(player.paused, "Paused state after seeking before start"); - assert_false(player.finished, "Finished state after seeking before start"); - - // Check player does progress - at(0.2, function() { - assert_equals(player.currentTime, 0.1, "Current time should progress"); - }); - }, "Seek behind content (forwards)"); - -// Test players do not get bounded after updating startTime such that they are before the start time. -timing_test(function() { - var player = createPlayer(3); - - // Set start time in the future - player.startTime = 0.1; - - // Check state of player - assert_equals(player.currentTime, -0.1, "Current time while waiting to start"); - assert_false(player.paused, "Paused state while waiting to start"); - assert_false(player.finished, "Finished state while waiting to start"); - - // Check player starts automatically - at(0.2, function() { - assert_equals(player.currentTime, 0.1, "Current time should progress"); - assert_false(player.paused, "Paused state after starting"); - assert_false(player.finished, "Finished state after starting"); - }); - }, "No bounding at start"); - -// Test players get bounded when they finish their source content. -timing_test(function() { - var player = createPlayer(3); - - // Seek to just before end - player.currentTime = 2.9; - - // Check state of player - assert_equals(player.currentTime, 2.9, "Current time just before end"); - assert_false(player.paused, "Paused state just before end"); - assert_false(player.finished, "Finished state just before end"); - - // Check player after finishing - at(0.2, function() { - assert_equals(player.currentTime, 3.0, "Current time when bounded progress"); - assert_false(player.paused, "Paused state after ending"); - assert_true(player.finished, "Finished state after ending"); - }); - }, "Limiting at end (seek with current time)"); - -// Test players get bounded when they finish their source content after altering start time. -timing_test(function() { - var player = createPlayer(3); - - // Seek to just before end using the start time - player.startTime -= 2.9; - - // Check state of player - assert_equals(player.currentTime, 2.9, "Current time just before end"); - assert_false(player.paused, "Paused state just before end"); - assert_false(player.finished, "Finished state just before end"); - - // Check player after finishing - at(0.2, function() { - assert_equals(player.currentTime, 3.0, "Current time when bounded progress"); - assert_false(player.paused, "Paused state after ending"); - assert_true(player.finished, "Finished state after ending"); - }); - }, "Limiting at end (seek with start time)"); - -// Test reversing a player prior to starting doesn't snap the current time to the beginning. -timing_test(function() { - var player = createPlayer(3); - - // Seek before start - player.currentTime = -0.1; - - // Check state - assert_equals(player.currentTime, -0.1, "Current time before reversing"); - assert_false(player.finished, "Finished state before reversing"); - - // Reverse - player.reverse(); - assert_equals(player.currentTime, -0.1, "Current time after reversing"); - assert_true(player.finished, "Finished state after reversing"); - assert_equals(player.playbackRate, -1, "Playback rate after reversing"); - - // Check player after some time - at(0.2, function() { - assert_equals(player.currentTime, -0.1, "Current time later"); - assert_true(player.finished, "Finished state later"); - }); - }, "reverse() before start"); - -// Test reversing a player at the start causes the player to become bounded. -timing_test(function() { - var player = createPlayer(3); - - // Reverse - player.reverse(); - assert_equals(player.currentTime, 0, "Current time after reversing"); - assert_true(player.finished, "Finished state after reversing"); - assert_equals(player.playbackRate, -1, "Playback rate after reversing"); - - // Check player after some time - at(0.2, function() { - assert_equals(player.currentTime, 0, "Current time later"); - assert_true(player.finished, "Finished state later"); - }); - }, "reverse() at start"); - -// Test reversing a player halfway through an animation. -timing_test(function() { - var player = createPlayer(3); - - // Seek midway - player.currentTime = 1.5; - - // Reverse - player.reverse(); - assert_equals(player.currentTime, 1.5, "Current time after reversing"); - assert_false(player.finished, "Finished state after reversing"); - assert_equals(player.playbackRate, -1, "Playback rate after reversing"); - - // Check player after some time - at(0.2, function() { - assert_equals(player.currentTime, 1.3, "Current time when reversing"); - assert_false(player.finished, "Finished state later"); - }); - }, "reverse() while playing"); - -// Test reversing a player that has ended starts playing backwards. -timing_test(function() { - var player = createPlayer(3); - - // Seek to just before the end - player.currentTime = 2.9; - - // Wait to finish - at(0.2, function() { - assert_equals(player.currentTime, 3.0, "Current time when finished"); - assert_true(player.finished, "Finished state after finished"); - - // Reverse - player.reverse(); - assert_equals(player.currentTime, 3.0, "Current time after reversing"); - assert_false(player.finished, "Finished state after reversing"); - assert_equals(player.playbackRate, -1, "Playback rate after reversing"); - - // Check we actually reverse - at(0.2, function() { - assert_equals(player.currentTime, 2.8, "Current time after beginning reverse"); - assert_false(player.finished, "Finished state after reversing"); - }); - }); - }, "reverse() when finished"); - -// Test reversing a player seeked past the end will snap back to the end. -timing_test(function() { - var player = createPlayer(3); - - // Seek to past the end - player.currentTime = 4.0 - - player.reverse(); - assert_equals(player.currentTime, 3.0, "Current time after reversing"); - assert_false(player.finished, "Finished state after reversing"); - assert_equals(player.playbackRate, -1, "Playback rate after reversing"); - - // Check we actually reverse - at(0.2, function() { - assert_equals(player.currentTime, 2.8, "Current time after beginning reverse"); - assert_false(player.finished, "Finished state after reversing"); - }); - }, "reverse() when seeked past end"); - -// Test player current time after adjusting start time. -test(function() { - var player = createPlayer(3); - - player.startTime = 1; - - assert_equals(player.currentTime, -1, "currentTime while waiting to start"); - assert_false(player.finished, "Finished state while waiting to start"); - - // Then put it in range - player.startTime -= 2; - assert_equals(player.currentTime, 1, "currentTime after updating start time"); - assert_false(player.finished, "Finished state while after updating start time"); - }, "Adjust start time (1)"); - -// Test player current time after adjusting start time and playing. -timing_test(function() { - var player = createPlayer(3); - - player.startTime = 1; - - assert_equals(player.currentTime, -1, "currentTime while waiting to start"); - assert_false(player.finished, "Finished state while waiting to start"); - - // Then adjust start time - player.startTime -= 0.75; - - // Check player is still waiting - assert_equals(player.currentTime, -0.25, "currentTime while waiting to start"); - assert_false(player.finished, "Finished state while still waiting to start"); - - // Verify the time *did* update though - at(0.5, function() { - assert_equals(player.currentTime, 0.25, "currentTime after starting to play"); - assert_false(player.finished, "Finished state after starting to play"); - }); - }, "Adjust start time (2)"); - -// Test player bounding by changing start time. -test(function() { - var player = createPlayer(3); - - // Put it past the end - player.startTime = -4; - assert_equals(player.currentTime, 3, "currentTime after end"); - assert_true(player.finished, "Finished state after end"); - }, "Adjust start time (3)"); - -// Test bounding and unbounding a player by modifying start time. -test(function() { - var player = createPlayer(3); - - // Put player in limited stage - player.startTime = -4; - - assert_equals(player.currentTime, 3, "currentTime state while limited"); - assert_true(player.finished, "Finished state while limited"); - - // Then put it in range - player.startTime += 2; - assert_equals(player.currentTime, 2, "currentTime after updating start time"); - assert_false(player.finished, "Finished state while after updating start time"); - }, "Adjust start time (4)"); - -// Test seeking past end of player. -timing_test(function() { - var player = createPlayer(3); - player.currentTime = 4; - assert_equals(player.currentTime, 4, "currentTime before waiting"); - at(0.2, function() { - assert_equals(player.currentTime, 4, "currentTime after waiting"); - }); - }, "Seeking past player content end and waiting"); - -// Test seeking before start of reversed player. -timing_test(function() { - var player = createPlayer(3); - player.playbackRate = -1; - player.currentTime = -1; - assert_equals(player.currentTime, -1, "currentTime before waiting"); - at(0.2, function() { - assert_equals(player.currentTime, -1, "currentTime after waiting"); - }); - }, "Seeking before reversed player content start and waiting"); - -// Test reversing the playback rate of a bounded player. -timing_test(function() { - var player = createPlayer(3); - - // Set up player to start in 0.1s - player.startTime = 0.1; - - // Check state - assert_equals(player.currentTime, -0.1, "currentTime after while waiting to start"); - assert_false(player.finished, "Finished state while waiting to start"); - - // Reverse playbackRate - player.playbackRate = -1; - - // We should maintain the same current time - assert_equals(player.currentTime, -0.1, "currentTime after updating playbackRate"); - assert_true(player.finished, "Finished state after updating playbackRate"); - - // If we wait a while we should be stuck at the end - at(0.2, function() { - assert_equals(player.currentTime, -0.1, "currentTime after waiting"); - assert_true(player.finished, "Finished state after waiting"); - - // Call play and we should start from the end - player.play(); - assert_equals(player.currentTime, 3, "currentTime after play()"); - assert_false(player.finished, "Finished state after play()"); - }); - }, "Reversing playbackRate before start"); - -// Test normal current time progression of a player after being bounded and unbounded. -timing_test(function() { - // Set up player - var player = createPlayer(3); - - // Seek to bounded time - player.currentTime = 4; - - // Check state - assert_equals(player.currentTime, 4, "currentTime while bounded"); - assert_true(player.finished, "Finished state while bounded"); - - // Seek to unbounded time - player.currentTime = 2; - assert_equals(player.currentTime, 2, "currentTime while unbounded"); - assert_false(player.finished, "Finished state while unbounded"); - - // Check it actually is playing - at(0.2, function() { - assert_equals(player.currentTime, 2.2, "Current time after playing unbounded"); - }); - }, "Seeking from end to playing"); - -// Test finishing and replaying a player in reverse. -timing_test(function() { - // Set up player - var player = createPlayer(3); - - // Seek to middle of interval and reverse - player.currentTime = 2; - player.reverse(); - - // Check state - assert_equals(player.currentTime, 2, "currentTime after reversing"); - assert_false(player.finished, "Finished state after reversing"); - assert_equals(player.playbackRate, -1, "Playback rate after reversing"); - player.finish(); - assert_equals(player.currentTime, 0, "currentTime after finishing"); - assert_true(player.finished, "Finished state after finishing"); - - // Then play again - player.play(); - assert_equals(player.currentTime, 3, "currentTime after playing again"); - assert_false(player.finished, "Finished state after playing again"); - - // Check if actually progresses - at(0.2, function() { - assert_equals(player.currentTime, 2.8, "Current time after playing for a while"); - }); - }, "play() on a finished reversed player"); - -// Test player.play() seeking to start when behind the source content. -timing_test(function() { - // Set up player to start in 2s - var player = createPlayer(3); - player.startTime = 2; - - // Check it is waiting to start - assert_equals(player.currentTime, -2, "currentTime while waiting"); - assert_false(player.finished, "Finished state while waiting"); - - // Call play() - player.play(); - assert_equals(player.currentTime, 0, "currentTime after calling play()"); - assert_false(player.finished, "Finished state after calling play()"); - - // Check it really is playing - at(0.5, function() { - assert_equals(player.currentTime, 0.5, "Current time after playing for a while"); - }); - }, "play() on player waiting to start kick-starts it"); - -// Test seeking a player to the start of its animation. -timing_test(function() { - // Set up player to start in 2s - var player = createPlayer(3); - player.startTime = 2; - - // Check it is waiting to start - assert_equals(player.currentTime, -2, "currentTime while waiting"); - assert_false(player.finished, "Finished state while waiting"); - - // Set currentTime = 0 - player.currentTime = 0; - assert_equals(player.currentTime, 0, "currentTime after setting currentTime = 0"); - assert_false(player.finished, "Finished state after setting currentTime = 0"); - - // Check it is playing - at(0.5, function() { - assert_equals(player.currentTime, 0.5, "currentTime after waiting a while"); - assert_false(player.finished, "Finished state after waiting a while"); - }); - }, "currentTime = 0 on player waiting to start is ok"); - -// Test player becoming unbounded after source content is extended. -timing_test(function() { - var player = createPlayer(3); - - player.currentTime = 4; - assert_equals(player.currentTime, 4, "currentTime after setting currentTime = 4"); - assert_true(player.finished, "Finished state after setting currentTime = 4"); - - // Check it is NOT playing - at(0.2, function() { - assert_equals(player.currentTime, 4, "currentTime after waiting a while"); - - // Extend source - player.source.timing.duration = 5; - assert_equals(player.currentTime, 4, "currentTime after extending source"); - assert_false(player.finished, "Finished state after extending source"); - - // Check it IS playing - at(0.2, function() { - assert_equals(player.currentTime, 4.2, "currentTime after waiting a while again"); - }); - }); - }, "Extending source unblocks player (seek past end)"); - -// Test player ending normally and becoming unbounded after source content is extended. -timing_test(function() { - var player = createPlayer(3); - - // Set currentTime to just before the end - player.currentTime = 2.9; - assert_false(player.finished, "Finished state just before ending"); - - // Play to end - at(0.2, function() { - assert_equals(player.currentTime, 3, "currentTime after ending normally"); - assert_true(player.finished, "Finished state after ending normally"); - - // Extend source - player.source.timing.duration = 5; - assert_equals(player.currentTime, 3.0, "currentTime after extending source"); - assert_false(player.finished, "Finished state after extending source"); - - // Check it is playing - at(0.2, function() { - assert_equals(player.currentTime, 3.2, "currentTime after waiting a while again"); - }); - }); - }, "Extending source unblocks player (end normally)"); - -// Test player becomes bounded after source content is shortened. -timing_test(function() { - var player = createPlayer(3); - - // Set currentTime to just before the end - player.currentTime = 2; - assert_equals(player.currentTime, 2.0, "currentTime before shortening"); - assert_false(player.finished, "Finished state before shortening"); - - // Shorten source - player.source.timing.duration = 1; - assert_equals(player.currentTime, 2.0, "currentTime after shortening"); - assert_true(player.finished, "Finished state after shortening"); - - // Check it is not playing - at(0.2, function() { - assert_equals(player.currentTime, 2.0, "currentTime after shortening"); - }); - }, "Shortening source blocks player"); - -// Test playing player becomes bounded after source content is shortened. -timing_test(function() { - var player = createPlayer(3); - - // Set currentTime to midway - player.currentTime = 1.5; - assert_equals(player.currentTime, 1.5, "currentTime before shortening"); - assert_false(player.finished, "Finished state after seeking"); - - // Let it play for a while - at(0.2, function() { - assert_equals(player.currentTime, 1.7, "currentTime before shortening"); - assert_false(player.finished, "Finished state before shortening"); - - // Shorten source - player.source.timing.duration = 1; - assert_equals(player.currentTime, 1.7, "currentTime after shortening"); - assert_true(player.finished, "Finished state after shortening"); - }); - }, "Shortening source blocks player when playing"); - -// Test reversed player does not become bounded after its source content is shortened. -timing_test(function() { - var player = createPlayer(3); - - // Set currentTime to just before the end - player.currentTime = 2; - player.reverse(); - assert_equals(player.currentTime, 2.0, "currentTime before shortening"); - assert_false(player.finished, "Finished state before shortening"); - - // Shorten source - player.source.timing.duration = 1; - assert_equals(player.currentTime, 2.0, "currentTime after shortening"); - assert_false(player.finished, "Finished state after shortening"); - - // Check it is playing - at(0.2, function() { - assert_equals(player.currentTime, 1.8, "currentTime after shortening"); - }); - }, "Shortening source does not block in reverse"); - -// Test player becoming unbounded after duration 0 source content is extended. -timing_test(function() { - // Add empty animation - var player = createPlayer(0); - - // Check we don't progress - assert_equals(player.currentTime, 0, "currentTime before adding content"); - assert_true(player.finished, "Finished state before adding content"); - - // Wait and check we don't progress - at(0.2, function() { - assert_equals(player.currentTime, 0, "currentTime after waiting"); - assert_true(player.finished, "Finished state after waiting"); - - // "Add" content - player.source.timing.duration = 3; - - // We should pick up from 0, not jump 0.2s in - assert_equals(player.currentTime, 0, "currentTime after extending"); - assert_false(player.finished, "Finished state after extending"); - - // Wait and check - at(0.2, function() { - assert_equals(player.currentTime, 0.2, "currentTime after extending and waiting"); - }); - }); - }, "Async add content"); - -// Test negative player playback rate with negative current time. -timing_test(function() { - var player = createPlayer(3); - - // Set a negative time and let it play for a while - player.currentTime = -1; - at(0.2, function() { - assert_equals(player.currentTime, -0.8, "currentTime after waiting"); - assert_false(player.finished, "Finished state after waiting"); - - // Reverse - player.playbackRate = -1; - assert_equals(player.currentTime, -0.8, "currentTime after reversing"); - assert_true(player.finished, "Finished state after reversing"); - }); - }, "Setting negative playback rate in negative space"); - -// Test reversed player becoming bounded when start of animation is reached. -timing_test(function() { - var player = createPlayer(3); - - // Seek to just before end - player.reverse(); - player.currentTime = 0.1; - - // Check state of player - assert_equals(player.currentTime, 0.1, "Current time just before end"); - assert_false(player.paused, "Paused state just before end"); - assert_false(player.finished, "Finished state just before end"); - - // Check player after finishing - at(0.2, function() { - assert_equals(player.currentTime, 0, "Current time when limited"); - assert_false(player.paused, "Paused state after ending"); - assert_true(player.finished, "Finished state after ending"); - }); -}, "Limiting at start"); - -// Test the floating point accuracy of seeking a player. -test(function() { - var player = createPlayer(3); - // Setting a high playbackRate has caused the reported currentTime to differ - // from what was set in previous implementations of AnimationPlayer. - player.playbackRate = 123456; - player.currentTime = 1.618; - assert_equals(player.currentTime, 1.618, "currentTime after seeking to fractional time"); - }, "currentTime preserves floating point accuracy after seeking"); -</script> diff --git a/third_party/polymer/components/web-animations-js/test/testcases/test-pseudo-element-reference.html b/third_party/polymer/components/web-animations-js/test/testcases/test-pseudo-element-reference.html deleted file mode 100644 index c6844a0..0000000 --- a/third_party/polymer/components/web-animations-js/test/testcases/test-pseudo-element-reference.html +++ /dev/null @@ -1,38 +0,0 @@ -<!-- -Copyright 2012 Google Inc. All Rights Reserved. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. ---> -<!DOCTYPE html><meta charset="UTF-8"> -<style> -#child:before { - display: block; - content: "When I grow up I'm going to be a real element."; - height: 20px; -} -</style> -<body><div id="parent"><div id="child"></div></div> -<script src="../bootstrap.js"></script> -<script> -'use strict'; -var parent = document.querySelector('#parent'); -var child = document.querySelector('#parent'); -document.timeline.play(new Animation( - new PseudoElementReference(child, ':before'), [{width: '0px'}, {width: '100px'}], 1)); - -timing_test(function() { - at(0.5, function() { - assert_styles(parent, {height: '20px'}); - }); -}, 'PseudoElementReference is implemented but not supported.'); -</script> diff --git a/third_party/polymer/components/web-animations-js/test/testcases/test-repeated-pause.html b/third_party/polymer/components/web-animations-js/test/testcases/test-repeated-pause.html deleted file mode 100644 index 006f0c1..0000000 --- a/third_party/polymer/components/web-animations-js/test/testcases/test-repeated-pause.html +++ /dev/null @@ -1,54 +0,0 @@ -<!-- -Copyright 2013 Google Inc. All Rights Reserved. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. ---> - -<!DOCTYPE html><meta charset="UTF-8"> -<style> -div.anim { - position: relative; - left: 0px; -} -</style> - -<div id="anim" class="anim"></div> - -<script src="../bootstrap.js"></script> -<script> -"use strict"; -var player = document.timeline.play(new Animation( - document.getElementById("anim"), [{left: "100px"}, {left: "200px"}], 1.0)); - -// Test that repeatedly setting AnimationPlayer.paused to true does not affect the -// AnimationPlayer's currentTime. -timing_test(function() { - at(0.1, function() { - player.pause(); - assert_equals(player.currentTime, 0.1); - }); - }, - "AnimationPlayer.currentTime should be " + - "unaffected by repeatedly setting AnimationPlayer.paused to true"); - -// Test that repeatedly setting AnimationPlayer.paused to false has no effect. -timing_test(function() { - at(0.2, function() { - player.play(); - assert_equals(player.currentTime, 0.1); - }); - }, - "AnimationPlayer.currentTime should be " + - "unaffected by repeatedly setting AnimationPlayer.paused to false"); - -</script> diff --git a/third_party/polymer/components/web-animations-js/test/testcases/test-restart.html b/third_party/polymer/components/web-animations-js/test/testcases/test-restart.html deleted file mode 100644 index 97eae9d..0000000 --- a/third_party/polymer/components/web-animations-js/test/testcases/test-restart.html +++ /dev/null @@ -1,115 +0,0 @@ -<!-- -Copyright 2013 Google Inc. All Rights Reserved. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. ---> - -<!DOCTYPE html><meta charset="UTF-8"> -<style> -div.anim { - position: relative; - left: 0px; -} -</style> - -<div id="anim1" class="anim"></div> -<div id="anim2" class="anim"></div> -<div id="anim3" class="anim"></div> -<div id="anim4" class="anim"></div> - -<script src="../bootstrap.js"></script> -<script> -"use strict"; - -var animFunc = {left: "100px"}; -var anim1 = new Animation(document.getElementById("anim1"), animFunc, {duration: 1.0, fill: 'forwards'}); -var player1 = document.timeline.play(anim1); - -var anim2 = new Animation(document.getElementById("anim2"), animFunc, {duration: 1.0, fill: 'forwards'}); -var player2 = document.timeline.play(anim2); - -var anim3 = new Animation(document.getElementById("anim3"), animFunc, {duration: 1.0, fill: 'forwards'}); -var player3 = document.timeline.play(anim3); - -// Check that once an animation is completed, creating a new AnimationPlayer restarts it. -timing_test(function() { - at(1.0, function() { - assert_styles('#anim1', {'left': '100px'}); - document.timeline.play(anim1); - }); - }, "Animation 1 should be in end state"); - -timing_test(function() { - at(1.5, function() {assert_styles('#anim1', {'left': '50px'})}); - }, "Animation 1 should have been restarted"); - -timing_test(function() { - at(2.0, function() {assert_styles('#anim1', {'left': '100px'})}); - }, "Animation 1 should be in end state a second time"); - -// Setting AnimationPlayer.currentTime = 0 restarts it. -timing_test(function() { - at(0.5, function() { - assert_styles("#anim2", {'left': '50px'}); - player2.currentTime = 0.0; - }); - }, "Animation 2 should be in the middle of running"); - -timing_test(function() { - at(0.75, function() { - assert_styles('#anim2', {'left': '25px'}); - }); - }, "Animation 2 should have been restarted"); - -timing_test(function() { - at(1.0, function() { - assert_styles('#anim2', {'left': '50px'}); - }); - }, "Animation 2 should have been restarted, 2"); - -timing_test(function() { - at(1.5, function() { - assert_styles('#anim2', {'left': '100px'}); - }); - }, "Animation 2 should be in end state a second time"); - -// Even when animation is completed, setting AnimationPlayer.currentTime = 0 -// restarts it. -timing_test(function() { - at(1.0, function() { - assert_styles("#anim3", {'left': '100px'}); - player3.currentTime = 0.0; - }); - }, "Animation 3 should be in end state"); - -timing_test(function() { - at(1.5, function() { - assert_styles('#anim3', {'left': '50px'}); - }); - }, "Animation 3 should have been restarted"); - -timing_test(function() { at(2.0, function() { - assert_styles('#anim3', {'left': '100px'}); - }); - }, "Animation 3 should be in end state a second time"); - - -// Check that TimedItem.localTime is read-only. -var anim4 = new Animation(document.getElementById("anim4"), animFunc, 1.0); -document.timeline.play(anim4); -test(function() { - assert_throws(new TypeError(), function() {anim4.localTime = 0;}); - assert_equals(anim4.localTime, null); - }, "TimedItem.localTime should be read-only"); - -</script> diff --git a/third_party/polymer/components/web-animations-js/test/testcases/test-reversed-player-active-phase.html b/third_party/polymer/components/web-animations-js/test/testcases/test-reversed-player-active-phase.html deleted file mode 100644 index 36783de..0000000 --- a/third_party/polymer/components/web-animations-js/test/testcases/test-reversed-player-active-phase.html +++ /dev/null @@ -1,28 +0,0 @@ -<style> -#target { - position: absolute; - width: 10px; - height: 10px; - background: black; -} -</style> -<script src="../bootstrap.js"></script> -<div id="target"></div> -<script> -timing_test(function() { - var player = target.animate([{left: '0px'}, {left: '100px'}], {duration: 2, fill: 'forwards'}); - - at(1, function() { - assert_styles(target, {left: '50px'}); - player.currentTime = 3; - player.playbackRate = -1; - assert_styles(target, {left: '100px'}); - }, 'AnimationPlayer reversing'); - - at(2, function() {}, 'Tick'); - - at(3, function() { - assert_styles(target, {left: '50px'}); - }, 'Reversed player entering its active phase should take effect'); -}); -</script> diff --git a/third_party/polymer/components/web-animations-js/test/testcases/test-rotation-not-reversed.html b/third_party/polymer/components/web-animations-js/test/testcases/test-rotation-not-reversed.html deleted file mode 100644 index f4f3466..0000000 --- a/third_party/polymer/components/web-animations-js/test/testcases/test-rotation-not-reversed.html +++ /dev/null @@ -1,55 +0,0 @@ -<!-- -Copyright 2013 Google Inc. All Rights Reserved. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. ---> - -<!DOCTYPE html> -<style> -div.anim { - position: relative; - left: 100px; - top: 100px; - width: 100px; - height: 100px; - background: blue; -} -</style> - -<div id='anim' class="anim">Text</div> - -<script src="../bootstrap.js"></script> -<script> -"use strict"; - -document.timeline.play(new Animation(anim, [{transform: 'scale(2)'}, {transform: 'rotate(45deg)'}], {duration: 1, fill: 'forwards'})); - - -timing_test(function() { - // should start as a scale(2) matrix - at(0, function() { - assert_styles('.anim', [{'transform': 'matrix(2, 0, 0, 2, 0, 0)'}]); - }); - - // should be a scale(1.5) rotate(22.5deg) matrix halfway though - at(0.5, function() { - assert_styles('.anim', [{'transform': 'matrix(1.3858, 0.574, -0.574, 1.3858, 0, 0)'}]); - }); - - // should end as a rotate(45deg) matrix - at(1, function() { - assert_styles('.anim', [{'transform': 'matrix(0.7071067811865476, 0.7071067811865475, -0.7071067811865475, 0.7071067811865476, 0, 0)'}]); - }); -}); - -</script> diff --git a/third_party/polymer/components/web-animations-js/test/testcases/test-update-state.html b/third_party/polymer/components/web-animations-js/test/testcases/test-update-state.html deleted file mode 100644 index 3a62066..0000000 --- a/third_party/polymer/components/web-animations-js/test/testcases/test-update-state.html +++ /dev/null @@ -1,113 +0,0 @@ -<!-- -Copyright 2013 Google Inc. All Rights Reserved. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. ---> -<!DOCTYPE html><meta charset="UTF-8"> - -<script> -var expected_failures = [ - { - browser_configurations: [{ firefox: true }], - tests: ['Updated style should be visible despite unrelated errors at t=5ms'], - message: 'Issue with window sizing cause value to be zero rather then 500px.', - }, { - browser_configurations: [{ msie: true }], - tests: ['Changing the start time of a new player to before the current time should cause it to take effect at t=3ms'], - message: 'IE returns rgba.', - } -]; -</script> -<script src="../bootstrap.js"></script> -<script> -"use strict"; - -var element = document.createElement('span'); -document.body.appendChild(element); - -test(function() { - element.animate([{marginLeft: '1px'}, {marginLeft: '1px'}], 1); - assert_styles(element, {marginLeft: '0px'}); -}, 'New animation should not apply within script before timeline has started.') - -timing_test(function() { - at(0, function() { - element.animate([{marginTop: '1px'}, {marginTop: '1px'}], 1); - assert_styles(element, {marginTop: '1px'}); - }); -}, 'New animation should apply within script after timeline has started.') - -timing_test(function() { - var player = element.animate([{left: '0px'}, {left: '1000px'}], 10); - at(1, function() { - assert_styles(element, {left: '100px'}); - - player.currentTime += 1; - assert_styles(element, {left: '200px'}); - }); -}, 'Updated style should be visible after player seek'); - -timing_test(function() { - var player = element.animate([{top: '0px'}, {top: '1000px'}], 10); - at(1, function() { - assert_styles(element, {top: '100px'}); - - player.source.timing.delay = -1; - assert_styles(element, {top: '200px'}); - }); -}, 'Updated style should be visible after change to specified timing'); - -var group = new AnimationSequence([ - new Animation(element, {}, 1), - new Animation(element, [{right: '0px'}, {right: '1000px'}], 10), -]); -document.timeline.play(group); -timing_test(function() { - at(2, function() { - assert_styles(element, {right: '100px'}); - - group.children[0].timing.duration = 0.5; - assert_styles(element, {right: '150px'}); - - group.children[0].remove(); - assert_styles(element, {right: '200px'}); - }); -}, 'Updated style should be visible after change to animation tree'); - -timing_test(function() { - at(3, function() { - var player = element.animate([{color: 'red'}, {color: 'green'}, {color: 'red'}], 1); - assert_equals(player.startTime, 3); - assert_styles(element, {color: 'red'}); - - player.startTime -= 0.5; - assert_styles(element, {color: 'green'}); - }); -}, 'Changing the start time of a new player to before the current time should cause it to take effect'); - -var player2 = element.animate([{bottom: '0px'}, {bottom: '1000px'}], 10); -// Run this last, since if it fails it's likely to corrupt the other tests. -timing_test(function() { - at(5, function() { - assert_styles(element, {bottom: '500px'}); - - try { - var group = new AnimationGroup(); - group.append(group); - } catch (e) { - } - player2.source.timing.delay = -1; - assert_styles(element, {bottom: '600px'}); - }); -}, 'Updated style should be visible despite unrelated errors'); -</script> diff --git a/third_party/polymer/components/web-animations-js/test/testcases/unit-test-clone.html b/third_party/polymer/components/web-animations-js/test/testcases/unit-test-clone.html deleted file mode 100644 index 55c7042..0000000 --- a/third_party/polymer/components/web-animations-js/test/testcases/unit-test-clone.html +++ /dev/null @@ -1,80 +0,0 @@ -<!-- -Copyright 2013 Google Inc. All Rights Reserved. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. ---> - -<!DOCTYPE html><meta charset="UTF-8"> -<div id="anim"></div> - -<script src="../bootstrap.js"></script> -<script> -"use strict"; - -var elem = document.getElementById("anim"); -var animFunc = {left: "100px"}; - -// Animation -var anim = new Animation(elem, animFunc, 1.0); -var clone = anim.clone(); -test(function() {assert_true(clone instanceof Animation)}, - "Clone should be an Animation"); -test(function() {assert_equals(clone.timing.duration, 1.0)}, - "Clone should take Timing.duration"); -test(function() {assert_equals(clone.target, elem)}, - "Clone should take target"); - -// AnimationGroup -var animationGroup = new AnimationGroup([anim, clone], 4.0); -var animationGroupClone = animationGroup.clone(); -test(function() {assert_true(animationGroupClone instanceof AnimationGroup, true)}, - "AnimationGroup clone should be a AnimationGroup"); -test(function() {assert_equals(animationGroupClone.timing.duration, 4.0)}, - "AnimationGroup clone should take Timing.duration"); -test(function() {assert_equals(animationGroupClone.children.length, 2)}, - "AnimationGroup clone should clone children"); -test(function() {assert_not_equals(animationGroupClone.children[0], anim)}, - "AnimationGroup clone should clone first child"); -test(function() {assert_equals(animationGroupClone.children[0].duration, 1.0)}, - "AnimationGroup clone should clone first child's duration"); -test(function() {assert_not_equals(animationGroupClone.children[1], clone)}, - "AnimationGroup clone should clone second child"); -test(function() {assert_equals(animationGroupClone.children[1].duration, 1.0)}, - "AnimationGroup clone should clone second child's duration"); - -// AnimationSequence -var animationSequence = new AnimationSequence([anim, clone], 6.0); -var animationSequenceClone = animationSequence.clone(); -test(function() {assert_true(animationSequenceClone instanceof AnimationSequence)}, - "AnimationSequence clone should be a AnimationSequence"); -test(function() {assert_equals(animationSequenceClone.timing.duration, 6.0)}, - "AnimationSequence clone should take Timing.duration"); -test(function() {assert_equals(animationSequenceClone.children.length, 2)}, - "AnimationSequence clone should clone children"); -test(function() {assert_not_equals(animationSequenceClone.children[0], anim)}, - "AnimationSequence clone should clone first child"); -test(function() {assert_equals(animationSequenceClone.children[0].duration, 1.0)}, - "AnimationSequence clone should clone first child's duration"); -test(function() {assert_not_equals(animationSequenceClone.children[1], clone)}, - "AnimationSequence clone should clone second child"); -test(function() {assert_equals(animationSequenceClone.children[1].duration, 1.0)}, - "AnimationSequence clone should clone second child's duration"); - -// Child -var childClone = anim.clone(); -test(function() {assert_equals(anim.parent, animationSequence)}, - "Child clone should not equal animationSequence"); -test(function() {assert_equals(childClone.parent, null)}, - "Child clone should not take parent"); - -</script> diff --git a/third_party/polymer/components/web-animations-js/test/testcases/unit-test-delay.html b/third_party/polymer/components/web-animations-js/test/testcases/unit-test-delay.html deleted file mode 100644 index 4a2e5bb..0000000 --- a/third_party/polymer/components/web-animations-js/test/testcases/unit-test-delay.html +++ /dev/null @@ -1,66 +0,0 @@ -<!-- -Copyright 2013 Google Inc. All Rights Reserved. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. ---> - -<!DOCTYPE html><meta charset="UTF-8"> -<div id="anim"></div> - -<script src="../bootstrap.js"></script> -<script> -"use strict"; - -var anim1 = new Animation(document.getElementById("anim"), {left: "100px"}, - {iterations: 3.0, duration: 1.0}); -var anim2 = new Animation(document.getElementById("anim"), {left: "100px"}, - {duration: 2.0}); -var animationGroup = new AnimationGroup([anim1, anim2]); - -function expectDuration(anim, duration, error) { - test(function() {assert_equals(anim.activeDuration, duration)}, error); -} - -function expectEndTime(anim, endTime, error) { - test(function() {assert_equals(anim.endTime, endTime)}, error); -} - -expectDuration(anim1, 3.0, "Animation 1 duration should match specified value"); -expectDuration(anim2, 2.0, "Animation 2 duration should match specified value"); -expectDuration(animationGroup, 3.0, - "AnimationGroup duration should be max of childrens' end times"); -anim1.timing.delay = 2.0; -expectDuration(anim1, 3.0, "Animation 1 duration should not include delay"); -expectEndTime(anim1, 5.0, "Animation 1 end time should include delay"); -expectDuration(animationGroup, 5.0, - "AnimationGroup duration should still be max of childrens' end times"); -anim2.timing.endDelay = 4.0; -expectDuration(anim2, 2.0, "Animation 2 duration should not include endDelay"); -expectEndTime(anim2, 6.0, "Animation 2 end time should include endDelay"); -expectDuration(animationGroup, 6.0, - "AnimationGroup duration should STILL be max of childrens' end times"); - -var animationSequence = new AnimationSequence([anim1, anim2]); -expectDuration(animationSequence, 11.0, - "AnimationSequence duration should be sum of childrens' total durations"); -expectEndTime(anim2, 11.0, "Animation 2 end time should include Animation 1"); -anim1.timing.delay = 4.0; -expectEndTime(anim2, 13.0, - "Animation 2 end time should be updated by changes to animation 1 delay"); -anim1.timing.endDelay = 3.0; -expectDuration(anim1, 3.0, "Animation 1 duration should not include endDelay"); -expectEndTime(anim1, 10.0, "Animation 1 end time should include endDelay"); -expectEndTime(anim2, 16.0, "Animation 2 end time should include Animation 1 endDelay"); -expectDuration(animationSequence, 16.0, - "AnimationSequence duration should still be sum of childrens' total durations"); -</script> diff --git a/third_party/polymer/components/web-animations-js/test/testcases/unit-test-dom-operations.html b/third_party/polymer/components/web-animations-js/test/testcases/unit-test-dom-operations.html deleted file mode 100644 index 000c294..0000000 --- a/third_party/polymer/components/web-animations-js/test/testcases/unit-test-dom-operations.html +++ /dev/null @@ -1,164 +0,0 @@ -<!-- -Copyright 2013 Google Inc. All Rights Reserved. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. ---> - -<!DOCTYPE html><meta charset="UTF-8"> -<body></body> -<script src="../bootstrap.js"></script> -<script> - -var body = document.querySelector('body'); -var anims = [body, body, body, body, body, body, body, body, body, body].map(function(element, idx) { - return new Animation(element, { left: '100px' }, idx); -}); - -function initGroup() { - return new AnimationGroup(anims.slice(0, 5)); -} - -function toOrdering(list) { - return [].map.call(list, function(animation) { return animation.timing.duration; }); -} - -function assert_child_order(group, list, message) { - assert_array_equals(toOrdering(group.children), list, message); -} - -test(function() { - var group = new AnimationGroup(); - group.append(anims[5]); - assert_child_order(group, [5], - 'append on empty group should work'); - var group = initGroup(); - group.append(anims[5]); - assert_child_order(group, [0, 1, 2, 3, 4, 5], - 'append should place element 5 at end of group'); - group.append(anims[6], anims[7], anims[8]); - assert_child_order(group, [0, 1, 2, 3, 4, 5, 6, 7, 8], - 'append should place elements 6, 7, and 8 at end of group'); -}, 'append'); - -test(function() { - var group = new AnimationGroup(); - group.prepend(anims[5]); - assert_child_order(group, [5], - 'prepend on empty group should work'); - var group = initGroup(); - group.prepend(anims[5]); - assert_child_order(group, [5, 0, 1, 2, 3, 4], - 'prepend should place element 5 at beginning of group'); - group.prepend(anims[6], anims[7], anims[8]); - assert_child_order(group, [6, 7, 8, 5, 0, 1, 2, 3, 4], - 'prepend should place elements 6, 7, and 8 at beginning of group'); -}, 'prepend'); - -test(function() { - var group = initGroup(); - assert_equals(group.firstChild, anims[0], - 'first child should be element 0'); - group.prepend(anims[8]); - assert_equals(group.firstChild, anims[8], - 'first child after prepend should be prepended element'); -}, 'firstChild'); - -test(function() { - var group = initGroup(); - assert_equals(group.lastChild, anims[4], - 'last child should be element 4'); - group.append(anims[8]); - assert_equals(group.lastChild, anims[8], - 'last child after append should be appended element'); -}, 'lastChild'); - -test(function() { - var group = initGroup(); - group.children[2].before(anims[5]); - assert_child_order(group, [0, 1, 5, 2, 3, 4], - 'before should place element 5 before element 2'); - anims[3].before(anims[6], anims[7], anims[8]); - assert_child_order(group, [0, 1, 5, 2, 6, 7, 8, 3, 4], - 'before should place elements 6, 7, and 8 before element 3'); - group.firstChild.before(anims[9]); - assert_child_order(group, [9, 0, 1, 5, 2, 6, 7, 8, 3, 4], - 'before should place element 9 at beginning of list'); -}, 'before'); - -test(function() { - var group = initGroup(); - group.children[2].after(anims[5]); - assert_child_order(group, [0, 1, 2, 5, 3, 4], - 'after should place element 5 after element 2'); - anims[3].after(anims[6], anims[7], anims[8]); - assert_child_order(group, [0, 1, 2, 5, 3, 6, 7, 8, 4], - 'after should place elements 6, 7, and 8 after element 3'); - group.lastChild.after(anims[9]); - assert_child_order(group, [0, 1, 2, 5, 3, 6, 7, 8, 4, 9], - 'after should place element 9 at end of list'); -}, 'after'); - -test(function() { - var group = initGroup(); - group.children[2].replace(anims[5]); - assert_child_order(group, [0, 1, 5, 3, 4], - 'replace should replace element 2 with element 5'); - anims[3].replace(anims[6], anims[7], anims[8]); - assert_child_order(group, [0, 1, 5, 6, 7, 8, 4], - 'replace should replace element 3 with elements 6, 7, and 8'); - group.firstChild.replace(anims[9]); - assert_child_order(group, [9, 1, 5, 6, 7, 8, 4], - 'replace should replace element 0 with element 9'); - group.lastChild.replace(anims[0]); - assert_child_order(group, [9, 1, 5, 6, 7, 8, 0], - 'replace should replace element 4 with element 0'); -}, 'replace'); - -test(function() { - var group = initGroup(); - group.children[2].remove(); - assert_child_order(group, [0, 1, 3, 4], - 'element 2 should be removed'); - group.firstChild.remove(); - assert_child_order(group, [1, 3, 4], - 'first child should be removed'); - group.lastChild.remove(); - assert_child_order(group, [1, 3], - 'last child should be removed'); -}, 'remove'); - -test(function() { - var group = initGroup(); - var group2 = new AnimationGroup(); - group2.append(group); - var group3 = new AnimationSequence(); - group3.append(group); - assert_throws("HierarchyRequestError", - function() { - group.append(group3); - }, - 'group3 should be in hierarchy of group'); - assert_throws("HierarchyRequestError", - function() { - group.append(group); - }, - 'group should be in its own hierarchy'); - assert_throws("HierarchyRequestError", - function() { - anims[3].replace(group); - }, - 'group should be in hierarchy of element 3'); - -}, 'inclusive ancestors fail'); - -</script> diff --git a/third_party/polymer/components/web-animations-js/test/testcases/unit-test-duration.html b/third_party/polymer/components/web-animations-js/test/testcases/unit-test-duration.html deleted file mode 100644 index 82e806f..0000000 --- a/third_party/polymer/components/web-animations-js/test/testcases/unit-test-duration.html +++ /dev/null @@ -1,66 +0,0 @@ -<!-- -Copyright 2013 Google Inc. All Rights Reserved. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. ---> - -<!DOCTYPE html><meta charset="UTF-8"> -<div id="anim"></div> - -<script src="../bootstrap.js"></script> -<script> -"use strict"; - -var anim = new Animation(document.getElementById("anim"), {left: "100px"}, - {iterations: 3.0}); -var animationGroup = new AnimationGroup(); -var animationSequence = new AnimationSequence(); - -// Should use intrinsic duration if Timing.duration is undefined. -// Animation -test(function() {assert_equals(anim.duration, 0.0)}, - "Animation duration should use intrinsic value"); -anim.timing.duration = 1.0; -test(function() {assert_equals(anim.duration, 1.0)}, - "Animation duration should use specified value"); -// AnimationGroup -test(function() {assert_equals(animationGroup.duration, 0.0)}, - "AnimationGroup duration should use intrinsic value"); -animationGroup.append(anim); -test(function() {assert_equals(animationGroup.duration, 3.0)}, - "AnimationGroup duration should be derived from child"); -animationGroup.timing.duration = 2.0; -test(function() {assert_equals(animationGroup.duration, 2.0)}, - "AnimationGroup duration should use specified value"); -// AnimationSequence -test(function() {assert_equals(animationSequence.duration, 0.0)}, - "AnimationSequence duration should use intrinsic value"); -animationSequence.append(anim); -test(function() {assert_equals(animationSequence.duration, 3.0)}, - "AnimationSequence duration should be derived from child"); -animationSequence.timing.duration = 4.0; -test(function() {assert_equals(animationSequence.duration, 4.0)}, - "AnimationSequence duration should use specified value"); - -test(function() { - assert_throws(new TypeError(), function() { - anim.duration = 5.0; - }); - assert_equals(anim.duration, 1.0); -}, "Animation.duration should be read-only"); - -anim.timing.duration = 14.0; -test(function() {assert_equals(anim.activeDuration, 42.0)}, - "activeDuration should always reflect TimedItem.duration"); - -</script> diff --git a/third_party/polymer/components/web-animations-js/test/testcases/unit-test-get-siblings.html b/third_party/polymer/components/web-animations-js/test/testcases/unit-test-get-siblings.html deleted file mode 100644 index 73657b8..0000000 --- a/third_party/polymer/components/web-animations-js/test/testcases/unit-test-get-siblings.html +++ /dev/null @@ -1,112 +0,0 @@ -<!-- -Copyright 2013 Google Inc. All Rights Reserved. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. ---> - -<!DOCTYPE html><meta charset="UTF-8"> -<div id="anim"></div> - -<script src="../bootstrap.js"></script> -<script> -"use strict"; - -var animationGroup = new AnimationGroup(); -var anim = new Animation(document.getElementById("anim"), {left: "100px"}, - {iterations: 3.0}); -var anim1 = new Animation(document.getElementById("anim"), {top: "100px"}, - {iterations: 3.0}); -var anim2 = new Animation(document.getElementById("anim"), {width: "100px"}, - {iterations: 3.0}); -var anim3 = new Animation(document.getElementById("anim"), {height: "100px"}, - {iterations: 3.0}); - -test(function() {assert_equals(anim.previousSibling, null)}, - "Single animation should have no previous sibling"); - -test(function() {assert_equals(anim.nextSibling, null)}, - "Single animation should have no next sibling"); - -animationGroup.append(anim); - -test(function() {assert_equals(anim.previousSibling, null)}, - "Single animation in a animationGroup should have no previous sibling"); - -test(function() {assert_equals(anim.nextSibling, null)}, - "Single animation in a animationGroup should have no next sibling"); - -animationGroup.prepend(anim1); - -test(function() {assert_equals(anim.previousSibling, anim1)}, - "Animation should have a previous sibling when there is one"); - -test(function() {assert_equals(anim.nextSibling, null)}, - "Animation should have no next sibling when there is none"); - -animationGroup.append(anim2); - -test(function() {assert_equals(anim.previousSibling, anim1)}, - "Animation should have a previous sibling when there is one"); - -test(function() {assert_equals(anim.nextSibling, anim2)}, - "Animation should have a next sibling when there is one"); - -animationGroup.prepend(anim3); - -test(function() {assert_equals(anim.previousSibling, anim1)}, - "Animation should have the correct previous sibling when there is more than one"); - -test(function() {assert_equals(anim.nextSibling, anim2)}, - "Animation should have a next sibling when there is one"); -anim1.remove(); - -test(function() {assert_equals(anim.previousSibling, anim3)}, - "Animation should have the correct previous sibling when the old one is removed"); - -test(function() {assert_equals(anim.nextSibling, anim2)}, - "Animation should have a next sibling when there is one"); - -anim3.remove(); -animationGroup.append(anim3); - -test(function() {assert_equals(anim.previousSibling, null)}, - "Animation should have the no previous sibling when there is none"); - -test(function() {assert_equals(anim.nextSibling, anim2)}, - "Animation should have a next sibling when there is more than one"); - -anim2.remove(); - -test(function() {assert_equals(anim.previousSibling, null)}, - "Animation should have the no previous sibling when there is none"); - -test(function() {assert_equals(anim.nextSibling, anim3)}, - "Animation should have the correct next sibling when the old one is removed"); - -anim.before(anim1); - -test(function() {assert_equals(anim.previousSibling, anim1)}, - "Animation should have the correct previous sibling when one is added"); - -test(function() {assert_equals(anim.nextSibling, anim3)}, - "Animation should have the correct next sibling when the old one is removed"); - -anim.after(anim2); - -test(function() {assert_equals(anim.previousSibling, anim1)}, - "Animation should have a previous sibling when there is one"); - -test(function() {assert_equals(anim.nextSibling, anim2)}, - "Animation should have the correct next sibling when a new one is added"); - -</script> diff --git a/third_party/polymer/components/web-animations-js/test/testcases/unit-test-modify-timing-params.html b/third_party/polymer/components/web-animations-js/test/testcases/unit-test-modify-timing-params.html deleted file mode 100644 index ca7d181..0000000 --- a/third_party/polymer/components/web-animations-js/test/testcases/unit-test-modify-timing-params.html +++ /dev/null @@ -1,105 +0,0 @@ -<!-- -Copyright 2013 Google Inc. All Rights Reserved. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. ---> - -<!DOCTYPE html><meta charset="UTF-8"> -<div id="anim"></div> - -<script src="../bootstrap.js"></script> -<script> -"use strict"; - -var anim = new Animation(document.getElementById("anim"), {left: "100px"}, - 1.0); - -// Test that updates to a TimedItem's startTime, or duration -// cause corresponding updates to its endTime. -test(function() {assert_equals(anim.endTime, 1.0)}, - "endTime should reflect initial duration"); -test(function() { - assert_throws(new TypeError(), function() { - anim.startTime = 2.0; - }); - assert_equals(anim.startTime, 0.0); -}, "startTime should be read-only"); -anim.timing.duration = 3.0; -test(function() {assert_equals(anim.endTime, 3.0)}, - "endTime should reflect Timing.duration"); -anim.timing.duration = 4.0; -test(function() {assert_equals(anim.endTime, 4.0)}, - "endTime should reflect duration"); - -test(function() { - assert_throws(new TypeError(), function() { - anim.endTime = 6.5; - }); - assert_true(anim.endTime != 6.5); -}, "TimedItem.endTime should be read-only"); - -// Test that updates to a TimedItem's endTime cause re-layout of a parent -// parallel group. -anim.timing.duration = 3; -var animationGroup = new AnimationGroup([anim]); -test(function() {assert_equals(animationGroup.duration, 3.0)}, - "Parallel group duration should reflect child endTime"); -test(function() {assert_equals(animationGroup.endTime, 3.0)}, - "Parallel group end time should reflect child endTime"); -// Update via Timing.duration -anim.timing.duration = 8.0; -test(function() {assert_equals(animationGroup.duration, 8.0)}, - "Parallel group duration should reflect updated child Timing.duration"); -test(function() {assert_equals(animationGroup.endTime, 8.0)}, - "Parallel group end time should reflect updated child Timing.duration"); -// Update via duration -anim.timing.duration = 9.0; -test(function() {assert_equals(animationGroup.duration, 9.0)}, - "Parallel group duration should reflect updated child duration"); -test(function() {assert_equals(animationGroup.endTime, 9.0)}, - "Parallel group end time should reflect updated child duration"); - -// Test that updates to a TimedItem's delay and duration cause -// re-layout of a parent sequence group. -anim.timing.duration = "auto"; -var siblingAnim = new Animation(document.getElementById("anim"), {top: "100px"}, - 1.0); -var animationSequence = new AnimationSequence([anim, siblingAnim]); -test(function() {assert_equals(anim.startTime, 0.0)}, - "Sequence group should reset child startTime"); -test(function() {assert_equals(siblingAnim.startTime, 0.0)}, - "Sequence group should set child startTime"); -test(function() {assert_equals(siblingAnim.endTime, 1.0)}, - "Sequence group should set child endTime"); -test(function() {assert_equals(animationSequence.duration, 1.0)}, - "Sequence group duration should reflect child durations"); -test(function() {assert_equals(animationSequence.endTime, 1.0)}, - "Sequence group end time should reflect child durations"); -// delay -anim.timing.delay = 11.0; -test(function() {assert_equals(siblingAnim.startTime, 11.0)}, - "Sequence group should update sibling after updated child delay"); -test(function() {assert_equals(animationSequence.duration, 12.0)}, - "Sequence group duration should reflect updated child delay"); -test(function() {assert_equals(animationSequence.endTime, 12.0)}, - "Sequence group end time should reflect updated child delay"); -// duration -anim.timing.duration = 12.0; -test(function() {assert_equals(siblingAnim.startTime, 23.0)}, - "Sequence group should update sibling after updated child Timing.duration"); -test(function() {assert_equals(animationSequence.duration, 24.0)}, - "Sequence group duration should reflect updated child Timing.duration"); -test(function() {assert_equals(animationSequence.endTime, 24.0)}, - "Sequence group end time should reflect updated child Timing.duration"); - -</script> diff --git a/third_party/polymer/components/web-animations-js/test/testcases/unit-test-null-effect.html b/third_party/polymer/components/web-animations-js/test/testcases/unit-test-null-effect.html deleted file mode 100644 index 763bdcb..0000000 --- a/third_party/polymer/components/web-animations-js/test/testcases/unit-test-null-effect.html +++ /dev/null @@ -1,43 +0,0 @@ -<!-- -Copyright 2013 Google Inc. All Rights Reserved. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. ---> - -<!DOCTYPE html><meta charset="UTF-8"> -<style> -</style> - -<div id="anim"></div> - -<script src="../bootstrap.js"></script> -<script> -"use strict"; - -var target = document.getElementById("anim"); - -test(function() { new Animation(target, null, 1.0); }, - "Creating an animation with a null effect should not cause an exception"); - -test(function() { - assert_equals(new Animation(target, null, 1.0).effect, null); -}, "Animation.effect should be null if effect is null"); - -test(function() { - assert_equals(new Animation(target, null, 1.0).clone().effect, null); -}, "Cloning an animation with a null effect should yield a null effect"); - -test(function() { document.timeline.play(new Animation(target, null, 1.0)); }, - "Playing an animation with a null effect should not cause an exception"); - -</script> diff --git a/third_party/polymer/components/web-animations-js/test/testcases/unit-test-set-parent.html b/third_party/polymer/components/web-animations-js/test/testcases/unit-test-set-parent.html deleted file mode 100644 index d0efc10..0000000 --- a/third_party/polymer/components/web-animations-js/test/testcases/unit-test-set-parent.html +++ /dev/null @@ -1,111 +0,0 @@ -<!-- -Copyright 2013 Google Inc. All Rights Reserved. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. ---> - -<!DOCTYPE html><meta charset="UTF-8"> -<div id="anim"></div> - -<script src="../bootstrap.js"></script> -<script> -"use strict"; - -var elem = document.getElementById("anim"); -var animFunc = {left: "100px"}; - -// Test that Animation is constructed with no parent. -var child = new Animation(elem, animFunc, 1); -test(function() {assert_equals(child.parent, null)}, - "Child should have no parent"); - -// Test that group is constructed with zero children. -var parent = new AnimationGroup(); -test(function() {assert_equals(parent.children.length, 0)}, - "Parent should have zero children"); - -// Test that updates are made to child when constructing parent. -var parent = new AnimationGroup([child]); -test(function() {assert_equals(child.parent, parent)}, - "Parent's constructor, Child's parent should be set to parent"); -test(function() {assert_equals(parent.children.length, 1)}, - "Parent's constructor, Parent should have 1 child"); -test(function() {assert_equals(parent.children[0], child)}, - "Parent's constructor, Parent should have correct child"); - -// Test that updates are made to previous and new parent when using append(). -var newParent = new AnimationGroup(); -newParent.append(child); -test(function() {assert_equals(child.parent, newParent)}, - "With .append, child's parent should be updated to new parent"); -test(function() {assert_equals(parent.children.length, 0)}, - "With .append, Previous parent should no longer have children"); -test(function() {assert_equals(newParent.children.length, 1)}, - "With .append, New parent should now have 1 child"); -test(function() {assert_equals(newParent.children[0], child)}, - "With .append, New parent should now have correct child"); - -// Test that calling append() with an existing child causes that child to be moved -// to the end of the list of children. -var sibling = new Animation(elem, animFunc, 1.0); -var animationSequence = new AnimationSequence([child, sibling]); -test(function() {assert_equals(animationSequence.children.length, 2)}, - "Moved child, new animationSequence.children.length"); -test(function() {assert_equals(animationSequence.children[0], child)}, - "Moved child, new animationSequence's first child should be 'child'"); -test(function() {assert_equals(animationSequence.children[1], sibling)}, - "Moved child, Second child should be 'sibling'"); -test(function() {assert_equals(child.startTime, 0.0)}, - "Moved child, start time of 'child' == 0.0"); -test(function() {assert_equals(sibling.startTime, 1.0)}, - "Moved child, start time of 'sibling' == 1.0"); -animationSequence.append(animationSequence.children[0]); -test(function() {assert_equals(animationSequence.children.length, 2)}, - "After .append, animationSequence.children.length"); -test(function() {assert_equals(animationSequence.children[0], sibling)}, - "After .append, First child should be 'sibling'"); -test(function() {assert_equals(animationSequence.children[1], child)}, - "After .append, Second child should be 'child'"); -test(function() {assert_equals(sibling.startTime, 0.0)}, - "After .append, Start time of 'sibling'"); -test(function() {assert_equals(child.startTime, 1.0)}, - "After.append, Start time of 'child'"); - -// Test that setting TimedItem.parent is ignored. -test(function() { - assert_throws(new TypeError(), function() { - child.parent = null; - }); - assert_equals(child.parent, animationSequence); -}, "TimedItem.parent should be read-only"); -test(function() {assert_equals(animationSequence.children.length, 2)}, - "animationSequence.children.length"); -test(function() {assert_equals(animationSequence.children[0], sibling)}, - "First child should be 'sibling'"); -test(function() {assert_equals(animationSequence.children[1], child)}, - "Second child should be 'child'"); -test(function() {assert_equals(sibling.startTime, 0.0)}, - "Start time of 'sibling'"); -test(function() {assert_equals(child.startTime, 1.0)}, - "Start time of 'child'"); - -// Test that TimedItem.clear() updates both parent and children. -animationSequence.clear(); -test(function() {assert_equals(animationSequence.children.length, 0)}, - "Parent's children should be cleared"); -test(function() {assert_equals(child.parent, null)}, - "Child's parent should be cleared"); -test(function() {assert_equals(sibling.parent, null)}, - "Sibling's parent should be cleared"); - -</script> diff --git a/third_party/polymer/components/web-animations-js/test/testcases/unit-test-testharness-failure.html b/third_party/polymer/components/web-animations-js/test/testcases/unit-test-testharness-failure.html deleted file mode 100644 index ff10447..0000000 --- a/third_party/polymer/components/web-animations-js/test/testcases/unit-test-testharness-failure.html +++ /dev/null @@ -1,54 +0,0 @@ -<!-- -Copyright 2013 Google Inc. All Rights Reserved. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. ---> -<!DOCTYPE html> -<script> -var expected_failures = [ - { - browser_configurations: [{ chrome: true, version: '28' }], - tests: ['Failing on Chrome 28'], - message: 'This test is deliberately broken on Chrome 28.', - }, { - browser_configurations: [{ chrome: true }], - tests: ['Chrome for regexing'], - message: 'This test is deliberately broken on all Chrome versions.', - }, { - browser_configurations: [{ firefox: true }], - tests: ['Failing on all Firefox'], - message: 'This test is deliberately broken on all Firefox versions.', - } -]; -</script> -<script src="../bootstrap.js"></script> -<script> -"use strict"; - -test(function() { - assert_false(/Firefox/.test(navigator.userAgent)); -}, 'Failing on all Firefox'); - -test(function() { - assert_false(/Chrome\/28/.test(navigator.userAgent)); -}, 'Failing on Chrome 28'); - -test(function() { - assert_false(/Chrome/.test(navigator.userAgent)); -}, 'Failing on all Chrome for regexing 1'); - -test(function() { - assert_false(/Chrome/.test(navigator.userAgent)); -}, 'Failing on all Chrome for regexing 2'); - -</script> diff --git a/third_party/polymer/components/web-animations-js/test/testcases/unit-test-testharness.html b/third_party/polymer/components/web-animations-js/test/testcases/unit-test-testharness.html deleted file mode 100644 index b863e72..0000000 --- a/third_party/polymer/components/web-animations-js/test/testcases/unit-test-testharness.html +++ /dev/null @@ -1,248 +0,0 @@ -<!-- -Copyright 2013 Google Inc. All Rights Reserved. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. ---> -<!DOCTYPE html><meta charset="UTF-8"> -<script src="../bootstrap.js"></script> -<script> -"use strict"; - -test(function() { - var element = document.createElement('span'); - assert_styles(element, {}, - 'assert_styles should support an element with no parent'); - - document.body.appendChild(element); - var childCount = document.body.children.length; - assert_styles(element, {}); - assert_equals(childCount, document.body.children.length, - 'assert_styles should not leave additional elements in the dom'); -}, 'assert_styles reference_element'); - -test(function() { - try { - assert_styles(null, {}); - assert_unreached(); - } catch (e) { - assert_equals(e.message, 'Expected Array, NodeList or Element but got null'); - } -}, 'assert_styles invalid arguments'); - -test(function() { - var element = document.createElement('span'); - document.body.appendChild(element); - - try { - assert_styles(element, {'left': 'abc123'}, "Description 1"); - assert_unreached(); - } catch (e) { - assert_regexp_match(e.message, /^Tried to set the reference element\'s left to "abc123" but neither/); - } - - try { - assert_styles(element, {'clip': 'rect(1px 2px 3px 4px)'}); - assert_unreached(); - } catch (e) { - assert_regexp_match(e.message, /Actual - /); - } -}, 'assert_styles given invalid style'); - -test(function() { - var element = document.createElement('span'); - document.body.appendChild(element); - element.style.left = '-100px'; - try { - assert_styles(element, {left: '100px'}); - assert_unreached(); - } catch(e) { - } -}, 'assert_styles should handle negative specified values'); - -test(function() { - var element = document.createElement('span'); - document.body.appendChild(element); - element.style.left = '100px'; - try { - assert_styles(element, {left: '-100px'}); - assert_unreached(); - } catch(e) { - } -}, 'assert_styles should handle negative expected values'); - -test(function() { - var element = document.createElement('span'); - document.body.appendChild(element); - element.style.left = '-100px'; - assert_styles(element, {left: '-100px'}); -}, 'assert_styles should handle negative values'); - -test(function() { - var AssertionError = window.assert_styles_assertion_error; - var assert = window.assert_styles_assert_important_in_array; - - assert('matrix(1%)', ['matrix(1%)']); - assert('matrix(1%)', ['', 'matrix(1%)']); - assert('matrix(1% 1px)', ['matrix(1%, 1px)']); - assert('rect(1px 2px 3px 4px)', ['rect(1px 2px 3px 4px)']); - assert('rect(1px 2px 3px 4px)', ['rect(1px, 2px, 3px, 4px)']); - - try { - assert('', [], 'empty'); - assert_unreached(); - } catch(e) { - assert_regexp_match(e.message, /^empty/); - } - - try { - assert('matrix(1%)', [], 'matrix 1% to empty'); - assert_unreached(); - } catch(e) { - assert_regexp_match(e.message, /^matrix 1% to empty/); - } - - try { - assert('matrix(1%)', [''], 'matrix 1% to empty string'); - assert_unreached(); - } catch(e) { - assert_regexp_match(e.message, /^matrix 1% to empty string\n/); - } - - try { - assert('matrix(1%)', ['matrix(1px)'], 'matrix 1% to matrix 1px'); - assert_unreached(); - } catch(e) { - assert_regexp_match(e.message, /^matrix 1% to matrix 1px/); - } - - /* Check that it only needs to match to 4 significant figures */ - assert('1', [1.0001]); - assert('1.0001', [1]); - try { - assert('1', [1.001]); - assert_unreached(); - } catch(e) { - assert_not_equals(e.message, "assert_unreached: Reached unreachable code"); - } - - assert('10', [10.001]); - assert('10.001', [10]); - try { - assert('10', [10.01]); - assert_unreached(); - } catch(e) { - assert_not_equals(e.message, "assert_unreached: Reached unreachable code"); - } - - assert('2.0', [2.0001]); - assert('2.0001', [2]); - try { - assert('2', [2.001]); - assert_unreached(); - } catch(e) { - assert_not_equals(e.message, "assert_unreached: Reached unreachable code"); - } - - assert('20.0', [20.001]); - assert('20.001', [20]); - try { - assert('20.0', [20.01]); - assert_unreached(); - } catch(e) { - assert_not_equals(e.message, "assert_unreached: Reached unreachable code"); - } - - assert('40e2', [4000.1]); - assert('40.001e2', [4000]); - try { - assert('40e2', [4001]); - assert_unreached(); - } catch(e) { - assert_not_equals(e.message, "assert_unreached: Reached unreachable code"); - } - - assert('40e+3', [40001]); - assert('40.001e+3', [40000]); - try { - assert('40e+3', [40010]); - assert_unreached(); - } catch(e) { - assert_not_equals(e.message, "assert_unreached: Reached unreachable code"); - } - - assert('50e-4', [0.0050001]); - assert('50.001e-4', [0.005]); - try { - assert('50e-4', [0.005001]); - assert_unreached(); - } catch(e) { - assert_not_equals(e.message, "assert_unreached: Reached unreachable code"); - } - -}, 'Checking assert_important_in_array works'); - -test(function() { - var ei = window.assert_styles_extract_important; - - assert_array_equals(ei('1'), [1]); - assert_array_equals(ei('10'), [10]); - assert_array_equals(ei('2.0'), [2.0]); - assert_array_equals(ei('20.0'), [20.0]); - assert_array_equals(ei('40e2'), [4000.0]); - assert_array_equals(ei('40e+3'), [40000.0]); - assert_array_equals(ei('50e-4'), [0.005]); - assert_array_equals(ei('60.6e-4'), [0.00606]); - - assert_array_equals(ei('+1'), [1]); - assert_array_equals(ei('+10'), [10]); - assert_array_equals(ei('+2.0'), [2.0]); - assert_array_equals(ei('+20.0'), [20.0]); - assert_array_equals(ei('+40e2'), [4000.0]); - assert_array_equals(ei('+40e+3'), [40000.0]); - assert_array_equals(ei('+50e-4'), [0.005]); - assert_array_equals(ei('+60.6e-4'), [0.00606]); - - assert_array_equals(ei('-1'), [-1]); - assert_array_equals(ei('-10'), [-10]); - assert_array_equals(ei('-2.0'), [-2.0]); - assert_array_equals(ei('-20.0'), [-20.0]); - assert_array_equals(ei('-40e2'), [-4000]); - assert_array_equals(ei('-50e-3'), [-0.05]); - assert_array_equals(ei('-60.6e-4'), [-0.00606]); - - assert_array_equals(ei('matrix(1%'), ['matrix', 1, '%']); - assert_array_equals(ei('matrix(10px'), ['matrix', 10, 'px']); - assert_array_equals(ei('matrix(2.0em'), ['matrix', 2.0, 'em']); - assert_array_equals(ei('matrix(20.0en'), ['matrix', 20.0, 'en']); - assert_array_equals(ei('matrix(40e2ve'), ['matrix', 4000.0, 've']); - assert_array_equals(ei('matrix(40e+3vw'), ['matrix', 40000.0, 'vw']); - assert_array_equals(ei('matrix(50e-4%'), ['matrix', 0.005, '%']); - - assert_array_equals(ei('matrix('), ['matrix']); - assert_array_equals(ei('blah'), ['blah']); - assert_array_equals(ei('+'), []); - assert_array_equals(ei('none'), ['none']); - assert_array_equals(ei('----'), []); - assert_array_equals(ei('-a'), ['a']); - assert_array_equals(ei('b.j'), ['b', 'j']); - - assert_array_equals(ei('matrix(1, 0, 0, 1, 0, 0)'), - ['matrix', 1, 0, 0, 1, 0, 0]); - assert_array_equals(ei('matrix(1 0 0 1 0 0)'), - ['matrix', 1, 0, 0, 1, 0, 0]); - assert_array_equals(ei('matrix(0.9511, 0.309, -0.309, 0.9511, 0, 0)'), - ['matrix', 0.9511, 0.309, -0.309, 0.9511, 0, 0]); - -}, 'Checking important parts are extracted successfully'); - -</script> diff --git a/third_party/polymer/components/web-animations-js/test/testcases/unit-test-unpause.html b/third_party/polymer/components/web-animations-js/test/testcases/unit-test-unpause.html deleted file mode 100644 index 4377531..0000000 --- a/third_party/polymer/components/web-animations-js/test/testcases/unit-test-unpause.html +++ /dev/null @@ -1,68 +0,0 @@ -<!-- -Copyright 2013 Google Inc. All Rights Reserved. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. ---> - -<!DOCTYPE html><meta charset="UTF-8"> -<style> -div.anim { - position: relative; - left: 0px; -} -</style> - -<div id="anim" class="anim"></div> - -<script src="../bootstrap.js"></script> -<script> -"use strict"; - -var effect = [{left: "100px"}, {left: "200px"}]; - -var testPauseUnpause = function(name, player) { - player.currentTime = 5.0; - player.paused = true; - test(function() {assert_equals(player.currentTime, 5.0)}, - name + " AnimationPlayer.currentTime should be unaffected by pausing"); - player.paused = false; - test(function() {assert_equals(player.currentTime, 5.0)}, - name + " AnimationPlayer.currentTime should be unaffected by unpausing"); -}; - -// Test that an AnimationPlayer's currentTime is correct after pausing and -// unpausing, with a zero startTime. -addEventListener("load", function() { - testPauseUnpause("zero starttime,", document.timeline.play(new Animation( - document.getElementById("anim"), effect, 1.0))); - -}); - -// Test that an AnimationPlayer's currentTime is correct after pausing and -// unpausing, with a non-zero startTime. -addEventListener("load", function() { - var player = document.timeline.play(new Animation( - document.getElementById("anim"), effect, 1.0)); - test(function() {assert_equals(player.startTime > 0, true)}, - "AnimationPlayer has started"); - testPauseUnpause("non-zero starttime,", player); -}); - -// TODO: Test pausing and unpausing with a forced currentTime while the -// Timeline is not started. See -// https://github.com/web-animations/web-animations-js/issues/167 - -// FIXME! - Make this actually test something... -test(function() { assert_true(true); }, "Dummy test"); - -</script> diff --git a/third_party/polymer/components/web-animations-js/test/testharness_timing.css b/third_party/polymer/components/web-animations-js/test/testharness_timing.css deleted file mode 100644 index 35d25c4..0000000 --- a/third_party/polymer/components/web-animations-js/test/testharness_timing.css +++ /dev/null @@ -1,75 +0,0 @@ -html, body { - height: 100%; - padding: 0; - margin: 0; -} - -#timeline { - position: fixed; - height: 35px; - bottom: 2px; - left: 0; - width: calc(100% - 50px); - - padding-left: 25px; - padding-right: 25px; -} - -#timeline div.bar { - position: absolute; - border: 1px solid black; - top: 25px; - height: 10px; - width: calc(100% - 135px); -} - -#timeline button { - float: right; - margin: 1px; - margin-top: 17px; - height: 20px; - width: 20px; -} - -#timeline #control { - width: 30px; - font-size: 6pt; - padding: 0; -} - -#timeline div.progress { - background-color: black; - height: 100%; -} - -img.marker { - position: absolute; - top: -25px; - width: 20px; - height: 30px; -} - -div.info { - border: 1px solid black; - border-radius: 10px; - padding: 5px; - position: absolute; - bottom: 40px; - background: white; -} - -div.info pre { - display: block; -} - -#results tr td:last-child { - white-space: pre; - font-family: monospace; -} - -#debug { - width: 100%; - height: 400px; - overflow-y: scroll; - border: 1px solid black; -} diff --git a/third_party/polymer/components/web-animations-js/test/update-testcases.py b/third_party/polymer/components/web-animations-js/test/update-testcases.py deleted file mode 100755 index 5f49556..0000000 --- a/third_party/polymer/components/web-animations-js/test/update-testcases.py +++ /dev/null @@ -1,63 +0,0 @@ -#!/usr/bin/python - -import cStringIO as StringIO -from fnmatch import fnmatch -import difflib -import os -import sys - - -def get_name(filename): - return os.path.splitext(filename)[0] - - -def list_dir(dir_path, filter_func): - return sorted(filter(filter_func, os.listdir(dir_path)), key=get_name) - - -def main(): - test_dir = os.path.dirname(os.path.realpath(__file__)) - testcase_dir = os.path.join(test_dir, 'testcases') - testcase_file = os.path.join(test_dir, 'testcases.js') - - def is_testcase_file(filename): - return ( - fnmatch(filename, "*.html") and - not fnmatch(filename, "manual-test*") and - not fnmatch(filename, "disabled-*")) - - new_testcases = StringIO.StringIO() - new_testcases.write("""\ -// This file is automatically generated by test/update-testcases.py. -// Disable tests by adding them to test/disabled-testcases -""") - new_testcases.write('var tests = [\n \'') - new_testcases.write( - '\',\n \''.join(list_dir(testcase_dir, is_testcase_file))) - new_testcases.write('\',\n];\n') - new_testcases.seek(0) - new_testcases_lines = new_testcases.readlines() - - current_testcases_lines = file(testcase_file).readlines() - - lines = list(difflib.unified_diff( - current_testcases_lines, new_testcases_lines, - fromfile=testcase_file, tofile=testcase_file)) - - if len(lines) == 0: - sys.stdout.write('Nothing to do\n') - sys.exit(0) - - if not "--dry-run" in sys.argv: - file(testcase_file, "w").write("".join(new_testcases_lines)) - sys.stdout.write( - 'Updating %s with the following diff.\n' % testcase_file) - - for line in lines: - sys.stdout.write(line) - - sys.exit(1) - - -if __name__ == '__main__': - main() diff --git a/third_party/polymer/components/web-animations-js/tools/.keepme b/third_party/polymer/components/web-animations-js/tools/.keepme deleted file mode 100644 index e69de29..0000000 --- a/third_party/polymer/components/web-animations-js/tools/.keepme +++ /dev/null diff --git a/third_party/polymer/components/web-animations-js/tools/android/config.sh b/third_party/polymer/components/web-animations-js/tools/android/config.sh deleted file mode 100755 index 1f5d7cc..0000000 --- a/third_party/polymer/components/web-animations-js/tools/android/config.sh +++ /dev/null @@ -1,8 +0,0 @@ -#! /bin/bash - -OLD_PWD=$PWD -EMULATOR_PIDFILE=$ANDROID_DIR/emulator.pid -CHROMEDRIVER_PIDFILE=$ANDROID_DIR/chromedriver.pid -XVFB_PIDFILE=$ANDROID_DIR/xvfb.pid - -SERVERS="EMULATOR CHROMEDRIVER XVFB" diff --git a/third_party/polymer/components/web-animations-js/tools/android/setup.sh b/third_party/polymer/components/web-animations-js/tools/android/setup.sh deleted file mode 100755 index 376c7e6..0000000 --- a/third_party/polymer/components/web-animations-js/tools/android/setup.sh +++ /dev/null @@ -1,152 +0,0 @@ -#! /bin/bash - -# Create the Android environment needed by run-tests.py -set -e -ANDROID_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" -. $ANDROID_DIR/config.sh -cd $ANDROID_DIR - -# Download the android emulator and adb -if [ ! -d adt ]; then - wget -c https://dl.google.com/android/adt/adt-bundle-linux-$(uname -p)-20131030.zip -O adt.zip - unzip adt.zip > /dev/null - ls -l adt* - mv adt-bundle-linux-* adt -fi -export ADB="$ANDROID_DIR/adt/sdk/platform-tools/adb -e" -export EMULATOR=$ANDROID_DIR/adt/sdk/tools/emulator -export AVD=$ANDROID_DIR/adt/sdk/tools/android - -# Create an Android Virtual Device -if [ ! -e avd ]; then - echo "" | $AVD --verbose create avd -n Android-Chrome --target 1 --force --path avd -fi - -# See if the emulator is running? The emulator occasionally segfaults when -# starting, so we try this in a loop. -while true; do - EMULATOR_RUNNING=false - if [ -e $EMULATOR_PIDFILE ]; then - EMULATOR_PID=$(cat $EMULATOR_PIDFILE) - if kill -0 $EMULATOR_PID ; then - EMULATOR_RUNNING=true - else - rm $EMULATOR_PIDFILE - fi - fi - if $EMULATOR_RUNNING ; then - echo "Android emulator running at $EMULATOR_PID" - else - # The emulator needs an xserver, start xvfb if none are running. - if [ "x$DISPLAY" == x ]; then - export DISPLAY=:99.0 - # xvfb must use 24bits otherwise you get a "failed to create drawable" error - # from the emulator. See the following bug for more information - # https://bugs.freedesktop.org/show_bug.cgi?id=62742 - /sbin/start-stop-daemon --start --quiet --pidfile $XVFB_PIDFILE --make-pidfile --background --exec \ - /usr/bin/Xvfb -- :99 +extension GLX -ac -screen 0 1280x1024x24 - sleep 15 - fi - - $ADB kill-server - $ADB start-server - if [ $($ADB devices | wc -l) -gt 2 ]; then - echo "Multiple Android devices found, bailing." - exit 1 - fi - # "-no-snapshot-save -wipe-data" is needed so not state is saved. - # "-gpu on" is needed as Chrome segfaults without a GPU. - /sbin/start-stop-daemon --verbose --start --quiet --pidfile $EMULATOR_PIDFILE --make-pidfile --background --exec /bin/bash -- -c \ - "exec $EMULATOR -verbose -gpu on -no-audio -no-boot-anim -partition-size 1024 -no-snapshot-save -wipe-data @Android-Chrome >> $OLD_PWD/emulator.log 2>&1" - - # The emulator crashes if you access it too fast :/ - sleep 5 - continue - fi - - $ADB wait-for-device shell true - - BOOTED=$($ADB shell getprop sys.boot_completed | sed -e's/[^0-9]*//g') - BOOTANIM=$($ADB shell getprop init.svc.bootanim | sed -e's/[^a-zA-Z]*//g') - echo "Waiting for emulator to boot... Booted? $BOOTED Animation? $BOOTANIM" - - if [ x$BOOTED == x1 -a x$BOOTANIM == xstopped ]; then - - # Make localhost refer to the host machine, not the emulator. - # See http://developer.android.com/tools/devices/emulator.html#emulatornetworking - echo "Redirecting localhost" - $ADB shell mount -o remount,rw -t yaffs2 /dev/block/mtdblock0 /system - $ADB shell echo "10.0.2.2 localhost" \> /etc/hosts - - break - else - sleep 5 - fi -done - -# Download and install the chrome apk. -if [ -e Chrome.apk ]; then - CHROME_APK=$ANDROID_DIR/Chrome.apk - CHROME_APP=com.google.android.apps.chrome - CHROME_ACT=.Main -else - if [ ! -e chrome-android/apks/ChromeShell.apk ]; then - LATEST_APK=`curl -s http://commondatastorage.googleapis.com/chromium-browser-continuous/Android/LAST_CHANGE` - REMOTE_APK=http://commondatastorage.googleapis.com/chromium-browser-continuous/Android/$LATEST_APK/chrome-android.zip - wget -c $REMOTE_APK - unzip chrome-android.zip - fi - CHROME_APK=$ANDROID_DIR/chrome-android/apks/ChromeShell.apk - CHROME_APP=org.chromium.chrome.shell - CHROME_ACT=.ChromeShellActivity -fi - -function start_chrome () { - $ADB shell am start -a android.intent.action.MAIN -n $CHROME_APP/$CHROME_ACT -W -} - -if start_chrome | grep -q "does not exist"; then - $ADB install $CHROME_APK -fi - -# Check the chrome binary actually starts without segfaulting -start_chrome -sleep 2 -if start_chrome | grep -q "its current task has been brought to the front"; then - echo "Chrome seems to have started okay." -else - echo "Chrome seems to have crashed!" - $ADB shell dumpsys activity # FIXME: Need to grep for running Chrome. - exit 1 -fi - - -# Download and start the chromedriver binary -if [ ! -e chromedriver ]; then - # TODO: Use the latest release of chromedriver instead of this custom build once version 3.0 comes out. - # LATEST_CHROMEDRIVER=`curl -s http://chromedriver.storage.googleapis.com/LATEST_RELEASE` - # wget -c http://chromedriver.storage.googleapis.com/$LATEST_CHROMEDRIVER/chromedriver_linux64.zip -O chromedriver.zip - # unzip chromedriver.zip - - # This version of chromedriver was build from the Chromium repository at r262639 on 2014-04-09. - wget https://googledrive.com/host/0B6C-LL9qmW-IYVFrdURCMHZlM1U -O chromedriver - chmod 0755 chromedriver -fi - -CHROMEDRIVER_NOTRUNNING=true -if [ -e $CHROMEDRIVER_PIDFILE ]; then - CHROMEDRIVER_PID=$(cat $CHROMEDRIVER_PIDFILE) - if kill -0 $CHROMEDRIVER_PID ; then - echo "Chrome Driver running at $CHROMEDRIVER_PID" - CHROMEDRIVER_NOTRUNNING=false - else - rm $CHROMEDRIVER_PIDFILE - fi -fi -if $CHROMEDRIVER_NOTRUNNING; then - /sbin/start-stop-daemon --verbose --start --quiet --pidfile $CHROMEDRIVER_PIDFILE --make-pidfile --background --exec \ - $ANDROID_DIR/chromedriver - sleep 5 -fi - -cd $OLD_PWD diff --git a/third_party/polymer/components/web-animations-js/tools/android/stop.sh b/third_party/polymer/components/web-animations-js/tools/android/stop.sh deleted file mode 100755 index 8bd3b50..0000000 --- a/third_party/polymer/components/web-animations-js/tools/android/stop.sh +++ /dev/null @@ -1,20 +0,0 @@ -#! /bin/bash - -# Stop all the stuff started by setup.sh -set -x -set -e -ANDROID_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" -. $ANDROID_DIR/config.sh -cd $ANDROID_DIR - -for SERVER in $SERVERS; do - PIDFILE_VAR=${SERVER}_PIDFILE - PIDFILE=${!PIDFILE_VAR} - echo "$SERVER $PIDFILE" - if [ -e $PIDFILE ]; then - echo "Stopping $SERVER at $(cat $PIDFILE)" - /sbin/start-stop-daemon --stop --pidfile $PIDFILE --retry TERM/30/KILL/5 || rm $PIDFILE - fi -done - -cd $OLD_PWD diff --git a/third_party/polymer/components/web-animations-js/tools/python/requirements.txt b/third_party/polymer/components/web-animations-js/tools/python/requirements.txt deleted file mode 100644 index 544c7b5..0000000 --- a/third_party/polymer/components/web-animations-js/tools/python/requirements.txt +++ /dev/null @@ -1,12 +0,0 @@ -testtools>=0.9.30 -python-subunit # subunit -selenium - --e svn+http://closure-linter.googlecode.com/svn/trunk/#egg=closure-linter - -# Requirements for using -x -pyvirtualdisplay -pyscreenshot ---allow-external=PIL ---allow-unverified=PIL -PIL diff --git a/third_party/polymer/components/web-animations-js/tools/python/run-tests.py b/third_party/polymer/components/web-animations-js/tools/python/run-tests.py deleted file mode 100755 index d87bef9..0000000 --- a/third_party/polymer/components/web-animations-js/tools/python/run-tests.py +++ /dev/null @@ -1,813 +0,0 @@ -#!/usr/bin/python -# -# -*- coding: utf-8 -*- -# vim: set ts=4 sw=4 et sts=4 ai: - -import atexit -import base64 -import cStringIO as StringIO -import getpass -import httplib -import json as simplejson -import os -import platform -import pprint -import re -import socket -import sys -import time -import urllib2 -import zipfile - -import argparse -parser = argparse.ArgumentParser() - -parser.add_argument( - "-b", "--browser", type=str, required=True, - choices=['Firefox', 'Chrome', 'Ie', 'PhantomJS', 'Remote'], - help="Which WebDriver to use.") - -parser.add_argument( - "-f", "--flag", action='append', default=[], - help="Command line flags to pass to the browser, " - "currently only available for Chrome. " - "Each flag must be a separate --flag invoccation.") - -parser.add_argument( - "-x", "--virtual", action='store_true', default=False, - help="Use a virtual screen system such as Xvfb, Xephyr or Xvnc.") - -parser.add_argument( - "-d", "--dontexit", action='store_true', default=False, - help="At end of testing, don't exit.") - -parser.add_argument( - "-v", "--verbose", action='store_true', default=False, - help="Output more information.") - -parser.add_argument( - "-u", "--upload", action='store_true', default=False, - help="Upload images to picture sharing site (http://postimage.org/)," - " only really useful for testbots.") - -# Only used by the Remote browser option. -parser.add_argument( - "--remote-executor", type=str, - help="Location of the Remote executor.") - -parser.add_argument( - "--remote-caps", action='append', - help="Location of capabilities to request on Remote executor.", - default=[]) - -parser.add_argument( - "-s", "--sauce", action='store_true', default=False, - help="Use the SauceLab's Selenium farm rather then locally starting" - " selenium. SAUCE_USERNAME and SAUCE_ACCESS_KEY must be set in" - " environment.") - -# Subunit / testrepository support -parser.add_argument( - "--subunit", action='store_true', default=False, - help="Output raw subunit binary data.") - -parser.add_argument( - "--list", action='store_true', default=False, - help="List tests which are available.") - -parser.add_argument( - "--load-list", type=argparse.FileType('r'), - help="List of tests to run.") - -args = parser.parse_args() - -if args.verbose and args.subunit: - raise SystemExit("--verbose and --subunit are not compatible.") - -# Make sure the repository is setup and the dependencies exist -# ----------------------------------------------------------------------------- - -import subprocess - -caps = {} -if not args.sauce: - # Get any selenium drivers we might need - if args.browser == "Chrome": - # Get ChromeDriver if it's not in the path... - # https://code.google.com/p/chromedriver/downloads/list - chromedriver_bin = "chromedriver" - chromedriver_url_tmpl = "http://chromedriver.storage.googleapis.com/2.6/chromedriver_%s%s.zip" # noqa - - if platform.system() == "Linux": - if platform.processor() == "x86_64": - # 64 bit binary needed - chromedriver_url = chromedriver_url_tmpl % ("linux", "64") - else: - # 32 bit binary needed - chromedriver_url = chromedriver_url_tmpl % ("linux", "32") - - elif platform.system() == "Darwin": - chromedriver_url = chromedriver_url_tmpl % ("mac", "32") - elif platform.system() == "win32": - chromedriver_url = chromedriver_url_tmpl % ("win", "32") - chromedriver_url = "chromedriver.exe" - - try: - if subprocess.call(chromedriver_bin) != 0: - raise OSError("Return code?") - except OSError: - chromedriver_local = os.path.join("tools", chromedriver_bin) - - if not os.path.exists(chromedriver_local): - datafile = StringIO.StringIO( - urllib2.urlopen(chromedriver_url).read()) - contents = zipfile.ZipFile(datafile, 'r') - contents.extract(chromedriver_bin, "tools") - - chromedriver = os.path.realpath(chromedriver_local) - os.chmod(chromedriver, 0755) - else: - chromedriver = "chromedriver" - - elif args.browser == "Firefox": - pass - - elif args.browser == "PhantomJS": - phantomjs_bin = None - if platform.system() == "Linux": - phantomjs_bin = "phantomjs" - if platform.processor() == "x86_64": - # 64 bit binary needed - phantomjs_url = "https://phantomjs.googlecode.com/files/phantomjs-1.9.0-linux-x86_64.tar.bz2" # noqa - else: - # 32 bit binary needed - phantomjs_url = "https://phantomjs.googlecode.com/files/phantomjs-1.9.0-linux-i686.tar.bz2" # noqa - - phantomjs_local = os.path.join("tools", phantomjs_bin) - if not os.path.exists(phantomjs_local): - datafile = StringIO.StringIO( - urllib2.urlopen(phantomjs_url).read()) - contents = tarfile.TarFile.open(fileobj=datafile, mode='r:bz2') - file("tools/"+phantomjs_bin, "w").write( - contents.extractfile( - "phantomjs-1.9.0-linux-x86_64/bin/"+phantomjs_bin - ).read()) - - phantomjs = os.path.realpath(phantomjs_local) - os.chmod(phantomjs, 0755) - else: - if platform.system() == "Darwin": - phantomjs_url = "https://phantomjs.googlecode.com/files/phantomjs-1.9.0-macosx.zip" # noqa - phantomjs_bin = "phantomjs" - - elif platform.system() == "win32": - chromedriver_bin = "https://phantomjs.googlecode.com/files/phantomjs-1.9.0-windows.zip" # noqa - phantomjs_url = "phantomjs.exe" - - phantomjs_local = os.path.join("tools", phantomjs_bin) - if not os.path.exists(phantomjs_local): - datafile = StringIO.StringIO( - urllib2.urlopen(phantomjs_url).read()) - contents = zipfile.ZipFile(datafile, 'r') - contents.extract(phantomjs_bin, "tools") - - phantomjs = os.path.realpath(phantomjs_local) - os.chmod(phantomjs, 0755) -else: - assert os.environ['SAUCE_USERNAME'] - assert os.environ['SAUCE_ACCESS_KEY'] - sauce_username = os.environ['SAUCE_USERNAME'] - sauce_access_key = os.environ['SAUCE_ACCESS_KEY'] - - # Download the Sauce Connect script - sauce_connect_url = "http://saucelabs.com/downloads/Sauce-Connect-latest.zip" # noqa - sauce_connect_bin = "Sauce-Connect.jar" - sauce_connect_local = os.path.join("tools", sauce_connect_bin) - if not os.path.exists(sauce_connect_local): - datafile = StringIO.StringIO(urllib2.urlopen(sauce_connect_url).read()) - contents = zipfile.ZipFile(datafile, 'r') - contents.extract(sauce_connect_bin, "tools") - - if 'TRAVIS_JOB_NUMBER' in os.environ: - tunnel_id = os.environ['TRAVIS_JOB_NUMBER'] - else: - tunnel_id = "%s:%s" % (socket.gethostname(), os.getpid()) - args.remote_caps.append('tunnel-identifier=%s' % tunnel_id) - - # Kill the tunnel when we die - def kill_tunnel(sauce_tunnel): - if sauce_tunnel.returncode is None: - sauce_tunnel.terminate() - - timeout = time.time() - while sauce_tunnel.poll() is None: - if time.time() - timeout < 30: - time.sleep(1) - else: - sauce_tunnel.kill() - - readyfile = "."+tunnel_id - sauce_tunnel = None - try: - sauce_log = file("sauce_tunnel.log", "w") - sauce_tunnel = subprocess.Popen( - ["java", "-jar", sauce_connect_local, - "--readyfile", readyfile, - "--tunnel-identifier", tunnel_id, - sauce_username, sauce_access_key], - stdout=sauce_log, stderr=sauce_log) - - atexit.register(kill_tunnel, sauce_tunnel) - - # Wait for the tunnel to come up - while not os.path.exists(readyfile): - time.sleep(0.5) - - except: - if sauce_tunnel: - kill_tunnel(sauce_tunnel) - raise - - args.remote_executor = "http://%s:%s@localhost:4445/wd/hub" % ( - sauce_username, sauce_access_key) - - custom_data = {} - git_info = subprocess.Popen( - ["git", "describe", "--all", "--long"], stdout=subprocess.PIPE - ).communicate()[0] - custom_data["git-info"] = git_info - - git_commit = subprocess.Popen( - ["git", "rev-parse", "HEAD"], stdout=subprocess.PIPE - ).communicate()[0] - custom_data["git-commit"] = git_commit - - caps['tags'] = [] - if 'TRAVIS_BUILD_NUMBER' in os.environ: - # Send travis information upstream - caps['build'] = "%s %s" % ( - os.environ['TRAVIS_REPO_SLUG'], - os.environ['TRAVIS_BUILD_NUMBER'], - ) - caps['name'] = "Travis run for %s" % os.environ['TRAVIS_REPO_SLUG'] - - caps['tags'].append( - "repo=%s" % os.environ['TRAVIS_REPO_SLUG']) - caps['tags'].append( - "branch=%s" % os.environ['TRAVIS_BRANCH']) - - travis_env = [ - 'TRAVIS_BRANCH', - 'TRAVIS_BUILD_ID', - 'TRAVIS_BUILD_NUMBER', - 'TRAVIS_COMMIT', - 'TRAVIS_COMMIT_RANGE', - 'TRAVIS_JOB_ID', - 'TRAVIS_JOB_NUMBER', - 'TRAVIS_PULL_REQUEST', - 'TRAVIS_REPO_SLUG', - ] - - for env in travis_env: - tag = env[len('TRAVIS_'):].lower() - value = os.environ.get(env, None) - if not value: - continue - custom_data[tag] = value - - custom_data["github-url"] = ( - "https://github.com/%s/tree/%s" % ( - os.environ['TRAVIS_REPO_SLUG'], git_commit)) - custom_data["travis-url"] = ( - "https://travis-ci.org/%s/builds/%s" % ( - os.environ['TRAVIS_REPO_SLUG'], - os.environ['TRAVIS_BUILD_ID'])) - else: - # Collect information about who/what is running the test - caps['name'] = "Manual run for %s" % getpass.getuser() - caps['build'] = git_info - - caps['tags'].append('user=%s' % getpass.getuser()) - caps['tags'].append('host=%s' % socket.gethostname()) - -# ----------------------------------------------------------------------------- - -import subunit -import testtools - -if args.list: - data = file("test/testcases.js").read() - for test in re.compile("(?<=').+(?=')").findall(data): - print test[:-5] - sys.exit(-1) - -if args.load_list: - tests = list(set(x.split(':')[0].strip()+'.html' - for x in args.load_list.readlines())) -else: - tests = [] - -# Collect summary of all the individual test runs -summary = testtools.StreamSummary() - -# Output information to stdout -if not args.subunit: - # Output test failures - result_streams = [testtools.TextTestResult(sys.stdout)] - if args.verbose: - import unittest - # Output individual test progress - result_streams.insert(0, - unittest.TextTestResult( - unittest.runner._WritelnDecorator(sys.stdout), False, 2)) - # Human readable test output - pertest = testtools.StreamToExtendedDecorator( - testtools.MultiTestResult(*result_streams)) -else: - from subunit.v2 import StreamResultToBytes - pertest = StreamResultToBytes(sys.stdout) - - if args.list: - output = subunit.CopyStreamResult([summary, pertest]) - output.startTestRun() - for test in re.compile("(?<=').+(?=')").findall( - file("test/testcases.js").read()): - output.status(test_status='exists', test_id=test[:-5]) - - output.stopTestRun() - sys.exit(-1) - -output = subunit.CopyStreamResult([summary, pertest]) -output.startTestRun() - -# Start up a local HTTP server which serves the files to the browser and -# collects the test results. -# ----------------------------------------------------------------------------- -import SimpleHTTPServer -import SocketServer -import threading -import cgi -import re - -import itertools -import mimetools -import mimetypes - - -class MultiPartForm(object): - """Accumulate the data to be used when posting a form.""" - - def __init__(self): - self.form_fields = [] - self.files = [] - self.boundary = mimetools.choose_boundary() - return - - def get_content_type(self): - return 'multipart/form-data; boundary=%s' % self.boundary - - def add_field(self, name, value): - """Add a simple field to the form data.""" - self.form_fields.append((name, value)) - return - - def add_file(self, fieldname, filename, fileHandle, mimetype=None): - """Add a file to be uploaded.""" - body = fileHandle.read() - if mimetype is None: - mimetype = ( - mimetypes.guess_type(filename)[0] or - 'application/octet-stream') - self.files.append((fieldname, filename, mimetype, body)) - return - - def __str__(self): - """Return a string representing the form data, with attached files.""" - # Build a list of lists, each containing "lines" of the - # request. Each part is separated by a boundary string. - # Once the list is built, return a string where each - # line is separated by '\r\n'. - parts = [] - part_boundary = '--' + self.boundary - - # Add the form fields - parts.extend([ - part_boundary, - 'Content-Disposition: form-data; name="%s"' % name, - '', - value, - ] for name, value in self.form_fields) - - # Add the files to upload - parts.extend([ - part_boundary, - 'Content-Disposition: file; name="%s"; filename="%s"' % ( - field_name, filename), - 'Content-Type: %s' % content_type, - '', - body, - ] for field_name, filename, content_type, body in self.files) - - # Flatten the list and add closing boundary marker, - # then return CR+LF separated data - flattened = list(str(b) for b in itertools.chain(*parts)) - flattened.append('--' + self.boundary + '--') - flattened.append('') - return '\r\n'.join(flattened) - - -critical_failure = False - - -class ServerHandler(SimpleHTTPServer.SimpleHTTPRequestHandler): - STATUS = {0: 'success', 1: 'fail', 2: 'fail', 3: 'skip'} - - # Make the HTTP requests be quiet - def log_message(self, format, *a): - if args.verbose: - SimpleHTTPServer.SimpleHTTPRequestHandler.log_message( - self, format, *a) - - def do_POST(self): - global critical_failure - already_failed = critical_failure - - form = cgi.FieldStorage( - fp=self.rfile, - headers=self.headers, - environ={ - 'REQUEST_METHOD': 'POST', - 'CONTENT_TYPE': self.headers['Content-Type'], - }) - - overall_status = 0 - test_id = None - try: - json_data = form.getvalue('data') - data = simplejson.loads(json_data) - except ValueError, e: - critical_failure = True - - test_id = "CRITICAL-FAILURE" - - msg = "Unable to decode JSON object (%s)\n%s" % (e, json_data) - overall_status = 1 - output.status( - test_id="CRITICAL-FAILURE", - test_status='fail', - test_tags=[args.browser], - file_name='traceback', - file_bytes=msg, - mime_type='text/plain; charset=UTF-8', - eof=True) - else: - test_id = data['testName'][:-5] - for result in data['results']: - info = dict(result) - info.pop('_structured_clone', None) - - if not isinstance(result['message'], (str, unicode)): - msg = str(result['message']) - else: - msg = result['message'] - - overall_status += result['status'] - output.status( - test_id="%s:%s" % (test_id, result['name']), - test_status=self.STATUS[result['status']], - test_tags=[args.browser], - file_name='traceback', - file_bytes=msg, - mime_type='text/plain; charset=UTF-8', - eof=True) - - if args.verbose and 'debug' in data and overall_status > 0: - output.status( - test_id="%s:debug-log" % (test_id), - test_status='fail', - test_tags=[args.browser], - file_name='traceback', - file_bytes=data['debug'], - mime_type='text/plain; charset=UTF-8', - eof=True) - - # Take a screenshot of result if a failure occurred. - if overall_status > 0 and (args.virtual or args.browser == "Remote"): - time.sleep(1) - - try: - screenshot = test_id + '.png' - if args.virtual: - disp.grab().save(screenshot) - elif args.browser == "Remote": - global browser - browser.save_screenshot(screenshot) - - # On android we want to do a - # adb run /system/bin/screencap -p /sdcard/FILENAME.png - # adb cp FILENAME.png .... - - if args.upload and not already_failed: - form = MultiPartForm() - form.add_field('adult', 'no') - form.add_field('optsize', '0') - form.add_file( - 'upload[]', screenshot, fileHandle=open(screenshot, 'rb')) - - request = urllib2.Request("http://postimage.org/") - body = str(form) - request.add_header('Content-type', form.get_content_type()) - request.add_header('Content-length', len(body)) - request.add_data(body) - - result = urllib2.urlopen(request).read() - print "Screenshot at:", re.findall("""<td><textarea wrap='off' onmouseover='this.focus\(\)' onfocus='this.select\(\)' id="code_1" scrolling="no">([^<]*)</textarea></td>""", result) # noqa - except Exception, e: - print e - - response = "OK" - self.send_response(200) - self.send_header("Content-type", "text/plain") - self.send_header("Content-length", len(response)) - self.end_headers() - self.wfile.write(response) - self.wfile.close() - -if args.sauce: - port = 55001 -else: - port = 0 # Bind to any port on localhost - -while True: - try: - httpd = SocketServer.TCPServer( - ("127.0.0.1", port), - ServerHandler) - break - except socket.error as e: - print e - time.sleep(5) - -port = httpd.socket.getsockname()[-1] -print "Serving at", port - -httpd_thread = threading.Thread(target=httpd.serve_forever) -httpd_thread.daemon = True -httpd_thread.start() - - -# Start up a virtual display, useful for testing on headless servers. -# ----------------------------------------------------------------------------- - -VIRTUAL_SIZE = (1024, 2000) - -# PhantomJS doesn't need a display -disp = None -if args.virtual and args.browser != "PhantomJS": - from pyvirtualdisplay.smartdisplay import SmartDisplay - - try: - disp = SmartDisplay( - visible=0, bgcolor='black', size=VIRTUAL_SIZE).start() - atexit.register(disp.stop) - except: - if disp: - disp.stop() - raise - - -# Start up the web browser and run the tests. -# ---------------------------------------------------------------------------- - -from selenium import webdriver -from selenium.common import exceptions as selenium_exceptions -from selenium.webdriver.common.keys import Keys as selenium_keys - -driver_arguments = {} -if args.browser == "Chrome": - import tempfile - import shutil - - # We reference shutil to make sure it isn't garbaged collected before we - # use it. - def directory_cleanup(directory, shutil=shutil): - try: - shutil.rmtree(directory) - except OSError, e: - pass - - try: - user_data_dir = tempfile.mkdtemp() - atexit.register(directory_cleanup, user_data_dir) - except: - directory_cleanup(user_data_dir) - raise - - driver_arguments['chrome_options'] = webdriver.ChromeOptions() - # Make printable - webdriver.ChromeOptions.__repr__ = lambda self: str(self.__dict__) - chrome_flags = [ - '--user-data-dir=%s' % user_data_dir, - '--enable-logging', - '--start-maximized', - '--disable-default-apps', - '--disable-extensions', - '--disable-plugins', - ] - chrome_flags += args.flag - # Travis-CI uses OpenVZ containers which are incompatible with the sandbox - # technology. - # See https://code.google.com/p/chromium/issues/detail?id=31077 for more - # information. - if 'TRAVIS' in os.environ: - chrome_flags += [ - '--no-sandbox', - '--disable-setuid-sandbox', - '--allow-sandbox-debugging', - ] - for flag in chrome_flags: - driver_arguments['chrome_options'].add_argument(flag) - - #driver_arguments['chrome_options'].binary_location = ( - # '/usr/bin/google-chrome') - driver_arguments['executable_path'] = chromedriver - - -elif args.browser == "Firefox": - driver_arguments['firefox_profile'] = webdriver.FirefoxProfile() - # Firefox will often pop-up a dialog saying "script is taking too long" or - # similar. So we can notice this problem we use "accept" rather then the - # default "dismiss". - webdriver.DesiredCapabilities.FIREFOX[ - "unexpectedAlertBehaviour"] = "accept" - -elif args.browser == "PhantomJS": - driver_arguments['executable_path'] = phantomjs - driver_arguments['service_args'] = ['--remote-debugger-port=9000'] - -elif args.browser == "Remote": - driver_arguments['command_executor'] = args.remote_executor - - for arg in args.remote_caps: - if not arg.strip(): - continue - - if arg.find('=') < 0: - caps.update(getattr( - webdriver.DesiredCapabilities, arg.strip().upper())) - else: - bits = arg.split('=') - base = caps - for arg in bits[:-2]: - if arg not in base: - base[arg] = {} - base = base[arg] - base[bits[-2]] = bits[-1] - driver_arguments['desired_capabilities'] = caps - -major_failure = False -browser = None -session_id = None -try: - try: - if args.verbose: - print driver_arguments - browser = getattr(webdriver, args.browser)(**driver_arguments) - session_id = browser.session_id - atexit.register(browser.quit) - except: - if browser: - browser.quit() - raise - - # Load an empty page so the body element is always visible - browser.get('data:text/html;charset=utf-8,<!DOCTYPE html><html><body>EMPTY</body></html>') # noqa - if args.virtual and args.browser == "Firefox": - # Calling browser.maximize_window() doesn't work as we don't have a - # window manager, so instead we for the size/position. - browser.set_window_position(0, 0) - browser.set_window_size(*VIRTUAL_SIZE) - # Also lets go into full screen mode to get rid of the "Chrome" around - # the edges. - e = browser.find_element_by_tag_name('body') - e.send_keys(selenium_keys.F11) - - url = 'http://localhost:%i/test/test-runner.html?%s' % ( - port, "|".join(tests)) - browser.get(url) - - def close_other_windows(browser, url): - for win in browser.window_handles: - browser.switch_to_window(win) - if browser.current_url != url: - browser.close() - browser.switch_to_window(browser.window_handles[0]) - - while True: - # Sometimes other windows are accidently opened (such as an extension - # popup), close them. - if len(browser.window_handles) > 1: - close_other_windows(browser, url) - - try: - v = browser.execute_script('return window.finished') - if v: - break - - try: - progress = browser.execute_script('return window.getTestRunnerProgress()') - status = '%s/%s (%s%%)' % (progress['completed'], progress['total'], - 100 * progress['completed'] // progress['total']) - except selenium_exceptions.WebDriverException, e: - status = e - - print 'Running tests...', status - sys.stdout.flush() - time.sleep(1) - - # Deal with unexpected alerts, sometimes they are dismissed by - # alternative means so we have to deal with that case too. - except selenium_exceptions.UnexpectedAlertPresentException, e: - try: - alert = browser.switch_to_alert() - sys.stderr.write("""\ -WARNING: Unexpected alert found! ---------------------------------------------------------------------- -%s ---------------------------------------------------------------------- -""" % alert.text) - alert.dismiss() - except selenium_exceptions.NoAlertPresentException, e: - sys.stderr.write( - "WARNING: Unexpected alert" - " which dissappeared on it's own!\n" - ) - sys.stderr.flush() - -except Exception, e: - import traceback - sys.stderr.write(traceback.format_exc()) - major_failure = True - -finally: - output.stopTestRun() - - if args.browser == "Chrome": - log_path = os.path.join(user_data_dir, "chrome_debug.log") - if os.path.exists(log_path): - shutil.copy(log_path, ".") - else: - print "Unable to find Chrome log file:", log_path - -if summary.testsRun == 0: - print - print "FAIL: No tests run!" - -sys.stdout.flush() -sys.stderr.flush() - -while args.dontexit and browser.window_handles: - print "Waiting for you to close the browser...." - sys.stdout.flush() - sys.stderr.flush() - time.sleep(1) - -sys.stdout.flush() -sys.stderr.flush() - -# Annotate the success / failure to sauce labs -if args.sauce and session_id: - base64string = base64.encodestring( - '%s:%s' % (sauce_username, sauce_access_key))[:-1] - - custom_data["failures"] = summary.failures - custom_data["errors"] = summary.errors - custom_data["tests"] = summary.testsRun - custom_data["skipped"] = summary.skipped - - body_content = simplejson.dumps({ - "passed": summary.wasSuccessful(), - "custom-data": custom_data, - }) - connection = httplib.HTTPConnection("saucelabs.com") - connection.request( - 'PUT', '/rest/v1/%s/jobs/%s' % (sauce_username, session_id), - body_content, - headers={"Authorization": "Basic %s" % base64string}) - result = connection.getresponse() - print "Sauce labs updated:", result.status == 200 - - import hmac - from hashlib import md5 - key = hmac.new( - str("%s:%s" % (sauce_username, session_id)), - str(sauce_access_key), - md5).hexdigest() - url = "https://saucelabs.com/jobs/%s?auth=%s" % ( - browser.session_id, key) - print "Sauce lab output at:", url - -if summary.wasSuccessful() and summary.testsRun > 0 and not major_failure: - sys.exit(0) -else: - sys.exit(1) diff --git a/third_party/polymer/components/web-animations-js/tools/python/setup.sh b/third_party/polymer/components/web-animations-js/tools/python/setup.sh deleted file mode 100755 index 37de032..0000000 --- a/third_party/polymer/components/web-animations-js/tools/python/setup.sh +++ /dev/null @@ -1,60 +0,0 @@ -#! /bin/bash - -# Create the python environment needed by run-tests.py and closure-linter and -# other Python tools. - -OLD_PWD=$PWD - -DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" - -cd $DIR -if [ ! -f bin/activate ]; then - echo "Setting up Python environment in $DIR" - - if [ x$(which pip) == x -o x$(which virtualenv) == x ]; then - cat <<EOF -Can not autoinstall as pip and virtualenv are not avaliable. - -To install 'pip' please do one of the following; - -# sudo apt-get install python-pip python-virtualenv - -or - -# sudo easy_install pip -# sudo pip install virtualenv -EOF - exit 1 - fi - - if virtualenv --system-site-packages .; then - echo -e; - else - cat <<EOF -Was unable to set up the virtualenv environment. Please see output for errors. -EOF - exit 1 - fi -fi - -source bin/activate - -function ensureRequirementsMet() { - # Check if installed - pip install --no-download $@ > /dev/null 2>&1 - if [ $? -ne 0 ]; then - # Install dependencies - pip install --upgrade $@ - if [ $? -ne 0 ]; then - cat <<EOF -Unable to install dependencies. Please see error output above. -EOF - exit 1 - fi - fi -} - -ensureRequirementsMet 'pip>=1.5' -ensureRequirementsMet -r requirements.txt - -cd $OLD_PWD diff --git a/third_party/polymer/components/web-animations-js/tutorial/basic-animations/basic-animation-exercise-1.html b/third_party/polymer/components/web-animations-js/tutorial/basic-animations/basic-animation-exercise-1.html deleted file mode 100644 index 711b748..0000000 --- a/third_party/polymer/components/web-animations-js/tutorial/basic-animations/basic-animation-exercise-1.html +++ /dev/null @@ -1,62 +0,0 @@ -<!-- Copyright 2013 Google Inc. All Rights Reserved. - -Licensed under the Apache License, Version 2.0 (the "License"); you may not use -this file except in compliance with the License. You may obtain a copy of the -License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software distributed -under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -CONDITIONS OF ANY KIND, either express or implied. See the License for the -specific language governing permissions and limitations under the License. - ---> - -<!DOCTYPE html> - -<div class="content"> - - <div id="animNum">1</div> - - <div class="heading subTitle">Create a new basic animation</div> - - <div class="heading exercises">Exercise 1 - Moving Right</div> - - <p class="description">Now let's code some animation out! In the 'Try It - Yourself' block, you should see a default div block with class named 'test' - and ID named 'a' coloured in red. If you don't like the colour, you can - always change it around. Click on 'Update' when you have finished typing in - your code.</p> - <p class="description">Now we want to make the red rounded - rectangle move to 300px from left for 2 seconds. We should do the - following:</p> - - <code class="codeSamples">new Animation(document.querySelector("#a"), {left: - "300px"}, 2);</code> - - <div id="hideLabel" onclick="toggleSolution()">Show Solution</div> - <div id="toggleText" class="codeSamples"> - <code>new Animation(document.querySelector("#a"), {left: "300px"}, 2);</code> - </div> - - <div id="tryIt"></div> - - <ol class="description"> - <li><code>'new Animation()'</code> creates a new animation object.</li> - <li> - <code>'document.querySelector("#a")'</code> is a DOM method which - gets the element with id equals to 'a' from the HTML file. You - can always use <code>'document.getElementById("a")'</code> which - would result the same thing. Since we have defined its class - name as well, we can also select it using - <code>'document.querySelector(".test")'.</code> - </li> - <li><code>'{left: "300px"}'</code> is the effects of the animation. - In this case we are letting it move to 300px from left.</li> - <li><code>'2'</code> will set the duration of the animation to - 2 seconds. The bigger the number, the slower the animation - speed and vice versa.</li> - </ol> - -</div> <!-- content ending div -->
\ No newline at end of file diff --git a/third_party/polymer/components/web-animations-js/tutorial/basic-animations/basic-animation.html b/third_party/polymer/components/web-animations-js/tutorial/basic-animations/basic-animation.html deleted file mode 100644 index 1a65067..0000000 --- a/third_party/polymer/components/web-animations-js/tutorial/basic-animations/basic-animation.html +++ /dev/null @@ -1,120 +0,0 @@ -<!-- -Copyright 2013 Google Inc. All Rights Reserved. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. - ---> - -<!DOCTYPE html> - -<link rel="author" title="Sandy Phan, Sarah Heimlich", - href="mailto:sandyphan@google.com, sarahheimlich@google.com"> -<title>Create Basic Animation</title> -<meta name="flags" content="dom"> -<meta name="tutorial" content="Web Animations tutorials"> -<link rel="stylesheet" type="text/css" href="../tutorial-style.css"> -<script type="text/javascript" src="../jquery.js"></script> -<script type="text/javascript" src="../page-load.js"></script> - - - -<ul class="topMenu"> - <li><a href="../home-page.html">Home</a></li> - <li><a href="#">Tutorials</a> - <ul class="subMenu"> - <li><a href="basic-animation.html">Basic Animations</a></li> - <li><a href="../parallel/parallel.html">Parallel Animations</a></li> - <li> - <a href="../sequence/sequence.html">Sequence Animations</a> - </li> - <li> - <a href="../timing-dictionary/timing-dictionary.html">Timing Dictionary</a> - </li> - <li> - <a href="../timing-functions/timing-function.html">Timing Functions</a> - </li> - </ul> - </li> - <li><a href="../references/references.html">References</a></li> - <li><a href="../about.html">About</a></li> -</ul> - -<div id="main"> - - <div id="title">Web Animations Tutorial</div> - - <div class="line-separator"></div> - - <div class="content"> - - <p class="description">Web animations is to have a flash or GIF - animation intergrated onto the web page. Normal web animations - still require the use of plugins such as Java Applets, Shockwave, - Adobe Flash. In this tutorial, we will be showing you how to - create animations using javascript without the need of - installing plugins.</p> - - <br /> - - <div class="heading subTitle">Create a new basic animation</div> - - <p class="description">To create animations on objects such - as moving left, right, up, down, change colours, etc, use - the following interface:</p> - - <code class="codeSamples">new Animation(element, - {effect(s)}, {optional: timed items});</code> - - <ul> - <li><p class="description">'new Animation' creates an animation object, - 'element' is the DOM object or animation target that we want to - animate and it is a compulsory component and can be nullable. - For instance, 'element' can be a 'div' with, a 'p' (paragraph).</p> - </li> - - <li><p class="description">'effects' defines the types of effects - in animation such as move left, or right, or change colours, or - change opacity, etc. 'effects' is also a compulsory component as - well as nullable. This parameter can be of AnimationEffect object - or CustomAnimationEffect object. These effects will be shared with - any other animation objects referring to the same AnimationEffect - or CustomAnimationEffect object. In the case this component being - null, the animation will have a null effect.</p> - </li> - - <li><p class="description">'timed items' can be of type double or - timing dictionary and is nullable and optional component. When - this parameter is double, then it specifies the duartion of a - single iteration of the animation. If it is null, then the default - value for iteration duration would be zero is specified in the - Timing Dictionary.</p> - </li> - - </ul> - - </div> <!-- content ending div --> - -<div class="line-separator"></div> -</div> <!-- main ending div --> - -<ul class="sideMenu"> - <li id="menuLabel">Create Basic Animation</li> - <li>Basic Info</li> - <li>Exercise 1</li> - <li>Exercise 2</li> - <li>Exercise 3</li> - <li>Exercise 4</li> - <li>Exercise 5</li> -</ul> - -<script type="text/javascript" src="../try-it-yourself.js"></script>
\ No newline at end of file diff --git a/third_party/polymer/components/web-animations-js/tutorial/iframe-contents.html b/third_party/polymer/components/web-animations-js/tutorial/iframe-contents.html deleted file mode 100644 index 090edd7..0000000 --- a/third_party/polymer/components/web-animations-js/tutorial/iframe-contents.html +++ /dev/null @@ -1,29 +0,0 @@ -<!-- - Copyright 2013 Google Inc. All Rights Reserved. - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. ---> - -<html> - <head> - <style> - </style> - </head> - <body> - <script src='tutorial-testing.js'></script> - <script src='../web-animations.js'></script> - <script src='try-it-yourself.js'></script> - <script src='../test/extra-asserts.js'></script> - <link href='../test/animation-test-style.css'> - </body> -</html> diff --git a/third_party/polymer/components/web-animations-js/tutorial/jquery.js b/third_party/polymer/components/web-animations-js/tutorial/jquery.js deleted file mode 100644 index 67e3160..0000000 --- a/third_party/polymer/components/web-animations-js/tutorial/jquery.js +++ /dev/null @@ -1,9555 +0,0 @@ -/*! - * jQuery JavaScript Library v1.9.0 - * http://jquery.com/ - * - * Includes Sizzle.js - * http://sizzlejs.com/ - * - * Copyright 2005, 2012 jQuery Foundation, Inc. and other contributors - * Released under the MIT license - * http://jquery.org/license - * - * Date: 2013-1-14 - */ -(function( window, undefined ) { -"use strict"; -var - // A central reference to the root jQuery(document) - rootjQuery, - - // The deferred used on DOM ready - readyList, - - // Use the correct document accordingly with window argument (sandbox) - document = window.document, - location = window.location, - - // Map over jQuery in case of overwrite - _jQuery = window.jQuery, - - // Map over the $ in case of overwrite - _$ = window.$, - - // [[Class]] -> type pairs - class2type = {}, - - // List of deleted data cache ids, so we can reuse them - core_deletedIds = [], - - core_version = "1.9.0", - - // Save a reference to some core methods - core_concat = core_deletedIds.concat, - core_push = core_deletedIds.push, - core_slice = core_deletedIds.slice, - core_indexOf = core_deletedIds.indexOf, - core_toString = class2type.toString, - core_hasOwn = class2type.hasOwnProperty, - core_trim = core_version.trim, - - // Define a local copy of jQuery - jQuery = function( selector, context ) { - // The jQuery object is actually just the init constructor 'enhanced' - return new jQuery.fn.init( selector, context, rootjQuery ); - }, - - // Used for matching numbers - core_pnum = /[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source, - - // Used for splitting on whitespace - core_rnotwhite = /\S+/g, - - // Make sure we trim BOM and NBSP (here's looking at you, Safari 5.0 and IE) - rtrim = /^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, - - // A simple way to check for HTML strings - // Prioritize #id over <tag> to avoid XSS via location.hash (#9521) - // Strict HTML recognition (#11290: must start with <) - rquickExpr = /^(?:(<[\w\W]+>)[^>]*|#([\w-]*))$/, - - // Match a standalone tag - rsingleTag = /^<(\w+)\s*\/?>(?:<\/\1>|)$/, - - // JSON RegExp - rvalidchars = /^[\],:{}\s]*$/, - rvalidbraces = /(?:^|:|,)(?:\s*\[)+/g, - rvalidescape = /\\(?:["\\\/bfnrt]|u[\da-fA-F]{4})/g, - rvalidtokens = /"[^"\\\r\n]*"|true|false|null|-?(?:\d+\.|)\d+(?:[eE][+-]?\d+|)/g, - - // Matches dashed string for camelizing - rmsPrefix = /^-ms-/, - rdashAlpha = /-([\da-z])/gi, - - // Used by jQuery.camelCase as callback to replace() - fcamelCase = function( all, letter ) { - return letter.toUpperCase(); - }, - - // The ready event handler and self cleanup method - DOMContentLoaded = function() { - if ( document.addEventListener ) { - document.removeEventListener( "DOMContentLoaded", DOMContentLoaded, false ); - jQuery.ready(); - } else if ( document.readyState === "complete" ) { - // we're here because readyState === "complete" in oldIE - // which is good enough for us to call the dom ready! - document.detachEvent( "onreadystatechange", DOMContentLoaded ); - jQuery.ready(); - } - }; - -jQuery.fn = jQuery.prototype = { - // The current version of jQuery being used - jquery: core_version, - - constructor: jQuery, - init: function( selector, context, rootjQuery ) { - var match, elem; - - // HANDLE: $(""), $(null), $(undefined), $(false) - if ( !selector ) { - return this; - } - - // Handle HTML strings - if ( typeof selector === "string" ) { - if ( selector.charAt(0) === "<" && selector.charAt( selector.length - 1 ) === ">" && selector.length >= 3 ) { - // Assume that strings that start and end with <> are HTML and skip the regex check - match = [ null, selector, null ]; - - } else { - match = rquickExpr.exec( selector ); - } - - // Match html or make sure no context is specified for #id - if ( match && (match[1] || !context) ) { - - // HANDLE: $(html) -> $(array) - if ( match[1] ) { - context = context instanceof jQuery ? context[0] : context; - - // scripts is true for back-compat - jQuery.merge( this, jQuery.parseHTML( - match[1], - context && context.nodeType ? context.ownerDocument || context : document, - true - ) ); - - // HANDLE: $(html, props) - if ( rsingleTag.test( match[1] ) && jQuery.isPlainObject( context ) ) { - for ( match in context ) { - // Properties of context are called as methods if possible - if ( jQuery.isFunction( this[ match ] ) ) { - this[ match ]( context[ match ] ); - - // ...and otherwise set as attributes - } else { - this.attr( match, context[ match ] ); - } - } - } - - return this; - - // HANDLE: $(#id) - } else { - elem = document.getElementById( match[2] ); - - // Check parentNode to catch when Blackberry 4.6 returns - // nodes that are no longer in the document #6963 - if ( elem && elem.parentNode ) { - // Handle the case where IE and Opera return items - // by name instead of ID - if ( elem.id !== match[2] ) { - return rootjQuery.find( selector ); - } - - // Otherwise, we inject the element directly into the jQuery object - this.length = 1; - this[0] = elem; - } - - this.context = document; - this.selector = selector; - return this; - } - - // HANDLE: $(expr, $(...)) - } else if ( !context || context.jquery ) { - return ( context || rootjQuery ).find( selector ); - - // HANDLE: $(expr, context) - // (which is just equivalent to: $(context).find(expr) - } else { - return this.constructor( context ).find( selector ); - } - - // HANDLE: $(DOMElement) - } else if ( selector.nodeType ) { - this.context = this[0] = selector; - this.length = 1; - return this; - - // HANDLE: $(function) - // Shortcut for document ready - } else if ( jQuery.isFunction( selector ) ) { - return rootjQuery.ready( selector ); - } - - if ( selector.selector !== undefined ) { - this.selector = selector.selector; - this.context = selector.context; - } - - return jQuery.makeArray( selector, this ); - }, - - // Start with an empty selector - selector: "", - - // The default length of a jQuery object is 0 - length: 0, - - // The number of elements contained in the matched element set - size: function() { - return this.length; - }, - - toArray: function() { - return core_slice.call( this ); - }, - - // Get the Nth element in the matched element set OR - // Get the whole matched element set as a clean array - get: function( num ) { - return num == null ? - - // Return a 'clean' array - this.toArray() : - - // Return just the object - ( num < 0 ? this[ this.length + num ] : this[ num ] ); - }, - - // Take an array of elements and push it onto the stack - // (returning the new matched element set) - pushStack: function( elems ) { - - // Build a new jQuery matched element set - var ret = jQuery.merge( this.constructor(), elems ); - - // Add the old object onto the stack (as a reference) - ret.prevObject = this; - ret.context = this.context; - - // Return the newly-formed element set - return ret; - }, - - // Execute a callback for every element in the matched set. - // (You can seed the arguments with an array of args, but this is - // only used internally.) - each: function( callback, args ) { - return jQuery.each( this, callback, args ); - }, - - ready: function( fn ) { - // Add the callback - jQuery.ready.promise().done( fn ); - - return this; - }, - - slice: function() { - return this.pushStack( core_slice.apply( this, arguments ) ); - }, - - first: function() { - return this.eq( 0 ); - }, - - last: function() { - return this.eq( -1 ); - }, - - eq: function( i ) { - var len = this.length, - j = +i + ( i < 0 ? len : 0 ); - return this.pushStack( j >= 0 && j < len ? [ this[j] ] : [] ); - }, - - map: function( callback ) { - return this.pushStack( jQuery.map(this, function( elem, i ) { - return callback.call( elem, i, elem ); - })); - }, - - end: function() { - return this.prevObject || this.constructor(null); - }, - - // For internal use only. - // Behaves like an Array's method, not like a jQuery method. - push: core_push, - sort: [].sort, - splice: [].splice -}; - -// Give the init function the jQuery prototype for later instantiation -jQuery.fn.init.prototype = jQuery.fn; - -jQuery.extend = jQuery.fn.extend = function() { - var options, name, src, copy, copyIsArray, clone, - target = arguments[0] || {}, - i = 1, - length = arguments.length, - deep = false; - - // Handle a deep copy situation - if ( typeof target === "boolean" ) { - deep = target; - target = arguments[1] || {}; - // skip the boolean and the target - i = 2; - } - - // Handle case when target is a string or something (possible in deep copy) - if ( typeof target !== "object" && !jQuery.isFunction(target) ) { - target = {}; - } - - // extend jQuery itself if only one argument is passed - if ( length === i ) { - target = this; - --i; - } - - for ( ; i < length; i++ ) { - // Only deal with non-null/undefined values - if ( (options = arguments[ i ]) != null ) { - // Extend the base object - for ( name in options ) { - src = target[ name ]; - copy = options[ name ]; - - // Prevent never-ending loop - if ( target === copy ) { - continue; - } - - // Recurse if we're merging plain objects or arrays - if ( deep && copy && ( jQuery.isPlainObject(copy) || (copyIsArray = jQuery.isArray(copy)) ) ) { - if ( copyIsArray ) { - copyIsArray = false; - clone = src && jQuery.isArray(src) ? src : []; - - } else { - clone = src && jQuery.isPlainObject(src) ? src : {}; - } - - // Never move original objects, clone them - target[ name ] = jQuery.extend( deep, clone, copy ); - - // Don't bring in undefined values - } else if ( copy !== undefined ) { - target[ name ] = copy; - } - } - } - } - - // Return the modified object - return target; -}; - -jQuery.extend({ - noConflict: function( deep ) { - if ( window.$ === jQuery ) { - window.$ = _$; - } - - if ( deep && window.jQuery === jQuery ) { - window.jQuery = _jQuery; - } - - return jQuery; - }, - - // Is the DOM ready to be used? Set to true once it occurs. - isReady: false, - - // A counter to track how many items to wait for before - // the ready event fires. See #6781 - readyWait: 1, - - // Hold (or release) the ready event - holdReady: function( hold ) { - if ( hold ) { - jQuery.readyWait++; - } else { - jQuery.ready( true ); - } - }, - - // Handle when the DOM is ready - ready: function( wait ) { - - // Abort if there are pending holds or we're already ready - if ( wait === true ? --jQuery.readyWait : jQuery.isReady ) { - return; - } - - // Make sure body exists, at least, in case IE gets a little overzealous (ticket #5443). - if ( !document.body ) { - return setTimeout( jQuery.ready ); - } - - // Remember that the DOM is ready - jQuery.isReady = true; - - // If a normal DOM Ready event fired, decrement, and wait if need be - if ( wait !== true && --jQuery.readyWait > 0 ) { - return; - } - - // If there are functions bound, to execute - readyList.resolveWith( document, [ jQuery ] ); - - // Trigger any bound ready events - if ( jQuery.fn.trigger ) { - jQuery( document ).trigger("ready").off("ready"); - } - }, - - // See test/unit/core.js for details concerning isFunction. - // Since version 1.3, DOM methods and functions like alert - // aren't supported. They return false on IE (#2968). - isFunction: function( obj ) { - return jQuery.type(obj) === "function"; - }, - - isArray: Array.isArray || function( obj ) { - return jQuery.type(obj) === "array"; - }, - - isWindow: function( obj ) { - return obj != null && obj == obj.window; - }, - - isNumeric: function( obj ) { - return !isNaN( parseFloat(obj) ) && isFinite( obj ); - }, - - type: function( obj ) { - if ( obj == null ) { - return String( obj ); - } - return typeof obj === "object" || typeof obj === "function" ? - class2type[ core_toString.call(obj) ] || "object" : - typeof obj; - }, - - isPlainObject: function( obj ) { - // Must be an Object. - // Because of IE, we also have to check the presence of the constructor property. - // Make sure that DOM nodes and window objects don't pass through, as well - if ( !obj || jQuery.type(obj) !== "object" || obj.nodeType || jQuery.isWindow( obj ) ) { - return false; - } - - try { - // Not own constructor property must be Object - if ( obj.constructor && - !core_hasOwn.call(obj, "constructor") && - !core_hasOwn.call(obj.constructor.prototype, "isPrototypeOf") ) { - return false; - } - } catch ( e ) { - // IE8,9 Will throw exceptions on certain host objects #9897 - return false; - } - - // Own properties are enumerated firstly, so to speed up, - // if last one is own, then all properties are own. - - var key; - for ( key in obj ) {} - - return key === undefined || core_hasOwn.call( obj, key ); - }, - - isEmptyObject: function( obj ) { - var name; - for ( name in obj ) { - return false; - } - return true; - }, - - error: function( msg ) { - throw new Error( msg ); - }, - - // data: string of html - // context (optional): If specified, the fragment will be created in this context, defaults to document - // keepScripts (optional): If true, will include scripts passed in the html string - parseHTML: function( data, context, keepScripts ) { - if ( !data || typeof data !== "string" ) { - return null; - } - if ( typeof context === "boolean" ) { - keepScripts = context; - context = false; - } - context = context || document; - - var parsed = rsingleTag.exec( data ), - scripts = !keepScripts && []; - - // Single tag - if ( parsed ) { - return [ context.createElement( parsed[1] ) ]; - } - - parsed = jQuery.buildFragment( [ data ], context, scripts ); - if ( scripts ) { - jQuery( scripts ).remove(); - } - return jQuery.merge( [], parsed.childNodes ); - }, - - parseJSON: function( data ) { - // Attempt to parse using the native JSON parser first - if ( window.JSON && window.JSON.parse ) { - return window.JSON.parse( data ); - } - - if ( data === null ) { - return data; - } - - if ( typeof data === "string" ) { - - // Make sure leading/trailing whitespace is removed (IE can't handle it) - data = jQuery.trim( data ); - - if ( data ) { - // Make sure the incoming data is actual JSON - // Logic borrowed from http://json.org/json2.js - if ( rvalidchars.test( data.replace( rvalidescape, "@" ) - .replace( rvalidtokens, "]" ) - .replace( rvalidbraces, "")) ) { - - return ( new Function( "return " + data ) )(); - } - } - } - - jQuery.error( "Invalid JSON: " + data ); - }, - - // Cross-browser xml parsing - parseXML: function( data ) { - var xml, tmp; - if ( !data || typeof data !== "string" ) { - return null; - } - try { - if ( window.DOMParser ) { // Standard - tmp = new DOMParser(); - xml = tmp.parseFromString( data , "text/xml" ); - } else { // IE - xml = new ActiveXObject( "Microsoft.XMLDOM" ); - xml.async = "false"; - xml.loadXML( data ); - } - } catch( e ) { - xml = undefined; - } - if ( !xml || !xml.documentElement || xml.getElementsByTagName( "parsererror" ).length ) { - jQuery.error( "Invalid XML: " + data ); - } - return xml; - }, - - noop: function() {}, - - // Evaluates a script in a global context - // Workarounds based on findings by Jim Driscoll - // http://weblogs.java.net/blog/driscoll/archive/2009/09/08/eval-javascript-global-context - globalEval: function( data ) { - if ( data && jQuery.trim( data ) ) { - // We use execScript on Internet Explorer - // We use an anonymous function so that context is window - // rather than jQuery in Firefox - ( window.execScript || function( data ) { - window[ "eval" ].call( window, data ); - } )( data ); - } - }, - - // Convert dashed to camelCase; used by the css and data modules - // Microsoft forgot to hump their vendor prefix (#9572) - camelCase: function( string ) { - return string.replace( rmsPrefix, "ms-" ).replace( rdashAlpha, fcamelCase ); - }, - - nodeName: function( elem, name ) { - return elem.nodeName && elem.nodeName.toLowerCase() === name.toLowerCase(); - }, - - // args is for internal usage only - each: function( obj, callback, args ) { - var value, - i = 0, - length = obj.length, - isArray = isArraylike( obj ); - - if ( args ) { - if ( isArray ) { - for ( ; i < length; i++ ) { - value = callback.apply( obj[ i ], args ); - - if ( value === false ) { - break; - } - } - } else { - for ( i in obj ) { - value = callback.apply( obj[ i ], args ); - - if ( value === false ) { - break; - } - } - } - - // A special, fast, case for the most common use of each - } else { - if ( isArray ) { - for ( ; i < length; i++ ) { - value = callback.call( obj[ i ], i, obj[ i ] ); - - if ( value === false ) { - break; - } - } - } else { - for ( i in obj ) { - value = callback.call( obj[ i ], i, obj[ i ] ); - - if ( value === false ) { - break; - } - } - } - } - - return obj; - }, - - // Use native String.trim function wherever possible - trim: core_trim && !core_trim.call("\uFEFF\xA0") ? - function( text ) { - return text == null ? - "" : - core_trim.call( text ); - } : - - // Otherwise use our own trimming functionality - function( text ) { - return text == null ? - "" : - ( text + "" ).replace( rtrim, "" ); - }, - - // results is for internal usage only - makeArray: function( arr, results ) { - var ret = results || []; - - if ( arr != null ) { - if ( isArraylike( Object(arr) ) ) { - jQuery.merge( ret, - typeof arr === "string" ? - [ arr ] : arr - ); - } else { - core_push.call( ret, arr ); - } - } - - return ret; - }, - - inArray: function( elem, arr, i ) { - var len; - - if ( arr ) { - if ( core_indexOf ) { - return core_indexOf.call( arr, elem, i ); - } - - len = arr.length; - i = i ? i < 0 ? Math.max( 0, len + i ) : i : 0; - - for ( ; i < len; i++ ) { - // Skip accessing in sparse arrays - if ( i in arr && arr[ i ] === elem ) { - return i; - } - } - } - - return -1; - }, - - merge: function( first, second ) { - var l = second.length, - i = first.length, - j = 0; - - if ( typeof l === "number" ) { - for ( ; j < l; j++ ) { - first[ i++ ] = second[ j ]; - } - } else { - while ( second[j] !== undefined ) { - first[ i++ ] = second[ j++ ]; - } - } - - first.length = i; - - return first; - }, - - grep: function( elems, callback, inv ) { - var retVal, - ret = [], - i = 0, - length = elems.length; - inv = !!inv; - - // Go through the array, only saving the items - // that pass the validator function - for ( ; i < length; i++ ) { - retVal = !!callback( elems[ i ], i ); - if ( inv !== retVal ) { - ret.push( elems[ i ] ); - } - } - - return ret; - }, - - // arg is for internal usage only - map: function( elems, callback, arg ) { - var value, - i = 0, - length = elems.length, - isArray = isArraylike( elems ), - ret = []; - - // Go through the array, translating each of the items to their - if ( isArray ) { - for ( ; i < length; i++ ) { - value = callback( elems[ i ], i, arg ); - - if ( value != null ) { - ret[ ret.length ] = value; - } - } - - // Go through every key on the object, - } else { - for ( i in elems ) { - value = callback( elems[ i ], i, arg ); - - if ( value != null ) { - ret[ ret.length ] = value; - } - } - } - - // Flatten any nested arrays - return core_concat.apply( [], ret ); - }, - - // A global GUID counter for objects - guid: 1, - - // Bind a function to a context, optionally partially applying any - // arguments. - proxy: function( fn, context ) { - var tmp, args, proxy; - - if ( typeof context === "string" ) { - tmp = fn[ context ]; - context = fn; - fn = tmp; - } - - // Quick check to determine if target is callable, in the spec - // this throws a TypeError, but we will just return undefined. - if ( !jQuery.isFunction( fn ) ) { - return undefined; - } - - // Simulated bind - args = core_slice.call( arguments, 2 ); - proxy = function() { - return fn.apply( context || this, args.concat( core_slice.call( arguments ) ) ); - }; - - // Set the guid of unique handler to the same of original handler, so it can be removed - proxy.guid = fn.guid = fn.guid || jQuery.guid++; - - return proxy; - }, - - // Multifunctional method to get and set values of a collection - // The value/s can optionally be executed if it's a function - access: function( elems, fn, key, value, chainable, emptyGet, raw ) { - var i = 0, - length = elems.length, - bulk = key == null; - - // Sets many values - if ( jQuery.type( key ) === "object" ) { - chainable = true; - for ( i in key ) { - jQuery.access( elems, fn, i, key[i], true, emptyGet, raw ); - } - - // Sets one value - } else if ( value !== undefined ) { - chainable = true; - - if ( !jQuery.isFunction( value ) ) { - raw = true; - } - - if ( bulk ) { - // Bulk operations run against the entire set - if ( raw ) { - fn.call( elems, value ); - fn = null; - - // ...except when executing function values - } else { - bulk = fn; - fn = function( elem, key, value ) { - return bulk.call( jQuery( elem ), value ); - }; - } - } - - if ( fn ) { - for ( ; i < length; i++ ) { - fn( elems[i], key, raw ? value : value.call( elems[i], i, fn( elems[i], key ) ) ); - } - } - } - - return chainable ? - elems : - - // Gets - bulk ? - fn.call( elems ) : - length ? fn( elems[0], key ) : emptyGet; - }, - - now: function() { - return ( new Date() ).getTime(); - } -}); - -jQuery.ready.promise = function( obj ) { - if ( !readyList ) { - - readyList = jQuery.Deferred(); - - // Catch cases where $(document).ready() is called after the browser event has already occurred. - // we once tried to use readyState "interactive" here, but it caused issues like the one - // discovered by ChrisS here: http://bugs.jquery.com/ticket/12282#comment:15 - if ( document.readyState === "complete" ) { - // Handle it asynchronously to allow scripts the opportunity to delay ready - setTimeout( jQuery.ready ); - - // Standards-based browsers support DOMContentLoaded - } else if ( document.addEventListener ) { - // Use the handy event callback - document.addEventListener( "DOMContentLoaded", DOMContentLoaded, false ); - - // A fallback to window.onload, that will always work - window.addEventListener( "load", jQuery.ready, false ); - - // If IE event model is used - } else { - // Ensure firing before onload, maybe late but safe also for iframes - document.attachEvent( "onreadystatechange", DOMContentLoaded ); - - // A fallback to window.onload, that will always work - window.attachEvent( "onload", jQuery.ready ); - - // If IE and not a frame - // continually check to see if the document is ready - var top = false; - - try { - top = window.frameElement == null && document.documentElement; - } catch(e) {} - - if ( top && top.doScroll ) { - (function doScrollCheck() { - if ( !jQuery.isReady ) { - - try { - // Use the trick by Diego Perini - // http://javascript.nwbox.com/IEContentLoaded/ - top.doScroll("left"); - } catch(e) { - return setTimeout( doScrollCheck, 50 ); - } - - // and execute any waiting functions - jQuery.ready(); - } - })(); - } - } - } - return readyList.promise( obj ); -}; - -// Populate the class2type map -jQuery.each("Boolean Number String Function Array Date RegExp Object Error".split(" "), function(i, name) { - class2type[ "[object " + name + "]" ] = name.toLowerCase(); -}); - -function isArraylike( obj ) { - var length = obj.length, - type = jQuery.type( obj ); - - if ( jQuery.isWindow( obj ) ) { - return false; - } - - if ( obj.nodeType === 1 && length ) { - return true; - } - - return type === "array" || type !== "function" && - ( length === 0 || - typeof length === "number" && length > 0 && ( length - 1 ) in obj ); -} - -// All jQuery objects should point back to these -rootjQuery = jQuery(document); -// String to Object options format cache -var optionsCache = {}; - -// Convert String-formatted options into Object-formatted ones and store in cache -function createOptions( options ) { - var object = optionsCache[ options ] = {}; - jQuery.each( options.match( core_rnotwhite ) || [], function( _, flag ) { - object[ flag ] = true; - }); - return object; -} - -/* - * Create a callback list using the following parameters: - * - * options: an optional list of space-separated options that will change how - * the callback list behaves or a more traditional option object - * - * By default a callback list will act like an event callback list and can be - * "fired" multiple times. - * - * Possible options: - * - * once: will ensure the callback list can only be fired once (like a Deferred) - * - * memory: will keep track of previous values and will call any callback added - * after the list has been fired right away with the latest "memorized" - * values (like a Deferred) - * - * unique: will ensure a callback can only be added once (no duplicate in the list) - * - * stopOnFalse: interrupt callings when a callback returns false - * - */ -jQuery.Callbacks = function( options ) { - - // Convert options from String-formatted to Object-formatted if needed - // (we check in cache first) - options = typeof options === "string" ? - ( optionsCache[ options ] || createOptions( options ) ) : - jQuery.extend( {}, options ); - - var // Last fire value (for non-forgettable lists) - memory, - // Flag to know if list was already fired - fired, - // Flag to know if list is currently firing - firing, - // First callback to fire (used internally by add and fireWith) - firingStart, - // End of the loop when firing - firingLength, - // Index of currently firing callback (modified by remove if needed) - firingIndex, - // Actual callback list - list = [], - // Stack of fire calls for repeatable lists - stack = !options.once && [], - // Fire callbacks - fire = function( data ) { - memory = options.memory && data; - fired = true; - firingIndex = firingStart || 0; - firingStart = 0; - firingLength = list.length; - firing = true; - for ( ; list && firingIndex < firingLength; firingIndex++ ) { - if ( list[ firingIndex ].apply( data[ 0 ], data[ 1 ] ) === false && options.stopOnFalse ) { - memory = false; // To prevent further calls using add - break; - } - } - firing = false; - if ( list ) { - if ( stack ) { - if ( stack.length ) { - fire( stack.shift() ); - } - } else if ( memory ) { - list = []; - } else { - self.disable(); - } - } - }, - // Actual Callbacks object - self = { - // Add a callback or a collection of callbacks to the list - add: function() { - if ( list ) { - // First, we save the current length - var start = list.length; - (function add( args ) { - jQuery.each( args, function( _, arg ) { - var type = jQuery.type( arg ); - if ( type === "function" ) { - if ( !options.unique || !self.has( arg ) ) { - list.push( arg ); - } - } else if ( arg && arg.length && type !== "string" ) { - // Inspect recursively - add( arg ); - } - }); - })( arguments ); - // Do we need to add the callbacks to the - // current firing batch? - if ( firing ) { - firingLength = list.length; - // With memory, if we're not firing then - // we should call right away - } else if ( memory ) { - firingStart = start; - fire( memory ); - } - } - return this; - }, - // Remove a callback from the list - remove: function() { - if ( list ) { - jQuery.each( arguments, function( _, arg ) { - var index; - while( ( index = jQuery.inArray( arg, list, index ) ) > -1 ) { - list.splice( index, 1 ); - // Handle firing indexes - if ( firing ) { - if ( index <= firingLength ) { - firingLength--; - } - if ( index <= firingIndex ) { - firingIndex--; - } - } - } - }); - } - return this; - }, - // Control if a given callback is in the list - has: function( fn ) { - return jQuery.inArray( fn, list ) > -1; - }, - // Remove all callbacks from the list - empty: function() { - list = []; - return this; - }, - // Have the list do nothing anymore - disable: function() { - list = stack = memory = undefined; - return this; - }, - // Is it disabled? - disabled: function() { - return !list; - }, - // Lock the list in its current state - lock: function() { - stack = undefined; - if ( !memory ) { - self.disable(); - } - return this; - }, - // Is it locked? - locked: function() { - return !stack; - }, - // Call all callbacks with the given context and arguments - fireWith: function( context, args ) { - args = args || []; - args = [ context, args.slice ? args.slice() : args ]; - if ( list && ( !fired || stack ) ) { - if ( firing ) { - stack.push( args ); - } else { - fire( args ); - } - } - return this; - }, - // Call all the callbacks with the given arguments - fire: function() { - self.fireWith( this, arguments ); - return this; - }, - // To know if the callbacks have already been called at least once - fired: function() { - return !!fired; - } - }; - - return self; -}; -jQuery.extend({ - - Deferred: function( func ) { - var tuples = [ - // action, add listener, listener list, final state - [ "resolve", "done", jQuery.Callbacks("once memory"), "resolved" ], - [ "reject", "fail", jQuery.Callbacks("once memory"), "rejected" ], - [ "notify", "progress", jQuery.Callbacks("memory") ] - ], - state = "pending", - promise = { - state: function() { - return state; - }, - always: function() { - deferred.done( arguments ).fail( arguments ); - return this; - }, - then: function( /* fnDone, fnFail, fnProgress */ ) { - var fns = arguments; - return jQuery.Deferred(function( newDefer ) { - jQuery.each( tuples, function( i, tuple ) { - var action = tuple[ 0 ], - fn = jQuery.isFunction( fns[ i ] ) && fns[ i ]; - // deferred[ done | fail | progress ] for forwarding actions to newDefer - deferred[ tuple[1] ](function() { - var returned = fn && fn.apply( this, arguments ); - if ( returned && jQuery.isFunction( returned.promise ) ) { - returned.promise() - .done( newDefer.resolve ) - .fail( newDefer.reject ) - .progress( newDefer.notify ); - } else { - newDefer[ action + "With" ]( this === promise ? newDefer.promise() : this, fn ? [ returned ] : arguments ); - } - }); - }); - fns = null; - }).promise(); - }, - // Get a promise for this deferred - // If obj is provided, the promise aspect is added to the object - promise: function( obj ) { - return obj != null ? jQuery.extend( obj, promise ) : promise; - } - }, - deferred = {}; - - // Keep pipe for back-compat - promise.pipe = promise.then; - - // Add list-specific methods - jQuery.each( tuples, function( i, tuple ) { - var list = tuple[ 2 ], - stateString = tuple[ 3 ]; - - // promise[ done | fail | progress ] = list.add - promise[ tuple[1] ] = list.add; - - // Handle state - if ( stateString ) { - list.add(function() { - // state = [ resolved | rejected ] - state = stateString; - - // [ reject_list | resolve_list ].disable; progress_list.lock - }, tuples[ i ^ 1 ][ 2 ].disable, tuples[ 2 ][ 2 ].lock ); - } - - // deferred[ resolve | reject | notify ] - deferred[ tuple[0] ] = function() { - deferred[ tuple[0] + "With" ]( this === deferred ? promise : this, arguments ); - return this; - }; - deferred[ tuple[0] + "With" ] = list.fireWith; - }); - - // Make the deferred a promise - promise.promise( deferred ); - - // Call given func if any - if ( func ) { - func.call( deferred, deferred ); - } - - // All done! - return deferred; - }, - - // Deferred helper - when: function( subordinate /* , ..., subordinateN */ ) { - var i = 0, - resolveValues = core_slice.call( arguments ), - length = resolveValues.length, - - // the count of uncompleted subordinates - remaining = length !== 1 || ( subordinate && jQuery.isFunction( subordinate.promise ) ) ? length : 0, - - // the master Deferred. If resolveValues consist of only a single Deferred, just use that. - deferred = remaining === 1 ? subordinate : jQuery.Deferred(), - - // Update function for both resolve and progress values - updateFunc = function( i, contexts, values ) { - return function( value ) { - contexts[ i ] = this; - values[ i ] = arguments.length > 1 ? core_slice.call( arguments ) : value; - if( values === progressValues ) { - deferred.notifyWith( contexts, values ); - } else if ( !( --remaining ) ) { - deferred.resolveWith( contexts, values ); - } - }; - }, - - progressValues, progressContexts, resolveContexts; - - // add listeners to Deferred subordinates; treat others as resolved - if ( length > 1 ) { - progressValues = new Array( length ); - progressContexts = new Array( length ); - resolveContexts = new Array( length ); - for ( ; i < length; i++ ) { - if ( resolveValues[ i ] && jQuery.isFunction( resolveValues[ i ].promise ) ) { - resolveValues[ i ].promise() - .done( updateFunc( i, resolveContexts, resolveValues ) ) - .fail( deferred.reject ) - .progress( updateFunc( i, progressContexts, progressValues ) ); - } else { - --remaining; - } - } - } - - // if we're not waiting on anything, resolve the master - if ( !remaining ) { - deferred.resolveWith( resolveContexts, resolveValues ); - } - - return deferred.promise(); - } -}); -jQuery.support = (function() { - - var support, all, a, select, opt, input, fragment, eventName, isSupported, i, - div = document.createElement("div"); - - // Setup - div.setAttribute( "className", "t" ); - div.innerHTML = " <link/><table></table><a href='/a'>a</a><input type='checkbox'/>"; - - // Support tests won't run in some limited or non-browser environments - all = div.getElementsByTagName("*"); - a = div.getElementsByTagName("a")[ 0 ]; - if ( !all || !a || !all.length ) { - return {}; - } - - // First batch of tests - select = document.createElement("select"); - opt = select.appendChild( document.createElement("option") ); - input = div.getElementsByTagName("input")[ 0 ]; - - a.style.cssText = "top:1px;float:left;opacity:.5"; - support = { - // Test setAttribute on camelCase class. If it works, we need attrFixes when doing get/setAttribute (ie6/7) - getSetAttribute: div.className !== "t", - - // IE strips leading whitespace when .innerHTML is used - leadingWhitespace: div.firstChild.nodeType === 3, - - // Make sure that tbody elements aren't automatically inserted - // IE will insert them into empty tables - tbody: !div.getElementsByTagName("tbody").length, - - // Make sure that link elements get serialized correctly by innerHTML - // This requires a wrapper element in IE - htmlSerialize: !!div.getElementsByTagName("link").length, - - // Get the style information from getAttribute - // (IE uses .cssText instead) - style: /top/.test( a.getAttribute("style") ), - - // Make sure that URLs aren't manipulated - // (IE normalizes it by default) - hrefNormalized: a.getAttribute("href") === "/a", - - // Make sure that element opacity exists - // (IE uses filter instead) - // Use a regex to work around a WebKit issue. See #5145 - opacity: /^0.5/.test( a.style.opacity ), - - // Verify style float existence - // (IE uses styleFloat instead of cssFloat) - cssFloat: !!a.style.cssFloat, - - // Check the default checkbox/radio value ("" on WebKit; "on" elsewhere) - checkOn: !!input.value, - - // Make sure that a selected-by-default option has a working selected property. - // (WebKit defaults to false instead of true, IE too, if it's in an optgroup) - optSelected: opt.selected, - - // Tests for enctype support on a form (#6743) - enctype: !!document.createElement("form").enctype, - - // Makes sure cloning an html5 element does not cause problems - // Where outerHTML is undefined, this still works - html5Clone: document.createElement("nav").cloneNode( true ).outerHTML !== "<:nav></:nav>", - - // jQuery.support.boxModel DEPRECATED in 1.8 since we don't support Quirks Mode - boxModel: document.compatMode === "CSS1Compat", - - // Will be defined later - deleteExpando: true, - noCloneEvent: true, - inlineBlockNeedsLayout: false, - shrinkWrapBlocks: false, - reliableMarginRight: true, - boxSizingReliable: true, - pixelPosition: false - }; - - // Make sure checked status is properly cloned - input.checked = true; - support.noCloneChecked = input.cloneNode( true ).checked; - - // Make sure that the options inside disabled selects aren't marked as disabled - // (WebKit marks them as disabled) - select.disabled = true; - support.optDisabled = !opt.disabled; - - // Support: IE<9 - try { - delete div.test; - } catch( e ) { - support.deleteExpando = false; - } - - // Check if we can trust getAttribute("value") - input = document.createElement("input"); - input.setAttribute( "value", "" ); - support.input = input.getAttribute( "value" ) === ""; - - // Check if an input maintains its value after becoming a radio - input.value = "t"; - input.setAttribute( "type", "radio" ); - support.radioValue = input.value === "t"; - - // #11217 - WebKit loses check when the name is after the checked attribute - input.setAttribute( "checked", "t" ); - input.setAttribute( "name", "t" ); - - fragment = document.createDocumentFragment(); - fragment.appendChild( input ); - - // Check if a disconnected checkbox will retain its checked - // value of true after appended to the DOM (IE6/7) - support.appendChecked = input.checked; - - // WebKit doesn't clone checked state correctly in fragments - support.checkClone = fragment.cloneNode( true ).cloneNode( true ).lastChild.checked; - - // Support: IE<9 - // Opera does not clone events (and typeof div.attachEvent === undefined). - // IE9-10 clones events bound via attachEvent, but they don't trigger with .click() - if ( div.attachEvent ) { - div.attachEvent( "onclick", function() { - support.noCloneEvent = false; - }); - - div.cloneNode( true ).click(); - } - - // Support: IE<9 (lack submit/change bubble), Firefox 17+ (lack focusin event) - // Beware of CSP restrictions (https://developer.mozilla.org/en/Security/CSP), test/csp.php - for ( i in { submit: true, change: true, focusin: true }) { - div.setAttribute( eventName = "on" + i, "t" ); - - support[ i + "Bubbles" ] = eventName in window || div.attributes[ eventName ].expando === false; - } - - div.style.backgroundClip = "content-box"; - div.cloneNode( true ).style.backgroundClip = ""; - support.clearCloneStyle = div.style.backgroundClip === "content-box"; - - // Run tests that need a body at doc ready - jQuery(function() { - var container, marginDiv, tds, - divReset = "padding:0;margin:0;border:0;display:block;box-sizing:content-box;-moz-box-sizing:content-box;-webkit-box-sizing:content-box;", - body = document.getElementsByTagName("body")[0]; - - if ( !body ) { - // Return for frameset docs that don't have a body - return; - } - - container = document.createElement("div"); - container.style.cssText = "border:0;width:0;height:0;position:absolute;top:0;left:-9999px;margin-top:1px"; - - body.appendChild( container ).appendChild( div ); - - // Support: IE8 - // Check if table cells still have offsetWidth/Height when they are set - // to display:none and there are still other visible table cells in a - // table row; if so, offsetWidth/Height are not reliable for use when - // determining if an element has been hidden directly using - // display:none (it is still safe to use offsets if a parent element is - // hidden; don safety goggles and see bug #4512 for more information). - div.innerHTML = "<table><tr><td></td><td>t</td></tr></table>"; - tds = div.getElementsByTagName("td"); - tds[ 0 ].style.cssText = "padding:0;margin:0;border:0;display:none"; - isSupported = ( tds[ 0 ].offsetHeight === 0 ); - - tds[ 0 ].style.display = ""; - tds[ 1 ].style.display = "none"; - - // Support: IE8 - // Check if empty table cells still have offsetWidth/Height - support.reliableHiddenOffsets = isSupported && ( tds[ 0 ].offsetHeight === 0 ); - - // Check box-sizing and margin behavior - div.innerHTML = ""; - div.style.cssText = "box-sizing:border-box;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;padding:1px;border:1px;display:block;width:4px;margin-top:1%;position:absolute;top:1%;"; - support.boxSizing = ( div.offsetWidth === 4 ); - support.doesNotIncludeMarginInBodyOffset = ( body.offsetTop !== 1 ); - - // Use window.getComputedStyle because jsdom on node.js will break without it. - if ( window.getComputedStyle ) { - support.pixelPosition = ( window.getComputedStyle( div, null ) || {} ).top !== "1%"; - support.boxSizingReliable = ( window.getComputedStyle( div, null ) || { width: "4px" } ).width === "4px"; - - // Check if div with explicit width and no margin-right incorrectly - // gets computed margin-right based on width of container. (#3333) - // Fails in WebKit before Feb 2011 nightlies - // WebKit Bug 13343 - getComputedStyle returns wrong value for margin-right - marginDiv = div.appendChild( document.createElement("div") ); - marginDiv.style.cssText = div.style.cssText = divReset; - marginDiv.style.marginRight = marginDiv.style.width = "0"; - div.style.width = "1px"; - - support.reliableMarginRight = - !parseFloat( ( window.getComputedStyle( marginDiv, null ) || {} ).marginRight ); - } - - if ( typeof div.style.zoom !== "undefined" ) { - // Support: IE<8 - // Check if natively block-level elements act like inline-block - // elements when setting their display to 'inline' and giving - // them layout - div.innerHTML = ""; - div.style.cssText = divReset + "width:1px;padding:1px;display:inline;zoom:1"; - support.inlineBlockNeedsLayout = ( div.offsetWidth === 3 ); - - // Support: IE6 - // Check if elements with layout shrink-wrap their children - div.style.display = "block"; - div.innerHTML = "<div></div>"; - div.firstChild.style.width = "5px"; - support.shrinkWrapBlocks = ( div.offsetWidth !== 3 ); - - // Prevent IE 6 from affecting layout for positioned elements #11048 - // Prevent IE from shrinking the body in IE 7 mode #12869 - body.style.zoom = 1; - } - - body.removeChild( container ); - - // Null elements to avoid leaks in IE - container = div = tds = marginDiv = null; - }); - - // Null elements to avoid leaks in IE - all = select = fragment = opt = a = input = null; - - return support; -})(); - -var rbrace = /(?:\{[\s\S]*\}|\[[\s\S]*\])$/, - rmultiDash = /([A-Z])/g; - -function internalData( elem, name, data, pvt /* Internal Use Only */ ){ - if ( !jQuery.acceptData( elem ) ) { - return; - } - - var thisCache, ret, - internalKey = jQuery.expando, - getByName = typeof name === "string", - - // We have to handle DOM nodes and JS objects differently because IE6-7 - // can't GC object references properly across the DOM-JS boundary - isNode = elem.nodeType, - - // Only DOM nodes need the global jQuery cache; JS object data is - // attached directly to the object so GC can occur automatically - cache = isNode ? jQuery.cache : elem, - - // Only defining an ID for JS objects if its cache already exists allows - // the code to shortcut on the same path as a DOM node with no cache - id = isNode ? elem[ internalKey ] : elem[ internalKey ] && internalKey; - - // Avoid doing any more work than we need to when trying to get data on an - // object that has no data at all - if ( (!id || !cache[id] || (!pvt && !cache[id].data)) && getByName && data === undefined ) { - return; - } - - if ( !id ) { - // Only DOM nodes need a new unique ID for each element since their data - // ends up in the global cache - if ( isNode ) { - elem[ internalKey ] = id = core_deletedIds.pop() || jQuery.guid++; - } else { - id = internalKey; - } - } - - if ( !cache[ id ] ) { - cache[ id ] = {}; - - // Avoids exposing jQuery metadata on plain JS objects when the object - // is serialized using JSON.stringify - if ( !isNode ) { - cache[ id ].toJSON = jQuery.noop; - } - } - - // An object can be passed to jQuery.data instead of a key/value pair; this gets - // shallow copied over onto the existing cache - if ( typeof name === "object" || typeof name === "function" ) { - if ( pvt ) { - cache[ id ] = jQuery.extend( cache[ id ], name ); - } else { - cache[ id ].data = jQuery.extend( cache[ id ].data, name ); - } - } - - thisCache = cache[ id ]; - - // jQuery data() is stored in a separate object inside the object's internal data - // cache in order to avoid key collisions between internal data and user-defined - // data. - if ( !pvt ) { - if ( !thisCache.data ) { - thisCache.data = {}; - } - - thisCache = thisCache.data; - } - - if ( data !== undefined ) { - thisCache[ jQuery.camelCase( name ) ] = data; - } - - // Check for both converted-to-camel and non-converted data property names - // If a data property was specified - if ( getByName ) { - - // First Try to find as-is property data - ret = thisCache[ name ]; - - // Test for null|undefined property data - if ( ret == null ) { - - // Try to find the camelCased property - ret = thisCache[ jQuery.camelCase( name ) ]; - } - } else { - ret = thisCache; - } - - return ret; -} - -function internalRemoveData( elem, name, pvt /* For internal use only */ ){ - if ( !jQuery.acceptData( elem ) ) { - return; - } - - var thisCache, i, l, - - isNode = elem.nodeType, - - // See jQuery.data for more information - cache = isNode ? jQuery.cache : elem, - id = isNode ? elem[ jQuery.expando ] : jQuery.expando; - - // If there is already no cache entry for this object, there is no - // purpose in continuing - if ( !cache[ id ] ) { - return; - } - - if ( name ) { - - thisCache = pvt ? cache[ id ] : cache[ id ].data; - - if ( thisCache ) { - - // Support array or space separated string names for data keys - if ( !jQuery.isArray( name ) ) { - - // try the string as a key before any manipulation - if ( name in thisCache ) { - name = [ name ]; - } else { - - // split the camel cased version by spaces unless a key with the spaces exists - name = jQuery.camelCase( name ); - if ( name in thisCache ) { - name = [ name ]; - } else { - name = name.split(" "); - } - } - } else { - // If "name" is an array of keys... - // When data is initially created, via ("key", "val") signature, - // keys will be converted to camelCase. - // Since there is no way to tell _how_ a key was added, remove - // both plain key and camelCase key. #12786 - // This will only penalize the array argument path. - name = name.concat( jQuery.map( name, jQuery.camelCase ) ); - } - - for ( i = 0, l = name.length; i < l; i++ ) { - delete thisCache[ name[i] ]; - } - - // If there is no data left in the cache, we want to continue - // and let the cache object itself get destroyed - if ( !( pvt ? isEmptyDataObject : jQuery.isEmptyObject )( thisCache ) ) { - return; - } - } - } - - // See jQuery.data for more information - if ( !pvt ) { - delete cache[ id ].data; - - // Don't destroy the parent cache unless the internal data object - // had been the only thing left in it - if ( !isEmptyDataObject( cache[ id ] ) ) { - return; - } - } - - // Destroy the cache - if ( isNode ) { - jQuery.cleanData( [ elem ], true ); - - // Use delete when supported for expandos or `cache` is not a window per isWindow (#10080) - } else if ( jQuery.support.deleteExpando || cache != cache.window ) { - delete cache[ id ]; - - // When all else fails, null - } else { - cache[ id ] = null; - } -} - -jQuery.extend({ - cache: {}, - - // Unique for each copy of jQuery on the page - // Non-digits removed to match rinlinejQuery - expando: "jQuery" + ( core_version + Math.random() ).replace( /\D/g, "" ), - - // The following elements throw uncatchable exceptions if you - // attempt to add expando properties to them. - noData: { - "embed": true, - // Ban all objects except for Flash (which handle expandos) - "object": "clsid:D27CDB6E-AE6D-11cf-96B8-444553540000", - "applet": true - }, - - hasData: function( elem ) { - elem = elem.nodeType ? jQuery.cache[ elem[jQuery.expando] ] : elem[ jQuery.expando ]; - return !!elem && !isEmptyDataObject( elem ); - }, - - data: function( elem, name, data ) { - return internalData( elem, name, data, false ); - }, - - removeData: function( elem, name ) { - return internalRemoveData( elem, name, false ); - }, - - // For internal use only. - _data: function( elem, name, data ) { - return internalData( elem, name, data, true ); - }, - - _removeData: function( elem, name ) { - return internalRemoveData( elem, name, true ); - }, - - // A method for determining if a DOM node can handle the data expando - acceptData: function( elem ) { - var noData = elem.nodeName && jQuery.noData[ elem.nodeName.toLowerCase() ]; - - // nodes accept data unless otherwise specified; rejection can be conditional - return !noData || noData !== true && elem.getAttribute("classid") === noData; - } -}); - -jQuery.fn.extend({ - data: function( key, value ) { - var attrs, name, - elem = this[0], - i = 0, - data = null; - - // Gets all values - if ( key === undefined ) { - if ( this.length ) { - data = jQuery.data( elem ); - - if ( elem.nodeType === 1 && !jQuery._data( elem, "parsedAttrs" ) ) { - attrs = elem.attributes; - for ( ; i < attrs.length; i++ ) { - name = attrs[i].name; - - if ( !name.indexOf( "data-" ) ) { - name = jQuery.camelCase( name.substring(5) ); - - dataAttr( elem, name, data[ name ] ); - } - } - jQuery._data( elem, "parsedAttrs", true ); - } - } - - return data; - } - - // Sets multiple values - if ( typeof key === "object" ) { - return this.each(function() { - jQuery.data( this, key ); - }); - } - - return jQuery.access( this, function( value ) { - - if ( value === undefined ) { - // Try to fetch any internally stored data first - return elem ? dataAttr( elem, key, jQuery.data( elem, key ) ) : null; - } - - this.each(function() { - jQuery.data( this, key, value ); - }); - }, null, value, arguments.length > 1, null, true ); - }, - - removeData: function( key ) { - return this.each(function() { - jQuery.removeData( this, key ); - }); - } -}); - -function dataAttr( elem, key, data ) { - // If nothing was found internally, try to fetch any - // data from the HTML5 data-* attribute - if ( data === undefined && elem.nodeType === 1 ) { - - var name = "data-" + key.replace( rmultiDash, "-$1" ).toLowerCase(); - - data = elem.getAttribute( name ); - - if ( typeof data === "string" ) { - try { - data = data === "true" ? true : - data === "false" ? false : - data === "null" ? null : - // Only convert to a number if it doesn't change the string - +data + "" === data ? +data : - rbrace.test( data ) ? jQuery.parseJSON( data ) : - data; - } catch( e ) {} - - // Make sure we set the data so it isn't changed later - jQuery.data( elem, key, data ); - - } else { - data = undefined; - } - } - - return data; -} - -// checks a cache object for emptiness -function isEmptyDataObject( obj ) { - var name; - for ( name in obj ) { - - // if the public data object is empty, the private is still empty - if ( name === "data" && jQuery.isEmptyObject( obj[name] ) ) { - continue; - } - if ( name !== "toJSON" ) { - return false; - } - } - - return true; -} -jQuery.extend({ - queue: function( elem, type, data ) { - var queue; - - if ( elem ) { - type = ( type || "fx" ) + "queue"; - queue = jQuery._data( elem, type ); - - // Speed up dequeue by getting out quickly if this is just a lookup - if ( data ) { - if ( !queue || jQuery.isArray(data) ) { - queue = jQuery._data( elem, type, jQuery.makeArray(data) ); - } else { - queue.push( data ); - } - } - return queue || []; - } - }, - - dequeue: function( elem, type ) { - type = type || "fx"; - - var queue = jQuery.queue( elem, type ), - startLength = queue.length, - fn = queue.shift(), - hooks = jQuery._queueHooks( elem, type ), - next = function() { - jQuery.dequeue( elem, type ); - }; - - // If the fx queue is dequeued, always remove the progress sentinel - if ( fn === "inprogress" ) { - fn = queue.shift(); - startLength--; - } - - hooks.cur = fn; - if ( fn ) { - - // Add a progress sentinel to prevent the fx queue from being - // automatically dequeued - if ( type === "fx" ) { - queue.unshift( "inprogress" ); - } - - // clear up the last queue stop function - delete hooks.stop; - fn.call( elem, next, hooks ); - } - - if ( !startLength && hooks ) { - hooks.empty.fire(); - } - }, - - // not intended for public consumption - generates a queueHooks object, or returns the current one - _queueHooks: function( elem, type ) { - var key = type + "queueHooks"; - return jQuery._data( elem, key ) || jQuery._data( elem, key, { - empty: jQuery.Callbacks("once memory").add(function() { - jQuery._removeData( elem, type + "queue" ); - jQuery._removeData( elem, key ); - }) - }); - } -}); - -jQuery.fn.extend({ - queue: function( type, data ) { - var setter = 2; - - if ( typeof type !== "string" ) { - data = type; - type = "fx"; - setter--; - } - - if ( arguments.length < setter ) { - return jQuery.queue( this[0], type ); - } - - return data === undefined ? - this : - this.each(function() { - var queue = jQuery.queue( this, type, data ); - - // ensure a hooks for this queue - jQuery._queueHooks( this, type ); - - if ( type === "fx" && queue[0] !== "inprogress" ) { - jQuery.dequeue( this, type ); - } - }); - }, - dequeue: function( type ) { - return this.each(function() { - jQuery.dequeue( this, type ); - }); - }, - // Based off of the plugin by Clint Helfers, with permission. - // http://blindsignals.com/index.php/2009/07/jquery-delay/ - delay: function( time, type ) { - time = jQuery.fx ? jQuery.fx.speeds[ time ] || time : time; - type = type || "fx"; - - return this.queue( type, function( next, hooks ) { - var timeout = setTimeout( next, time ); - hooks.stop = function() { - clearTimeout( timeout ); - }; - }); - }, - clearQueue: function( type ) { - return this.queue( type || "fx", [] ); - }, - // Get a promise resolved when queues of a certain type - // are emptied (fx is the type by default) - promise: function( type, obj ) { - var tmp, - count = 1, - defer = jQuery.Deferred(), - elements = this, - i = this.length, - resolve = function() { - if ( !( --count ) ) { - defer.resolveWith( elements, [ elements ] ); - } - }; - - if ( typeof type !== "string" ) { - obj = type; - type = undefined; - } - type = type || "fx"; - - while( i-- ) { - tmp = jQuery._data( elements[ i ], type + "queueHooks" ); - if ( tmp && tmp.empty ) { - count++; - tmp.empty.add( resolve ); - } - } - resolve(); - return defer.promise( obj ); - } -}); -var nodeHook, boolHook, - rclass = /[\t\r\n]/g, - rreturn = /\r/g, - rfocusable = /^(?:input|select|textarea|button|object)$/i, - rclickable = /^(?:a|area)$/i, - rboolean = /^(?:checked|selected|autofocus|autoplay|async|controls|defer|disabled|hidden|loop|multiple|open|readonly|required|scoped)$/i, - ruseDefault = /^(?:checked|selected)$/i, - getSetAttribute = jQuery.support.getSetAttribute, - getSetInput = jQuery.support.input; - -jQuery.fn.extend({ - attr: function( name, value ) { - return jQuery.access( this, jQuery.attr, name, value, arguments.length > 1 ); - }, - - removeAttr: function( name ) { - return this.each(function() { - jQuery.removeAttr( this, name ); - }); - }, - - prop: function( name, value ) { - return jQuery.access( this, jQuery.prop, name, value, arguments.length > 1 ); - }, - - removeProp: function( name ) { - name = jQuery.propFix[ name ] || name; - return this.each(function() { - // try/catch handles cases where IE balks (such as removing a property on window) - try { - this[ name ] = undefined; - delete this[ name ]; - } catch( e ) {} - }); - }, - - addClass: function( value ) { - var classes, elem, cur, clazz, j, - i = 0, - len = this.length, - proceed = typeof value === "string" && value; - - if ( jQuery.isFunction( value ) ) { - return this.each(function( j ) { - jQuery( this ).addClass( value.call( this, j, this.className ) ); - }); - } - - if ( proceed ) { - // The disjunction here is for better compressibility (see removeClass) - classes = ( value || "" ).match( core_rnotwhite ) || []; - - for ( ; i < len; i++ ) { - elem = this[ i ]; - cur = elem.nodeType === 1 && ( elem.className ? - ( " " + elem.className + " " ).replace( rclass, " " ) : - " " - ); - - if ( cur ) { - j = 0; - while ( (clazz = classes[j++]) ) { - if ( cur.indexOf( " " + clazz + " " ) < 0 ) { - cur += clazz + " "; - } - } - elem.className = jQuery.trim( cur ); - - } - } - } - - return this; - }, - - removeClass: function( value ) { - var classes, elem, cur, clazz, j, - i = 0, - len = this.length, - proceed = arguments.length === 0 || typeof value === "string" && value; - - if ( jQuery.isFunction( value ) ) { - return this.each(function( j ) { - jQuery( this ).removeClass( value.call( this, j, this.className ) ); - }); - } - if ( proceed ) { - classes = ( value || "" ).match( core_rnotwhite ) || []; - - for ( ; i < len; i++ ) { - elem = this[ i ]; - // This expression is here for better compressibility (see addClass) - cur = elem.nodeType === 1 && ( elem.className ? - ( " " + elem.className + " " ).replace( rclass, " " ) : - "" - ); - - if ( cur ) { - j = 0; - while ( (clazz = classes[j++]) ) { - // Remove *all* instances - while ( cur.indexOf( " " + clazz + " " ) >= 0 ) { - cur = cur.replace( " " + clazz + " ", " " ); - } - } - elem.className = value ? jQuery.trim( cur ) : ""; - } - } - } - - return this; - }, - - toggleClass: function( value, stateVal ) { - var type = typeof value, - isBool = typeof stateVal === "boolean"; - - if ( jQuery.isFunction( value ) ) { - return this.each(function( i ) { - jQuery( this ).toggleClass( value.call(this, i, this.className, stateVal), stateVal ); - }); - } - - return this.each(function() { - if ( type === "string" ) { - // toggle individual class names - var className, - i = 0, - self = jQuery( this ), - state = stateVal, - classNames = value.match( core_rnotwhite ) || []; - - while ( (className = classNames[ i++ ]) ) { - // check each className given, space separated list - state = isBool ? state : !self.hasClass( className ); - self[ state ? "addClass" : "removeClass" ]( className ); - } - - // Toggle whole class name - } else if ( type === "undefined" || type === "boolean" ) { - if ( this.className ) { - // store className if set - jQuery._data( this, "__className__", this.className ); - } - - // If the element has a class name or if we're passed "false", - // then remove the whole classname (if there was one, the above saved it). - // Otherwise bring back whatever was previously saved (if anything), - // falling back to the empty string if nothing was stored. - this.className = this.className || value === false ? "" : jQuery._data( this, "__className__" ) || ""; - } - }); - }, - - hasClass: function( selector ) { - var className = " " + selector + " ", - i = 0, - l = this.length; - for ( ; i < l; i++ ) { - if ( this[i].nodeType === 1 && (" " + this[i].className + " ").replace(rclass, " ").indexOf( className ) >= 0 ) { - return true; - } - } - - return false; - }, - - val: function( value ) { - var hooks, ret, isFunction, - elem = this[0]; - - if ( !arguments.length ) { - if ( elem ) { - hooks = jQuery.valHooks[ elem.type ] || jQuery.valHooks[ elem.nodeName.toLowerCase() ]; - - if ( hooks && "get" in hooks && (ret = hooks.get( elem, "value" )) !== undefined ) { - return ret; - } - - ret = elem.value; - - return typeof ret === "string" ? - // handle most common string cases - ret.replace(rreturn, "") : - // handle cases where value is null/undef or number - ret == null ? "" : ret; - } - - return; - } - - isFunction = jQuery.isFunction( value ); - - return this.each(function( i ) { - var val, - self = jQuery(this); - - if ( this.nodeType !== 1 ) { - return; - } - - if ( isFunction ) { - val = value.call( this, i, self.val() ); - } else { - val = value; - } - - // Treat null/undefined as ""; convert numbers to string - if ( val == null ) { - val = ""; - } else if ( typeof val === "number" ) { - val += ""; - } else if ( jQuery.isArray( val ) ) { - val = jQuery.map(val, function ( value ) { - return value == null ? "" : value + ""; - }); - } - - hooks = jQuery.valHooks[ this.type ] || jQuery.valHooks[ this.nodeName.toLowerCase() ]; - - // If set returns undefined, fall back to normal setting - if ( !hooks || !("set" in hooks) || hooks.set( this, val, "value" ) === undefined ) { - this.value = val; - } - }); - } -}); - -jQuery.extend({ - valHooks: { - option: { - get: function( elem ) { - // attributes.value is undefined in Blackberry 4.7 but - // uses .value. See #6932 - var val = elem.attributes.value; - return !val || val.specified ? elem.value : elem.text; - } - }, - select: { - get: function( elem ) { - var value, option, - options = elem.options, - index = elem.selectedIndex, - one = elem.type === "select-one" || index < 0, - values = one ? null : [], - max = one ? index + 1 : options.length, - i = index < 0 ? - max : - one ? index : 0; - - // Loop through all the selected options - for ( ; i < max; i++ ) { - option = options[ i ]; - - // oldIE doesn't update selected after form reset (#2551) - if ( ( option.selected || i === index ) && - // Don't return options that are disabled or in a disabled optgroup - ( jQuery.support.optDisabled ? !option.disabled : option.getAttribute("disabled") === null ) && - ( !option.parentNode.disabled || !jQuery.nodeName( option.parentNode, "optgroup" ) ) ) { - - // Get the specific value for the option - value = jQuery( option ).val(); - - // We don't need an array for one selects - if ( one ) { - return value; - } - - // Multi-Selects return an array - values.push( value ); - } - } - - return values; - }, - - set: function( elem, value ) { - var values = jQuery.makeArray( value ); - - jQuery(elem).find("option").each(function() { - this.selected = jQuery.inArray( jQuery(this).val(), values ) >= 0; - }); - - if ( !values.length ) { - elem.selectedIndex = -1; - } - return values; - } - } - }, - - attr: function( elem, name, value ) { - var ret, hooks, notxml, - nType = elem.nodeType; - - // don't get/set attributes on text, comment and attribute nodes - if ( !elem || nType === 3 || nType === 8 || nType === 2 ) { - return; - } - - // Fallback to prop when attributes are not supported - if ( typeof elem.getAttribute === "undefined" ) { - return jQuery.prop( elem, name, value ); - } - - notxml = nType !== 1 || !jQuery.isXMLDoc( elem ); - - // All attributes are lowercase - // Grab necessary hook if one is defined - if ( notxml ) { - name = name.toLowerCase(); - hooks = jQuery.attrHooks[ name ] || ( rboolean.test( name ) ? boolHook : nodeHook ); - } - - if ( value !== undefined ) { - - if ( value === null ) { - jQuery.removeAttr( elem, name ); - - } else if ( hooks && notxml && "set" in hooks && (ret = hooks.set( elem, value, name )) !== undefined ) { - return ret; - - } else { - elem.setAttribute( name, value + "" ); - return value; - } - - } else if ( hooks && notxml && "get" in hooks && (ret = hooks.get( elem, name )) !== null ) { - return ret; - - } else { - - // In IE9+, Flash objects don't have .getAttribute (#12945) - // Support: IE9+ - if ( typeof elem.getAttribute !== "undefined" ) { - ret = elem.getAttribute( name ); - } - - // Non-existent attributes return null, we normalize to undefined - return ret == null ? - undefined : - ret; - } - }, - - removeAttr: function( elem, value ) { - var name, propName, - i = 0, - attrNames = value && value.match( core_rnotwhite ); - - if ( attrNames && elem.nodeType === 1 ) { - while ( (name = attrNames[i++]) ) { - propName = jQuery.propFix[ name ] || name; - - // Boolean attributes get special treatment (#10870) - if ( rboolean.test( name ) ) { - // Set corresponding property to false for boolean attributes - // Also clear defaultChecked/defaultSelected (if appropriate) for IE<8 - if ( !getSetAttribute && ruseDefault.test( name ) ) { - elem[ jQuery.camelCase( "default-" + name ) ] = - elem[ propName ] = false; - } else { - elem[ propName ] = false; - } - - // See #9699 for explanation of this approach (setting first, then removal) - } else { - jQuery.attr( elem, name, "" ); - } - - elem.removeAttribute( getSetAttribute ? name : propName ); - } - } - }, - - attrHooks: { - type: { - set: function( elem, value ) { - if ( !jQuery.support.radioValue && value === "radio" && jQuery.nodeName(elem, "input") ) { - // Setting the type on a radio button after the value resets the value in IE6-9 - // Reset value to default in case type is set after value during creation - var val = elem.value; - elem.setAttribute( "type", value ); - if ( val ) { - elem.value = val; - } - return value; - } - } - } - }, - - propFix: { - tabindex: "tabIndex", - readonly: "readOnly", - "for": "htmlFor", - "class": "className", - maxlength: "maxLength", - cellspacing: "cellSpacing", - cellpadding: "cellPadding", - rowspan: "rowSpan", - colspan: "colSpan", - usemap: "useMap", - frameborder: "frameBorder", - contenteditable: "contentEditable" - }, - - prop: function( elem, name, value ) { - var ret, hooks, notxml, - nType = elem.nodeType; - - // don't get/set properties on text, comment and attribute nodes - if ( !elem || nType === 3 || nType === 8 || nType === 2 ) { - return; - } - - notxml = nType !== 1 || !jQuery.isXMLDoc( elem ); - - if ( notxml ) { - // Fix name and attach hooks - name = jQuery.propFix[ name ] || name; - hooks = jQuery.propHooks[ name ]; - } - - if ( value !== undefined ) { - if ( hooks && "set" in hooks && (ret = hooks.set( elem, value, name )) !== undefined ) { - return ret; - - } else { - return ( elem[ name ] = value ); - } - - } else { - if ( hooks && "get" in hooks && (ret = hooks.get( elem, name )) !== null ) { - return ret; - - } else { - return elem[ name ]; - } - } - }, - - propHooks: { - tabIndex: { - get: function( elem ) { - // elem.tabIndex doesn't always return the correct value when it hasn't been explicitly set - // http://fluidproject.org/blog/2008/01/09/getting-setting-and-removing-tabindex-values-with-javascript/ - var attributeNode = elem.getAttributeNode("tabindex"); - - return attributeNode && attributeNode.specified ? - parseInt( attributeNode.value, 10 ) : - rfocusable.test( elem.nodeName ) || rclickable.test( elem.nodeName ) && elem.href ? - 0 : - undefined; - } - } - } -}); - -// Hook for boolean attributes -boolHook = { - get: function( elem, name ) { - var - // Use .prop to determine if this attribute is understood as boolean - prop = jQuery.prop( elem, name ), - - // Fetch it accordingly - attr = typeof prop === "boolean" && elem.getAttribute( name ), - detail = typeof prop === "boolean" ? - - getSetInput && getSetAttribute ? - attr != null : - // oldIE fabricates an empty string for missing boolean attributes - // and conflates checked/selected into attroperties - ruseDefault.test( name ) ? - elem[ jQuery.camelCase( "default-" + name ) ] : - !!attr : - - // fetch an attribute node for properties not recognized as boolean - elem.getAttributeNode( name ); - - return detail && detail.value !== false ? - name.toLowerCase() : - undefined; - }, - set: function( elem, value, name ) { - if ( value === false ) { - // Remove boolean attributes when set to false - jQuery.removeAttr( elem, name ); - } else if ( getSetInput && getSetAttribute || !ruseDefault.test( name ) ) { - // IE<8 needs the *property* name - elem.setAttribute( !getSetAttribute && jQuery.propFix[ name ] || name, name ); - - // Use defaultChecked and defaultSelected for oldIE - } else { - elem[ jQuery.camelCase( "default-" + name ) ] = elem[ name ] = true; - } - - return name; - } -}; - -// fix oldIE value attroperty -if ( !getSetInput || !getSetAttribute ) { - jQuery.attrHooks.value = { - get: function( elem, name ) { - var ret = elem.getAttributeNode( name ); - return jQuery.nodeName( elem, "input" ) ? - - // Ignore the value *property* by using defaultValue - elem.defaultValue : - - ret && ret.specified ? ret.value : undefined; - }, - set: function( elem, value, name ) { - if ( jQuery.nodeName( elem, "input" ) ) { - // Does not return so that setAttribute is also used - elem.defaultValue = value; - } else { - // Use nodeHook if defined (#1954); otherwise setAttribute is fine - return nodeHook && nodeHook.set( elem, value, name ); - } - } - }; -} - -// IE6/7 do not support getting/setting some attributes with get/setAttribute -if ( !getSetAttribute ) { - - // Use this for any attribute in IE6/7 - // This fixes almost every IE6/7 issue - nodeHook = jQuery.valHooks.button = { - get: function( elem, name ) { - var ret = elem.getAttributeNode( name ); - return ret && ( name === "id" || name === "name" || name === "coords" ? ret.value !== "" : ret.specified ) ? - ret.value : - undefined; - }, - set: function( elem, value, name ) { - // Set the existing or create a new attribute node - var ret = elem.getAttributeNode( name ); - if ( !ret ) { - elem.setAttributeNode( - (ret = elem.ownerDocument.createAttribute( name )) - ); - } - - ret.value = value += ""; - - // Break association with cloned elements by also using setAttribute (#9646) - return name === "value" || value === elem.getAttribute( name ) ? - value : - undefined; - } - }; - - // Set contenteditable to false on removals(#10429) - // Setting to empty string throws an error as an invalid value - jQuery.attrHooks.contenteditable = { - get: nodeHook.get, - set: function( elem, value, name ) { - nodeHook.set( elem, value === "" ? false : value, name ); - } - }; - - // Set width and height to auto instead of 0 on empty string( Bug #8150 ) - // This is for removals - jQuery.each([ "width", "height" ], function( i, name ) { - jQuery.attrHooks[ name ] = jQuery.extend( jQuery.attrHooks[ name ], { - set: function( elem, value ) { - if ( value === "" ) { - elem.setAttribute( name, "auto" ); - return value; - } - } - }); - }); -} - - -// Some attributes require a special call on IE -// http://msdn.microsoft.com/en-us/library/ms536429%28VS.85%29.aspx -if ( !jQuery.support.hrefNormalized ) { - jQuery.each([ "href", "src", "width", "height" ], function( i, name ) { - jQuery.attrHooks[ name ] = jQuery.extend( jQuery.attrHooks[ name ], { - get: function( elem ) { - var ret = elem.getAttribute( name, 2 ); - return ret == null ? undefined : ret; - } - }); - }); - - // href/src property should get the full normalized URL (#10299/#12915) - jQuery.each([ "href", "src" ], function( i, name ) { - jQuery.propHooks[ name ] = { - get: function( elem ) { - return elem.getAttribute( name, 4 ); - } - }; - }); -} - -if ( !jQuery.support.style ) { - jQuery.attrHooks.style = { - get: function( elem ) { - // Return undefined in the case of empty string - // Note: IE uppercases css property names, but if we were to .toLowerCase() - // .cssText, that would destroy case senstitivity in URL's, like in "background" - return elem.style.cssText || undefined; - }, - set: function( elem, value ) { - return ( elem.style.cssText = value + "" ); - } - }; -} - -// Safari mis-reports the default selected property of an option -// Accessing the parent's selectedIndex property fixes it -if ( !jQuery.support.optSelected ) { - jQuery.propHooks.selected = jQuery.extend( jQuery.propHooks.selected, { - get: function( elem ) { - var parent = elem.parentNode; - - if ( parent ) { - parent.selectedIndex; - - // Make sure that it also works with optgroups, see #5701 - if ( parent.parentNode ) { - parent.parentNode.selectedIndex; - } - } - return null; - } - }); -} - -// IE6/7 call enctype encoding -if ( !jQuery.support.enctype ) { - jQuery.propFix.enctype = "encoding"; -} - -// Radios and checkboxes getter/setter -if ( !jQuery.support.checkOn ) { - jQuery.each([ "radio", "checkbox" ], function() { - jQuery.valHooks[ this ] = { - get: function( elem ) { - // Handle the case where in Webkit "" is returned instead of "on" if a value isn't specified - return elem.getAttribute("value") === null ? "on" : elem.value; - } - }; - }); -} -jQuery.each([ "radio", "checkbox" ], function() { - jQuery.valHooks[ this ] = jQuery.extend( jQuery.valHooks[ this ], { - set: function( elem, value ) { - if ( jQuery.isArray( value ) ) { - return ( elem.checked = jQuery.inArray( jQuery(elem).val(), value ) >= 0 ); - } - } - }); -}); -var rformElems = /^(?:input|select|textarea)$/i, - rkeyEvent = /^key/, - rmouseEvent = /^(?:mouse|contextmenu)|click/, - rfocusMorph = /^(?:focusinfocus|focusoutblur)$/, - rtypenamespace = /^([^.]*)(?:\.(.+)|)$/; - -function returnTrue() { - return true; -} - -function returnFalse() { - return false; -} - -/* - * Helper functions for managing events -- not part of the public interface. - * Props to Dean Edwards' addEvent library for many of the ideas. - */ -jQuery.event = { - - global: {}, - - add: function( elem, types, handler, data, selector ) { - - var handleObjIn, eventHandle, tmp, - events, t, handleObj, - special, handlers, type, namespaces, origType, - // Don't attach events to noData or text/comment nodes (but allow plain objects) - elemData = elem.nodeType !== 3 && elem.nodeType !== 8 && jQuery._data( elem ); - - if ( !elemData ) { - return; - } - - // Caller can pass in an object of custom data in lieu of the handler - if ( handler.handler ) { - handleObjIn = handler; - handler = handleObjIn.handler; - selector = handleObjIn.selector; - } - - // Make sure that the handler has a unique ID, used to find/remove it later - if ( !handler.guid ) { - handler.guid = jQuery.guid++; - } - - // Init the element's event structure and main handler, if this is the first - if ( !(events = elemData.events) ) { - events = elemData.events = {}; - } - if ( !(eventHandle = elemData.handle) ) { - eventHandle = elemData.handle = function( e ) { - // Discard the second event of a jQuery.event.trigger() and - // when an event is called after a page has unloaded - return typeof jQuery !== "undefined" && (!e || jQuery.event.triggered !== e.type) ? - jQuery.event.dispatch.apply( eventHandle.elem, arguments ) : - undefined; - }; - // Add elem as a property of the handle fn to prevent a memory leak with IE non-native events - eventHandle.elem = elem; - } - - // Handle multiple events separated by a space - // jQuery(...).bind("mouseover mouseout", fn); - types = ( types || "" ).match( core_rnotwhite ) || [""]; - t = types.length; - while ( t-- ) { - tmp = rtypenamespace.exec( types[t] ) || []; - type = origType = tmp[1]; - namespaces = ( tmp[2] || "" ).split( "." ).sort(); - - // If event changes its type, use the special event handlers for the changed type - special = jQuery.event.special[ type ] || {}; - - // If selector defined, determine special event api type, otherwise given type - type = ( selector ? special.delegateType : special.bindType ) || type; - - // Update special based on newly reset type - special = jQuery.event.special[ type ] || {}; - - // handleObj is passed to all event handlers - handleObj = jQuery.extend({ - type: type, - origType: origType, - data: data, - handler: handler, - guid: handler.guid, - selector: selector, - needsContext: selector && jQuery.expr.match.needsContext.test( selector ), - namespace: namespaces.join(".") - }, handleObjIn ); - - // Init the event handler queue if we're the first - if ( !(handlers = events[ type ]) ) { - handlers = events[ type ] = []; - handlers.delegateCount = 0; - - // Only use addEventListener/attachEvent if the special events handler returns false - if ( !special.setup || special.setup.call( elem, data, namespaces, eventHandle ) === false ) { - // Bind the global event handler to the element - if ( elem.addEventListener ) { - elem.addEventListener( type, eventHandle, false ); - - } else if ( elem.attachEvent ) { - elem.attachEvent( "on" + type, eventHandle ); - } - } - } - - if ( special.add ) { - special.add.call( elem, handleObj ); - - if ( !handleObj.handler.guid ) { - handleObj.handler.guid = handler.guid; - } - } - - // Add to the element's handler list, delegates in front - if ( selector ) { - handlers.splice( handlers.delegateCount++, 0, handleObj ); - } else { - handlers.push( handleObj ); - } - - // Keep track of which events have ever been used, for event optimization - jQuery.event.global[ type ] = true; - } - - // Nullify elem to prevent memory leaks in IE - elem = null; - }, - - // Detach an event or set of events from an element - remove: function( elem, types, handler, selector, mappedTypes ) { - - var j, origCount, tmp, - events, t, handleObj, - special, handlers, type, namespaces, origType, - elemData = jQuery.hasData( elem ) && jQuery._data( elem ); - - if ( !elemData || !(events = elemData.events) ) { - return; - } - - // Once for each type.namespace in types; type may be omitted - types = ( types || "" ).match( core_rnotwhite ) || [""]; - t = types.length; - while ( t-- ) { - tmp = rtypenamespace.exec( types[t] ) || []; - type = origType = tmp[1]; - namespaces = ( tmp[2] || "" ).split( "." ).sort(); - - // Unbind all events (on this namespace, if provided) for the element - if ( !type ) { - for ( type in events ) { - jQuery.event.remove( elem, type + types[ t ], handler, selector, true ); - } - continue; - } - - special = jQuery.event.special[ type ] || {}; - type = ( selector ? special.delegateType : special.bindType ) || type; - handlers = events[ type ] || []; - tmp = tmp[2] && new RegExp( "(^|\\.)" + namespaces.join("\\.(?:.*\\.|)") + "(\\.|$)" ); - - // Remove matching events - origCount = j = handlers.length; - while ( j-- ) { - handleObj = handlers[ j ]; - - if ( ( mappedTypes || origType === handleObj.origType ) && - ( !handler || handler.guid === handleObj.guid ) && - ( !tmp || tmp.test( handleObj.namespace ) ) && - ( !selector || selector === handleObj.selector || selector === "**" && handleObj.selector ) ) { - handlers.splice( j, 1 ); - - if ( handleObj.selector ) { - handlers.delegateCount--; - } - if ( special.remove ) { - special.remove.call( elem, handleObj ); - } - } - } - - // Remove generic event handler if we removed something and no more handlers exist - // (avoids potential for endless recursion during removal of special event handlers) - if ( origCount && !handlers.length ) { - if ( !special.teardown || special.teardown.call( elem, namespaces, elemData.handle ) === false ) { - jQuery.removeEvent( elem, type, elemData.handle ); - } - - delete events[ type ]; - } - } - - // Remove the expando if it's no longer used - if ( jQuery.isEmptyObject( events ) ) { - delete elemData.handle; - - // removeData also checks for emptiness and clears the expando if empty - // so use it instead of delete - jQuery._removeData( elem, "events" ); - } - }, - - trigger: function( event, data, elem, onlyHandlers ) { - - var i, cur, tmp, bubbleType, ontype, handle, special, - eventPath = [ elem || document ], - type = event.type || event, - namespaces = event.namespace ? event.namespace.split(".") : []; - - cur = tmp = elem = elem || document; - - // Don't do events on text and comment nodes - if ( elem.nodeType === 3 || elem.nodeType === 8 ) { - return; - } - - // focus/blur morphs to focusin/out; ensure we're not firing them right now - if ( rfocusMorph.test( type + jQuery.event.triggered ) ) { - return; - } - - if ( type.indexOf(".") >= 0 ) { - // Namespaced trigger; create a regexp to match event type in handle() - namespaces = type.split("."); - type = namespaces.shift(); - namespaces.sort(); - } - ontype = type.indexOf(":") < 0 && "on" + type; - - // Caller can pass in a jQuery.Event object, Object, or just an event type string - event = event[ jQuery.expando ] ? - event : - new jQuery.Event( type, typeof event === "object" && event ); - - event.isTrigger = true; - event.namespace = namespaces.join("."); - event.namespace_re = event.namespace ? - new RegExp( "(^|\\.)" + namespaces.join("\\.(?:.*\\.|)") + "(\\.|$)" ) : - null; - - // Clean up the event in case it is being reused - event.result = undefined; - if ( !event.target ) { - event.target = elem; - } - - // Clone any incoming data and prepend the event, creating the handler arg list - data = data == null ? - [ event ] : - jQuery.makeArray( data, [ event ] ); - - // Allow special events to draw outside the lines - special = jQuery.event.special[ type ] || {}; - if ( !onlyHandlers && special.trigger && special.trigger.apply( elem, data ) === false ) { - return; - } - - // Determine event propagation path in advance, per W3C events spec (#9951) - // Bubble up to document, then to window; watch for a global ownerDocument var (#9724) - if ( !onlyHandlers && !special.noBubble && !jQuery.isWindow( elem ) ) { - - bubbleType = special.delegateType || type; - if ( !rfocusMorph.test( bubbleType + type ) ) { - cur = cur.parentNode; - } - for ( ; cur; cur = cur.parentNode ) { - eventPath.push( cur ); - tmp = cur; - } - - // Only add window if we got to document (e.g., not plain obj or detached DOM) - if ( tmp === (elem.ownerDocument || document) ) { - eventPath.push( tmp.defaultView || tmp.parentWindow || window ); - } - } - - // Fire handlers on the event path - i = 0; - while ( (cur = eventPath[i++]) && !event.isPropagationStopped() ) { - - event.type = i > 1 ? - bubbleType : - special.bindType || type; - - // jQuery handler - handle = ( jQuery._data( cur, "events" ) || {} )[ event.type ] && jQuery._data( cur, "handle" ); - if ( handle ) { - handle.apply( cur, data ); - } - - // Native handler - handle = ontype && cur[ ontype ]; - if ( handle && jQuery.acceptData( cur ) && handle.apply && handle.apply( cur, data ) === false ) { - event.preventDefault(); - } - } - event.type = type; - - // If nobody prevented the default action, do it now - if ( !onlyHandlers && !event.isDefaultPrevented() ) { - - if ( (!special._default || special._default.apply( elem.ownerDocument, data ) === false) && - !(type === "click" && jQuery.nodeName( elem, "a" )) && jQuery.acceptData( elem ) ) { - - // Call a native DOM method on the target with the same name name as the event. - // Can't use an .isFunction() check here because IE6/7 fails that test. - // Don't do default actions on window, that's where global variables be (#6170) - if ( ontype && elem[ type ] && !jQuery.isWindow( elem ) ) { - - // Don't re-trigger an onFOO event when we call its FOO() method - tmp = elem[ ontype ]; - - if ( tmp ) { - elem[ ontype ] = null; - } - - // Prevent re-triggering of the same event, since we already bubbled it above - jQuery.event.triggered = type; - try { - elem[ type ](); - } catch ( e ) { - // IE<9 dies on focus/blur to hidden element (#1486,#12518) - // only reproducible on winXP IE8 native, not IE9 in IE8 mode - } - jQuery.event.triggered = undefined; - - if ( tmp ) { - elem[ ontype ] = tmp; - } - } - } - } - - return event.result; - }, - - dispatch: function( event ) { - - // Make a writable jQuery.Event from the native event object - event = jQuery.event.fix( event ); - - var i, j, ret, matched, handleObj, - handlerQueue = [], - args = core_slice.call( arguments ), - handlers = ( jQuery._data( this, "events" ) || {} )[ event.type ] || [], - special = jQuery.event.special[ event.type ] || {}; - - // Use the fix-ed jQuery.Event rather than the (read-only) native event - args[0] = event; - event.delegateTarget = this; - - // Call the preDispatch hook for the mapped type, and let it bail if desired - if ( special.preDispatch && special.preDispatch.call( this, event ) === false ) { - return; - } - - // Determine handlers - handlerQueue = jQuery.event.handlers.call( this, event, handlers ); - - // Run delegates first; they may want to stop propagation beneath us - i = 0; - while ( (matched = handlerQueue[ i++ ]) && !event.isPropagationStopped() ) { - event.currentTarget = matched.elem; - - j = 0; - while ( (handleObj = matched.handlers[ j++ ]) && !event.isImmediatePropagationStopped() ) { - - // Triggered event must either 1) have no namespace, or - // 2) have namespace(s) a subset or equal to those in the bound event (both can have no namespace). - if ( !event.namespace_re || event.namespace_re.test( handleObj.namespace ) ) { - - event.handleObj = handleObj; - event.data = handleObj.data; - - ret = ( (jQuery.event.special[ handleObj.origType ] || {}).handle || handleObj.handler ) - .apply( matched.elem, args ); - - if ( ret !== undefined ) { - if ( (event.result = ret) === false ) { - event.preventDefault(); - event.stopPropagation(); - } - } - } - } - } - - // Call the postDispatch hook for the mapped type - if ( special.postDispatch ) { - special.postDispatch.call( this, event ); - } - - return event.result; - }, - - handlers: function( event, handlers ) { - var i, matches, sel, handleObj, - handlerQueue = [], - delegateCount = handlers.delegateCount, - cur = event.target; - - // Find delegate handlers - // Black-hole SVG <use> instance trees (#13180) - // Avoid non-left-click bubbling in Firefox (#3861) - if ( delegateCount && cur.nodeType && (!event.button || event.type !== "click") ) { - - for ( ; cur != this; cur = cur.parentNode || this ) { - - // Don't process clicks on disabled elements (#6911, #8165, #11382, #11764) - if ( cur.disabled !== true || event.type !== "click" ) { - matches = []; - for ( i = 0; i < delegateCount; i++ ) { - handleObj = handlers[ i ]; - - // Don't conflict with Object.prototype properties (#13203) - sel = handleObj.selector + " "; - - if ( matches[ sel ] === undefined ) { - matches[ sel ] = handleObj.needsContext ? - jQuery( sel, this ).index( cur ) >= 0 : - jQuery.find( sel, this, null, [ cur ] ).length; - } - if ( matches[ sel ] ) { - matches.push( handleObj ); - } - } - if ( matches.length ) { - handlerQueue.push({ elem: cur, handlers: matches }); - } - } - } - } - - // Add the remaining (directly-bound) handlers - if ( delegateCount < handlers.length ) { - handlerQueue.push({ elem: this, handlers: handlers.slice( delegateCount ) }); - } - - return handlerQueue; - }, - - fix: function( event ) { - if ( event[ jQuery.expando ] ) { - return event; - } - - // Create a writable copy of the event object and normalize some properties - var i, prop, - originalEvent = event, - fixHook = jQuery.event.fixHooks[ event.type ] || {}, - copy = fixHook.props ? this.props.concat( fixHook.props ) : this.props; - - event = new jQuery.Event( originalEvent ); - - i = copy.length; - while ( i-- ) { - prop = copy[ i ]; - event[ prop ] = originalEvent[ prop ]; - } - - // Support: IE<9 - // Fix target property (#1925) - if ( !event.target ) { - event.target = originalEvent.srcElement || document; - } - - // Support: Chrome 23+, Safari? - // Target should not be a text node (#504, #13143) - if ( event.target.nodeType === 3 ) { - event.target = event.target.parentNode; - } - - // Support: IE<9 - // For mouse/key events, metaKey==false if it's undefined (#3368, #11328) - event.metaKey = !!event.metaKey; - - return fixHook.filter ? fixHook.filter( event, originalEvent ) : event; - }, - - // Includes some event props shared by KeyEvent and MouseEvent - props: "altKey bubbles cancelable ctrlKey currentTarget eventPhase metaKey relatedTarget shiftKey target timeStamp view which".split(" "), - - fixHooks: {}, - - keyHooks: { - props: "char charCode key keyCode".split(" "), - filter: function( event, original ) { - - // Add which for key events - if ( event.which == null ) { - event.which = original.charCode != null ? original.charCode : original.keyCode; - } - - return event; - } - }, - - mouseHooks: { - props: "button buttons clientX clientY fromElement offsetX offsetY pageX pageY screenX screenY toElement".split(" "), - filter: function( event, original ) { - var eventDoc, doc, body, - button = original.button, - fromElement = original.fromElement; - - // Calculate pageX/Y if missing and clientX/Y available - if ( event.pageX == null && original.clientX != null ) { - eventDoc = event.target.ownerDocument || document; - doc = eventDoc.documentElement; - body = eventDoc.body; - - event.pageX = original.clientX + ( doc && doc.scrollLeft || body && body.scrollLeft || 0 ) - ( doc && doc.clientLeft || body && body.clientLeft || 0 ); - event.pageY = original.clientY + ( doc && doc.scrollTop || body && body.scrollTop || 0 ) - ( doc && doc.clientTop || body && body.clientTop || 0 ); - } - - // Add relatedTarget, if necessary - if ( !event.relatedTarget && fromElement ) { - event.relatedTarget = fromElement === event.target ? original.toElement : fromElement; - } - - // Add which for click: 1 === left; 2 === middle; 3 === right - // Note: button is not normalized, so don't use it - if ( !event.which && button !== undefined ) { - event.which = ( button & 1 ? 1 : ( button & 2 ? 3 : ( button & 4 ? 2 : 0 ) ) ); - } - - return event; - } - }, - - special: { - load: { - // Prevent triggered image.load events from bubbling to window.load - noBubble: true - }, - click: { - // For checkbox, fire native event so checked state will be right - trigger: function() { - if ( jQuery.nodeName( this, "input" ) && this.type === "checkbox" && this.click ) { - this.click(); - return false; - } - } - }, - focus: { - // Fire native event if possible so blur/focus sequence is correct - trigger: function() { - if ( this !== document.activeElement && this.focus ) { - try { - this.focus(); - return false; - } catch ( e ) { - // Support: IE<9 - // If we error on focus to hidden element (#1486, #12518), - // let .trigger() run the handlers - } - } - }, - delegateType: "focusin" - }, - blur: { - trigger: function() { - if ( this === document.activeElement && this.blur ) { - this.blur(); - return false; - } - }, - delegateType: "focusout" - }, - - beforeunload: { - postDispatch: function( event ) { - - // Even when returnValue equals to undefined Firefox will still show alert - if ( event.result !== undefined ) { - event.originalEvent.returnValue = event.result; - } - } - } - }, - - simulate: function( type, elem, event, bubble ) { - // Piggyback on a donor event to simulate a different one. - // Fake originalEvent to avoid donor's stopPropagation, but if the - // simulated event prevents default then we do the same on the donor. - var e = jQuery.extend( - new jQuery.Event(), - event, - { type: type, - isSimulated: true, - originalEvent: {} - } - ); - if ( bubble ) { - jQuery.event.trigger( e, null, elem ); - } else { - jQuery.event.dispatch.call( elem, e ); - } - if ( e.isDefaultPrevented() ) { - event.preventDefault(); - } - } -}; - -jQuery.removeEvent = document.removeEventListener ? - function( elem, type, handle ) { - if ( elem.removeEventListener ) { - elem.removeEventListener( type, handle, false ); - } - } : - function( elem, type, handle ) { - var name = "on" + type; - - if ( elem.detachEvent ) { - - // #8545, #7054, preventing memory leaks for custom events in IE6-8 - // detachEvent needed property on element, by name of that event, to properly expose it to GC - if ( typeof elem[ name ] === "undefined" ) { - elem[ name ] = null; - } - - elem.detachEvent( name, handle ); - } - }; - -jQuery.Event = function( src, props ) { - // Allow instantiation without the 'new' keyword - if ( !(this instanceof jQuery.Event) ) { - return new jQuery.Event( src, props ); - } - - // Event object - if ( src && src.type ) { - this.originalEvent = src; - this.type = src.type; - - // Events bubbling up the document may have been marked as prevented - // by a handler lower down the tree; reflect the correct value. - this.isDefaultPrevented = ( src.defaultPrevented || src.returnValue === false || - src.getPreventDefault && src.getPreventDefault() ) ? returnTrue : returnFalse; - - // Event type - } else { - this.type = src; - } - - // Put explicitly provided properties onto the event object - if ( props ) { - jQuery.extend( this, props ); - } - - // Create a timestamp if incoming event doesn't have one - this.timeStamp = src && src.timeStamp || jQuery.now(); - - // Mark it as fixed - this[ jQuery.expando ] = true; -}; - -// jQuery.Event is based on DOM3 Events as specified by the ECMAScript Language Binding -// http://www.w3.org/TR/2003/WD-DOM-Level-3-Events-20030331/ecma-script-binding.html -jQuery.Event.prototype = { - isDefaultPrevented: returnFalse, - isPropagationStopped: returnFalse, - isImmediatePropagationStopped: returnFalse, - - preventDefault: function() { - var e = this.originalEvent; - - this.isDefaultPrevented = returnTrue; - if ( !e ) { - return; - } - - // If preventDefault exists, run it on the original event - if ( e.preventDefault ) { - e.preventDefault(); - - // Support: IE - // Otherwise set the returnValue property of the original event to false - } else { - e.returnValue = false; - } - }, - stopPropagation: function() { - var e = this.originalEvent; - - this.isPropagationStopped = returnTrue; - if ( !e ) { - return; - } - // If stopPropagation exists, run it on the original event - if ( e.stopPropagation ) { - e.stopPropagation(); - } - - // Support: IE - // Set the cancelBubble property of the original event to true - e.cancelBubble = true; - }, - stopImmediatePropagation: function() { - this.isImmediatePropagationStopped = returnTrue; - this.stopPropagation(); - } -}; - -// Create mouseenter/leave events using mouseover/out and event-time checks -jQuery.each({ - mouseenter: "mouseover", - mouseleave: "mouseout" -}, function( orig, fix ) { - jQuery.event.special[ orig ] = { - delegateType: fix, - bindType: fix, - - handle: function( event ) { - var ret, - target = this, - related = event.relatedTarget, - handleObj = event.handleObj; - - // For mousenter/leave call the handler if related is outside the target. - // NB: No relatedTarget if the mouse left/entered the browser window - if ( !related || (related !== target && !jQuery.contains( target, related )) ) { - event.type = handleObj.origType; - ret = handleObj.handler.apply( this, arguments ); - event.type = fix; - } - return ret; - } - }; -}); - -// IE submit delegation -if ( !jQuery.support.submitBubbles ) { - - jQuery.event.special.submit = { - setup: function() { - // Only need this for delegated form submit events - if ( jQuery.nodeName( this, "form" ) ) { - return false; - } - - // Lazy-add a submit handler when a descendant form may potentially be submitted - jQuery.event.add( this, "click._submit keypress._submit", function( e ) { - // Node name check avoids a VML-related crash in IE (#9807) - var elem = e.target, - form = jQuery.nodeName( elem, "input" ) || jQuery.nodeName( elem, "button" ) ? elem.form : undefined; - if ( form && !jQuery._data( form, "submitBubbles" ) ) { - jQuery.event.add( form, "submit._submit", function( event ) { - event._submit_bubble = true; - }); - jQuery._data( form, "submitBubbles", true ); - } - }); - // return undefined since we don't need an event listener - }, - - postDispatch: function( event ) { - // If form was submitted by the user, bubble the event up the tree - if ( event._submit_bubble ) { - delete event._submit_bubble; - if ( this.parentNode && !event.isTrigger ) { - jQuery.event.simulate( "submit", this.parentNode, event, true ); - } - } - }, - - teardown: function() { - // Only need this for delegated form submit events - if ( jQuery.nodeName( this, "form" ) ) { - return false; - } - - // Remove delegated handlers; cleanData eventually reaps submit handlers attached above - jQuery.event.remove( this, "._submit" ); - } - }; -} - -// IE change delegation and checkbox/radio fix -if ( !jQuery.support.changeBubbles ) { - - jQuery.event.special.change = { - - setup: function() { - - if ( rformElems.test( this.nodeName ) ) { - // IE doesn't fire change on a check/radio until blur; trigger it on click - // after a propertychange. Eat the blur-change in special.change.handle. - // This still fires onchange a second time for check/radio after blur. - if ( this.type === "checkbox" || this.type === "radio" ) { - jQuery.event.add( this, "propertychange._change", function( event ) { - if ( event.originalEvent.propertyName === "checked" ) { - this._just_changed = true; - } - }); - jQuery.event.add( this, "click._change", function( event ) { - if ( this._just_changed && !event.isTrigger ) { - this._just_changed = false; - } - // Allow triggered, simulated change events (#11500) - jQuery.event.simulate( "change", this, event, true ); - }); - } - return false; - } - // Delegated event; lazy-add a change handler on descendant inputs - jQuery.event.add( this, "beforeactivate._change", function( e ) { - var elem = e.target; - - if ( rformElems.test( elem.nodeName ) && !jQuery._data( elem, "changeBubbles" ) ) { - jQuery.event.add( elem, "change._change", function( event ) { - if ( this.parentNode && !event.isSimulated && !event.isTrigger ) { - jQuery.event.simulate( "change", this.parentNode, event, true ); - } - }); - jQuery._data( elem, "changeBubbles", true ); - } - }); - }, - - handle: function( event ) { - var elem = event.target; - - // Swallow native change events from checkbox/radio, we already triggered them above - if ( this !== elem || event.isSimulated || event.isTrigger || (elem.type !== "radio" && elem.type !== "checkbox") ) { - return event.handleObj.handler.apply( this, arguments ); - } - }, - - teardown: function() { - jQuery.event.remove( this, "._change" ); - - return !rformElems.test( this.nodeName ); - } - }; -} - -// Create "bubbling" focus and blur events -if ( !jQuery.support.focusinBubbles ) { - jQuery.each({ focus: "focusin", blur: "focusout" }, function( orig, fix ) { - - // Attach a single capturing handler while someone wants focusin/focusout - var attaches = 0, - handler = function( event ) { - jQuery.event.simulate( fix, event.target, jQuery.event.fix( event ), true ); - }; - - jQuery.event.special[ fix ] = { - setup: function() { - if ( attaches++ === 0 ) { - document.addEventListener( orig, handler, true ); - } - }, - teardown: function() { - if ( --attaches === 0 ) { - document.removeEventListener( orig, handler, true ); - } - } - }; - }); -} - -jQuery.fn.extend({ - - on: function( types, selector, data, fn, /*INTERNAL*/ one ) { - var origFn, type; - - // Types can be a map of types/handlers - if ( typeof types === "object" ) { - // ( types-Object, selector, data ) - if ( typeof selector !== "string" ) { - // ( types-Object, data ) - data = data || selector; - selector = undefined; - } - for ( type in types ) { - this.on( type, selector, data, types[ type ], one ); - } - return this; - } - - if ( data == null && fn == null ) { - // ( types, fn ) - fn = selector; - data = selector = undefined; - } else if ( fn == null ) { - if ( typeof selector === "string" ) { - // ( types, selector, fn ) - fn = data; - data = undefined; - } else { - // ( types, data, fn ) - fn = data; - data = selector; - selector = undefined; - } - } - if ( fn === false ) { - fn = returnFalse; - } else if ( !fn ) { - return this; - } - - if ( one === 1 ) { - origFn = fn; - fn = function( event ) { - // Can use an empty set, since event contains the info - jQuery().off( event ); - return origFn.apply( this, arguments ); - }; - // Use same guid so caller can remove using origFn - fn.guid = origFn.guid || ( origFn.guid = jQuery.guid++ ); - } - return this.each( function() { - jQuery.event.add( this, types, fn, data, selector ); - }); - }, - one: function( types, selector, data, fn ) { - return this.on( types, selector, data, fn, 1 ); - }, - off: function( types, selector, fn ) { - var handleObj, type; - if ( types && types.preventDefault && types.handleObj ) { - // ( event ) dispatched jQuery.Event - handleObj = types.handleObj; - jQuery( types.delegateTarget ).off( - handleObj.namespace ? handleObj.origType + "." + handleObj.namespace : handleObj.origType, - handleObj.selector, - handleObj.handler - ); - return this; - } - if ( typeof types === "object" ) { - // ( types-object [, selector] ) - for ( type in types ) { - this.off( type, selector, types[ type ] ); - } - return this; - } - if ( selector === false || typeof selector === "function" ) { - // ( types [, fn] ) - fn = selector; - selector = undefined; - } - if ( fn === false ) { - fn = returnFalse; - } - return this.each(function() { - jQuery.event.remove( this, types, fn, selector ); - }); - }, - - bind: function( types, data, fn ) { - return this.on( types, null, data, fn ); - }, - unbind: function( types, fn ) { - return this.off( types, null, fn ); - }, - - delegate: function( selector, types, data, fn ) { - return this.on( types, selector, data, fn ); - }, - undelegate: function( selector, types, fn ) { - // ( namespace ) or ( selector, types [, fn] ) - return arguments.length === 1 ? this.off( selector, "**" ) : this.off( types, selector || "**", fn ); - }, - - trigger: function( type, data ) { - return this.each(function() { - jQuery.event.trigger( type, data, this ); - }); - }, - triggerHandler: function( type, data ) { - var elem = this[0]; - if ( elem ) { - return jQuery.event.trigger( type, data, elem, true ); - } - }, - - hover: function( fnOver, fnOut ) { - return this.mouseenter( fnOver ).mouseleave( fnOut || fnOver ); - } -}); - -jQuery.each( ("blur focus focusin focusout load resize scroll unload click dblclick " + - "mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave " + - "change select submit keydown keypress keyup error contextmenu").split(" "), function( i, name ) { - - // Handle event binding - jQuery.fn[ name ] = function( data, fn ) { - return arguments.length > 0 ? - this.on( name, null, data, fn ) : - this.trigger( name ); - }; - - if ( rkeyEvent.test( name ) ) { - jQuery.event.fixHooks[ name ] = jQuery.event.keyHooks; - } - - if ( rmouseEvent.test( name ) ) { - jQuery.event.fixHooks[ name ] = jQuery.event.mouseHooks; - } -}); -/*! - * Sizzle CSS Selector Engine - * Copyright 2012 jQuery Foundation and other contributors - * Released under the MIT license - * http://sizzlejs.com/ - */ -(function( window, undefined ) { - -var i, - cachedruns, - Expr, - getText, - isXML, - compile, - hasDuplicate, - outermostContext, - - // Local document vars - setDocument, - document, - docElem, - documentIsXML, - rbuggyQSA, - rbuggyMatches, - matches, - contains, - sortOrder, - - // Instance-specific data - expando = "sizzle" + -(new Date()), - preferredDoc = window.document, - support = {}, - dirruns = 0, - done = 0, - classCache = createCache(), - tokenCache = createCache(), - compilerCache = createCache(), - - // General-purpose constants - strundefined = typeof undefined, - MAX_NEGATIVE = 1 << 31, - - // Array methods - arr = [], - pop = arr.pop, - push = arr.push, - slice = arr.slice, - // Use a stripped-down indexOf if we can't use a native one - indexOf = arr.indexOf || function( elem ) { - var i = 0, - len = this.length; - for ( ; i < len; i++ ) { - if ( this[i] === elem ) { - return i; - } - } - return -1; - }, - - - // Regular expressions - - // Whitespace characters http://www.w3.org/TR/css3-selectors/#whitespace - whitespace = "[\\x20\\t\\r\\n\\f]", - // http://www.w3.org/TR/css3-syntax/#characters - characterEncoding = "(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+", - - // Loosely modeled on CSS identifier characters - // An unquoted value should be a CSS identifier http://www.w3.org/TR/css3-selectors/#attribute-selectors - // Proper syntax: http://www.w3.org/TR/CSS21/syndata.html#value-def-identifier - identifier = characterEncoding.replace( "w", "w#" ), - - // Acceptable operators http://www.w3.org/TR/selectors/#attribute-selectors - operators = "([*^$|!~]?=)", - attributes = "\\[" + whitespace + "*(" + characterEncoding + ")" + whitespace + - "*(?:" + operators + whitespace + "*(?:(['\"])((?:\\\\.|[^\\\\])*?)\\3|(" + identifier + ")|)|)" + whitespace + "*\\]", - - // Prefer arguments quoted, - // then not containing pseudos/brackets, - // then attribute selectors/non-parenthetical expressions, - // then anything else - // These preferences are here to reduce the number of selectors - // needing tokenize in the PSEUDO preFilter - pseudos = ":(" + characterEncoding + ")(?:\\(((['\"])((?:\\\\.|[^\\\\])*?)\\3|((?:\\\\.|[^\\\\()[\\]]|" + attributes.replace( 3, 8 ) + ")*)|.*)\\)|)", - - // Leading and non-escaped trailing whitespace, capturing some non-whitespace characters preceding the latter - rtrim = new RegExp( "^" + whitespace + "+|((?:^|[^\\\\])(?:\\\\.)*)" + whitespace + "+$", "g" ), - - rcomma = new RegExp( "^" + whitespace + "*," + whitespace + "*" ), - rcombinators = new RegExp( "^" + whitespace + "*([\\x20\\t\\r\\n\\f>+~])" + whitespace + "*" ), - rpseudo = new RegExp( pseudos ), - ridentifier = new RegExp( "^" + identifier + "$" ), - - matchExpr = { - "ID": new RegExp( "^#(" + characterEncoding + ")" ), - "CLASS": new RegExp( "^\\.(" + characterEncoding + ")" ), - "NAME": new RegExp( "^\\[name=['\"]?(" + characterEncoding + ")['\"]?\\]" ), - "TAG": new RegExp( "^(" + characterEncoding.replace( "w", "w*" ) + ")" ), - "ATTR": new RegExp( "^" + attributes ), - "PSEUDO": new RegExp( "^" + pseudos ), - "CHILD": new RegExp( "^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\(" + whitespace + - "*(even|odd|(([+-]|)(\\d*)n|)" + whitespace + "*(?:([+-]|)" + whitespace + - "*(\\d+)|))" + whitespace + "*\\)|)", "i" ), - // For use in libraries implementing .is() - // We use this for POS matching in `select` - "needsContext": new RegExp( "^" + whitespace + "*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\(" + - whitespace + "*((?:-\\d)?\\d*)" + whitespace + "*\\)|)(?=[^-]|$)", "i" ) - }, - - rsibling = /[\x20\t\r\n\f]*[+~]/, - - rnative = /\{\s*\[native code\]\s*\}/, - - // Easily-parseable/retrievable ID or TAG or CLASS selectors - rquickExpr = /^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/, - - rinputs = /^(?:input|select|textarea|button)$/i, - rheader = /^h\d$/i, - - rescape = /'|\\/g, - rattributeQuotes = /\=[\x20\t\r\n\f]*([^'"\]]*)[\x20\t\r\n\f]*\]/g, - - // CSS escapes http://www.w3.org/TR/CSS21/syndata.html#escaped-characters - runescape = /\\([\da-fA-F]{1,6}[\x20\t\r\n\f]?|.)/g, - funescape = function( _, escaped ) { - var high = "0x" + escaped - 0x10000; - // NaN means non-codepoint - return high !== high ? - escaped : - // BMP codepoint - high < 0 ? - String.fromCharCode( high + 0x10000 ) : - // Supplemental Plane codepoint (surrogate pair) - String.fromCharCode( high >> 10 | 0xD800, high & 0x3FF | 0xDC00 ); - }; - -// Use a stripped-down slice if we can't use a native one -try { - slice.call( docElem.childNodes, 0 )[0].nodeType; -} catch ( e ) { - slice = function( i ) { - var elem, - results = []; - for ( ; (elem = this[i]); i++ ) { - results.push( elem ); - } - return results; - }; -} - -/** - * For feature detection - * @param {Function} fn The function to test for native support - */ -function isNative( fn ) { - return rnative.test( fn + "" ); -} - -/** - * Create key-value caches of limited size - * @returns {Function(string, Object)} Returns the Object data after storing it on itself with - * property name the (space-suffixed) string and (if the cache is larger than Expr.cacheLength) - * deleting the oldest entry - */ -function createCache() { - var cache, - keys = []; - - return (cache = function( key, value ) { - // Use (key + " ") to avoid collision with native prototype properties (see Issue #157) - if ( keys.push( key += " " ) > Expr.cacheLength ) { - // Only keep the most recent entries - delete cache[ keys.shift() ]; - } - return (cache[ key ] = value); - }); -} - -/** - * Mark a function for special use by Sizzle - * @param {Function} fn The function to mark - */ -function markFunction( fn ) { - fn[ expando ] = true; - return fn; -} - -/** - * Support testing using an element - * @param {Function} fn Passed the created div and expects a boolean result - */ -function assert( fn ) { - var div = document.createElement("div"); - - try { - return fn( div ); - } catch (e) { - return false; - } finally { - // release memory in IE - div = null; - } -} - -function Sizzle( selector, context, results, seed ) { - var match, elem, m, nodeType, - // QSA vars - i, groups, old, nid, newContext, newSelector; - - if ( ( context ? context.ownerDocument || context : preferredDoc ) !== document ) { - setDocument( context ); - } - - context = context || document; - results = results || []; - - if ( !selector || typeof selector !== "string" ) { - return results; - } - - if ( (nodeType = context.nodeType) !== 1 && nodeType !== 9 ) { - return []; - } - - if ( !documentIsXML && !seed ) { - - // Shortcuts - if ( (match = rquickExpr.exec( selector )) ) { - // Speed-up: Sizzle("#ID") - if ( (m = match[1]) ) { - if ( nodeType === 9 ) { - elem = context.getElementById( m ); - // Check parentNode to catch when Blackberry 4.6 returns - // nodes that are no longer in the document #6963 - if ( elem && elem.parentNode ) { - // Handle the case where IE, Opera, and Webkit return items - // by name instead of ID - if ( elem.id === m ) { - results.push( elem ); - return results; - } - } else { - return results; - } - } else { - // Context is not a document - if ( context.ownerDocument && (elem = context.ownerDocument.getElementById( m )) && - contains( context, elem ) && elem.id === m ) { - results.push( elem ); - return results; - } - } - - // Speed-up: Sizzle("TAG") - } else if ( match[2] ) { - push.apply( results, slice.call(context.getElementsByTagName( selector ), 0) ); - return results; - - // Speed-up: Sizzle(".CLASS") - } else if ( (m = match[3]) && support.getByClassName && context.getElementsByClassName ) { - push.apply( results, slice.call(context.getElementsByClassName( m ), 0) ); - return results; - } - } - - // QSA path - if ( support.qsa && !rbuggyQSA.test(selector) ) { - old = true; - nid = expando; - newContext = context; - newSelector = nodeType === 9 && selector; - - // qSA works strangely on Element-rooted queries - // We can work around this by specifying an extra ID on the root - // and working up from there (Thanks to Andrew Dupont for the technique) - // IE 8 doesn't work on object elements - if ( nodeType === 1 && context.nodeName.toLowerCase() !== "object" ) { - groups = tokenize( selector ); - - if ( (old = context.getAttribute("id")) ) { - nid = old.replace( rescape, "\\$&" ); - } else { - context.setAttribute( "id", nid ); - } - nid = "[id='" + nid + "'] "; - - i = groups.length; - while ( i-- ) { - groups[i] = nid + toSelector( groups[i] ); - } - newContext = rsibling.test( selector ) && context.parentNode || context; - newSelector = groups.join(","); - } - - if ( newSelector ) { - try { - push.apply( results, slice.call( newContext.querySelectorAll( - newSelector - ), 0 ) ); - return results; - } catch(qsaError) { - } finally { - if ( !old ) { - context.removeAttribute("id"); - } - } - } - } - } - - // All others - return select( selector.replace( rtrim, "$1" ), context, results, seed ); -} - -/** - * Detect xml - * @param {Element|Object} elem An element or a document - */ -isXML = Sizzle.isXML = function( elem ) { - // documentElement is verified for cases where it doesn't yet exist - // (such as loading iframes in IE - #4833) - var documentElement = elem && (elem.ownerDocument || elem).documentElement; - return documentElement ? documentElement.nodeName !== "HTML" : false; -}; - -/** - * Sets document-related variables once based on the current document - * @param {Element|Object} [doc] An element or document object to use to set the document - * @returns {Object} Returns the current document - */ -setDocument = Sizzle.setDocument = function( node ) { - var doc = node ? node.ownerDocument || node : preferredDoc; - - // If no document and documentElement is available, return - if ( doc === document || doc.nodeType !== 9 || !doc.documentElement ) { - return document; - } - - // Set our document - document = doc; - docElem = doc.documentElement; - - // Support tests - documentIsXML = isXML( doc ); - - // Check if getElementsByTagName("*") returns only elements - support.tagNameNoComments = assert(function( div ) { - div.appendChild( doc.createComment("") ); - return !div.getElementsByTagName("*").length; - }); - - // Check if attributes should be retrieved by attribute nodes - support.attributes = assert(function( div ) { - div.innerHTML = "<select></select>"; - var type = typeof div.lastChild.getAttribute("multiple"); - // IE8 returns a string for some attributes even when not present - return type !== "boolean" && type !== "string"; - }); - - // Check if getElementsByClassName can be trusted - support.getByClassName = assert(function( div ) { - // Opera can't find a second classname (in 9.6) - div.innerHTML = "<div class='hidden e'></div><div class='hidden'></div>"; - if ( !div.getElementsByClassName || !div.getElementsByClassName("e").length ) { - return false; - } - - // Safari 3.2 caches class attributes and doesn't catch changes - div.lastChild.className = "e"; - return div.getElementsByClassName("e").length === 2; - }); - - // Check if getElementById returns elements by name - // Check if getElementsByName privileges form controls or returns elements by ID - support.getByName = assert(function( div ) { - // Inject content - div.id = expando + 0; - div.innerHTML = "<a name='" + expando + "'></a><div name='" + expando + "'></div>"; - docElem.insertBefore( div, docElem.firstChild ); - - // Test - var pass = doc.getElementsByName && - // buggy browsers will return fewer than the correct 2 - doc.getElementsByName( expando ).length === 2 + - // buggy browsers will return more than the correct 0 - doc.getElementsByName( expando + 0 ).length; - support.getIdNotName = !doc.getElementById( expando ); - - // Cleanup - docElem.removeChild( div ); - - return pass; - }); - - // IE6/7 return modified attributes - Expr.attrHandle = assert(function( div ) { - div.innerHTML = "<a href='#'></a>"; - return div.firstChild && typeof div.firstChild.getAttribute !== strundefined && - div.firstChild.getAttribute("href") === "#"; - }) ? - {} : - { - "href": function( elem ) { - return elem.getAttribute( "href", 2 ); - }, - "type": function( elem ) { - return elem.getAttribute("type"); - } - }; - - // ID find and filter - if ( support.getIdNotName ) { - Expr.find["ID"] = function( id, context ) { - if ( typeof context.getElementById !== strundefined && !documentIsXML ) { - var m = context.getElementById( id ); - // Check parentNode to catch when Blackberry 4.6 returns - // nodes that are no longer in the document #6963 - return m && m.parentNode ? [m] : []; - } - }; - Expr.filter["ID"] = function( id ) { - var attrId = id.replace( runescape, funescape ); - return function( elem ) { - return elem.getAttribute("id") === attrId; - }; - }; - } else { - Expr.find["ID"] = function( id, context ) { - if ( typeof context.getElementById !== strundefined && !documentIsXML ) { - var m = context.getElementById( id ); - - return m ? - m.id === id || typeof m.getAttributeNode !== strundefined && m.getAttributeNode("id").value === id ? - [m] : - undefined : - []; - } - }; - Expr.filter["ID"] = function( id ) { - var attrId = id.replace( runescape, funescape ); - return function( elem ) { - var node = typeof elem.getAttributeNode !== strundefined && elem.getAttributeNode("id"); - return node && node.value === attrId; - }; - }; - } - - // Tag - Expr.find["TAG"] = support.tagNameNoComments ? - function( tag, context ) { - if ( typeof context.getElementsByTagName !== strundefined ) { - return context.getElementsByTagName( tag ); - } - } : - function( tag, context ) { - var elem, - tmp = [], - i = 0, - results = context.getElementsByTagName( tag ); - - // Filter out possible comments - if ( tag === "*" ) { - for ( ; (elem = results[i]); i++ ) { - if ( elem.nodeType === 1 ) { - tmp.push( elem ); - } - } - - return tmp; - } - return results; - }; - - // Name - Expr.find["NAME"] = support.getByName && function( tag, context ) { - if ( typeof context.getElementsByName !== strundefined ) { - return context.getElementsByName( name ); - } - }; - - // Class - Expr.find["CLASS"] = support.getByClassName && function( className, context ) { - if ( typeof context.getElementsByClassName !== strundefined && !documentIsXML ) { - return context.getElementsByClassName( className ); - } - }; - - // QSA and matchesSelector support - - // matchesSelector(:active) reports false when true (IE9/Opera 11.5) - rbuggyMatches = []; - - // qSa(:focus) reports false when true (Chrome 21), - // no need to also add to buggyMatches since matches checks buggyQSA - // A support test would require too much code (would include document ready) - rbuggyQSA = [ ":focus" ]; - - if ( (support.qsa = isNative(doc.querySelectorAll)) ) { - // Build QSA regex - // Regex strategy adopted from Diego Perini - assert(function( div ) { - // Select is set to empty string on purpose - // This is to test IE's treatment of not explictly - // setting a boolean content attribute, - // since its presence should be enough - // http://bugs.jquery.com/ticket/12359 - div.innerHTML = "<select><option selected=''></option></select>"; - - // IE8 - Some boolean attributes are not treated correctly - if ( !div.querySelectorAll("[selected]").length ) { - rbuggyQSA.push( "\\[" + whitespace + "*(?:checked|disabled|ismap|multiple|readonly|selected|value)" ); - } - - // Webkit/Opera - :checked should return selected option elements - // http://www.w3.org/TR/2011/REC-css3-selectors-20110929/#checked - // IE8 throws error here and will not see later tests - if ( !div.querySelectorAll(":checked").length ) { - rbuggyQSA.push(":checked"); - } - }); - - assert(function( div ) { - - // Opera 10-12/IE8 - ^= $= *= and empty values - // Should not select anything - div.innerHTML = "<input type='hidden' i=''/>"; - if ( div.querySelectorAll("[i^='']").length ) { - rbuggyQSA.push( "[*^$]=" + whitespace + "*(?:\"\"|'')" ); - } - - // FF 3.5 - :enabled/:disabled and hidden elements (hidden elements are still enabled) - // IE8 throws error here and will not see later tests - if ( !div.querySelectorAll(":enabled").length ) { - rbuggyQSA.push( ":enabled", ":disabled" ); - } - - // Opera 10-11 does not throw on post-comma invalid pseudos - div.querySelectorAll("*,:x"); - rbuggyQSA.push(",.*:"); - }); - } - - if ( (support.matchesSelector = isNative( (matches = docElem.matchesSelector || - docElem.mozMatchesSelector || - docElem.webkitMatchesSelector || - docElem.oMatchesSelector || - docElem.msMatchesSelector) )) ) { - - assert(function( div ) { - // Check to see if it's possible to do matchesSelector - // on a disconnected node (IE 9) - support.disconnectedMatch = matches.call( div, "div" ); - - // This should fail with an exception - // Gecko does not error, returns false instead - matches.call( div, "[s!='']:x" ); - rbuggyMatches.push( "!=", pseudos ); - }); - } - - rbuggyQSA = new RegExp( rbuggyQSA.join("|") ); - rbuggyMatches = new RegExp( rbuggyMatches.join("|") ); - - // Element contains another - // Purposefully does not implement inclusive descendent - // As in, an element does not contain itself - contains = isNative(docElem.contains) || docElem.compareDocumentPosition ? - function( a, b ) { - var adown = a.nodeType === 9 ? a.documentElement : a, - bup = b && b.parentNode; - return a === bup || !!( bup && bup.nodeType === 1 && ( - adown.contains ? - adown.contains( bup ) : - a.compareDocumentPosition && a.compareDocumentPosition( bup ) & 16 - )); - } : - function( a, b ) { - if ( b ) { - while ( (b = b.parentNode) ) { - if ( b === a ) { - return true; - } - } - } - return false; - }; - - // Document order sorting - sortOrder = docElem.compareDocumentPosition ? - function( a, b ) { - var compare; - - if ( a === b ) { - hasDuplicate = true; - return 0; - } - - if ( (compare = b.compareDocumentPosition && a.compareDocumentPosition && a.compareDocumentPosition( b )) ) { - if ( compare & 1 || a.parentNode && a.parentNode.nodeType === 11 ) { - if ( a === doc || contains( preferredDoc, a ) ) { - return -1; - } - if ( b === doc || contains( preferredDoc, b ) ) { - return 1; - } - return 0; - } - return compare & 4 ? -1 : 1; - } - - return a.compareDocumentPosition ? -1 : 1; - } : - function( a, b ) { - var cur, - i = 0, - aup = a.parentNode, - bup = b.parentNode, - ap = [ a ], - bp = [ b ]; - - // The nodes are identical, we can exit early - if ( a === b ) { - hasDuplicate = true; - return 0; - - // Fallback to using sourceIndex (in IE) if it's available on both nodes - } else if ( a.sourceIndex && b.sourceIndex ) { - return ( ~b.sourceIndex || MAX_NEGATIVE ) - ( contains( preferredDoc, a ) && ~a.sourceIndex || MAX_NEGATIVE ); - - // Parentless nodes are either documents or disconnected - } else if ( !aup || !bup ) { - return a === doc ? -1 : - b === doc ? 1 : - aup ? -1 : - bup ? 1 : - 0; - - // If the nodes are siblings, we can do a quick check - } else if ( aup === bup ) { - return siblingCheck( a, b ); - } - - // Otherwise we need full lists of their ancestors for comparison - cur = a; - while ( (cur = cur.parentNode) ) { - ap.unshift( cur ); - } - cur = b; - while ( (cur = cur.parentNode) ) { - bp.unshift( cur ); - } - - // Walk down the tree looking for a discrepancy - while ( ap[i] === bp[i] ) { - i++; - } - - return i ? - // Do a sibling check if the nodes have a common ancestor - siblingCheck( ap[i], bp[i] ) : - - // Otherwise nodes in our document sort first - ap[i] === preferredDoc ? -1 : - bp[i] === preferredDoc ? 1 : - 0; - }; - - // Always assume the presence of duplicates if sort doesn't - // pass them to our comparison function (as in Google Chrome). - hasDuplicate = false; - [0, 0].sort( sortOrder ); - support.detectDuplicates = hasDuplicate; - - return document; -}; - -Sizzle.matches = function( expr, elements ) { - return Sizzle( expr, null, null, elements ); -}; - -Sizzle.matchesSelector = function( elem, expr ) { - // Set document vars if needed - if ( ( elem.ownerDocument || elem ) !== document ) { - setDocument( elem ); - } - - // Make sure that attribute selectors are quoted - expr = expr.replace( rattributeQuotes, "='$1']" ); - - // rbuggyQSA always contains :focus, so no need for an existence check - if ( support.matchesSelector && !documentIsXML && (!rbuggyMatches || !rbuggyMatches.test(expr)) && !rbuggyQSA.test(expr) ) { - try { - var ret = matches.call( elem, expr ); - - // IE 9's matchesSelector returns false on disconnected nodes - if ( ret || support.disconnectedMatch || - // As well, disconnected nodes are said to be in a document - // fragment in IE 9 - elem.document && elem.document.nodeType !== 11 ) { - return ret; - } - } catch(e) {} - } - - return Sizzle( expr, document, null, [elem] ).length > 0; -}; - -Sizzle.contains = function( context, elem ) { - // Set document vars if needed - if ( ( context.ownerDocument || context ) !== document ) { - setDocument( context ); - } - return contains( context, elem ); -}; - -Sizzle.attr = function( elem, name ) { - var val; - - // Set document vars if needed - if ( ( elem.ownerDocument || elem ) !== document ) { - setDocument( elem ); - } - - if ( !documentIsXML ) { - name = name.toLowerCase(); - } - if ( (val = Expr.attrHandle[ name ]) ) { - return val( elem ); - } - if ( documentIsXML || support.attributes ) { - return elem.getAttribute( name ); - } - return ( (val = elem.getAttributeNode( name )) || elem.getAttribute( name ) ) && elem[ name ] === true ? - name : - val && val.specified ? val.value : null; -}; - -Sizzle.error = function( msg ) { - throw new Error( "Syntax error, unrecognized expression: " + msg ); -}; - -// Document sorting and removing duplicates -Sizzle.uniqueSort = function( results ) { - var elem, - duplicates = [], - i = 1, - j = 0; - - // Unless we *know* we can detect duplicates, assume their presence - hasDuplicate = !support.detectDuplicates; - results.sort( sortOrder ); - - if ( hasDuplicate ) { - for ( ; (elem = results[i]); i++ ) { - if ( elem === results[ i - 1 ] ) { - j = duplicates.push( i ); - } - } - while ( j-- ) { - results.splice( duplicates[ j ], 1 ); - } - } - - return results; -}; - -function siblingCheck( a, b ) { - var cur = a && b && a.nextSibling; - - for ( ; cur; cur = cur.nextSibling ) { - if ( cur === b ) { - return -1; - } - } - - return a ? 1 : -1; -} - -// Returns a function to use in pseudos for input types -function createInputPseudo( type ) { - return function( elem ) { - var name = elem.nodeName.toLowerCase(); - return name === "input" && elem.type === type; - }; -} - -// Returns a function to use in pseudos for buttons -function createButtonPseudo( type ) { - return function( elem ) { - var name = elem.nodeName.toLowerCase(); - return (name === "input" || name === "button") && elem.type === type; - }; -} - -// Returns a function to use in pseudos for positionals -function createPositionalPseudo( fn ) { - return markFunction(function( argument ) { - argument = +argument; - return markFunction(function( seed, matches ) { - var j, - matchIndexes = fn( [], seed.length, argument ), - i = matchIndexes.length; - - // Match elements found at the specified indexes - while ( i-- ) { - if ( seed[ (j = matchIndexes[i]) ] ) { - seed[j] = !(matches[j] = seed[j]); - } - } - }); - }); -} - -/** - * Utility function for retrieving the text value of an array of DOM nodes - * @param {Array|Element} elem - */ -getText = Sizzle.getText = function( elem ) { - var node, - ret = "", - i = 0, - nodeType = elem.nodeType; - - if ( !nodeType ) { - // If no nodeType, this is expected to be an array - for ( ; (node = elem[i]); i++ ) { - // Do not traverse comment nodes - ret += getText( node ); - } - } else if ( nodeType === 1 || nodeType === 9 || nodeType === 11 ) { - // Use textContent for elements - // innerText usage removed for consistency of new lines (see #11153) - if ( typeof elem.textContent === "string" ) { - return elem.textContent; - } else { - // Traverse its children - for ( elem = elem.firstChild; elem; elem = elem.nextSibling ) { - ret += getText( elem ); - } - } - } else if ( nodeType === 3 || nodeType === 4 ) { - return elem.nodeValue; - } - // Do not include comment or processing instruction nodes - - return ret; -}; - -Expr = Sizzle.selectors = { - - // Can be adjusted by the user - cacheLength: 50, - - createPseudo: markFunction, - - match: matchExpr, - - find: {}, - - relative: { - ">": { dir: "parentNode", first: true }, - " ": { dir: "parentNode" }, - "+": { dir: "previousSibling", first: true }, - "~": { dir: "previousSibling" } - }, - - preFilter: { - "ATTR": function( match ) { - match[1] = match[1].replace( runescape, funescape ); - - // Move the given value to match[3] whether quoted or unquoted - match[3] = ( match[4] || match[5] || "" ).replace( runescape, funescape ); - - if ( match[2] === "~=" ) { - match[3] = " " + match[3] + " "; - } - - return match.slice( 0, 4 ); - }, - - "CHILD": function( match ) { - /* matches from matchExpr["CHILD"] - 1 type (only|nth|...) - 2 what (child|of-type) - 3 argument (even|odd|\d*|\d*n([+-]\d+)?|...) - 4 xn-component of xn+y argument ([+-]?\d*n|) - 5 sign of xn-component - 6 x of xn-component - 7 sign of y-component - 8 y of y-component - */ - match[1] = match[1].toLowerCase(); - - if ( match[1].slice( 0, 3 ) === "nth" ) { - // nth-* requires argument - if ( !match[3] ) { - Sizzle.error( match[0] ); - } - - // numeric x and y parameters for Expr.filter.CHILD - // remember that false/true cast respectively to 0/1 - match[4] = +( match[4] ? match[5] + (match[6] || 1) : 2 * ( match[3] === "even" || match[3] === "odd" ) ); - match[5] = +( ( match[7] + match[8] ) || match[3] === "odd" ); - - // other types prohibit arguments - } else if ( match[3] ) { - Sizzle.error( match[0] ); - } - - return match; - }, - - "PSEUDO": function( match ) { - var excess, - unquoted = !match[5] && match[2]; - - if ( matchExpr["CHILD"].test( match[0] ) ) { - return null; - } - - // Accept quoted arguments as-is - if ( match[4] ) { - match[2] = match[4]; - - // Strip excess characters from unquoted arguments - } else if ( unquoted && rpseudo.test( unquoted ) && - // Get excess from tokenize (recursively) - (excess = tokenize( unquoted, true )) && - // advance to the next closing parenthesis - (excess = unquoted.indexOf( ")", unquoted.length - excess ) - unquoted.length) ) { - - // excess is a negative index - match[0] = match[0].slice( 0, excess ); - match[2] = unquoted.slice( 0, excess ); - } - - // Return only captures needed by the pseudo filter method (type and argument) - return match.slice( 0, 3 ); - } - }, - - filter: { - - "TAG": function( nodeName ) { - if ( nodeName === "*" ) { - return function() { return true; }; - } - - nodeName = nodeName.replace( runescape, funescape ).toLowerCase(); - return function( elem ) { - return elem.nodeName && elem.nodeName.toLowerCase() === nodeName; - }; - }, - - "CLASS": function( className ) { - var pattern = classCache[ className + " " ]; - - return pattern || - (pattern = new RegExp( "(^|" + whitespace + ")" + className + "(" + whitespace + "|$)" )) && - classCache( className, function( elem ) { - return pattern.test( elem.className || (typeof elem.getAttribute !== strundefined && elem.getAttribute("class")) || "" ); - }); - }, - - "ATTR": function( name, operator, check ) { - return function( elem ) { - var result = Sizzle.attr( elem, name ); - - if ( result == null ) { - return operator === "!="; - } - if ( !operator ) { - return true; - } - - result += ""; - - return operator === "=" ? result === check : - operator === "!=" ? result !== check : - operator === "^=" ? check && result.indexOf( check ) === 0 : - operator === "*=" ? check && result.indexOf( check ) > -1 : - operator === "$=" ? check && result.substr( result.length - check.length ) === check : - operator === "~=" ? ( " " + result + " " ).indexOf( check ) > -1 : - operator === "|=" ? result === check || result.substr( 0, check.length + 1 ) === check + "-" : - false; - }; - }, - - "CHILD": function( type, what, argument, first, last ) { - var simple = type.slice( 0, 3 ) !== "nth", - forward = type.slice( -4 ) !== "last", - ofType = what === "of-type"; - - return first === 1 && last === 0 ? - - // Shortcut for :nth-*(n) - function( elem ) { - return !!elem.parentNode; - } : - - function( elem, context, xml ) { - var cache, outerCache, node, diff, nodeIndex, start, - dir = simple !== forward ? "nextSibling" : "previousSibling", - parent = elem.parentNode, - name = ofType && elem.nodeName.toLowerCase(), - useCache = !xml && !ofType; - - if ( parent ) { - - // :(first|last|only)-(child|of-type) - if ( simple ) { - while ( dir ) { - node = elem; - while ( (node = node[ dir ]) ) { - if ( ofType ? node.nodeName.toLowerCase() === name : node.nodeType === 1 ) { - return false; - } - } - // Reverse direction for :only-* (if we haven't yet done so) - start = dir = type === "only" && !start && "nextSibling"; - } - return true; - } - - start = [ forward ? parent.firstChild : parent.lastChild ]; - - // non-xml :nth-child(...) stores cache data on `parent` - if ( forward && useCache ) { - // Seek `elem` from a previously-cached index - outerCache = parent[ expando ] || (parent[ expando ] = {}); - cache = outerCache[ type ] || []; - nodeIndex = cache[0] === dirruns && cache[1]; - diff = cache[0] === dirruns && cache[2]; - node = nodeIndex && parent.childNodes[ nodeIndex ]; - - while ( (node = ++nodeIndex && node && node[ dir ] || - - // Fallback to seeking `elem` from the start - (diff = nodeIndex = 0) || start.pop()) ) { - - // When found, cache indexes on `parent` and break - if ( node.nodeType === 1 && ++diff && node === elem ) { - outerCache[ type ] = [ dirruns, nodeIndex, diff ]; - break; - } - } - - // Use previously-cached element index if available - } else if ( useCache && (cache = (elem[ expando ] || (elem[ expando ] = {}))[ type ]) && cache[0] === dirruns ) { - diff = cache[1]; - - // xml :nth-child(...) or :nth-last-child(...) or :nth(-last)?-of-type(...) - } else { - // Use the same loop as above to seek `elem` from the start - while ( (node = ++nodeIndex && node && node[ dir ] || - (diff = nodeIndex = 0) || start.pop()) ) { - - if ( ( ofType ? node.nodeName.toLowerCase() === name : node.nodeType === 1 ) && ++diff ) { - // Cache the index of each encountered element - if ( useCache ) { - (node[ expando ] || (node[ expando ] = {}))[ type ] = [ dirruns, diff ]; - } - - if ( node === elem ) { - break; - } - } - } - } - - // Incorporate the offset, then check against cycle size - diff -= last; - return diff === first || ( diff % first === 0 && diff / first >= 0 ); - } - }; - }, - - "PSEUDO": function( pseudo, argument ) { - // pseudo-class names are case-insensitive - // http://www.w3.org/TR/selectors/#pseudo-classes - // Prioritize by case sensitivity in case custom pseudos are added with uppercase letters - // Remember that setFilters inherits from pseudos - var args, - fn = Expr.pseudos[ pseudo ] || Expr.setFilters[ pseudo.toLowerCase() ] || - Sizzle.error( "unsupported pseudo: " + pseudo ); - - // The user may use createPseudo to indicate that - // arguments are needed to create the filter function - // just as Sizzle does - if ( fn[ expando ] ) { - return fn( argument ); - } - - // But maintain support for old signatures - if ( fn.length > 1 ) { - args = [ pseudo, pseudo, "", argument ]; - return Expr.setFilters.hasOwnProperty( pseudo.toLowerCase() ) ? - markFunction(function( seed, matches ) { - var idx, - matched = fn( seed, argument ), - i = matched.length; - while ( i-- ) { - idx = indexOf.call( seed, matched[i] ); - seed[ idx ] = !( matches[ idx ] = matched[i] ); - } - }) : - function( elem ) { - return fn( elem, 0, args ); - }; - } - - return fn; - } - }, - - pseudos: { - // Potentially complex pseudos - "not": markFunction(function( selector ) { - // Trim the selector passed to compile - // to avoid treating leading and trailing - // spaces as combinators - var input = [], - results = [], - matcher = compile( selector.replace( rtrim, "$1" ) ); - - return matcher[ expando ] ? - markFunction(function( seed, matches, context, xml ) { - var elem, - unmatched = matcher( seed, null, xml, [] ), - i = seed.length; - - // Match elements unmatched by `matcher` - while ( i-- ) { - if ( (elem = unmatched[i]) ) { - seed[i] = !(matches[i] = elem); - } - } - }) : - function( elem, context, xml ) { - input[0] = elem; - matcher( input, null, xml, results ); - return !results.pop(); - }; - }), - - "has": markFunction(function( selector ) { - return function( elem ) { - return Sizzle( selector, elem ).length > 0; - }; - }), - - "contains": markFunction(function( text ) { - return function( elem ) { - return ( elem.textContent || elem.innerText || getText( elem ) ).indexOf( text ) > -1; - }; - }), - - // "Whether an element is represented by a :lang() selector - // is based solely on the element's language value - // being equal to the identifier C, - // or beginning with the identifier C immediately followed by "-". - // The matching of C against the element's language value is performed case-insensitively. - // The identifier C does not have to be a valid language name." - // http://www.w3.org/TR/selectors/#lang-pseudo - "lang": markFunction( function( lang ) { - // lang value must be a valid identifider - if ( !ridentifier.test(lang || "") ) { - Sizzle.error( "unsupported lang: " + lang ); - } - lang = lang.replace( runescape, funescape ).toLowerCase(); - return function( elem ) { - var elemLang; - do { - if ( (elemLang = documentIsXML ? - elem.getAttribute("xml:lang") || elem.getAttribute("lang") : - elem.lang) ) { - - elemLang = elemLang.toLowerCase(); - return elemLang === lang || elemLang.indexOf( lang + "-" ) === 0; - } - } while ( (elem = elem.parentNode) && elem.nodeType === 1 ); - return false; - }; - }), - - // Miscellaneous - "target": function( elem ) { - var hash = window.location && window.location.hash; - return hash && hash.slice( 1 ) === elem.id; - }, - - "root": function( elem ) { - return elem === docElem; - }, - - "focus": function( elem ) { - return elem === document.activeElement && (!document.hasFocus || document.hasFocus()) && !!(elem.type || elem.href || ~elem.tabIndex); - }, - - // Boolean properties - "enabled": function( elem ) { - return elem.disabled === false; - }, - - "disabled": function( elem ) { - return elem.disabled === true; - }, - - "checked": function( elem ) { - // In CSS3, :checked should return both checked and selected elements - // http://www.w3.org/TR/2011/REC-css3-selectors-20110929/#checked - var nodeName = elem.nodeName.toLowerCase(); - return (nodeName === "input" && !!elem.checked) || (nodeName === "option" && !!elem.selected); - }, - - "selected": function( elem ) { - // Accessing this property makes selected-by-default - // options in Safari work properly - if ( elem.parentNode ) { - elem.parentNode.selectedIndex; - } - - return elem.selected === true; - }, - - // Contents - "empty": function( elem ) { - // http://www.w3.org/TR/selectors/#empty-pseudo - // :empty is only affected by element nodes and content nodes(including text(3), cdata(4)), - // not comment, processing instructions, or others - // Thanks to Diego Perini for the nodeName shortcut - // Greater than "@" means alpha characters (specifically not starting with "#" or "?") - for ( elem = elem.firstChild; elem; elem = elem.nextSibling ) { - if ( elem.nodeName > "@" || elem.nodeType === 3 || elem.nodeType === 4 ) { - return false; - } - } - return true; - }, - - "parent": function( elem ) { - return !Expr.pseudos["empty"]( elem ); - }, - - // Element/input types - "header": function( elem ) { - return rheader.test( elem.nodeName ); - }, - - "input": function( elem ) { - return rinputs.test( elem.nodeName ); - }, - - "button": function( elem ) { - var name = elem.nodeName.toLowerCase(); - return name === "input" && elem.type === "button" || name === "button"; - }, - - "text": function( elem ) { - var attr; - // IE6 and 7 will map elem.type to 'text' for new HTML5 types (search, etc) - // use getAttribute instead to test this case - return elem.nodeName.toLowerCase() === "input" && - elem.type === "text" && - ( (attr = elem.getAttribute("type")) == null || attr.toLowerCase() === elem.type ); - }, - - // Position-in-collection - "first": createPositionalPseudo(function() { - return [ 0 ]; - }), - - "last": createPositionalPseudo(function( matchIndexes, length ) { - return [ length - 1 ]; - }), - - "eq": createPositionalPseudo(function( matchIndexes, length, argument ) { - return [ argument < 0 ? argument + length : argument ]; - }), - - "even": createPositionalPseudo(function( matchIndexes, length ) { - var i = 0; - for ( ; i < length; i += 2 ) { - matchIndexes.push( i ); - } - return matchIndexes; - }), - - "odd": createPositionalPseudo(function( matchIndexes, length ) { - var i = 1; - for ( ; i < length; i += 2 ) { - matchIndexes.push( i ); - } - return matchIndexes; - }), - - "lt": createPositionalPseudo(function( matchIndexes, length, argument ) { - var i = argument < 0 ? argument + length : argument; - for ( ; --i >= 0; ) { - matchIndexes.push( i ); - } - return matchIndexes; - }), - - "gt": createPositionalPseudo(function( matchIndexes, length, argument ) { - var i = argument < 0 ? argument + length : argument; - for ( ; ++i < length; ) { - matchIndexes.push( i ); - } - return matchIndexes; - }) - } -}; - -// Add button/input type pseudos -for ( i in { radio: true, checkbox: true, file: true, password: true, image: true } ) { - Expr.pseudos[ i ] = createInputPseudo( i ); -} -for ( i in { submit: true, reset: true } ) { - Expr.pseudos[ i ] = createButtonPseudo( i ); -} - -function tokenize( selector, parseOnly ) { - var matched, match, tokens, type, - soFar, groups, preFilters, - cached = tokenCache[ selector + " " ]; - - if ( cached ) { - return parseOnly ? 0 : cached.slice( 0 ); - } - - soFar = selector; - groups = []; - preFilters = Expr.preFilter; - - while ( soFar ) { - - // Comma and first run - if ( !matched || (match = rcomma.exec( soFar )) ) { - if ( match ) { - // Don't consume trailing commas as valid - soFar = soFar.slice( match[0].length ) || soFar; - } - groups.push( tokens = [] ); - } - - matched = false; - - // Combinators - if ( (match = rcombinators.exec( soFar )) ) { - matched = match.shift(); - tokens.push( { - value: matched, - // Cast descendant combinators to space - type: match[0].replace( rtrim, " " ) - } ); - soFar = soFar.slice( matched.length ); - } - - // Filters - for ( type in Expr.filter ) { - if ( (match = matchExpr[ type ].exec( soFar )) && (!preFilters[ type ] || - (match = preFilters[ type ]( match ))) ) { - matched = match.shift(); - tokens.push( { - value: matched, - type: type, - matches: match - } ); - soFar = soFar.slice( matched.length ); - } - } - - if ( !matched ) { - break; - } - } - - // Return the length of the invalid excess - // if we're just parsing - // Otherwise, throw an error or return tokens - return parseOnly ? - soFar.length : - soFar ? - Sizzle.error( selector ) : - // Cache the tokens - tokenCache( selector, groups ).slice( 0 ); -} - -function toSelector( tokens ) { - var i = 0, - len = tokens.length, - selector = ""; - for ( ; i < len; i++ ) { - selector += tokens[i].value; - } - return selector; -} - -function addCombinator( matcher, combinator, base ) { - var dir = combinator.dir, - checkNonElements = base && combinator.dir === "parentNode", - doneName = done++; - - return combinator.first ? - // Check against closest ancestor/preceding element - function( elem, context, xml ) { - while ( (elem = elem[ dir ]) ) { - if ( elem.nodeType === 1 || checkNonElements ) { - return matcher( elem, context, xml ); - } - } - } : - - // Check against all ancestor/preceding elements - function( elem, context, xml ) { - var data, cache, outerCache, - dirkey = dirruns + " " + doneName; - - // We can't set arbitrary data on XML nodes, so they don't benefit from dir caching - if ( xml ) { - while ( (elem = elem[ dir ]) ) { - if ( elem.nodeType === 1 || checkNonElements ) { - if ( matcher( elem, context, xml ) ) { - return true; - } - } - } - } else { - while ( (elem = elem[ dir ]) ) { - if ( elem.nodeType === 1 || checkNonElements ) { - outerCache = elem[ expando ] || (elem[ expando ] = {}); - if ( (cache = outerCache[ dir ]) && cache[0] === dirkey ) { - if ( (data = cache[1]) === true || data === cachedruns ) { - return data === true; - } - } else { - cache = outerCache[ dir ] = [ dirkey ]; - cache[1] = matcher( elem, context, xml ) || cachedruns; - if ( cache[1] === true ) { - return true; - } - } - } - } - } - }; -} - -function elementMatcher( matchers ) { - return matchers.length > 1 ? - function( elem, context, xml ) { - var i = matchers.length; - while ( i-- ) { - if ( !matchers[i]( elem, context, xml ) ) { - return false; - } - } - return true; - } : - matchers[0]; -} - -function condense( unmatched, map, filter, context, xml ) { - var elem, - newUnmatched = [], - i = 0, - len = unmatched.length, - mapped = map != null; - - for ( ; i < len; i++ ) { - if ( (elem = unmatched[i]) ) { - if ( !filter || filter( elem, context, xml ) ) { - newUnmatched.push( elem ); - if ( mapped ) { - map.push( i ); - } - } - } - } - - return newUnmatched; -} - -function setMatcher( preFilter, selector, matcher, postFilter, postFinder, postSelector ) { - if ( postFilter && !postFilter[ expando ] ) { - postFilter = setMatcher( postFilter ); - } - if ( postFinder && !postFinder[ expando ] ) { - postFinder = setMatcher( postFinder, postSelector ); - } - return markFunction(function( seed, results, context, xml ) { - var temp, i, elem, - preMap = [], - postMap = [], - preexisting = results.length, - - // Get initial elements from seed or context - elems = seed || multipleContexts( selector || "*", context.nodeType ? [ context ] : context, [] ), - - // Prefilter to get matcher input, preserving a map for seed-results synchronization - matcherIn = preFilter && ( seed || !selector ) ? - condense( elems, preMap, preFilter, context, xml ) : - elems, - - matcherOut = matcher ? - // If we have a postFinder, or filtered seed, or non-seed postFilter or preexisting results, - postFinder || ( seed ? preFilter : preexisting || postFilter ) ? - - // ...intermediate processing is necessary - [] : - - // ...otherwise use results directly - results : - matcherIn; - - // Find primary matches - if ( matcher ) { - matcher( matcherIn, matcherOut, context, xml ); - } - - // Apply postFilter - if ( postFilter ) { - temp = condense( matcherOut, postMap ); - postFilter( temp, [], context, xml ); - - // Un-match failing elements by moving them back to matcherIn - i = temp.length; - while ( i-- ) { - if ( (elem = temp[i]) ) { - matcherOut[ postMap[i] ] = !(matcherIn[ postMap[i] ] = elem); - } - } - } - - if ( seed ) { - if ( postFinder || preFilter ) { - if ( postFinder ) { - // Get the final matcherOut by condensing this intermediate into postFinder contexts - temp = []; - i = matcherOut.length; - while ( i-- ) { - if ( (elem = matcherOut[i]) ) { - // Restore matcherIn since elem is not yet a final match - temp.push( (matcherIn[i] = elem) ); - } - } - postFinder( null, (matcherOut = []), temp, xml ); - } - - // Move matched elements from seed to results to keep them synchronized - i = matcherOut.length; - while ( i-- ) { - if ( (elem = matcherOut[i]) && - (temp = postFinder ? indexOf.call( seed, elem ) : preMap[i]) > -1 ) { - - seed[temp] = !(results[temp] = elem); - } - } - } - - // Add elements to results, through postFinder if defined - } else { - matcherOut = condense( - matcherOut === results ? - matcherOut.splice( preexisting, matcherOut.length ) : - matcherOut - ); - if ( postFinder ) { - postFinder( null, results, matcherOut, xml ); - } else { - push.apply( results, matcherOut ); - } - } - }); -} - -function matcherFromTokens( tokens ) { - var checkContext, matcher, j, - len = tokens.length, - leadingRelative = Expr.relative[ tokens[0].type ], - implicitRelative = leadingRelative || Expr.relative[" "], - i = leadingRelative ? 1 : 0, - - // The foundational matcher ensures that elements are reachable from top-level context(s) - matchContext = addCombinator( function( elem ) { - return elem === checkContext; - }, implicitRelative, true ), - matchAnyContext = addCombinator( function( elem ) { - return indexOf.call( checkContext, elem ) > -1; - }, implicitRelative, true ), - matchers = [ function( elem, context, xml ) { - return ( !leadingRelative && ( xml || context !== outermostContext ) ) || ( - (checkContext = context).nodeType ? - matchContext( elem, context, xml ) : - matchAnyContext( elem, context, xml ) ); - } ]; - - for ( ; i < len; i++ ) { - if ( (matcher = Expr.relative[ tokens[i].type ]) ) { - matchers = [ addCombinator(elementMatcher( matchers ), matcher) ]; - } else { - matcher = Expr.filter[ tokens[i].type ].apply( null, tokens[i].matches ); - - // Return special upon seeing a positional matcher - if ( matcher[ expando ] ) { - // Find the next relative operator (if any) for proper handling - j = ++i; - for ( ; j < len; j++ ) { - if ( Expr.relative[ tokens[j].type ] ) { - break; - } - } - return setMatcher( - i > 1 && elementMatcher( matchers ), - i > 1 && toSelector( tokens.slice( 0, i - 1 ) ).replace( rtrim, "$1" ), - matcher, - i < j && matcherFromTokens( tokens.slice( i, j ) ), - j < len && matcherFromTokens( (tokens = tokens.slice( j )) ), - j < len && toSelector( tokens ) - ); - } - matchers.push( matcher ); - } - } - - return elementMatcher( matchers ); -} - -function matcherFromGroupMatchers( elementMatchers, setMatchers ) { - // A counter to specify which element is currently being matched - var matcherCachedRuns = 0, - bySet = setMatchers.length > 0, - byElement = elementMatchers.length > 0, - superMatcher = function( seed, context, xml, results, expandContext ) { - var elem, j, matcher, - setMatched = [], - matchedCount = 0, - i = "0", - unmatched = seed && [], - outermost = expandContext != null, - contextBackup = outermostContext, - // We must always have either seed elements or context - elems = seed || byElement && Expr.find["TAG"]( "*", expandContext && context.parentNode || context ), - // Nested matchers should use non-integer dirruns - dirrunsUnique = (dirruns += contextBackup == null ? 1 : Math.E); - - if ( outermost ) { - outermostContext = context !== document && context; - cachedruns = matcherCachedRuns; - } - - // Add elements passing elementMatchers directly to results - for ( ; (elem = elems[i]) != null; i++ ) { - if ( byElement && elem ) { - for ( j = 0; (matcher = elementMatchers[j]); j++ ) { - if ( matcher( elem, context, xml ) ) { - results.push( elem ); - break; - } - } - if ( outermost ) { - dirruns = dirrunsUnique; - cachedruns = ++matcherCachedRuns; - } - } - - // Track unmatched elements for set filters - if ( bySet ) { - // They will have gone through all possible matchers - if ( (elem = !matcher && elem) ) { - matchedCount--; - } - - // Lengthen the array for every element, matched or not - if ( seed ) { - unmatched.push( elem ); - } - } - } - - // Apply set filters to unmatched elements - // `i` starts as a string, so matchedCount would equal "00" if there are no elements - matchedCount += i; - if ( bySet && i !== matchedCount ) { - for ( j = 0; (matcher = setMatchers[j]); j++ ) { - matcher( unmatched, setMatched, context, xml ); - } - - if ( seed ) { - // Reintegrate element matches to eliminate the need for sorting - if ( matchedCount > 0 ) { - while ( i-- ) { - if ( !(unmatched[i] || setMatched[i]) ) { - setMatched[i] = pop.call( results ); - } - } - } - - // Discard index placeholder values to get only actual matches - setMatched = condense( setMatched ); - } - - // Add matches to results - push.apply( results, setMatched ); - - // Seedless set matches succeeding multiple successful matchers stipulate sorting - if ( outermost && !seed && setMatched.length > 0 && - ( matchedCount + setMatchers.length ) > 1 ) { - - Sizzle.uniqueSort( results ); - } - } - - // Override manipulation of globals by nested matchers - if ( outermost ) { - dirruns = dirrunsUnique; - outermostContext = contextBackup; - } - - return unmatched; - }; - - return bySet ? - markFunction( superMatcher ) : - superMatcher; -} - -compile = Sizzle.compile = function( selector, group /* Internal Use Only */ ) { - var i, - setMatchers = [], - elementMatchers = [], - cached = compilerCache[ selector + " " ]; - - if ( !cached ) { - // Generate a function of recursive functions that can be used to check each element - if ( !group ) { - group = tokenize( selector ); - } - i = group.length; - while ( i-- ) { - cached = matcherFromTokens( group[i] ); - if ( cached[ expando ] ) { - setMatchers.push( cached ); - } else { - elementMatchers.push( cached ); - } - } - - // Cache the compiled function - cached = compilerCache( selector, matcherFromGroupMatchers( elementMatchers, setMatchers ) ); - } - return cached; -}; - -function multipleContexts( selector, contexts, results ) { - var i = 0, - len = contexts.length; - for ( ; i < len; i++ ) { - Sizzle( selector, contexts[i], results ); - } - return results; -} - -function select( selector, context, results, seed ) { - var i, tokens, token, type, find, - match = tokenize( selector ); - - if ( !seed ) { - // Try to minimize operations if there is only one group - if ( match.length === 1 ) { - - // Take a shortcut and set the context if the root selector is an ID - tokens = match[0] = match[0].slice( 0 ); - if ( tokens.length > 2 && (token = tokens[0]).type === "ID" && - context.nodeType === 9 && !documentIsXML && - Expr.relative[ tokens[1].type ] ) { - - context = Expr.find["ID"]( token.matches[0].replace( runescape, funescape ), context )[0]; - if ( !context ) { - return results; - } - - selector = selector.slice( tokens.shift().value.length ); - } - - // Fetch a seed set for right-to-left matching - for ( i = matchExpr["needsContext"].test( selector ) ? -1 : tokens.length - 1; i >= 0; i-- ) { - token = tokens[i]; - - // Abort if we hit a combinator - if ( Expr.relative[ (type = token.type) ] ) { - break; - } - if ( (find = Expr.find[ type ]) ) { - // Search, expanding context for leading sibling combinators - if ( (seed = find( - token.matches[0].replace( runescape, funescape ), - rsibling.test( tokens[0].type ) && context.parentNode || context - )) ) { - - // If seed is empty or no tokens remain, we can return early - tokens.splice( i, 1 ); - selector = seed.length && toSelector( tokens ); - if ( !selector ) { - push.apply( results, slice.call( seed, 0 ) ); - return results; - } - - break; - } - } - } - } - } - - // Compile and execute a filtering function - // Provide `match` to avoid retokenization if we modified the selector above - compile( selector, match )( - seed, - context, - documentIsXML, - results, - rsibling.test( selector ) - ); - return results; -} - -// Deprecated -Expr.pseudos["nth"] = Expr.pseudos["eq"]; - -// Easy API for creating new setFilters -function setFilters() {} -Expr.filters = setFilters.prototype = Expr.pseudos; -Expr.setFilters = new setFilters(); - -// Initialize with the default document -setDocument(); - -// Override sizzle attribute retrieval -Sizzle.attr = jQuery.attr; -jQuery.find = Sizzle; -jQuery.expr = Sizzle.selectors; -jQuery.expr[":"] = jQuery.expr.pseudos; -jQuery.unique = Sizzle.uniqueSort; -jQuery.text = Sizzle.getText; -jQuery.isXMLDoc = Sizzle.isXML; -jQuery.contains = Sizzle.contains; - - -})( window ); -var runtil = /Until$/, - rparentsprev = /^(?:parents|prev(?:Until|All))/, - isSimple = /^.[^:#\[\.,]*$/, - rneedsContext = jQuery.expr.match.needsContext, - // methods guaranteed to produce a unique set when starting from a unique set - guaranteedUnique = { - children: true, - contents: true, - next: true, - prev: true - }; - -jQuery.fn.extend({ - find: function( selector ) { - var i, ret, self; - - if ( typeof selector !== "string" ) { - self = this; - return this.pushStack( jQuery( selector ).filter(function() { - for ( i = 0; i < self.length; i++ ) { - if ( jQuery.contains( self[ i ], this ) ) { - return true; - } - } - }) ); - } - - ret = []; - for ( i = 0; i < this.length; i++ ) { - jQuery.find( selector, this[ i ], ret ); - } - - // Needed because $( selector, context ) becomes $( context ).find( selector ) - ret = this.pushStack( jQuery.unique( ret ) ); - ret.selector = ( this.selector ? this.selector + " " : "" ) + selector; - return ret; - }, - - has: function( target ) { - var i, - targets = jQuery( target, this ), - len = targets.length; - - return this.filter(function() { - for ( i = 0; i < len; i++ ) { - if ( jQuery.contains( this, targets[i] ) ) { - return true; - } - } - }); - }, - - not: function( selector ) { - return this.pushStack( winnow(this, selector, false) ); - }, - - filter: function( selector ) { - return this.pushStack( winnow(this, selector, true) ); - }, - - is: function( selector ) { - return !!selector && ( - typeof selector === "string" ? - // If this is a positional/relative selector, check membership in the returned set - // so $("p:first").is("p:last") won't return true for a doc with two "p". - rneedsContext.test( selector ) ? - jQuery( selector, this.context ).index( this[0] ) >= 0 : - jQuery.filter( selector, this ).length > 0 : - this.filter( selector ).length > 0 ); - }, - - closest: function( selectors, context ) { - var cur, - i = 0, - l = this.length, - ret = [], - pos = rneedsContext.test( selectors ) || typeof selectors !== "string" ? - jQuery( selectors, context || this.context ) : - 0; - - for ( ; i < l; i++ ) { - cur = this[i]; - - while ( cur && cur.ownerDocument && cur !== context && cur.nodeType !== 11 ) { - if ( pos ? pos.index(cur) > -1 : jQuery.find.matchesSelector(cur, selectors) ) { - ret.push( cur ); - break; - } - cur = cur.parentNode; - } - } - - return this.pushStack( ret.length > 1 ? jQuery.unique( ret ) : ret ); - }, - - // Determine the position of an element within - // the matched set of elements - index: function( elem ) { - - // No argument, return index in parent - if ( !elem ) { - return ( this[0] && this[0].parentNode ) ? this.first().prevAll().length : -1; - } - - // index in selector - if ( typeof elem === "string" ) { - return jQuery.inArray( this[0], jQuery( elem ) ); - } - - // Locate the position of the desired element - return jQuery.inArray( - // If it receives a jQuery object, the first element is used - elem.jquery ? elem[0] : elem, this ); - }, - - add: function( selector, context ) { - var set = typeof selector === "string" ? - jQuery( selector, context ) : - jQuery.makeArray( selector && selector.nodeType ? [ selector ] : selector ), - all = jQuery.merge( this.get(), set ); - - return this.pushStack( jQuery.unique(all) ); - }, - - addBack: function( selector ) { - return this.add( selector == null ? - this.prevObject : this.prevObject.filter(selector) - ); - } -}); - -jQuery.fn.andSelf = jQuery.fn.addBack; - -function sibling( cur, dir ) { - do { - cur = cur[ dir ]; - } while ( cur && cur.nodeType !== 1 ); - - return cur; -} - -jQuery.each({ - parent: function( elem ) { - var parent = elem.parentNode; - return parent && parent.nodeType !== 11 ? parent : null; - }, - parents: function( elem ) { - return jQuery.dir( elem, "parentNode" ); - }, - parentsUntil: function( elem, i, until ) { - return jQuery.dir( elem, "parentNode", until ); - }, - next: function( elem ) { - return sibling( elem, "nextSibling" ); - }, - prev: function( elem ) { - return sibling( elem, "previousSibling" ); - }, - nextAll: function( elem ) { - return jQuery.dir( elem, "nextSibling" ); - }, - prevAll: function( elem ) { - return jQuery.dir( elem, "previousSibling" ); - }, - nextUntil: function( elem, i, until ) { - return jQuery.dir( elem, "nextSibling", until ); - }, - prevUntil: function( elem, i, until ) { - return jQuery.dir( elem, "previousSibling", until ); - }, - siblings: function( elem ) { - return jQuery.sibling( ( elem.parentNode || {} ).firstChild, elem ); - }, - children: function( elem ) { - return jQuery.sibling( elem.firstChild ); - }, - contents: function( elem ) { - return jQuery.nodeName( elem, "iframe" ) ? - elem.contentDocument || elem.contentWindow.document : - jQuery.merge( [], elem.childNodes ); - } -}, function( name, fn ) { - jQuery.fn[ name ] = function( until, selector ) { - var ret = jQuery.map( this, fn, until ); - - if ( !runtil.test( name ) ) { - selector = until; - } - - if ( selector && typeof selector === "string" ) { - ret = jQuery.filter( selector, ret ); - } - - ret = this.length > 1 && !guaranteedUnique[ name ] ? jQuery.unique( ret ) : ret; - - if ( this.length > 1 && rparentsprev.test( name ) ) { - ret = ret.reverse(); - } - - return this.pushStack( ret ); - }; -}); - -jQuery.extend({ - filter: function( expr, elems, not ) { - if ( not ) { - expr = ":not(" + expr + ")"; - } - - return elems.length === 1 ? - jQuery.find.matchesSelector(elems[0], expr) ? [ elems[0] ] : [] : - jQuery.find.matches(expr, elems); - }, - - dir: function( elem, dir, until ) { - var matched = [], - cur = elem[ dir ]; - - while ( cur && cur.nodeType !== 9 && (until === undefined || cur.nodeType !== 1 || !jQuery( cur ).is( until )) ) { - if ( cur.nodeType === 1 ) { - matched.push( cur ); - } - cur = cur[dir]; - } - return matched; - }, - - sibling: function( n, elem ) { - var r = []; - - for ( ; n; n = n.nextSibling ) { - if ( n.nodeType === 1 && n !== elem ) { - r.push( n ); - } - } - - return r; - } -}); - -// Implement the identical functionality for filter and not -function winnow( elements, qualifier, keep ) { - - // Can't pass null or undefined to indexOf in Firefox 4 - // Set to 0 to skip string check - qualifier = qualifier || 0; - - if ( jQuery.isFunction( qualifier ) ) { - return jQuery.grep(elements, function( elem, i ) { - var retVal = !!qualifier.call( elem, i, elem ); - return retVal === keep; - }); - - } else if ( qualifier.nodeType ) { - return jQuery.grep(elements, function( elem ) { - return ( elem === qualifier ) === keep; - }); - - } else if ( typeof qualifier === "string" ) { - var filtered = jQuery.grep(elements, function( elem ) { - return elem.nodeType === 1; - }); - - if ( isSimple.test( qualifier ) ) { - return jQuery.filter(qualifier, filtered, !keep); - } else { - qualifier = jQuery.filter( qualifier, filtered ); - } - } - - return jQuery.grep(elements, function( elem ) { - return ( jQuery.inArray( elem, qualifier ) >= 0 ) === keep; - }); -} -function createSafeFragment( document ) { - var list = nodeNames.split( "|" ), - safeFrag = document.createDocumentFragment(); - - if ( safeFrag.createElement ) { - while ( list.length ) { - safeFrag.createElement( - list.pop() - ); - } - } - return safeFrag; -} - -var nodeNames = "abbr|article|aside|audio|bdi|canvas|data|datalist|details|figcaption|figure|footer|" + - "header|hgroup|mark|meter|nav|output|progress|section|summary|time|video", - rinlinejQuery = / jQuery\d+="(?:null|\d+)"/g, - rnoshimcache = new RegExp("<(?:" + nodeNames + ")[\\s/>]", "i"), - rleadingWhitespace = /^\s+/, - rxhtmlTag = /<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi, - rtagName = /<([\w:]+)/, - rtbody = /<tbody/i, - rhtml = /<|&#?\w+;/, - rnoInnerhtml = /<(?:script|style|link)/i, - manipulation_rcheckableType = /^(?:checkbox|radio)$/i, - // checked="checked" or checked - rchecked = /checked\s*(?:[^=]|=\s*.checked.)/i, - rscriptType = /^$|\/(?:java|ecma)script/i, - rscriptTypeMasked = /^true\/(.*)/, - rcleanScript = /^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g, - - // We have to close these tags to support XHTML (#13200) - wrapMap = { - option: [ 1, "<select multiple='multiple'>", "</select>" ], - legend: [ 1, "<fieldset>", "</fieldset>" ], - area: [ 1, "<map>", "</map>" ], - param: [ 1, "<object>", "</object>" ], - thead: [ 1, "<table>", "</table>" ], - tr: [ 2, "<table><tbody>", "</tbody></table>" ], - col: [ 2, "<table><tbody></tbody><colgroup>", "</colgroup></table>" ], - td: [ 3, "<table><tbody><tr>", "</tr></tbody></table>" ], - - // IE6-8 can't serialize link, script, style, or any html5 (NoScope) tags, - // unless wrapped in a div with non-breaking characters in front of it. - _default: jQuery.support.htmlSerialize ? [ 0, "", "" ] : [ 1, "X<div>", "</div>" ] - }, - safeFragment = createSafeFragment( document ), - fragmentDiv = safeFragment.appendChild( document.createElement("div") ); - -wrapMap.optgroup = wrapMap.option; -wrapMap.tbody = wrapMap.tfoot = wrapMap.colgroup = wrapMap.caption = wrapMap.thead; -wrapMap.th = wrapMap.td; - -jQuery.fn.extend({ - text: function( value ) { - return jQuery.access( this, function( value ) { - return value === undefined ? - jQuery.text( this ) : - this.empty().append( ( this[0] && this[0].ownerDocument || document ).createTextNode( value ) ); - }, null, value, arguments.length ); - }, - - wrapAll: function( html ) { - if ( jQuery.isFunction( html ) ) { - return this.each(function(i) { - jQuery(this).wrapAll( html.call(this, i) ); - }); - } - - if ( this[0] ) { - // The elements to wrap the target around - var wrap = jQuery( html, this[0].ownerDocument ).eq(0).clone(true); - - if ( this[0].parentNode ) { - wrap.insertBefore( this[0] ); - } - - wrap.map(function() { - var elem = this; - - while ( elem.firstChild && elem.firstChild.nodeType === 1 ) { - elem = elem.firstChild; - } - - return elem; - }).append( this ); - } - - return this; - }, - - wrapInner: function( html ) { - if ( jQuery.isFunction( html ) ) { - return this.each(function(i) { - jQuery(this).wrapInner( html.call(this, i) ); - }); - } - - return this.each(function() { - var self = jQuery( this ), - contents = self.contents(); - - if ( contents.length ) { - contents.wrapAll( html ); - - } else { - self.append( html ); - } - }); - }, - - wrap: function( html ) { - var isFunction = jQuery.isFunction( html ); - - return this.each(function(i) { - jQuery( this ).wrapAll( isFunction ? html.call(this, i) : html ); - }); - }, - - unwrap: function() { - return this.parent().each(function() { - if ( !jQuery.nodeName( this, "body" ) ) { - jQuery( this ).replaceWith( this.childNodes ); - } - }).end(); - }, - - append: function() { - return this.domManip(arguments, true, function( elem ) { - if ( this.nodeType === 1 || this.nodeType === 11 || this.nodeType === 9 ) { - this.appendChild( elem ); - } - }); - }, - - prepend: function() { - return this.domManip(arguments, true, function( elem ) { - if ( this.nodeType === 1 || this.nodeType === 11 || this.nodeType === 9 ) { - this.insertBefore( elem, this.firstChild ); - } - }); - }, - - before: function() { - return this.domManip( arguments, false, function( elem ) { - if ( this.parentNode ) { - this.parentNode.insertBefore( elem, this ); - } - }); - }, - - after: function() { - return this.domManip( arguments, false, function( elem ) { - if ( this.parentNode ) { - this.parentNode.insertBefore( elem, this.nextSibling ); - } - }); - }, - - // keepData is for internal use only--do not document - remove: function( selector, keepData ) { - var elem, - i = 0; - - for ( ; (elem = this[i]) != null; i++ ) { - if ( !selector || jQuery.filter( selector, [ elem ] ).length > 0 ) { - if ( !keepData && elem.nodeType === 1 ) { - jQuery.cleanData( getAll( elem ) ); - } - - if ( elem.parentNode ) { - if ( keepData && jQuery.contains( elem.ownerDocument, elem ) ) { - setGlobalEval( getAll( elem, "script" ) ); - } - elem.parentNode.removeChild( elem ); - } - } - } - - return this; - }, - - empty: function() { - var elem, - i = 0; - - for ( ; (elem = this[i]) != null; i++ ) { - // Remove element nodes and prevent memory leaks - if ( elem.nodeType === 1 ) { - jQuery.cleanData( getAll( elem, false ) ); - } - - // Remove any remaining nodes - while ( elem.firstChild ) { - elem.removeChild( elem.firstChild ); - } - - // If this is a select, ensure that it displays empty (#12336) - // Support: IE<9 - if ( elem.options && jQuery.nodeName( elem, "select" ) ) { - elem.options.length = 0; - } - } - - return this; - }, - - clone: function( dataAndEvents, deepDataAndEvents ) { - dataAndEvents = dataAndEvents == null ? false : dataAndEvents; - deepDataAndEvents = deepDataAndEvents == null ? dataAndEvents : deepDataAndEvents; - - return this.map( function () { - return jQuery.clone( this, dataAndEvents, deepDataAndEvents ); - }); - }, - - html: function( value ) { - return jQuery.access( this, function( value ) { - var elem = this[0] || {}, - i = 0, - l = this.length; - - if ( value === undefined ) { - return elem.nodeType === 1 ? - elem.innerHTML.replace( rinlinejQuery, "" ) : - undefined; - } - - // See if we can take a shortcut and just use innerHTML - if ( typeof value === "string" && !rnoInnerhtml.test( value ) && - ( jQuery.support.htmlSerialize || !rnoshimcache.test( value ) ) && - ( jQuery.support.leadingWhitespace || !rleadingWhitespace.test( value ) ) && - !wrapMap[ ( rtagName.exec( value ) || ["", ""] )[1].toLowerCase() ] ) { - - value = value.replace( rxhtmlTag, "<$1></$2>" ); - - try { - for (; i < l; i++ ) { - // Remove element nodes and prevent memory leaks - elem = this[i] || {}; - if ( elem.nodeType === 1 ) { - jQuery.cleanData( getAll( elem, false ) ); - elem.innerHTML = value; - } - } - - elem = 0; - - // If using innerHTML throws an exception, use the fallback method - } catch(e) {} - } - - if ( elem ) { - this.empty().append( value ); - } - }, null, value, arguments.length ); - }, - - replaceWith: function( value ) { - var isFunc = jQuery.isFunction( value ); - - // Make sure that the elements are removed from the DOM before they are inserted - // this can help fix replacing a parent with child elements - if ( !isFunc && typeof value !== "string" ) { - value = jQuery( value ).not( this ).detach(); - } - - return this.domManip( [ value ], true, function( elem ) { - var next = this.nextSibling, - parent = this.parentNode; - - if ( parent && this.nodeType === 1 || this.nodeType === 11 ) { - - jQuery( this ).remove(); - - if ( next ) { - next.parentNode.insertBefore( elem, next ); - } else { - parent.appendChild( elem ); - } - } - }); - }, - - detach: function( selector ) { - return this.remove( selector, true ); - }, - - domManip: function( args, table, callback ) { - - // Flatten any nested arrays - args = core_concat.apply( [], args ); - - var fragment, first, scripts, hasScripts, node, doc, - i = 0, - l = this.length, - set = this, - iNoClone = l - 1, - value = args[0], - isFunction = jQuery.isFunction( value ); - - // We can't cloneNode fragments that contain checked, in WebKit - if ( isFunction || !( l <= 1 || typeof value !== "string" || jQuery.support.checkClone || !rchecked.test( value ) ) ) { - return this.each(function( index ) { - var self = set.eq( index ); - if ( isFunction ) { - args[0] = value.call( this, index, table ? self.html() : undefined ); - } - self.domManip( args, table, callback ); - }); - } - - if ( l ) { - fragment = jQuery.buildFragment( args, this[ 0 ].ownerDocument, false, this ); - first = fragment.firstChild; - - if ( fragment.childNodes.length === 1 ) { - fragment = first; - } - - if ( first ) { - table = table && jQuery.nodeName( first, "tr" ); - scripts = jQuery.map( getAll( fragment, "script" ), disableScript ); - hasScripts = scripts.length; - - // Use the original fragment for the last item instead of the first because it can end up - // being emptied incorrectly in certain situations (#8070). - for ( ; i < l; i++ ) { - node = fragment; - - if ( i !== iNoClone ) { - node = jQuery.clone( node, true, true ); - - // Keep references to cloned scripts for later restoration - if ( hasScripts ) { - jQuery.merge( scripts, getAll( node, "script" ) ); - } - } - - callback.call( - table && jQuery.nodeName( this[i], "table" ) ? - findOrAppend( this[i], "tbody" ) : - this[i], - node, - i - ); - } - - if ( hasScripts ) { - doc = scripts[ scripts.length - 1 ].ownerDocument; - - // Reenable scripts - jQuery.map( scripts, restoreScript ); - - // Evaluate executable scripts on first document insertion - for ( i = 0; i < hasScripts; i++ ) { - node = scripts[ i ]; - if ( rscriptType.test( node.type || "" ) && - !jQuery._data( node, "globalEval" ) && jQuery.contains( doc, node ) ) { - - if ( node.src ) { - // Hope ajax is available... - jQuery.ajax({ - url: node.src, - type: "GET", - dataType: "script", - async: false, - global: false, - "throws": true - }); - } else { - jQuery.globalEval( ( node.text || node.textContent || node.innerHTML || "" ).replace( rcleanScript, "" ) ); - } - } - } - } - - // Fix #11809: Avoid leaking memory - fragment = first = null; - } - } - - return this; - } -}); - -function findOrAppend( elem, tag ) { - return elem.getElementsByTagName( tag )[0] || elem.appendChild( elem.ownerDocument.createElement( tag ) ); -} - -// Replace/restore the type attribute of script elements for safe DOM manipulation -function disableScript( elem ) { - var attr = elem.getAttributeNode("type"); - elem.type = ( attr && attr.specified ) + "/" + elem.type; - return elem; -} -function restoreScript( elem ) { - var match = rscriptTypeMasked.exec( elem.type ); - if ( match ) { - elem.type = match[1]; - } else { - elem.removeAttribute("type"); - } - return elem; -} - -// Mark scripts as having already been evaluated -function setGlobalEval( elems, refElements ) { - var elem, - i = 0; - for ( ; (elem = elems[i]) != null; i++ ) { - jQuery._data( elem, "globalEval", !refElements || jQuery._data( refElements[i], "globalEval" ) ); - } -} - -function cloneCopyEvent( src, dest ) { - - if ( dest.nodeType !== 1 || !jQuery.hasData( src ) ) { - return; - } - - var type, i, l, - oldData = jQuery._data( src ), - curData = jQuery._data( dest, oldData ), - events = oldData.events; - - if ( events ) { - delete curData.handle; - curData.events = {}; - - for ( type in events ) { - for ( i = 0, l = events[ type ].length; i < l; i++ ) { - jQuery.event.add( dest, type, events[ type ][ i ] ); - } - } - } - - // make the cloned public data object a copy from the original - if ( curData.data ) { - curData.data = jQuery.extend( {}, curData.data ); - } -} - -function fixCloneNodeIssues( src, dest ) { - var nodeName, data, e; - - // We do not need to do anything for non-Elements - if ( dest.nodeType !== 1 ) { - return; - } - - nodeName = dest.nodeName.toLowerCase(); - - // IE6-8 copies events bound via attachEvent when using cloneNode. - if ( !jQuery.support.noCloneEvent && dest[ jQuery.expando ] ) { - data = jQuery._data( dest ); - - for ( e in data.events ) { - jQuery.removeEvent( dest, e, data.handle ); - } - - // Event data gets referenced instead of copied if the expando gets copied too - dest.removeAttribute( jQuery.expando ); - } - - // IE blanks contents when cloning scripts, and tries to evaluate newly-set text - if ( nodeName === "script" && dest.text !== src.text ) { - disableScript( dest ).text = src.text; - restoreScript( dest ); - - // IE6-10 improperly clones children of object elements using classid. - // IE10 throws NoModificationAllowedError if parent is null, #12132. - } else if ( nodeName === "object" ) { - if ( dest.parentNode ) { - dest.outerHTML = src.outerHTML; - } - - // This path appears unavoidable for IE9. When cloning an object - // element in IE9, the outerHTML strategy above is not sufficient. - // If the src has innerHTML and the destination does not, - // copy the src.innerHTML into the dest.innerHTML. #10324 - if ( jQuery.support.html5Clone && ( src.innerHTML && !jQuery.trim(dest.innerHTML) ) ) { - dest.innerHTML = src.innerHTML; - } - - } else if ( nodeName === "input" && manipulation_rcheckableType.test( src.type ) ) { - // IE6-8 fails to persist the checked state of a cloned checkbox - // or radio button. Worse, IE6-7 fail to give the cloned element - // a checked appearance if the defaultChecked value isn't also set - - dest.defaultChecked = dest.checked = src.checked; - - // IE6-7 get confused and end up setting the value of a cloned - // checkbox/radio button to an empty string instead of "on" - if ( dest.value !== src.value ) { - dest.value = src.value; - } - - // IE6-8 fails to return the selected option to the default selected - // state when cloning options - } else if ( nodeName === "option" ) { - dest.defaultSelected = dest.selected = src.defaultSelected; - - // IE6-8 fails to set the defaultValue to the correct value when - // cloning other types of input fields - } else if ( nodeName === "input" || nodeName === "textarea" ) { - dest.defaultValue = src.defaultValue; - } -} - -jQuery.each({ - appendTo: "append", - prependTo: "prepend", - insertBefore: "before", - insertAfter: "after", - replaceAll: "replaceWith" -}, function( name, original ) { - jQuery.fn[ name ] = function( selector ) { - var elems, - i = 0, - ret = [], - insert = jQuery( selector ), - last = insert.length - 1; - - for ( ; i <= last; i++ ) { - elems = i === last ? this : this.clone(true); - jQuery( insert[i] )[ original ]( elems ); - - // Modern browsers can apply jQuery collections as arrays, but oldIE needs a .get() - core_push.apply( ret, elems.get() ); - } - - return this.pushStack( ret ); - }; -}); - -function getAll( context, tag ) { - var elems, elem, - i = 0, - found = typeof context.getElementsByTagName !== "undefined" ? context.getElementsByTagName( tag || "*" ) : - typeof context.querySelectorAll !== "undefined" ? context.querySelectorAll( tag || "*" ) : - undefined; - - if ( !found ) { - for ( found = [], elems = context.childNodes || context; (elem = elems[i]) != null; i++ ) { - if ( !tag || jQuery.nodeName( elem, tag ) ) { - found.push( elem ); - } else { - jQuery.merge( found, getAll( elem, tag ) ); - } - } - } - - return tag === undefined || tag && jQuery.nodeName( context, tag ) ? - jQuery.merge( [ context ], found ) : - found; -} - -// Used in buildFragment, fixes the defaultChecked property -function fixDefaultChecked( elem ) { - if ( manipulation_rcheckableType.test( elem.type ) ) { - elem.defaultChecked = elem.checked; - } -} - -jQuery.extend({ - clone: function( elem, dataAndEvents, deepDataAndEvents ) { - var destElements, srcElements, node, i, clone, - inPage = jQuery.contains( elem.ownerDocument, elem ); - - if ( jQuery.support.html5Clone || jQuery.isXMLDoc(elem) || !rnoshimcache.test( "<" + elem.nodeName + ">" ) ) { - clone = elem.cloneNode( true ); - - // IE<=8 does not properly clone detached, unknown element nodes - } else { - fragmentDiv.innerHTML = elem.outerHTML; - fragmentDiv.removeChild( clone = fragmentDiv.firstChild ); - } - - if ( (!jQuery.support.noCloneEvent || !jQuery.support.noCloneChecked) && - (elem.nodeType === 1 || elem.nodeType === 11) && !jQuery.isXMLDoc(elem) ) { - - // We eschew Sizzle here for performance reasons: http://jsperf.com/getall-vs-sizzle/2 - destElements = getAll( clone ); - srcElements = getAll( elem ); - - // Fix all IE cloning issues - for ( i = 0; (node = srcElements[i]) != null; ++i ) { - // Ensure that the destination node is not null; Fixes #9587 - if ( destElements[i] ) { - fixCloneNodeIssues( node, destElements[i] ); - } - } - } - - // Copy the events from the original to the clone - if ( dataAndEvents ) { - if ( deepDataAndEvents ) { - srcElements = srcElements || getAll( elem ); - destElements = destElements || getAll( clone ); - - for ( i = 0; (node = srcElements[i]) != null; i++ ) { - cloneCopyEvent( node, destElements[i] ); - } - } else { - cloneCopyEvent( elem, clone ); - } - } - - // Preserve script evaluation history - destElements = getAll( clone, "script" ); - if ( destElements.length > 0 ) { - setGlobalEval( destElements, !inPage && getAll( elem, "script" ) ); - } - - destElements = srcElements = node = null; - - // Return the cloned set - return clone; - }, - - buildFragment: function( elems, context, scripts, selection ) { - var contains, elem, tag, tmp, wrap, tbody, j, - l = elems.length, - - // Ensure a safe fragment - safe = createSafeFragment( context ), - - nodes = [], - i = 0; - - for ( ; i < l; i++ ) { - elem = elems[ i ]; - - if ( elem || elem === 0 ) { - - // Add nodes directly - if ( jQuery.type( elem ) === "object" ) { - jQuery.merge( nodes, elem.nodeType ? [ elem ] : elem ); - - // Convert non-html into a text node - } else if ( !rhtml.test( elem ) ) { - nodes.push( context.createTextNode( elem ) ); - - // Convert html into DOM nodes - } else { - tmp = tmp || safe.appendChild( context.createElement("div") ); - - // Deserialize a standard representation - tag = ( rtagName.exec( elem ) || ["", ""] )[1].toLowerCase(); - wrap = wrapMap[ tag ] || wrapMap._default; - - tmp.innerHTML = wrap[1] + elem.replace( rxhtmlTag, "<$1></$2>" ) + wrap[2]; - - // Descend through wrappers to the right content - j = wrap[0]; - while ( j-- ) { - tmp = tmp.lastChild; - } - - // Manually add leading whitespace removed by IE - if ( !jQuery.support.leadingWhitespace && rleadingWhitespace.test( elem ) ) { - nodes.push( context.createTextNode( rleadingWhitespace.exec( elem )[0] ) ); - } - - // Remove IE's autoinserted <tbody> from table fragments - if ( !jQuery.support.tbody ) { - - // String was a <table>, *may* have spurious <tbody> - elem = tag === "table" && !rtbody.test( elem ) ? - tmp.firstChild : - - // String was a bare <thead> or <tfoot> - wrap[1] === "<table>" && !rtbody.test( elem ) ? - tmp : - 0; - - j = elem && elem.childNodes.length; - while ( j-- ) { - if ( jQuery.nodeName( (tbody = elem.childNodes[j]), "tbody" ) && !tbody.childNodes.length ) { - elem.removeChild( tbody ); - } - } - } - - jQuery.merge( nodes, tmp.childNodes ); - - // Fix #12392 for WebKit and IE > 9 - tmp.textContent = ""; - - // Fix #12392 for oldIE - while ( tmp.firstChild ) { - tmp.removeChild( tmp.firstChild ); - } - - // Remember the top-level container for proper cleanup - tmp = safe.lastChild; - } - } - } - - // Fix #11356: Clear elements from fragment - if ( tmp ) { - safe.removeChild( tmp ); - } - - // Reset defaultChecked for any radios and checkboxes - // about to be appended to the DOM in IE 6/7 (#8060) - if ( !jQuery.support.appendChecked ) { - jQuery.grep( getAll( nodes, "input" ), fixDefaultChecked ); - } - - i = 0; - while ( (elem = nodes[ i++ ]) ) { - - // #4087 - If origin and destination elements are the same, and this is - // that element, do not do anything - if ( selection && jQuery.inArray( elem, selection ) !== -1 ) { - continue; - } - - contains = jQuery.contains( elem.ownerDocument, elem ); - - // Append to fragment - tmp = getAll( safe.appendChild( elem ), "script" ); - - // Preserve script evaluation history - if ( contains ) { - setGlobalEval( tmp ); - } - - // Capture executables - if ( scripts ) { - j = 0; - while ( (elem = tmp[ j++ ]) ) { - if ( rscriptType.test( elem.type || "" ) ) { - scripts.push( elem ); - } - } - } - } - - tmp = null; - - return safe; - }, - - cleanData: function( elems, /* internal */ acceptData ) { - var data, id, elem, type, - i = 0, - internalKey = jQuery.expando, - cache = jQuery.cache, - deleteExpando = jQuery.support.deleteExpando, - special = jQuery.event.special; - - for ( ; (elem = elems[i]) != null; i++ ) { - - if ( acceptData || jQuery.acceptData( elem ) ) { - - id = elem[ internalKey ]; - data = id && cache[ id ]; - - if ( data ) { - if ( data.events ) { - for ( type in data.events ) { - if ( special[ type ] ) { - jQuery.event.remove( elem, type ); - - // This is a shortcut to avoid jQuery.event.remove's overhead - } else { - jQuery.removeEvent( elem, type, data.handle ); - } - } - } - - // Remove cache only if it was not already removed by jQuery.event.remove - if ( cache[ id ] ) { - - delete cache[ id ]; - - // IE does not allow us to delete expando properties from nodes, - // nor does it have a removeAttribute function on Document nodes; - // we must handle all of these cases - if ( deleteExpando ) { - delete elem[ internalKey ]; - - } else if ( typeof elem.removeAttribute !== "undefined" ) { - elem.removeAttribute( internalKey ); - - } else { - elem[ internalKey ] = null; - } - - core_deletedIds.push( id ); - } - } - } - } - } -}); -var curCSS, getStyles, iframe, - ralpha = /alpha\([^)]*\)/i, - ropacity = /opacity\s*=\s*([^)]*)/, - rposition = /^(top|right|bottom|left)$/, - // swappable if display is none or starts with table except "table", "table-cell", or "table-caption" - // see here for display values: https://developer.mozilla.org/en-US/docs/CSS/display - rdisplayswap = /^(none|table(?!-c[ea]).+)/, - rmargin = /^margin/, - rnumsplit = new RegExp( "^(" + core_pnum + ")(.*)$", "i" ), - rnumnonpx = new RegExp( "^(" + core_pnum + ")(?!px)[a-z%]+$", "i" ), - rrelNum = new RegExp( "^([+-])=(" + core_pnum + ")", "i" ), - elemdisplay = { BODY: "block" }, - - cssShow = { position: "absolute", visibility: "hidden", display: "block" }, - cssNormalTransform = { - letterSpacing: 0, - fontWeight: 400 - }, - - cssExpand = [ "Top", "Right", "Bottom", "Left" ], - cssPrefixes = [ "Webkit", "O", "Moz", "ms" ]; - -// return a css property mapped to a potentially vendor prefixed property -function vendorPropName( style, name ) { - - // shortcut for names that are not vendor prefixed - if ( name in style ) { - return name; - } - - // check for vendor prefixed names - var capName = name.charAt(0).toUpperCase() + name.slice(1), - origName = name, - i = cssPrefixes.length; - - while ( i-- ) { - name = cssPrefixes[ i ] + capName; - if ( name in style ) { - return name; - } - } - - return origName; -} - -function isHidden( elem, el ) { - // isHidden might be called from jQuery#filter function; - // in that case, element will be second argument - elem = el || elem; - return jQuery.css( elem, "display" ) === "none" || !jQuery.contains( elem.ownerDocument, elem ); -} - -function showHide( elements, show ) { - var elem, - values = [], - index = 0, - length = elements.length; - - for ( ; index < length; index++ ) { - elem = elements[ index ]; - if ( !elem.style ) { - continue; - } - values[ index ] = jQuery._data( elem, "olddisplay" ); - if ( show ) { - // Reset the inline display of this element to learn if it is - // being hidden by cascaded rules or not - if ( !values[ index ] && elem.style.display === "none" ) { - elem.style.display = ""; - } - - // Set elements which have been overridden with display: none - // in a stylesheet to whatever the default browser style is - // for such an element - if ( elem.style.display === "" && isHidden( elem ) ) { - values[ index ] = jQuery._data( elem, "olddisplay", css_defaultDisplay(elem.nodeName) ); - } - } else if ( !values[ index ] && !isHidden( elem ) ) { - jQuery._data( elem, "olddisplay", jQuery.css( elem, "display" ) ); - } - } - - // Set the display of most of the elements in a second loop - // to avoid the constant reflow - for ( index = 0; index < length; index++ ) { - elem = elements[ index ]; - if ( !elem.style ) { - continue; - } - if ( !show || elem.style.display === "none" || elem.style.display === "" ) { - elem.style.display = show ? values[ index ] || "" : "none"; - } - } - - return elements; -} - -jQuery.fn.extend({ - css: function( name, value ) { - return jQuery.access( this, function( elem, name, value ) { - var styles, len, - map = {}, - i = 0; - - if ( jQuery.isArray( name ) ) { - styles = getStyles( elem ); - len = name.length; - - for ( ; i < len; i++ ) { - map[ name[ i ] ] = jQuery.css( elem, name[ i ], false, styles ); - } - - return map; - } - - return value !== undefined ? - jQuery.style( elem, name, value ) : - jQuery.css( elem, name ); - }, name, value, arguments.length > 1 ); - }, - show: function() { - return showHide( this, true ); - }, - hide: function() { - return showHide( this ); - }, - toggle: function( state ) { - var bool = typeof state === "boolean"; - - return this.each(function() { - if ( bool ? state : isHidden( this ) ) { - jQuery( this ).show(); - } else { - jQuery( this ).hide(); - } - }); - } -}); - -jQuery.extend({ - // Add in style property hooks for overriding the default - // behavior of getting and setting a style property - cssHooks: { - opacity: { - get: function( elem, computed ) { - if ( computed ) { - // We should always get a number back from opacity - var ret = curCSS( elem, "opacity" ); - return ret === "" ? "1" : ret; - } - } - } - }, - - // Exclude the following css properties to add px - cssNumber: { - "columnCount": true, - "fillOpacity": true, - "fontWeight": true, - "lineHeight": true, - "opacity": true, - "orphans": true, - "widows": true, - "zIndex": true, - "zoom": true - }, - - // Add in properties whose names you wish to fix before - // setting or getting the value - cssProps: { - // normalize float css property - "float": jQuery.support.cssFloat ? "cssFloat" : "styleFloat" - }, - - // Get and set the style property on a DOM Node - style: function( elem, name, value, extra ) { - // Don't set styles on text and comment nodes - if ( !elem || elem.nodeType === 3 || elem.nodeType === 8 || !elem.style ) { - return; - } - - // Make sure that we're working with the right name - var ret, type, hooks, - origName = jQuery.camelCase( name ), - style = elem.style; - - name = jQuery.cssProps[ origName ] || ( jQuery.cssProps[ origName ] = vendorPropName( style, origName ) ); - - // gets hook for the prefixed version - // followed by the unprefixed version - hooks = jQuery.cssHooks[ name ] || jQuery.cssHooks[ origName ]; - - // Check if we're setting a value - if ( value !== undefined ) { - type = typeof value; - - // convert relative number strings (+= or -=) to relative numbers. #7345 - if ( type === "string" && (ret = rrelNum.exec( value )) ) { - value = ( ret[1] + 1 ) * ret[2] + parseFloat( jQuery.css( elem, name ) ); - // Fixes bug #9237 - type = "number"; - } - - // Make sure that NaN and null values aren't set. See: #7116 - if ( value == null || type === "number" && isNaN( value ) ) { - return; - } - - // If a number was passed in, add 'px' to the (except for certain CSS properties) - if ( type === "number" && !jQuery.cssNumber[ origName ] ) { - value += "px"; - } - - // Fixes #8908, it can be done more correctly by specifing setters in cssHooks, - // but it would mean to define eight (for every problematic property) identical functions - if ( !jQuery.support.clearCloneStyle && value === "" && name.indexOf("background") === 0 ) { - style[ name ] = "inherit"; - } - - // If a hook was provided, use that value, otherwise just set the specified value - if ( !hooks || !("set" in hooks) || (value = hooks.set( elem, value, extra )) !== undefined ) { - - // Wrapped to prevent IE from throwing errors when 'invalid' values are provided - // Fixes bug #5509 - try { - style[ name ] = value; - } catch(e) {} - } - - } else { - // If a hook was provided get the non-computed value from there - if ( hooks && "get" in hooks && (ret = hooks.get( elem, false, extra )) !== undefined ) { - return ret; - } - - // Otherwise just get the value from the style object - return style[ name ]; - } - }, - - css: function( elem, name, extra, styles ) { - var val, num, hooks, - origName = jQuery.camelCase( name ); - - // Make sure that we're working with the right name - name = jQuery.cssProps[ origName ] || ( jQuery.cssProps[ origName ] = vendorPropName( elem.style, origName ) ); - - // gets hook for the prefixed version - // followed by the unprefixed version - hooks = jQuery.cssHooks[ name ] || jQuery.cssHooks[ origName ]; - - // If a hook was provided get the computed value from there - if ( hooks && "get" in hooks ) { - val = hooks.get( elem, true, extra ); - } - - // Otherwise, if a way to get the computed value exists, use that - if ( val === undefined ) { - val = curCSS( elem, name, styles ); - } - - //convert "normal" to computed value - if ( val === "normal" && name in cssNormalTransform ) { - val = cssNormalTransform[ name ]; - } - - // Return, converting to number if forced or a qualifier was provided and val looks numeric - if ( extra ) { - num = parseFloat( val ); - return extra === true || jQuery.isNumeric( num ) ? num || 0 : val; - } - return val; - }, - - // A method for quickly swapping in/out CSS properties to get correct calculations - swap: function( elem, options, callback, args ) { - var ret, name, - old = {}; - - // Remember the old values, and insert the new ones - for ( name in options ) { - old[ name ] = elem.style[ name ]; - elem.style[ name ] = options[ name ]; - } - - ret = callback.apply( elem, args || [] ); - - // Revert the old values - for ( name in options ) { - elem.style[ name ] = old[ name ]; - } - - return ret; - } -}); - -// NOTE: we've included the "window" in window.getComputedStyle -// because jsdom on node.js will break without it. -if ( window.getComputedStyle ) { - getStyles = function( elem ) { - return window.getComputedStyle( elem, null ); - }; - - curCSS = function( elem, name, _computed ) { - var width, minWidth, maxWidth, - computed = _computed || getStyles( elem ), - - // getPropertyValue is only needed for .css('filter') in IE9, see #12537 - ret = computed ? computed.getPropertyValue( name ) || computed[ name ] : undefined, - style = elem.style; - - if ( computed ) { - - if ( ret === "" && !jQuery.contains( elem.ownerDocument, elem ) ) { - ret = jQuery.style( elem, name ); - } - - // A tribute to the "awesome hack by Dean Edwards" - // Chrome < 17 and Safari 5.0 uses "computed value" instead of "used value" for margin-right - // Safari 5.1.7 (at least) returns percentage for a larger set of values, but width seems to be reliably pixels - // this is against the CSSOM draft spec: http://dev.w3.org/csswg/cssom/#resolved-values - if ( rnumnonpx.test( ret ) && rmargin.test( name ) ) { - - // Remember the original values - width = style.width; - minWidth = style.minWidth; - maxWidth = style.maxWidth; - - // Put in the new values to get a computed value out - style.minWidth = style.maxWidth = style.width = ret; - ret = computed.width; - - // Revert the changed values - style.width = width; - style.minWidth = minWidth; - style.maxWidth = maxWidth; - } - } - - return ret; - }; -} else if ( document.documentElement.currentStyle ) { - getStyles = function( elem ) { - return elem.currentStyle; - }; - - curCSS = function( elem, name, _computed ) { - var left, rs, rsLeft, - computed = _computed || getStyles( elem ), - ret = computed ? computed[ name ] : undefined, - style = elem.style; - - // Avoid setting ret to empty string here - // so we don't default to auto - if ( ret == null && style && style[ name ] ) { - ret = style[ name ]; - } - - // From the awesome hack by Dean Edwards - // http://erik.eae.net/archives/2007/07/27/18.54.15/#comment-102291 - - // If we're not dealing with a regular pixel number - // but a number that has a weird ending, we need to convert it to pixels - // but not position css attributes, as those are proportional to the parent element instead - // and we can't measure the parent instead because it might trigger a "stacking dolls" problem - if ( rnumnonpx.test( ret ) && !rposition.test( name ) ) { - - // Remember the original values - left = style.left; - rs = elem.runtimeStyle; - rsLeft = rs && rs.left; - - // Put in the new values to get a computed value out - if ( rsLeft ) { - rs.left = elem.currentStyle.left; - } - style.left = name === "fontSize" ? "1em" : ret; - ret = style.pixelLeft + "px"; - - // Revert the changed values - style.left = left; - if ( rsLeft ) { - rs.left = rsLeft; - } - } - - return ret === "" ? "auto" : ret; - }; -} - -function setPositiveNumber( elem, value, subtract ) { - var matches = rnumsplit.exec( value ); - return matches ? - // Guard against undefined "subtract", e.g., when used as in cssHooks - Math.max( 0, matches[ 1 ] - ( subtract || 0 ) ) + ( matches[ 2 ] || "px" ) : - value; -} - -function augmentWidthOrHeight( elem, name, extra, isBorderBox, styles ) { - var i = extra === ( isBorderBox ? "border" : "content" ) ? - // If we already have the right measurement, avoid augmentation - 4 : - // Otherwise initialize for horizontal or vertical properties - name === "width" ? 1 : 0, - - val = 0; - - for ( ; i < 4; i += 2 ) { - // both box models exclude margin, so add it if we want it - if ( extra === "margin" ) { - val += jQuery.css( elem, extra + cssExpand[ i ], true, styles ); - } - - if ( isBorderBox ) { - // border-box includes padding, so remove it if we want content - if ( extra === "content" ) { - val -= jQuery.css( elem, "padding" + cssExpand[ i ], true, styles ); - } - - // at this point, extra isn't border nor margin, so remove border - if ( extra !== "margin" ) { - val -= jQuery.css( elem, "border" + cssExpand[ i ] + "Width", true, styles ); - } - } else { - // at this point, extra isn't content, so add padding - val += jQuery.css( elem, "padding" + cssExpand[ i ], true, styles ); - - // at this point, extra isn't content nor padding, so add border - if ( extra !== "padding" ) { - val += jQuery.css( elem, "border" + cssExpand[ i ] + "Width", true, styles ); - } - } - } - - return val; -} - -function getWidthOrHeight( elem, name, extra ) { - - // Start with offset property, which is equivalent to the border-box value - var valueIsBorderBox = true, - val = name === "width" ? elem.offsetWidth : elem.offsetHeight, - styles = getStyles( elem ), - isBorderBox = jQuery.support.boxSizing && jQuery.css( elem, "boxSizing", false, styles ) === "border-box"; - - // some non-html elements return undefined for offsetWidth, so check for null/undefined - // svg - https://bugzilla.mozilla.org/show_bug.cgi?id=649285 - // MathML - https://bugzilla.mozilla.org/show_bug.cgi?id=491668 - if ( val <= 0 || val == null ) { - // Fall back to computed then uncomputed css if necessary - val = curCSS( elem, name, styles ); - if ( val < 0 || val == null ) { - val = elem.style[ name ]; - } - - // Computed unit is not pixels. Stop here and return. - if ( rnumnonpx.test(val) ) { - return val; - } - - // we need the check for style in case a browser which returns unreliable values - // for getComputedStyle silently falls back to the reliable elem.style - valueIsBorderBox = isBorderBox && ( jQuery.support.boxSizingReliable || val === elem.style[ name ] ); - - // Normalize "", auto, and prepare for extra - val = parseFloat( val ) || 0; - } - - // use the active box-sizing model to add/subtract irrelevant styles - return ( val + - augmentWidthOrHeight( - elem, - name, - extra || ( isBorderBox ? "border" : "content" ), - valueIsBorderBox, - styles - ) - ) + "px"; -} - -// Try to determine the default display value of an element -function css_defaultDisplay( nodeName ) { - var doc = document, - display = elemdisplay[ nodeName ]; - - if ( !display ) { - display = actualDisplay( nodeName, doc ); - - // If the simple way fails, read from inside an iframe - if ( display === "none" || !display ) { - // Use the already-created iframe if possible - iframe = ( iframe || - jQuery("<iframe frameborder='0' width='0' height='0'/>") - .css( "cssText", "display:block !important" ) - ).appendTo( doc.documentElement ); - - // Always write a new HTML skeleton so Webkit and Firefox don't choke on reuse - doc = ( iframe[0].contentWindow || iframe[0].contentDocument ).document; - doc.write("<!doctype html><html><body>"); - doc.close(); - - display = actualDisplay( nodeName, doc ); - iframe.detach(); - } - - // Store the correct default display - elemdisplay[ nodeName ] = display; - } - - return display; -} - -// Called ONLY from within css_defaultDisplay -function actualDisplay( name, doc ) { - var elem = jQuery( doc.createElement( name ) ).appendTo( doc.body ), - display = jQuery.css( elem[0], "display" ); - elem.remove(); - return display; -} - -jQuery.each([ "height", "width" ], function( i, name ) { - jQuery.cssHooks[ name ] = { - get: function( elem, computed, extra ) { - if ( computed ) { - // certain elements can have dimension info if we invisibly show them - // however, it must have a current display style that would benefit from this - return elem.offsetWidth === 0 && rdisplayswap.test( jQuery.css( elem, "display" ) ) ? - jQuery.swap( elem, cssShow, function() { - return getWidthOrHeight( elem, name, extra ); - }) : - getWidthOrHeight( elem, name, extra ); - } - }, - - set: function( elem, value, extra ) { - var styles = extra && getStyles( elem ); - return setPositiveNumber( elem, value, extra ? - augmentWidthOrHeight( - elem, - name, - extra, - jQuery.support.boxSizing && jQuery.css( elem, "boxSizing", false, styles ) === "border-box", - styles - ) : 0 - ); - } - }; -}); - -if ( !jQuery.support.opacity ) { - jQuery.cssHooks.opacity = { - get: function( elem, computed ) { - // IE uses filters for opacity - return ropacity.test( (computed && elem.currentStyle ? elem.currentStyle.filter : elem.style.filter) || "" ) ? - ( 0.01 * parseFloat( RegExp.$1 ) ) + "" : - computed ? "1" : ""; - }, - - set: function( elem, value ) { - var style = elem.style, - currentStyle = elem.currentStyle, - opacity = jQuery.isNumeric( value ) ? "alpha(opacity=" + value * 100 + ")" : "", - filter = currentStyle && currentStyle.filter || style.filter || ""; - - // IE has trouble with opacity if it does not have layout - // Force it by setting the zoom level - style.zoom = 1; - - // if setting opacity to 1, and no other filters exist - attempt to remove filter attribute #6652 - // if value === "", then remove inline opacity #12685 - if ( ( value >= 1 || value === "" ) && - jQuery.trim( filter.replace( ralpha, "" ) ) === "" && - style.removeAttribute ) { - - // Setting style.filter to null, "" & " " still leave "filter:" in the cssText - // if "filter:" is present at all, clearType is disabled, we want to avoid this - // style.removeAttribute is IE Only, but so apparently is this code path... - style.removeAttribute( "filter" ); - - // if there is no filter style applied in a css rule or unset inline opacity, we are done - if ( value === "" || currentStyle && !currentStyle.filter ) { - return; - } - } - - // otherwise, set new filter values - style.filter = ralpha.test( filter ) ? - filter.replace( ralpha, opacity ) : - filter + " " + opacity; - } - }; -} - -// These hooks cannot be added until DOM ready because the support test -// for it is not run until after DOM ready -jQuery(function() { - if ( !jQuery.support.reliableMarginRight ) { - jQuery.cssHooks.marginRight = { - get: function( elem, computed ) { - if ( computed ) { - // WebKit Bug 13343 - getComputedStyle returns wrong value for margin-right - // Work around by temporarily setting element display to inline-block - return jQuery.swap( elem, { "display": "inline-block" }, - curCSS, [ elem, "marginRight" ] ); - } - } - }; - } - - // Webkit bug: https://bugs.webkit.org/show_bug.cgi?id=29084 - // getComputedStyle returns percent when specified for top/left/bottom/right - // rather than make the css module depend on the offset module, we just check for it here - if ( !jQuery.support.pixelPosition && jQuery.fn.position ) { - jQuery.each( [ "top", "left" ], function( i, prop ) { - jQuery.cssHooks[ prop ] = { - get: function( elem, computed ) { - if ( computed ) { - computed = curCSS( elem, prop ); - // if curCSS returns percentage, fallback to offset - return rnumnonpx.test( computed ) ? - jQuery( elem ).position()[ prop ] + "px" : - computed; - } - } - }; - }); - } - -}); - -if ( jQuery.expr && jQuery.expr.filters ) { - jQuery.expr.filters.hidden = function( elem ) { - return ( elem.offsetWidth === 0 && elem.offsetHeight === 0 ) || (!jQuery.support.reliableHiddenOffsets && ((elem.style && elem.style.display) || jQuery.css( elem, "display" )) === "none"); - }; - - jQuery.expr.filters.visible = function( elem ) { - return !jQuery.expr.filters.hidden( elem ); - }; -} - -// These hooks are used by animate to expand properties -jQuery.each({ - margin: "", - padding: "", - border: "Width" -}, function( prefix, suffix ) { - jQuery.cssHooks[ prefix + suffix ] = { - expand: function( value ) { - var i = 0, - expanded = {}, - - // assumes a single number if not a string - parts = typeof value === "string" ? value.split(" ") : [ value ]; - - for ( ; i < 4; i++ ) { - expanded[ prefix + cssExpand[ i ] + suffix ] = - parts[ i ] || parts[ i - 2 ] || parts[ 0 ]; - } - - return expanded; - } - }; - - if ( !rmargin.test( prefix ) ) { - jQuery.cssHooks[ prefix + suffix ].set = setPositiveNumber; - } -}); -var r20 = /%20/g, - rbracket = /\[\]$/, - rCRLF = /\r?\n/g, - rsubmitterTypes = /^(?:submit|button|image|reset)$/i, - rsubmittable = /^(?:input|select|textarea|keygen)/i; - -jQuery.fn.extend({ - serialize: function() { - return jQuery.param( this.serializeArray() ); - }, - serializeArray: function() { - return this.map(function(){ - // Can add propHook for "elements" to filter or add form elements - var elements = jQuery.prop( this, "elements" ); - return elements ? jQuery.makeArray( elements ) : this; - }) - .filter(function(){ - var type = this.type; - // Use .is(":disabled") so that fieldset[disabled] works - return this.name && !jQuery( this ).is( ":disabled" ) && - rsubmittable.test( this.nodeName ) && !rsubmitterTypes.test( type ) && - ( this.checked || !manipulation_rcheckableType.test( type ) ); - }) - .map(function( i, elem ){ - var val = jQuery( this ).val(); - - return val == null ? - null : - jQuery.isArray( val ) ? - jQuery.map( val, function( val ){ - return { name: elem.name, value: val.replace( rCRLF, "\r\n" ) }; - }) : - { name: elem.name, value: val.replace( rCRLF, "\r\n" ) }; - }).get(); - } -}); - -//Serialize an array of form elements or a set of -//key/values into a query string -jQuery.param = function( a, traditional ) { - var prefix, - s = [], - add = function( key, value ) { - // If value is a function, invoke it and return its value - value = jQuery.isFunction( value ) ? value() : ( value == null ? "" : value ); - s[ s.length ] = encodeURIComponent( key ) + "=" + encodeURIComponent( value ); - }; - - // Set traditional to true for jQuery <= 1.3.2 behavior. - if ( traditional === undefined ) { - traditional = jQuery.ajaxSettings && jQuery.ajaxSettings.traditional; - } - - // If an array was passed in, assume that it is an array of form elements. - if ( jQuery.isArray( a ) || ( a.jquery && !jQuery.isPlainObject( a ) ) ) { - // Serialize the form elements - jQuery.each( a, function() { - add( this.name, this.value ); - }); - - } else { - // If traditional, encode the "old" way (the way 1.3.2 or older - // did it), otherwise encode params recursively. - for ( prefix in a ) { - buildParams( prefix, a[ prefix ], traditional, add ); - } - } - - // Return the resulting serialization - return s.join( "&" ).replace( r20, "+" ); -}; - -function buildParams( prefix, obj, traditional, add ) { - var name; - - if ( jQuery.isArray( obj ) ) { - // Serialize array item. - jQuery.each( obj, function( i, v ) { - if ( traditional || rbracket.test( prefix ) ) { - // Treat each array item as a scalar. - add( prefix, v ); - - } else { - // Item is non-scalar (array or object), encode its numeric index. - buildParams( prefix + "[" + ( typeof v === "object" ? i : "" ) + "]", v, traditional, add ); - } - }); - - } else if ( !traditional && jQuery.type( obj ) === "object" ) { - // Serialize object item. - for ( name in obj ) { - buildParams( prefix + "[" + name + "]", obj[ name ], traditional, add ); - } - - } else { - // Serialize scalar item. - add( prefix, obj ); - } -} -var - // Document location - ajaxLocParts, - ajaxLocation, - - ajax_nonce = jQuery.now(), - - ajax_rquery = /\?/, - rhash = /#.*$/, - rts = /([?&])_=[^&]*/, - rheaders = /^(.*?):[ \t]*([^\r\n]*)\r?$/mg, // IE leaves an \r character at EOL - // #7653, #8125, #8152: local protocol detection - rlocalProtocol = /^(?:about|app|app-storage|.+-extension|file|res|widget):$/, - rnoContent = /^(?:GET|HEAD)$/, - rprotocol = /^\/\//, - rurl = /^([\w.+-]+:)(?:\/\/([^\/?#:]*)(?::(\d+)|)|)/, - - // Keep a copy of the old load method - _load = jQuery.fn.load, - - /* Prefilters - * 1) They are useful to introduce custom dataTypes (see ajax/jsonp.js for an example) - * 2) These are called: - * - BEFORE asking for a transport - * - AFTER param serialization (s.data is a string if s.processData is true) - * 3) key is the dataType - * 4) the catchall symbol "*" can be used - * 5) execution will start with transport dataType and THEN continue down to "*" if needed - */ - prefilters = {}, - - /* Transports bindings - * 1) key is the dataType - * 2) the catchall symbol "*" can be used - * 3) selection will start with transport dataType and THEN go to "*" if needed - */ - transports = {}, - - // Avoid comment-prolog char sequence (#10098); must appease lint and evade compression - allTypes = "*/".concat("*"); - -// #8138, IE may throw an exception when accessing -// a field from window.location if document.domain has been set -try { - ajaxLocation = location.href; -} catch( e ) { - // Use the href attribute of an A element - // since IE will modify it given document.location - ajaxLocation = document.createElement( "a" ); - ajaxLocation.href = ""; - ajaxLocation = ajaxLocation.href; -} - -// Segment location into parts -ajaxLocParts = rurl.exec( ajaxLocation.toLowerCase() ) || []; - -// Base "constructor" for jQuery.ajaxPrefilter and jQuery.ajaxTransport -function addToPrefiltersOrTransports( structure ) { - - // dataTypeExpression is optional and defaults to "*" - return function( dataTypeExpression, func ) { - - if ( typeof dataTypeExpression !== "string" ) { - func = dataTypeExpression; - dataTypeExpression = "*"; - } - - var dataType, - i = 0, - dataTypes = dataTypeExpression.toLowerCase().match( core_rnotwhite ) || []; - - if ( jQuery.isFunction( func ) ) { - // For each dataType in the dataTypeExpression - while ( (dataType = dataTypes[i++]) ) { - // Prepend if requested - if ( dataType[0] === "+" ) { - dataType = dataType.slice( 1 ) || "*"; - (structure[ dataType ] = structure[ dataType ] || []).unshift( func ); - - // Otherwise append - } else { - (structure[ dataType ] = structure[ dataType ] || []).push( func ); - } - } - } - }; -} - -// Base inspection function for prefilters and transports -function inspectPrefiltersOrTransports( structure, options, originalOptions, jqXHR ) { - - var inspected = {}, - seekingTransport = ( structure === transports ); - - function inspect( dataType ) { - var selected; - inspected[ dataType ] = true; - jQuery.each( structure[ dataType ] || [], function( _, prefilterOrFactory ) { - var dataTypeOrTransport = prefilterOrFactory( options, originalOptions, jqXHR ); - if( typeof dataTypeOrTransport === "string" && !seekingTransport && !inspected[ dataTypeOrTransport ] ) { - options.dataTypes.unshift( dataTypeOrTransport ); - inspect( dataTypeOrTransport ); - return false; - } else if ( seekingTransport ) { - return !( selected = dataTypeOrTransport ); - } - }); - return selected; - } - - return inspect( options.dataTypes[ 0 ] ) || !inspected[ "*" ] && inspect( "*" ); -} - -// A special extend for ajax options -// that takes "flat" options (not to be deep extended) -// Fixes #9887 -function ajaxExtend( target, src ) { - var key, deep, - flatOptions = jQuery.ajaxSettings.flatOptions || {}; - - for ( key in src ) { - if ( src[ key ] !== undefined ) { - ( flatOptions[ key ] ? target : ( deep || (deep = {}) ) )[ key ] = src[ key ]; - } - } - if ( deep ) { - jQuery.extend( true, target, deep ); - } - - return target; -} - -jQuery.fn.load = function( url, params, callback ) { - if ( typeof url !== "string" && _load ) { - return _load.apply( this, arguments ); - } - - var selector, type, response, - self = this, - off = url.indexOf(" "); - - if ( off >= 0 ) { - selector = url.slice( off, url.length ); - url = url.slice( 0, off ); - } - - // If it's a function - if ( jQuery.isFunction( params ) ) { - - // We assume that it's the callback - callback = params; - params = undefined; - - // Otherwise, build a param string - } else if ( params && typeof params === "object" ) { - type = "POST"; - } - - // If we have elements to modify, make the request - if ( self.length > 0 ) { - jQuery.ajax({ - url: url, - - // if "type" variable is undefined, then "GET" method will be used - type: type, - dataType: "html", - data: params - }).done(function( responseText ) { - - // Save response for use in complete callback - response = arguments; - - self.html( selector ? - - // If a selector was specified, locate the right elements in a dummy div - // Exclude scripts to avoid IE 'Permission Denied' errors - jQuery("<div>").append( jQuery.parseHTML( responseText ) ).find( selector ) : - - // Otherwise use the full result - responseText ); - - }).complete( callback && function( jqXHR, status ) { - self.each( callback, response || [ jqXHR.responseText, status, jqXHR ] ); - }); - } - - return this; -}; - -// Attach a bunch of functions for handling common AJAX events -jQuery.each( [ "ajaxStart", "ajaxStop", "ajaxComplete", "ajaxError", "ajaxSuccess", "ajaxSend" ], function( i, type ){ - jQuery.fn[ type ] = function( fn ){ - return this.on( type, fn ); - }; -}); - -jQuery.each( [ "get", "post" ], function( i, method ) { - jQuery[ method ] = function( url, data, callback, type ) { - // shift arguments if data argument was omitted - if ( jQuery.isFunction( data ) ) { - type = type || callback; - callback = data; - data = undefined; - } - - return jQuery.ajax({ - url: url, - type: method, - dataType: type, - data: data, - success: callback - }); - }; -}); - -jQuery.extend({ - - // Counter for holding the number of active queries - active: 0, - - // Last-Modified header cache for next request - lastModified: {}, - etag: {}, - - ajaxSettings: { - url: ajaxLocation, - type: "GET", - isLocal: rlocalProtocol.test( ajaxLocParts[ 1 ] ), - global: true, - processData: true, - async: true, - contentType: "application/x-www-form-urlencoded; charset=UTF-8", - /* - timeout: 0, - data: null, - dataType: null, - username: null, - password: null, - cache: null, - throws: false, - traditional: false, - headers: {}, - */ - - accepts: { - "*": allTypes, - text: "text/plain", - html: "text/html", - xml: "application/xml, text/xml", - json: "application/json, text/javascript" - }, - - contents: { - xml: /xml/, - html: /html/, - json: /json/ - }, - - responseFields: { - xml: "responseXML", - text: "responseText" - }, - - // Data converters - // Keys separate source (or catchall "*") and destination types with a single space - converters: { - - // Convert anything to text - "* text": window.String, - - // Text to html (true = no transformation) - "text html": true, - - // Evaluate text as a json expression - "text json": jQuery.parseJSON, - - // Parse text as xml - "text xml": jQuery.parseXML - }, - - // For options that shouldn't be deep extended: - // you can add your own custom options here if - // and when you create one that shouldn't be - // deep extended (see ajaxExtend) - flatOptions: { - url: true, - context: true - } - }, - - // Creates a full fledged settings object into target - // with both ajaxSettings and settings fields. - // If target is omitted, writes into ajaxSettings. - ajaxSetup: function( target, settings ) { - return settings ? - - // Building a settings object - ajaxExtend( ajaxExtend( target, jQuery.ajaxSettings ), settings ) : - - // Extending ajaxSettings - ajaxExtend( jQuery.ajaxSettings, target ); - }, - - ajaxPrefilter: addToPrefiltersOrTransports( prefilters ), - ajaxTransport: addToPrefiltersOrTransports( transports ), - - // Main method - ajax: function( url, options ) { - - // If url is an object, simulate pre-1.5 signature - if ( typeof url === "object" ) { - options = url; - url = undefined; - } - - // Force options to be an object - options = options || {}; - - var transport, - // URL without anti-cache param - cacheURL, - // Response headers - responseHeadersString, - responseHeaders, - // timeout handle - timeoutTimer, - // Cross-domain detection vars - parts, - // To know if global events are to be dispatched - fireGlobals, - // Loop variable - i, - // Create the final options object - s = jQuery.ajaxSetup( {}, options ), - // Callbacks context - callbackContext = s.context || s, - // Context for global events is callbackContext if it is a DOM node or jQuery collection - globalEventContext = s.context && ( callbackContext.nodeType || callbackContext.jquery ) ? - jQuery( callbackContext ) : - jQuery.event, - // Deferreds - deferred = jQuery.Deferred(), - completeDeferred = jQuery.Callbacks("once memory"), - // Status-dependent callbacks - statusCode = s.statusCode || {}, - // Headers (they are sent all at once) - requestHeaders = {}, - requestHeadersNames = {}, - // The jqXHR state - state = 0, - // Default abort message - strAbort = "canceled", - // Fake xhr - jqXHR = { - readyState: 0, - - // Builds headers hashtable if needed - getResponseHeader: function( key ) { - var match; - if ( state === 2 ) { - if ( !responseHeaders ) { - responseHeaders = {}; - while ( (match = rheaders.exec( responseHeadersString )) ) { - responseHeaders[ match[1].toLowerCase() ] = match[ 2 ]; - } - } - match = responseHeaders[ key.toLowerCase() ]; - } - return match == null ? null : match; - }, - - // Raw string - getAllResponseHeaders: function() { - return state === 2 ? responseHeadersString : null; - }, - - // Caches the header - setRequestHeader: function( name, value ) { - var lname = name.toLowerCase(); - if ( !state ) { - name = requestHeadersNames[ lname ] = requestHeadersNames[ lname ] || name; - requestHeaders[ name ] = value; - } - return this; - }, - - // Overrides response content-type header - overrideMimeType: function( type ) { - if ( !state ) { - s.mimeType = type; - } - return this; - }, - - // Status-dependent callbacks - statusCode: function( map ) { - var code; - if ( map ) { - if ( state < 2 ) { - for ( code in map ) { - // Lazy-add the new callback in a way that preserves old ones - statusCode[ code ] = [ statusCode[ code ], map[ code ] ]; - } - } else { - // Execute the appropriate callbacks - jqXHR.always( map[ jqXHR.status ] ); - } - } - return this; - }, - - // Cancel the request - abort: function( statusText ) { - var finalText = statusText || strAbort; - if ( transport ) { - transport.abort( finalText ); - } - done( 0, finalText ); - return this; - } - }; - - // Attach deferreds - deferred.promise( jqXHR ).complete = completeDeferred.add; - jqXHR.success = jqXHR.done; - jqXHR.error = jqXHR.fail; - - // Remove hash character (#7531: and string promotion) - // Add protocol if not provided (#5866: IE7 issue with protocol-less urls) - // Handle falsy url in the settings object (#10093: consistency with old signature) - // We also use the url parameter if available - s.url = ( ( url || s.url || ajaxLocation ) + "" ).replace( rhash, "" ).replace( rprotocol, ajaxLocParts[ 1 ] + "//" ); - - // Alias method option to type as per ticket #12004 - s.type = options.method || options.type || s.method || s.type; - - // Extract dataTypes list - s.dataTypes = jQuery.trim( s.dataType || "*" ).toLowerCase().match( core_rnotwhite ) || [""]; - - // A cross-domain request is in order when we have a protocol:host:port mismatch - if ( s.crossDomain == null ) { - parts = rurl.exec( s.url.toLowerCase() ); - s.crossDomain = !!( parts && - ( parts[ 1 ] !== ajaxLocParts[ 1 ] || parts[ 2 ] !== ajaxLocParts[ 2 ] || - ( parts[ 3 ] || ( parts[ 1 ] === "http:" ? 80 : 443 ) ) != - ( ajaxLocParts[ 3 ] || ( ajaxLocParts[ 1 ] === "http:" ? 80 : 443 ) ) ) - ); - } - - // Convert data if not already a string - if ( s.data && s.processData && typeof s.data !== "string" ) { - s.data = jQuery.param( s.data, s.traditional ); - } - - // Apply prefilters - inspectPrefiltersOrTransports( prefilters, s, options, jqXHR ); - - // If request was aborted inside a prefilter, stop there - if ( state === 2 ) { - return jqXHR; - } - - // We can fire global events as of now if asked to - fireGlobals = s.global; - - // Watch for a new set of requests - if ( fireGlobals && jQuery.active++ === 0 ) { - jQuery.event.trigger("ajaxStart"); - } - - // Uppercase the type - s.type = s.type.toUpperCase(); - - // Determine if request has content - s.hasContent = !rnoContent.test( s.type ); - - // Save the URL in case we're toying with the If-Modified-Since - // and/or If-None-Match header later on - cacheURL = s.url; - - // More options handling for requests with no content - if ( !s.hasContent ) { - - // If data is available, append data to url - if ( s.data ) { - cacheURL = ( s.url += ( ajax_rquery.test( cacheURL ) ? "&" : "?" ) + s.data ); - // #9682: remove data so that it's not used in an eventual retry - delete s.data; - } - - // Add anti-cache in url if needed - if ( s.cache === false ) { - s.url = rts.test( cacheURL ) ? - - // If there is already a '_' parameter, set its value - cacheURL.replace( rts, "$1_=" + ajax_nonce++ ) : - - // Otherwise add one to the end - cacheURL + ( ajax_rquery.test( cacheURL ) ? "&" : "?" ) + "_=" + ajax_nonce++; - } - } - - // Set the If-Modified-Since and/or If-None-Match header, if in ifModified mode. - if ( s.ifModified ) { - if ( jQuery.lastModified[ cacheURL ] ) { - jqXHR.setRequestHeader( "If-Modified-Since", jQuery.lastModified[ cacheURL ] ); - } - if ( jQuery.etag[ cacheURL ] ) { - jqXHR.setRequestHeader( "If-None-Match", jQuery.etag[ cacheURL ] ); - } - } - - // Set the correct header, if data is being sent - if ( s.data && s.hasContent && s.contentType !== false || options.contentType ) { - jqXHR.setRequestHeader( "Content-Type", s.contentType ); - } - - // Set the Accepts header for the server, depending on the dataType - jqXHR.setRequestHeader( - "Accept", - s.dataTypes[ 0 ] && s.accepts[ s.dataTypes[0] ] ? - s.accepts[ s.dataTypes[0] ] + ( s.dataTypes[ 0 ] !== "*" ? ", " + allTypes + "; q=0.01" : "" ) : - s.accepts[ "*" ] - ); - - // Check for headers option - for ( i in s.headers ) { - jqXHR.setRequestHeader( i, s.headers[ i ] ); - } - - // Allow custom headers/mimetypes and early abort - if ( s.beforeSend && ( s.beforeSend.call( callbackContext, jqXHR, s ) === false || state === 2 ) ) { - // Abort if not done already and return - return jqXHR.abort(); - } - - // aborting is no longer a cancellation - strAbort = "abort"; - - // Install callbacks on deferreds - for ( i in { success: 1, error: 1, complete: 1 } ) { - jqXHR[ i ]( s[ i ] ); - } - - // Get transport - transport = inspectPrefiltersOrTransports( transports, s, options, jqXHR ); - - // If no transport, we auto-abort - if ( !transport ) { - done( -1, "No Transport" ); - } else { - jqXHR.readyState = 1; - - // Send global event - if ( fireGlobals ) { - globalEventContext.trigger( "ajaxSend", [ jqXHR, s ] ); - } - // Timeout - if ( s.async && s.timeout > 0 ) { - timeoutTimer = setTimeout(function() { - jqXHR.abort("timeout"); - }, s.timeout ); - } - - try { - state = 1; - transport.send( requestHeaders, done ); - } catch ( e ) { - // Propagate exception as error if not done - if ( state < 2 ) { - done( -1, e ); - // Simply rethrow otherwise - } else { - throw e; - } - } - } - - // Callback for when everything is done - function done( status, nativeStatusText, responses, headers ) { - var isSuccess, success, error, response, modified, - statusText = nativeStatusText; - - // Called once - if ( state === 2 ) { - return; - } - - // State is "done" now - state = 2; - - // Clear timeout if it exists - if ( timeoutTimer ) { - clearTimeout( timeoutTimer ); - } - - // Dereference transport for early garbage collection - // (no matter how long the jqXHR object will be used) - transport = undefined; - - // Cache response headers - responseHeadersString = headers || ""; - - // Set readyState - jqXHR.readyState = status > 0 ? 4 : 0; - - // Get response data - if ( responses ) { - response = ajaxHandleResponses( s, jqXHR, responses ); - } - - // If successful, handle type chaining - if ( status >= 200 && status < 300 || status === 304 ) { - - // Set the If-Modified-Since and/or If-None-Match header, if in ifModified mode. - if ( s.ifModified ) { - modified = jqXHR.getResponseHeader("Last-Modified"); - if ( modified ) { - jQuery.lastModified[ cacheURL ] = modified; - } - modified = jqXHR.getResponseHeader("etag"); - if ( modified ) { - jQuery.etag[ cacheURL ] = modified; - } - } - - // If not modified - if ( status === 304 ) { - isSuccess = true; - statusText = "notmodified"; - - // If we have data - } else { - isSuccess = ajaxConvert( s, response ); - statusText = isSuccess.state; - success = isSuccess.data; - error = isSuccess.error; - isSuccess = !error; - } - } else { - // We extract error from statusText - // then normalize statusText and status for non-aborts - error = statusText; - if ( status || !statusText ) { - statusText = "error"; - if ( status < 0 ) { - status = 0; - } - } - } - - // Set data for the fake xhr object - jqXHR.status = status; - jqXHR.statusText = ( nativeStatusText || statusText ) + ""; - - // Success/Error - if ( isSuccess ) { - deferred.resolveWith( callbackContext, [ success, statusText, jqXHR ] ); - } else { - deferred.rejectWith( callbackContext, [ jqXHR, statusText, error ] ); - } - - // Status-dependent callbacks - jqXHR.statusCode( statusCode ); - statusCode = undefined; - - if ( fireGlobals ) { - globalEventContext.trigger( isSuccess ? "ajaxSuccess" : "ajaxError", - [ jqXHR, s, isSuccess ? success : error ] ); - } - - // Complete - completeDeferred.fireWith( callbackContext, [ jqXHR, statusText ] ); - - if ( fireGlobals ) { - globalEventContext.trigger( "ajaxComplete", [ jqXHR, s ] ); - // Handle the global AJAX counter - if ( !( --jQuery.active ) ) { - jQuery.event.trigger("ajaxStop"); - } - } - } - - return jqXHR; - }, - - getScript: function( url, callback ) { - return jQuery.get( url, undefined, callback, "script" ); - }, - - getJSON: function( url, data, callback ) { - return jQuery.get( url, data, callback, "json" ); - } -}); - -/* Handles responses to an ajax request: - * - sets all responseXXX fields accordingly - * - finds the right dataType (mediates between content-type and expected dataType) - * - returns the corresponding response - */ -function ajaxHandleResponses( s, jqXHR, responses ) { - - var ct, type, finalDataType, firstDataType, - contents = s.contents, - dataTypes = s.dataTypes, - responseFields = s.responseFields; - - // Fill responseXXX fields - for ( type in responseFields ) { - if ( type in responses ) { - jqXHR[ responseFields[type] ] = responses[ type ]; - } - } - - // Remove auto dataType and get content-type in the process - while( dataTypes[ 0 ] === "*" ) { - dataTypes.shift(); - if ( ct === undefined ) { - ct = s.mimeType || jqXHR.getResponseHeader("Content-Type"); - } - } - - // Check if we're dealing with a known content-type - if ( ct ) { - for ( type in contents ) { - if ( contents[ type ] && contents[ type ].test( ct ) ) { - dataTypes.unshift( type ); - break; - } - } - } - - // Check to see if we have a response for the expected dataType - if ( dataTypes[ 0 ] in responses ) { - finalDataType = dataTypes[ 0 ]; - } else { - // Try convertible dataTypes - for ( type in responses ) { - if ( !dataTypes[ 0 ] || s.converters[ type + " " + dataTypes[0] ] ) { - finalDataType = type; - break; - } - if ( !firstDataType ) { - firstDataType = type; - } - } - // Or just use first one - finalDataType = finalDataType || firstDataType; - } - - // If we found a dataType - // We add the dataType to the list if needed - // and return the corresponding response - if ( finalDataType ) { - if ( finalDataType !== dataTypes[ 0 ] ) { - dataTypes.unshift( finalDataType ); - } - return responses[ finalDataType ]; - } -} - -// Chain conversions given the request and the original response -function ajaxConvert( s, response ) { - - var conv, conv2, current, tmp, - converters = {}, - i = 0, - // Work with a copy of dataTypes in case we need to modify it for conversion - dataTypes = s.dataTypes.slice(), - prev = dataTypes[ 0 ]; - - // Apply the dataFilter if provided - if ( s.dataFilter ) { - response = s.dataFilter( response, s.dataType ); - } - - // Create converters map with lowercased keys - if ( dataTypes[ 1 ] ) { - for ( conv in s.converters ) { - converters[ conv.toLowerCase() ] = s.converters[ conv ]; - } - } - - // Convert to each sequential dataType, tolerating list modification - for ( ; (current = dataTypes[++i]); ) { - - // There's only work to do if current dataType is non-auto - if ( current !== "*" ) { - - // Convert response if prev dataType is non-auto and differs from current - if ( prev !== "*" && prev !== current ) { - - // Seek a direct converter - conv = converters[ prev + " " + current ] || converters[ "* " + current ]; - - // If none found, seek a pair - if ( !conv ) { - for ( conv2 in converters ) { - - // If conv2 outputs current - tmp = conv2.split(" "); - if ( tmp[ 1 ] === current ) { - - // If prev can be converted to accepted input - conv = converters[ prev + " " + tmp[ 0 ] ] || - converters[ "* " + tmp[ 0 ] ]; - if ( conv ) { - // Condense equivalence converters - if ( conv === true ) { - conv = converters[ conv2 ]; - - // Otherwise, insert the intermediate dataType - } else if ( converters[ conv2 ] !== true ) { - current = tmp[ 0 ]; - dataTypes.splice( i--, 0, current ); - } - - break; - } - } - } - } - - // Apply converter (if not an equivalence) - if ( conv !== true ) { - - // Unless errors are allowed to bubble, catch and return them - if ( conv && s["throws"] ) { - response = conv( response ); - } else { - try { - response = conv( response ); - } catch ( e ) { - return { state: "parsererror", error: conv ? e : "No conversion from " + prev + " to " + current }; - } - } - } - } - - // Update prev for next iteration - prev = current; - } - } - - return { state: "success", data: response }; -} -// Install script dataType -jQuery.ajaxSetup({ - accepts: { - script: "text/javascript, application/javascript, application/ecmascript, application/x-ecmascript" - }, - contents: { - script: /(?:java|ecma)script/ - }, - converters: { - "text script": function( text ) { - jQuery.globalEval( text ); - return text; - } - } -}); - -// Handle cache's special case and global -jQuery.ajaxPrefilter( "script", function( s ) { - if ( s.cache === undefined ) { - s.cache = false; - } - if ( s.crossDomain ) { - s.type = "GET"; - s.global = false; - } -}); - -// Bind script tag hack transport -jQuery.ajaxTransport( "script", function(s) { - - // This transport only deals with cross domain requests - if ( s.crossDomain ) { - - var script, - head = document.head || jQuery("head")[0] || document.documentElement; - - return { - - send: function( _, callback ) { - - script = document.createElement("script"); - - script.async = true; - - if ( s.scriptCharset ) { - script.charset = s.scriptCharset; - } - - script.src = s.url; - - // Attach handlers for all browsers - script.onload = script.onreadystatechange = function( _, isAbort ) { - - if ( isAbort || !script.readyState || /loaded|complete/.test( script.readyState ) ) { - - // Handle memory leak in IE - script.onload = script.onreadystatechange = null; - - // Remove the script - if ( script.parentNode ) { - script.parentNode.removeChild( script ); - } - - // Dereference the script - script = null; - - // Callback if not abort - if ( !isAbort ) { - callback( 200, "success" ); - } - } - }; - - // Circumvent IE6 bugs with base elements (#2709 and #4378) by prepending - // Use native DOM manipulation to avoid our domManip AJAX trickery - head.insertBefore( script, head.firstChild ); - }, - - abort: function() { - if ( script ) { - script.onload( undefined, true ); - } - } - }; - } -}); -var oldCallbacks = [], - rjsonp = /(=)\?(?=&|$)|\?\?/; - -// Default jsonp settings -jQuery.ajaxSetup({ - jsonp: "callback", - jsonpCallback: function() { - var callback = oldCallbacks.pop() || ( jQuery.expando + "_" + ( ajax_nonce++ ) ); - this[ callback ] = true; - return callback; - } -}); - -// Detect, normalize options and install callbacks for jsonp requests -jQuery.ajaxPrefilter( "json jsonp", function( s, originalSettings, jqXHR ) { - - var callbackName, overwritten, responseContainer, - jsonProp = s.jsonp !== false && ( rjsonp.test( s.url ) ? - "url" : - typeof s.data === "string" && !( s.contentType || "" ).indexOf("application/x-www-form-urlencoded") && rjsonp.test( s.data ) && "data" - ); - - // Handle iff the expected data type is "jsonp" or we have a parameter to set - if ( jsonProp || s.dataTypes[ 0 ] === "jsonp" ) { - - // Get callback name, remembering preexisting value associated with it - callbackName = s.jsonpCallback = jQuery.isFunction( s.jsonpCallback ) ? - s.jsonpCallback() : - s.jsonpCallback; - - // Insert callback into url or form data - if ( jsonProp ) { - s[ jsonProp ] = s[ jsonProp ].replace( rjsonp, "$1" + callbackName ); - } else if ( s.jsonp !== false ) { - s.url += ( ajax_rquery.test( s.url ) ? "&" : "?" ) + s.jsonp + "=" + callbackName; - } - - // Use data converter to retrieve json after script execution - s.converters["script json"] = function() { - if ( !responseContainer ) { - jQuery.error( callbackName + " was not called" ); - } - return responseContainer[ 0 ]; - }; - - // force json dataType - s.dataTypes[ 0 ] = "json"; - - // Install callback - overwritten = window[ callbackName ]; - window[ callbackName ] = function() { - responseContainer = arguments; - }; - - // Clean-up function (fires after converters) - jqXHR.always(function() { - // Restore preexisting value - window[ callbackName ] = overwritten; - - // Save back as free - if ( s[ callbackName ] ) { - // make sure that re-using the options doesn't screw things around - s.jsonpCallback = originalSettings.jsonpCallback; - - // save the callback name for future use - oldCallbacks.push( callbackName ); - } - - // Call if it was a function and we have a response - if ( responseContainer && jQuery.isFunction( overwritten ) ) { - overwritten( responseContainer[ 0 ] ); - } - - responseContainer = overwritten = undefined; - }); - - // Delegate to script - return "script"; - } -}); -var xhrCallbacks, xhrSupported, - xhrId = 0, - // #5280: Internet Explorer will keep connections alive if we don't abort on unload - xhrOnUnloadAbort = window.ActiveXObject && function() { - // Abort all pending requests - var key; - for ( key in xhrCallbacks ) { - xhrCallbacks[ key ]( undefined, true ); - } - }; - -// Functions to create xhrs -function createStandardXHR() { - try { - return new window.XMLHttpRequest(); - } catch( e ) {} -} - -function createActiveXHR() { - try { - return new window.ActiveXObject("Microsoft.XMLHTTP"); - } catch( e ) {} -} - -// Create the request object -// (This is still attached to ajaxSettings for backward compatibility) -jQuery.ajaxSettings.xhr = window.ActiveXObject ? - /* Microsoft failed to properly - * implement the XMLHttpRequest in IE7 (can't request local files), - * so we use the ActiveXObject when it is available - * Additionally XMLHttpRequest can be disabled in IE7/IE8 so - * we need a fallback. - */ - function() { - return !this.isLocal && createStandardXHR() || createActiveXHR(); - } : - // For all other browsers, use the standard XMLHttpRequest object - createStandardXHR; - -// Determine support properties -xhrSupported = jQuery.ajaxSettings.xhr(); -jQuery.support.cors = !!xhrSupported && ( "withCredentials" in xhrSupported ); -xhrSupported = jQuery.support.ajax = !!xhrSupported; - -// Create transport if the browser can provide an xhr -if ( xhrSupported ) { - - jQuery.ajaxTransport(function( s ) { - // Cross domain only allowed if supported through XMLHttpRequest - if ( !s.crossDomain || jQuery.support.cors ) { - - var callback; - - return { - send: function( headers, complete ) { - - // Get a new xhr - var handle, i, - xhr = s.xhr(); - - // Open the socket - // Passing null username, generates a login popup on Opera (#2865) - if ( s.username ) { - xhr.open( s.type, s.url, s.async, s.username, s.password ); - } else { - xhr.open( s.type, s.url, s.async ); - } - - // Apply custom fields if provided - if ( s.xhrFields ) { - for ( i in s.xhrFields ) { - xhr[ i ] = s.xhrFields[ i ]; - } - } - - // Override mime type if needed - if ( s.mimeType && xhr.overrideMimeType ) { - xhr.overrideMimeType( s.mimeType ); - } - - // X-Requested-With header - // For cross-domain requests, seeing as conditions for a preflight are - // akin to a jigsaw puzzle, we simply never set it to be sure. - // (it can always be set on a per-request basis or even using ajaxSetup) - // For same-domain requests, won't change header if already provided. - if ( !s.crossDomain && !headers["X-Requested-With"] ) { - headers["X-Requested-With"] = "XMLHttpRequest"; - } - - // Need an extra try/catch for cross domain requests in Firefox 3 - try { - for ( i in headers ) { - xhr.setRequestHeader( i, headers[ i ] ); - } - } catch( err ) {} - - // Do send the request - // This may raise an exception which is actually - // handled in jQuery.ajax (so no try/catch here) - xhr.send( ( s.hasContent && s.data ) || null ); - - // Listener - callback = function( _, isAbort ) { - - var status, - statusText, - responseHeaders, - responses, - xml; - - // Firefox throws exceptions when accessing properties - // of an xhr when a network error occurred - // http://helpful.knobs-dials.com/index.php/Component_returned_failure_code:_0x80040111_(NS_ERROR_NOT_AVAILABLE) - try { - - // Was never called and is aborted or complete - if ( callback && ( isAbort || xhr.readyState === 4 ) ) { - - // Only called once - callback = undefined; - - // Do not keep as active anymore - if ( handle ) { - xhr.onreadystatechange = jQuery.noop; - if ( xhrOnUnloadAbort ) { - delete xhrCallbacks[ handle ]; - } - } - - // If it's an abort - if ( isAbort ) { - // Abort it manually if needed - if ( xhr.readyState !== 4 ) { - xhr.abort(); - } - } else { - responses = {}; - status = xhr.status; - xml = xhr.responseXML; - responseHeaders = xhr.getAllResponseHeaders(); - - // Construct response list - if ( xml && xml.documentElement /* #4958 */ ) { - responses.xml = xml; - } - - // When requesting binary data, IE6-9 will throw an exception - // on any attempt to access responseText (#11426) - if ( typeof xhr.responseText === "string" ) { - responses.text = xhr.responseText; - } - - // Firefox throws an exception when accessing - // statusText for faulty cross-domain requests - try { - statusText = xhr.statusText; - } catch( e ) { - // We normalize with Webkit giving an empty statusText - statusText = ""; - } - - // Filter status for non standard behaviors - - // If the request is local and we have data: assume a success - // (success with no data won't get notified, that's the best we - // can do given current implementations) - if ( !status && s.isLocal && !s.crossDomain ) { - status = responses.text ? 200 : 404; - // IE - #1450: sometimes returns 1223 when it should be 204 - } else if ( status === 1223 ) { - status = 204; - } - } - } - } catch( firefoxAccessException ) { - if ( !isAbort ) { - complete( -1, firefoxAccessException ); - } - } - - // Call complete if needed - if ( responses ) { - complete( status, statusText, responses, responseHeaders ); - } - }; - - if ( !s.async ) { - // if we're in sync mode we fire the callback - callback(); - } else if ( xhr.readyState === 4 ) { - // (IE6 & IE7) if it's in cache and has been - // retrieved directly we need to fire the callback - setTimeout( callback ); - } else { - handle = ++xhrId; - if ( xhrOnUnloadAbort ) { - // Create the active xhrs callbacks list if needed - // and attach the unload handler - if ( !xhrCallbacks ) { - xhrCallbacks = {}; - jQuery( window ).unload( xhrOnUnloadAbort ); - } - // Add to list of active xhrs callbacks - xhrCallbacks[ handle ] = callback; - } - xhr.onreadystatechange = callback; - } - }, - - abort: function() { - if ( callback ) { - callback( undefined, true ); - } - } - }; - } - }); -} -var fxNow, timerId, - rfxtypes = /^(?:toggle|show|hide)$/, - rfxnum = new RegExp( "^(?:([+-])=|)(" + core_pnum + ")([a-z%]*)$", "i" ), - rrun = /queueHooks$/, - animationPrefilters = [ defaultPrefilter ], - tweeners = { - "*": [function( prop, value ) { - var end, unit, - tween = this.createTween( prop, value ), - parts = rfxnum.exec( value ), - target = tween.cur(), - start = +target || 0, - scale = 1, - maxIterations = 20; - - if ( parts ) { - end = +parts[2]; - unit = parts[3] || ( jQuery.cssNumber[ prop ] ? "" : "px" ); - - // We need to compute starting value - if ( unit !== "px" && start ) { - // Iteratively approximate from a nonzero starting point - // Prefer the current property, because this process will be trivial if it uses the same units - // Fallback to end or a simple constant - start = jQuery.css( tween.elem, prop, true ) || end || 1; - - do { - // If previous iteration zeroed out, double until we get *something* - // Use a string for doubling factor so we don't accidentally see scale as unchanged below - scale = scale || ".5"; - - // Adjust and apply - start = start / scale; - jQuery.style( tween.elem, prop, start + unit ); - - // Update scale, tolerating zero or NaN from tween.cur() - // And breaking the loop if scale is unchanged or perfect, or if we've just had enough - } while ( scale !== (scale = tween.cur() / target) && scale !== 1 && --maxIterations ); - } - - tween.unit = unit; - tween.start = start; - // If a +=/-= token was provided, we're doing a relative animation - tween.end = parts[1] ? start + ( parts[1] + 1 ) * end : end; - } - return tween; - }] - }; - -// Animations created synchronously will run synchronously -function createFxNow() { - setTimeout(function() { - fxNow = undefined; - }); - return ( fxNow = jQuery.now() ); -} - -function createTweens( animation, props ) { - jQuery.each( props, function( prop, value ) { - var collection = ( tweeners[ prop ] || [] ).concat( tweeners[ "*" ] ), - index = 0, - length = collection.length; - for ( ; index < length; index++ ) { - if ( collection[ index ].call( animation, prop, value ) ) { - - // we're done with this property - return; - } - } - }); -} - -function Animation( elem, properties, options ) { - var result, - stopped, - index = 0, - length = animationPrefilters.length, - deferred = jQuery.Deferred().always( function() { - // don't match elem in the :animated selector - delete tick.elem; - }), - tick = function() { - if ( stopped ) { - return false; - } - var currentTime = fxNow || createFxNow(), - remaining = Math.max( 0, animation.startTime + animation.duration - currentTime ), - // archaic crash bug won't allow us to use 1 - ( 0.5 || 0 ) (#12497) - temp = remaining / animation.duration || 0, - percent = 1 - temp, - index = 0, - length = animation.tweens.length; - - for ( ; index < length ; index++ ) { - animation.tweens[ index ].run( percent ); - } - - deferred.notifyWith( elem, [ animation, percent, remaining ]); - - if ( percent < 1 && length ) { - return remaining; - } else { - deferred.resolveWith( elem, [ animation ] ); - return false; - } - }, - animation = deferred.promise({ - elem: elem, - props: jQuery.extend( {}, properties ), - opts: jQuery.extend( true, { specialEasing: {} }, options ), - originalProperties: properties, - originalOptions: options, - startTime: fxNow || createFxNow(), - duration: options.duration, - tweens: [], - createTween: function( prop, end ) { - var tween = jQuery.Tween( elem, animation.opts, prop, end, - animation.opts.specialEasing[ prop ] || animation.opts.easing ); - animation.tweens.push( tween ); - return tween; - }, - stop: function( gotoEnd ) { - var index = 0, - // if we are going to the end, we want to run all the tweens - // otherwise we skip this part - length = gotoEnd ? animation.tweens.length : 0; - if ( stopped ) { - return this; - } - stopped = true; - for ( ; index < length ; index++ ) { - animation.tweens[ index ].run( 1 ); - } - - // resolve when we played the last frame - // otherwise, reject - if ( gotoEnd ) { - deferred.resolveWith( elem, [ animation, gotoEnd ] ); - } else { - deferred.rejectWith( elem, [ animation, gotoEnd ] ); - } - return this; - } - }), - props = animation.props; - - propFilter( props, animation.opts.specialEasing ); - - for ( ; index < length ; index++ ) { - result = animationPrefilters[ index ].call( animation, elem, props, animation.opts ); - if ( result ) { - return result; - } - } - - createTweens( animation, props ); - - if ( jQuery.isFunction( animation.opts.start ) ) { - animation.opts.start.call( elem, animation ); - } - - jQuery.fx.timer( - jQuery.extend( tick, { - elem: elem, - anim: animation, - queue: animation.opts.queue - }) - ); - - // attach callbacks from options - return animation.progress( animation.opts.progress ) - .done( animation.opts.done, animation.opts.complete ) - .fail( animation.opts.fail ) - .always( animation.opts.always ); -} - -function propFilter( props, specialEasing ) { - var index, name, easing, value, hooks; - - // camelCase, specialEasing and expand cssHook pass - for ( index in props ) { - name = jQuery.camelCase( index ); - easing = specialEasing[ name ]; - value = props[ index ]; - if ( jQuery.isArray( value ) ) { - easing = value[ 1 ]; - value = props[ index ] = value[ 0 ]; - } - - if ( index !== name ) { - props[ name ] = value; - delete props[ index ]; - } - - hooks = jQuery.cssHooks[ name ]; - if ( hooks && "expand" in hooks ) { - value = hooks.expand( value ); - delete props[ name ]; - - // not quite $.extend, this wont overwrite keys already present. - // also - reusing 'index' from above because we have the correct "name" - for ( index in value ) { - if ( !( index in props ) ) { - props[ index ] = value[ index ]; - specialEasing[ index ] = easing; - } - } - } else { - specialEasing[ name ] = easing; - } - } -} - -jQuery.Animation = jQuery.extend( Animation, { - - tweener: function( props, callback ) { - if ( jQuery.isFunction( props ) ) { - callback = props; - props = [ "*" ]; - } else { - props = props.split(" "); - } - - var prop, - index = 0, - length = props.length; - - for ( ; index < length ; index++ ) { - prop = props[ index ]; - tweeners[ prop ] = tweeners[ prop ] || []; - tweeners[ prop ].unshift( callback ); - } - }, - - prefilter: function( callback, prepend ) { - if ( prepend ) { - animationPrefilters.unshift( callback ); - } else { - animationPrefilters.push( callback ); - } - } -}); - -function defaultPrefilter( elem, props, opts ) { - /*jshint validthis:true */ - var index, prop, value, length, dataShow, toggle, tween, hooks, oldfire, - anim = this, - style = elem.style, - orig = {}, - handled = [], - hidden = elem.nodeType && isHidden( elem ); - - // handle queue: false promises - if ( !opts.queue ) { - hooks = jQuery._queueHooks( elem, "fx" ); - if ( hooks.unqueued == null ) { - hooks.unqueued = 0; - oldfire = hooks.empty.fire; - hooks.empty.fire = function() { - if ( !hooks.unqueued ) { - oldfire(); - } - }; - } - hooks.unqueued++; - - anim.always(function() { - // doing this makes sure that the complete handler will be called - // before this completes - anim.always(function() { - hooks.unqueued--; - if ( !jQuery.queue( elem, "fx" ).length ) { - hooks.empty.fire(); - } - }); - }); - } - - // height/width overflow pass - if ( elem.nodeType === 1 && ( "height" in props || "width" in props ) ) { - // Make sure that nothing sneaks out - // Record all 3 overflow attributes because IE does not - // change the overflow attribute when overflowX and - // overflowY are set to the same value - opts.overflow = [ style.overflow, style.overflowX, style.overflowY ]; - - // Set display property to inline-block for height/width - // animations on inline elements that are having width/height animated - if ( jQuery.css( elem, "display" ) === "inline" && - jQuery.css( elem, "float" ) === "none" ) { - - // inline-level elements accept inline-block; - // block-level elements need to be inline with layout - if ( !jQuery.support.inlineBlockNeedsLayout || css_defaultDisplay( elem.nodeName ) === "inline" ) { - style.display = "inline-block"; - - } else { - style.zoom = 1; - } - } - } - - if ( opts.overflow ) { - style.overflow = "hidden"; - if ( !jQuery.support.shrinkWrapBlocks ) { - anim.done(function() { - style.overflow = opts.overflow[ 0 ]; - style.overflowX = opts.overflow[ 1 ]; - style.overflowY = opts.overflow[ 2 ]; - }); - } - } - - - // show/hide pass - for ( index in props ) { - value = props[ index ]; - if ( rfxtypes.exec( value ) ) { - delete props[ index ]; - toggle = toggle || value === "toggle"; - if ( value === ( hidden ? "hide" : "show" ) ) { - continue; - } - handled.push( index ); - } - } - - length = handled.length; - if ( length ) { - dataShow = jQuery._data( elem, "fxshow" ) || jQuery._data( elem, "fxshow", {} ); - if ( "hidden" in dataShow ) { - hidden = dataShow.hidden; - } - - // store state if its toggle - enables .stop().toggle() to "reverse" - if ( toggle ) { - dataShow.hidden = !hidden; - } - if ( hidden ) { - jQuery( elem ).show(); - } else { - anim.done(function() { - jQuery( elem ).hide(); - }); - } - anim.done(function() { - var prop; - jQuery._removeData( elem, "fxshow" ); - for ( prop in orig ) { - jQuery.style( elem, prop, orig[ prop ] ); - } - }); - for ( index = 0 ; index < length ; index++ ) { - prop = handled[ index ]; - tween = anim.createTween( prop, hidden ? dataShow[ prop ] : 0 ); - orig[ prop ] = dataShow[ prop ] || jQuery.style( elem, prop ); - - if ( !( prop in dataShow ) ) { - dataShow[ prop ] = tween.start; - if ( hidden ) { - tween.end = tween.start; - tween.start = prop === "width" || prop === "height" ? 1 : 0; - } - } - } - } -} - -function Tween( elem, options, prop, end, easing ) { - return new Tween.prototype.init( elem, options, prop, end, easing ); -} -jQuery.Tween = Tween; - -Tween.prototype = { - constructor: Tween, - init: function( elem, options, prop, end, easing, unit ) { - this.elem = elem; - this.prop = prop; - this.easing = easing || "swing"; - this.options = options; - this.start = this.now = this.cur(); - this.end = end; - this.unit = unit || ( jQuery.cssNumber[ prop ] ? "" : "px" ); - }, - cur: function() { - var hooks = Tween.propHooks[ this.prop ]; - - return hooks && hooks.get ? - hooks.get( this ) : - Tween.propHooks._default.get( this ); - }, - run: function( percent ) { - var eased, - hooks = Tween.propHooks[ this.prop ]; - - if ( this.options.duration ) { - this.pos = eased = jQuery.easing[ this.easing ]( - percent, this.options.duration * percent, 0, 1, this.options.duration - ); - } else { - this.pos = eased = percent; - } - this.now = ( this.end - this.start ) * eased + this.start; - - if ( this.options.step ) { - this.options.step.call( this.elem, this.now, this ); - } - - if ( hooks && hooks.set ) { - hooks.set( this ); - } else { - Tween.propHooks._default.set( this ); - } - return this; - } -}; - -Tween.prototype.init.prototype = Tween.prototype; - -Tween.propHooks = { - _default: { - get: function( tween ) { - var result; - - if ( tween.elem[ tween.prop ] != null && - (!tween.elem.style || tween.elem.style[ tween.prop ] == null) ) { - return tween.elem[ tween.prop ]; - } - - // passing a non empty string as a 3rd parameter to .css will automatically - // attempt a parseFloat and fallback to a string if the parse fails - // so, simple values such as "10px" are parsed to Float. - // complex values such as "rotate(1rad)" are returned as is. - result = jQuery.css( tween.elem, tween.prop, "auto" ); - // Empty strings, null, undefined and "auto" are converted to 0. - return !result || result === "auto" ? 0 : result; - }, - set: function( tween ) { - // use step hook for back compat - use cssHook if its there - use .style if its - // available and use plain properties where available - if ( jQuery.fx.step[ tween.prop ] ) { - jQuery.fx.step[ tween.prop ]( tween ); - } else if ( tween.elem.style && ( tween.elem.style[ jQuery.cssProps[ tween.prop ] ] != null || jQuery.cssHooks[ tween.prop ] ) ) { - jQuery.style( tween.elem, tween.prop, tween.now + tween.unit ); - } else { - tween.elem[ tween.prop ] = tween.now; - } - } - } -}; - -// Remove in 2.0 - this supports IE8's panic based approach -// to setting things on disconnected nodes - -Tween.propHooks.scrollTop = Tween.propHooks.scrollLeft = { - set: function( tween ) { - if ( tween.elem.nodeType && tween.elem.parentNode ) { - tween.elem[ tween.prop ] = tween.now; - } - } -}; - -jQuery.each([ "toggle", "show", "hide" ], function( i, name ) { - var cssFn = jQuery.fn[ name ]; - jQuery.fn[ name ] = function( speed, easing, callback ) { - return speed == null || typeof speed === "boolean" ? - cssFn.apply( this, arguments ) : - this.animate( genFx( name, true ), speed, easing, callback ); - }; -}); - -jQuery.fn.extend({ - fadeTo: function( speed, to, easing, callback ) { - - // show any hidden elements after setting opacity to 0 - return this.filter( isHidden ).css( "opacity", 0 ).show() - - // animate to the value specified - .end().animate({ opacity: to }, speed, easing, callback ); - }, - animate: function( prop, speed, easing, callback ) { - var empty = jQuery.isEmptyObject( prop ), - optall = jQuery.speed( speed, easing, callback ), - doAnimation = function() { - // Operate on a copy of prop so per-property easing won't be lost - var anim = Animation( this, jQuery.extend( {}, prop ), optall ); - doAnimation.finish = function() { - anim.stop( true ); - }; - // Empty animations, or finishing resolves immediately - if ( empty || jQuery._data( this, "finish" ) ) { - anim.stop( true ); - } - }; - doAnimation.finish = doAnimation; - - return empty || optall.queue === false ? - this.each( doAnimation ) : - this.queue( optall.queue, doAnimation ); - }, - stop: function( type, clearQueue, gotoEnd ) { - var stopQueue = function( hooks ) { - var stop = hooks.stop; - delete hooks.stop; - stop( gotoEnd ); - }; - - if ( typeof type !== "string" ) { - gotoEnd = clearQueue; - clearQueue = type; - type = undefined; - } - if ( clearQueue && type !== false ) { - this.queue( type || "fx", [] ); - } - - return this.each(function() { - var dequeue = true, - index = type != null && type + "queueHooks", - timers = jQuery.timers, - data = jQuery._data( this ); - - if ( index ) { - if ( data[ index ] && data[ index ].stop ) { - stopQueue( data[ index ] ); - } - } else { - for ( index in data ) { - if ( data[ index ] && data[ index ].stop && rrun.test( index ) ) { - stopQueue( data[ index ] ); - } - } - } - - for ( index = timers.length; index--; ) { - if ( timers[ index ].elem === this && (type == null || timers[ index ].queue === type) ) { - timers[ index ].anim.stop( gotoEnd ); - dequeue = false; - timers.splice( index, 1 ); - } - } - - // start the next in the queue if the last step wasn't forced - // timers currently will call their complete callbacks, which will dequeue - // but only if they were gotoEnd - if ( dequeue || !gotoEnd ) { - jQuery.dequeue( this, type ); - } - }); - }, - finish: function( type ) { - if ( type !== false ) { - type = type || "fx"; - } - return this.each(function() { - var index, - data = jQuery._data( this ), - queue = data[ type + "queue" ], - hooks = data[ type + "queueHooks" ], - timers = jQuery.timers, - length = queue ? queue.length : 0; - - // enable finishing flag on private data - data.finish = true; - - // empty the queue first - jQuery.queue( this, type, [] ); - - if ( hooks && hooks.cur && hooks.cur.finish ) { - hooks.cur.finish.call( this ); - } - - // look for any active animations, and finish them - for ( index = timers.length; index--; ) { - if ( timers[ index ].elem === this && timers[ index ].queue === type ) { - timers[ index ].anim.stop( true ); - timers.splice( index, 1 ); - } - } - - // look for any animations in the old queue and finish them - for ( index = 0; index < length; index++ ) { - if ( queue[ index ] && queue[ index ].finish ) { - queue[ index ].finish.call( this ); - } - } - - // turn off finishing flag - delete data.finish; - }); - } -}); - -// Generate parameters to create a standard animation -function genFx( type, includeWidth ) { - var which, - attrs = { height: type }, - i = 0; - - // if we include width, step value is 1 to do all cssExpand values, - // if we don't include width, step value is 2 to skip over Left and Right - includeWidth = includeWidth? 1 : 0; - for( ; i < 4 ; i += 2 - includeWidth ) { - which = cssExpand[ i ]; - attrs[ "margin" + which ] = attrs[ "padding" + which ] = type; - } - - if ( includeWidth ) { - attrs.opacity = attrs.width = type; - } - - return attrs; -} - -// Generate shortcuts for custom animations -jQuery.each({ - slideDown: genFx("show"), - slideUp: genFx("hide"), - slideToggle: genFx("toggle"), - fadeIn: { opacity: "show" }, - fadeOut: { opacity: "hide" }, - fadeToggle: { opacity: "toggle" } -}, function( name, props ) { - jQuery.fn[ name ] = function( speed, easing, callback ) { - return this.animate( props, speed, easing, callback ); - }; -}); - -jQuery.speed = function( speed, easing, fn ) { - var opt = speed && typeof speed === "object" ? jQuery.extend( {}, speed ) : { - complete: fn || !fn && easing || - jQuery.isFunction( speed ) && speed, - duration: speed, - easing: fn && easing || easing && !jQuery.isFunction( easing ) && easing - }; - - opt.duration = jQuery.fx.off ? 0 : typeof opt.duration === "number" ? opt.duration : - opt.duration in jQuery.fx.speeds ? jQuery.fx.speeds[ opt.duration ] : jQuery.fx.speeds._default; - - // normalize opt.queue - true/undefined/null -> "fx" - if ( opt.queue == null || opt.queue === true ) { - opt.queue = "fx"; - } - - // Queueing - opt.old = opt.complete; - - opt.complete = function() { - if ( jQuery.isFunction( opt.old ) ) { - opt.old.call( this ); - } - - if ( opt.queue ) { - jQuery.dequeue( this, opt.queue ); - } - }; - - return opt; -}; - -jQuery.easing = { - linear: function( p ) { - return p; - }, - swing: function( p ) { - return 0.5 - Math.cos( p*Math.PI ) / 2; - } -}; - -jQuery.timers = []; -jQuery.fx = Tween.prototype.init; -jQuery.fx.tick = function() { - var timer, - timers = jQuery.timers, - i = 0; - - fxNow = jQuery.now(); - - for ( ; i < timers.length; i++ ) { - timer = timers[ i ]; - // Checks the timer has not already been removed - if ( !timer() && timers[ i ] === timer ) { - timers.splice( i--, 1 ); - } - } - - if ( !timers.length ) { - jQuery.fx.stop(); - } - fxNow = undefined; -}; - -jQuery.fx.timer = function( timer ) { - if ( timer() && jQuery.timers.push( timer ) ) { - jQuery.fx.start(); - } -}; - -jQuery.fx.interval = 13; - -jQuery.fx.start = function() { - if ( !timerId ) { - timerId = setInterval( jQuery.fx.tick, jQuery.fx.interval ); - } -}; - -jQuery.fx.stop = function() { - clearInterval( timerId ); - timerId = null; -}; - -jQuery.fx.speeds = { - slow: 600, - fast: 200, - // Default speed - _default: 400 -}; - -// Back Compat <1.8 extension point -jQuery.fx.step = {}; - -if ( jQuery.expr && jQuery.expr.filters ) { - jQuery.expr.filters.animated = function( elem ) { - return jQuery.grep(jQuery.timers, function( fn ) { - return elem === fn.elem; - }).length; - }; -} -jQuery.fn.offset = function( options ) { - if ( arguments.length ) { - return options === undefined ? - this : - this.each(function( i ) { - jQuery.offset.setOffset( this, options, i ); - }); - } - - var docElem, win, - box = { top: 0, left: 0 }, - elem = this[ 0 ], - doc = elem && elem.ownerDocument; - - if ( !doc ) { - return; - } - - docElem = doc.documentElement; - - // Make sure it's not a disconnected DOM node - if ( !jQuery.contains( docElem, elem ) ) { - return box; - } - - // If we don't have gBCR, just use 0,0 rather than error - // BlackBerry 5, iOS 3 (original iPhone) - if ( typeof elem.getBoundingClientRect !== "undefined" ) { - box = elem.getBoundingClientRect(); - } - win = getWindow( doc ); - return { - top: box.top + ( win.pageYOffset || docElem.scrollTop ) - ( docElem.clientTop || 0 ), - left: box.left + ( win.pageXOffset || docElem.scrollLeft ) - ( docElem.clientLeft || 0 ) - }; -}; - -jQuery.offset = { - - setOffset: function( elem, options, i ) { - var position = jQuery.css( elem, "position" ); - - // set position first, in-case top/left are set even on static elem - if ( position === "static" ) { - elem.style.position = "relative"; - } - - var curElem = jQuery( elem ), - curOffset = curElem.offset(), - curCSSTop = jQuery.css( elem, "top" ), - curCSSLeft = jQuery.css( elem, "left" ), - calculatePosition = ( position === "absolute" || position === "fixed" ) && jQuery.inArray("auto", [curCSSTop, curCSSLeft]) > -1, - props = {}, curPosition = {}, curTop, curLeft; - - // need to be able to calculate position if either top or left is auto and position is either absolute or fixed - if ( calculatePosition ) { - curPosition = curElem.position(); - curTop = curPosition.top; - curLeft = curPosition.left; - } else { - curTop = parseFloat( curCSSTop ) || 0; - curLeft = parseFloat( curCSSLeft ) || 0; - } - - if ( jQuery.isFunction( options ) ) { - options = options.call( elem, i, curOffset ); - } - - if ( options.top != null ) { - props.top = ( options.top - curOffset.top ) + curTop; - } - if ( options.left != null ) { - props.left = ( options.left - curOffset.left ) + curLeft; - } - - if ( "using" in options ) { - options.using.call( elem, props ); - } else { - curElem.css( props ); - } - } -}; - - -jQuery.fn.extend({ - - position: function() { - if ( !this[ 0 ] ) { - return; - } - - var offsetParent, offset, - parentOffset = { top: 0, left: 0 }, - elem = this[ 0 ]; - - // fixed elements are offset from window (parentOffset = {top:0, left: 0}, because it is it's only offset parent - if ( jQuery.css( elem, "position" ) === "fixed" ) { - // we assume that getBoundingClientRect is available when computed position is fixed - offset = elem.getBoundingClientRect(); - } else { - // Get *real* offsetParent - offsetParent = this.offsetParent(); - - // Get correct offsets - offset = this.offset(); - if ( !jQuery.nodeName( offsetParent[ 0 ], "html" ) ) { - parentOffset = offsetParent.offset(); - } - - // Add offsetParent borders - parentOffset.top += jQuery.css( offsetParent[ 0 ], "borderTopWidth", true ); - parentOffset.left += jQuery.css( offsetParent[ 0 ], "borderLeftWidth", true ); - } - - // Subtract parent offsets and element margins - // note: when an element has margin: auto the offsetLeft and marginLeft - // are the same in Safari causing offset.left to incorrectly be 0 - return { - top: offset.top - parentOffset.top - jQuery.css( elem, "marginTop", true ), - left: offset.left - parentOffset.left - jQuery.css( elem, "marginLeft", true) - }; - }, - - offsetParent: function() { - return this.map(function() { - var offsetParent = this.offsetParent || document.documentElement; - while ( offsetParent && ( !jQuery.nodeName( offsetParent, "html" ) && jQuery.css( offsetParent, "position") === "static" ) ) { - offsetParent = offsetParent.offsetParent; - } - return offsetParent || document.documentElement; - }); - } -}); - - -// Create scrollLeft and scrollTop methods -jQuery.each( {scrollLeft: "pageXOffset", scrollTop: "pageYOffset"}, function( method, prop ) { - var top = /Y/.test( prop ); - - jQuery.fn[ method ] = function( val ) { - return jQuery.access( this, function( elem, method, val ) { - var win = getWindow( elem ); - - if ( val === undefined ) { - return win ? (prop in win) ? win[ prop ] : - win.document.documentElement[ method ] : - elem[ method ]; - } - - if ( win ) { - win.scrollTo( - !top ? val : jQuery( win ).scrollLeft(), - top ? val : jQuery( win ).scrollTop() - ); - - } else { - elem[ method ] = val; - } - }, method, val, arguments.length, null ); - }; -}); - -function getWindow( elem ) { - return jQuery.isWindow( elem ) ? - elem : - elem.nodeType === 9 ? - elem.defaultView || elem.parentWindow : - false; -} -// Create innerHeight, innerWidth, height, width, outerHeight and outerWidth methods -jQuery.each( { Height: "height", Width: "width" }, function( name, type ) { - jQuery.each( { padding: "inner" + name, content: type, "": "outer" + name }, function( defaultExtra, funcName ) { - // margin is only for outerHeight, outerWidth - jQuery.fn[ funcName ] = function( margin, value ) { - var chainable = arguments.length && ( defaultExtra || typeof margin !== "boolean" ), - extra = defaultExtra || ( margin === true || value === true ? "margin" : "border" ); - - return jQuery.access( this, function( elem, type, value ) { - var doc; - - if ( jQuery.isWindow( elem ) ) { - // As of 5/8/2012 this will yield incorrect results for Mobile Safari, but there - // isn't a whole lot we can do. See pull request at this URL for discussion: - // https://github.com/jquery/jquery/pull/764 - return elem.document.documentElement[ "client" + name ]; - } - - // Get document width or height - if ( elem.nodeType === 9 ) { - doc = elem.documentElement; - - // Either scroll[Width/Height] or offset[Width/Height] or client[Width/Height], whichever is greatest - // unfortunately, this causes bug #3838 in IE6/8 only, but there is currently no good, small way to fix it. - return Math.max( - elem.body[ "scroll" + name ], doc[ "scroll" + name ], - elem.body[ "offset" + name ], doc[ "offset" + name ], - doc[ "client" + name ] - ); - } - - return value === undefined ? - // Get width or height on the element, requesting but not forcing parseFloat - jQuery.css( elem, type, extra ) : - - // Set width or height on the element - jQuery.style( elem, type, value, extra ); - }, type, chainable ? margin : undefined, chainable, null ); - }; - }); -}); -// Limit scope pollution from any deprecated API -// (function() { - -// })(); -// Expose jQuery to the global object -window.jQuery = window.$ = jQuery; - -// Expose jQuery as an AMD module, but only for AMD loaders that -// understand the issues with loading multiple versions of jQuery -// in a page that all might call define(). The loader will indicate -// they have special allowances for multiple jQuery versions by -// specifying define.amd.jQuery = true. Register as a named module, -// since jQuery can be concatenated with other files that may use define, -// but not use a proper concatenation script that understands anonymous -// AMD modules. A named AMD is safest and most robust way to register. -// Lowercase jquery is used because AMD module names are derived from -// file names, and jQuery is normally delivered in a lowercase file name. -// Do this after creating the global so that if an AMD module wants to call -// noConflict to hide this version of jQuery, it will work. -if ( typeof define === "function" && define.amd && define.amd.jQuery ) { - define( "jquery", [], function () { return jQuery; } ); -} - -})( window ); diff --git a/third_party/polymer/components/web-animations-js/tutorial/page-load.js b/third_party/polymer/components/web-animations-js/tutorial/page-load.js deleted file mode 100644 index 9d7c4a0..0000000 --- a/third_party/polymer/components/web-animations-js/tutorial/page-load.js +++ /dev/null @@ -1,114 +0,0 @@ -/* - * Copyright 2013 Google Inc. All Rights Reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -"use strict"; - -/* - * Get the current topic of tutorial the user is in - * E.g. If the user is currently at basic-animation.html - * currentSection will equals to basic-animation. - * This variable is used to determine the name of a file. - * E.g. To get the name of the exercise 1 of basic-animation - * would add currentSection to '-exercise-' and the number - * in the <li> being clicked - */ -var currentSection = window.location.href.split('/').pop(); -currentSection = currentSection.split('.')[0]; - -// waits until all DOM elements are ready to perform -$(document.body).ready(function() { - - // if one of the side menu is clicked - // update page content without refreshing the whole page. - $('.sideMenu li').click(function(e) { - // get the exercise number from the <li> being clicked. - // e.g. 'Exercise 1' would return 1 - // Though 'Basic Info' would return 'Info'. - exerciseNum = $(this).html().split(' ')[1]; - - // determines if the input string is actually a number - // if it is not then load the info page of the section - if (parseInt(exerciseNum) !== exerciseNum && isNaN(exerciseNum)) { - $('.content').load(currentSection + '.html' + ' .content', function() { - $(this).children().unwrap(); - }); - } else { - var url = currentSection + '-exercise-' + exerciseNum + '.html'; - // checks if a file/link exist before adding contents - // into page - // after contents are loaded, load editor - $.ajax({ - url: url, - type: 'HEAD', - success: function() { - $('.content').load(url + ' .content', function() { - $(this).children().unwrap(); - loadEditor(); - }); - } - }); - } - }); -}); - -// This generate an editor object and put it into -// a div called 'tryIt' as well as passing in -// default HTML and CSS codes as animation divs -var loadEditor = function() { - var html = '', currentId = 'a'; - - // Get the number of animation divs needed - var animNum = findDivNum(); - - // generate a number of animation divs according to - // the requirements of the exercise - // such as in sequence section - for (var i = 0; i < animNum; i++) { - html += '<div id=\"' + currentId + '\" class=\"anim\"></div>' + '\n'; - currentId = nextId(currentId); - } - - // create a new editor object - var editor = new TryItDisplay(document.getElementById("tryIt")); - editor.setDefaultHtml(html); - - // common css for all divs - var css = '.anim {' + - '\n' + 'background-color: red;' + - '\n' + 'border-radius: 10px;' + - '\n' + 'width: 100px;' + - '\n' + 'height: 50px;' + - '\n' + 'top: 0px;' + - '\n' + 'left: 0px;' + - '\n' + 'position: relative;' + - '\n' + 'border: 1px solid black;' + - '\n' + '}'; - editor.setDefaultCss(css); - editor.update(); -} - -// Get the number of animation divs required -// which is stored in an invisible div with id -// 'animNum' and returns the value. -var findDivNum = function() { - var value = document.getElementById('animNum').innerHTML; - value = parseInt(value); - return value; -} - -// Generate 'a', 'b', 'c', 'd'... to put in as id. -var nextId = function(currentId) { - return String.fromCharCode(currentId.charCodeAt() + 1); -} diff --git a/third_party/polymer/components/web-animations-js/tutorial/parallel/parallel-exercise-1.html b/third_party/polymer/components/web-animations-js/tutorial/parallel/parallel-exercise-1.html deleted file mode 100644 index f064007..0000000 --- a/third_party/polymer/components/web-animations-js/tutorial/parallel/parallel-exercise-1.html +++ /dev/null @@ -1,58 +0,0 @@ -<!-- -Copyright 2013 Google Inc. All Rights Reserved. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. - ---> - -<!DOCTYPE html> - -<html> - -<div class="content"> - - <div id="animNum">3</div> - - <div class="heading subTitle">Parallel Animation Group</div> - - <div class="heading exercises">Exercise 1 - Make a Parallel Group</div> - - <p class="description">Groupings are important so let's - get started on the exercise</p> - - <p class="description">In this exercise, create a parallel group - of animation that has 3 different animations. Each children should run 300px, - 500px, 700px from top respectively for 5 seconds.</p> - - <p class="description">Hint: you should first create the children then - include the children into the group. You might also need to create - more animation divs in the html section and change their colour - depends on your preferences.</p> - - <div id="hideLabel" onclick="toggleSolution()">Show Solution</div> - <div id="toggleText" class="codeSamples"> - <code>var A = new Animation(document.querySelector("#a"), - {top: "300px"}, 5); <br /> - var B = new Animation(document.querySelector("#b"), - {top: "500px"}, 5); <br /> - var C = new Animation(document.querySelector("#c"), - {top: "700px"}, 5); <br /> - new AnimationGroup([A, B, C]); - </code> - </div> - - <div id="tryIt"></div> - - <div class="separator"></div> - -</div> <!-- content ending div -->
\ No newline at end of file diff --git a/third_party/polymer/components/web-animations-js/tutorial/parallel/parallel.html b/third_party/polymer/components/web-animations-js/tutorial/parallel/parallel.html deleted file mode 100644 index 2ebf704..0000000 --- a/third_party/polymer/components/web-animations-js/tutorial/parallel/parallel.html +++ /dev/null @@ -1,101 +0,0 @@ -<!-- -Copyright 2013 Google Inc. All Rights Reserved. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. - ---> - -<!DOCTYPE html> - -<link rel="author" title="Sandy Phan, Sarah Heimlich", - href="mailto:sandyphan@google.com, sarahheimlich@google.com"> -<title>Parallel Animation</title> -<meta name="flags" content="dom"> -<meta name="tutorial" content="Web Animations tutorials"> -<link rel="stylesheet" type="text/css" href="../tutorial-style.css"> -<script type="text/javascript" src="../jquery.js"></script> -<script type="text/javascript" src="../page-load.js"></script> - -<ul class="topMenu"> - <li><a href="../home-page.html">Home</a></li> - <li><a href="#">Tutorials</a> - <ul class="subMenu"> - <li><a href="../basic-animations/basic-animation.html"> - Basic Animations</a></li> - <li><a href="parallel.html">Parallel Animations</a></li> - <li><a href="../sequence/sequence.html">Sequence Animations - </a></li> - <li><a href="../timing-dictionary/timing-dictionary.html"> - Timing Dictionary</a></li> - <li><a href="../timing-functions/timing-function.html"> - Timing Functions</a></li> - </ul> - </li> - <li><a href="../references/references.html">References</a></li> - <li><a href="../about.html">About</a></li> -</ul> -<div id="main"> - - <div id="title">Web Animations Tutorial</div> - - <div class="line-separator"></div> - - <div class="content"> - <p class="description">Web animations is to have a flash or GIF animation - intergrated onto the web page. Normal web animations still require - the use of plugins such as Java Applets, Shockwave, Adobe Flash. In this - tutorial, we will be showing you how to create animations using - javascript without the need of installing plugins.</p> - - <br /> - - <div class="heading subTitle">Parallel Animation Group</div> - - <p class="description">There certainly are times when you want to - group items together such that they have the same features and effects. - There are 2 types of groupings: parallel and sequential. In this - section you will learn about parallel groups and what kind of - feature does it have to help you write less code.</p> - - <p class="description">Just as what the name of the group means, all - the children being grouped in a parallel group will run in parallel, - that is they will start together and of course they will end at - different time depends on their durations.</p> - - <p class="description">The following is the interface for creating - a parallel animation group.</p> - - <code class="codeSamples">new AnimationGroup([children], - {timing/timing dictionary});</code> - - <p class="description note">Note that both children and timing are - nullable (i.e. you can leave children as [] if you don't want to - specify a child). Though only timing is optional</p> - - <div class="separator"></div> - - </div> <!-- content ending div --> - <div class="line-separator"></div> -</div> <!-- main ending div --> - -<ul class="sideMenu"> - <li id="menuLabel">Parallel Animation Group</li> - <li>Basic Info</li> - <li>Exercise 1</li> - <li>Exercise 2</li> - <li>Exercise 3</li> -</ul> - -<div class="separator"></div> - -<script type="text/javascript" src="../try-it-yourself.js"></script>
\ No newline at end of file diff --git a/third_party/polymer/components/web-animations-js/tutorial/sample-tutorial.html b/third_party/polymer/components/web-animations-js/tutorial/sample-tutorial.html deleted file mode 100644 index f10ee22..0000000 --- a/third_party/polymer/components/web-animations-js/tutorial/sample-tutorial.html +++ /dev/null @@ -1,44 +0,0 @@ -<!-- - Copyright 2013 Google Inc. All Rights Reserved. - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. ---> - -<body onload="myDisplay.update()"> - <div id="myDisplayDiv"></div> - <script type="text/javascript" src="try-it-yourself.js"></script> - <script type="text/javascript" src='tutorial-testing.js'></script> - <script type="text/javascript" src='../web-animations.js'></script> - <script type="text/javascript" src='../test/extra-asserts.js'></script> - <link type="text/css" href="../animation-test-style.css"> - <link rel="stylesheet" type="text/css" href="tutorial-style.css"> - <script> - "use strict"; - - var myDisplay = new TryItDisplay(document.getElementById("myDisplayDiv")); - myDisplay.setDefaultHtml("<div id='a' class='test'></div>"); - var css = ".test {" + - "\n" + "background-color: red;" + - "\n" + "border-radius: 10px;" + - "\n" + "width: 100px;" + - "\n" + "height: 50px;" + - "\n" + "top: 50px;" + - "\n" + "left: 0px;" + - "\n" + "position: absolute;" + - "\n" + "}"; - myDisplay.setDefaultCss(css); - myDisplay.setDefaultAnimationEndTime(2); - myDisplay.addCheck("document.getElementById('a')", "{'left': '0px'}", 0); - myDisplay.addCheck("document.getElementById('a')", "{'left': '300px'}", 2); - </script> -</body> diff --git a/third_party/polymer/components/web-animations-js/tutorial/try-it-yourself.js b/third_party/polymer/components/web-animations-js/tutorial/try-it-yourself.js deleted file mode 100644 index 46e0fae..0000000 --- a/third_party/polymer/components/web-animations-js/tutorial/try-it-yourself.js +++ /dev/null @@ -1,216 +0,0 @@ -/* - * Copyright 2013 Google Inc. All Rights Reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -"use strict"; - -// TryItDisplay creates and represents the input and output display. - function TryItDisplay(containerElement) { - this.iframe = new Iframe(); - this.create(containerElement); -} - -// Function that creates the input and output for the TryItYourself object. - TryItDisplay.prototype.create = function(containerElement) { - var heading = document.createElement("div"); - heading.setAttribute("class", "heading"); - heading.setAttribute("id", "heading") - heading.innerHTML = "TRY IT YOURSELF"; - containerElement.appendChild(heading); - - var button = document.createElement("button"); - button.onclick = function(me) { return function() { me.update(); }; }(this); - button.setAttribute("id", "update"); - button.innerHTML = "Update"; - heading.appendChild(button); - - var code = document.createElement("div"); - code.setAttribute("class", "code"); - code.setAttribute("id", "allCode"); - containerElement.appendChild(code); - - var display = document.createElement("div"); - display.setAttribute("class", "display"); - containerElement.appendChild(display); - display.appendChild(this.iframe.getDom()); - - var htmlHeader = document.createElement("div"); - htmlHeader.setAttribute("class", "label"); - htmlHeader.setAttribute("id", "htmlLabel") - htmlHeader.innerHTML = "HTML Code"; - code.appendChild(htmlHeader); - - var htmlCode = document.createElement("textarea"); - htmlCode.setAttribute("id", "htmlCode"); - htmlCode.setAttribute("class", "code"); - code.appendChild(htmlCode); - - var cssHeader = document.createElement("div"); - cssHeader.setAttribute("class", "label"); - cssHeader.setAttribute("id", "cssLabel") - cssHeader.innerHTML = "CSS Style"; - code.appendChild(cssHeader); - - var cssCode = document.createElement("textarea"); - cssCode.setAttribute("id", "cssCode"); - cssCode.setAttribute("class", "code"); - code.appendChild(cssCode); - - var jsHeader = document.createElement("div"); - jsHeader.setAttribute("class", "label"); - jsHeader.setAttribute("id", "jsLabel") - jsHeader.innerHTML = "Javascript"; - code.appendChild(jsHeader); - - var jsCode = document.createElement("textarea"); - jsCode.setAttribute("id", "jsCode"); - jsCode.setAttribute("class", "code"); - code.appendChild(jsCode); - - var heading = document.createElement("div"); - heading.setAttribute("class", "heading fail"); - heading.setAttribute("id", "passOrFail") - heading.innerHTML = "YOU PASSED!"; - containerElement.appendChild(heading); -} - -TryItDisplay.prototype.setDefaultHtml = function(newHtml) { - document.getElementById('htmlCode').innerHTML = newHtml ? newHtml : ""; -} - -TryItDisplay.prototype.setDefaultCss = function(newCss) { - document.getElementById('cssCode').innerHTML = newCss ? newCss : ""; -} - -TryItDisplay.prototype.setDefaultJs = function(newJs) { - document.getElementById('jsCode').innerHTML = newJs ? newJs : ""; -} - -TryItDisplay.prototype.addCheck = function(object, property, time) { - this.iframe.checks.push("check(" - + object + ", " + property + ", " + time + ", 'default');"); -} - -// Set the default end time for the animation clock. -// Note: this will be overwritten if the user creates an animation longer than -// the time set here. -TryItDisplay.prototype.setTime = function(newTime) { - this.iframe.time = newTime; -} - -// Update takes the information currently in the HTML, CSS, and JS input boxes -// and displays it in the iframe. -TryItDisplay.prototype.update = function() { - // Reload the iframe by resetting the source. - document.getElementById("display").src = document.getElementById("display").src; - document.getElementById("display").onload = function(me) { - return function() { - me.addCssHtml(); - me.addAnimScript(); - }; - }(this); -} - -// Add the CSS and HTML into the iframe. -TryItDisplay.prototype.addCssHtml = function() { - var iframeDoc = this.iframe.doc.contentDocument; - var htmlVal = document.getElementById("htmlCode").value; - var cssVal = document.getElementById('cssCode').value - +"\n" +"#dummy { display: none; }"; - iframeDoc.getElementsByTagName("body")[0].innerHTML = htmlVal; - iframeDoc.getElementsByTagName("style")[0].innerHTML = cssVal; - - // dummDiv allows the animation time to display properly the first time - // the page loads. - var dummyDiv = document.createElement("div"); - dummyDiv.setAttribute("id", "dummy"); - dummyDiv.setAttribute("class", "test"); - iframeDoc.getElementsByTagName("body")[0].appendChild(dummyDiv); -} - -// Add the Javascript value to the iframe. -TryItDisplay.prototype.addAnimScript = function() { - var scriptElement = document.createElement('script'); - var jsVal = this.getJsVal(); - var iframeDoc = this.iframe.doc.contentDocument; - - var scriptDivs = iframeDoc.getElementsByTagName('script'); - scriptElement.innerHTML = jsVal; - par = iframeDoc.getElementsByTagName('body')[0]; - par.appendChild(scriptElement); -} - -// Get the user provided Javascript value, and append additional information -// to run the tests properly. -TryItDisplay.prototype.getJsVal = function() { - var iframeDoc = this.iframe.doc.contentDocument; - // The animation added to the javascript input allows the animation time to - // display even when the user does not input an animation. - var jsVal = "setupTutorialTests(); \n" - + document.getElementById('jsCode').value + "\n" - + "new Animation(document.getElementById('dummy'), {left: '100px'}, " - + this.iframe.time + ");"; - - for (var i = 0; i < this.iframe.checks.length; i++) { - jsVal += "\n" + this.iframe.checks[i]; - } - jsVal += " \nrunTests();"; - return jsVal; -} - -// Function to call once the user passes the tutorial. -TryItDisplay.pass = function() { - document.getElementById("passOrFail").className = "heading pass"; -} - -// Function to call if the user fails the tutorial. -TryItDisplay.fail = function() { - document.getElementById("passOrFail").className = "heading fail"; -} - -// Constructor for the Iframe object. -function Iframe() { - this.doc = document.createElement('iframe'); - // Checks will store all the tests done on the animations in the iframe. - // Developers can add to it using the addCheck function. - this.checks = []; - // Time stores the defualt animation time. It controls how long the hidden - // animation runs and therefore the default animation timer. - this.time = 5; - - this.pass = false; - - this.doc.setAttribute('id', 'display'); - this.doc.setAttribute('class', 'display'); - this.doc.setAttribute('src', 'iframe-contents.html'); -} - -Iframe.prototype.getDom = function() { - return this.doc; -} - -// Make the solution box toggleable. -var toggleSolution = function() { - var element = document.getElementById('toggleText'); - var elementStyle = getComputedStyle(element, null); - var label = document.getElementById('hideLabel'); - - if (elementStyle.display === 'none') { - element.style.display = 'block'; - label.innerHTML = 'Hide Solution'; - } else if (elementStyle.display === 'block') { - element.style.display = 'none'; - label.innerHTML = 'Show Solution'; - } -} diff --git a/third_party/polymer/components/web-animations-js/tutorial/tutorial-style.css b/third_party/polymer/components/web-animations-js/tutorial/tutorial-style.css deleted file mode 100644 index 00acac9..0000000 --- a/third_party/polymer/components/web-animations-js/tutorial/tutorial-style.css +++ /dev/null @@ -1,344 +0,0 @@ -/** - * Copyright 2013 Google Inc. All Rights Reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - /*TODO: - - incorperate object notation (JSON) varibles for the test so it is easier to call - */ - -#main { - margin: 100px auto; - width: 80%; -} -#tryIt { - width: 90%; - margin: 30px auto; - clear: both; -} -.heading { - background-color: #AFA; - border-radius: 10px; - padding: 20px; - margin: 5px; - font: bold 1.2em Arial; - height: 25px; - clear: both; -} -#update { - border-radius: 10px; - background-color: white; - float: right; - width: 10%; - font: 1em Arial; - padding: 3px; -} -.code { - margin: 0 auto; - border-radius: 2px; - border: 1px solid black; - height: 600px; - width: 55%; - float: left; - overflow: auto; -} -#htmlCode { - width: 99%; - height: 28%; - -} -#jsCode { - width: 99%; - height: 28%; - overflow-x: hidden; -} -#cssCode { - width: 99%; - height: 28%; - float: left; - overflow-x: hidden; -} -#display { - position: relative; - height: 100%; - width: 100%; - float: none; -} -.display { - border-radius: 2px; - width: 44%; - height: 600px; - clear: right; - float: right; -} -.label { - font: bold 1em Arial; - padding: 1%; - height: 2%; - float: left; - clear: both; -} -.description { - font: 1em sans-serif, "Comic Sans MS", cursive; - margin: 10px; - clear: both; - padding: 10px; -} -#title { - font: bold 2em Verdana; - color: #680; - text-align: center; - padding: 10px; - margin: 2px; -} -.content{ - padding: 3px; - width: 80%; - margin: 3px auto; - text-align: justify; -} -.subTitle { - background-color: #ABCDEF; - padding: 10px; -} -code { - color: #94704D; - font-size: 1.1em; -} -.exercises { - font: bold 1em "Lucida Sans Unicode", "Lucida Grande", sans-serif; - background: #FFFF00; - width: 30%; - float: left; - padding: 10px; - margin: 30px 3px; -} -a { - text-decoration: none; - color: black; -} -a:visited { - color: black; -} -.separator { - height: 50px; -} -.sideMenu { - list-style-type: none; - position: absolute; - top: 18%; - z-index: 0; -} -.sideMenu li:hover { - background-color: #E6E6E6; - color: #222; - cursor: pointer -} -.sideMenu li { - display: block; - width: 81%; - background-color: #737373; - padding: 20px; - color: #CCC; - border: 1px solid black; - z-index: 0; -} -.sideMenu li, #alphabet-menu li { - font: 1em "Lucida Sans Unicode", "Lucida Grande", sans-serif; - z-index: 0; -} -#menuLabel { - background-color: #222; - width: 81%; - padding: 20px; - color: #DDD; -} -#toggleText { - width: 60%; - display: none; - position: relative; - float: right; - clear: both; - font-size: 0.9em; - margin-bottom: 10px; -} -#toggleText:after { - content: '.'; - clear: both; - display: block; - height: 0px; - text-indent: -999999em; -} -.codeSamples { - padding: 10px; - border: 1px solid black; - background-color: #EEE; - width: 80%; - clear: both; - margin-left: 10%; - display: block; -} -#hideLabel { - width: 10%; - height: 20px; - float: right; - background-color: #999999; - padding: 5px; - margin: 10px; - font: 0.8em "Lucida Sans Unicode", "Lucida Grande", sans-serif; - color: black; - text-align: center; - border-radius: 10px; - cursor: pointer; -} -.topMenu { - list-style-type: none; - float: left; - position: absolute; - z-index: 5; - top: 0; - left: 0; - margin: 0; -} -.topMenu li { - float: left; - margin-right: 5px; - position: relative; -} -.topMenu a { - padding: 10px; - top: 0px; - display: block; - background-color: #222; - width: 150px; - color: #DDD; - text-align: center; - border: 1px solid black; - text-decoration: none; - font: 1.1em "Lucida Sans Unicode", "Lucida Grande", sans-serif; -} -.topMenu a:hover { - background-color: #EEE; - color: black; -} -.topMenu .subMenu { - list-style-type: none; - position: absolute; - left: -9999px; - font-size: 0.8em; - z-index: 990; -} -.topMenu .subMenu li { - padding-top: 1px; - float: none; - z-index: 1; -} -.topMenu .subMenu a { - white-space: nowrap; - background-color: rgba(34,34,34, 0.1); - color: #222; - z-index: 1; -} -.topMenu li:hover .subMenu { - left: -40px; - z-index: 1; -} -.topMenu .subMenu li:hover a { - background-color: rgba(34,34,34,0.9); - color: #EEE; -} -.line-separator { - height: 2px; - background: #717171; - border-bottom: 1px solid #313030; - clear: both; -} -.demos { - height: 800px; - width: 110%; - border: 0px; -} -#alphabet-menu { - list-style-type: none; -} -#alphabet-menu a { - float: left; - padding: 15px; - margin-bottom: 10px; - display: inline; - border: 1px solid white; - background-color: #FF3333; - color: black; - font-weight: bold; -} -#alphabet-menu a:hover { - background-color: #FFE6E6; - color: black; -} -.note { - color: red; - font-size: 0.9em; -} -.alphabet-title { - float: left; - clear: left; - width: 100%; - font: bold 1.5em "Lucida Sans Unicode", "Lucida Grande", sans-serif; - color: #6699FF; - margin-top: 10px; - border-bottom: 3px dotted #334C80; -} -.keywords { - color: red; -} -.datatype { - color: #009933; -} -.animViewerText { - top: 500px; -} -.backToTop { - float: right; - clear: both; - font: 0.6em "Lucida Sans Unicode", "Lucida Grande", sans-serif; - color: #6699FF; - margin-bottom: 0; -} -.content li { - line-height: 170%; -} -.properties-table { - margin: 3% auto; - border: 2px solid #EBEBEB; - font: 0.9em Georgia, serif; -} -.properties-table td { - padding: 8px; - border-bottom: 2px double #CFCFCF; -} -.properties-table-title td { - font-weight: bold; -} -.pass { - background-color: #AFA; - border-radius: 10px; - padding: 20px; - margin: 5px; - font: bold 50pt Arial; - height: 1em; - clear: both; - text-align: center; -} -.fail { - visibility: hidden; -} diff --git a/third_party/polymer/components/web-animations-js/tutorial/tutorial-testing.js b/third_party/polymer/components/web-animations-js/tutorial/tutorial-testing.js deleted file mode 100644 index 5bb26b8..0000000 --- a/third_party/polymer/components/web-animations-js/tutorial/tutorial-testing.js +++ /dev/null @@ -1,84 +0,0 @@ -/* - * Copyright 2013 Google Inc. All Rights Reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -"use strict"; - -(function() { -var pass; -var completedTests; -var allDone; -var numTests; - -// Call to initialize the testing environment. -function setupTutorialTests() { - setState("Manual"); - var timeOfAnimation = document.createElement('div'); - timeOfAnimation.id = "animViewerText"; - timeOfAnimation.innerHTML = "Current animation time: 0.00"; - document.body.appendChild(timeOfAnimation); - numTests = 0; - completedTests = 0; - allDone = false; - pass = true; -} - -// This function mimics the async_test function in testharness.js so that -// extra-asserts.js will run as intended for a tutorial. -function async_test(func, name, properties) { - numTests++; - step = function(func) { - func(); - if (!pass) { - parent.TryItDisplay.fail(); - allDone = true; - }; - }; - - done = function() { - completedTests++; - if (completedTests == numTests && !allDone) { - allDone = true; - parent.TryItDisplay.pass(); - }; - }; - return this; -} - -function assert_equals(actual, expected, description) { - pass = (actual == expected); -} - -function assert_approx_equals(actual, expected, epsilon, description) { - var lowerBound = expected - (epsilon / 2) < actual; - var upperBound = expected + (epsilon / 2) > actual; - pass = (lowerBound && upperBound); -} - -// This function is required to do nothing for tutorial testing, -// but extra-asserts calls it and thus without this function, -// extra-asserts.js will cause the page to crash. -function add_completion_callback(anything) { -} - -/////////////////////////////////////////////////////////////////////////////// -// Exposing functions to be accessed externally // -/////////////////////////////////////////////////////////////////////////////// - -window.setupTutorialTests = setupTutorialTests; -window.async_test = async_test; -window.assert_approx_equals = assert_approx_equals; -window.assert_equals = assert_equals; -window.add_completion_callback = add_completion_callback; -})(); diff --git a/third_party/polymer/components/web-animations-js/web-animations.js b/third_party/polymer/components/web-animations-js/web-animations.js deleted file mode 100644 index ff8ba6f..0000000 --- a/third_party/polymer/components/web-animations-js/web-animations.js +++ /dev/null @@ -1,5529 +0,0 @@ -/** - * Copyright 2012 Google Inc. All Rights Reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -(function() { -'use strict'; - -var ASSERT_ENABLED = false; -var SVG_NS = 'http://www.w3.org/2000/svg'; - -function assert(check, message) { - console.assert(ASSERT_ENABLED, - 'assert should not be called when ASSERT_ENABLED is false'); - console.assert(check, message); - // Some implementations of console.assert don't actually throw - if (!check) { throw message; } -} - -function detectFeatures() { - var el = createDummyElement(); - el.style.cssText = 'width: calc(0px);' + - 'width: -webkit-calc(0px);'; - var calcFunction = el.style.width.split('(')[0]; - function detectProperty(candidateProperties) { - return [].filter.call(candidateProperties, function(property) { - return property in el.style; - })[0]; - } - var transformProperty = detectProperty([ - 'transform', - 'webkitTransform', - 'msTransform']); - var perspectiveProperty = detectProperty([ - 'perspective', - 'webkitPerspective', - 'msPerspective']); - return { - calcFunction: calcFunction, - transformProperty: transformProperty, - transformOriginProperty: transformProperty + 'Origin', - perspectiveProperty: perspectiveProperty, - perspectiveOriginProperty: perspectiveProperty + 'Origin' - }; -} -var features = detectFeatures(); - -function prefixProperty(property) { - switch (property) { - case 'transform': - return features.transformProperty; - case 'transformOrigin': - return features.transformOriginProperty; - case 'perspective': - return features.perspectiveProperty; - case 'perspectiveOrigin': - return features.perspectiveOriginProperty; - default: - return property; - } -} - -function createDummyElement() { - return document.documentElement.namespaceURI == SVG_NS ? - document.createElementNS(SVG_NS, 'g') : - document.createElement('div'); -} - -var constructorToken = {}; -var deprecationsSilenced = {}; - -var createObject = function(proto, obj) { - var newObject = Object.create(proto); - Object.getOwnPropertyNames(obj).forEach(function(name) { - Object.defineProperty( - newObject, name, Object.getOwnPropertyDescriptor(obj, name)); - }); - return newObject; -}; - -var abstractMethod = function() { - throw 'Abstract method not implemented.'; -}; - -var deprecated = function(name, deprecationDate, advice, plural) { - if (deprecationsSilenced[name]) { - return; - } - var auxVerb = plural ? 'are' : 'is'; - var today = new Date(); - var cutoffDate = new Date(deprecationDate); - cutoffDate.setMonth(cutoffDate.getMonth() + 3); // 3 months grace period - - if (today < cutoffDate) { - console.warn('Web Animations: ' + name + - ' ' + auxVerb + ' deprecated and will stop working on ' + - cutoffDate.toDateString() + '. ' + advice); - deprecationsSilenced[name] = true; - } else { - throw new Error(name + ' ' + auxVerb + ' no longer supported. ' + advice); - } -}; - -var defineDeprecatedProperty = function(object, property, getFunc, setFunc) { - var descriptor = { - get: getFunc, - configurable: true - }; - if (setFunc) { - descriptor.set = setFunc; - } - Object.defineProperty(object, property, descriptor); -}; - -var IndexSizeError = function(message) { - Error.call(this); - this.name = 'IndexSizeError'; - this.message = message; -}; - -IndexSizeError.prototype = Object.create(Error.prototype); - - - -/** @constructor */ -var TimingDict = function(timingInput) { - if (typeof timingInput === 'object') { - for (var k in timingInput) { - if (k in TimingDict.prototype) { - this[k] = timingInput[k]; - } - } - } else if (isDefinedAndNotNull(timingInput)) { - this.duration = Number(timingInput); - } -}; - -TimingDict.prototype = { - delay: 0, - endDelay: 0, - fill: 'auto', - iterationStart: 0, - iterations: 1, - duration: 'auto', - playbackRate: 1, - direction: 'normal', - easing: 'linear' -}; - - - -/** @constructor */ -var Timing = function(token, timingInput, changeHandler) { - if (token !== constructorToken) { - throw new TypeError('Illegal constructor'); - } - this._dict = new TimingDict(timingInput); - this._changeHandler = changeHandler; -}; - -Timing.prototype = { - _timingFunction: function(timedItem) { - var timingFunction = TimingFunction.createFromString( - this.easing, timedItem); - this._timingFunction = function() { - return timingFunction; - }; - return timingFunction; - }, - _invalidateTimingFunction: function() { - delete this._timingFunction; - }, - _iterations: function() { - var value = this._dict.iterations; - return value < 0 ? 1 : value; - }, - _duration: function() { - var value = this._dict.duration; - return typeof value === 'number' ? value : 'auto'; - }, - _clone: function() { - return new Timing( - constructorToken, this._dict, this._updateInternalState.bind(this)); - } -}; - -// Configures an accessor descriptor for use with Object.defineProperty() to -// allow the property to be changed and enumerated, to match __defineGetter__() -// and __defineSetter__(). -var configureDescriptor = function(descriptor) { - descriptor.configurable = true; - descriptor.enumerable = true; - return descriptor; -}; - -Timing._defineProperty = function(prop) { - Object.defineProperty(Timing.prototype, prop, configureDescriptor({ - get: function() { - return this._dict[prop]; - }, - set: function(value) { - if (isDefinedAndNotNull(value)) { - if (prop == 'duration' && value == 'auto') { - // duration is not always a number - } else if (['delay', 'endDelay', 'iterationStart', 'iterations', - 'duration', 'playbackRate'].indexOf(prop) >= 0) { - value = Number(value); - } - this._dict[prop] = value; - } else { - delete this._dict[prop]; - } - // FIXME: probably need to implement specialized handling parsing - // for each property - if (prop === 'easing') { - // Cached timing function may be invalid now. - this._invalidateTimingFunction(); - } - this._changeHandler(); - } - })); -}; - -for (var prop in TimingDict.prototype) { - Timing._defineProperty(prop); -} - -var isDefined = function(val) { - return typeof val !== 'undefined'; -}; - -var isDefinedAndNotNull = function(val) { - return isDefined(val) && (val !== null); -}; - - - -/** @constructor */ -var AnimationTimeline = function(token) { - if (token !== constructorToken) { - throw new TypeError('Illegal constructor'); - } - // TODO: This will probably need to change. - this._startTime = documentTimeZeroAsClockTime; -}; - -AnimationTimeline.prototype = { - get currentTime() { - if (this._startTime === undefined) { - this._startTime = documentTimeZeroAsClockTime; - if (this._startTime === undefined) { - return null; - } - } - return relativeTime(cachedClockTime(), this._startTime); - }, - get effectiveCurrentTime() { - return this.currentTime || 0; - }, - play: function(source) { - return new AnimationPlayer(constructorToken, source, this); - }, - getCurrentPlayers: function() { - return PLAYERS.filter(function(player) { - return !player._isPastEndOfActiveInterval(); - }); - }, - toTimelineTime: function(otherTime, other) { - if ((this.currentTime === null) || (other.currentTime === null)) { - return null; - } else { - return otherTime + other._startTime - this._startTime; - } - }, - _pauseAnimationsForTesting: function(pauseAt) { - PLAYERS.forEach(function(player) { - player.pause(); - player.currentTime = pauseAt; - }); - } -}; - -// TODO: Remove dead players from here? -var PLAYERS = []; -var playersAreSorted = false; -var playerSequenceNumber = 0; - -// Methods for event target objects. -var initializeEventTarget = function(eventTarget) { - eventTarget._handlers = {}; - eventTarget._onHandlers = {}; -}; -var setOnEventHandler = function(eventTarget, type, handler) { - if (typeof handler === 'function') { - eventTarget._onHandlers[type] = { - callback: handler, - index: (eventTarget._handlers[type] || []).length - }; - } else { - eventTarget._onHandlers[type] = null; - } -}; -var getOnEventHandler = function(eventTarget, type) { - if (isDefinedAndNotNull(eventTarget._onHandlers[type])) { - return eventTarget._onHandlers[type].callback; - } - return null; -}; -var addEventHandler = function(eventTarget, type, handler) { - if (typeof handler !== 'function') { - return; - } - if (!isDefinedAndNotNull(eventTarget._handlers[type])) { - eventTarget._handlers[type] = []; - } else if (eventTarget._handlers[type].indexOf(handler) !== -1) { - return; - } - eventTarget._handlers[type].push(handler); -}; -var removeEventHandler = function(eventTarget, type, handler) { - if (!eventTarget._handlers[type]) { - return; - } - var index = eventTarget._handlers[type].indexOf(handler); - if (index === -1) { - return; - } - eventTarget._handlers[type].splice(index, 1); - if (isDefinedAndNotNull(eventTarget._onHandlers[type]) && - (index < eventTarget._onHandlers[type].index)) { - eventTarget._onHandlers[type].index -= 1; - } -}; -var hasEventHandlersForEvent = function(eventTarget, type) { - return (isDefinedAndNotNull(eventTarget._handlers[type]) && - eventTarget._handlers[type].length > 0) || - isDefinedAndNotNull(eventTarget._onHandlers[type]); -}; -var callEventHandlers = function(eventTarget, type, event) { - var callbackList; - if (isDefinedAndNotNull(eventTarget._handlers[type])) { - callbackList = eventTarget._handlers[type].slice(); - } else { - callbackList = []; - } - if (isDefinedAndNotNull(eventTarget._onHandlers[type])) { - callbackList.splice(eventTarget._onHandlers[type].index, 0, - eventTarget._onHandlers[type].callback); - } - setTimeout(function() { - for (var i = 0; i < callbackList.length; i++) { - callbackList[i].call(eventTarget, event); - } - }, 0); -}; -var createEventPrototype = function() { - var prototype = Object.create(window.Event.prototype, { - type: { get: function() { return this._type; } }, - target: { get: function() { return this._target; } }, - currentTarget: { get: function() { return this._target; } }, - eventPhase: { get: function() { return this._eventPhase; } }, - bubbles: { get: function() { return false; } }, - cancelable: { get: function() { return false; } }, - timeStamp: { get: function() { return this._timeStamp; } }, - defaultPrevented: { get: function() { return false; } } - }); - prototype._type = ''; - prototype._target = null; - prototype._eventPhase = Event.NONE; - prototype._timeStamp = 0; - prototype._initialize = function(target) { - this._target = target; - this._eventPhase = Event.AT_TARGET; - this._timeStamp = cachedClockTime(); - }; - return prototype; -}; - - - -/** @constructor */ -var AnimationPlayer = function(token, source, timeline) { - if (token !== constructorToken) { - throw new TypeError('Illegal constructor'); - } - enterModifyCurrentAnimationState(); - try { - this._registeredOnTimeline = false; - this._sequenceNumber = playerSequenceNumber++; - this._timeline = timeline; - this._startTime = - this.timeline.currentTime === null ? 0 : this.timeline.currentTime; - this._storedTimeLag = 0.0; - this._pausedState = false; - this._holdTime = null; - this._previousCurrentTime = null; - this._playbackRate = 1.0; - this._hasTicked = false; - - this.source = source; - this._lastCurrentTime = undefined; - this._finishedFlag = false; - initializeEventTarget(this); - - playersAreSorted = false; - maybeRestartAnimation(); - } finally { - exitModifyCurrentAnimationState(ensureRetickBeforeGetComputedStyle); - } -}; - -AnimationPlayer.prototype = { - set source(source) { - enterModifyCurrentAnimationState(); - try { - if (isDefinedAndNotNull(this.source)) { - // To prevent infinite recursion. - var oldTimedItem = this.source; - this._source = null; - oldTimedItem._attach(null); - } - this._source = source; - if (isDefinedAndNotNull(this.source)) { - this.source._attach(this); - this._update(); - maybeRestartAnimation(); - } - } finally { - exitModifyCurrentAnimationState(repeatLastTick); - } - }, - get source() { - return this._source; - }, - // This is the effective current time. - set currentTime(currentTime) { - enterModifyCurrentAnimationState(); - try { - this._currentTime = currentTime; - } finally { - exitModifyCurrentAnimationState(repeatLastTick); - } - }, - get currentTime() { - return this._currentTime; - }, - set _currentTime(seekTime) { - // If we are paused or seeking to a time where limiting applies (i.e. beyond - // the end in the current direction), update the hold time. - var sourceContentEnd = this.source ? this.source.endTime : 0; - if (this.paused || - (this.playbackRate > 0 && seekTime >= sourceContentEnd) || - (this.playbackRate < 0 && seekTime <= 0)) { - this._holdTime = seekTime; - // Otherwise, clear the hold time (it may been set by previously seeking to - // a limited time) and update the time lag. - } else { - this._holdTime = null; - this._storedTimeLag = (this.timeline.effectiveCurrentTime - - this.startTime) * this.playbackRate - seekTime; - } - this._update(); - maybeRestartAnimation(); - }, - get _currentTime() { - this._previousCurrentTime = (this.timeline.effectiveCurrentTime - - this.startTime) * this.playbackRate - this.timeLag; - return this._previousCurrentTime; - }, - get _unlimitedCurrentTime() { - return (this.timeline.effectiveCurrentTime - this.startTime) * - this.playbackRate - this._storedTimeLag; - }, - get timeLag() { - if (this.paused) { - return this._pauseTimeLag; - } - - // Apply limiting at start of interval when playing in reverse - if (this.playbackRate < 0 && this._unlimitedCurrentTime <= 0) { - if (this._holdTime === null) { - this._holdTime = Math.min(this._previousCurrentTime, 0); - } - return this._pauseTimeLag; - } - - // Apply limiting at end of interval when playing forwards - var sourceContentEnd = this.source ? this.source.endTime : 0; - if (this.playbackRate > 0 && - this._unlimitedCurrentTime >= sourceContentEnd) { - if (this._holdTime === null) { - this._holdTime = Math.max(this._previousCurrentTime, sourceContentEnd); - } - return this._pauseTimeLag; - } - - // Finished limiting so store pause time lag - if (this._holdTime !== null) { - this._storedTimeLag = this._pauseTimeLag; - this._holdTime = null; - } - - return this._storedTimeLag; - }, - get _pauseTimeLag() { - return ((this.timeline.currentTime || 0) - this.startTime) * - this.playbackRate - this._holdTime; - }, - set startTime(startTime) { - enterModifyCurrentAnimationState(); - try { - // This seeks by updating _startTime and hence the currentTime. It does - // not affect _storedTimeLag. - this._startTime = startTime; - this._holdTime = null; - playersAreSorted = false; - this._update(); - maybeRestartAnimation(); - } finally { - exitModifyCurrentAnimationState(repeatLastTick); - } - }, - get startTime() { - return this._startTime; - }, - set _paused(isPaused) { - if (isPaused === this._pausedState) { - return; - } - if (this._pausedState) { - this._storedTimeLag = this.timeLag; - this._holdTime = null; - maybeRestartAnimation(); - } else { - this._holdTime = this.currentTime; - } - this._pausedState = isPaused; - }, - get paused() { - return this._pausedState; - }, - get timeline() { - return this._timeline; - }, - set playbackRate(playbackRate) { - enterModifyCurrentAnimationState(); - try { - var cachedCurrentTime = this.currentTime; - // This will impact currentTime, so perform a compensatory seek. - this._playbackRate = playbackRate; - this.currentTime = cachedCurrentTime; - } finally { - exitModifyCurrentAnimationState(repeatLastTick); - } - }, - get playbackRate() { - return this._playbackRate; - }, - get finished() { - return this._isLimited; - }, - get _isLimited() { - var sourceEnd = this.source ? this.source.endTime : 0; - return ((this.playbackRate > 0 && this.currentTime >= sourceEnd) || - (this.playbackRate < 0 && this.currentTime <= 0)); - }, - cancel: function() { - this.source = null; - }, - finish: function() { - if (this.playbackRate < 0) { - this.currentTime = 0; - } else if (this.playbackRate > 0) { - var sourceEndTime = this.source ? this.source.endTime : 0; - if (sourceEndTime === Infinity) { - throw new Error('InvalidStateError'); - } - this.currentTime = sourceEndTime; - } - }, - play: function() { - this._paused = false; - if (!this.source) { - return; - } - if (this.playbackRate > 0 && - (this.currentTime < 0 || - this.currentTime >= this.source.endTime)) { - this.currentTime = 0; - } else if (this.playbackRate < 0 && - (this.currentTime <= 0 || - this.currentTime > this.source.endTime)) { - this.currentTime = this.source.endTime; - } - }, - pause: function() { - this._paused = true; - }, - reverse: function() { - if (this.playbackRate === 0) { - return; - } - if (this.source) { - if (this.playbackRate > 0 && this.currentTime >= this.source.endTime) { - this.currentTime = this.source.endTime; - } else if (this.playbackRate < 0 && this.currentTime < 0) { - this.currentTime = 0; - } - } - this.playbackRate = -this.playbackRate; - this._paused = false; - }, - _update: function() { - if (this.source !== null) { - this.source._updateInheritedTime( - this.timeline.currentTime === null ? null : this._currentTime); - this._registerOnTimeline(); - } - }, - _hasFutureAnimation: function() { - return this.source === null || this.playbackRate === 0 || - this.source._hasFutureAnimation(this.playbackRate > 0); - }, - _isPastEndOfActiveInterval: function() { - return this.source === null || - this.source._isPastEndOfActiveInterval(); - }, - _isCurrent: function() { - return this.source && this.source._isCurrent(); - }, - _hasFutureEffect: function() { - return this.source && this.source._hasFutureEffect(); - }, - _getLeafItemsInEffect: function(items) { - if (this.source) { - this.source._getLeafItemsInEffect(items); - } - }, - _isTargetingElement: function(element) { - return this.source && this.source._isTargetingElement(element); - }, - _getAnimationsTargetingElement: function(element, animations) { - if (this.source) { - this.source._getAnimationsTargetingElement(element, animations); - } - }, - set onfinish(handler) { - return setOnEventHandler(this, 'finish', handler); - }, - get onfinish() { - return getOnEventHandler(this, 'finish'); - }, - addEventListener: function(type, handler) { - if (type === 'finish') { - addEventHandler(this, type, handler); - } - }, - removeEventListener: function(type, handler) { - if (type === 'finish') { - removeEventHandler(this, type, handler); - } - }, - _generateEvents: function() { - if (!this._finishedFlag && this.finished && - hasEventHandlersForEvent(this, 'finish')) { - var event = new AnimationPlayerEvent('finish', { - currentTime: this.currentTime, - timelineTime: this.timeline.currentTime - }); - event._initialize(this); - callEventHandlers(this, 'finish', event); - } - this._finishedFlag = this.finished; - - // The following code is for deprecated TimedItem event handling and should - // be removed once we stop supporting it. - if (!isDefinedAndNotNull(this._lastCurrentTime)) { - this._lastCurrentTime = 0; - } - - this._lastCurrentTime = this._unlimitedCurrentTime; - }, - _registerOnTimeline: function() { - if (!this._registeredOnTimeline) { - PLAYERS.push(this); - this._registeredOnTimeline = true; - } - }, - _deregisterFromTimeline: function() { - PLAYERS.splice(PLAYERS.indexOf(this), 1); - this._registeredOnTimeline = false; - } -}; - - - -/** @constructor */ -var AnimationPlayerEvent = function(type, eventInit) { - this._type = type; - this.currentTime = eventInit.currentTime; - this.timelineTime = eventInit.timelineTime; -}; - -AnimationPlayerEvent.prototype = createEventPrototype(); - - - -/** @constructor */ -var TimedItem = function(token, timingInput) { - if (token !== constructorToken) { - throw new TypeError('Illegal constructor'); - } - this.timing = new Timing( - constructorToken, timingInput, - this._specifiedTimingModified.bind(this)); - this._inheritedTime = null; - this.currentIteration = null; - this._iterationTime = null; - this._animationTime = null; - this._startTime = 0.0; - this._player = null; - this._parent = null; - this._updateInternalState(); - this._fill = this._resolveFillMode(this.timing.fill); - initializeEventTarget(this); -}; - -TimedItem.prototype = { - // TODO: It would be good to avoid the need for this. We would need to modify - // call sites to instead rely on a call from the parent. - get _effectiveParentTime() { - return this.parent !== null && this.parent._iterationTime !== null ? - this.parent._iterationTime : 0; - }, - get localTime() { - return this._inheritedTime === null ? - null : this._inheritedTime - this._startTime; - }, - get startTime() { - return this._startTime; - }, - get duration() { - var result = this.timing._duration(); - if (result === 'auto') { - result = this._intrinsicDuration(); - } - return result; - }, - get activeDuration() { - var repeatedDuration = this.duration * this.timing._iterations(); - return repeatedDuration / Math.abs(this.timing.playbackRate); - }, - get endTime() { - return this._startTime + this.activeDuration + this.timing.delay + - this.timing.endDelay; - }, - get parent() { - return this._parent; - }, - get previousSibling() { - if (!this.parent) { - return null; - } - var siblingIndex = this.parent.indexOf(this) - 1; - if (siblingIndex < 0) { - return null; - } - return this.parent.children[siblingIndex]; - }, - get nextSibling() { - if (!this.parent) { - return null; - } - var siblingIndex = this.parent.indexOf(this) + 1; - if (siblingIndex >= this.parent.children.length) { - return null; - } - return this.parent.children[siblingIndex]; - }, - _attach: function(player) { - // Remove ourselves from our parent, if we have one. This also removes any - // exsisting player. - this._reparent(null); - this._player = player; - }, - // Takes care of updating the outgoing parent. This is called with a non-null - // parent only from TimingGroup.splice(), which takes care of calling - // TimingGroup._childrenStateModified() for the new parent. - _reparent: function(parent) { - if (parent === this) { - throw new Error('parent can not be set to self!'); - } - enterModifyCurrentAnimationState(); - try { - if (this._player !== null) { - this._player.source = null; - this._player = null; - } - if (this.parent !== null) { - this.remove(); - } - this._parent = parent; - // In the case of a AnimationSequence parent, _startTime will be updated - // by TimingGroup.splice(). - if (this.parent === null || this.parent.type !== 'seq') { - this._startTime = - this._stashedStartTime === undefined ? 0.0 : this._stashedStartTime; - this._stashedStartTime = undefined; - } - // In the case of the parent being non-null, _childrenStateModified() will - // call this via _updateChildInheritedTimes(). - // TODO: Consider optimising this case by skipping this call. - this._updateTimeMarkers(); - } finally { - exitModifyCurrentAnimationState( - Boolean(this.player) ? repeatLastTick : null); - } - }, - _intrinsicDuration: function() { - return 0.0; - }, - _resolveFillMode: abstractMethod, - _updateInternalState: function() { - this._fill = this._resolveFillMode(this.timing.fill); - if (this.parent) { - this.parent._childrenStateModified(); - } else if (this._player) { - this._player._registerOnTimeline(); - } - this._updateTimeMarkers(); - }, - _specifiedTimingModified: function() { - enterModifyCurrentAnimationState(); - try { - this._updateInternalState(); - } finally { - exitModifyCurrentAnimationState( - Boolean(this.player) ? repeatLastTick : null); - } - }, - // We push time down to children. We could instead have children pull from - // above, but this is tricky because a TimedItem may use either a parent - // TimedItem or an AnimationPlayer. This requires either logic in - // TimedItem, or for TimedItem and AnimationPlayer to implement Timeline - // (or an equivalent), both of which are ugly. - _updateInheritedTime: function(inheritedTime) { - this._inheritedTime = inheritedTime; - this._updateTimeMarkers(); - }, - _updateAnimationTime: function() { - if (this.localTime < this.timing.delay) { - if (this._fill === 'backwards' || - this._fill === 'both') { - this._animationTime = 0; - } else { - this._animationTime = null; - } - } else if (this.localTime < - this.timing.delay + this.activeDuration) { - this._animationTime = this.localTime - this.timing.delay; - } else { - if (this._fill === 'forwards' || - this._fill === 'both') { - this._animationTime = this.activeDuration; - } else { - this._animationTime = null; - } - } - }, - _updateIterationParamsZeroDuration: function() { - this._iterationTime = 0; - var isAtEndOfIterations = this.timing._iterations() !== 0 && - this.localTime >= this.timing.delay; - this.currentIteration = ( - isAtEndOfIterations ? - this._floorWithOpenClosedRange( - this.timing.iterationStart + this.timing._iterations(), - 1.0) : - this._floorWithClosedOpenRange(this.timing.iterationStart, 1.0)); - // Equivalent to unscaledIterationTime below. - var unscaledFraction = ( - isAtEndOfIterations ? - this._modulusWithOpenClosedRange( - this.timing.iterationStart + this.timing._iterations(), - 1.0) : - this._modulusWithClosedOpenRange(this.timing.iterationStart, 1.0)); - var timingFunction = this.timing._timingFunction(this); - this._timeFraction = ( - this._isCurrentDirectionForwards() ? - unscaledFraction : - 1.0 - unscaledFraction); - ASSERT_ENABLED && assert( - this._timeFraction >= 0.0 && this._timeFraction <= 1.0, - 'Time fraction should be in the range [0, 1]'); - if (timingFunction) { - this._timeFraction = timingFunction.scaleTime(this._timeFraction); - } - }, - _getAdjustedAnimationTime: function(animationTime) { - var startOffset = - multiplyZeroGivesZero(this.timing.iterationStart, this.duration); - return (this.timing.playbackRate < 0 ? - (animationTime - this.activeDuration) : animationTime) * - this.timing.playbackRate + startOffset; - }, - _scaleIterationTime: function(unscaledIterationTime) { - return this._isCurrentDirectionForwards() ? - unscaledIterationTime : - this.duration - unscaledIterationTime; - }, - _updateIterationParams: function() { - var adjustedAnimationTime = - this._getAdjustedAnimationTime(this._animationTime); - var repeatedDuration = this.duration * this.timing._iterations(); - var startOffset = this.timing.iterationStart * this.duration; - var isAtEndOfIterations = (this.timing._iterations() !== 0) && - (adjustedAnimationTime - startOffset === repeatedDuration); - this.currentIteration = isAtEndOfIterations ? - this._floorWithOpenClosedRange( - adjustedAnimationTime, this.duration) : - this._floorWithClosedOpenRange( - adjustedAnimationTime, this.duration); - var unscaledIterationTime = isAtEndOfIterations ? - this._modulusWithOpenClosedRange( - adjustedAnimationTime, this.duration) : - this._modulusWithClosedOpenRange( - adjustedAnimationTime, this.duration); - this._iterationTime = this._scaleIterationTime(unscaledIterationTime); - if (this.duration == Infinity) { - this._timeFraction = 0; - return; - } - this._timeFraction = this._iterationTime / this.duration; - ASSERT_ENABLED && assert( - this._timeFraction >= 0.0 && this._timeFraction <= 1.0, - 'Time fraction should be in the range [0, 1], got ' + - this._timeFraction + ' ' + this._iterationTime + ' ' + - this.duration + ' ' + isAtEndOfIterations + ' ' + - unscaledIterationTime); - var timingFunction = this.timing._timingFunction(this); - if (timingFunction) { - this._timeFraction = timingFunction.scaleTime(this._timeFraction); - } - this._iterationTime = this._timeFraction * this.duration; - }, - _updateTimeMarkers: function() { - if (this.localTime === null) { - this._animationTime = null; - this._iterationTime = null; - this.currentIteration = null; - this._timeFraction = null; - return false; - } - this._updateAnimationTime(); - if (this._animationTime === null) { - this._iterationTime = null; - this.currentIteration = null; - this._timeFraction = null; - } else if (this.duration === 0) { - this._updateIterationParamsZeroDuration(); - } else { - this._updateIterationParams(); - } - maybeRestartAnimation(); - }, - _floorWithClosedOpenRange: function(x, range) { - return Math.floor(x / range); - }, - _floorWithOpenClosedRange: function(x, range) { - return Math.ceil(x / range) - 1; - }, - _modulusWithClosedOpenRange: function(x, range) { - ASSERT_ENABLED && assert( - range > 0, 'Range must be strictly positive'); - var modulus = x % range; - var result = modulus < 0 ? modulus + range : modulus; - ASSERT_ENABLED && assert( - result >= 0.0 && result < range, - 'Result should be in the range [0, range)'); - return result; - }, - _modulusWithOpenClosedRange: function(x, range) { - var modulus = this._modulusWithClosedOpenRange(x, range); - var result = modulus === 0 ? range : modulus; - ASSERT_ENABLED && assert( - result > 0.0 && result <= range, - 'Result should be in the range (0, range]'); - return result; - }, - _isCurrentDirectionForwards: function() { - if (this.timing.direction === 'normal') { - return true; - } - if (this.timing.direction === 'reverse') { - return false; - } - var d = this.currentIteration; - if (this.timing.direction === 'alternate-reverse') { - d += 1; - } - // TODO: 6.13.3 step 3. wtf? - return d % 2 === 0; - }, - clone: abstractMethod, - before: function() { - var newItems = []; - for (var i = 0; i < arguments.length; i++) { - newItems.push(arguments[i]); - } - this.parent._splice(this.parent.indexOf(this), 0, newItems); - }, - after: function() { - var newItems = []; - for (var i = 0; i < arguments.length; i++) { - newItems.push(arguments[i]); - } - this.parent._splice(this.parent.indexOf(this) + 1, 0, newItems); - }, - replace: function() { - var newItems = []; - for (var i = 0; i < arguments.length; i++) { - newItems.push(arguments[i]); - } - this.parent._splice(this.parent.indexOf(this), 1, newItems); - }, - remove: function() { - this.parent._splice(this.parent.indexOf(this), 1); - }, - // Gets the leaf TimedItems currently in effect. Note that this is a superset - // of the leaf TimedItems in their active interval, as a TimedItem can have an - // effect outside its active interval due to fill. - _getLeafItemsInEffect: function(items) { - if (this._timeFraction !== null) { - this._getLeafItemsInEffectImpl(items); - } - }, - _getLeafItemsInEffectImpl: abstractMethod, - _hasFutureAnimation: function(timeDirectionForwards) { - return timeDirectionForwards ? this._inheritedTime < this.endTime : - this._inheritedTime > this.startTime; - }, - _isPastEndOfActiveInterval: function() { - return this._inheritedTime >= this.endTime; - }, - get player() { - return this.parent === null ? - this._player : this.parent.player; - }, - _isCurrent: function() { - return !this._isPastEndOfActiveInterval() || - (this.parent !== null && this.parent._isCurrent()); - }, - _isTargetingElement: abstractMethod, - _getAnimationsTargetingElement: abstractMethod, - _netEffectivePlaybackRate: function() { - var effectivePlaybackRate = this._isCurrentDirectionForwards() ? - this.timing.playbackRate : -this.timing.playbackRate; - return this.parent === null ? effectivePlaybackRate : - effectivePlaybackRate * this.parent._netEffectivePlaybackRate(); - }, - // Note that this restriction is currently incomplete - for example, - // Animations which are playing forwards and have a fill of backwards - // are not in effect unless current. - // TODO: Complete this restriction. - _hasFutureEffect: function() { - return this._isCurrent() || this._fill !== 'none'; - }, - _toSubRanges: function(fromTime, toTime, iterationTimes) { - if (fromTime > toTime) { - var revRanges = this._toSubRanges(toTime, fromTime, iterationTimes); - revRanges.ranges.forEach(function(a) { a.reverse(); }); - revRanges.ranges.reverse(); - revRanges.start = iterationTimes.length - revRanges.start - 1; - revRanges.delta = -1; - return revRanges; - } - var skipped = 0; - // TODO: this should be calculatable. This would be more efficient - // than searching through the list. - while (iterationTimes[skipped] < fromTime) { - skipped++; - } - var currentStart = fromTime; - var ranges = []; - for (var i = skipped; i < iterationTimes.length; i++) { - if (iterationTimes[i] < toTime) { - ranges.push([currentStart, iterationTimes[i]]); - currentStart = iterationTimes[i]; - } else { - ranges.push([currentStart, toTime]); - return {start: skipped, delta: 1, ranges: ranges}; - } - } - ranges.push([currentStart, toTime]); - return {start: skipped, delta: 1, ranges: ranges}; - } -}; - -var TimingEvent = function( - token, target, type, localTime, timelineTime, iterationIndex, seeked) { - if (token !== constructorToken) { - throw new TypeError('Illegal constructor'); - } - this._initialize(target); - this._type = type; - this.localTime = localTime; - this.timelineTime = timelineTime; - this.iterationIndex = iterationIndex; - this.seeked = seeked ? true : false; -}; - -TimingEvent.prototype = createEventPrototype(); - -var isEffectCallback = function(animationEffect) { - return typeof animationEffect === 'function'; -}; - -var interpretAnimationEffect = function(animationEffect) { - if (animationEffect instanceof AnimationEffect || - isEffectCallback(animationEffect)) { - return animationEffect; - } else if (isDefinedAndNotNull(animationEffect) && - typeof animationEffect === 'object') { - // The spec requires animationEffect to be an instance of - // OneOrMoreKeyframes, but this type is just a dictionary or a list of - // dictionaries, so the best we can do is test for an object. - return new KeyframeEffect(animationEffect); - } - return null; -}; - -var cloneAnimationEffect = function(animationEffect) { - if (animationEffect instanceof AnimationEffect) { - return animationEffect.clone(); - } else if (isEffectCallback(animationEffect)) { - return animationEffect; - } else { - return null; - } -}; - - - -/** @constructor */ -var Animation = function(target, animationEffect, timingInput) { - enterModifyCurrentAnimationState(); - try { - TimedItem.call(this, constructorToken, timingInput); - this.effect = interpretAnimationEffect(animationEffect); - this._target = target; - } finally { - exitModifyCurrentAnimationState(null); - } -}; - -Animation.prototype = createObject(TimedItem.prototype, { - _resolveFillMode: function(fillMode) { - return fillMode === 'auto' ? 'none' : fillMode; - }, - _sample: function() { - if (isDefinedAndNotNull(this.effect) && - !(this.target instanceof PseudoElementReference)) { - if (isEffectCallback(this.effect)) { - this.effect(this._timeFraction, this.target, this); - } else { - this.effect._sample(this._timeFraction, this.currentIteration, - this.target, this.underlyingValue); - } - } - }, - _getLeafItemsInEffectImpl: function(items) { - items.push(this); - }, - _isTargetingElement: function(element) { - return element === this.target; - }, - _getAnimationsTargetingElement: function(element, animations) { - if (this._isTargetingElement(element)) { - animations.push(this); - } - }, - get target() { - return this._target; - }, - set effect(effect) { - enterModifyCurrentAnimationState(); - try { - this._effect = effect; - this.timing._invalidateTimingFunction(); - } finally { - exitModifyCurrentAnimationState( - Boolean(this.player) ? repeatLastTick : null); - } - }, - get effect() { - return this._effect; - }, - clone: function() { - return new Animation(this.target, - cloneAnimationEffect(this.effect), this.timing._dict); - }, - toString: function() { - var effectString = '<none>'; - if (this.effect instanceof AnimationEffect) { - effectString = this.effect.toString(); - } else if (isEffectCallback(this.effect)) { - effectString = 'Effect callback'; - } - return 'Animation ' + this.startTime + '-' + this.endTime + ' (' + - this.localTime + ') ' + effectString; - } -}); - -function throwNewHierarchyRequestError() { - var element = document.createElement('span'); - element.appendChild(element); -} - - - -/** @constructor */ -var TimedItemList = function(token, children) { - if (token !== constructorToken) { - throw new TypeError('Illegal constructor'); - } - this._children = children; - this._getters = 0; - this._ensureGetters(); -}; - -TimedItemList.prototype = { - get length() { - return this._children.length; - }, - _ensureGetters: function() { - while (this._getters < this._children.length) { - this._ensureGetter(this._getters++); - } - }, - _ensureGetter: function(i) { - Object.defineProperty(this, i, { - get: function() { - return this._children[i]; - } - }); - } -}; - - - -/** @constructor */ -var TimingGroup = function(token, type, children, timing) { - if (token !== constructorToken) { - throw new TypeError('Illegal constructor'); - } - // Take a copy of the children array, as it could be modified as a side-effect - // of creating this object. See - // https://github.com/web-animations/web-animations-js/issues/65 for details. - var childrenCopy = (children && Array.isArray(children)) ? - children.slice() : []; - // used by TimedItem via _intrinsicDuration(), so needs to be set before - // initializing super. - this.type = type || 'par'; - this._children = []; - this._cachedTimedItemList = null; - this._cachedIntrinsicDuration = null; - TimedItem.call(this, constructorToken, timing); - // We add children after setting the parent. This means that if an ancestor - // (including the parent) is specified as a child, it will be removed from our - // ancestors and used as a child, - this.append.apply(this, childrenCopy); -}; - -TimingGroup.prototype = createObject(TimedItem.prototype, { - _resolveFillMode: function(fillMode) { - return fillMode === 'auto' ? 'both' : fillMode; - }, - _childrenStateModified: function() { - // See _updateChildStartTimes(). - this._isInChildrenStateModified = true; - if (this._cachedTimedItemList) { - this._cachedTimedItemList._ensureGetters(); - } - this._cachedIntrinsicDuration = null; - - // We need to walk up and down the tree to re-layout. endTime and the - // various durations (which are all calculated lazily) are the only - // properties of a TimedItem which can affect the layout of its ancestors. - // So it should be sufficient to simply update start times and time markers - // on the way down. - - // This calls up to our parent, then calls _updateTimeMarkers(). - this._updateInternalState(); - this._updateChildInheritedTimes(); - - // Update child start times before walking down. - this._updateChildStartTimes(); - - this._isInChildrenStateModified = false; - }, - _updateInheritedTime: function(inheritedTime) { - this._inheritedTime = inheritedTime; - this._updateTimeMarkers(); - this._updateChildInheritedTimes(); - }, - _updateChildInheritedTimes: function() { - for (var i = 0; i < this._children.length; i++) { - var child = this._children[i]; - child._updateInheritedTime(this._iterationTime); - } - }, - _updateChildStartTimes: function() { - if (this.type === 'seq') { - var cumulativeStartTime = 0; - for (var i = 0; i < this._children.length; i++) { - var child = this._children[i]; - if (child._stashedStartTime === undefined) { - child._stashedStartTime = child._startTime; - } - child._startTime = cumulativeStartTime; - // Avoid updating the child's inherited time and time markers if this is - // about to be done in the down phase of _childrenStateModified(). - if (!child._isInChildrenStateModified) { - // This calls _updateTimeMarkers() on the child. - child._updateInheritedTime(this._iterationTime); - } - cumulativeStartTime += Math.max(0, child.timing.delay + - child.activeDuration + child.timing.endDelay); - } - } - }, - get children() { - if (!this._cachedTimedItemList) { - this._cachedTimedItemList = new TimedItemList( - constructorToken, this._children); - } - return this._cachedTimedItemList; - }, - get firstChild() { - return this._children[0]; - }, - get lastChild() { - return this._children[this.children.length - 1]; - }, - _intrinsicDuration: function() { - if (!isDefinedAndNotNull(this._cachedIntrinsicDuration)) { - if (this.type === 'par') { - var dur = Math.max.apply(undefined, this._children.map(function(a) { - return a.endTime; - })); - this._cachedIntrinsicDuration = Math.max(0, dur); - } else if (this.type === 'seq') { - var result = 0; - this._children.forEach(function(a) { - result += a.activeDuration + a.timing.delay + a.timing.endDelay; - }); - this._cachedIntrinsicDuration = result; - } else { - throw 'Unsupported type ' + this.type; - } - } - return this._cachedIntrinsicDuration; - }, - _getLeafItemsInEffectImpl: function(items) { - for (var i = 0; i < this._children.length; i++) { - this._children[i]._getLeafItemsInEffect(items); - } - }, - clone: function() { - var children = []; - this._children.forEach(function(child) { - children.push(child.clone()); - }); - return this.type === 'par' ? - new AnimationGroup(children, this.timing._dict) : - new AnimationSequence(children, this.timing._dict); - }, - clear: function() { - this._splice(0, this._children.length); - }, - append: function() { - var newItems = []; - for (var i = 0; i < arguments.length; i++) { - newItems.push(arguments[i]); - } - this._splice(this._children.length, 0, newItems); - }, - prepend: function() { - var newItems = []; - for (var i = 0; i < arguments.length; i++) { - newItems.push(arguments[i]); - } - this._splice(0, 0, newItems); - }, - _addInternal: function(child) { - this._children.push(child); - this._childrenStateModified(); - }, - indexOf: function(item) { - return this._children.indexOf(item); - }, - _splice: function(start, deleteCount, newItems) { - enterModifyCurrentAnimationState(); - try { - var args = arguments; - if (args.length === 3) { - args = [start, deleteCount].concat(newItems); - } - for (var i = 2; i < args.length; i++) { - var newChild = args[i]; - if (this._isInclusiveAncestor(newChild)) { - throwNewHierarchyRequestError(); - } - newChild._reparent(this); - } - var result = Array.prototype.splice.apply(this._children, args); - for (var i = 0; i < result.length; i++) { - result[i]._parent = null; - } - this._childrenStateModified(); - return result; - } finally { - exitModifyCurrentAnimationState( - Boolean(this.player) ? repeatLastTick : null); - } - }, - _isInclusiveAncestor: function(item) { - for (var ancestor = this; ancestor !== null; ancestor = ancestor.parent) { - if (ancestor === item) { - return true; - } - } - return false; - }, - _isTargetingElement: function(element) { - return this._children.some(function(child) { - return child._isTargetingElement(element); - }); - }, - _getAnimationsTargetingElement: function(element, animations) { - this._children.map(function(child) { - return child._getAnimationsTargetingElement(element, animations); - }); - }, - toString: function() { - return this.type + ' ' + this.startTime + '-' + this.endTime + ' (' + - this.localTime + ') ' + ' [' + - this._children.map(function(a) { return a.toString(); }) + ']'; - } -}); - - - -/** @constructor */ -var AnimationGroup = function(children, timing, parent) { - TimingGroup.call(this, constructorToken, 'par', children, timing, parent); -}; - -AnimationGroup.prototype = Object.create(TimingGroup.prototype); - - - -/** @constructor */ -var AnimationSequence = function(children, timing, parent) { - TimingGroup.call(this, constructorToken, 'seq', children, timing, parent); -}; - -AnimationSequence.prototype = Object.create(TimingGroup.prototype); - - - -/** @constructor */ -var PseudoElementReference = function(element, pseudoElement) { - this.element = element; - this.pseudoElement = pseudoElement; - console.warn('PseudoElementReference is not supported.'); -}; - - - -/** @constructor */ -var MediaReference = function(mediaElement, timing, parent, delta) { - TimedItem.call(this, constructorToken, timing, parent); - this._media = mediaElement; - - // We can never be sure when _updateInheritedTime() is going to be called - // next, due to skipped frames or the player being seeked. Plus the media - // element's currentTime may drift from our iterationTime. So if a media - // element has loop set, we can't be sure that we'll stop it before it wraps. - // For this reason, we simply disable looping. - // TODO: Maybe we should let it loop if our duration exceeds it's - // length? - this._media.loop = false; - - // If the media element has a media controller, we detach it. This mirrors the - // behaviour when re-parenting a TimedItem, or attaching one to an - // AnimationPlayer. - // TODO: It would be neater to assign to MediaElement.controller, but this was - // broken in Chrome until recently. See crbug.com/226270. - this._media.mediaGroup = ''; - - this._delta = delta; -}; - -MediaReference.prototype = createObject(TimedItem.prototype, { - _resolveFillMode: function(fillMode) { - // TODO: Fill modes for MediaReferences are still undecided. The spec is not - // clear what 'auto' should mean for TimedItems other than Animations and - // groups. - return fillMode === 'auto' ? 'none' : fillMode; - }, - _intrinsicDuration: function() { - // TODO: This should probably default to zero. But doing so means that as - // soon as our inheritedTime is zero, the polyfill deems the animation to be - // done and stops ticking, so we don't get any further calls to - // _updateInheritedTime(). One way around this would be to modify - // TimedItem._isPastEndOfActiveInterval() to recurse down the tree, then we - // could override it here. - return isNaN(this._media.duration) ? - Infinity : this._media.duration / this._media.defaultPlaybackRate; - }, - _unscaledMediaCurrentTime: function() { - return this._media.currentTime / this._media.defaultPlaybackRate; - }, - _getLeafItemsInEffectImpl: function(items) { - items.push(this); - }, - _ensurePlaying: function() { - // The media element is paused when created. - if (this._media.paused) { - this._media.play(); - } - }, - _ensurePaused: function() { - if (!this._media.paused) { - this._media.pause(); - } - }, - _isSeekableUnscaledTime: function(time) { - var seekTime = time * this._media.defaultPlaybackRate; - var ranges = this._media.seekable; - for (var i = 0; i < ranges.length; i++) { - if (seekTime >= ranges.start(i) && seekTime <= ranges.end(i)) { - return true; - } - } - return false; - }, - // Note that a media element's timeline may not start at zero, although its - // duration is always the timeline time at the end point. This means that an - // element's duration isn't always it's length and not all values of the - // timline are seekable. Furthermore, some types of media further limit the - // range of seekable timeline times. For this reason, we always map an - // iteration to the range [0, duration] and simply seek to the nearest - // seekable time. - _ensureIsAtUnscaledTime: function(time) { - if (this._unscaledMediaCurrentTime() !== time) { - this._media.currentTime = time * this._media.defaultPlaybackRate; - } - }, - // This is called by the polyfill on each tick when our AnimationPlayer's tree - // is active. - _updateInheritedTime: function(inheritedTime) { - this._inheritedTime = inheritedTime; - this._updateTimeMarkers(); - - // The polyfill uses a sampling model whereby time values are propagated - // down the tree at each sample. However, for the media item, we need to use - // play() and pause(). - - // Handle the case of being outside our effect interval. - if (this._iterationTime === null) { - this._ensureIsAtUnscaledTime(0); - this._ensurePaused(); - return; - } - - if (this._iterationTime >= this._intrinsicDuration()) { - // Our iteration time exceeds the media element's duration, so just make - // sure the media element is at the end. It will stop automatically, but - // that could take some time if the seek below is significant, so force - // it. - this._ensureIsAtUnscaledTime(this._intrinsicDuration()); - this._ensurePaused(); - return; - } - - var finalIteration = this._floorWithOpenClosedRange( - this.timing.iterationStart + this.timing._iterations(), 1.0); - var endTimeFraction = this._modulusWithOpenClosedRange( - this.timing.iterationStart + this.timing._iterations(), 1.0); - if (this.currentIteration === finalIteration && - this._timeFraction === endTimeFraction && - this._intrinsicDuration() >= this.duration) { - // We have reached the end of our final iteration, but the media element - // is not done. - this._ensureIsAtUnscaledTime(this.duration * endTimeFraction); - this._ensurePaused(); - return; - } - - // Set the appropriate playback rate. - var playbackRate = - this._media.defaultPlaybackRate * this._netEffectivePlaybackRate(); - if (this._media.playbackRate !== playbackRate) { - this._media.playbackRate = playbackRate; - } - - // Set the appropriate play/pause state. Note that we may not be able to - // seek to the desired time. In this case, the media element's seek - // algorithm repositions the seek to the nearest seekable time. This is OK, - // but in this case, we don't want to play the media element, as it prevents - // us from synchronising properly. - if (this.player.paused || - !this._isSeekableUnscaledTime(this._iterationTime)) { - this._ensurePaused(); - } else { - this._ensurePlaying(); - } - - // Seek if required. This could be due to our AnimationPlayer being seeked, - // or video slippage. We need to handle the fact that the video may not play - // at exactly the right speed. There's also a variable delay when the video - // is first played. - // TODO: What's the right value for this delta? - var delta = isDefinedAndNotNull(this._delta) ? this._delta : - 0.2 * Math.abs(this._media.playbackRate); - if (Math.abs(this._iterationTime - this._unscaledMediaCurrentTime()) > - delta) { - this._ensureIsAtUnscaledTime(this._iterationTime); - } - }, - _isTargetingElement: function(element) { - return this._media === element; - }, - _getAnimationsTargetingElement: function() { }, - _attach: function(player) { - this._ensurePaused(); - TimedItem.prototype._attach.call(this, player); - } -}); - - - -/** @constructor */ -var AnimationEffect = function(token) { - if (token !== constructorToken) { - throw new TypeError('Illegal constructor'); - } -}; - -AnimationEffect.prototype = { - _sample: abstractMethod, - clone: abstractMethod, - toString: abstractMethod -}; - -var clamp = function(x, min, max) { - return Math.max(Math.min(x, max), min); -}; - - - -/** @constructor */ -var MotionPathEffect = function(path, autoRotate, angle, composite) { - var iterationComposite = undefined; - var options = autoRotate; - if (typeof options == 'string' || options instanceof String || - angle || composite) { - // FIXME: add deprecation warning - please pass an options dictionary to - // MotionPathEffect constructor - } else if (options) { - autoRotate = options.autoRotate; - angle = options.angle; - composite = options.composite; - iterationComposite = options.iterationComposite; - } - - enterModifyCurrentAnimationState(); - try { - AnimationEffect.call(this, constructorToken); - - this.composite = composite; - this.iterationComposite = iterationComposite; - - // TODO: path argument is not in the spec -- seems useful since - // SVGPathSegList doesn't have a constructor. - this.autoRotate = isDefined(autoRotate) ? autoRotate : 'none'; - this.angle = isDefined(angle) ? angle : 0; - this._path = document.createElementNS(SVG_NS, 'path'); - if (path instanceof SVGPathSegList) { - this.segments = path; - } else { - var tempPath = document.createElementNS(SVG_NS, 'path'); - tempPath.setAttribute('d', String(path)); - this.segments = tempPath.pathSegList; - } - } finally { - exitModifyCurrentAnimationState(null); - } -}; - -MotionPathEffect.prototype = createObject(AnimationEffect.prototype, { - get composite() { - return this._composite; - }, - set composite(value) { - enterModifyCurrentAnimationState(); - try { - // Use the default value if an invalid string is specified. - this._composite = value === 'add' ? 'add' : 'replace'; - } finally { - exitModifyCurrentAnimationState(repeatLastTick); - } - }, - get iterationComposite() { - return this._iterationComposite; - }, - set iterationComposite(value) { - enterModifyCurrentAnimationState(); - try { - // Use the default value if an invalid string is specified. - this._iterationComposite = - value === 'accumulate' ? 'accumulate' : 'replace'; - this._updateOffsetPerIteration(); - } finally { - exitModifyCurrentAnimationState(repeatLastTick); - } - }, - _sample: function(timeFraction, currentIteration, target) { - // TODO: Handle accumulation. - var lengthAtTimeFraction = this._lengthAtTimeFraction(timeFraction); - var point = this._path.getPointAtLength(lengthAtTimeFraction); - var x = point.x - target.offsetWidth / 2; - var y = point.y - target.offsetHeight / 2; - if (currentIteration !== 0 && this._offsetPerIteration) { - x += this._offsetPerIteration.x * currentIteration; - y += this._offsetPerIteration.y * currentIteration; - } - // TODO: calc(point.x - 50%) doesn't work? - var value = [{t: 'translate', d: [{px: x}, {px: y}]}]; - var angle = this.angle; - if (this._autoRotate === 'auto-rotate') { - // Super hacks - var lastPoint = this._path.getPointAtLength(lengthAtTimeFraction - 0.01); - var dx = point.x - lastPoint.x; - var dy = point.y - lastPoint.y; - var rotation = Math.atan2(dy, dx); - angle += rotation / 2 / Math.PI * 360; - } - value.push({t: 'rotate', d: [angle]}); - compositor.setAnimatedValue(target, 'transform', - new AddReplaceCompositableValue(value, this.composite)); - }, - _lengthAtTimeFraction: function(timeFraction) { - var segmentCount = this._cumulativeLengths.length - 1; - if (!segmentCount) { - return 0; - } - var scaledFraction = timeFraction * segmentCount; - var index = clamp(Math.floor(scaledFraction), 0, segmentCount); - return this._cumulativeLengths[index] + ((scaledFraction % 1) * ( - this._cumulativeLengths[index + 1] - this._cumulativeLengths[index])); - }, - _updateOffsetPerIteration: function() { - if (this.iterationComposite === 'accumulate' && - this._cumulativeLengths && - this._cumulativeLengths.length > 0) { - this._offsetPerIteration = this._path.getPointAtLength( - this._cumulativeLengths[this._cumulativeLengths.length - 1]); - } else { - this._offsetPerIteration = null; - } - }, - clone: function() { - return new MotionPathEffect(this._path.getAttribute('d')); - }, - toString: function() { - return '<MotionPathEffect>'; - }, - set autoRotate(autoRotate) { - enterModifyCurrentAnimationState(); - try { - this._autoRotate = String(autoRotate); - } finally { - exitModifyCurrentAnimationState(repeatLastTick); - } - }, - get autoRotate() { - return this._autoRotate; - }, - set angle(angle) { - enterModifyCurrentAnimationState(); - try { - // TODO: This should probably be a string with a unit, but the spec - // says it's a double. - this._angle = Number(angle); - } finally { - exitModifyCurrentAnimationState(repeatLastTick); - } - }, - get angle() { - return this._angle; - }, - set segments(segments) { - enterModifyCurrentAnimationState(); - try { - var targetSegments = this.segments; - targetSegments.clear(); - var cumulativeLengths = [0]; - // TODO: *moving* the path segments is not correct, but pathSegList - // is read only - var items = segments.numberOfItems; - while (targetSegments.numberOfItems < items) { - var segment = segments.removeItem(0); - targetSegments.appendItem(segment); - if (segment.pathSegType !== SVGPathSeg.PATHSEG_MOVETO_REL && - segment.pathSegType !== SVGPathSeg.PATHSEG_MOVETO_ABS) { - cumulativeLengths.push(this._path.getTotalLength()); - } - } - this._cumulativeLengths = cumulativeLengths; - this._updateOffsetPerIteration(); - } finally { - exitModifyCurrentAnimationState(repeatLastTick); - } - }, - get segments() { - return this._path.pathSegList; - } -}); - -var shorthandToLonghand = { - background: [ - 'backgroundImage', - 'backgroundPosition', - 'backgroundSize', - 'backgroundRepeat', - 'backgroundAttachment', - 'backgroundOrigin', - 'backgroundClip', - 'backgroundColor' - ], - border: [ - 'borderTopColor', - 'borderTopStyle', - 'borderTopWidth', - 'borderRightColor', - 'borderRightStyle', - 'borderRightWidth', - 'borderBottomColor', - 'borderBottomStyle', - 'borderBottomWidth', - 'borderLeftColor', - 'borderLeftStyle', - 'borderLeftWidth' - ], - borderBottom: [ - 'borderBottomWidth', - 'borderBottomStyle', - 'borderBottomColor' - ], - borderColor: [ - 'borderTopColor', - 'borderRightColor', - 'borderBottomColor', - 'borderLeftColor' - ], - borderLeft: [ - 'borderLeftWidth', - 'borderLeftStyle', - 'borderLeftColor' - ], - borderRadius: [ - 'borderTopLeftRadius', - 'borderTopRightRadius', - 'borderBottomRightRadius', - 'borderBottomLeftRadius' - ], - borderRight: [ - 'borderRightWidth', - 'borderRightStyle', - 'borderRightColor' - ], - borderTop: [ - 'borderTopWidth', - 'borderTopStyle', - 'borderTopColor' - ], - borderWidth: [ - 'borderTopWidth', - 'borderRightWidth', - 'borderBottomWidth', - 'borderLeftWidth' - ], - font: [ - 'fontFamily', - 'fontSize', - 'fontStyle', - 'fontVariant', - 'fontWeight', - 'lineHeight' - ], - margin: [ - 'marginTop', - 'marginRight', - 'marginBottom', - 'marginLeft' - ], - outline: [ - 'outlineColor', - 'outlineStyle', - 'outlineWidth' - ], - padding: [ - 'paddingTop', - 'paddingRight', - 'paddingBottom', - 'paddingLeft' - ] -}; - -// This delegates parsing shorthand value syntax to the browser. -var shorthandExpanderElem = createDummyElement(); -var expandShorthand = function(property, value, result) { - shorthandExpanderElem.style[property] = value; - var longProperties = shorthandToLonghand[property]; - for (var i in longProperties) { - var longProperty = longProperties[i]; - var longhandValue = shorthandExpanderElem.style[longProperty]; - result[longProperty] = longhandValue; - } -}; - -var normalizeKeyframeDictionary = function(properties) { - var result = { - offset: null, - composite: null, - easing: presetTimingFunctions.linear - }; - var animationProperties = []; - for (var property in properties) { - // TODO: Apply the CSS property to IDL attribute algorithm. - if (property === 'offset') { - if (typeof properties.offset === 'number') { - result.offset = properties.offset; - } - } else if (property === 'composite') { - if (properties.composite === 'add' || - properties.composite === 'replace') { - result.composite = properties.composite; - } - } else if (property === 'easing') { - result.easing = TimingFunction.createFromString(properties.easing); - } else { - // TODO: Check whether this is a supported property. - animationProperties.push(property); - } - } - // TODO: Remove prefixed properties if the unprefixed version is also - // supported and present. - animationProperties = animationProperties.sort(playerSortFunction); - for (var i = 0; i < animationProperties.length; i++) { - // TODO: Apply the IDL attribute to CSS property algorithm. - var property = animationProperties[i]; - // TODO: The spec does not specify how to handle null values. - // See https://www.w3.org/Bugs/Public/show_bug.cgi?id=22572 - var value = isDefinedAndNotNull(properties[property]) ? - properties[property].toString() : ''; - if (property in shorthandToLonghand) { - expandShorthand(property, value, result); - } else { - result[property] = value; - } - } - return result; -}; - - - -/** @constructor */ -var KeyframeEffect = function(oneOrMoreKeyframeDictionaries, - composite) { - enterModifyCurrentAnimationState(); - try { - AnimationEffect.call(this, constructorToken); - - this.composite = composite; - - this.setFrames(oneOrMoreKeyframeDictionaries); - } finally { - exitModifyCurrentAnimationState(null); - } -}; - -KeyframeEffect.prototype = createObject(AnimationEffect.prototype, { - get composite() { - return this._composite; - }, - set composite(value) { - enterModifyCurrentAnimationState(); - try { - // Use the default value if an invalid string is specified. - this._composite = value === 'add' ? 'add' : 'replace'; - } finally { - exitModifyCurrentAnimationState(repeatLastTick); - } - }, - getFrames: function() { - return this._keyframeDictionaries.slice(0); - }, - setFrames: function(oneOrMoreKeyframeDictionaries) { - enterModifyCurrentAnimationState(); - try { - if (!Array.isArray(oneOrMoreKeyframeDictionaries)) { - oneOrMoreKeyframeDictionaries = [oneOrMoreKeyframeDictionaries]; - } - this._keyframeDictionaries = - oneOrMoreKeyframeDictionaries.map(normalizeKeyframeDictionary); - // Set lazily - this._cachedPropertySpecificKeyframes = null; - } finally { - exitModifyCurrentAnimationState(repeatLastTick); - } - }, - _sample: function(timeFraction, currentIteration, target) { - var frames = this._propertySpecificKeyframes(); - for (var property in frames) { - compositor.setAnimatedValue(target, property, - this._sampleForProperty( - frames[property], timeFraction, currentIteration)); - } - }, - _sampleForProperty: function(frames, timeFraction, currentIteration) { - ASSERT_ENABLED && assert( - frames.length >= 2, - 'Interpolation requires at least two keyframes'); - - var startKeyframeIndex; - var length = frames.length; - // We extrapolate differently depending on whether or not there are multiple - // keyframes at offsets of 0 and 1. - if (timeFraction < 0.0) { - if (frames[1].offset === 0.0) { - return new AddReplaceCompositableValue(frames[0].rawValue(), - this._compositeForKeyframe(frames[0])); - } else { - startKeyframeIndex = 0; - } - } else if (timeFraction >= 1.0) { - if (frames[length - 2].offset === 1.0) { - return new AddReplaceCompositableValue(frames[length - 1].rawValue(), - this._compositeForKeyframe(frames[length - 1])); - } else { - startKeyframeIndex = length - 2; - } - } else { - for (var i = length - 1; i >= 0; i--) { - if (frames[i].offset <= timeFraction) { - ASSERT_ENABLED && assert(frames[i].offset !== 1.0); - startKeyframeIndex = i; - break; - } - } - } - var startKeyframe = frames[startKeyframeIndex]; - var endKeyframe = frames[startKeyframeIndex + 1]; - if (startKeyframe.offset === timeFraction) { - return new AddReplaceCompositableValue(startKeyframe.rawValue(), - this._compositeForKeyframe(startKeyframe)); - } - if (endKeyframe.offset === timeFraction) { - return new AddReplaceCompositableValue(endKeyframe.rawValue(), - this._compositeForKeyframe(endKeyframe)); - } - var intervalDistance = (timeFraction - startKeyframe.offset) / - (endKeyframe.offset - startKeyframe.offset); - if (startKeyframe.easing) { - intervalDistance = startKeyframe.easing.scaleTime(intervalDistance); - } - return new BlendedCompositableValue( - new AddReplaceCompositableValue(startKeyframe.rawValue(), - this._compositeForKeyframe(startKeyframe)), - new AddReplaceCompositableValue(endKeyframe.rawValue(), - this._compositeForKeyframe(endKeyframe)), - intervalDistance); - }, - _propertySpecificKeyframes: function() { - if (isDefinedAndNotNull(this._cachedPropertySpecificKeyframes)) { - return this._cachedPropertySpecificKeyframes; - } - - this._cachedPropertySpecificKeyframes = {}; - var distributedFrames = this._getDistributedKeyframes(); - for (var i = 0; i < distributedFrames.length; i++) { - for (var property in distributedFrames[i].cssValues) { - if (!(property in this._cachedPropertySpecificKeyframes)) { - this._cachedPropertySpecificKeyframes[property] = []; - } - var frame = distributedFrames[i]; - this._cachedPropertySpecificKeyframes[property].push( - new PropertySpecificKeyframe(frame.offset, frame.composite, - frame.easing, property, frame.cssValues[property])); - } - } - - for (var property in this._cachedPropertySpecificKeyframes) { - var frames = this._cachedPropertySpecificKeyframes[property]; - ASSERT_ENABLED && assert( - frames.length > 0, - 'There should always be keyframes for each property'); - - // Add synthetic keyframes at offsets of 0 and 1 if required. - if (frames[0].offset !== 0.0) { - var keyframe = new PropertySpecificKeyframe(0.0, 'add', - presetTimingFunctions.linear, property, cssNeutralValue); - frames.unshift(keyframe); - } - if (frames[frames.length - 1].offset !== 1.0) { - var keyframe = new PropertySpecificKeyframe(1.0, 'add', - presetTimingFunctions.linear, property, cssNeutralValue); - frames.push(keyframe); - } - ASSERT_ENABLED && assert( - frames.length >= 2, - 'There should be at least two keyframes including' + - ' synthetic keyframes'); - } - - return this._cachedPropertySpecificKeyframes; - }, - clone: function() { - var result = new KeyframeEffect([], this.composite); - result._keyframeDictionaries = this._keyframeDictionaries.slice(0); - return result; - }, - toString: function() { - return '<KeyframeEffect>'; - }, - _compositeForKeyframe: function(keyframe) { - return isDefinedAndNotNull(keyframe.composite) ? - keyframe.composite : this.composite; - }, - _allKeyframesUseSameCompositeOperation: function(keyframes) { - ASSERT_ENABLED && assert( - keyframes.length >= 1, 'This requires at least one keyframe'); - var composite = this._compositeForKeyframe(keyframes[0]); - for (var i = 1; i < keyframes.length; i++) { - if (this._compositeForKeyframe(keyframes[i]) !== composite) { - return false; - } - } - return true; - }, - _areKeyframeDictionariesLooselySorted: function() { - var previousOffset = -Infinity; - for (var i = 0; i < this._keyframeDictionaries.length; i++) { - if (isDefinedAndNotNull(this._keyframeDictionaries[i].offset)) { - if (this._keyframeDictionaries[i].offset < previousOffset) { - return false; - } - previousOffset = this._keyframeDictionaries[i].offset; - } - } - return true; - }, - // The spec describes both this process and the process for interpretting the - // properties of a keyframe dictionary as 'normalizing'. Here we use the term - // 'distributing' to avoid confusion with normalizeKeyframeDictionary(). - _getDistributedKeyframes: function() { - if (!this._areKeyframeDictionariesLooselySorted()) { - return []; - } - - var distributedKeyframes = this._keyframeDictionaries.map( - KeyframeInternal.createFromNormalizedProperties); - - // Remove keyframes with offsets out of bounds. - var length = distributedKeyframes.length; - var count = 0; - for (var i = 0; i < length; i++) { - var offset = distributedKeyframes[i].offset; - if (isDefinedAndNotNull(offset)) { - if (offset >= 0) { - break; - } else { - count = i; - } - } - } - distributedKeyframes.splice(0, count); - - length = distributedKeyframes.length; - count = 0; - for (var i = length - 1; i >= 0; i--) { - var offset = distributedKeyframes[i].offset; - if (isDefinedAndNotNull(offset)) { - if (offset <= 1) { - break; - } else { - count = length - i; - } - } - } - distributedKeyframes.splice(length - count, count); - - // Distribute offsets. - length = distributedKeyframes.length; - if (length > 1 && !isDefinedAndNotNull(distributedKeyframes[0].offset)) { - distributedKeyframes[0].offset = 0; - } - if (length > 0 && - !isDefinedAndNotNull(distributedKeyframes[length - 1].offset)) { - distributedKeyframes[length - 1].offset = 1; - } - var lastOffsetIndex = 0; - var nextOffsetIndex = 0; - for (var i = 1; i < distributedKeyframes.length - 1; i++) { - var keyframe = distributedKeyframes[i]; - if (isDefinedAndNotNull(keyframe.offset)) { - lastOffsetIndex = i; - continue; - } - if (i > nextOffsetIndex) { - nextOffsetIndex = i; - while (!isDefinedAndNotNull( - distributedKeyframes[nextOffsetIndex].offset)) { - nextOffsetIndex++; - } - } - var lastOffset = distributedKeyframes[lastOffsetIndex].offset; - var nextOffset = distributedKeyframes[nextOffsetIndex].offset; - var unspecifiedKeyframes = nextOffsetIndex - lastOffsetIndex - 1; - ASSERT_ENABLED && assert(unspecifiedKeyframes > 0); - var localIndex = i - lastOffsetIndex; - ASSERT_ENABLED && assert(localIndex > 0); - distributedKeyframes[i].offset = lastOffset + - (nextOffset - lastOffset) * localIndex / (unspecifiedKeyframes + 1); - } - - // Remove invalid property values. - for (var i = distributedKeyframes.length - 1; i >= 0; i--) { - var keyframe = distributedKeyframes[i]; - for (var property in keyframe.cssValues) { - if (!KeyframeInternal.isSupportedPropertyValue( - keyframe.cssValues[property])) { - delete(keyframe.cssValues[property]); - } - } - if (Object.keys(keyframe).length === 0) { - distributedKeyframes.splice(i, 1); - } - } - - return distributedKeyframes; - } -}); - - - -/** - * An internal representation of a keyframe. The Keyframe type from the spec is - * just a dictionary and is not exposed. - * - * @constructor - */ -var KeyframeInternal = function(offset, composite, easing) { - ASSERT_ENABLED && assert( - typeof offset === 'number' || offset === null, - 'Invalid offset value'); - ASSERT_ENABLED && assert( - composite === 'add' || composite === 'replace' || composite === null, - 'Invalid composite value'); - this.offset = offset; - this.composite = composite; - this.easing = easing; - this.cssValues = {}; -}; - -KeyframeInternal.prototype = { - addPropertyValuePair: function(property, value) { - ASSERT_ENABLED && assert(!this.cssValues.hasOwnProperty(property)); - this.cssValues[property] = value; - }, - hasValueForProperty: function(property) { - return property in this.cssValues; - } -}; - -KeyframeInternal.isSupportedPropertyValue = function(value) { - ASSERT_ENABLED && assert( - typeof value === 'string' || value === cssNeutralValue); - // TODO: Check this properly! - return value !== ''; -}; - -KeyframeInternal.createFromNormalizedProperties = function(properties) { - ASSERT_ENABLED && assert( - isDefinedAndNotNull(properties) && typeof properties === 'object', - 'Properties must be an object'); - var keyframe = new KeyframeInternal(properties.offset, properties.composite, - properties.easing); - for (var candidate in properties) { - if (candidate !== 'offset' && - candidate !== 'composite' && - candidate !== 'easing') { - keyframe.addPropertyValuePair(candidate, properties[candidate]); - } - } - return keyframe; -}; - - - -/** @constructor */ -var PropertySpecificKeyframe = function(offset, composite, easing, property, - cssValue) { - this.offset = offset; - this.composite = composite; - this.easing = easing; - this.property = property; - this.cssValue = cssValue; - // Calculated lazily - this.cachedRawValue = null; -}; - -PropertySpecificKeyframe.prototype = { - rawValue: function() { - if (!isDefinedAndNotNull(this.cachedRawValue)) { - this.cachedRawValue = fromCssValue(this.property, this.cssValue); - } - return this.cachedRawValue; - } -}; - - - -/** @constructor */ -var TimingFunction = function() { - throw new TypeError('Illegal constructor'); -}; - -TimingFunction.prototype.scaleTime = abstractMethod; - -TimingFunction.createFromString = function(spec, timedItem) { - var preset = presetTimingFunctions[spec]; - if (preset) { - return preset; - } - if (spec === 'paced') { - if (timedItem instanceof Animation && - timedItem.effect instanceof MotionPathEffect) { - return new PacedTimingFunction(timedItem.effect); - } - return presetTimingFunctions.linear; - } - var stepMatch = /steps\(\s*(\d+)\s*,\s*(start|end|middle)\s*\)/.exec(spec); - if (stepMatch) { - return new StepTimingFunction(Number(stepMatch[1]), stepMatch[2]); - } - var bezierMatch = - /cubic-bezier\(([^,]*),([^,]*),([^,]*),([^)]*)\)/.exec(spec); - if (bezierMatch) { - return new CubicBezierTimingFunction([ - Number(bezierMatch[1]), - Number(bezierMatch[2]), - Number(bezierMatch[3]), - Number(bezierMatch[4]) - ]); - } - return presetTimingFunctions.linear; -}; - - - -/** @constructor */ -var CubicBezierTimingFunction = function(spec) { - this.params = spec; - this.map = []; - for (var ii = 0; ii <= 100; ii += 1) { - var i = ii / 100; - this.map.push([ - 3 * i * (1 - i) * (1 - i) * this.params[0] + - 3 * i * i * (1 - i) * this.params[2] + i * i * i, - 3 * i * (1 - i) * (1 - i) * this.params[1] + - 3 * i * i * (1 - i) * this.params[3] + i * i * i - ]); - } -}; - -CubicBezierTimingFunction.prototype = createObject(TimingFunction.prototype, { - scaleTime: function(fraction) { - var fst = 0; - while (fst !== 100 && fraction > this.map[fst][0]) { - fst += 1; - } - if (fraction === this.map[fst][0] || fst === 0) { - return this.map[fst][1]; - } - var yDiff = this.map[fst][1] - this.map[fst - 1][1]; - var xDiff = this.map[fst][0] - this.map[fst - 1][0]; - var p = (fraction - this.map[fst - 1][0]) / xDiff; - return this.map[fst - 1][1] + p * yDiff; - } -}); - - - -/** @constructor */ -var StepTimingFunction = function(numSteps, position) { - this.numSteps = numSteps; - this.position = position || 'end'; -}; - -StepTimingFunction.prototype = createObject(TimingFunction.prototype, { - scaleTime: function(fraction) { - if (fraction >= 1) { - return 1; - } - var stepSize = 1 / this.numSteps; - if (this.position === 'start') { - fraction += stepSize; - } else if (this.position === 'middle') { - fraction += stepSize / 2; - } - return fraction - fraction % stepSize; - } -}); - -var presetTimingFunctions = { - 'linear': null, - 'ease': new CubicBezierTimingFunction([0.25, 0.1, 0.25, 1.0]), - 'ease-in': new CubicBezierTimingFunction([0.42, 0, 1.0, 1.0]), - 'ease-out': new CubicBezierTimingFunction([0, 0, 0.58, 1.0]), - 'ease-in-out': new CubicBezierTimingFunction([0.42, 0, 0.58, 1.0]), - 'step-start': new StepTimingFunction(1, 'start'), - 'step-middle': new StepTimingFunction(1, 'middle'), - 'step-end': new StepTimingFunction(1, 'end') -}; - - - -/** @constructor */ -var PacedTimingFunction = function(pathEffect) { - ASSERT_ENABLED && assert(pathEffect instanceof MotionPathEffect); - this._pathEffect = pathEffect; - // Range is the portion of the effect over which we pace, normalized to - // [0, 1]. - this._range = {min: 0, max: 1}; -}; - -PacedTimingFunction.prototype = createObject(TimingFunction.prototype, { - setRange: function(range) { - ASSERT_ENABLED && assert(range.min >= 0 && range.min <= 1); - ASSERT_ENABLED && assert(range.max >= 0 && range.max <= 1); - ASSERT_ENABLED && assert(range.min < range.max); - this._range = range; - }, - scaleTime: function(fraction) { - var cumulativeLengths = this._pathEffect._cumulativeLengths; - var numSegments = cumulativeLengths.length - 1; - if (!cumulativeLengths[numSegments] || fraction <= 0) { - return this._range.min; - } - if (fraction >= 1) { - return this._range.max; - } - var minLength = this.lengthAtIndex(this._range.min * numSegments); - var maxLength = this.lengthAtIndex(this._range.max * numSegments); - var length = interp(minLength, maxLength, fraction); - var leftIndex = this.findLeftIndex(cumulativeLengths, length); - var leftLength = cumulativeLengths[leftIndex]; - var segmentLength = cumulativeLengths[leftIndex + 1] - leftLength; - if (segmentLength > 0) { - return (leftIndex + (length - leftLength) / segmentLength) / numSegments; - } - return leftLength / cumulativeLengths.length; - }, - findLeftIndex: function(array, value) { - var leftIndex = 0; - var rightIndex = array.length; - while (rightIndex - leftIndex > 1) { - var midIndex = (leftIndex + rightIndex) >> 1; - if (array[midIndex] <= value) { - leftIndex = midIndex; - } else { - rightIndex = midIndex; - } - } - return leftIndex; - }, - lengthAtIndex: function(i) { - ASSERT_ENABLED && - console.assert(i >= 0 && i <= cumulativeLengths.length - 1); - var leftIndex = Math.floor(i); - var startLength = this._pathEffect._cumulativeLengths[leftIndex]; - var endLength = this._pathEffect._cumulativeLengths[leftIndex + 1]; - var indexFraction = i % 1; - return interp(startLength, endLength, indexFraction); - } -}); - -var interp = function(from, to, f, type) { - if (Array.isArray(from) || Array.isArray(to)) { - return interpArray(from, to, f, type); - } - var zero = (type && type.indexOf('scale') === 0) ? 1 : 0; - to = isDefinedAndNotNull(to) ? to : zero; - from = isDefinedAndNotNull(from) ? from : zero; - - return to * f + from * (1 - f); -}; - -var interpArray = function(from, to, f, type) { - ASSERT_ENABLED && assert( - Array.isArray(from) || from === null, - 'From is not an array or null'); - ASSERT_ENABLED && assert( - Array.isArray(to) || to === null, - 'To is not an array or null'); - ASSERT_ENABLED && assert( - from === null || to === null || from.length === to.length, - 'Arrays differ in length ' + from + ' : ' + to); - var length = from ? from.length : to.length; - - var result = []; - for (var i = 0; i < length; i++) { - result[i] = interp(from ? from[i] : null, to ? to[i] : null, f, type); - } - return result; -}; - -var typeWithKeywords = function(keywords, type) { - var isKeyword; - if (keywords.length === 1) { - var keyword = keywords[0]; - isKeyword = function(value) { - return value === keyword; - }; - } else { - isKeyword = function(value) { - return keywords.indexOf(value) >= 0; - }; - } - return createObject(type, { - add: function(base, delta) { - if (isKeyword(base) || isKeyword(delta)) { - return delta; - } - return type.add(base, delta); - }, - interpolate: function(from, to, f) { - if (isKeyword(from) || isKeyword(to)) { - return nonNumericType.interpolate(from, to, f); - } - return type.interpolate(from, to, f); - }, - toCssValue: function(value, svgMode) { - return isKeyword(value) ? value : type.toCssValue(value, svgMode); - }, - fromCssValue: function(value) { - return isKeyword(value) ? value : type.fromCssValue(value); - } - }); -}; - -var numberType = { - add: function(base, delta) { - // If base or delta are 'auto', we fall back to replacement. - if (base === 'auto' || delta === 'auto') { - return nonNumericType.add(base, delta); - } - return base + delta; - }, - interpolate: function(from, to, f) { - // If from or to are 'auto', we fall back to step interpolation. - if (from === 'auto' || to === 'auto') { - return nonNumericType.interpolate(from, to); - } - return interp(from, to, f); - }, - toCssValue: function(value) { return value + ''; }, - fromCssValue: function(value) { - if (value === 'auto') { - return 'auto'; - } - var result = Number(value); - return isNaN(result) ? undefined : result; - } -}; - -var integerType = createObject(numberType, { - interpolate: function(from, to, f) { - // If from or to are 'auto', we fall back to step interpolation. - if (from === 'auto' || to === 'auto') { - return nonNumericType.interpolate(from, to); - } - return Math.floor(interp(from, to, f)); - } -}); - -var fontWeightType = { - add: function(base, delta) { return base + delta; }, - interpolate: function(from, to, f) { - return interp(from, to, f); - }, - toCssValue: function(value) { - value = Math.round(value / 100) * 100; - value = clamp(value, 100, 900); - if (value === 400) { - return 'normal'; - } - if (value === 700) { - return 'bold'; - } - return String(value); - }, - fromCssValue: function(value) { - // TODO: support lighter / darker ? - var out = Number(value); - if (isNaN(out) || out < 100 || out > 900 || out % 100 !== 0) { - return undefined; - } - return out; - } -}; - -// This regular expression is intentionally permissive, so that -// platform-prefixed versions of calc will still be accepted as -// input. While we are restrictive with the transform property -// name, we need to be able to read underlying calc values from -// computedStyle so can't easily restrict the input here. -var outerCalcRE = /^\s*(-webkit-)?calc\s*\(\s*([^)]*)\)/; -var valueRE = /^\s*(-?[0-9]+(\.[0-9])?[0-9]*)([a-zA-Z%]*)/; -var operatorRE = /^\s*([+-])/; -var autoRE = /^\s*auto/i; -var percentLengthType = { - zero: function() { return {}; }, - add: function(base, delta) { - var out = {}; - for (var value in base) { - out[value] = base[value] + (delta[value] || 0); - } - for (value in delta) { - if (value in base) { - continue; - } - out[value] = delta[value]; - } - return out; - }, - interpolate: function(from, to, f) { - var out = {}; - for (var value in from) { - out[value] = interp(from[value], to[value], f); - } - for (var value in to) { - if (value in out) { - continue; - } - out[value] = interp(0, to[value], f); - } - return out; - }, - toCssValue: function(value) { - var s = ''; - var singleValue = true; - for (var item in value) { - if (s === '') { - s = value[item] + item; - } else if (singleValue) { - if (value[item] !== 0) { - s = features.calcFunction + - '(' + s + ' + ' + value[item] + item + ')'; - singleValue = false; - } - } else if (value[item] !== 0) { - s = s.substring(0, s.length - 1) + ' + ' + value[item] + item + ')'; - } - } - return s; - }, - fromCssValue: function(value) { - var result = percentLengthType.consumeValueFromString(value); - if (result) { - return result.value; - } - return undefined; - }, - consumeValueFromString: function(value) { - if (!isDefinedAndNotNull(value)) { - return undefined; - } - var autoMatch = autoRE.exec(value); - if (autoMatch) { - return { - value: { auto: true }, - remaining: value.substring(autoMatch[0].length) - }; - } - var out = {}; - var calcMatch = outerCalcRE.exec(value); - if (!calcMatch) { - var singleValue = valueRE.exec(value); - if (singleValue && (singleValue.length === 4)) { - out[singleValue[3]] = Number(singleValue[1]); - return { - value: out, - remaining: value.substring(singleValue[0].length) - }; - } - return undefined; - } - var remaining = value.substring(calcMatch[0].length); - var calcInnards = calcMatch[2]; - var firstTime = true; - while (true) { - var reversed = false; - if (firstTime) { - firstTime = false; - } else { - var op = operatorRE.exec(calcInnards); - if (!op) { - return undefined; - } - if (op[1] === '-') { - reversed = true; - } - calcInnards = calcInnards.substring(op[0].length); - } - value = valueRE.exec(calcInnards); - if (!value) { - return undefined; - } - var valueUnit = value[3]; - var valueNumber = Number(value[1]); - if (!isDefinedAndNotNull(out[valueUnit])) { - out[valueUnit] = 0; - } - if (reversed) { - out[valueUnit] -= valueNumber; - } else { - out[valueUnit] += valueNumber; - } - calcInnards = calcInnards.substring(value[0].length); - if (/\s*/.exec(calcInnards)[0].length === calcInnards.length) { - return { - value: out, - remaining: remaining - }; - } - } - }, - negate: function(value) { - var out = {}; - for (var unit in value) { - out[unit] = -value[unit]; - } - return out; - } -}; - -var percentLengthAutoType = typeWithKeywords(['auto'], percentLengthType); - -var positionKeywordRE = /^\s*left|^\s*center|^\s*right|^\s*top|^\s*bottom/i; -var positionType = { - zero: function() { return [{ px: 0 }, { px: 0 }]; }, - add: function(base, delta) { - return [ - percentLengthType.add(base[0], delta[0]), - percentLengthType.add(base[1], delta[1]) - ]; - }, - interpolate: function(from, to, f) { - return [ - percentLengthType.interpolate(from[0], to[0], f), - percentLengthType.interpolate(from[1], to[1], f) - ]; - }, - toCssValue: function(value) { - return value.map(percentLengthType.toCssValue).join(' '); - }, - fromCssValue: function(value) { - var tokens = positionType.consumeAllTokensFromString(value); - if (!tokens || tokens.length > 4) { - return undefined; - } - - if (tokens.length === 1) { - var token = tokens[0]; - return (positionType.isHorizontalToken(token) ? - [token, 'center'] : ['center', token]).map(positionType.resolveToken); - } - - if (tokens.length === 2 && - positionType.isHorizontalToken(tokens[0]) && - positionType.isVerticalToken(tokens[1])) { - return tokens.map(positionType.resolveToken); - } - - if (tokens.filter(positionType.isKeyword).length !== 2) { - return undefined; - } - - var out = [undefined, undefined]; - var center = false; - for (var i = 0; i < tokens.length; i++) { - var token = tokens[i]; - if (!positionType.isKeyword(token)) { - return undefined; - } - if (token === 'center') { - if (center) { - return undefined; - } - center = true; - continue; - } - var axis = Number(positionType.isVerticalToken(token)); - if (out[axis]) { - return undefined; - } - if (i === tokens.length - 1 || positionType.isKeyword(tokens[i + 1])) { - out[axis] = positionType.resolveToken(token); - continue; - } - var percentLength = tokens[++i]; - if (token === 'bottom' || token === 'right') { - percentLength = percentLengthType.negate(percentLength); - percentLength['%'] = (percentLength['%'] || 0) + 100; - } - out[axis] = percentLength; - } - if (center) { - if (!out[0]) { - out[0] = positionType.resolveToken('center'); - } else if (!out[1]) { - out[1] = positionType.resolveToken('center'); - } else { - return undefined; - } - } - return out.every(isDefinedAndNotNull) ? out : undefined; - }, - consumeAllTokensFromString: function(remaining) { - var tokens = []; - while (remaining.trim()) { - var result = positionType.consumeTokenFromString(remaining); - if (!result) { - return undefined; - } - tokens.push(result.value); - remaining = result.remaining; - } - return tokens; - }, - consumeTokenFromString: function(value) { - var keywordMatch = positionKeywordRE.exec(value); - if (keywordMatch) { - return { - value: keywordMatch[0].trim().toLowerCase(), - remaining: value.substring(keywordMatch[0].length) - }; - } - return percentLengthType.consumeValueFromString(value); - }, - resolveToken: function(token) { - if (typeof token === 'string') { - return percentLengthType.fromCssValue({ - left: '0%', - center: '50%', - right: '100%', - top: '0%', - bottom: '100%' - }[token]); - } - return token; - }, - isHorizontalToken: function(token) { - if (typeof token === 'string') { - return token in { left: true, center: true, right: true }; - } - return true; - }, - isVerticalToken: function(token) { - if (typeof token === 'string') { - return token in { top: true, center: true, bottom: true }; - } - return true; - }, - isKeyword: function(token) { - return typeof token === 'string'; - } -}; - -// Spec: http://dev.w3.org/csswg/css-backgrounds/#background-position -var positionListType = { - zero: function() { return [positionType.zero()]; }, - add: function(base, delta) { - var out = []; - var maxLength = Math.max(base.length, delta.length); - for (var i = 0; i < maxLength; i++) { - var basePosition = base[i] ? base[i] : positionType.zero(); - var deltaPosition = delta[i] ? delta[i] : positionType.zero(); - out.push(positionType.add(basePosition, deltaPosition)); - } - return out; - }, - interpolate: function(from, to, f) { - var out = []; - var maxLength = Math.max(from.length, to.length); - for (var i = 0; i < maxLength; i++) { - var fromPosition = from[i] ? from[i] : positionType.zero(); - var toPosition = to[i] ? to[i] : positionType.zero(); - out.push(positionType.interpolate(fromPosition, toPosition, f)); - } - return out; - }, - toCssValue: function(value) { - return value.map(positionType.toCssValue).join(', '); - }, - fromCssValue: function(value) { - if (!isDefinedAndNotNull(value)) { - return undefined; - } - if (!value.trim()) { - return [positionType.fromCssValue('0% 0%')]; - } - var positionValues = value.split(','); - var out = positionValues.map(positionType.fromCssValue); - return out.every(isDefinedAndNotNull) ? out : undefined; - } -}; - -var rectangleRE = /rect\(([^,]+),([^,]+),([^,]+),([^)]+)\)/; -var rectangleType = { - add: function(base, delta) { - return { - top: percentLengthType.add(base.top, delta.top), - right: percentLengthType.add(base.right, delta.right), - bottom: percentLengthType.add(base.bottom, delta.bottom), - left: percentLengthType.add(base.left, delta.left) - }; - }, - interpolate: function(from, to, f) { - return { - top: percentLengthType.interpolate(from.top, to.top, f), - right: percentLengthType.interpolate(from.right, to.right, f), - bottom: percentLengthType.interpolate(from.bottom, to.bottom, f), - left: percentLengthType.interpolate(from.left, to.left, f) - }; - }, - toCssValue: function(value) { - return 'rect(' + - percentLengthType.toCssValue(value.top) + ',' + - percentLengthType.toCssValue(value.right) + ',' + - percentLengthType.toCssValue(value.bottom) + ',' + - percentLengthType.toCssValue(value.left) + ')'; - }, - fromCssValue: function(value) { - var match = rectangleRE.exec(value); - if (!match) { - return undefined; - } - var out = { - top: percentLengthType.fromCssValue(match[1]), - right: percentLengthType.fromCssValue(match[2]), - bottom: percentLengthType.fromCssValue(match[3]), - left: percentLengthType.fromCssValue(match[4]) - }; - if (out.top && out.right && out.bottom && out.left) { - return out; - } - return undefined; - } -}; - -var originType = { - zero: function() { return [{'%': 0}, {'%': 0}, {px: 0}]; }, - add: function(base, delta) { - return [ - percentLengthType.add(base[0], delta[0]), - percentLengthType.add(base[1], delta[1]), - percentLengthType.add(base[2], delta[2]) - ]; - }, - interpolate: function(from, to, f) { - return [ - percentLengthType.interpolate(from[0], to[0], f), - percentLengthType.interpolate(from[1], to[1], f), - percentLengthType.interpolate(from[2], to[2], f) - ]; - }, - toCssValue: function(value) { - var result = percentLengthType.toCssValue(value[0]) + ' ' + - percentLengthType.toCssValue(value[1]); - // Return the third value if it is non-zero. - for (var unit in value[2]) { - if (value[2][unit] !== 0) { - return result + ' ' + percentLengthType.toCssValue(value[2]); - } - } - return result; - }, - fromCssValue: function(value) { - var tokens = positionType.consumeAllTokensFromString(value); - if (!tokens) { - return undefined; - } - var out = ['center', 'center', {px: 0}]; - switch (tokens.length) { - case 0: - return originType.zero(); - case 1: - if (positionType.isHorizontalToken(tokens[0])) { - out[0] = tokens[0]; - } else if (positionType.isVerticalToken(tokens[0])) { - out[1] = tokens[0]; - } else { - return undefined; - } - return out.map(positionType.resolveToken); - case 3: - if (positionType.isKeyword(tokens[2])) { - return undefined; - } - out[2] = tokens[2]; - case 2: - if (positionType.isHorizontalToken(tokens[0]) && - positionType.isVerticalToken(tokens[1])) { - out[0] = tokens[0]; - out[1] = tokens[1]; - } else if (positionType.isVerticalToken(tokens[0]) && - positionType.isHorizontalToken(tokens[1])) { - out[0] = tokens[1]; - out[1] = tokens[0]; - } else { - return undefined; - } - return out.map(positionType.resolveToken); - default: - return undefined; - } - } -}; - -var shadowType = { - zero: function() { - return { - hOffset: lengthType.zero(), - vOffset: lengthType.zero() - }; - }, - _addSingle: function(base, delta) { - if (base && delta && base.inset !== delta.inset) { - return delta; - } - var result = { - inset: base ? base.inset : delta.inset, - hOffset: lengthType.add( - base ? base.hOffset : lengthType.zero(), - delta ? delta.hOffset : lengthType.zero()), - vOffset: lengthType.add( - base ? base.vOffset : lengthType.zero(), - delta ? delta.vOffset : lengthType.zero()), - blur: lengthType.add( - base && base.blur || lengthType.zero(), - delta && delta.blur || lengthType.zero()) - }; - if (base && base.spread || delta && delta.spread) { - result.spread = lengthType.add( - base && base.spread || lengthType.zero(), - delta && delta.spread || lengthType.zero()); - } - if (base && base.color || delta && delta.color) { - result.color = colorType.add( - base && base.color || colorType.zero(), - delta && delta.color || colorType.zero()); - } - return result; - }, - add: function(base, delta) { - var result = []; - for (var i = 0; i < base.length || i < delta.length; i++) { - result.push(this._addSingle(base[i], delta[i])); - } - return result; - }, - _interpolateSingle: function(from, to, f) { - if (from && to && from.inset !== to.inset) { - return f < 0.5 ? from : to; - } - var result = { - inset: from ? from.inset : to.inset, - hOffset: lengthType.interpolate( - from ? from.hOffset : lengthType.zero(), - to ? to.hOffset : lengthType.zero(), f), - vOffset: lengthType.interpolate( - from ? from.vOffset : lengthType.zero(), - to ? to.vOffset : lengthType.zero(), f), - blur: lengthType.interpolate( - from && from.blur || lengthType.zero(), - to && to.blur || lengthType.zero(), f) - }; - if (from && from.spread || to && to.spread) { - result.spread = lengthType.interpolate( - from && from.spread || lengthType.zero(), - to && to.spread || lengthType.zero(), f); - } - if (from && from.color || to && to.color) { - result.color = colorType.interpolate( - from && from.color || colorType.zero(), - to && to.color || colorType.zero(), f); - } - return result; - }, - interpolate: function(from, to, f) { - var result = []; - for (var i = 0; i < from.length || i < to.length; i++) { - result.push(this._interpolateSingle(from[i], to[i], f)); - } - return result; - }, - _toCssValueSingle: function(value) { - return (value.inset ? 'inset ' : '') + - lengthType.toCssValue(value.hOffset) + ' ' + - lengthType.toCssValue(value.vOffset) + ' ' + - lengthType.toCssValue(value.blur) + - (value.spread ? ' ' + lengthType.toCssValue(value.spread) : '') + - (value.color ? ' ' + colorType.toCssValue(value.color) : ''); - }, - toCssValue: function(value) { - return value.map(this._toCssValueSingle).join(', '); - }, - fromCssValue: function(value) { - var shadowRE = /(([^(,]+(\([^)]*\))?)+)/g; - var match; - var shadows = []; - while ((match = shadowRE.exec(value)) !== null) { - shadows.push(match[0]); - } - - var result = shadows.map(function(value) { - if (value === 'none') { - return shadowType.zero(); - } - value = value.replace(/^\s+|\s+$/g, ''); - - var partsRE = /([^ (]+(\([^)]*\))?)/g; - var parts = []; - while ((match = partsRE.exec(value)) !== null) { - parts.push(match[0]); - } - - if (parts.length < 2 || parts.length > 7) { - return undefined; - } - var result = { - inset: false - }; - - var lengths = []; - while (parts.length) { - var part = parts.shift(); - - var length = lengthType.fromCssValue(part); - if (length) { - lengths.push(length); - continue; - } - - var color = colorType.fromCssValue(part); - if (color) { - result.color = color; - } - - if (part === 'inset') { - result.inset = true; - } - } - - if (lengths.length < 2 || lengths.length > 4) { - return undefined; - } - result.hOffset = lengths[0]; - result.vOffset = lengths[1]; - if (lengths.length > 2) { - result.blur = lengths[2]; - } - if (lengths.length > 3) { - result.spread = lengths[3]; - } - return result; - }); - - return result.every(isDefined) ? result : undefined; - } -}; - -var nonNumericType = { - add: function(base, delta) { - return isDefined(delta) ? delta : base; - }, - interpolate: function(from, to, f) { - return f < 0.5 ? from : to; - }, - toCssValue: function(value) { - return value; - }, - fromCssValue: function(value) { - return value; - } -}; - -var visibilityType = createObject(nonNumericType, { - interpolate: function(from, to, f) { - if (from !== 'visible' && to !== 'visible') { - return nonNumericType.interpolate(from, to, f); - } - if (f <= 0) { - return from; - } - if (f >= 1) { - return to; - } - return 'visible'; - }, - fromCssValue: function(value) { - if (['visible', 'hidden', 'collapse'].indexOf(value) !== -1) { - return value; - } - return undefined; - } -}); - -var lengthType = percentLengthType; -var lengthAutoType = typeWithKeywords(['auto'], lengthType); - -var colorRE = new RegExp( - '(hsla?|rgba?)\\(' + - '([\\-0-9]+%?),?\\s*' + - '([\\-0-9]+%?),?\\s*' + - '([\\-0-9]+%?)(?:,?\\s*([\\-0-9\\.]+%?))?' + - '\\)'); -var colorHashRE = new RegExp( - '#([0-9A-Fa-f][0-9A-Fa-f]?)' + - '([0-9A-Fa-f][0-9A-Fa-f]?)' + - '([0-9A-Fa-f][0-9A-Fa-f]?)'); - -function hsl2rgb(h, s, l) { - // Cribbed from http://dev.w3.org/csswg/css-color/#hsl-color - // Wrap to 0->360 degrees (IE -10 === 350) then normalize - h = (((h % 360) + 360) % 360) / 360; - s = s / 100; - l = l / 100; - function hue2rgb(m1, m2, h) { - if (h < 0) { - h += 1; - } - if (h > 1) { - h -= 1; - } - if (h * 6 < 1) { - return m1 + (m2 - m1) * h * 6; - } - if (h * 2 < 1) { - return m2; - } - if (h * 3 < 2) { - return m1 + (m2 - m1) * (2 / 3 - h) * 6; - } - return m1; - } - var m2; - if (l <= 0.5) { - m2 = l * (s + 1); - } else { - m2 = l + s - l * s; - } - - var m1 = l * 2 - m2; - var r = Math.ceil(hue2rgb(m1, m2, h + 1 / 3) * 255); - var g = Math.ceil(hue2rgb(m1, m2, h) * 255); - var b = Math.ceil(hue2rgb(m1, m2, h - 1 / 3) * 255); - return [r, g, b]; -} - -var namedColors = { - aliceblue: [240, 248, 255, 1], - antiquewhite: [250, 235, 215, 1], - aqua: [0, 255, 255, 1], - aquamarine: [127, 255, 212, 1], - azure: [240, 255, 255, 1], - beige: [245, 245, 220, 1], - bisque: [255, 228, 196, 1], - black: [0, 0, 0, 1], - blanchedalmond: [255, 235, 205, 1], - blue: [0, 0, 255, 1], - blueviolet: [138, 43, 226, 1], - brown: [165, 42, 42, 1], - burlywood: [222, 184, 135, 1], - cadetblue: [95, 158, 160, 1], - chartreuse: [127, 255, 0, 1], - chocolate: [210, 105, 30, 1], - coral: [255, 127, 80, 1], - cornflowerblue: [100, 149, 237, 1], - cornsilk: [255, 248, 220, 1], - crimson: [220, 20, 60, 1], - cyan: [0, 255, 255, 1], - darkblue: [0, 0, 139, 1], - darkcyan: [0, 139, 139, 1], - darkgoldenrod: [184, 134, 11, 1], - darkgray: [169, 169, 169, 1], - darkgreen: [0, 100, 0, 1], - darkgrey: [169, 169, 169, 1], - darkkhaki: [189, 183, 107, 1], - darkmagenta: [139, 0, 139, 1], - darkolivegreen: [85, 107, 47, 1], - darkorange: [255, 140, 0, 1], - darkorchid: [153, 50, 204, 1], - darkred: [139, 0, 0, 1], - darksalmon: [233, 150, 122, 1], - darkseagreen: [143, 188, 143, 1], - darkslateblue: [72, 61, 139, 1], - darkslategray: [47, 79, 79, 1], - darkslategrey: [47, 79, 79, 1], - darkturquoise: [0, 206, 209, 1], - darkviolet: [148, 0, 211, 1], - deeppink: [255, 20, 147, 1], - deepskyblue: [0, 191, 255, 1], - dimgray: [105, 105, 105, 1], - dimgrey: [105, 105, 105, 1], - dodgerblue: [30, 144, 255, 1], - firebrick: [178, 34, 34, 1], - floralwhite: [255, 250, 240, 1], - forestgreen: [34, 139, 34, 1], - fuchsia: [255, 0, 255, 1], - gainsboro: [220, 220, 220, 1], - ghostwhite: [248, 248, 255, 1], - gold: [255, 215, 0, 1], - goldenrod: [218, 165, 32, 1], - gray: [128, 128, 128, 1], - green: [0, 128, 0, 1], - greenyellow: [173, 255, 47, 1], - grey: [128, 128, 128, 1], - honeydew: [240, 255, 240, 1], - hotpink: [255, 105, 180, 1], - indianred: [205, 92, 92, 1], - indigo: [75, 0, 130, 1], - ivory: [255, 255, 240, 1], - khaki: [240, 230, 140, 1], - lavender: [230, 230, 250, 1], - lavenderblush: [255, 240, 245, 1], - lawngreen: [124, 252, 0, 1], - lemonchiffon: [255, 250, 205, 1], - lightblue: [173, 216, 230, 1], - lightcoral: [240, 128, 128, 1], - lightcyan: [224, 255, 255, 1], - lightgoldenrodyellow: [250, 250, 210, 1], - lightgray: [211, 211, 211, 1], - lightgreen: [144, 238, 144, 1], - lightgrey: [211, 211, 211, 1], - lightpink: [255, 182, 193, 1], - lightsalmon: [255, 160, 122, 1], - lightseagreen: [32, 178, 170, 1], - lightskyblue: [135, 206, 250, 1], - lightslategray: [119, 136, 153, 1], - lightslategrey: [119, 136, 153, 1], - lightsteelblue: [176, 196, 222, 1], - lightyellow: [255, 255, 224, 1], - lime: [0, 255, 0, 1], - limegreen: [50, 205, 50, 1], - linen: [250, 240, 230, 1], - magenta: [255, 0, 255, 1], - maroon: [128, 0, 0, 1], - mediumaquamarine: [102, 205, 170, 1], - mediumblue: [0, 0, 205, 1], - mediumorchid: [186, 85, 211, 1], - mediumpurple: [147, 112, 219, 1], - mediumseagreen: [60, 179, 113, 1], - mediumslateblue: [123, 104, 238, 1], - mediumspringgreen: [0, 250, 154, 1], - mediumturquoise: [72, 209, 204, 1], - mediumvioletred: [199, 21, 133, 1], - midnightblue: [25, 25, 112, 1], - mintcream: [245, 255, 250, 1], - mistyrose: [255, 228, 225, 1], - moccasin: [255, 228, 181, 1], - navajowhite: [255, 222, 173, 1], - navy: [0, 0, 128, 1], - oldlace: [253, 245, 230, 1], - olive: [128, 128, 0, 1], - olivedrab: [107, 142, 35, 1], - orange: [255, 165, 0, 1], - orangered: [255, 69, 0, 1], - orchid: [218, 112, 214, 1], - palegoldenrod: [238, 232, 170, 1], - palegreen: [152, 251, 152, 1], - paleturquoise: [175, 238, 238, 1], - palevioletred: [219, 112, 147, 1], - papayawhip: [255, 239, 213, 1], - peachpuff: [255, 218, 185, 1], - peru: [205, 133, 63, 1], - pink: [255, 192, 203, 1], - plum: [221, 160, 221, 1], - powderblue: [176, 224, 230, 1], - purple: [128, 0, 128, 1], - red: [255, 0, 0, 1], - rosybrown: [188, 143, 143, 1], - royalblue: [65, 105, 225, 1], - saddlebrown: [139, 69, 19, 1], - salmon: [250, 128, 114, 1], - sandybrown: [244, 164, 96, 1], - seagreen: [46, 139, 87, 1], - seashell: [255, 245, 238, 1], - sienna: [160, 82, 45, 1], - silver: [192, 192, 192, 1], - skyblue: [135, 206, 235, 1], - slateblue: [106, 90, 205, 1], - slategray: [112, 128, 144, 1], - slategrey: [112, 128, 144, 1], - snow: [255, 250, 250, 1], - springgreen: [0, 255, 127, 1], - steelblue: [70, 130, 180, 1], - tan: [210, 180, 140, 1], - teal: [0, 128, 128, 1], - thistle: [216, 191, 216, 1], - tomato: [255, 99, 71, 1], - transparent: [0, 0, 0, 0], - turquoise: [64, 224, 208, 1], - violet: [238, 130, 238, 1], - wheat: [245, 222, 179, 1], - white: [255, 255, 255, 1], - whitesmoke: [245, 245, 245, 1], - yellow: [255, 255, 0, 1], - yellowgreen: [154, 205, 50, 1] -}; - -var colorType = typeWithKeywords(['currentColor'], { - zero: function() { return [0, 0, 0, 0]; }, - _premultiply: function(value) { - var alpha = value[3]; - return [value[0] * alpha, value[1] * alpha, value[2] * alpha]; - }, - add: function(base, delta) { - var alpha = Math.min(base[3] + delta[3], 1); - if (alpha === 0) { - return [0, 0, 0, 0]; - } - base = this._premultiply(base); - delta = this._premultiply(delta); - return [(base[0] + delta[0]) / alpha, (base[1] + delta[1]) / alpha, - (base[2] + delta[2]) / alpha, alpha]; - }, - interpolate: function(from, to, f) { - var alpha = clamp(interp(from[3], to[3], f), 0, 1); - if (alpha === 0) { - return [0, 0, 0, 0]; - } - from = this._premultiply(from); - to = this._premultiply(to); - return [interp(from[0], to[0], f) / alpha, - interp(from[1], to[1], f) / alpha, - interp(from[2], to[2], f) / alpha, alpha]; - }, - toCssValue: function(value) { - return 'rgba(' + Math.round(value[0]) + ', ' + Math.round(value[1]) + - ', ' + Math.round(value[2]) + ', ' + value[3] + ')'; - }, - fromCssValue: function(value) { - // http://dev.w3.org/csswg/css-color/#color - var out = []; - - var regexResult = colorHashRE.exec(value); - if (regexResult) { - if (value.length !== 4 && value.length !== 7) { - return undefined; - } - - var out = []; - regexResult.shift(); - for (var i = 0; i < 3; i++) { - if (regexResult[i].length === 1) { - regexResult[i] = regexResult[i] + regexResult[i]; - } - var v = Math.max(Math.min(parseInt(regexResult[i], 16), 255), 0); - out[i] = v; - } - out.push(1.0); - } - - var regexResult = colorRE.exec(value); - if (regexResult) { - regexResult.shift(); - var type = regexResult.shift().substr(0, 3); - for (var i = 0; i < 3; i++) { - var m = 1; - if (regexResult[i][regexResult[i].length - 1] === '%') { - regexResult[i] = regexResult[i].substr(0, regexResult[i].length - 1); - m = 255.0 / 100.0; - } - if (type === 'rgb') { - out[i] = clamp(Math.round(parseInt(regexResult[i], 10) * m), 0, 255); - } else { - out[i] = parseInt(regexResult[i], 10); - } - } - - // Convert hsl values to rgb value - if (type === 'hsl') { - out = hsl2rgb.apply(null, out); - } - - if (typeof regexResult[3] !== 'undefined') { - out[3] = Math.max(Math.min(parseFloat(regexResult[3]), 1.0), 0.0); - } else { - out.push(1.0); - } - } - - if (out.some(isNaN)) { - return undefined; - } - if (out.length > 0) { - return out; - } - return namedColors[value]; - } -}); - -var convertToDeg = function(num, type) { - switch (type) { - case 'grad': - return num / 400 * 360; - case 'rad': - return num / 2 / Math.PI * 360; - case 'turn': - return num * 360; - default: - return num; - } -}; - -var extractValue = function(values, pos, hasUnits) { - var value = Number(values[pos]); - if (!hasUnits) { - return value; - } - var type = values[pos + 1]; - if (type === '') { type = 'px'; } - var result = {}; - result[type] = value; - return result; -}; - -var extractValues = function(values, numValues, hasOptionalValue, - hasUnits) { - var result = []; - for (var i = 0; i < numValues; i++) { - result.push(extractValue(values, 1 + 2 * i, hasUnits)); - } - if (hasOptionalValue && values[1 + 2 * numValues]) { - result.push(extractValue(values, 1 + 2 * numValues, hasUnits)); - } - return result; -}; - -var SPACES = '\\s*'; -var NUMBER = '[+-]?(?:\\d+|\\d*\\.\\d+)'; -var RAW_OPEN_BRACKET = '\\('; -var RAW_CLOSE_BRACKET = '\\)'; -var RAW_COMMA = ','; -var UNIT = '[a-zA-Z%]*'; -var START = '^'; - -function capture(x) { return '(' + x + ')'; } -function optional(x) { return '(?:' + x + ')?'; } - -var OPEN_BRACKET = [SPACES, RAW_OPEN_BRACKET, SPACES].join(''); -var CLOSE_BRACKET = [SPACES, RAW_CLOSE_BRACKET, SPACES].join(''); -var COMMA = [SPACES, RAW_COMMA, SPACES].join(''); -var UNIT_NUMBER = [capture(NUMBER), capture(UNIT)].join(''); - -function transformRE(name, numParms, hasOptionalParm) { - var tokenList = [START, SPACES, name, OPEN_BRACKET]; - for (var i = 0; i < numParms - 1; i++) { - tokenList.push(UNIT_NUMBER); - tokenList.push(COMMA); - } - tokenList.push(UNIT_NUMBER); - if (hasOptionalParm) { - tokenList.push(optional([COMMA, UNIT_NUMBER].join(''))); - } - tokenList.push(CLOSE_BRACKET); - return new RegExp(tokenList.join('')); -} - -function buildMatcher(name, numValues, hasOptionalValue, hasUnits, - baseValue) { - var baseName = name; - if (baseValue) { - if (name[name.length - 1] === 'X' || name[name.length - 1] === 'Y') { - baseName = name.substring(0, name.length - 1); - } else if (name[name.length - 1] === 'Z') { - baseName = name.substring(0, name.length - 1) + '3d'; - } - } - - var f = function(x) { - var r = extractValues(x, numValues, hasOptionalValue, hasUnits); - if (baseValue !== undefined) { - if (name[name.length - 1] === 'X') { - r.push(baseValue); - } else if (name[name.length - 1] === 'Y') { - r = [baseValue].concat(r); - } else if (name[name.length - 1] === 'Z') { - r = [baseValue, baseValue].concat(r); - } else if (hasOptionalValue) { - while (r.length < 2) { - if (baseValue === 'copy') { - r.push(r[0]); - } else { - r.push(baseValue); - } - } - } - } - return r; - }; - return [transformRE(name, numValues, hasOptionalValue), f, baseName]; -} - -function buildRotationMatcher(name, numValues, hasOptionalValue, - baseValue) { - var m = buildMatcher(name, numValues, hasOptionalValue, true, baseValue); - - var f = function(x) { - var r = m[1](x); - return r.map(function(v) { - var result = 0; - for (var type in v) { - result += convertToDeg(v[type], type); - } - return result; - }); - }; - return [m[0], f, m[2]]; -} - -function build3DRotationMatcher() { - var m = buildMatcher('rotate3d', 4, false, true); - var f = function(x) { - var r = m[1](x); - var out = []; - for (var i = 0; i < 3; i++) { - out.push(r[i].px); - } - var angle = 0; - for (var unit in r[3]) { - angle += convertToDeg(r[3][unit], unit); - } - out.push(angle); - return out; - }; - return [m[0], f, m[2]]; -} - -var transformREs = [ - buildRotationMatcher('rotate', 1, false), - buildRotationMatcher('rotateX', 1, false), - buildRotationMatcher('rotateY', 1, false), - buildRotationMatcher('rotateZ', 1, false), - build3DRotationMatcher(), - buildRotationMatcher('skew', 1, true, 0), - buildRotationMatcher('skewX', 1, false), - buildRotationMatcher('skewY', 1, false), - buildMatcher('translateX', 1, false, true, {px: 0}), - buildMatcher('translateY', 1, false, true, {px: 0}), - buildMatcher('translateZ', 1, false, true, {px: 0}), - buildMatcher('translate', 1, true, true, {px: 0}), - buildMatcher('translate3d', 3, false, true), - buildMatcher('scale', 1, true, false, 'copy'), - buildMatcher('scaleX', 1, false, false, 1), - buildMatcher('scaleY', 1, false, false, 1), - buildMatcher('scaleZ', 1, false, false, 1), - buildMatcher('scale3d', 3, false, false), - buildMatcher('perspective', 1, false, true), - buildMatcher('matrix', 6, false, false), - buildMatcher('matrix3d', 16, false, false) -]; - -var decomposeMatrix = (function() { - // this is only ever used on the perspective matrix, which has 0, 0, 0, 1 as - // last column - function determinant(m) { - return m[0][0] * m[1][1] * m[2][2] + - m[1][0] * m[2][1] * m[0][2] + - m[2][0] * m[0][1] * m[1][2] - - m[0][2] * m[1][1] * m[2][0] - - m[1][2] * m[2][1] * m[0][0] - - m[2][2] * m[0][1] * m[1][0]; - } - - // from Wikipedia: - // - // [A B]^-1 = [A^-1 + A^-1B(D - CA^-1B)^-1CA^-1 -A^-1B(D - CA^-1B)^-1] - // [C D] [-(D - CA^-1B)^-1CA^-1 (D - CA^-1B)^-1 ] - // - // Therefore - // - // [A [0]]^-1 = [A^-1 [0]] - // [C 1 ] [ -CA^-1 1 ] - function inverse(m) { - var iDet = 1 / determinant(m); - var a = m[0][0], b = m[0][1], c = m[0][2]; - var d = m[1][0], e = m[1][1], f = m[1][2]; - var g = m[2][0], h = m[2][1], k = m[2][2]; - var Ainv = [ - [(e * k - f * h) * iDet, (c * h - b * k) * iDet, - (b * f - c * e) * iDet, 0], - [(f * g - d * k) * iDet, (a * k - c * g) * iDet, - (c * d - a * f) * iDet, 0], - [(d * h - e * g) * iDet, (g * b - a * h) * iDet, - (a * e - b * d) * iDet, 0] - ]; - var lastRow = []; - for (var i = 0; i < 3; i++) { - var val = 0; - for (var j = 0; j < 3; j++) { - val += m[3][j] * Ainv[j][i]; - } - lastRow.push(val); - } - lastRow.push(1); - Ainv.push(lastRow); - return Ainv; - } - - function transposeMatrix4(m) { - return [[m[0][0], m[1][0], m[2][0], m[3][0]], - [m[0][1], m[1][1], m[2][1], m[3][1]], - [m[0][2], m[1][2], m[2][2], m[3][2]], - [m[0][3], m[1][3], m[2][3], m[3][3]]]; - } - - function multVecMatrix(v, m) { - var result = []; - for (var i = 0; i < 4; i++) { - var val = 0; - for (var j = 0; j < 4; j++) { - val += v[j] * m[j][i]; - } - result.push(val); - } - return result; - } - - function normalize(v) { - var len = length(v); - return [v[0] / len, v[1] / len, v[2] / len]; - } - - function length(v) { - return Math.sqrt(v[0] * v[0] + v[1] * v[1] + v[2] * v[2]); - } - - function combine(v1, v2, v1s, v2s) { - return [v1s * v1[0] + v2s * v2[0], v1s * v1[1] + v2s * v2[1], - v1s * v1[2] + v2s * v2[2]]; - } - - function cross(v1, v2) { - return [v1[1] * v2[2] - v1[2] * v2[1], - v1[2] * v2[0] - v1[0] * v2[2], - v1[0] * v2[1] - v1[1] * v2[0]]; - } - - // TODO: Implement 2D matrix decomposition. - // http://dev.w3.org/csswg/css-transforms/#decomposing-a-2d-matrix - function decomposeMatrix(matrix) { - var m3d = [ - matrix.slice(0, 4), - matrix.slice(4, 8), - matrix.slice(8, 12), - matrix.slice(12, 16) - ]; - - // skip normalization step as m3d[3][3] should always be 1 - if (m3d[3][3] !== 1) { - throw 'attempt to decompose non-normalized matrix'; - } - - var perspectiveMatrix = m3d.concat(); // copy m3d - for (var i = 0; i < 3; i++) { - perspectiveMatrix[i][3] = 0; - } - - if (determinant(perspectiveMatrix) === 0) { - return false; - } - - var rhs = []; - - var perspective; - if (m3d[0][3] !== 0 || m3d[1][3] !== 0 || m3d[2][3] !== 0) { - rhs.push(m3d[0][3]); - rhs.push(m3d[1][3]); - rhs.push(m3d[2][3]); - rhs.push(m3d[3][3]); - - var inversePerspectiveMatrix = inverse(perspectiveMatrix); - var transposedInversePerspectiveMatrix = - transposeMatrix4(inversePerspectiveMatrix); - perspective = multVecMatrix(rhs, transposedInversePerspectiveMatrix); - } else { - perspective = [0, 0, 0, 1]; - } - - var translate = m3d[3].slice(0, 3); - - var row = []; - row.push(m3d[0].slice(0, 3)); - var scale = []; - scale.push(length(row[0])); - row[0] = normalize(row[0]); - - var skew = []; - row.push(m3d[1].slice(0, 3)); - skew.push(dot(row[0], row[1])); - row[1] = combine(row[1], row[0], 1.0, -skew[0]); - - scale.push(length(row[1])); - row[1] = normalize(row[1]); - skew[0] /= scale[1]; - - row.push(m3d[2].slice(0, 3)); - skew.push(dot(row[0], row[2])); - row[2] = combine(row[2], row[0], 1.0, -skew[1]); - skew.push(dot(row[1], row[2])); - row[2] = combine(row[2], row[1], 1.0, -skew[2]); - - scale.push(length(row[2])); - row[2] = normalize(row[2]); - skew[1] /= scale[2]; - skew[2] /= scale[2]; - - var pdum3 = cross(row[1], row[2]); - if (dot(row[0], pdum3) < 0) { - for (var i = 0; i < 3; i++) { - scale[i] *= -1; - row[i][0] *= -1; - row[i][1] *= -1; - row[i][2] *= -1; - } - } - - var t = row[0][0] + row[1][1] + row[2][2] + 1; - var s; - var quaternion; - - if (t > 1e-4) { - s = 0.5 / Math.sqrt(t); - quaternion = [ - (row[2][1] - row[1][2]) * s, - (row[0][2] - row[2][0]) * s, - (row[1][0] - row[0][1]) * s, - 0.25 / s - ]; - } else if (row[0][0] > row[1][1] && row[0][0] > row[2][2]) { - s = Math.sqrt(1 + row[0][0] - row[1][1] - row[2][2]) * 2.0; - quaternion = [ - 0.25 * s, - (row[0][1] + row[1][0]) / s, - (row[0][2] + row[2][0]) / s, - (row[2][1] - row[1][2]) / s - ]; - } else if (row[1][1] > row[2][2]) { - s = Math.sqrt(1.0 + row[1][1] - row[0][0] - row[2][2]) * 2.0; - quaternion = [ - (row[0][1] + row[1][0]) / s, - 0.25 * s, - (row[1][2] + row[2][1]) / s, - (row[0][2] - row[2][0]) / s - ]; - } else { - s = Math.sqrt(1.0 + row[2][2] - row[0][0] - row[1][1]) * 2.0; - quaternion = [ - (row[0][2] + row[2][0]) / s, - (row[1][2] + row[2][1]) / s, - 0.25 * s, - (row[1][0] - row[0][1]) / s - ]; - } - - return { - translate: translate, scale: scale, skew: skew, - quaternion: quaternion, perspective: perspective - }; - } - return decomposeMatrix; -})(); - -function dot(v1, v2) { - var result = 0; - for (var i = 0; i < v1.length; i++) { - result += v1[i] * v2[i]; - } - return result; -} - -function multiplyMatrices(a, b) { - return [ - a[0] * b[0] + a[4] * b[1] + a[8] * b[2] + a[12] * b[3], - a[1] * b[0] + a[5] * b[1] + a[9] * b[2] + a[13] * b[3], - a[2] * b[0] + a[6] * b[1] + a[10] * b[2] + a[14] * b[3], - a[3] * b[0] + a[7] * b[1] + a[11] * b[2] + a[15] * b[3], - - a[0] * b[4] + a[4] * b[5] + a[8] * b[6] + a[12] * b[7], - a[1] * b[4] + a[5] * b[5] + a[9] * b[6] + a[13] * b[7], - a[2] * b[4] + a[6] * b[5] + a[10] * b[6] + a[14] * b[7], - a[3] * b[4] + a[7] * b[5] + a[11] * b[6] + a[15] * b[7], - - a[0] * b[8] + a[4] * b[9] + a[8] * b[10] + a[12] * b[11], - a[1] * b[8] + a[5] * b[9] + a[9] * b[10] + a[13] * b[11], - a[2] * b[8] + a[6] * b[9] + a[10] * b[10] + a[14] * b[11], - a[3] * b[8] + a[7] * b[9] + a[11] * b[10] + a[15] * b[11], - - a[0] * b[12] + a[4] * b[13] + a[8] * b[14] + a[12] * b[15], - a[1] * b[12] + a[5] * b[13] + a[9] * b[14] + a[13] * b[15], - a[2] * b[12] + a[6] * b[13] + a[10] * b[14] + a[14] * b[15], - a[3] * b[12] + a[7] * b[13] + a[11] * b[14] + a[15] * b[15] - ]; -} - -function convertItemToMatrix(item) { - switch (item.t) { - case 'rotateX': - var angle = item.d * Math.PI / 180; - return [1, 0, 0, 0, - 0, Math.cos(angle), Math.sin(angle), 0, - 0, -Math.sin(angle), Math.cos(angle), 0, - 0, 0, 0, 1]; - case 'rotateY': - var angle = item.d * Math.PI / 180; - return [Math.cos(angle), 0, -Math.sin(angle), 0, - 0, 1, 0, 0, - Math.sin(angle), 0, Math.cos(angle), 0, - 0, 0, 0, 1]; - case 'rotate': - case 'rotateZ': - var angle = item.d * Math.PI / 180; - return [Math.cos(angle), Math.sin(angle), 0, 0, - -Math.sin(angle), Math.cos(angle), 0, 0, - 0, 0, 1, 0, - 0, 0, 0, 1]; - case 'rotate3d': - var x = item.d[0]; - var y = item.d[1]; - var z = item.d[2]; - var sqrLength = x * x + y * y + z * z; - if (sqrLength === 0) { - x = 1; - y = 0; - z = 0; - } else if (sqrLength !== 1) { - var length = Math.sqrt(sqrLength); - x /= length; - y /= length; - z /= length; - } - var s = Math.sin(item.d[3] * Math.PI / 360); - var sc = s * Math.cos(item.d[3] * Math.PI / 360); - var sq = s * s; - return [ - 1 - 2 * (y * y + z * z) * sq, - 2 * (x * y * sq + z * sc), - 2 * (x * z * sq - y * sc), - 0, - - 2 * (x * y * sq - z * sc), - 1 - 2 * (x * x + z * z) * sq, - 2 * (y * z * sq + x * sc), - 0, - - 2 * (x * z * sq + y * sc), - 2 * (y * z * sq - x * sc), - 1 - 2 * (x * x + y * y) * sq, - 0, - - 0, 0, 0, 1 - ]; - case 'scale': - return [item.d[0], 0, 0, 0, - 0, item.d[1], 0, 0, - 0, 0, 1, 0, - 0, 0, 0, 1]; - case 'scale3d': - return [item.d[0], 0, 0, 0, - 0, item.d[1], 0, 0, - 0, 0, item.d[2], 0, - 0, 0, 0, 1]; - case 'skew': - return [1, Math.tan(item.d[1] * Math.PI / 180), 0, 0, - Math.tan(item.d[0] * Math.PI / 180), 1, 0, 0, - 0, 0, 1, 0, - 0, 0, 0, 1]; - case 'skewX': - return [1, 0, 0, 0, - Math.tan(item.d * Math.PI / 180), 1, 0, 0, - 0, 0, 1, 0, - 0, 0, 0, 1]; - case 'skewY': - return [1, Math.tan(item.d * Math.PI / 180), 0, 0, - 0, 1, 0, 0, - 0, 0, 1, 0, - 0, 0, 0, 1]; - // TODO: Work out what to do with non-px values. - case 'translate': - return [1, 0, 0, 0, - 0, 1, 0, 0, - 0, 0, 1, 0, - item.d[0].px, item.d[1].px, 0, 1]; - case 'translate3d': - return [1, 0, 0, 0, - 0, 1, 0, 0, - 0, 0, 1, 0, - item.d[0].px, item.d[1].px, item.d[2].px, 1]; - case 'perspective': - return [ - 1, 0, 0, 0, - 0, 1, 0, 0, - 0, 0, 1, -1 / item.d.px, - 0, 0, 0, 1]; - case 'matrix': - return [item.d[0], item.d[1], 0, 0, - item.d[2], item.d[3], 0, 0, - 0, 0, 1, 0, - item.d[4], item.d[5], 0, 1]; - case 'matrix3d': - return item.d; - default: - ASSERT_ENABLED && assert(false, 'Transform item type ' + item.t + - ' conversion to matrix not yet implemented.'); - } -} - -function convertToMatrix(transformList) { - if (transformList.length === 0) { - return [1, 0, 0, 0, - 0, 1, 0, 0, - 0, 0, 1, 0, - 0, 0, 0, 1]; - } - return transformList.map(convertItemToMatrix).reduce(multiplyMatrices); -} - -var composeMatrix = (function() { - function multiply(a, b) { - var result = [[0, 0, 0, 0], [0, 0, 0, 0], [0, 0, 0, 0], [0, 0, 0, 0]]; - for (var i = 0; i < 4; i++) { - for (var j = 0; j < 4; j++) { - for (var k = 0; k < 4; k++) { - result[i][j] += b[i][k] * a[k][j]; - } - } - } - return result; - } - - function is2D(m) { - return ( - m[0][2] == 0 && - m[0][3] == 0 && - m[1][2] == 0 && - m[1][3] == 0 && - m[2][0] == 0 && - m[2][1] == 0 && - m[2][2] == 1 && - m[2][3] == 0 && - m[3][2] == 0 && - m[3][3] == 1); - } - - function composeMatrix(translate, scale, skew, quat, perspective) { - var matrix = [[1, 0, 0, 0], [0, 1, 0, 0], [0, 0, 1, 0], [0, 0, 0, 1]]; - - for (var i = 0; i < 4; i++) { - matrix[i][3] = perspective[i]; - } - - for (var i = 0; i < 3; i++) { - for (var j = 0; j < 3; j++) { - matrix[3][i] += translate[j] * matrix[j][i]; - } - } - - var x = quat[0], y = quat[1], z = quat[2], w = quat[3]; - - var rotMatrix = [[1, 0, 0, 0], [0, 1, 0, 0], [0, 0, 1, 0], [0, 0, 0, 1]]; - - rotMatrix[0][0] = 1 - 2 * (y * y + z * z); - rotMatrix[0][1] = 2 * (x * y - z * w); - rotMatrix[0][2] = 2 * (x * z + y * w); - rotMatrix[1][0] = 2 * (x * y + z * w); - rotMatrix[1][1] = 1 - 2 * (x * x + z * z); - rotMatrix[1][2] = 2 * (y * z - x * w); - rotMatrix[2][0] = 2 * (x * z - y * w); - rotMatrix[2][1] = 2 * (y * z + x * w); - rotMatrix[2][2] = 1 - 2 * (x * x + y * y); - - matrix = multiply(matrix, rotMatrix); - - var temp = [[1, 0, 0, 0], [0, 1, 0, 0], [0, 0, 1, 0], [0, 0, 0, 1]]; - if (skew[2]) { - temp[2][1] = skew[2]; - matrix = multiply(matrix, temp); - } - - if (skew[1]) { - temp[2][1] = 0; - temp[2][0] = skew[0]; - matrix = multiply(matrix, temp); - } - - if (skew[0]) { - temp[2][0] = 0; - temp[1][0] = skew[0]; - matrix = multiply(matrix, temp); - } - - for (var i = 0; i < 3; i++) { - for (var j = 0; j < 3; j++) { - matrix[i][j] *= scale[i]; - } - } - - if (is2D(matrix)) { - return { - t: 'matrix', - d: [matrix[0][0], matrix[0][1], matrix[1][0], matrix[1][1], - matrix[3][0], matrix[3][1]] - }; - } - return { - t: 'matrix3d', - d: matrix[0].concat(matrix[1], matrix[2], matrix[3]) - }; - } - return composeMatrix; -})(); - -function interpolateDecomposedTransformsWithMatrices(fromM, toM, f) { - var product = dot(fromM.quaternion, toM.quaternion); - product = clamp(product, -1.0, 1.0); - - var quat = []; - if (product === 1.0) { - quat = fromM.quaternion; - } else { - var theta = Math.acos(product); - var w = Math.sin(f * theta) * 1 / Math.sqrt(1 - product * product); - - for (var i = 0; i < 4; i++) { - quat.push(fromM.quaternion[i] * (Math.cos(f * theta) - product * w) + - toM.quaternion[i] * w); - } - } - - var translate = interp(fromM.translate, toM.translate, f); - var scale = interp(fromM.scale, toM.scale, f); - var skew = interp(fromM.skew, toM.skew, f); - var perspective = interp(fromM.perspective, toM.perspective, f); - - return composeMatrix(translate, scale, skew, quat, perspective); -} - -function interpTransformValue(from, to, f) { - var type = from.t ? from.t : to.t; - switch (type) { - case 'matrix': - case 'matrix3d': - ASSERT_ENABLED && assert(false, - 'Must use matrix decomposition when interpolating raw matrices'); - // Transforms with unitless parameters. - case 'rotate': - case 'rotateX': - case 'rotateY': - case 'rotateZ': - case 'rotate3d': - case 'scale': - case 'scaleX': - case 'scaleY': - case 'scaleZ': - case 'scale3d': - case 'skew': - case 'skewX': - case 'skewY': - return {t: type, d: interp(from.d, to.d, f, type)}; - default: - // Transforms with lengthType parameters. - var result = []; - var maxVal; - if (from.d && to.d) { - maxVal = Math.max(from.d.length, to.d.length); - } else if (from.d) { - maxVal = from.d.length; - } else { - maxVal = to.d.length; - } - for (var j = 0; j < maxVal; j++) { - var fromVal = from.d ? from.d[j] : {}; - var toVal = to.d ? to.d[j] : {}; - result.push(lengthType.interpolate(fromVal, toVal, f)); - } - return {t: type, d: result}; - } -} - -function isMatrix(item) { - return item.t[0] === 'm'; -} - -// The CSSWG decided to disallow scientific notation in CSS property strings -// (see http://lists.w3.org/Archives/Public/www-style/2010Feb/0050.html). -// We need this function to hakonitize all numbers before adding them to -// property strings. -// TODO: Apply this function to all property strings -function n(num) { - return Number(num).toFixed(4); -} - -var transformType = { - add: function(base, delta) { return base.concat(delta); }, - interpolate: function(from, to, f) { - var out = []; - for (var i = 0; i < Math.min(from.length, to.length); i++) { - if (from[i].t !== to[i].t || isMatrix(from[i])) { - break; - } - out.push(interpTransformValue(from[i], to[i], f)); - } - - if (i < Math.min(from.length, to.length) || - from.some(isMatrix) || to.some(isMatrix)) { - if (from.decompositionPair !== to) { - from.decompositionPair = to; - from.decomposition = decomposeMatrix(convertToMatrix(from.slice(i))); - } - if (to.decompositionPair !== from) { - to.decompositionPair = from; - to.decomposition = decomposeMatrix(convertToMatrix(to.slice(i))); - } - out.push(interpolateDecomposedTransformsWithMatrices( - from.decomposition, to.decomposition, f)); - return out; - } - - for (; i < from.length; i++) { - out.push(interpTransformValue(from[i], {t: null, d: null}, f)); - } - for (; i < to.length; i++) { - out.push(interpTransformValue({t: null, d: null}, to[i], f)); - } - return out; - }, - toCssValue: function(value, svgMode) { - // TODO: fix this :) - var out = ''; - for (var i = 0; i < value.length; i++) { - ASSERT_ENABLED && assert( - value[i].t, 'transform type should be resolved by now'); - switch (value[i].t) { - case 'rotate': - case 'rotateX': - case 'rotateY': - case 'rotateZ': - case 'skewX': - case 'skewY': - var unit = svgMode ? '' : 'deg'; - out += value[i].t + '(' + value[i].d + unit + ') '; - break; - case 'skew': - var unit = svgMode ? '' : 'deg'; - out += value[i].t + '(' + value[i].d[0] + unit; - if (value[i].d[1] === 0) { - out += ') '; - } else { - out += ', ' + value[i].d[1] + unit + ') '; - } - break; - case 'rotate3d': - var unit = svgMode ? '' : 'deg'; - out += value[i].t + '(' + value[i].d[0] + ', ' + value[i].d[1] + - ', ' + value[i].d[2] + ', ' + value[i].d[3] + unit + ') '; - break; - case 'translateX': - case 'translateY': - case 'translateZ': - case 'perspective': - out += value[i].t + '(' + lengthType.toCssValue(value[i].d[0]) + - ') '; - break; - case 'translate': - if (svgMode) { - if (value[i].d[1] === undefined) { - out += value[i].t + '(' + value[i].d[0].px + ') '; - } else { - out += ( - value[i].t + '(' + value[i].d[0].px + ', ' + - value[i].d[1].px + ') '); - } - break; - } - if (value[i].d[1] === undefined) { - out += value[i].t + '(' + lengthType.toCssValue(value[i].d[0]) + - ') '; - } else { - out += value[i].t + '(' + lengthType.toCssValue(value[i].d[0]) + - ', ' + lengthType.toCssValue(value[i].d[1]) + ') '; - } - break; - case 'translate3d': - var values = value[i].d.map(lengthType.toCssValue); - out += value[i].t + '(' + values[0] + ', ' + values[1] + - ', ' + values[2] + ') '; - break; - case 'scale': - if (value[i].d[0] === value[i].d[1]) { - out += value[i].t + '(' + value[i].d[0] + ') '; - } else { - out += value[i].t + '(' + value[i].d[0] + ', ' + value[i].d[1] + - ') '; - } - break; - case 'scaleX': - case 'scaleY': - case 'scaleZ': - out += value[i].t + '(' + value[i].d[0] + ') '; - break; - case 'scale3d': - out += value[i].t + '(' + value[i].d[0] + ', ' + - value[i].d[1] + ', ' + value[i].d[2] + ') '; - break; - case 'matrix': - case 'matrix3d': - out += value[i].t + '(' + value[i].d.map(n).join(', ') + ') '; - break; - } - } - return out.substring(0, out.length - 1); - }, - fromCssValue: function(value) { - // TODO: fix this :) - if (value === undefined) { - return undefined; - } - var result = []; - while (value.length > 0) { - var r; - for (var i = 0; i < transformREs.length; i++) { - var reSpec = transformREs[i]; - r = reSpec[0].exec(value); - if (r) { - result.push({t: reSpec[2], d: reSpec[1](r)}); - value = value.substring(r[0].length); - break; - } - } - if (!isDefinedAndNotNull(r)) { - return result; - } - } - return result; - } -}; - -var pathType = { - // Properties ... - // - path: The target path element - // - points: The absolute points to set on the path - // - cachedCumulativeLengths: The lengths at the end of each segment - add: function() { throw 'Addition not supported for path attribute' }, - cumulativeLengths: function(value) { - if (isDefinedAndNotNull(value.cachedCumulativeLengths)) - return value.cachedCumulativeLengths; - var path = value.path.cloneNode(true); - var cumulativeLengths = []; - while (path.pathSegList.numberOfItems > 0) { - // TODO: It would be good to skip moves here and when generating points. - cumulativeLengths.unshift(path.getTotalLength()); - path.pathSegList.removeItem(path.pathSegList.numberOfItems - 1); - } - value.cachedCumulativeLengths = cumulativeLengths; - return value.cachedCumulativeLengths; - }, - appendFractions: function(fractions, cumulativeLengths) { - ASSERT_ENABLED && assert(cumulativeLengths[0] === 0); - var totalLength = cumulativeLengths[cumulativeLengths.length - 1]; - for (var i = 1; i < cumulativeLengths.length - 1; ++i) - fractions.push(cumulativeLengths[i] / totalLength); - }, - interpolate: function(from, to, f) { - // FIXME: Handle non-linear path segments. - // Get the fractions at which we need to sample. - var sampleFractions = [0, 1]; - pathType.appendFractions(sampleFractions, pathType.cumulativeLengths(from)); - pathType.appendFractions(sampleFractions, pathType.cumulativeLengths(to)); - sampleFractions.sort(); - ASSERT_ENABLED && assert(sampleFractions[0] === 0); - ASSERT_ENABLED && assert(sampleFractions[sampleFractions.length - 1] === 1); - - // FIXME: Cache the 'from' and 'to' points. - var fromTotalLength = from.path.getTotalLength(); - var toTotalLength = to.path.getTotalLength(); - var points = []; - for (var i = 0; i < sampleFractions.length; ++i) { - var fromPoint = from.path.getPointAtLength( - fromTotalLength * sampleFractions[i]); - var toPoint = to.path.getPointAtLength( - toTotalLength * sampleFractions[i]); - points.push({ - x: interp(fromPoint.x, toPoint.x, f), - y: interp(fromPoint.y, toPoint.y, f) - }); - } - return {points: points}; - }, - pointToString: function(point) { - return point.x + ',' + point.y; - }, - toCssValue: function(value, svgMode) { - // FIXME: It would be good to use PathSegList API on the target directly, - // rather than generating this string, but that would require a hack to - // setValue(). - ASSERT_ENABLED && assert(svgMode, - 'Path type should only be used with SVG \'d\' attribute'); - if (value.path) - return value.path.getAttribute('d'); - var ret = 'M' + pathType.pointToString(value.points[0]); - for (var i = 1; i < value.points.length; ++i) - ret += 'L' + pathType.pointToString(value.points[i]); - return ret; - }, - fromCssValue: function(value) { - var path = document.createElementNS('http://www.w3.org/2000/svg', 'path'); - if (value) - path.setAttribute('d', value); - return {path: path}; - } -}; - -var propertyTypes = { - backgroundColor: colorType, - backgroundPosition: positionListType, - borderBottomColor: colorType, - borderBottomLeftRadius: percentLengthType, - borderBottomRightRadius: percentLengthType, - borderBottomWidth: lengthType, - borderLeftColor: colorType, - borderLeftWidth: lengthType, - borderRightColor: colorType, - borderRightWidth: lengthType, - borderSpacing: lengthType, - borderTopColor: colorType, - borderTopLeftRadius: percentLengthType, - borderTopRightRadius: percentLengthType, - borderTopWidth: lengthType, - bottom: percentLengthAutoType, - boxShadow: shadowType, - clip: typeWithKeywords(['auto'], rectangleType), - color: colorType, - cx: lengthType, - cy: lengthType, - d: pathType, - dx: lengthType, - dy: lengthType, - fill: colorType, - floodColor: colorType, - - // TODO: Handle these keywords properly. - fontSize: typeWithKeywords(['smaller', 'larger'], percentLengthType), - fontWeight: typeWithKeywords(['lighter', 'bolder'], fontWeightType), - - height: percentLengthAutoType, - left: percentLengthAutoType, - letterSpacing: typeWithKeywords(['normal'], lengthType), - lightingColor: colorType, - lineHeight: percentLengthType, // TODO: Should support numberType as well. - marginBottom: lengthAutoType, - marginLeft: lengthAutoType, - marginRight: lengthAutoType, - marginTop: lengthAutoType, - maxHeight: typeWithKeywords( - ['none', 'max-content', 'min-content', 'fill-available', 'fit-content'], - percentLengthType), - maxWidth: typeWithKeywords( - ['none', 'max-content', 'min-content', 'fill-available', 'fit-content'], - percentLengthType), - minHeight: typeWithKeywords( - ['max-content', 'min-content', 'fill-available', 'fit-content'], - percentLengthType), - minWidth: typeWithKeywords( - ['max-content', 'min-content', 'fill-available', 'fit-content'], - percentLengthType), - opacity: numberType, - outlineColor: typeWithKeywords(['invert'], colorType), - outlineOffset: lengthType, - outlineWidth: lengthType, - paddingBottom: lengthType, - paddingLeft: lengthType, - paddingRight: lengthType, - paddingTop: lengthType, - perspective: typeWithKeywords(['none'], lengthType), - perspectiveOrigin: originType, - r: lengthType, - right: percentLengthAutoType, - stopColor: colorType, - stroke: colorType, - textIndent: typeWithKeywords(['each-line', 'hanging'], percentLengthType), - textShadow: shadowType, - top: percentLengthAutoType, - transform: transformType, - transformOrigin: originType, - verticalAlign: typeWithKeywords([ - 'baseline', - 'sub', - 'super', - 'text-top', - 'text-bottom', - 'middle', - 'top', - 'bottom' - ], percentLengthType), - visibility: visibilityType, - width: typeWithKeywords([ - 'border-box', - 'content-box', - 'auto', - 'max-content', - 'min-content', - 'available', - 'fit-content' - ], percentLengthType), - wordSpacing: typeWithKeywords(['normal'], percentLengthType), - x: lengthType, - y: lengthType, - zIndex: typeWithKeywords(['auto'], integerType) -}; - -var svgProperties = { - 'cx': 1, - 'cy': 1, - 'd': 1, - 'dx': 1, - 'dy': 1, - 'fill': 1, - 'floodColor': 1, - 'height': 1, - 'lightingColor': 1, - 'r': 1, - 'stopColor': 1, - 'stroke': 1, - 'width': 1, - 'x': 1, - 'y': 1 -}; - -var borderWidthAliases = { - initial: '3px', - thin: '1px', - medium: '3px', - thick: '5px' -}; - -var propertyValueAliases = { - backgroundColor: { initial: 'transparent' }, - backgroundPosition: { initial: '0% 0%' }, - borderBottomColor: { initial: 'currentColor' }, - borderBottomLeftRadius: { initial: '0px' }, - borderBottomRightRadius: { initial: '0px' }, - borderBottomWidth: borderWidthAliases, - borderLeftColor: { initial: 'currentColor' }, - borderLeftWidth: borderWidthAliases, - borderRightColor: { initial: 'currentColor' }, - borderRightWidth: borderWidthAliases, - // Spec says this should be 0 but in practise it is 2px. - borderSpacing: { initial: '2px' }, - borderTopColor: { initial: 'currentColor' }, - borderTopLeftRadius: { initial: '0px' }, - borderTopRightRadius: { initial: '0px' }, - borderTopWidth: borderWidthAliases, - bottom: { initial: 'auto' }, - clip: { initial: 'rect(0px, 0px, 0px, 0px)' }, - color: { initial: 'black' }, // Depends on user agent. - fontSize: { - initial: '100%', - 'xx-small': '60%', - 'x-small': '75%', - 'small': '89%', - 'medium': '100%', - 'large': '120%', - 'x-large': '150%', - 'xx-large': '200%' - }, - fontWeight: { - initial: '400', - normal: '400', - bold: '700' - }, - height: { initial: 'auto' }, - left: { initial: 'auto' }, - letterSpacing: { initial: 'normal' }, - lineHeight: { - initial: '120%', - normal: '120%' - }, - marginBottom: { initial: '0px' }, - marginLeft: { initial: '0px' }, - marginRight: { initial: '0px' }, - marginTop: { initial: '0px' }, - maxHeight: { initial: 'none' }, - maxWidth: { initial: 'none' }, - minHeight: { initial: '0px' }, - minWidth: { initial: '0px' }, - opacity: { initial: '1.0' }, - outlineColor: { initial: 'invert' }, - outlineOffset: { initial: '0px' }, - outlineWidth: borderWidthAliases, - paddingBottom: { initial: '0px' }, - paddingLeft: { initial: '0px' }, - paddingRight: { initial: '0px' }, - paddingTop: { initial: '0px' }, - right: { initial: 'auto' }, - textIndent: { initial: '0px' }, - textShadow: { - initial: '0px 0px 0px transparent', - none: '0px 0px 0px transparent' - }, - top: { initial: 'auto' }, - transform: { - initial: '', - none: '' - }, - verticalAlign: { initial: '0px' }, - visibility: { initial: 'visible' }, - width: { initial: 'auto' }, - wordSpacing: { initial: 'normal' }, - zIndex: { initial: 'auto' } -}; - -var propertyIsSVGAttrib = function(property, target) { - return target.namespaceURI === 'http://www.w3.org/2000/svg' && - property in svgProperties; -}; - -var getType = function(property) { - return propertyTypes[property] || nonNumericType; -}; - -var add = function(property, base, delta) { - if (delta === rawNeutralValue) { - return base; - } - if (base === 'inherit' || delta === 'inherit') { - return nonNumericType.add(base, delta); - } - return getType(property).add(base, delta); -}; - - -/** - * Interpolate the given property name (f*100)% of the way from 'from' to 'to'. - * 'from' and 'to' are both raw values already converted from CSS value - * strings. Requires the target element to be able to determine whether the - * given property is an SVG attribute or not, as this impacts the conversion of - * the interpolated value back into a CSS value string for transform - * translations. - * - * e.g. interpolate('transform', elem, 'rotate(40deg)', 'rotate(50deg)', 0.3); - * will return 'rotate(43deg)'. - */ -var interpolate = function(property, from, to, f) { - ASSERT_ENABLED && assert( - isDefinedAndNotNull(from) && isDefinedAndNotNull(to), - 'Both to and from values should be specified for interpolation'); - if (from === 'inherit' || to === 'inherit') { - return nonNumericType.interpolate(from, to, f); - } - if (f === 0) { - return from; - } - if (f === 1) { - return to; - } - return getType(property).interpolate(from, to, f); -}; - - -/** - * Convert the provided interpolable value for the provided property to a CSS - * value string. Note that SVG transforms do not require units for translate - * or rotate values while CSS properties require 'px' or 'deg' units. - */ -var toCssValue = function(property, value, svgMode) { - if (value === 'inherit') { - return value; - } - return getType(property).toCssValue(value, svgMode); -}; - -var fromCssValue = function(property, value) { - if (value === cssNeutralValue) { - return rawNeutralValue; - } - if (value === 'inherit') { - return value; - } - if (property in propertyValueAliases && - value in propertyValueAliases[property]) { - value = propertyValueAliases[property][value]; - } - var result = getType(property).fromCssValue(value); - // Currently we'll hit this assert if input to the API is bad. To avoid this, - // we should eliminate invalid values when normalizing the list of keyframes. - // See the TODO in isSupportedPropertyValue(). - ASSERT_ENABLED && assert(isDefinedAndNotNull(result), - 'Invalid property value "' + value + '" for property "' + property + '"'); - return result; -}; - -// Sentinel values -var cssNeutralValue = {}; -var rawNeutralValue = {}; - - - -/** @constructor */ -var CompositableValue = function() { -}; - -CompositableValue.prototype = { - compositeOnto: abstractMethod, - // This is purely an optimization. - dependsOnUnderlyingValue: function() { - return true; - } -}; - - - -/** @constructor */ -var AddReplaceCompositableValue = function(value, composite) { - this.value = value; - this.composite = composite; - ASSERT_ENABLED && assert( - !(this.value === cssNeutralValue && this.composite === 'replace'), - 'Should never replace-composite the neutral value'); -}; - -AddReplaceCompositableValue.prototype = createObject( - CompositableValue.prototype, { - compositeOnto: function(property, underlyingValue) { - switch (this.composite) { - case 'replace': - return this.value; - case 'add': - return add(property, underlyingValue, this.value); - default: - ASSERT_ENABLED && assert( - false, 'Invalid composite operation ' + this.composite); - } - }, - dependsOnUnderlyingValue: function() { - return this.composite === 'add'; - } - }); - - - -/** @constructor */ -var BlendedCompositableValue = function(startValue, endValue, fraction) { - this.startValue = startValue; - this.endValue = endValue; - this.fraction = fraction; -}; - -BlendedCompositableValue.prototype = createObject( - CompositableValue.prototype, { - compositeOnto: function(property, underlyingValue) { - return interpolate(property, - this.startValue.compositeOnto(property, underlyingValue), - this.endValue.compositeOnto(property, underlyingValue), - this.fraction); - }, - dependsOnUnderlyingValue: function() { - // Travis crashes here randomly in Chrome beta and unstable, - // this try catch is to help debug the problem. - try { - return this.startValue.dependsOnUnderlyingValue() || - this.endValue.dependsOnUnderlyingValue(); - } - catch (error) { - throw new Error( - error + '\n JSON.stringify(this) = ' + JSON.stringify(this)); - } - } - }); - -/** @constructor */ -var CompositedPropertyMap = function(target) { - this.properties = {}; - this.baseValues = {}; - this.target = target; -}; - -CompositedPropertyMap.prototype = { - addValue: function(property, animValue) { - if (!(property in this.properties)) { - this.properties[property] = []; - } - if (!(animValue instanceof CompositableValue)) { - throw new TypeError('expected CompositableValue'); - } - this.properties[property].push(animValue); - }, - stackDependsOnUnderlyingValue: function(stack) { - for (var i = 0; i < stack.length; i++) { - if (!stack[i].dependsOnUnderlyingValue()) { - return false; - } - } - return true; - }, - clear: function() { - for (var property in this.properties) { - if (this.stackDependsOnUnderlyingValue(this.properties[property])) { - clearValue(this.target, property); - } - } - }, - captureBaseValues: function() { - for (var property in this.properties) { - var stack = this.properties[property]; - if (stack.length > 0 && this.stackDependsOnUnderlyingValue(stack)) { - var baseValue = fromCssValue(property, getValue(this.target, property)); - // TODO: Decide what to do with elements not in the DOM. - ASSERT_ENABLED && assert( - isDefinedAndNotNull(baseValue) && baseValue !== '', - 'Base value should always be set. ' + - 'Is the target element in the DOM?'); - this.baseValues[property] = baseValue; - } else { - this.baseValues[property] = undefined; - } - } - }, - applyAnimatedValues: function() { - for (var property in this.properties) { - var valuesToComposite = this.properties[property]; - if (valuesToComposite.length === 0) { - continue; - } - var baseValue = this.baseValues[property]; - var i = valuesToComposite.length - 1; - while (i > 0 && valuesToComposite[i].dependsOnUnderlyingValue()) { - i--; - } - for (; i < valuesToComposite.length; i++) { - baseValue = valuesToComposite[i].compositeOnto(property, baseValue); - } - ASSERT_ENABLED && assert( - isDefinedAndNotNull(baseValue) && baseValue !== '', - 'Value should always be set after compositing'); - var isSvgMode = propertyIsSVGAttrib(property, this.target); - setValue(this.target, property, toCssValue(property, baseValue, - isSvgMode)); - this.properties[property] = []; - } - } -}; - - -var cssStyleDeclarationAttribute = { - cssText: true, - length: true, - parentRule: true, - 'var': true -}; - -var cssStyleDeclarationMethodModifiesStyle = { - getPropertyValue: false, - getPropertyCSSValue: false, - removeProperty: true, - getPropertyPriority: false, - setProperty: true, - item: false -}; - -var copyInlineStyle = function(sourceStyle, destinationStyle) { - for (var i = 0; i < sourceStyle.length; i++) { - var property = sourceStyle[i]; - destinationStyle[property] = sourceStyle[property]; - } -}; - -var retickThenGetComputedStyle = function() { - repeatLastTick(); - ensureOriginalGetComputedStyle(); - return window.getComputedStyle.apply(this, arguments); -}; - -// This redundant flag is to support Safari which has trouble determining -// function object equality during an animation. -var isGetComputedStylePatched = false; -var originalGetComputedStyle = window.getComputedStyle; - -var ensureRetickBeforeGetComputedStyle = function() { - if (!isGetComputedStylePatched) { - Object.defineProperty(window, 'getComputedStyle', configureDescriptor({ - value: retickThenGetComputedStyle - })); - isGetComputedStylePatched = true; - } -}; - -var ensureOriginalGetComputedStyle = function() { - if (isGetComputedStylePatched) { - Object.defineProperty(window, 'getComputedStyle', configureDescriptor({ - value: originalGetComputedStyle - })); - isGetComputedStylePatched = false; - } -}; - -// Changing the inline style of an element under animation may require the -// animation to be recomputed ontop of the new inline style if -// getComputedStyle() is called inbetween setting the style and the next -// animation frame. -// We modify getComputedStyle() to re-evaluate the animations only if it is -// called instead of re-evaluating them here potentially unnecessarily. -var animatedInlineStyleChanged = function() { - maybeRestartAnimation(); - ensureRetickBeforeGetComputedStyle(); -}; - - - -/** @constructor */ -var AnimatedCSSStyleDeclaration = function(element) { - ASSERT_ENABLED && assert( - !(element.style instanceof AnimatedCSSStyleDeclaration), - 'Element must not already have an animated style attached.'); - - // Stores the inline style of the element on its behalf while the - // polyfill uses the element's inline style to simulate web animations. - // This is needed to fake regular inline style CSSOM access on the element. - this._surrogateElement = createDummyElement(); - this._style = element.style; - this._length = 0; - this._isAnimatedProperty = {}; - - // Populate the surrogate element's inline style. - copyInlineStyle(this._style, this._surrogateElement.style); - this._updateIndices(); -}; - -AnimatedCSSStyleDeclaration.prototype = { - get cssText() { - return this._surrogateElement.style.cssText; - }, - set cssText(text) { - var isAffectedProperty = {}; - for (var i = 0; i < this._surrogateElement.style.length; i++) { - isAffectedProperty[this._surrogateElement.style[i]] = true; - } - this._surrogateElement.style.cssText = text; - this._updateIndices(); - for (var i = 0; i < this._surrogateElement.style.length; i++) { - isAffectedProperty[this._surrogateElement.style[i]] = true; - } - for (var property in isAffectedProperty) { - if (!this._isAnimatedProperty[property]) { - this._style.setProperty(property, - this._surrogateElement.style.getPropertyValue(property)); - } - } - animatedInlineStyleChanged(); - }, - get length() { - return this._surrogateElement.style.length; - }, - get parentRule() { - return this._style.parentRule; - }, - get 'var'() { - return this._style.var; - }, - _updateIndices: function() { - while (this._length < this._surrogateElement.style.length) { - Object.defineProperty(this, this._length, { - configurable: true, - enumerable: false, - get: (function(index) { - return function() { - return this._surrogateElement.style[index]; - }; - })(this._length) - }); - this._length++; - } - while (this._length > this._surrogateElement.style.length) { - this._length--; - Object.defineProperty(this, this._length, { - configurable: true, - enumerable: false, - value: undefined - }); - } - }, - _clearAnimatedProperty: function(property) { - this._style[property] = this._surrogateElement.style[property]; - this._isAnimatedProperty[property] = false; - }, - _setAnimatedProperty: function(property, value) { - this._style[property] = value; - this._isAnimatedProperty[property] = true; - } -}; - -for (var method in cssStyleDeclarationMethodModifiesStyle) { - AnimatedCSSStyleDeclaration.prototype[method] = - (function(method, modifiesStyle) { - return function() { - var result = this._surrogateElement.style[method].apply( - this._surrogateElement.style, arguments); - if (modifiesStyle) { - if (!this._isAnimatedProperty[arguments[0]]) { - this._style[method].apply(this._style, arguments); - } - this._updateIndices(); - animatedInlineStyleChanged(); - } - return result; - } - })(method, cssStyleDeclarationMethodModifiesStyle[method]); -} - -for (var property in document.documentElement.style) { - if (cssStyleDeclarationAttribute[property] || - property in cssStyleDeclarationMethodModifiesStyle) { - continue; - } - (function(property) { - Object.defineProperty(AnimatedCSSStyleDeclaration.prototype, property, - configureDescriptor({ - get: function() { - return this._surrogateElement.style[property]; - }, - set: function(value) { - this._surrogateElement.style[property] = value; - this._updateIndices(); - if (!this._isAnimatedProperty[property]) { - this._style[property] = value; - } - animatedInlineStyleChanged(); - } - })); - })(property); -} - -// This function is a fallback for when we can't replace an element's style with -// AnimatatedCSSStyleDeclaration and must patch the existing style to behave -// in a similar way. -// Only the methods listed in cssStyleDeclarationMethodModifiesStyle will -// be patched to behave in the same manner as a native implementation, -// getter properties like style.left or style[0] will be tainted by the -// polyfill's animation engine. -var patchInlineStyleForAnimation = function(style) { - var surrogateElement = document.createElement('div'); - copyInlineStyle(style, surrogateElement.style); - var isAnimatedProperty = {}; - for (var method in cssStyleDeclarationMethodModifiesStyle) { - if (!(method in style)) { - continue; - } - Object.defineProperty(style, method, configureDescriptor({ - value: (function(method, originalMethod, modifiesStyle) { - return function() { - var result = surrogateElement.style[method].apply( - surrogateElement.style, arguments); - if (modifiesStyle) { - if (!isAnimatedProperty[arguments[0]]) { - originalMethod.apply(style, arguments); - } - animatedInlineStyleChanged(); - } - return result; - } - })(method, style[method], cssStyleDeclarationMethodModifiesStyle[method]) - })); - } - - style._clearAnimatedProperty = function(property) { - this[property] = surrogateElement.style[property]; - isAnimatedProperty[property] = false; - }; - - style._setAnimatedProperty = function(property, value) { - this[property] = value; - isAnimatedProperty[property] = true; - }; -}; - - - -/** @constructor */ -var Compositor = function() { - this.targets = []; -}; - -Compositor.prototype = { - setAnimatedValue: function(target, property, animValue) { - if (target !== null) { - if (target._animProperties === undefined) { - target._animProperties = new CompositedPropertyMap(target); - this.targets.push(target); - } - target._animProperties.addValue(property, animValue); - } - }, - applyAnimatedValues: function() { - for (var i = 0; i < this.targets.length; i++) { - this.targets[i]._animProperties.clear(); - } - for (var i = 0; i < this.targets.length; i++) { - this.targets[i]._animProperties.captureBaseValues(); - } - for (var i = 0; i < this.targets.length; i++) { - this.targets[i]._animProperties.applyAnimatedValues(); - } - } -}; - -var ensureTargetInitialised = function(property, target) { - if (propertyIsSVGAttrib(property, target)) { - ensureTargetSVGInitialised(property, target); - } else { - ensureTargetCSSInitialised(target); - } -}; - -var ensureTargetSVGInitialised = function(property, target) { - if (!isDefinedAndNotNull(target._actuals)) { - target._actuals = {}; - target._bases = {}; - target.actuals = {}; - target._getAttribute = target.getAttribute; - target._setAttribute = target.setAttribute; - target.getAttribute = function(name) { - if (isDefinedAndNotNull(target._bases[name])) { - return target._bases[name]; - } - return target._getAttribute(name); - }; - target.setAttribute = function(name, value) { - if (isDefinedAndNotNull(target._actuals[name])) { - target._bases[name] = value; - } else { - target._setAttribute(name, value); - } - }; - } - if (!isDefinedAndNotNull(target._actuals[property])) { - var baseVal = target.getAttribute(property); - target._actuals[property] = 0; - target._bases[property] = baseVal; - - Object.defineProperty(target.actuals, property, configureDescriptor({ - set: function(value) { - if (value === null) { - target._actuals[property] = target._bases[property]; - target._setAttribute(property, target._bases[property]); - } else { - target._actuals[property] = value; - target._setAttribute(property, value); - } - }, - get: function() { - return target._actuals[property]; - } - })); - } -}; - -var ensureTargetCSSInitialised = function(target) { - if (target.style._webAnimationsStyleInitialised) { - return; - } - try { - var animatedStyle = new AnimatedCSSStyleDeclaration(target); - Object.defineProperty(target, 'style', configureDescriptor({ - get: function() { return animatedStyle; } - })); - } catch (error) { - patchInlineStyleForAnimation(target.style); - } - target.style._webAnimationsStyleInitialised = true; -}; - -var setValue = function(target, property, value) { - ensureTargetInitialised(property, target); - property = prefixProperty(property); - if (propertyIsSVGAttrib(property, target)) { - target.actuals[property] = value; - } else { - target.style._setAnimatedProperty(property, value); - } -}; - -var clearValue = function(target, property) { - ensureTargetInitialised(property, target); - property = prefixProperty(property); - if (propertyIsSVGAttrib(property, target)) { - target.actuals[property] = null; - } else { - target.style._clearAnimatedProperty(property); - } -}; - -var getValue = function(target, property) { - ensureTargetInitialised(property, target); - property = prefixProperty(property); - if (propertyIsSVGAttrib(property, target)) { - return target.actuals[property]; - } else { - return getComputedStyle(target)[property]; - } -}; - -var rafScheduled = false; - -var compositor = new Compositor(); - -var usePerformanceTiming = - typeof window.performance === 'object' && - typeof window.performance.timing === 'object' && - typeof window.performance.now === 'function'; - -// Don't use a local named requestAnimationFrame, to avoid potential problems -// with hoisting. -var nativeRaf = window.requestAnimationFrame || - window.webkitRequestAnimationFrame || window.mozRequestAnimationFrame; -var raf; -if (nativeRaf) { - raf = function(callback) { - nativeRaf(function() { - callback(clockMillis()); - }); - }; -} else { - raf = function(callback) { - setTimeout(function() { - callback(clockMillis()); - }, 1000 / 60); - }; -} - -var clockMillis = function() { - return usePerformanceTiming ? window.performance.now() : Date.now(); -}; -// Set up the zero times for document time. Document time is relative to the -// document load event. -var documentTimeZeroAsRafTime; -var documentTimeZeroAsClockTime; -var load; -if (usePerformanceTiming) { - load = function() { - // RAF time is relative to the navigationStart event. - documentTimeZeroAsRafTime = - window.performance.timing.loadEventStart - - window.performance.timing.navigationStart; - // performance.now() uses the same origin as RAF time. - documentTimeZeroAsClockTime = documentTimeZeroAsRafTime; - }; -} else { - // The best approximation we have for the relevant clock and RAF times is to - // listen to the load event. - load = function() { - raf(function(rafTime) { - documentTimeZeroAsRafTime = rafTime; - }); - documentTimeZeroAsClockTime = Date.now(); - }; -} -// Start timing when load event fires or if this script is processed when -// document loading is already complete. -if (document.readyState === 'complete') { - // When performance timing is unavailable and this script is loaded - // dynamically, document zero time is incorrect. - // Warn the user in this case. - if (!usePerformanceTiming) { - console.warn( - 'Web animations can\'t discover document zero time when ' + - 'asynchronously loaded in the absence of performance timing.'); - } - load(); -} else { - addEventListener('load', function() { - load(); - if (usePerformanceTiming) { - // We use setTimeout() to clear cachedClockTimeMillis at the end of a - // frame, but this will not run until after other load handlers. We need - // those handlers to pick up the new value of clockMillis(), so we must - // clear the cached value. - cachedClockTimeMillis = undefined; - } - }); -} - -// A cached document time for use during the current callstack. -var cachedClockTimeMillis; -// Calculates one time relative to another, returning null if the zero time is -// undefined. -var relativeTime = function(time, zeroTime) { - return isDefined(zeroTime) ? time - zeroTime : null; -}; - -var lastClockTimeMillis; - -var cachedClockTime = function() { - // Cache a document time for the remainder of this callstack. - if (!isDefined(cachedClockTimeMillis)) { - cachedClockTimeMillis = clockMillis(); - lastClockTimeMillis = cachedClockTimeMillis; - setTimeout(function() { cachedClockTimeMillis = undefined; }, 0); - } - return cachedClockTimeMillis; -}; - - -// These functions should be called in every stack that could possibly modify -// the effect results that have already been calculated for the current tick. -var modifyCurrentAnimationStateDepth = 0; -var enterModifyCurrentAnimationState = function() { - modifyCurrentAnimationStateDepth++; -}; -var exitModifyCurrentAnimationState = function(updateCallback) { - modifyCurrentAnimationStateDepth--; - // updateCallback is set to null when we know we can't possibly affect the - // current state (eg. a TimedItem which is not attached to a player). We track - // the depth of recursive calls trigger just one repeat per entry. Only the - // updateCallback from the outermost call is considered, this allows certain - // locatations (eg. constructors) to override nested calls that would - // otherwise set updateCallback unconditionally. - if (modifyCurrentAnimationStateDepth === 0 && updateCallback) { - updateCallback(); - } -}; - -var repeatLastTick = function() { - if (isDefined(lastTickTime)) { - ticker(lastTickTime, true); - } -}; - -var playerSortFunction = function(a, b) { - var result = a.startTime - b.startTime; - return result !== 0 ? result : a._sequenceNumber - b._sequenceNumber; -}; - -var lastTickTime; -var ticker = function(rafTime, isRepeat) { - // Don't tick till the page is loaded.... - if (!isDefined(documentTimeZeroAsRafTime)) { - raf(ticker); - return; - } - - if (!isRepeat) { - if (rafTime < lastClockTimeMillis) { - rafTime = lastClockTimeMillis; - } - lastTickTime = rafTime; - cachedClockTimeMillis = rafTime; - } - - // Clear any modifications to getComputedStyle. - ensureOriginalGetComputedStyle(); - - // Get animations for this sample. We order by AnimationPlayer then by DFS - // order within each AnimationPlayer's tree. - if (!playersAreSorted) { - PLAYERS.sort(playerSortFunction); - playersAreSorted = true; - } - var finished = true; - var paused = true; - var animations = []; - var finishedPlayers = []; - PLAYERS.forEach(function(player) { - player._update(); - finished = finished && !player._hasFutureAnimation(); - if (!player._hasFutureEffect()) { - finishedPlayers.push(player); - } - paused = paused && player.paused; - player._getLeafItemsInEffect(animations); - }); - - // Apply animations in order - for (var i = 0; i < animations.length; i++) { - if (animations[i] instanceof Animation) { - animations[i]._sample(); - } - } - - // Generate events - PLAYERS.forEach(function(player) { - player._generateEvents(); - }); - - // Remove finished players. Warning: _deregisterFromTimeline modifies - // the PLAYER list. It should not be called from within a PLAYERS.forEach - // loop directly. - finishedPlayers.forEach(function(player) { - player._deregisterFromTimeline(); - playersAreSorted = false; - }); - - // Composite animated values into element styles - compositor.applyAnimatedValues(); - - if (!isRepeat) { - if (finished || paused) { - rafScheduled = false; - } else { - raf(ticker); - } - cachedClockTimeMillis = undefined; - } -}; - -// Multiplication where zero multiplied by any value (including infinity) -// gives zero. -var multiplyZeroGivesZero = function(a, b) { - return (a === 0 || b === 0) ? 0 : a * b; -}; - -var maybeRestartAnimation = function() { - if (rafScheduled) { - return; - } - raf(ticker); - rafScheduled = true; -}; - -var DOCUMENT_TIMELINE = new AnimationTimeline(constructorToken); -// attempt to override native implementation -try { - Object.defineProperty(document, 'timeline', { - configurable: true, - get: function() { return DOCUMENT_TIMELINE } - }); -} catch (e) { } -// maintain support for Safari -try { - document.timeline = DOCUMENT_TIMELINE; -} catch (e) { } - -window.Element.prototype.animate = function(effect, timing) { - var anim = new Animation(this, effect, timing); - DOCUMENT_TIMELINE.play(anim); - return anim.player; -}; -window.Element.prototype.getCurrentPlayers = function() { - return PLAYERS.filter((function(player) { - return player._isCurrent() && player._isTargetingElement(this); - }).bind(this)); -}; -window.Element.prototype.getCurrentAnimations = function() { - var animations = []; - PLAYERS.forEach((function(player) { - if (player._isCurrent()) { - player._getAnimationsTargetingElement(this, animations); - } - }).bind(this)); - return animations; -}; - -window.Animation = Animation; -window.AnimationEffect = AnimationEffect; -window.AnimationGroup = AnimationGroup; -window.AnimationPlayer = AnimationPlayer; -window.AnimationSequence = AnimationSequence; -window.AnimationTimeline = AnimationTimeline; -window.KeyframeEffect = KeyframeEffect; -window.MediaReference = MediaReference; -window.MotionPathEffect = MotionPathEffect; -window.PseudoElementReference = PseudoElementReference; -window.TimedItem = TimedItem; -window.TimedItemList = TimedItemList; -window.Timing = Timing; -window.TimingEvent = TimingEvent; -window.TimingGroup = TimingGroup; - -window._WebAnimationsTestingUtilities = { - _constructorToken: constructorToken, - _deprecated: deprecated, - _positionListType: positionListType, - _hsl2rgb: hsl2rgb, - _types: propertyTypes, - _knownPlayers: PLAYERS, - _pacedTimingFunction: PacedTimingFunction, - _prefixProperty: prefixProperty, - _propertyIsSVGAttrib: propertyIsSVGAttrib -}; - -})(); diff --git a/third_party/polymer/components/core-component-page/.bower.json b/third_party/polymer/core-component-page/.bower.json index 379aab3..21e7f87 100644 --- a/third_party/polymer/components/core-component-page/.bower.json +++ b/third_party/polymer/core-component-page/.bower.json @@ -14,6 +14,6 @@ "commit": "87617aa1282994eecf5f1f57ef149155ed96f7f1" }, "_source": "git://github.com/Polymer/core-component-page.git", - "_target": "0.3.5", + "_target": ">=0.3.0 <1.0.0", "_originalSource": "Polymer/core-component-page" }
\ No newline at end of file diff --git a/third_party/polymer/components/core-component-page/README.md b/third_party/polymer/core-component-page/README.md index 7cb18ec..7cb18ec 100644 --- a/third_party/polymer/components/core-component-page/README.md +++ b/third_party/polymer/core-component-page/README.md diff --git a/third_party/polymer/components/core-component-page/bower.json b/third_party/polymer/core-component-page/bower.json index 541607b..541607b 100644 --- a/third_party/polymer/components/core-component-page/bower.json +++ b/third_party/polymer/core-component-page/bower.json diff --git a/third_party/polymer/components/core-component-page/core-component-page.html b/third_party/polymer/core-component-page/core-component-page.html index 1a0be8d..3c3165c 100644 --- a/third_party/polymer/components/core-component-page/core-component-page.html +++ b/third_party/polymer/core-component-page/core-component-page.html @@ -3439,7 +3439,7 @@ if (typeof exports === 'object') { }).call(function() { return this || (typeof window !== 'undefined' ? window : global); }()); -</script>
+</script> <!-- @@ -5056,7 +5056,7 @@ var REGEXP_PRECEDER_PATTERN = '(?:^^\\.?|[+-]|[!=]=?=?|\\#|%=?|&&?=?|\\(|\\*=?|[ }); } })(); -</script>
+</script> <script>(function(scope) { @@ -5996,10 +5996,10 @@ pre .com,pre .comment,.prettyprint .com,.prettyprint .comment { </script> </polymer-element> -
-
-
-
+ + + + <!-- Copyright (c) 2014 The Polymer Project Authors. All rights reserved. This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt @@ -6656,7 +6656,7 @@ html /deep/ core-menu::shadow ::content > core-item { Polymer('core-menu',{}); </script> </polymer-element> -
+ <!-- Copyright (c) 2014 The Polymer Project Authors. All rights reserved. This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt @@ -6760,16 +6760,16 @@ html /deep/ core-item::shadow ::content > a { </script> </polymer-element> -
-
-<!--
-@class core-doc-toc
--->
-
-<polymer-element name="core-doc-toc" attributes="data selected" assetpath="../core-doc-viewer/elements/">
-
- <template>
-
+ + +<!-- +@class core-doc-toc +--> + +<polymer-element name="core-doc-toc" attributes="data selected" assetpath="../core-doc-viewer/elements/"> + + <template> + <style>:host { display: block; position: relative; @@ -6781,56 +6781,56 @@ core-header-panel { top: 0; left: 0; height: 100%; - width: 100%;
-} - -core-toolbar {
- background-color: #eeeeee;
-} -</style>
-
- <core-header-panel mode="waterfall">
-
-<!-- <core-toolbar theme="core-light-theme">
- <core-icon-button icon="menu"></core-icon-button>
- <span core-flex>Topics</span>
- <core-icon-button icon="search" on-tap="{{searchAction}}"></core-icon-button>
- </core-toolbar>
-
- <core-toolbar id="searchBar" style="background-color: #C2185B; position: absolute; top: 0; left: 0; right: 0; opacity: 0; display: none;" class="seamed" theme="core-dark-theme">
- <core-icon-button icon="search"></core-icon-button>
- <core-icon-button icon="close" on-tap="{{closeSearchAction}}"></core-icon-button>
- </core-toolbar>-->
-
- <core-menu selected="{{selected}}">
- <template repeat="{{data}}">
- <core-item><a href="#{{name}}">{{name}}</a></core-item>
- </template>
- </core-menu>
-
- </core-header-panel>
-
- </template>
-
- <script>
-
- Polymer('core-doc-toc', {
-
- searchAction: function() {
- this.$.searchBar.style.opacity = 1;
- this.$.searchBar.style.display = '';
- },
-
- closeSearchAction: function() {
- this.$.searchBar.style.opacity = 0;
- this.$.searchBar.style.display = 'none';
- }
-
- });
-
- </script>
-
-</polymer-element>
+ width: 100%; +} + +core-toolbar { + background-color: #eeeeee; +} +</style> + + <core-header-panel mode="waterfall"> + +<!-- <core-toolbar theme="core-light-theme"> + <core-icon-button icon="menu"></core-icon-button> + <span core-flex>Topics</span> + <core-icon-button icon="search" on-tap="{{searchAction}}"></core-icon-button> + </core-toolbar> + + <core-toolbar id="searchBar" style="background-color: #C2185B; position: absolute; top: 0; left: 0; right: 0; opacity: 0; display: none;" class="seamed" theme="core-dark-theme"> + <core-icon-button icon="search"></core-icon-button> + <core-icon-button icon="close" on-tap="{{closeSearchAction}}"></core-icon-button> + </core-toolbar>--> + + <core-menu selected="{{selected}}"> + <template repeat="{{data}}"> + <core-item><a href="#{{name}}">{{name}}</a></core-item> + </template> + </core-menu> + + </core-header-panel> + + </template> + + <script> + + Polymer('core-doc-toc', { + + searchAction: function() { + this.$.searchBar.style.opacity = 1; + this.$.searchBar.style.display = ''; + }, + + closeSearchAction: function() { + this.$.searchBar.style.opacity = 0; + this.$.searchBar.style.display = 'none'; + } + + }); + + </script> + +</polymer-element> @@ -7075,7 +7075,7 @@ h2 { } .appbar { - background-color: #E91E63;
+ background-color: #E91E63; color: white; } </style> diff --git a/third_party/polymer/components/core-component-page/demo.html b/third_party/polymer/core-component-page/demo.html index fb80e5f..1f5a7b0 100644 --- a/third_party/polymer/components/core-component-page/demo.html +++ b/third_party/polymer/core-component-page/demo.html @@ -1,23 +1,23 @@ -<!doctype html>
-<!--
-Copyright (c) 2014 The Polymer Project Authors. All rights reserved.
-This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE
-The complete set of authors may be found at http://polymer.github.io/AUTHORS
-The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS
-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
--->
-<html>
-<head>
-
- <script src="../platform/platform.js"></script>
- <link rel="import" href="../polymer/polymer.html">
- <link rel="import" href="core-component-page.html">
-
-</head>
-<body unresolved>
-
- <core-component-page></core-component-page>
-
-</body>
-</html>
+<!doctype html> +<!-- +Copyright (c) 2014 The Polymer Project Authors. All rights reserved. +This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE +The complete set of authors may be found at http://polymer.github.io/AUTHORS +The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS +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 +--> +<html> +<head> + + <script src="../platform/platform.js"></script> + <link rel="import" href="../polymer/polymer.html"> + <link rel="import" href="core-component-page.html"> + +</head> +<body unresolved> + + <core-component-page></core-component-page> + +</body> +</html> diff --git a/third_party/polymer/components/core-ajax/index.html b/third_party/polymer/core-component-page/index.html index 58856f3..58856f3 100644 --- a/third_party/polymer/components/core-ajax/index.html +++ b/third_party/polymer/core-component-page/index.html diff --git a/third_party/polymer/components/platform/.bower.json b/third_party/polymer/platform/.bower.json index 8d1af04..cec6b4b 100644 --- a/third_party/polymer/components/platform/.bower.json +++ b/third_party/polymer/platform/.bower.json @@ -21,6 +21,6 @@ "commit": "413707498b62d2c66f923dcac6809d56e7d6dab6" }, "_source": "git://github.com/Polymer/platform.git", - "_target": "0.3.5", + "_target": ">=0.3.0 <1.0.0", "_originalSource": "Polymer/platform" }
\ No newline at end of file diff --git a/third_party/polymer/components/platform/README.md b/third_party/polymer/platform/README.md index 65b661e..65b661e 100644 --- a/third_party/polymer/components/platform/README.md +++ b/third_party/polymer/platform/README.md diff --git a/third_party/polymer/components/platform/bower.json b/third_party/polymer/platform/bower.json index 8d2c51d..8d2c51d 100644 --- a/third_party/polymer/components/platform/bower.json +++ b/third_party/polymer/platform/bower.json diff --git a/third_party/polymer/components/platform/build.log b/third_party/polymer/platform/build.log index 90d5a17..90d5a17 100644 --- a/third_party/polymer/components/platform/build.log +++ b/third_party/polymer/platform/build.log diff --git a/third_party/polymer/components/platform/platform.js b/third_party/polymer/platform/platform.js index 3cd0e51..3cd0e51 100644 --- a/third_party/polymer/components/platform/platform.js +++ b/third_party/polymer/platform/platform.js diff --git a/third_party/polymer/platform/platform.js.map b/third_party/polymer/platform/platform.js.map new file mode 100644 index 0000000..b4dd299 --- /dev/null +++ b/third_party/polymer/platform/platform.js.map @@ -0,0 +1 @@ +{"version":3,"file":"platform.js","sources":["build/boot.js","../WeakMap/weakmap.js","../observe-js/src/observe.js","build/if-poly.js","../ShadowDOM/src/wrappers.js","../ShadowDOM/src/microtask.js","../ShadowDOM/src/MutationObserver.js","../ShadowDOM/src/TreeScope.js","../ShadowDOM/src/wrappers/events.js","../ShadowDOM/src/wrappers/TouchEvent.js","../ShadowDOM/src/wrappers/NodeList.js","../ShadowDOM/src/wrappers/HTMLCollection.js","../ShadowDOM/src/wrappers/Node.js","../ShadowDOM/src/querySelector.js","../ShadowDOM/src/wrappers/node-interfaces.js","../ShadowDOM/src/wrappers/CharacterData.js","../ShadowDOM/src/wrappers/Text.js","../ShadowDOM/src/wrappers/DOMTokenList.js","../ShadowDOM/src/wrappers/Element.js","../ShadowDOM/src/wrappers/HTMLElement.js","../ShadowDOM/src/wrappers/HTMLCanvasElement.js","../ShadowDOM/src/wrappers/HTMLContentElement.js","../ShadowDOM/src/wrappers/HTMLFormElement.js","../ShadowDOM/src/wrappers/HTMLImageElement.js","../ShadowDOM/src/wrappers/HTMLShadowElement.js","../ShadowDOM/src/wrappers/HTMLTemplateElement.js","../ShadowDOM/src/wrappers/HTMLMediaElement.js","../ShadowDOM/src/wrappers/HTMLAudioElement.js","../ShadowDOM/src/wrappers/HTMLOptionElement.js","../ShadowDOM/src/wrappers/HTMLSelectElement.js","../ShadowDOM/src/wrappers/HTMLTableElement.js","../ShadowDOM/src/wrappers/HTMLTableSectionElement.js","../ShadowDOM/src/wrappers/HTMLTableRowElement.js","../ShadowDOM/src/wrappers/HTMLUnknownElement.js","../ShadowDOM/src/wrappers/SVGElement.js","../ShadowDOM/src/wrappers/SVGUseElement.js","../ShadowDOM/src/wrappers/SVGElementInstance.js","../ShadowDOM/src/wrappers/CanvasRenderingContext2D.js","../ShadowDOM/src/wrappers/WebGLRenderingContext.js","../ShadowDOM/src/wrappers/Range.js","../ShadowDOM/src/wrappers/generic.js","../ShadowDOM/src/wrappers/ShadowRoot.js","../ShadowDOM/src/ShadowRenderer.js","../ShadowDOM/src/wrappers/elements-with-form-property.js","../ShadowDOM/src/wrappers/Selection.js","../ShadowDOM/src/wrappers/Document.js","../ShadowDOM/src/wrappers/Window.js","../ShadowDOM/src/wrappers/DataTransfer.js","../ShadowDOM/src/wrappers/FormData.js","../ShadowDOM/src/wrappers/override-constructors.js","src/patches-shadowdom-polyfill.js","src/ShadowCSS.js","src/patches-shadowdom-native.js","../URL/url.js","src/lang.js","src/dom.js","src/template.js","src/inspector.js","src/unresolved.js","src/module.js","src/microtask.js","src/url.js","../MutationObservers/MutationObserver.js","../HTMLImports/src/scope.js","../HTMLImports/src/Loader.js","../HTMLImports/src/Parser.js","../HTMLImports/src/HTMLImports.js","../HTMLImports/src/Observer.js","../HTMLImports/src/boot.js","../CustomElements/src/scope.js","../CustomElements/src/Observer.js","../CustomElements/src/CustomElements.js","../CustomElements/src/Parser.js","../CustomElements/src/boot.js","src/patches-custom-elements.js","src/loader.js","src/styleloader.js","../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KAAA,gBAGA,KAAA,cAAA,QACA,KAAA,cAAA,SAGA,MAAA,WACA,IAAA,KAAA,OAAA,CAEA,KAAA,WACA,KAAA,GAAA,GAAA,EAAA,EAAA,KAAA,UAAA,OAAA,IACA,KAAA,sBAAA,KAAA,UAAA,GAGA,MAAA,UAAA,OAAA,EACA,KAAA,YACA,KAAA,iBAAA,UAAA,OACA,KAAA,QAAA,KAKA,oBAAA,qBAAA,GACA,MC7tCA,SAAA,GAUA,QAAA,KACA,IACA,GAAA,EACA,EAAA,eAAA,WACA,GAAA,EACA,SAAA,MAAA,QAAA,MAAA,oBACA,EAAA,6BACA,SAAA,MAAA,QAAA,cAdA,GAAA,GAAA,SAAA,cAAA,QACA,GAAA,YAAA,oEACA,IAAA,GAAA,SAAA,cAAA,OACA,GAAA,aAAA,EAAA,EAAA,WAGA,IAAA,EAeA,IAAA,SAAA,iBAQA,EAAA,iBARA,CACA,GAAA,GAAA,GACA,QAAA,iBAAA,qBAAA,WACA,IACA,EAAA,UAAA,YAAA,EAAA,KAOA,GAAA,OAAA,iBAAA,eAAA,UAAA,CACA,GAAA,GAAA,SAAA,UAAA,UACA,UAAA,UAAA,WAAA,SAAA,EAAA,GACA,GAAA,GAAA,EAAA,KAAA,KAAA,EAAA,EAEA,OADA,gBAAA,WAAA,GACA,GAKA,EAAA,MAAA,GAEA,OAAA","sourcesContent":["/**\n * Copyright (c) 2014 The Polymer Project Authors. All rights reserved.\n * This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt\n * The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt\n * The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt\n * Code distributed by Google as part of the polymer project is also\n * subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt\n */\n\nwindow.Platform = window.Platform || {};\n// prepopulate window.logFlags if necessary\nwindow.logFlags = window.logFlags || {};\n// process flags\n(function(scope){\n // import\n var flags = scope.flags || {};\n // populate flags from location\n location.search.slice(1).split('&').forEach(function(o) {\n o = o.split('=');\n o[0] && (flags[o[0]] = o[1] || true);\n });\n var entryPoint = document.currentScript ||\n document.querySelector('script[src*=\"platform.js\"]');\n if (entryPoint) {\n var a = entryPoint.attributes;\n for (var i = 0, n; i < a.length; i++) {\n n = a[i];\n if (n.name !== 'src') {\n flags[n.name] = n.value || true;\n }\n }\n }\n if (flags.log) {\n flags.log.split(',').forEach(function(f) {\n window.logFlags[f] = true;\n });\n }\n // If any of these flags match 'native', then force native ShadowDOM; any\n // other truthy value, or failure to detect native\n // ShadowDOM, results in polyfill\n flags.shadow = flags.shadow || flags.shadowdom || flags.polyfill;\n if (flags.shadow === 'native') {\n flags.shadow = false;\n } else {\n flags.shadow = flags.shadow || !HTMLElement.prototype.createShadowRoot;\n }\n\n if (flags.shadow && document.querySelectorAll('script').length > 1) {\n console.warn('platform.js is not the first script on the page. ' +\n 'See http://www.polymer-project.org/docs/start/platform.html#setup ' +\n 'for details.');\n }\n\n // CustomElements polyfill flag\n if (flags.register) {\n window.CustomElements = window.CustomElements || {flags: {}};\n window.CustomElements.flags.register = flags.register;\n }\n\n if (flags.imports) {\n window.HTMLImports = window.HTMLImports || {flags: {}};\n window.HTMLImports.flags.imports = flags.imports;\n }\n\n // export\n scope.flags = flags;\n})(Platform);\n","/*\n * Copyright 2012 The Polymer Authors. All rights reserved.\n * Use of this source code is governed by a BSD-style\n * license that can be found in the LICENSE file.\n */\n\nif (typeof WeakMap === 'undefined') {\n (function() {\n var defineProperty = Object.defineProperty;\n var counter = Date.now() % 1e9;\n\n var WeakMap = function() {\n this.name = '__st' + (Math.random() * 1e9 >>> 0) + (counter++ + '__');\n };\n\n WeakMap.prototype = {\n set: function(key, value) {\n var entry = key[this.name];\n if (entry && entry[0] === key)\n entry[1] = value;\n else\n defineProperty(key, this.name, {value: [key, value], writable: true});\n },\n get: function(key) {\n var entry;\n return (entry = key[this.name]) && entry[0] === key ?\n entry[1] : undefined;\n },\n delete: function(key) {\n this.set(key, undefined);\n }\n };\n\n window.WeakMap = WeakMap;\n })();\n}\n","// Copyright 2012 Google Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n(function(global) {\n 'use strict';\n\n // Detect and do basic sanity checking on Object/Array.observe.\n function detectObjectObserve() {\n if (typeof Object.observe !== 'function' ||\n typeof Array.observe !== 'function') {\n return false;\n }\n\n var records = [];\n\n function callback(recs) {\n records = recs;\n }\n\n var test = {};\n var arr = [];\n Object.observe(test, callback);\n Array.observe(arr, callback);\n test.id = 1;\n test.id = 2;\n delete test.id;\n arr.push(1, 2);\n arr.length = 0;\n\n Object.deliverChangeRecords(callback);\n if (records.length !== 5)\n return false;\n\n if (records[0].type != 'add' ||\n records[1].type != 'update' ||\n records[2].type != 'delete' ||\n records[3].type != 'splice' ||\n records[4].type != 'splice') {\n return false;\n }\n\n Object.unobserve(test, callback);\n Array.unobserve(arr, callback);\n\n return true;\n }\n\n var hasObserve = detectObjectObserve();\n\n function detectEval() {\n // Don't test for eval if we're running in a Chrome App environment.\n // We check for APIs set that only exist in a Chrome App context.\n if (typeof chrome !== 'undefined' && chrome.app && chrome.app.runtime) {\n return false;\n }\n\n try {\n var f = new Function('', 'return true;');\n return f();\n } catch (ex) {\n return false;\n }\n }\n\n var hasEval = detectEval();\n\n function isIndex(s) {\n return +s === s >>> 0;\n }\n\n function toNumber(s) {\n return +s;\n }\n\n function isObject(obj) {\n return obj === Object(obj);\n }\n\n var numberIsNaN = global.Number.isNaN || function(value) {\n return typeof value === 'number' && global.isNaN(value);\n }\n\n function areSameValue(left, right) {\n if (left === right)\n return left !== 0 || 1 / left === 1 / right;\n if (numberIsNaN(left) && numberIsNaN(right))\n return true;\n\n return left !== left && right !== right;\n }\n\n var createObject = ('__proto__' in {}) ?\n function(obj) { return obj; } :\n function(obj) {\n var proto = obj.__proto__;\n if (!proto)\n return obj;\n var newObject = Object.create(proto);\n Object.getOwnPropertyNames(obj).forEach(function(name) {\n Object.defineProperty(newObject, name,\n Object.getOwnPropertyDescriptor(obj, name));\n });\n return newObject;\n };\n\n var identStart = '[\\$_a-zA-Z]';\n var identPart = '[\\$_a-zA-Z0-9]';\n var identRegExp = new RegExp('^' + identStart + '+' + identPart + '*' + '$');\n\n function getPathCharType(char) {\n if (char === undefined)\n return 'eof';\n\n var code = char.charCodeAt(0);\n\n switch(code) {\n case 0x5B: // [\n case 0x5D: // ]\n case 0x2E: // .\n case 0x22: // \"\n case 0x27: // '\n case 0x30: // 0\n return char;\n\n case 0x5F: // _\n case 0x24: // $\n return 'ident';\n\n case 0x20: // Space\n case 0x09: // Tab\n case 0x0A: // Newline\n case 0x0D: // Return\n case 0xA0: // No-break space\n case 0xFEFF: // Byte Order Mark\n case 0x2028: // Line Separator\n case 0x2029: // Paragraph Separator\n return 'ws';\n }\n\n // a-z, A-Z\n if ((0x61 <= code && code <= 0x7A) || (0x41 <= code && code <= 0x5A))\n return 'ident';\n\n // 1-9\n if (0x31 <= code && code <= 0x39)\n return 'number';\n\n return 'else';\n }\n\n var pathStateMachine = {\n 'beforePath': {\n 'ws': ['beforePath'],\n 'ident': ['inIdent', 'append'],\n '[': ['beforeElement'],\n 'eof': ['afterPath']\n },\n\n 'inPath': {\n 'ws': ['inPath'],\n '.': ['beforeIdent'],\n '[': ['beforeElement'],\n 'eof': ['afterPath']\n },\n\n 'beforeIdent': {\n 'ws': ['beforeIdent'],\n 'ident': ['inIdent', 'append']\n },\n\n 'inIdent': {\n 'ident': ['inIdent', 'append'],\n '0': ['inIdent', 'append'],\n 'number': ['inIdent', 'append'],\n 'ws': ['inPath', 'push'],\n '.': ['beforeIdent', 'push'],\n '[': ['beforeElement', 'push'],\n 'eof': ['afterPath', 'push']\n },\n\n 'beforeElement': {\n 'ws': ['beforeElement'],\n '0': ['afterZero', 'append'],\n 'number': ['inIndex', 'append'],\n \"'\": ['inSingleQuote', 'append', ''],\n '\"': ['inDoubleQuote', 'append', '']\n },\n\n 'afterZero': {\n 'ws': ['afterElement', 'push'],\n ']': ['inPath', 'push']\n },\n\n 'inIndex': {\n '0': ['inIndex', 'append'],\n 'number': ['inIndex', 'append'],\n 'ws': ['afterElement'],\n ']': ['inPath', 'push']\n },\n\n 'inSingleQuote': {\n \"'\": ['afterElement'],\n 'eof': ['error'],\n 'else': ['inSingleQuote', 'append']\n },\n\n 'inDoubleQuote': {\n '\"': ['afterElement'],\n 'eof': ['error'],\n 'else': ['inDoubleQuote', 'append']\n },\n\n 'afterElement': {\n 'ws': ['afterElement'],\n ']': ['inPath', 'push']\n }\n }\n\n function noop() {}\n\n function parsePath(path) {\n var keys = [];\n var index = -1;\n var c, newChar, key, type, transition, action, typeMap, mode = 'beforePath';\n\n var actions = {\n push: function() {\n if (key === undefined)\n return;\n\n keys.push(key);\n key = undefined;\n },\n\n append: function() {\n if (key === undefined)\n key = newChar\n else\n key += newChar;\n }\n };\n\n function maybeUnescapeQuote() {\n if (index >= path.length)\n return;\n\n var nextChar = path[index + 1];\n if ((mode == 'inSingleQuote' && nextChar == \"'\") ||\n (mode == 'inDoubleQuote' && nextChar == '\"')) {\n index++;\n newChar = nextChar;\n actions.append();\n return true;\n }\n }\n\n while (mode) {\n index++;\n c = path[index];\n\n if (c == '\\\\' && maybeUnescapeQuote(mode))\n continue;\n\n type = getPathCharType(c);\n typeMap = pathStateMachine[mode];\n transition = typeMap[type] || typeMap['else'] || 'error';\n\n if (transition == 'error')\n return; // parse error;\n\n mode = transition[0];\n action = actions[transition[1]] || noop;\n newChar = transition[2] === undefined ? c : transition[2];\n action();\n\n if (mode === 'afterPath') {\n return keys;\n }\n }\n\n return; // parse error\n }\n\n function isIdent(s) {\n return identRegExp.test(s);\n }\n\n var constructorIsPrivate = {};\n\n function Path(parts, privateToken) {\n if (privateToken !== constructorIsPrivate)\n throw Error('Use Path.get to retrieve path objects');\n\n for (var i = 0; i < parts.length; i++) {\n this.push(String(parts[i]));\n }\n\n if (hasEval && this.length) {\n this.getValueFrom = this.compiledGetValueFromFn();\n }\n }\n\n // TODO(rafaelw): Make simple LRU cache\n var pathCache = {};\n\n function getPath(pathString) {\n if (pathString instanceof Path)\n return pathString;\n\n if (pathString == null || pathString.length == 0)\n pathString = '';\n\n if (typeof pathString != 'string') {\n if (isIndex(pathString.length)) {\n // Constructed with array-like (pre-parsed) keys\n return new Path(pathString, constructorIsPrivate);\n }\n\n pathString = String(pathString);\n }\n\n var path = pathCache[pathString];\n if (path)\n return path;\n\n var parts = parsePath(pathString);\n if (!parts)\n return invalidPath;\n\n var path = new Path(parts, constructorIsPrivate);\n pathCache[pathString] = path;\n return path;\n }\n\n Path.get = getPath;\n\n function formatAccessor(key) {\n if (isIndex(key)) {\n return '[' + key + ']';\n } else {\n return '[\"' + key.replace(/\"/g, '\\\\\"') + '\"]';\n }\n }\n\n Path.prototype = createObject({\n __proto__: [],\n valid: true,\n\n toString: function() {\n var pathString = '';\n for (var i = 0; i < this.length; i++) {\n var key = this[i];\n if (isIdent(key)) {\n pathString += i ? '.' + key : key;\n } else {\n pathString += formatAccessor(key);\n }\n }\n\n return pathString;\n },\n\n getValueFrom: function(obj, directObserver) {\n for (var i = 0; i < this.length; i++) {\n if (obj == null)\n return;\n obj = obj[this[i]];\n }\n return obj;\n },\n\n iterateObjects: function(obj, observe) {\n for (var i = 0; i < this.length; i++) {\n if (i)\n obj = obj[this[i - 1]];\n if (!isObject(obj))\n return;\n observe(obj, this[0]);\n }\n },\n\n compiledGetValueFromFn: function() {\n var str = '';\n var pathString = 'obj';\n str += 'if (obj != null';\n var i = 0;\n var key;\n for (; i < (this.length - 1); i++) {\n key = this[i];\n pathString += isIdent(key) ? '.' + key : formatAccessor(key);\n str += ' &&\\n ' + pathString + ' != null';\n }\n str += ')\\n';\n\n var key = this[i];\n pathString += isIdent(key) ? '.' + key : formatAccessor(key);\n\n str += ' return ' + pathString + ';\\nelse\\n return undefined;';\n return new Function('obj', str);\n },\n\n setValueFrom: function(obj, value) {\n if (!this.length)\n return false;\n\n for (var i = 0; i < this.length - 1; i++) {\n if (!isObject(obj))\n return false;\n obj = obj[this[i]];\n }\n\n if (!isObject(obj))\n return false;\n\n obj[this[i]] = value;\n return true;\n }\n });\n\n var invalidPath = new Path('', constructorIsPrivate);\n invalidPath.valid = false;\n invalidPath.getValueFrom = invalidPath.setValueFrom = function() {};\n\n var MAX_DIRTY_CHECK_CYCLES = 1000;\n\n function dirtyCheck(observer) {\n var cycles = 0;\n while (cycles < MAX_DIRTY_CHECK_CYCLES && observer.check_()) {\n cycles++;\n }\n if (global.testingExposeCycleCount)\n global.dirtyCheckCycleCount = cycles;\n\n return cycles > 0;\n }\n\n function objectIsEmpty(object) {\n for (var prop in object)\n return false;\n return true;\n }\n\n function diffIsEmpty(diff) {\n return objectIsEmpty(diff.added) &&\n objectIsEmpty(diff.removed) &&\n objectIsEmpty(diff.changed);\n }\n\n function diffObjectFromOldObject(object, oldObject) {\n var added = {};\n var removed = {};\n var changed = {};\n\n for (var prop in oldObject) {\n var newValue = object[prop];\n\n if (newValue !== undefined && newValue === oldObject[prop])\n continue;\n\n if (!(prop in object)) {\n removed[prop] = undefined;\n continue;\n }\n\n if (newValue !== oldObject[prop])\n changed[prop] = newValue;\n }\n\n for (var prop in object) {\n if (prop in oldObject)\n continue;\n\n added[prop] = object[prop];\n }\n\n if (Array.isArray(object) && object.length !== oldObject.length)\n changed.length = object.length;\n\n return {\n added: added,\n removed: removed,\n changed: changed\n };\n }\n\n var eomTasks = [];\n function runEOMTasks() {\n if (!eomTasks.length)\n return false;\n\n for (var i = 0; i < eomTasks.length; i++) {\n eomTasks[i]();\n }\n eomTasks.length = 0;\n return true;\n }\n\n var runEOM = hasObserve ? (function(){\n var eomObj = { pingPong: true };\n var eomRunScheduled = false;\n\n Object.observe(eomObj, function() {\n runEOMTasks();\n eomRunScheduled = false;\n });\n\n return function(fn) {\n eomTasks.push(fn);\n if (!eomRunScheduled) {\n eomRunScheduled = true;\n eomObj.pingPong = !eomObj.pingPong;\n }\n };\n })() :\n (function() {\n return function(fn) {\n eomTasks.push(fn);\n };\n })();\n\n var observedObjectCache = [];\n\n function newObservedObject() {\n var observer;\n var object;\n var discardRecords = false;\n var first = true;\n\n function callback(records) {\n if (observer && observer.state_ === OPENED && !discardRecords)\n observer.check_(records);\n }\n\n return {\n open: function(obs) {\n if (observer)\n throw Error('ObservedObject in use');\n\n if (!first)\n Object.deliverChangeRecords(callback);\n\n observer = obs;\n first = false;\n },\n observe: function(obj, arrayObserve) {\n object = obj;\n if (arrayObserve)\n Array.observe(object, callback);\n else\n Object.observe(object, callback);\n },\n deliver: function(discard) {\n discardRecords = discard;\n Object.deliverChangeRecords(callback);\n discardRecords = false;\n },\n close: function() {\n observer = undefined;\n Object.unobserve(object, callback);\n observedObjectCache.push(this);\n }\n };\n }\n\n /*\n * The observedSet abstraction is a perf optimization which reduces the total\n * number of Object.observe observations of a set of objects. The idea is that\n * groups of Observers will have some object dependencies in common and this\n * observed set ensures that each object in the transitive closure of\n * dependencies is only observed once. The observedSet acts as a write barrier\n * such that whenever any change comes through, all Observers are checked for\n * changed values.\n *\n * Note that this optimization is explicitly moving work from setup-time to\n * change-time.\n *\n * TODO(rafaelw): Implement \"garbage collection\". In order to move work off\n * the critical path, when Observers are closed, their observed objects are\n * not Object.unobserve(d). As a result, it's possible that if the observedSet\n * is kept open, but some Observers have been closed, it could cause \"leaks\"\n * (prevent otherwise collectable objects from being collected). At some\n * point, we should implement incremental \"gc\" which keeps a list of\n * observedSets which may need clean-up and does small amounts of cleanup on a\n * timeout until all is clean.\n */\n\n function getObservedObject(observer, object, arrayObserve) {\n var dir = observedObjectCache.pop() || newObservedObject();\n dir.open(observer);\n dir.observe(object, arrayObserve);\n return dir;\n }\n\n var observedSetCache = [];\n\n function newObservedSet() {\n var observerCount = 0;\n var observers = [];\n var objects = [];\n var rootObj;\n var rootObjProps;\n\n function observe(obj, prop) {\n if (!obj)\n return;\n\n if (obj === rootObj)\n rootObjProps[prop] = true;\n\n if (objects.indexOf(obj) < 0) {\n objects.push(obj);\n Object.observe(obj, callback);\n }\n\n observe(Object.getPrototypeOf(obj), prop);\n }\n\n function allRootObjNonObservedProps(recs) {\n for (var i = 0; i < recs.length; i++) {\n var rec = recs[i];\n if (rec.object !== rootObj ||\n rootObjProps[rec.name] ||\n rec.type === 'setPrototype') {\n return false;\n }\n }\n return true;\n }\n\n function callback(recs) {\n if (allRootObjNonObservedProps(recs))\n return;\n\n var observer;\n for (var i = 0; i < observers.length; i++) {\n observer = observers[i];\n if (observer.state_ == OPENED) {\n observer.iterateObjects_(observe);\n }\n }\n\n for (var i = 0; i < observers.length; i++) {\n observer = observers[i];\n if (observer.state_ == OPENED) {\n observer.check_();\n }\n }\n }\n\n var record = {\n object: undefined,\n objects: objects,\n open: function(obs, object) {\n if (!rootObj) {\n rootObj = object;\n rootObjProps = {};\n }\n\n observers.push(obs);\n observerCount++;\n obs.iterateObjects_(observe);\n },\n close: function(obs) {\n observerCount--;\n if (observerCount > 0) {\n return;\n }\n\n for (var i = 0; i < objects.length; i++) {\n Object.unobserve(objects[i], callback);\n Observer.unobservedCount++;\n }\n\n observers.length = 0;\n objects.length = 0;\n rootObj = undefined;\n rootObjProps = undefined;\n observedSetCache.push(this);\n }\n };\n\n return record;\n }\n\n var lastObservedSet;\n\n function getObservedSet(observer, obj) {\n if (!lastObservedSet || lastObservedSet.object !== obj) {\n lastObservedSet = observedSetCache.pop() || newObservedSet();\n lastObservedSet.object = obj;\n }\n lastObservedSet.open(observer, obj);\n return lastObservedSet;\n }\n\n var UNOPENED = 0;\n var OPENED = 1;\n var CLOSED = 2;\n var RESETTING = 3;\n\n var nextObserverId = 1;\n\n function Observer() {\n this.state_ = UNOPENED;\n this.callback_ = undefined;\n this.target_ = undefined; // TODO(rafaelw): Should be WeakRef\n this.directObserver_ = undefined;\n this.value_ = undefined;\n this.id_ = nextObserverId++;\n }\n\n Observer.prototype = {\n open: function(callback, target) {\n if (this.state_ != UNOPENED)\n throw Error('Observer has already been opened.');\n\n addToAll(this);\n this.callback_ = callback;\n this.target_ = target;\n this.connect_();\n this.state_ = OPENED;\n return this.value_;\n },\n\n close: function() {\n if (this.state_ != OPENED)\n return;\n\n removeFromAll(this);\n this.disconnect_();\n this.value_ = undefined;\n this.callback_ = undefined;\n this.target_ = undefined;\n this.state_ = CLOSED;\n },\n\n deliver: function() {\n if (this.state_ != OPENED)\n return;\n\n dirtyCheck(this);\n },\n\n report_: function(changes) {\n try {\n this.callback_.apply(this.target_, changes);\n } catch (ex) {\n Observer._errorThrownDuringCallback = true;\n console.error('Exception caught during observer callback: ' +\n (ex.stack || ex));\n }\n },\n\n discardChanges: function() {\n this.check_(undefined, true);\n return this.value_;\n }\n }\n\n var collectObservers = !hasObserve;\n var allObservers;\n Observer._allObserversCount = 0;\n\n if (collectObservers) {\n allObservers = [];\n }\n\n function addToAll(observer) {\n Observer._allObserversCount++;\n if (!collectObservers)\n return;\n\n allObservers.push(observer);\n }\n\n function removeFromAll(observer) {\n Observer._allObserversCount--;\n }\n\n var runningMicrotaskCheckpoint = false;\n\n var hasDebugForceFullDelivery = hasObserve && hasEval && (function() {\n try {\n eval('%RunMicrotasks()');\n return true;\n } catch (ex) {\n return false;\n }\n })();\n\n global.Platform = global.Platform || {};\n\n global.Platform.performMicrotaskCheckpoint = function() {\n if (runningMicrotaskCheckpoint)\n return;\n\n if (hasDebugForceFullDelivery) {\n eval('%RunMicrotasks()');\n return;\n }\n\n if (!collectObservers)\n return;\n\n runningMicrotaskCheckpoint = true;\n\n var cycles = 0;\n var anyChanged, toCheck;\n\n do {\n cycles++;\n toCheck = allObservers;\n allObservers = [];\n anyChanged = false;\n\n for (var i = 0; i < toCheck.length; i++) {\n var observer = toCheck[i];\n if (observer.state_ != OPENED)\n continue;\n\n if (observer.check_())\n anyChanged = true;\n\n allObservers.push(observer);\n }\n if (runEOMTasks())\n anyChanged = true;\n } while (cycles < MAX_DIRTY_CHECK_CYCLES && anyChanged);\n\n if (global.testingExposeCycleCount)\n global.dirtyCheckCycleCount = cycles;\n\n runningMicrotaskCheckpoint = false;\n };\n\n if (collectObservers) {\n global.Platform.clearObservers = function() {\n allObservers = [];\n };\n }\n\n function ObjectObserver(object) {\n Observer.call(this);\n this.value_ = object;\n this.oldObject_ = undefined;\n }\n\n ObjectObserver.prototype = createObject({\n __proto__: Observer.prototype,\n\n arrayObserve: false,\n\n connect_: function(callback, target) {\n if (hasObserve) {\n this.directObserver_ = getObservedObject(this, this.value_,\n this.arrayObserve);\n } else {\n this.oldObject_ = this.copyObject(this.value_);\n }\n\n },\n\n copyObject: function(object) {\n var copy = Array.isArray(object) ? [] : {};\n for (var prop in object) {\n copy[prop] = object[prop];\n };\n if (Array.isArray(object))\n copy.length = object.length;\n return copy;\n },\n\n check_: function(changeRecords, skipChanges) {\n var diff;\n var oldValues;\n if (hasObserve) {\n if (!changeRecords)\n return false;\n\n oldValues = {};\n diff = diffObjectFromChangeRecords(this.value_, changeRecords,\n oldValues);\n } else {\n oldValues = this.oldObject_;\n diff = diffObjectFromOldObject(this.value_, this.oldObject_);\n }\n\n if (diffIsEmpty(diff))\n return false;\n\n if (!hasObserve)\n this.oldObject_ = this.copyObject(this.value_);\n\n this.report_([\n diff.added || {},\n diff.removed || {},\n diff.changed || {},\n function(property) {\n return oldValues[property];\n }\n ]);\n\n return true;\n },\n\n disconnect_: function() {\n if (hasObserve) {\n this.directObserver_.close();\n this.directObserver_ = undefined;\n } else {\n this.oldObject_ = undefined;\n }\n },\n\n deliver: function() {\n if (this.state_ != OPENED)\n return;\n\n if (hasObserve)\n this.directObserver_.deliver(false);\n else\n dirtyCheck(this);\n },\n\n discardChanges: function() {\n if (this.directObserver_)\n this.directObserver_.deliver(true);\n else\n this.oldObject_ = this.copyObject(this.value_);\n\n return this.value_;\n }\n });\n\n function ArrayObserver(array) {\n if (!Array.isArray(array))\n throw Error('Provided object is not an Array');\n ObjectObserver.call(this, array);\n }\n\n ArrayObserver.prototype = createObject({\n\n __proto__: ObjectObserver.prototype,\n\n arrayObserve: true,\n\n copyObject: function(arr) {\n return arr.slice();\n },\n\n check_: function(changeRecords) {\n var splices;\n if (hasObserve) {\n if (!changeRecords)\n return false;\n splices = projectArraySplices(this.value_, changeRecords);\n } else {\n splices = calcSplices(this.value_, 0, this.value_.length,\n this.oldObject_, 0, this.oldObject_.length);\n }\n\n if (!splices || !splices.length)\n return false;\n\n if (!hasObserve)\n this.oldObject_ = this.copyObject(this.value_);\n\n this.report_([splices]);\n return true;\n }\n });\n\n ArrayObserver.applySplices = function(previous, current, splices) {\n splices.forEach(function(splice) {\n var spliceArgs = [splice.index, splice.removed.length];\n var addIndex = splice.index;\n while (addIndex < splice.index + splice.addedCount) {\n spliceArgs.push(current[addIndex]);\n addIndex++;\n }\n\n Array.prototype.splice.apply(previous, spliceArgs);\n });\n };\n\n function PathObserver(object, path) {\n Observer.call(this);\n\n this.object_ = object;\n this.path_ = getPath(path);\n this.directObserver_ = undefined;\n }\n\n PathObserver.prototype = createObject({\n __proto__: Observer.prototype,\n\n get path() {\n return this.path_;\n },\n\n connect_: function() {\n if (hasObserve)\n this.directObserver_ = getObservedSet(this, this.object_);\n\n this.check_(undefined, true);\n },\n\n disconnect_: function() {\n this.value_ = undefined;\n\n if (this.directObserver_) {\n this.directObserver_.close(this);\n this.directObserver_ = undefined;\n }\n },\n\n iterateObjects_: function(observe) {\n this.path_.iterateObjects(this.object_, observe);\n },\n\n check_: function(changeRecords, skipChanges) {\n var oldValue = this.value_;\n this.value_ = this.path_.getValueFrom(this.object_);\n if (skipChanges || areSameValue(this.value_, oldValue))\n return false;\n\n this.report_([this.value_, oldValue, this]);\n return true;\n },\n\n setValue: function(newValue) {\n if (this.path_)\n this.path_.setValueFrom(this.object_, newValue);\n }\n });\n\n function CompoundObserver(reportChangesOnOpen) {\n Observer.call(this);\n\n this.reportChangesOnOpen_ = reportChangesOnOpen;\n this.value_ = [];\n this.directObserver_ = undefined;\n this.observed_ = [];\n }\n\n var observerSentinel = {};\n\n CompoundObserver.prototype = createObject({\n __proto__: Observer.prototype,\n\n connect_: function() {\n if (hasObserve) {\n var object;\n var needsDirectObserver = false;\n for (var i = 0; i < this.observed_.length; i += 2) {\n object = this.observed_[i]\n if (object !== observerSentinel) {\n needsDirectObserver = true;\n break;\n }\n }\n\n if (needsDirectObserver)\n this.directObserver_ = getObservedSet(this, object);\n }\n\n this.check_(undefined, !this.reportChangesOnOpen_);\n },\n\n disconnect_: function() {\n for (var i = 0; i < this.observed_.length; i += 2) {\n if (this.observed_[i] === observerSentinel)\n this.observed_[i + 1].close();\n }\n this.observed_.length = 0;\n this.value_.length = 0;\n\n if (this.directObserver_) {\n this.directObserver_.close(this);\n this.directObserver_ = undefined;\n }\n },\n\n addPath: function(object, path) {\n if (this.state_ != UNOPENED && this.state_ != RESETTING)\n throw Error('Cannot add paths once started.');\n\n var path = getPath(path);\n this.observed_.push(object, path);\n if (!this.reportChangesOnOpen_)\n return;\n var index = this.observed_.length / 2 - 1;\n this.value_[index] = path.getValueFrom(object);\n },\n\n addObserver: function(observer) {\n if (this.state_ != UNOPENED && this.state_ != RESETTING)\n throw Error('Cannot add observers once started.');\n\n this.observed_.push(observerSentinel, observer);\n if (!this.reportChangesOnOpen_)\n return;\n var index = this.observed_.length / 2 - 1;\n this.value_[index] = observer.open(this.deliver, this);\n },\n\n startReset: function() {\n if (this.state_ != OPENED)\n throw Error('Can only reset while open');\n\n this.state_ = RESETTING;\n this.disconnect_();\n },\n\n finishReset: function() {\n if (this.state_ != RESETTING)\n throw Error('Can only finishReset after startReset');\n this.state_ = OPENED;\n this.connect_();\n\n return this.value_;\n },\n\n iterateObjects_: function(observe) {\n var object;\n for (var i = 0; i < this.observed_.length; i += 2) {\n object = this.observed_[i]\n if (object !== observerSentinel)\n this.observed_[i + 1].iterateObjects(object, observe)\n }\n },\n\n check_: function(changeRecords, skipChanges) {\n var oldValues;\n for (var i = 0; i < this.observed_.length; i += 2) {\n var object = this.observed_[i];\n var path = this.observed_[i+1];\n var value;\n if (object === observerSentinel) {\n var observable = path;\n value = this.state_ === UNOPENED ?\n observable.open(this.deliver, this) :\n observable.discardChanges();\n } else {\n value = path.getValueFrom(object);\n }\n\n if (skipChanges) {\n this.value_[i / 2] = value;\n continue;\n }\n\n if (areSameValue(value, this.value_[i / 2]))\n continue;\n\n oldValues = oldValues || [];\n oldValues[i / 2] = this.value_[i / 2];\n this.value_[i / 2] = value;\n }\n\n if (!oldValues)\n return false;\n\n // TODO(rafaelw): Having observed_ as the third callback arg here is\n // pretty lame API. Fix.\n this.report_([this.value_, oldValues, this.observed_]);\n return true;\n }\n });\n\n function identFn(value) { return value; }\n\n function ObserverTransform(observable, getValueFn, setValueFn,\n dontPassThroughSet) {\n this.callback_ = undefined;\n this.target_ = undefined;\n this.value_ = undefined;\n this.observable_ = observable;\n this.getValueFn_ = getValueFn || identFn;\n this.setValueFn_ = setValueFn || identFn;\n // TODO(rafaelw): This is a temporary hack. PolymerExpressions needs this\n // at the moment because of a bug in it's dependency tracking.\n this.dontPassThroughSet_ = dontPassThroughSet;\n }\n\n ObserverTransform.prototype = {\n open: function(callback, target) {\n this.callback_ = callback;\n this.target_ = target;\n this.value_ =\n this.getValueFn_(this.observable_.open(this.observedCallback_, this));\n return this.value_;\n },\n\n observedCallback_: function(value) {\n value = this.getValueFn_(value);\n if (areSameValue(value, this.value_))\n return;\n var oldValue = this.value_;\n this.value_ = value;\n this.callback_.call(this.target_, this.value_, oldValue);\n },\n\n discardChanges: function() {\n this.value_ = this.getValueFn_(this.observable_.discardChanges());\n return this.value_;\n },\n\n deliver: function() {\n return this.observable_.deliver();\n },\n\n setValue: function(value) {\n value = this.setValueFn_(value);\n if (!this.dontPassThroughSet_ && this.observable_.setValue)\n return this.observable_.setValue(value);\n },\n\n close: function() {\n if (this.observable_)\n this.observable_.close();\n this.callback_ = undefined;\n this.target_ = undefined;\n this.observable_ = undefined;\n this.value_ = undefined;\n this.getValueFn_ = undefined;\n this.setValueFn_ = undefined;\n }\n }\n\n var expectedRecordTypes = {\n add: true,\n update: true,\n delete: true\n };\n\n function diffObjectFromChangeRecords(object, changeRecords, oldValues) {\n var added = {};\n var removed = {};\n\n for (var i = 0; i < changeRecords.length; i++) {\n var record = changeRecords[i];\n if (!expectedRecordTypes[record.type]) {\n console.error('Unknown changeRecord type: ' + record.type);\n console.error(record);\n continue;\n }\n\n if (!(record.name in oldValues))\n oldValues[record.name] = record.oldValue;\n\n if (record.type == 'update')\n continue;\n\n if (record.type == 'add') {\n if (record.name in removed)\n delete removed[record.name];\n else\n added[record.name] = true;\n\n continue;\n }\n\n // type = 'delete'\n if (record.name in added) {\n delete added[record.name];\n delete oldValues[record.name];\n } else {\n removed[record.name] = true;\n }\n }\n\n for (var prop in added)\n added[prop] = object[prop];\n\n for (var prop in removed)\n removed[prop] = undefined;\n\n var changed = {};\n for (var prop in oldValues) {\n if (prop in added || prop in removed)\n continue;\n\n var newValue = object[prop];\n if (oldValues[prop] !== newValue)\n changed[prop] = newValue;\n }\n\n return {\n added: added,\n removed: removed,\n changed: changed\n };\n }\n\n function newSplice(index, removed, addedCount) {\n return {\n index: index,\n removed: removed,\n addedCount: addedCount\n };\n }\n\n var EDIT_LEAVE = 0;\n var EDIT_UPDATE = 1;\n var EDIT_ADD = 2;\n var EDIT_DELETE = 3;\n\n function ArraySplice() {}\n\n ArraySplice.prototype = {\n\n // Note: This function is *based* on the computation of the Levenshtein\n // \"edit\" distance. The one change is that \"updates\" are treated as two\n // edits - not one. With Array splices, an update is really a delete\n // followed by an add. By retaining this, we optimize for \"keeping\" the\n // maximum array items in the original array. For example:\n //\n // 'xxxx123' -> '123yyyy'\n //\n // With 1-edit updates, the shortest path would be just to update all seven\n // characters. With 2-edit updates, we delete 4, leave 3, and add 4. This\n // leaves the substring '123' intact.\n calcEditDistances: function(current, currentStart, currentEnd,\n old, oldStart, oldEnd) {\n // \"Deletion\" columns\n var rowCount = oldEnd - oldStart + 1;\n var columnCount = currentEnd - currentStart + 1;\n var distances = new Array(rowCount);\n\n // \"Addition\" rows. Initialize null column.\n for (var i = 0; i < rowCount; i++) {\n distances[i] = new Array(columnCount);\n distances[i][0] = i;\n }\n\n // Initialize null row\n for (var j = 0; j < columnCount; j++)\n distances[0][j] = j;\n\n for (var i = 1; i < rowCount; i++) {\n for (var j = 1; j < columnCount; j++) {\n if (this.equals(current[currentStart + j - 1], old[oldStart + i - 1]))\n distances[i][j] = distances[i - 1][j - 1];\n else {\n var north = distances[i - 1][j] + 1;\n var west = distances[i][j - 1] + 1;\n distances[i][j] = north < west ? north : west;\n }\n }\n }\n\n return distances;\n },\n\n // This starts at the final weight, and walks \"backward\" by finding\n // the minimum previous weight recursively until the origin of the weight\n // matrix.\n spliceOperationsFromEditDistances: function(distances) {\n var i = distances.length - 1;\n var j = distances[0].length - 1;\n var current = distances[i][j];\n var edits = [];\n while (i > 0 || j > 0) {\n if (i == 0) {\n edits.push(EDIT_ADD);\n j--;\n continue;\n }\n if (j == 0) {\n edits.push(EDIT_DELETE);\n i--;\n continue;\n }\n var northWest = distances[i - 1][j - 1];\n var west = distances[i - 1][j];\n var north = distances[i][j - 1];\n\n var min;\n if (west < north)\n min = west < northWest ? west : northWest;\n else\n min = north < northWest ? north : northWest;\n\n if (min == northWest) {\n if (northWest == current) {\n edits.push(EDIT_LEAVE);\n } else {\n edits.push(EDIT_UPDATE);\n current = northWest;\n }\n i--;\n j--;\n } else if (min == west) {\n edits.push(EDIT_DELETE);\n i--;\n current = west;\n } else {\n edits.push(EDIT_ADD);\n j--;\n current = north;\n }\n }\n\n edits.reverse();\n return edits;\n },\n\n /**\n * Splice Projection functions:\n *\n * A splice map is a representation of how a previous array of items\n * was transformed into a new array of items. Conceptually it is a list of\n * tuples of\n *\n * <index, removed, addedCount>\n *\n * which are kept in ascending index order of. The tuple represents that at\n * the |index|, |removed| sequence of items were removed, and counting forward\n * from |index|, |addedCount| items were added.\n */\n\n /**\n * Lacking individual splice mutation information, the minimal set of\n * splices can be synthesized given the previous state and final state of an\n * array. The basic approach is to calculate the edit distance matrix and\n * choose the shortest path through it.\n *\n * Complexity: O(l * p)\n * l: The length of the current array\n * p: The length of the old array\n */\n calcSplices: function(current, currentStart, currentEnd,\n old, oldStart, oldEnd) {\n var prefixCount = 0;\n var suffixCount = 0;\n\n var minLength = Math.min(currentEnd - currentStart, oldEnd - oldStart);\n if (currentStart == 0 && oldStart == 0)\n prefixCount = this.sharedPrefix(current, old, minLength);\n\n if (currentEnd == current.length && oldEnd == old.length)\n suffixCount = this.sharedSuffix(current, old, minLength - prefixCount);\n\n currentStart += prefixCount;\n oldStart += prefixCount;\n currentEnd -= suffixCount;\n oldEnd -= suffixCount;\n\n if (currentEnd - currentStart == 0 && oldEnd - oldStart == 0)\n return [];\n\n if (currentStart == currentEnd) {\n var splice = newSplice(currentStart, [], 0);\n while (oldStart < oldEnd)\n splice.removed.push(old[oldStart++]);\n\n return [ splice ];\n } else if (oldStart == oldEnd)\n return [ newSplice(currentStart, [], currentEnd - currentStart) ];\n\n var ops = this.spliceOperationsFromEditDistances(\n this.calcEditDistances(current, currentStart, currentEnd,\n old, oldStart, oldEnd));\n\n var splice = undefined;\n var splices = [];\n var index = currentStart;\n var oldIndex = oldStart;\n for (var i = 0; i < ops.length; i++) {\n switch(ops[i]) {\n case EDIT_LEAVE:\n if (splice) {\n splices.push(splice);\n splice = undefined;\n }\n\n index++;\n oldIndex++;\n break;\n case EDIT_UPDATE:\n if (!splice)\n splice = newSplice(index, [], 0);\n\n splice.addedCount++;\n index++;\n\n splice.removed.push(old[oldIndex]);\n oldIndex++;\n break;\n case EDIT_ADD:\n if (!splice)\n splice = newSplice(index, [], 0);\n\n splice.addedCount++;\n index++;\n break;\n case EDIT_DELETE:\n if (!splice)\n splice = newSplice(index, [], 0);\n\n splice.removed.push(old[oldIndex]);\n oldIndex++;\n break;\n }\n }\n\n if (splice) {\n splices.push(splice);\n }\n return splices;\n },\n\n sharedPrefix: function(current, old, searchLength) {\n for (var i = 0; i < searchLength; i++)\n if (!this.equals(current[i], old[i]))\n return i;\n return searchLength;\n },\n\n sharedSuffix: function(current, old, searchLength) {\n var index1 = current.length;\n var index2 = old.length;\n var count = 0;\n while (count < searchLength && this.equals(current[--index1], old[--index2]))\n count++;\n\n return count;\n },\n\n calculateSplices: function(current, previous) {\n return this.calcSplices(current, 0, current.length, previous, 0,\n previous.length);\n },\n\n equals: function(currentValue, previousValue) {\n return currentValue === previousValue;\n }\n };\n\n var arraySplice = new ArraySplice();\n\n function calcSplices(current, currentStart, currentEnd,\n old, oldStart, oldEnd) {\n return arraySplice.calcSplices(current, currentStart, currentEnd,\n old, oldStart, oldEnd);\n }\n\n function intersect(start1, end1, start2, end2) {\n // Disjoint\n if (end1 < start2 || end2 < start1)\n return -1;\n\n // Adjacent\n if (end1 == start2 || end2 == start1)\n return 0;\n\n // Non-zero intersect, span1 first\n if (start1 < start2) {\n if (end1 < end2)\n return end1 - start2; // Overlap\n else\n return end2 - start2; // Contained\n } else {\n // Non-zero intersect, span2 first\n if (end2 < end1)\n return end2 - start1; // Overlap\n else\n return end1 - start1; // Contained\n }\n }\n\n function mergeSplice(splices, index, removed, addedCount) {\n\n var splice = newSplice(index, removed, addedCount);\n\n var inserted = false;\n var insertionOffset = 0;\n\n for (var i = 0; i < splices.length; i++) {\n var current = splices[i];\n current.index += insertionOffset;\n\n if (inserted)\n continue;\n\n var intersectCount = intersect(splice.index,\n splice.index + splice.removed.length,\n current.index,\n current.index + current.addedCount);\n\n if (intersectCount >= 0) {\n // Merge the two splices\n\n splices.splice(i, 1);\n i--;\n\n insertionOffset -= current.addedCount - current.removed.length;\n\n splice.addedCount += current.addedCount - intersectCount;\n var deleteCount = splice.removed.length +\n current.removed.length - intersectCount;\n\n if (!splice.addedCount && !deleteCount) {\n // merged splice is a noop. discard.\n inserted = true;\n } else {\n var removed = current.removed;\n\n if (splice.index < current.index) {\n // some prefix of splice.removed is prepended to current.removed.\n var prepend = splice.removed.slice(0, current.index - splice.index);\n Array.prototype.push.apply(prepend, removed);\n removed = prepend;\n }\n\n if (splice.index + splice.removed.length > current.index + current.addedCount) {\n // some suffix of splice.removed is appended to current.removed.\n var append = splice.removed.slice(current.index + current.addedCount - splice.index);\n Array.prototype.push.apply(removed, append);\n }\n\n splice.removed = removed;\n if (current.index < splice.index) {\n splice.index = current.index;\n }\n }\n } else if (splice.index < current.index) {\n // Insert splice here.\n\n inserted = true;\n\n splices.splice(i, 0, splice);\n i++;\n\n var offset = splice.addedCount - splice.removed.length\n current.index += offset;\n insertionOffset += offset;\n }\n }\n\n if (!inserted)\n splices.push(splice);\n }\n\n function createInitialSplices(array, changeRecords) {\n var splices = [];\n\n for (var i = 0; i < changeRecords.length; i++) {\n var record = changeRecords[i];\n switch(record.type) {\n case 'splice':\n mergeSplice(splices, record.index, record.removed.slice(), record.addedCount);\n break;\n case 'add':\n case 'update':\n case 'delete':\n if (!isIndex(record.name))\n continue;\n var index = toNumber(record.name);\n if (index < 0)\n continue;\n mergeSplice(splices, index, [record.oldValue], 1);\n break;\n default:\n console.error('Unexpected record type: ' + JSON.stringify(record));\n break;\n }\n }\n\n return splices;\n }\n\n function projectArraySplices(array, changeRecords) {\n var splices = [];\n\n createInitialSplices(array, changeRecords).forEach(function(splice) {\n if (splice.addedCount == 1 && splice.removed.length == 1) {\n if (splice.removed[0] !== array[splice.index])\n splices.push(splice);\n\n return\n };\n\n splices = splices.concat(calcSplices(array, splice.index, splice.index + splice.addedCount,\n splice.removed, 0, splice.removed.length));\n });\n\n return splices;\n }\n\n global.Observer = Observer;\n global.Observer.runEOM_ = runEOM;\n global.Observer.observerSentinel_ = observerSentinel; // for testing.\n global.Observer.hasObjectObserve = hasObserve;\n global.ArrayObserver = ArrayObserver;\n global.ArrayObserver.calculateSplices = function(current, previous) {\n return arraySplice.calculateSplices(current, previous);\n };\n\n global.ArraySplice = ArraySplice;\n global.ObjectObserver = ObjectObserver;\n global.PathObserver = PathObserver;\n global.CompoundObserver = CompoundObserver;\n global.Path = Path;\n global.ObserverTransform = ObserverTransform;\n})(typeof global !== 'undefined' && global && typeof module !== 'undefined' && module ? global : this || window);\n","// select ShadowDOM impl\r\nif (Platform.flags.shadow) {\r\n","// Copyright 2012 The Polymer Authors. All rights reserved.\n// Use of this source code is goverened by a BSD-style\n// license that can be found in the LICENSE file.\n\nwindow.ShadowDOMPolyfill = {};\n\n(function(scope) {\n 'use strict';\n\n var constructorTable = new WeakMap();\n var nativePrototypeTable = new WeakMap();\n var wrappers = Object.create(null);\n\n function detectEval() {\n // Don't test for eval if we're running in a Chrome App environment.\n // We check for APIs set that only exist in a Chrome App context.\n if (typeof chrome !== 'undefined' && chrome.app && chrome.app.runtime) {\n return false;\n }\n\n try {\n var f = new Function('return true;');\n return f();\n } catch (ex) {\n return false;\n }\n }\n\n var hasEval = detectEval();\n\n function assert(b) {\n if (!b)\n throw new Error('Assertion failed');\n };\n\n var defineProperty = Object.defineProperty;\n var getOwnPropertyNames = Object.getOwnPropertyNames;\n var getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;\n\n function mixin(to, from) {\n var names = getOwnPropertyNames(from);\n for (var i = 0; i < names.length; i++) {\n var name = names[i];\n defineProperty(to, name, getOwnPropertyDescriptor(from, name));\n }\n return to;\n };\n\n function mixinStatics(to, from) {\n var names = getOwnPropertyNames(from);\n for (var i = 0; i < names.length; i++) {\n var name = names[i];\n switch (name) {\n case 'arguments':\n case 'caller':\n case 'length':\n case 'name':\n case 'prototype':\n case 'toString':\n continue;\n }\n defineProperty(to, name, getOwnPropertyDescriptor(from, name));\n }\n return to;\n };\n\n function oneOf(object, propertyNames) {\n for (var i = 0; i < propertyNames.length; i++) {\n if (propertyNames[i] in object)\n return propertyNames[i];\n }\n }\n\n var nonEnumerableDataDescriptor = {\n value: undefined,\n configurable: true,\n enumerable: false,\n writable: true\n };\n\n function defineNonEnumerableDataProperty(object, name, value) {\n nonEnumerableDataDescriptor.value = value;\n defineProperty(object, name, nonEnumerableDataDescriptor);\n }\n\n // Mozilla's old DOM bindings are bretty busted:\n // https://bugzilla.mozilla.org/show_bug.cgi?id=855844\n // Make sure they are create before we start modifying things.\n getOwnPropertyNames(window);\n\n function getWrapperConstructor(node) {\n var nativePrototype = node.__proto__ || Object.getPrototypeOf(node);\n var wrapperConstructor = constructorTable.get(nativePrototype);\n if (wrapperConstructor)\n return wrapperConstructor;\n\n var parentWrapperConstructor = getWrapperConstructor(nativePrototype);\n\n var GeneratedWrapper = createWrapperConstructor(parentWrapperConstructor);\n registerInternal(nativePrototype, GeneratedWrapper, node);\n\n return GeneratedWrapper;\n }\n\n function addForwardingProperties(nativePrototype, wrapperPrototype) {\n installProperty(nativePrototype, wrapperPrototype, true);\n }\n\n function registerInstanceProperties(wrapperPrototype, instanceObject) {\n installProperty(instanceObject, wrapperPrototype, false);\n }\n\n var isFirefox = /Firefox/.test(navigator.userAgent);\n\n // This is used as a fallback when getting the descriptor fails in\n // installProperty.\n var dummyDescriptor = {\n get: function() {},\n set: function(v) {},\n configurable: true,\n enumerable: true\n };\n\n function isEventHandlerName(name) {\n return /^on[a-z]+$/.test(name);\n }\n\n function isIdentifierName(name) {\n return /^\\w[a-zA-Z_0-9]*$/.test(name);\n }\n\n function getGetter(name) {\n return hasEval && isIdentifierName(name) ?\n new Function('return this.impl.' + name) :\n function() { return this.impl[name]; };\n }\n\n function getSetter(name) {\n return hasEval && isIdentifierName(name) ?\n new Function('v', 'this.impl.' + name + ' = v') :\n function(v) { this.impl[name] = v; };\n }\n\n function getMethod(name) {\n return hasEval && isIdentifierName(name) ?\n new Function('return this.impl.' + name +\n '.apply(this.impl, arguments)') :\n function() { return this.impl[name].apply(this.impl, arguments); };\n }\n\n function getDescriptor(source, name) {\n try {\n return Object.getOwnPropertyDescriptor(source, name);\n } catch (ex) {\n // JSC and V8 both use data properties instead of accessors which can\n // cause getting the property desciptor to throw an exception.\n // https://bugs.webkit.org/show_bug.cgi?id=49739\n return dummyDescriptor;\n }\n }\n\n function installProperty(source, target, allowMethod, opt_blacklist) {\n var names = getOwnPropertyNames(source);\n for (var i = 0; i < names.length; i++) {\n var name = names[i];\n if (name === 'polymerBlackList_')\n continue;\n\n if (name in target)\n continue;\n\n if (source.polymerBlackList_ && source.polymerBlackList_[name])\n continue;\n\n if (isFirefox) {\n // Tickle Firefox's old bindings.\n source.__lookupGetter__(name);\n }\n var descriptor = getDescriptor(source, name);\n var getter, setter;\n if (allowMethod && typeof descriptor.value === 'function') {\n target[name] = getMethod(name);\n continue;\n }\n\n var isEvent = isEventHandlerName(name);\n if (isEvent)\n getter = scope.getEventHandlerGetter(name);\n else\n getter = getGetter(name);\n\n if (descriptor.writable || descriptor.set) {\n if (isEvent)\n setter = scope.getEventHandlerSetter(name);\n else\n setter = getSetter(name);\n }\n\n defineProperty(target, name, {\n get: getter,\n set: setter,\n configurable: descriptor.configurable,\n enumerable: descriptor.enumerable\n });\n }\n }\n\n /**\n * @param {Function} nativeConstructor\n * @param {Function} wrapperConstructor\n * @param {Object=} opt_instance If present, this is used to extract\n * properties from an instance object.\n */\n function register(nativeConstructor, wrapperConstructor, opt_instance) {\n var nativePrototype = nativeConstructor.prototype;\n registerInternal(nativePrototype, wrapperConstructor, opt_instance);\n mixinStatics(wrapperConstructor, nativeConstructor);\n }\n\n function registerInternal(nativePrototype, wrapperConstructor, opt_instance) {\n var wrapperPrototype = wrapperConstructor.prototype;\n assert(constructorTable.get(nativePrototype) === undefined);\n\n constructorTable.set(nativePrototype, wrapperConstructor);\n nativePrototypeTable.set(wrapperPrototype, nativePrototype);\n\n addForwardingProperties(nativePrototype, wrapperPrototype);\n if (opt_instance)\n registerInstanceProperties(wrapperPrototype, opt_instance);\n\n defineNonEnumerableDataProperty(\n wrapperPrototype, 'constructor', wrapperConstructor);\n // Set it again. Some VMs optimizes objects that are used as prototypes.\n wrapperConstructor.prototype = wrapperPrototype;\n }\n\n function isWrapperFor(wrapperConstructor, nativeConstructor) {\n return constructorTable.get(nativeConstructor.prototype) ===\n wrapperConstructor;\n }\n\n /**\n * Creates a generic wrapper constructor based on |object| and its\n * constructor.\n * @param {Node} object\n * @return {Function} The generated constructor.\n */\n function registerObject(object) {\n var nativePrototype = Object.getPrototypeOf(object);\n\n var superWrapperConstructor = getWrapperConstructor(nativePrototype);\n var GeneratedWrapper = createWrapperConstructor(superWrapperConstructor);\n registerInternal(nativePrototype, GeneratedWrapper, object);\n\n return GeneratedWrapper;\n }\n\n function createWrapperConstructor(superWrapperConstructor) {\n function GeneratedWrapper(node) {\n superWrapperConstructor.call(this, node);\n }\n var p = Object.create(superWrapperConstructor.prototype);\n p.constructor = GeneratedWrapper;\n GeneratedWrapper.prototype = p;\n\n return GeneratedWrapper;\n }\n\n var OriginalDOMImplementation = window.DOMImplementation;\n var OriginalEventTarget = window.EventTarget;\n var OriginalEvent = window.Event;\n var OriginalNode = window.Node;\n var OriginalWindow = window.Window;\n var OriginalRange = window.Range;\n var OriginalCanvasRenderingContext2D = window.CanvasRenderingContext2D;\n var OriginalWebGLRenderingContext = window.WebGLRenderingContext;\n var OriginalSVGElementInstance = window.SVGElementInstance;\n\n function isWrapper(object) {\n return object instanceof wrappers.EventTarget ||\n object instanceof wrappers.Event ||\n object instanceof wrappers.Range ||\n object instanceof wrappers.DOMImplementation ||\n object instanceof wrappers.CanvasRenderingContext2D ||\n wrappers.WebGLRenderingContext &&\n object instanceof wrappers.WebGLRenderingContext;\n }\n\n function isNative(object) {\n return OriginalEventTarget && object instanceof OriginalEventTarget ||\n object instanceof OriginalNode ||\n object instanceof OriginalEvent ||\n object instanceof OriginalWindow ||\n object instanceof OriginalRange ||\n object instanceof OriginalDOMImplementation ||\n object instanceof OriginalCanvasRenderingContext2D ||\n OriginalWebGLRenderingContext &&\n object instanceof OriginalWebGLRenderingContext ||\n OriginalSVGElementInstance &&\n object instanceof OriginalSVGElementInstance;\n }\n\n /**\n * Wraps a node in a WrapperNode. If there already exists a wrapper for the\n * |node| that wrapper is returned instead.\n * @param {Node} node\n * @return {WrapperNode}\n */\n function wrap(impl) {\n if (impl === null)\n return null;\n\n assert(isNative(impl));\n return impl.polymerWrapper_ ||\n (impl.polymerWrapper_ = new (getWrapperConstructor(impl))(impl));\n }\n\n /**\n * Unwraps a wrapper and returns the node it is wrapping.\n * @param {WrapperNode} wrapper\n * @return {Node}\n */\n function unwrap(wrapper) {\n if (wrapper === null)\n return null;\n assert(isWrapper(wrapper));\n return wrapper.impl;\n }\n\n /**\n * Unwraps object if it is a wrapper.\n * @param {Object} object\n * @return {Object} The native implementation object.\n */\n function unwrapIfNeeded(object) {\n return object && isWrapper(object) ? unwrap(object) : object;\n }\n\n /**\n * Wraps object if it is not a wrapper.\n * @param {Object} object\n * @return {Object} The wrapper for object.\n */\n function wrapIfNeeded(object) {\n return object && !isWrapper(object) ? wrap(object) : object;\n }\n\n /**\n * Overrides the current wrapper (if any) for node.\n * @param {Node} node\n * @param {WrapperNode=} wrapper If left out the wrapper will be created as\n * needed next time someone wraps the node.\n */\n function rewrap(node, wrapper) {\n if (wrapper === null)\n return;\n assert(isNative(node));\n assert(wrapper === undefined || isWrapper(wrapper));\n node.polymerWrapper_ = wrapper;\n }\n\n var getterDescriptor = {\n get: undefined,\n configurable: true,\n enumerable: true\n };\n\n function defineGetter(constructor, name, getter) {\n getterDescriptor.get = getter;\n defineProperty(constructor.prototype, name, getterDescriptor);\n }\n\n function defineWrapGetter(constructor, name) {\n defineGetter(constructor, name, function() {\n return wrap(this.impl[name]);\n });\n }\n\n /**\n * Forwards existing methods on the native object to the wrapper methods.\n * This does not wrap any of the arguments or the return value since the\n * wrapper implementation already takes care of that.\n * @param {Array.<Function>} constructors\n * @parem {Array.<string>} names\n */\n function forwardMethodsToWrapper(constructors, names) {\n constructors.forEach(function(constructor) {\n names.forEach(function(name) {\n constructor.prototype[name] = function() {\n var w = wrapIfNeeded(this);\n return w[name].apply(w, arguments);\n };\n });\n });\n }\n\n scope.assert = assert;\n scope.constructorTable = constructorTable;\n scope.defineGetter = defineGetter;\n scope.defineWrapGetter = defineWrapGetter;\n scope.forwardMethodsToWrapper = forwardMethodsToWrapper;\n scope.isWrapper = isWrapper;\n scope.isWrapperFor = isWrapperFor;\n scope.mixin = mixin;\n scope.nativePrototypeTable = nativePrototypeTable;\n scope.oneOf = oneOf;\n scope.registerObject = registerObject;\n scope.registerWrapper = register;\n scope.rewrap = rewrap;\n scope.unwrap = unwrap;\n scope.unwrapIfNeeded = unwrapIfNeeded;\n scope.wrap = wrap;\n scope.wrapIfNeeded = wrapIfNeeded;\n scope.wrappers = wrappers;\n\n})(window.ShadowDOMPolyfill);\n","/*\n * Copyright 2013 The Polymer Authors. All rights reserved.\n * Use of this source code is goverened by a BSD-style\n * license that can be found in the LICENSE file.\n */\n\n(function(context) {\n 'use strict';\n\n var OriginalMutationObserver = window.MutationObserver;\n var callbacks = [];\n var pending = false;\n var timerFunc;\n\n function handle() {\n pending = false;\n var copies = callbacks.slice(0);\n callbacks = [];\n for (var i = 0; i < copies.length; i++) {\n (0, copies[i])();\n }\n }\n\n if (OriginalMutationObserver) {\n var counter = 1;\n var observer = new OriginalMutationObserver(handle);\n var textNode = document.createTextNode(counter);\n observer.observe(textNode, {characterData: true});\n\n timerFunc = function() {\n counter = (counter + 1) % 2;\n textNode.data = counter;\n };\n\n } else {\n timerFunc = window.setImmediate || window.setTimeout;\n }\n\n function setEndOfMicrotask(func) {\n callbacks.push(func);\n if (pending)\n return;\n pending = true;\n timerFunc(handle, 0);\n }\n\n context.setEndOfMicrotask = setEndOfMicrotask;\n\n})(window.ShadowDOMPolyfill);\n","/*\n * Copyright 2013 The Polymer Authors. All rights reserved.\n * Use of this source code is goverened by a BSD-style\n * license that can be found in the LICENSE file.\n */\n\n(function(scope) {\n 'use strict';\n\n var setEndOfMicrotask = scope.setEndOfMicrotask\n var wrapIfNeeded = scope.wrapIfNeeded\n var wrappers = scope.wrappers;\n\n var registrationsTable = new WeakMap();\n var globalMutationObservers = [];\n var isScheduled = false;\n\n function scheduleCallback(observer) {\n if (isScheduled)\n return;\n setEndOfMicrotask(notifyObservers);\n isScheduled = true;\n }\n\n // http://dom.spec.whatwg.org/#mutation-observers\n function notifyObservers() {\n isScheduled = false;\n\n do {\n var notifyList = globalMutationObservers.slice();\n var anyNonEmpty = false;\n for (var i = 0; i < notifyList.length; i++) {\n var mo = notifyList[i];\n var queue = mo.takeRecords();\n removeTransientObserversFor(mo);\n if (queue.length) {\n mo.callback_(queue, mo);\n anyNonEmpty = true;\n }\n }\n } while (anyNonEmpty);\n }\n\n /**\n * @param {string} type\n * @param {Node} target\n * @constructor\n */\n function MutationRecord(type, target) {\n this.type = type;\n this.target = target;\n this.addedNodes = new wrappers.NodeList();\n this.removedNodes = new wrappers.NodeList();\n this.previousSibling = null;\n this.nextSibling = null;\n this.attributeName = null;\n this.attributeNamespace = null;\n this.oldValue = null;\n }\n\n /**\n * Registers transient observers to ancestor and its ancesors for the node\n * which was removed.\n * @param {!Node} ancestor\n * @param {!Node} node\n */\n function registerTransientObservers(ancestor, node) {\n for (; ancestor; ancestor = ancestor.parentNode) {\n var registrations = registrationsTable.get(ancestor);\n if (!registrations)\n continue;\n for (var i = 0; i < registrations.length; i++) {\n var registration = registrations[i];\n if (registration.options.subtree)\n registration.addTransientObserver(node);\n }\n }\n }\n\n function removeTransientObserversFor(observer) {\n for (var i = 0; i < observer.nodes_.length; i++) {\n var node = observer.nodes_[i];\n var registrations = registrationsTable.get(node);\n if (!registrations)\n return;\n for (var j = 0; j < registrations.length; j++) {\n var registration = registrations[j];\n if (registration.observer === observer)\n registration.removeTransientObservers();\n }\n }\n }\n\n // http://dom.spec.whatwg.org/#queue-a-mutation-record\n function enqueueMutation(target, type, data) {\n // 1.\n var interestedObservers = Object.create(null);\n var associatedStrings = Object.create(null);\n\n // 2.\n for (var node = target; node; node = node.parentNode) {\n // 3.\n var registrations = registrationsTable.get(node);\n if (!registrations)\n continue;\n for (var j = 0; j < registrations.length; j++) {\n var registration = registrations[j];\n var options = registration.options;\n // 1.\n if (node !== target && !options.subtree)\n continue;\n\n // 2.\n if (type === 'attributes' && !options.attributes)\n continue;\n\n // 3. If type is \"attributes\", options's attributeFilter is present, and\n // either options's attributeFilter does not contain name or namespace\n // is non-null, continue.\n if (type === 'attributes' && options.attributeFilter &&\n (data.namespace !== null ||\n options.attributeFilter.indexOf(data.name) === -1)) {\n continue;\n }\n\n // 4.\n if (type === 'characterData' && !options.characterData)\n continue;\n\n // 5.\n if (type === 'childList' && !options.childList)\n continue;\n\n // 6.\n var observer = registration.observer;\n interestedObservers[observer.uid_] = observer;\n\n // 7. If either type is \"attributes\" and options's attributeOldValue is\n // true, or type is \"characterData\" and options's characterDataOldValue\n // is true, set the paired string of registered observer's observer in\n // interested observers to oldValue.\n if (type === 'attributes' && options.attributeOldValue ||\n type === 'characterData' && options.characterDataOldValue) {\n associatedStrings[observer.uid_] = data.oldValue;\n }\n }\n }\n\n var anyRecordsEnqueued = false;\n\n // 4.\n for (var uid in interestedObservers) {\n var observer = interestedObservers[uid];\n var record = new MutationRecord(type, target);\n\n // 2.\n if ('name' in data && 'namespace' in data) {\n record.attributeName = data.name;\n record.attributeNamespace = data.namespace;\n }\n\n // 3.\n if (data.addedNodes)\n record.addedNodes = data.addedNodes;\n\n // 4.\n if (data.removedNodes)\n record.removedNodes = data.removedNodes;\n\n // 5.\n if (data.previousSibling)\n record.previousSibling = data.previousSibling;\n\n // 6.\n if (data.nextSibling)\n record.nextSibling = data.nextSibling;\n\n // 7.\n if (associatedStrings[uid] !== undefined)\n record.oldValue = associatedStrings[uid];\n\n // 8.\n observer.records_.push(record);\n\n anyRecordsEnqueued = true;\n }\n\n if (anyRecordsEnqueued)\n scheduleCallback();\n }\n\n var slice = Array.prototype.slice;\n\n /**\n * @param {!Object} options\n * @constructor\n */\n function MutationObserverOptions(options) {\n this.childList = !!options.childList;\n this.subtree = !!options.subtree;\n\n // 1. If either options' attributeOldValue or attributeFilter is present\n // and options' attributes is omitted, set options' attributes to true.\n if (!('attributes' in options) &&\n ('attributeOldValue' in options || 'attributeFilter' in options)) {\n this.attributes = true;\n } else {\n this.attributes = !!options.attributes;\n }\n\n // 2. If options' characterDataOldValue is present and options'\n // characterData is omitted, set options' characterData to true.\n if ('characterDataOldValue' in options && !('characterData' in options))\n this.characterData = true;\n else\n this.characterData = !!options.characterData;\n\n // 3. & 4.\n if (!this.attributes &&\n (options.attributeOldValue || 'attributeFilter' in options) ||\n // 5.\n !this.characterData && options.characterDataOldValue) {\n throw new TypeError();\n }\n\n this.characterData = !!options.characterData;\n this.attributeOldValue = !!options.attributeOldValue;\n this.characterDataOldValue = !!options.characterDataOldValue;\n if ('attributeFilter' in options) {\n if (options.attributeFilter == null ||\n typeof options.attributeFilter !== 'object') {\n throw new TypeError();\n }\n this.attributeFilter = slice.call(options.attributeFilter);\n } else {\n this.attributeFilter = null;\n }\n }\n\n var uidCounter = 0;\n\n /**\n * The class that maps to the DOM MutationObserver interface.\n * @param {Function} callback.\n * @constructor\n */\n function MutationObserver(callback) {\n this.callback_ = callback;\n this.nodes_ = [];\n this.records_ = [];\n this.uid_ = ++uidCounter;\n\n // This will leak. There is no way to implement this without WeakRefs :'(\n globalMutationObservers.push(this);\n }\n\n MutationObserver.prototype = {\n // http://dom.spec.whatwg.org/#dom-mutationobserver-observe\n observe: function(target, options) {\n target = wrapIfNeeded(target);\n\n var newOptions = new MutationObserverOptions(options);\n\n // 6.\n var registration;\n var registrations = registrationsTable.get(target);\n if (!registrations)\n registrationsTable.set(target, registrations = []);\n\n for (var i = 0; i < registrations.length; i++) {\n if (registrations[i].observer === this) {\n registration = registrations[i];\n // 6.1.\n registration.removeTransientObservers();\n // 6.2.\n registration.options = newOptions;\n }\n }\n\n // 7.\n if (!registration) {\n registration = new Registration(this, target, newOptions);\n registrations.push(registration);\n this.nodes_.push(target);\n }\n },\n\n // http://dom.spec.whatwg.org/#dom-mutationobserver-disconnect\n disconnect: function() {\n this.nodes_.forEach(function(node) {\n var registrations = registrationsTable.get(node);\n for (var i = 0; i < registrations.length; i++) {\n var registration = registrations[i];\n if (registration.observer === this) {\n registrations.splice(i, 1);\n // Each node can only have one registered observer associated with\n // this observer.\n break;\n }\n }\n }, this);\n this.records_ = [];\n },\n\n takeRecords: function() {\n var copyOfRecords = this.records_;\n this.records_ = [];\n return copyOfRecords;\n }\n };\n\n /**\n * Class used to represent a registered observer.\n * @param {MutationObserver} observer\n * @param {Node} target\n * @param {MutationObserverOptions} options\n * @constructor\n */\n function Registration(observer, target, options) {\n this.observer = observer;\n this.target = target;\n this.options = options;\n this.transientObservedNodes = [];\n }\n\n Registration.prototype = {\n /**\n * Adds a transient observer on node. The transient observer gets removed\n * next time we deliver the change records.\n * @param {Node} node\n */\n addTransientObserver: function(node) {\n // Don't add transient observers on the target itself. We already have all\n // the required listeners set up on the target.\n if (node === this.target)\n return;\n\n this.transientObservedNodes.push(node);\n var registrations = registrationsTable.get(node);\n if (!registrations)\n registrationsTable.set(node, registrations = []);\n\n // We know that registrations does not contain this because we already\n // checked if node === this.target.\n registrations.push(this);\n },\n\n removeTransientObservers: function() {\n var transientObservedNodes = this.transientObservedNodes;\n this.transientObservedNodes = [];\n\n for (var i = 0; i < transientObservedNodes.length; i++) {\n var node = transientObservedNodes[i];\n var registrations = registrationsTable.get(node);\n for (var j = 0; j < registrations.length; j++) {\n if (registrations[j] === this) {\n registrations.splice(j, 1);\n // Each node can only have one registered observer associated with\n // this observer.\n break;\n }\n }\n }\n }\n };\n\n scope.enqueueMutation = enqueueMutation;\n scope.registerTransientObservers = registerTransientObservers;\n scope.wrappers.MutationObserver = MutationObserver;\n scope.wrappers.MutationRecord = MutationRecord;\n\n})(window.ShadowDOMPolyfill);\n","/**\n * Copyright 2014 The Polymer Authors. All rights reserved.\n * Use of this source code is goverened by a BSD-style\n * license that can be found in the LICENSE file.\n */\n\n(function(scope) {\n 'use strict';\n\n /**\n * A tree scope represents the root of a tree. All nodes in a tree point to\n * the same TreeScope object. The tree scope of a node get set the first time\n * it is accessed or when a node is added or remove to a tree.\n *\n * The root is a Node that has no parent.\n *\n * The parent is another TreeScope. For ShadowRoots, it is the TreeScope of\n * the host of the ShadowRoot.\n *\n * @param {!Node} root\n * @param {TreeScope} parent\n * @constructor\n */\n function TreeScope(root, parent) {\n /** @type {!Node} */\n this.root = root;\n\n /** @type {TreeScope} */\n this.parent = parent;\n }\n\n TreeScope.prototype = {\n get renderer() {\n if (this.root instanceof scope.wrappers.ShadowRoot) {\n return scope.getRendererForHost(this.root.host);\n }\n return null;\n },\n\n contains: function(treeScope) {\n for (; treeScope; treeScope = treeScope.parent) {\n if (treeScope === this)\n return true;\n }\n return false;\n }\n };\n\n function setTreeScope(node, treeScope) {\n if (node.treeScope_ !== treeScope) {\n node.treeScope_ = treeScope;\n for (var sr = node.shadowRoot; sr; sr = sr.olderShadowRoot) {\n sr.treeScope_.parent = treeScope;\n }\n for (var child = node.firstChild; child; child = child.nextSibling) {\n setTreeScope(child, treeScope);\n }\n }\n }\n\n function getTreeScope(node) {\n if (node instanceof scope.wrappers.Window) {\n debugger;\n }\n\n if (node.treeScope_)\n return node.treeScope_;\n var parent = node.parentNode;\n var treeScope;\n if (parent)\n treeScope = getTreeScope(parent);\n else\n treeScope = new TreeScope(node, null);\n return node.treeScope_ = treeScope;\n }\n\n scope.TreeScope = TreeScope;\n scope.getTreeScope = getTreeScope;\n scope.setTreeScope = setTreeScope;\n\n})(window.ShadowDOMPolyfill);\n","// Copyright 2013 The Polymer Authors. All rights reserved.\n// Use of this source code is goverened by a BSD-style\n// license that can be found in the LICENSE file.\n\n(function(scope) {\n 'use strict';\n\n var forwardMethodsToWrapper = scope.forwardMethodsToWrapper;\n var getTreeScope = scope.getTreeScope;\n var mixin = scope.mixin;\n var registerWrapper = scope.registerWrapper;\n var unwrap = scope.unwrap;\n var wrap = scope.wrap;\n var wrappers = scope.wrappers;\n\n var wrappedFuns = new WeakMap();\n var listenersTable = new WeakMap();\n var handledEventsTable = new WeakMap();\n var currentlyDispatchingEvents = new WeakMap();\n var targetTable = new WeakMap();\n var currentTargetTable = new WeakMap();\n var relatedTargetTable = new WeakMap();\n var eventPhaseTable = new WeakMap();\n var stopPropagationTable = new WeakMap();\n var stopImmediatePropagationTable = new WeakMap();\n var eventHandlersTable = new WeakMap();\n var eventPathTable = new WeakMap();\n\n function isShadowRoot(node) {\n return node instanceof wrappers.ShadowRoot;\n }\n\n function rootOfNode(node) {\n return getTreeScope(node).root;\n }\n\n // http://w3c.github.io/webcomponents/spec/shadow/#event-paths\n function getEventPath(node, event) {\n var path = [];\n var current = node;\n path.push(current);\n while (current) {\n // 4.1.\n var destinationInsertionPoints = getDestinationInsertionPoints(current);\n if (destinationInsertionPoints && destinationInsertionPoints.length > 0) {\n // 4.1.1\n for (var i = 0; i < destinationInsertionPoints.length; i++) {\n var insertionPoint = destinationInsertionPoints[i];\n // 4.1.1.1\n if (isShadowInsertionPoint(insertionPoint)) {\n var shadowRoot = rootOfNode(insertionPoint);\n // 4.1.1.1.2\n var olderShadowRoot = shadowRoot.olderShadowRoot;\n if (olderShadowRoot)\n path.push(olderShadowRoot);\n }\n\n // 4.1.1.2\n path.push(insertionPoint);\n }\n\n // 4.1.2\n current = destinationInsertionPoints[\n destinationInsertionPoints.length - 1];\n\n // 4.2\n } else {\n if (isShadowRoot(current)) {\n if (inSameTree(node, current) && eventMustBeStopped(event)) {\n // Stop this algorithm\n break;\n }\n current = current.host;\n path.push(current);\n\n // 4.2.2\n } else {\n current = current.parentNode;\n if (current)\n path.push(current);\n }\n }\n }\n\n return path;\n }\n\n // http://w3c.github.io/webcomponents/spec/shadow/#dfn-events-always-stopped\n function eventMustBeStopped(event) {\n if (!event)\n return false;\n\n switch (event.type) {\n case 'abort':\n case 'error':\n case 'select':\n case 'change':\n case 'load':\n case 'reset':\n case 'resize':\n case 'scroll':\n case 'selectstart':\n return true;\n }\n return false;\n }\n\n // http://w3c.github.io/webcomponents/spec/shadow/#dfn-shadow-insertion-point\n function isShadowInsertionPoint(node) {\n return node instanceof HTMLShadowElement;\n // and make sure that there are no shadow precing this?\n // and that there is no content ancestor?\n }\n\n function getDestinationInsertionPoints(node) {\n return scope.getDestinationInsertionPoints(node);\n }\n\n // http://w3c.github.io/webcomponents/spec/shadow/#event-retargeting\n function eventRetargetting(path, currentTarget) {\n if (path.length === 0)\n return currentTarget;\n\n // The currentTarget might be the window object. Use its document for the\n // purpose of finding the retargetted node.\n if (currentTarget instanceof wrappers.Window)\n currentTarget = currentTarget.document;\n\n var currentTargetTree = getTreeScope(currentTarget);\n var originalTarget = path[0];\n var originalTargetTree = getTreeScope(originalTarget);\n var relativeTargetTree =\n lowestCommonInclusiveAncestor(currentTargetTree, originalTargetTree);\n\n for (var i = 0; i < path.length; i++) {\n var node = path[i];\n if (getTreeScope(node) === relativeTargetTree)\n return node;\n }\n\n return path[path.length - 1];\n }\n\n function getTreeScopeAncestors(treeScope) {\n var ancestors = [];\n for (;treeScope; treeScope = treeScope.parent) {\n ancestors.push(treeScope);\n }\n return ancestors;\n }\n\n function lowestCommonInclusiveAncestor(tsA, tsB) {\n var ancestorsA = getTreeScopeAncestors(tsA);\n var ancestorsB = getTreeScopeAncestors(tsB);\n\n var result = null;\n while (ancestorsA.length > 0 && ancestorsB.length > 0) {\n var a = ancestorsA.pop();\n var b = ancestorsB.pop();\n if (a === b)\n result = a;\n else\n break;\n }\n return result;\n }\n\n function getTreeScopeRoot(ts) {\n if (!ts.parent)\n return ts;\n return getTreeScopeRoot(ts.parent);\n }\n\n function relatedTargetResolution(event, currentTarget, relatedTarget) {\n // In case the current target is a window use its document for the purpose\n // of retargetting the related target.\n if (currentTarget instanceof wrappers.Window)\n currentTarget = currentTarget.document;\n\n var currentTargetTree = getTreeScope(currentTarget);\n var relatedTargetTree = getTreeScope(relatedTarget);\n\n var relatedTargetEventPath = getEventPath(relatedTarget, event);\n\n var lowestCommonAncestorTree;\n\n // 4\n var lowestCommonAncestorTree =\n lowestCommonInclusiveAncestor(currentTargetTree, relatedTargetTree);\n\n // 5\n if (!lowestCommonAncestorTree)\n lowestCommonAncestorTree = relatedTargetTree.root;\n\n // 6\n for (var commonAncestorTree = lowestCommonAncestorTree;\n commonAncestorTree;\n commonAncestorTree = commonAncestorTree.parent) {\n // 6.1\n var adjustedRelatedTarget;\n for (var i = 0; i < relatedTargetEventPath.length; i++) {\n var node = relatedTargetEventPath[i];\n if (getTreeScope(node) === commonAncestorTree)\n return node;\n }\n }\n\n return null;\n }\n\n function inSameTree(a, b) {\n return getTreeScope(a) === getTreeScope(b);\n }\n\n var NONE = 0;\n var CAPTURING_PHASE = 1;\n var AT_TARGET = 2;\n var BUBBLING_PHASE = 3;\n\n // pendingError is used to rethrow the first error we got during an event\n // dispatch. The browser actually reports all errors but to do that we would\n // need to rethrow the error asynchronously.\n var pendingError;\n\n function dispatchOriginalEvent(originalEvent) {\n // Make sure this event is only dispatched once.\n if (handledEventsTable.get(originalEvent))\n return;\n handledEventsTable.set(originalEvent, true);\n dispatchEvent(wrap(originalEvent), wrap(originalEvent.target));\n if (pendingError) {\n var err = pendingError;\n pendingError = null;\n throw err;\n }\n }\n\n function dispatchEvent(event, originalWrapperTarget) {\n if (currentlyDispatchingEvents.get(event))\n throw new Error('InvalidStateError');\n\n currentlyDispatchingEvents.set(event, true);\n\n // Render to ensure that the event path is correct.\n scope.renderAllPending();\n var eventPath;\n\n // http://www.whatwg.org/specs/web-apps/current-work/multipage/webappapis.html#events-and-the-window-object\n // All events dispatched on Nodes with a default view, except load events,\n // should propagate to the Window.\n\n // http://www.whatwg.org/specs/web-apps/current-work/multipage/the-end.html#the-end\n var overrideTarget;\n var win;\n var type = event.type;\n\n // Should really be not cancelable too but since Firefox has a bug there\n // we skip that check.\n // https://bugzilla.mozilla.org/show_bug.cgi?id=999456\n if (type === 'load' && !event.bubbles) {\n var doc = originalWrapperTarget;\n if (doc instanceof wrappers.Document && (win = doc.defaultView)) {\n overrideTarget = doc;\n eventPath = [];\n }\n }\n\n if (!eventPath) {\n if (originalWrapperTarget instanceof wrappers.Window) {\n win = originalWrapperTarget;\n eventPath = [];\n } else {\n eventPath = getEventPath(originalWrapperTarget, event);\n\n if (event.type !== 'load') {\n var doc = eventPath[eventPath.length - 1];\n if (doc instanceof wrappers.Document)\n win = doc.defaultView;\n }\n }\n }\n\n eventPathTable.set(event, eventPath);\n\n if (dispatchCapturing(event, eventPath, win, overrideTarget)) {\n if (dispatchAtTarget(event, eventPath, win, overrideTarget)) {\n dispatchBubbling(event, eventPath, win, overrideTarget);\n }\n }\n\n eventPhaseTable.set(event, NONE);\n currentTargetTable.delete(event, null);\n currentlyDispatchingEvents.delete(event);\n\n return event.defaultPrevented;\n }\n\n function dispatchCapturing(event, eventPath, win, overrideTarget) {\n var phase = CAPTURING_PHASE;\n\n if (win) {\n if (!invoke(win, event, phase, eventPath, overrideTarget))\n return false;\n }\n\n for (var i = eventPath.length - 1; i > 0; i--) {\n if (!invoke(eventPath[i], event, phase, eventPath, overrideTarget))\n return false;\n }\n\n return true;\n }\n\n function dispatchAtTarget(event, eventPath, win, overrideTarget) {\n var phase = AT_TARGET;\n var currentTarget = eventPath[0] || win;\n return invoke(currentTarget, event, phase, eventPath, overrideTarget);\n }\n\n function dispatchBubbling(event, eventPath, win, overrideTarget) {\n var phase = BUBBLING_PHASE;\n for (var i = 1; i < eventPath.length; i++) {\n if (!invoke(eventPath[i], event, phase, eventPath, overrideTarget))\n return;\n }\n\n if (win && eventPath.length > 0) {\n invoke(win, event, phase, eventPath, overrideTarget);\n }\n }\n\n function invoke(currentTarget, event, phase, eventPath, overrideTarget) {\n var listeners = listenersTable.get(currentTarget);\n if (!listeners)\n return true;\n\n var target = overrideTarget || eventRetargetting(eventPath, currentTarget);\n\n if (target === currentTarget) {\n if (phase === CAPTURING_PHASE)\n return true;\n\n if (phase === BUBBLING_PHASE)\n phase = AT_TARGET;\n\n } else if (phase === BUBBLING_PHASE && !event.bubbles) {\n return true;\n }\n\n if ('relatedTarget' in event) {\n var originalEvent = unwrap(event);\n var unwrappedRelatedTarget = originalEvent.relatedTarget;\n\n // X-Tag sets relatedTarget on a CustomEvent. If they do that there is no\n // way to have relatedTarget return the adjusted target but worse is that\n // the originalEvent might not have a relatedTarget so we hit an assert\n // when we try to wrap it.\n if (unwrappedRelatedTarget) {\n // In IE we can get objects that are not EventTargets at this point.\n // Safari does not have an EventTarget interface so revert to checking\n // for addEventListener as an approximation.\n if (unwrappedRelatedTarget instanceof Object &&\n unwrappedRelatedTarget.addEventListener) {\n var relatedTarget = wrap(unwrappedRelatedTarget);\n\n var adjusted =\n relatedTargetResolution(event, currentTarget, relatedTarget);\n if (adjusted === target)\n return true;\n } else {\n adjusted = null;\n }\n relatedTargetTable.set(event, adjusted);\n }\n }\n\n eventPhaseTable.set(event, phase);\n var type = event.type;\n\n var anyRemoved = false;\n // targetTable.set(event, target);\n targetTable.set(event, target);\n currentTargetTable.set(event, currentTarget);\n\n // Keep track of the invoke depth so that we only clean up the removed\n // listeners if we are in the outermost invoke.\n listeners.depth++;\n\n for (var i = 0, len = listeners.length; i < len; i++) {\n var listener = listeners[i];\n if (listener.removed) {\n anyRemoved = true;\n continue;\n }\n\n if (listener.type !== type ||\n !listener.capture && phase === CAPTURING_PHASE ||\n listener.capture && phase === BUBBLING_PHASE) {\n continue;\n }\n\n try {\n if (typeof listener.handler === 'function')\n listener.handler.call(currentTarget, event);\n else\n listener.handler.handleEvent(event);\n\n if (stopImmediatePropagationTable.get(event))\n return false;\n\n } catch (ex) {\n if (!pendingError)\n pendingError = ex;\n }\n }\n\n listeners.depth--;\n\n if (anyRemoved && listeners.depth === 0) {\n var copy = listeners.slice();\n listeners.length = 0;\n for (var i = 0; i < copy.length; i++) {\n if (!copy[i].removed)\n listeners.push(copy[i]);\n }\n }\n\n return !stopPropagationTable.get(event);\n }\n\n function Listener(type, handler, capture) {\n this.type = type;\n this.handler = handler;\n this.capture = Boolean(capture);\n }\n Listener.prototype = {\n equals: function(that) {\n return this.handler === that.handler && this.type === that.type &&\n this.capture === that.capture;\n },\n get removed() {\n return this.handler === null;\n },\n remove: function() {\n this.handler = null;\n }\n };\n\n var OriginalEvent = window.Event;\n OriginalEvent.prototype.polymerBlackList_ = {\n returnValue: true,\n // TODO(arv): keyLocation is part of KeyboardEvent but Firefox does not\n // support constructable KeyboardEvent so we keep it here for now.\n keyLocation: true\n };\n\n /**\n * Creates a new Event wrapper or wraps an existin native Event object.\n * @param {string|Event} type\n * @param {Object=} options\n * @constructor\n */\n function Event(type, options) {\n if (type instanceof OriginalEvent) {\n var impl = type;\n if (!OriginalBeforeUnloadEvent && impl.type === 'beforeunload')\n return new BeforeUnloadEvent(impl);\n this.impl = impl;\n } else {\n return wrap(constructEvent(OriginalEvent, 'Event', type, options));\n }\n }\n Event.prototype = {\n get target() {\n return targetTable.get(this);\n },\n get currentTarget() {\n return currentTargetTable.get(this);\n },\n get eventPhase() {\n return eventPhaseTable.get(this);\n },\n get path() {\n var eventPath = eventPathTable.get(this);\n if (!eventPath)\n return [];\n // TODO(arv): Event path should contain window.\n return eventPath.slice();\n },\n stopPropagation: function() {\n stopPropagationTable.set(this, true);\n },\n stopImmediatePropagation: function() {\n stopPropagationTable.set(this, true);\n stopImmediatePropagationTable.set(this, true);\n }\n };\n registerWrapper(OriginalEvent, Event, document.createEvent('Event'));\n\n function unwrapOptions(options) {\n if (!options || !options.relatedTarget)\n return options;\n return Object.create(options, {\n relatedTarget: {value: unwrap(options.relatedTarget)}\n });\n }\n\n function registerGenericEvent(name, SuperEvent, prototype) {\n var OriginalEvent = window[name];\n var GenericEvent = function(type, options) {\n if (type instanceof OriginalEvent)\n this.impl = type;\n else\n return wrap(constructEvent(OriginalEvent, name, type, options));\n };\n GenericEvent.prototype = Object.create(SuperEvent.prototype);\n if (prototype)\n mixin(GenericEvent.prototype, prototype);\n if (OriginalEvent) {\n // - Old versions of Safari fails on new FocusEvent (and others?).\n // - IE does not support event constructors.\n // - createEvent('FocusEvent') throws in Firefox.\n // => Try the best practice solution first and fallback to the old way\n // if needed.\n try {\n registerWrapper(OriginalEvent, GenericEvent, new OriginalEvent('temp'));\n } catch (ex) {\n registerWrapper(OriginalEvent, GenericEvent,\n document.createEvent(name));\n }\n }\n return GenericEvent;\n }\n\n var UIEvent = registerGenericEvent('UIEvent', Event);\n var CustomEvent = registerGenericEvent('CustomEvent', Event);\n\n var relatedTargetProto = {\n get relatedTarget() {\n var relatedTarget = relatedTargetTable.get(this);\n // relatedTarget can be null.\n if (relatedTarget !== undefined)\n return relatedTarget;\n return wrap(unwrap(this).relatedTarget);\n }\n };\n\n function getInitFunction(name, relatedTargetIndex) {\n return function() {\n arguments[relatedTargetIndex] = unwrap(arguments[relatedTargetIndex]);\n var impl = unwrap(this);\n impl[name].apply(impl, arguments);\n };\n }\n\n var mouseEventProto = mixin({\n initMouseEvent: getInitFunction('initMouseEvent', 14)\n }, relatedTargetProto);\n\n var focusEventProto = mixin({\n initFocusEvent: getInitFunction('initFocusEvent', 5)\n }, relatedTargetProto);\n\n var MouseEvent = registerGenericEvent('MouseEvent', UIEvent, mouseEventProto);\n var FocusEvent = registerGenericEvent('FocusEvent', UIEvent, focusEventProto);\n\n // In case the browser does not support event constructors we polyfill that\n // by calling `createEvent('Foo')` and `initFooEvent` where the arguments to\n // `initFooEvent` are derived from the registered default event init dict.\n var defaultInitDicts = Object.create(null);\n\n var supportsEventConstructors = (function() {\n try {\n new window.FocusEvent('focus');\n } catch (ex) {\n return false;\n }\n return true;\n })();\n\n /**\n * Constructs a new native event.\n */\n function constructEvent(OriginalEvent, name, type, options) {\n if (supportsEventConstructors)\n return new OriginalEvent(type, unwrapOptions(options));\n\n // Create the arguments from the default dictionary.\n var event = unwrap(document.createEvent(name));\n var defaultDict = defaultInitDicts[name];\n var args = [type];\n Object.keys(defaultDict).forEach(function(key) {\n var v = options != null && key in options ?\n options[key] : defaultDict[key];\n if (key === 'relatedTarget')\n v = unwrap(v);\n args.push(v);\n });\n event['init' + name].apply(event, args);\n return event;\n }\n\n if (!supportsEventConstructors) {\n var configureEventConstructor = function(name, initDict, superName) {\n if (superName) {\n var superDict = defaultInitDicts[superName];\n initDict = mixin(mixin({}, superDict), initDict);\n }\n\n defaultInitDicts[name] = initDict;\n };\n\n // The order of the default event init dictionary keys is important, the\n // arguments to initFooEvent is derived from that.\n configureEventConstructor('Event', {bubbles: false, cancelable: false});\n configureEventConstructor('CustomEvent', {detail: null}, 'Event');\n configureEventConstructor('UIEvent', {view: null, detail: 0}, 'Event');\n configureEventConstructor('MouseEvent', {\n screenX: 0,\n screenY: 0,\n clientX: 0,\n clientY: 0,\n ctrlKey: false,\n altKey: false,\n shiftKey: false,\n metaKey: false,\n button: 0,\n relatedTarget: null\n }, 'UIEvent');\n configureEventConstructor('FocusEvent', {relatedTarget: null}, 'UIEvent');\n }\n\n // Safari 7 does not yet have BeforeUnloadEvent.\n // https://bugs.webkit.org/show_bug.cgi?id=120849\n var OriginalBeforeUnloadEvent = window.BeforeUnloadEvent;\n\n function BeforeUnloadEvent(impl) {\n Event.call(this, impl);\n }\n BeforeUnloadEvent.prototype = Object.create(Event.prototype);\n mixin(BeforeUnloadEvent.prototype, {\n get returnValue() {\n return this.impl.returnValue;\n },\n set returnValue(v) {\n this.impl.returnValue = v;\n }\n });\n\n if (OriginalBeforeUnloadEvent)\n registerWrapper(OriginalBeforeUnloadEvent, BeforeUnloadEvent);\n\n function isValidListener(fun) {\n if (typeof fun === 'function')\n return true;\n return fun && fun.handleEvent;\n }\n\n function isMutationEvent(type) {\n switch (type) {\n case 'DOMAttrModified':\n case 'DOMAttributeNameChanged':\n case 'DOMCharacterDataModified':\n case 'DOMElementNameChanged':\n case 'DOMNodeInserted':\n case 'DOMNodeInsertedIntoDocument':\n case 'DOMNodeRemoved':\n case 'DOMNodeRemovedFromDocument':\n case 'DOMSubtreeModified':\n return true;\n }\n return false;\n }\n\n var OriginalEventTarget = window.EventTarget;\n\n /**\n * This represents a wrapper for an EventTarget.\n * @param {!EventTarget} impl The original event target.\n * @constructor\n */\n function EventTarget(impl) {\n this.impl = impl;\n }\n\n // Node and Window have different internal type checks in WebKit so we cannot\n // use the same method as the original function.\n var methodNames = [\n 'addEventListener',\n 'removeEventListener',\n 'dispatchEvent'\n ];\n\n [Node, Window].forEach(function(constructor) {\n var p = constructor.prototype;\n methodNames.forEach(function(name) {\n Object.defineProperty(p, name + '_', {value: p[name]});\n });\n });\n\n function getTargetToListenAt(wrapper) {\n if (wrapper instanceof wrappers.ShadowRoot)\n wrapper = wrapper.host;\n return unwrap(wrapper);\n }\n\n EventTarget.prototype = {\n addEventListener: function(type, fun, capture) {\n if (!isValidListener(fun) || isMutationEvent(type))\n return;\n\n var listener = new Listener(type, fun, capture);\n var listeners = listenersTable.get(this);\n if (!listeners) {\n listeners = [];\n listeners.depth = 0;\n listenersTable.set(this, listeners);\n } else {\n // Might have a duplicate.\n for (var i = 0; i < listeners.length; i++) {\n if (listener.equals(listeners[i]))\n return;\n }\n }\n\n listeners.push(listener);\n\n var target = getTargetToListenAt(this);\n target.addEventListener_(type, dispatchOriginalEvent, true);\n },\n removeEventListener: function(type, fun, capture) {\n capture = Boolean(capture);\n var listeners = listenersTable.get(this);\n if (!listeners)\n return;\n var count = 0, found = false;\n for (var i = 0; i < listeners.length; i++) {\n if (listeners[i].type === type && listeners[i].capture === capture) {\n count++;\n if (listeners[i].handler === fun) {\n found = true;\n listeners[i].remove();\n }\n }\n }\n\n if (found && count === 1) {\n var target = getTargetToListenAt(this);\n target.removeEventListener_(type, dispatchOriginalEvent, true);\n }\n },\n dispatchEvent: function(event) {\n // We want to use the native dispatchEvent because it triggers the default\n // actions (like checking a checkbox). However, if there are no listeners\n // in the composed tree then there are no events that will trigger and\n // listeners in the non composed tree that are part of the event path are\n // not notified.\n //\n // If we find out that there are no listeners in the composed tree we add\n // a temporary listener to the target which makes us get called back even\n // in that case.\n\n var nativeEvent = unwrap(event);\n var eventType = nativeEvent.type;\n\n // Allow dispatching the same event again. This is safe because if user\n // code calls this during an existing dispatch of the same event the\n // native dispatchEvent throws (that is required by the spec).\n handledEventsTable.set(nativeEvent, false);\n\n // Force rendering since we prefer native dispatch and that works on the\n // composed tree.\n scope.renderAllPending();\n\n var tempListener;\n if (!hasListenerInAncestors(this, eventType)) {\n tempListener = function() {};\n this.addEventListener(eventType, tempListener, true);\n }\n\n try {\n return unwrap(this).dispatchEvent_(nativeEvent);\n } finally {\n if (tempListener)\n this.removeEventListener(eventType, tempListener, true);\n }\n }\n };\n\n function hasListener(node, type) {\n var listeners = listenersTable.get(node);\n if (listeners) {\n for (var i = 0; i < listeners.length; i++) {\n if (!listeners[i].removed && listeners[i].type === type)\n return true;\n }\n }\n return false;\n }\n\n function hasListenerInAncestors(target, type) {\n for (var node = unwrap(target); node; node = node.parentNode) {\n if (hasListener(wrap(node), type))\n return true;\n }\n return false;\n }\n\n if (OriginalEventTarget)\n registerWrapper(OriginalEventTarget, EventTarget);\n\n function wrapEventTargetMethods(constructors) {\n forwardMethodsToWrapper(constructors, methodNames);\n }\n\n var originalElementFromPoint = document.elementFromPoint;\n\n function elementFromPoint(self, document, x, y) {\n scope.renderAllPending();\n\n var element = wrap(originalElementFromPoint.call(document.impl, x, y));\n if (!element)\n return null;\n var path = getEventPath(element, null);\n\n // scope the path to this TreeScope\n var idx = path.lastIndexOf(self);\n if (idx == -1)\n return null;\n else\n path = path.slice(0, idx);\n\n // TODO(dfreedm): pass idx to eventRetargetting to avoid array copy\n return eventRetargetting(path, self);\n }\n\n /**\n * Returns a function that is to be used as a getter for `onfoo` properties.\n * @param {string} name\n * @return {Function}\n */\n function getEventHandlerGetter(name) {\n return function() {\n var inlineEventHandlers = eventHandlersTable.get(this);\n return inlineEventHandlers && inlineEventHandlers[name] &&\n inlineEventHandlers[name].value || null;\n };\n }\n\n /**\n * Returns a function that is to be used as a setter for `onfoo` properties.\n * @param {string} name\n * @return {Function}\n */\n function getEventHandlerSetter(name) {\n var eventType = name.slice(2);\n return function(value) {\n var inlineEventHandlers = eventHandlersTable.get(this);\n if (!inlineEventHandlers) {\n inlineEventHandlers = Object.create(null);\n eventHandlersTable.set(this, inlineEventHandlers);\n }\n\n var old = inlineEventHandlers[name];\n if (old)\n this.removeEventListener(eventType, old.wrapped, false);\n\n if (typeof value === 'function') {\n var wrapped = function(e) {\n var rv = value.call(this, e);\n if (rv === false)\n e.preventDefault();\n else if (name === 'onbeforeunload' && typeof rv === 'string')\n e.returnValue = rv;\n // mouseover uses true for preventDefault but preventDefault for\n // mouseover is ignored by browsers these day.\n };\n\n this.addEventListener(eventType, wrapped, false);\n inlineEventHandlers[name] = {\n value: value,\n wrapped: wrapped\n };\n }\n };\n }\n\n scope.elementFromPoint = elementFromPoint;\n scope.getEventHandlerGetter = getEventHandlerGetter;\n scope.getEventHandlerSetter = getEventHandlerSetter;\n scope.wrapEventTargetMethods = wrapEventTargetMethods;\n scope.wrappers.BeforeUnloadEvent = BeforeUnloadEvent;\n scope.wrappers.CustomEvent = CustomEvent;\n scope.wrappers.Event = Event;\n scope.wrappers.EventTarget = EventTarget;\n scope.wrappers.FocusEvent = FocusEvent;\n scope.wrappers.MouseEvent = MouseEvent;\n scope.wrappers.UIEvent = UIEvent;\n\n})(window.ShadowDOMPolyfill);\n","/*\n * Copyright 2014 The Polymer Authors. All rights reserved.\n * Use of this source code is goverened by a BSD-style\n * license that can be found in the LICENSE file.\n */\n\n(function(scope) {\n 'use strict';\n\n var UIEvent = scope.wrappers.UIEvent;\n var mixin = scope.mixin;\n var registerWrapper = scope.registerWrapper;\n var unwrap = scope.unwrap;\n var wrap = scope.wrap;\n\n // TouchEvent is WebKit/Blink only.\n var OriginalTouchEvent = window.TouchEvent;\n if (!OriginalTouchEvent)\n return;\n\n var nativeEvent;\n try {\n nativeEvent = document.createEvent('TouchEvent');\n } catch (ex) {\n // In Chrome creating a TouchEvent fails if the feature is not turned on\n // which it isn't on desktop Chrome.\n return;\n }\n\n var nonEnumDescriptor = {enumerable: false};\n\n function nonEnum(obj, prop) {\n Object.defineProperty(obj, prop, nonEnumDescriptor);\n }\n\n function Touch(impl) {\n this.impl = impl;\n }\n\n Touch.prototype = {\n get target() {\n return wrap(this.impl.target);\n }\n };\n\n var descr = {\n configurable: true,\n enumerable: true,\n get: null\n };\n\n [\n 'clientX',\n 'clientY',\n 'screenX',\n 'screenY',\n 'pageX',\n 'pageY',\n 'identifier',\n 'webkitRadiusX',\n 'webkitRadiusY',\n 'webkitRotationAngle',\n 'webkitForce'\n ].forEach(function(name) {\n descr.get = function() {\n return this.impl[name];\n };\n Object.defineProperty(Touch.prototype, name, descr);\n });\n\n function TouchList() {\n this.length = 0;\n nonEnum(this, 'length');\n }\n\n TouchList.prototype = {\n item: function(index) {\n return this[index];\n }\n };\n\n function wrapTouchList(nativeTouchList) {\n var list = new TouchList();\n for (var i = 0; i < nativeTouchList.length; i++) {\n list[i] = new Touch(nativeTouchList[i]);\n }\n list.length = i;\n return list;\n }\n\n function TouchEvent(impl) {\n UIEvent.call(this, impl);\n }\n\n TouchEvent.prototype = Object.create(UIEvent.prototype);\n\n mixin(TouchEvent.prototype, {\n get touches() {\n return wrapTouchList(unwrap(this).touches);\n },\n\n get targetTouches() {\n return wrapTouchList(unwrap(this).targetTouches);\n },\n\n get changedTouches() {\n return wrapTouchList(unwrap(this).changedTouches);\n },\n\n initTouchEvent: function() {\n // The only way to use this is to reuse the TouchList from an existing\n // TouchEvent. Since this is WebKit/Blink proprietary API we will not\n // implement this until someone screams.\n throw new Error('Not implemented');\n }\n });\n\n registerWrapper(OriginalTouchEvent, TouchEvent, nativeEvent);\n\n scope.wrappers.Touch = Touch;\n scope.wrappers.TouchEvent = TouchEvent;\n scope.wrappers.TouchList = TouchList;\n\n})(window.ShadowDOMPolyfill);\n\n","// Copyright 2012 The Polymer Authors. All rights reserved.\n// Use of this source code is goverened by a BSD-style\n// license that can be found in the LICENSE file.\n\n(function(scope) {\n 'use strict';\n\n var wrap = scope.wrap;\n\n var nonEnumDescriptor = {enumerable: false};\n\n function nonEnum(obj, prop) {\n Object.defineProperty(obj, prop, nonEnumDescriptor);\n }\n\n function NodeList() {\n this.length = 0;\n nonEnum(this, 'length');\n }\n NodeList.prototype = {\n item: function(index) {\n return this[index];\n }\n };\n nonEnum(NodeList.prototype, 'item');\n\n function wrapNodeList(list) {\n if (list == null)\n return list;\n var wrapperList = new NodeList();\n for (var i = 0, length = list.length; i < length; i++) {\n wrapperList[i] = wrap(list[i]);\n }\n wrapperList.length = length;\n return wrapperList;\n }\n\n function addWrapNodeListMethod(wrapperConstructor, name) {\n wrapperConstructor.prototype[name] = function() {\n return wrapNodeList(this.impl[name].apply(this.impl, arguments));\n };\n }\n\n scope.wrappers.NodeList = NodeList;\n scope.addWrapNodeListMethod = addWrapNodeListMethod;\n scope.wrapNodeList = wrapNodeList;\n\n})(window.ShadowDOMPolyfill);\n","/*\n * Copyright 2014 The Polymer Authors. All rights reserved.\n * Use of this source code is goverened by a BSD-style\n * license that can be found in the LICENSE file.\n */\n\n(function(scope) {\n 'use strict';\n\n // TODO(arv): Implement.\n\n scope.wrapHTMLCollection = scope.wrapNodeList;\n scope.wrappers.HTMLCollection = scope.wrappers.NodeList;\n\n})(window.ShadowDOMPolyfill);\n","/**\n * Copyright 2012 The Polymer Authors. All rights reserved.\n * Use of this source code is goverened by a BSD-style\n * license that can be found in the LICENSE file.\n */\n\n(function(scope) {\n 'use strict';\n\n var EventTarget = scope.wrappers.EventTarget;\n var NodeList = scope.wrappers.NodeList;\n var TreeScope = scope.TreeScope;\n var assert = scope.assert;\n var defineWrapGetter = scope.defineWrapGetter;\n var enqueueMutation = scope.enqueueMutation;\n var getTreeScope = scope.getTreeScope;\n var isWrapper = scope.isWrapper;\n var mixin = scope.mixin;\n var registerTransientObservers = scope.registerTransientObservers;\n var registerWrapper = scope.registerWrapper;\n var setTreeScope = scope.setTreeScope;\n var unwrap = scope.unwrap;\n var unwrapIfNeeded = scope.unwrapIfNeeded;\n var wrap = scope.wrap;\n var wrapIfNeeded = scope.wrapIfNeeded;\n var wrappers = scope.wrappers;\n\n function assertIsNodeWrapper(node) {\n assert(node instanceof Node);\n }\n\n function createOneElementNodeList(node) {\n var nodes = new NodeList();\n nodes[0] = node;\n nodes.length = 1;\n return nodes;\n }\n\n var surpressMutations = false;\n\n /**\n * Called before node is inserted into a node to enqueue its removal from its\n * old parent.\n * @param {!Node} node The node that is about to be removed.\n * @param {!Node} parent The parent node that the node is being removed from.\n * @param {!NodeList} nodes The collected nodes.\n */\n function enqueueRemovalForInsertedNodes(node, parent, nodes) {\n enqueueMutation(parent, 'childList', {\n removedNodes: nodes,\n previousSibling: node.previousSibling,\n nextSibling: node.nextSibling\n });\n }\n\n function enqueueRemovalForInsertedDocumentFragment(df, nodes) {\n enqueueMutation(df, 'childList', {\n removedNodes: nodes\n });\n }\n\n /**\n * Collects nodes from a DocumentFragment or a Node for removal followed\n * by an insertion.\n *\n * This updates the internal pointers for node, previousNode and nextNode.\n */\n function collectNodes(node, parentNode, previousNode, nextNode) {\n if (node instanceof DocumentFragment) {\n var nodes = collectNodesForDocumentFragment(node);\n\n // The extra loop is to work around bugs with DocumentFragments in IE.\n surpressMutations = true;\n for (var i = nodes.length - 1; i >= 0; i--) {\n node.removeChild(nodes[i]);\n nodes[i].parentNode_ = parentNode;\n }\n surpressMutations = false;\n\n for (var i = 0; i < nodes.length; i++) {\n nodes[i].previousSibling_ = nodes[i - 1] || previousNode;\n nodes[i].nextSibling_ = nodes[i + 1] || nextNode;\n }\n\n if (previousNode)\n previousNode.nextSibling_ = nodes[0];\n if (nextNode)\n nextNode.previousSibling_ = nodes[nodes.length - 1];\n\n return nodes;\n }\n\n var nodes = createOneElementNodeList(node);\n var oldParent = node.parentNode;\n if (oldParent) {\n // This will enqueue the mutation record for the removal as needed.\n oldParent.removeChild(node);\n }\n\n node.parentNode_ = parentNode;\n node.previousSibling_ = previousNode;\n node.nextSibling_ = nextNode;\n if (previousNode)\n previousNode.nextSibling_ = node;\n if (nextNode)\n nextNode.previousSibling_ = node;\n\n return nodes;\n }\n\n function collectNodesNative(node) {\n if (node instanceof DocumentFragment)\n return collectNodesForDocumentFragment(node);\n\n var nodes = createOneElementNodeList(node);\n var oldParent = node.parentNode;\n if (oldParent)\n enqueueRemovalForInsertedNodes(node, oldParent, nodes);\n return nodes;\n }\n\n function collectNodesForDocumentFragment(node) {\n var nodes = new NodeList();\n var i = 0;\n for (var child = node.firstChild; child; child = child.nextSibling) {\n nodes[i++] = child;\n }\n nodes.length = i;\n enqueueRemovalForInsertedDocumentFragment(node, nodes);\n return nodes;\n }\n\n function snapshotNodeList(nodeList) {\n // NodeLists are not live at the moment so just return the same object.\n return nodeList;\n }\n\n // http://dom.spec.whatwg.org/#node-is-inserted\n function nodeWasAdded(node, treeScope) {\n setTreeScope(node, treeScope);\n node.nodeIsInserted_();\n }\n\n function nodesWereAdded(nodes, parent) {\n var treeScope = getTreeScope(parent);\n for (var i = 0; i < nodes.length; i++) {\n nodeWasAdded(nodes[i], treeScope);\n }\n }\n\n // http://dom.spec.whatwg.org/#node-is-removed\n function nodeWasRemoved(node) {\n setTreeScope(node, new TreeScope(node, null));\n }\n\n function nodesWereRemoved(nodes) {\n for (var i = 0; i < nodes.length; i++) {\n nodeWasRemoved(nodes[i]);\n }\n }\n\n function ensureSameOwnerDocument(parent, child) {\n var ownerDoc = parent.nodeType === Node.DOCUMENT_NODE ?\n parent : parent.ownerDocument;\n if (ownerDoc !== child.ownerDocument)\n ownerDoc.adoptNode(child);\n }\n\n function adoptNodesIfNeeded(owner, nodes) {\n if (!nodes.length)\n return;\n\n var ownerDoc = owner.ownerDocument;\n\n // All nodes have the same ownerDocument when we get here.\n if (ownerDoc === nodes[0].ownerDocument)\n return;\n\n for (var i = 0; i < nodes.length; i++) {\n scope.adoptNodeNoRemove(nodes[i], ownerDoc);\n }\n }\n\n function unwrapNodesForInsertion(owner, nodes) {\n adoptNodesIfNeeded(owner, nodes);\n var length = nodes.length;\n\n if (length === 1)\n return unwrap(nodes[0]);\n\n var df = unwrap(owner.ownerDocument.createDocumentFragment());\n for (var i = 0; i < length; i++) {\n df.appendChild(unwrap(nodes[i]));\n }\n return df;\n }\n\n function clearChildNodes(wrapper) {\n if (wrapper.firstChild_ !== undefined) {\n var child = wrapper.firstChild_;\n while (child) {\n var tmp = child;\n child = child.nextSibling_;\n tmp.parentNode_ = tmp.previousSibling_ = tmp.nextSibling_ = undefined;\n }\n }\n wrapper.firstChild_ = wrapper.lastChild_ = undefined;\n }\n\n function removeAllChildNodes(wrapper) {\n if (wrapper.invalidateShadowRenderer()) {\n var childWrapper = wrapper.firstChild;\n while (childWrapper) {\n assert(childWrapper.parentNode === wrapper);\n var nextSibling = childWrapper.nextSibling;\n var childNode = unwrap(childWrapper);\n var parentNode = childNode.parentNode;\n if (parentNode)\n originalRemoveChild.call(parentNode, childNode);\n childWrapper.previousSibling_ = childWrapper.nextSibling_ =\n childWrapper.parentNode_ = null;\n childWrapper = nextSibling;\n }\n wrapper.firstChild_ = wrapper.lastChild_ = null;\n } else {\n var node = unwrap(wrapper);\n var child = node.firstChild;\n var nextSibling;\n while (child) {\n nextSibling = child.nextSibling;\n originalRemoveChild.call(node, child);\n child = nextSibling;\n }\n }\n }\n\n function invalidateParent(node) {\n var p = node.parentNode;\n return p && p.invalidateShadowRenderer();\n }\n\n function cleanupNodes(nodes) {\n for (var i = 0, n; i < nodes.length; i++) {\n n = nodes[i];\n n.parentNode.removeChild(n);\n }\n }\n\n var originalImportNode = document.importNode;\n var originalCloneNode = window.Node.prototype.cloneNode;\n\n function cloneNode(node, deep, opt_doc) {\n var clone;\n if (opt_doc)\n clone = wrap(originalImportNode.call(opt_doc, node.impl, false));\n else\n clone = wrap(originalCloneNode.call(node.impl, false));\n\n if (deep) {\n for (var child = node.firstChild; child; child = child.nextSibling) {\n clone.appendChild(cloneNode(child, true, opt_doc));\n }\n\n if (node instanceof wrappers.HTMLTemplateElement) {\n var cloneContent = clone.content;\n for (var child = node.content.firstChild;\n child;\n child = child.nextSibling) {\n cloneContent.appendChild(cloneNode(child, true, opt_doc));\n }\n }\n }\n // TODO(arv): Some HTML elements also clone other data like value.\n return clone;\n }\n\n function contains(self, child) {\n if (!child || getTreeScope(self) !== getTreeScope(child))\n return false;\n\n for (var node = child; node; node = node.parentNode) {\n if (node === self)\n return true;\n }\n return false;\n }\n\n var OriginalNode = window.Node;\n\n /**\n * This represents a wrapper of a native DOM node.\n * @param {!Node} original The original DOM node, aka, the visual DOM node.\n * @constructor\n * @extends {EventTarget}\n */\n function Node(original) {\n assert(original instanceof OriginalNode);\n\n EventTarget.call(this, original);\n\n // These properties are used to override the visual references with the\n // logical ones. If the value is undefined it means that the logical is the\n // same as the visual.\n\n /**\n * @type {Node|undefined}\n * @private\n */\n this.parentNode_ = undefined;\n\n /**\n * @type {Node|undefined}\n * @private\n */\n this.firstChild_ = undefined;\n\n /**\n * @type {Node|undefined}\n * @private\n */\n this.lastChild_ = undefined;\n\n /**\n * @type {Node|undefined}\n * @private\n */\n this.nextSibling_ = undefined;\n\n /**\n * @type {Node|undefined}\n * @private\n */\n this.previousSibling_ = undefined;\n\n this.treeScope_ = undefined;\n }\n\n var OriginalDocumentFragment = window.DocumentFragment;\n var originalAppendChild = OriginalNode.prototype.appendChild;\n var originalCompareDocumentPosition =\n OriginalNode.prototype.compareDocumentPosition;\n var originalInsertBefore = OriginalNode.prototype.insertBefore;\n var originalRemoveChild = OriginalNode.prototype.removeChild;\n var originalReplaceChild = OriginalNode.prototype.replaceChild;\n\n var isIe = /Trident/.test(navigator.userAgent);\n\n var removeChildOriginalHelper = isIe ?\n function(parent, child) {\n try {\n originalRemoveChild.call(parent, child);\n } catch (ex) {\n if (!(parent instanceof OriginalDocumentFragment))\n throw ex;\n }\n } :\n function(parent, child) {\n originalRemoveChild.call(parent, child);\n };\n\n Node.prototype = Object.create(EventTarget.prototype);\n mixin(Node.prototype, {\n appendChild: function(childWrapper) {\n return this.insertBefore(childWrapper, null);\n },\n\n insertBefore: function(childWrapper, refWrapper) {\n assertIsNodeWrapper(childWrapper);\n\n var refNode;\n if (refWrapper) {\n if (isWrapper(refWrapper)) {\n refNode = unwrap(refWrapper);\n } else {\n refNode = refWrapper;\n refWrapper = wrap(refNode);\n }\n } else {\n refWrapper = null;\n refNode = null;\n }\n\n refWrapper && assert(refWrapper.parentNode === this);\n\n var nodes;\n var previousNode =\n refWrapper ? refWrapper.previousSibling : this.lastChild;\n\n var useNative = !this.invalidateShadowRenderer() &&\n !invalidateParent(childWrapper);\n\n if (useNative)\n nodes = collectNodesNative(childWrapper);\n else\n nodes = collectNodes(childWrapper, this, previousNode, refWrapper);\n\n if (useNative) {\n ensureSameOwnerDocument(this, childWrapper);\n clearChildNodes(this);\n originalInsertBefore.call(this.impl, unwrap(childWrapper), refNode);\n } else {\n if (!previousNode)\n this.firstChild_ = nodes[0];\n if (!refWrapper) {\n this.lastChild_ = nodes[nodes.length - 1];\n if (this.firstChild_ === undefined)\n this.firstChild_ = this.firstChild;\n }\n\n var parentNode = refNode ? refNode.parentNode : this.impl;\n\n // insertBefore refWrapper no matter what the parent is?\n if (parentNode) {\n originalInsertBefore.call(parentNode,\n unwrapNodesForInsertion(this, nodes), refNode);\n } else {\n adoptNodesIfNeeded(this, nodes);\n }\n }\n\n enqueueMutation(this, 'childList', {\n addedNodes: nodes,\n nextSibling: refWrapper,\n previousSibling: previousNode\n });\n\n nodesWereAdded(nodes, this);\n\n return childWrapper;\n },\n\n removeChild: function(childWrapper) {\n assertIsNodeWrapper(childWrapper);\n if (childWrapper.parentNode !== this) {\n // IE has invalid DOM trees at times.\n var found = false;\n var childNodes = this.childNodes;\n for (var ieChild = this.firstChild; ieChild;\n ieChild = ieChild.nextSibling) {\n if (ieChild === childWrapper) {\n found = true;\n break;\n }\n }\n if (!found) {\n // TODO(arv): DOMException\n throw new Error('NotFoundError');\n }\n }\n\n var childNode = unwrap(childWrapper);\n var childWrapperNextSibling = childWrapper.nextSibling;\n var childWrapperPreviousSibling = childWrapper.previousSibling;\n\n if (this.invalidateShadowRenderer()) {\n // We need to remove the real node from the DOM before updating the\n // pointers. This is so that that mutation event is dispatched before\n // the pointers have changed.\n var thisFirstChild = this.firstChild;\n var thisLastChild = this.lastChild;\n\n var parentNode = childNode.parentNode;\n if (parentNode)\n removeChildOriginalHelper(parentNode, childNode);\n\n if (thisFirstChild === childWrapper)\n this.firstChild_ = childWrapperNextSibling;\n if (thisLastChild === childWrapper)\n this.lastChild_ = childWrapperPreviousSibling;\n if (childWrapperPreviousSibling)\n childWrapperPreviousSibling.nextSibling_ = childWrapperNextSibling;\n if (childWrapperNextSibling) {\n childWrapperNextSibling.previousSibling_ =\n childWrapperPreviousSibling;\n }\n\n childWrapper.previousSibling_ = childWrapper.nextSibling_ =\n childWrapper.parentNode_ = undefined;\n } else {\n clearChildNodes(this);\n removeChildOriginalHelper(this.impl, childNode);\n }\n\n if (!surpressMutations) {\n enqueueMutation(this, 'childList', {\n removedNodes: createOneElementNodeList(childWrapper),\n nextSibling: childWrapperNextSibling,\n previousSibling: childWrapperPreviousSibling\n });\n }\n\n registerTransientObservers(this, childWrapper);\n\n return childWrapper;\n },\n\n replaceChild: function(newChildWrapper, oldChildWrapper) {\n assertIsNodeWrapper(newChildWrapper);\n\n var oldChildNode;\n if (isWrapper(oldChildWrapper)) {\n oldChildNode = unwrap(oldChildWrapper);\n } else {\n oldChildNode = oldChildWrapper;\n oldChildWrapper = wrap(oldChildNode);\n }\n\n if (oldChildWrapper.parentNode !== this) {\n // TODO(arv): DOMException\n throw new Error('NotFoundError');\n }\n\n var nextNode = oldChildWrapper.nextSibling;\n var previousNode = oldChildWrapper.previousSibling;\n var nodes;\n\n var useNative = !this.invalidateShadowRenderer() &&\n !invalidateParent(newChildWrapper);\n\n if (useNative) {\n nodes = collectNodesNative(newChildWrapper);\n } else {\n if (nextNode === newChildWrapper)\n nextNode = newChildWrapper.nextSibling;\n nodes = collectNodes(newChildWrapper, this, previousNode, nextNode);\n }\n\n if (!useNative) {\n if (this.firstChild === oldChildWrapper)\n this.firstChild_ = nodes[0];\n if (this.lastChild === oldChildWrapper)\n this.lastChild_ = nodes[nodes.length - 1];\n\n oldChildWrapper.previousSibling_ = oldChildWrapper.nextSibling_ =\n oldChildWrapper.parentNode_ = undefined;\n\n // replaceChild no matter what the parent is?\n if (oldChildNode.parentNode) {\n originalReplaceChild.call(\n oldChildNode.parentNode,\n unwrapNodesForInsertion(this, nodes),\n oldChildNode);\n }\n } else {\n ensureSameOwnerDocument(this, newChildWrapper);\n clearChildNodes(this);\n originalReplaceChild.call(this.impl, unwrap(newChildWrapper),\n oldChildNode);\n }\n\n enqueueMutation(this, 'childList', {\n addedNodes: nodes,\n removedNodes: createOneElementNodeList(oldChildWrapper),\n nextSibling: nextNode,\n previousSibling: previousNode\n });\n\n nodeWasRemoved(oldChildWrapper);\n nodesWereAdded(nodes, this);\n\n return oldChildWrapper;\n },\n\n /**\n * Called after a node was inserted. Subclasses override this to invalidate\n * the renderer as needed.\n * @private\n */\n nodeIsInserted_: function() {\n for (var child = this.firstChild; child; child = child.nextSibling) {\n child.nodeIsInserted_();\n }\n },\n\n hasChildNodes: function() {\n return this.firstChild !== null;\n },\n\n /** @type {Node} */\n get parentNode() {\n // If the parentNode has not been overridden, use the original parentNode.\n return this.parentNode_ !== undefined ?\n this.parentNode_ : wrap(this.impl.parentNode);\n },\n\n /** @type {Node} */\n get firstChild() {\n return this.firstChild_ !== undefined ?\n this.firstChild_ : wrap(this.impl.firstChild);\n },\n\n /** @type {Node} */\n get lastChild() {\n return this.lastChild_ !== undefined ?\n this.lastChild_ : wrap(this.impl.lastChild);\n },\n\n /** @type {Node} */\n get nextSibling() {\n return this.nextSibling_ !== undefined ?\n this.nextSibling_ : wrap(this.impl.nextSibling);\n },\n\n /** @type {Node} */\n get previousSibling() {\n return this.previousSibling_ !== undefined ?\n this.previousSibling_ : wrap(this.impl.previousSibling);\n },\n\n get parentElement() {\n var p = this.parentNode;\n while (p && p.nodeType !== Node.ELEMENT_NODE) {\n p = p.parentNode;\n }\n return p;\n },\n\n get textContent() {\n // TODO(arv): This should fallback to this.impl.textContent if there\n // are no shadow trees below or above the context node.\n var s = '';\n for (var child = this.firstChild; child; child = child.nextSibling) {\n if (child.nodeType != Node.COMMENT_NODE) {\n s += child.textContent;\n }\n }\n return s;\n },\n set textContent(textContent) {\n var removedNodes = snapshotNodeList(this.childNodes);\n\n if (this.invalidateShadowRenderer()) {\n removeAllChildNodes(this);\n if (textContent !== '') {\n var textNode = this.impl.ownerDocument.createTextNode(textContent);\n this.appendChild(textNode);\n }\n } else {\n clearChildNodes(this);\n this.impl.textContent = textContent;\n }\n\n var addedNodes = snapshotNodeList(this.childNodes);\n\n enqueueMutation(this, 'childList', {\n addedNodes: addedNodes,\n removedNodes: removedNodes\n });\n\n nodesWereRemoved(removedNodes);\n nodesWereAdded(addedNodes, this);\n },\n\n get childNodes() {\n var wrapperList = new NodeList();\n var i = 0;\n for (var child = this.firstChild; child; child = child.nextSibling) {\n wrapperList[i++] = child;\n }\n wrapperList.length = i;\n return wrapperList;\n },\n\n cloneNode: function(deep) {\n return cloneNode(this, deep);\n },\n\n contains: function(child) {\n return contains(this, wrapIfNeeded(child));\n },\n\n compareDocumentPosition: function(otherNode) {\n // This only wraps, it therefore only operates on the composed DOM and not\n // the logical DOM.\n return originalCompareDocumentPosition.call(this.impl,\n unwrapIfNeeded(otherNode));\n },\n\n normalize: function() {\n var nodes = snapshotNodeList(this.childNodes);\n var remNodes = [];\n var s = '';\n var modNode;\n\n for (var i = 0, n; i < nodes.length; i++) {\n n = nodes[i];\n if (n.nodeType === Node.TEXT_NODE) {\n if (!modNode && !n.data.length)\n this.removeNode(n);\n else if (!modNode)\n modNode = n;\n else {\n s += n.data;\n remNodes.push(n);\n }\n } else {\n if (modNode && remNodes.length) {\n modNode.data += s;\n cleanupNodes(remNodes);\n }\n remNodes = [];\n s = '';\n modNode = null;\n if (n.childNodes.length)\n n.normalize();\n }\n }\n\n // handle case where >1 text nodes are the last children\n if (modNode && remNodes.length) {\n modNode.data += s;\n cleanupNodes(remNodes);\n }\n }\n });\n\n defineWrapGetter(Node, 'ownerDocument');\n\n // We use a DocumentFragment as a base and then delete the properties of\n // DocumentFragment.prototype from the wrapper Node. Since delete makes\n // objects slow in some JS engines we recreate the prototype object.\n registerWrapper(OriginalNode, Node, document.createDocumentFragment());\n delete Node.prototype.querySelector;\n delete Node.prototype.querySelectorAll;\n Node.prototype = mixin(Object.create(EventTarget.prototype), Node.prototype);\n\n scope.cloneNode = cloneNode;\n scope.nodeWasAdded = nodeWasAdded;\n scope.nodeWasRemoved = nodeWasRemoved;\n scope.nodesWereAdded = nodesWereAdded;\n scope.nodesWereRemoved = nodesWereRemoved;\n scope.snapshotNodeList = snapshotNodeList;\n scope.wrappers.Node = Node;\n\n})(window.ShadowDOMPolyfill);\n","// Copyright 2013 The Polymer Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\n(function(scope) {\n 'use strict';\n\n var HTMLCollection = scope.wrappers.HTMLCollection;\n var NodeList = scope.wrappers.NodeList;\n\n function findOne(node, selector) {\n var m, el = node.firstElementChild;\n while (el) {\n if (el.matches(selector))\n return el;\n m = findOne(el, selector);\n if (m)\n return m;\n el = el.nextElementSibling;\n }\n return null;\n }\n\n function matchesSelector(el, selector) {\n return el.matches(selector);\n }\n\n var XHTML_NS = 'http://www.w3.org/1999/xhtml';\n\n function matchesTagName(el, localName, localNameLowerCase) {\n var ln = el.localName;\n return ln === localName ||\n ln === localNameLowerCase && el.namespaceURI === XHTML_NS;\n }\n\n function matchesEveryThing() {\n return true;\n }\n\n function matchesLocalName(el, localName) {\n return el.localName === localName;\n }\n\n function matchesNameSpace(el, ns) {\n return el.namespaceURI === ns;\n }\n\n function matchesLocalNameNS(el, ns, localName) {\n return el.namespaceURI === ns && el.localName === localName;\n }\n\n function findElements(node, result, p, arg0, arg1) {\n var el = node.firstElementChild;\n while (el) {\n if (p(el, arg0, arg1))\n result[result.length++] = el;\n findElements(el, result, p, arg0, arg1);\n el = el.nextElementSibling;\n }\n return result;\n }\n\n // find and findAll will only match Simple Selectors,\n // Structural Pseudo Classes are not guarenteed to be correct\n // http://www.w3.org/TR/css3-selectors/#simple-selectors\n\n var SelectorsInterface = {\n querySelector: function(selector) {\n return findOne(this, selector);\n },\n querySelectorAll: function(selector) {\n return findElements(this, new NodeList(), matchesSelector, selector);\n }\n };\n\n var GetElementsByInterface = {\n getElementsByTagName: function(localName) {\n var result = new HTMLCollection();\n if (localName === '*')\n return findElements(this, result, matchesEveryThing);\n\n return findElements(this, result,\n matchesTagName,\n localName,\n localName.toLowerCase());\n },\n\n getElementsByClassName: function(className) {\n // TODO(arv): Check className?\n return this.querySelectorAll('.' + className);\n },\n\n getElementsByTagNameNS: function(ns, localName) {\n var result = new HTMLCollection();\n\n if (ns === '') {\n ns = null;\n } else if (ns === '*') {\n if (localName === '*')\n return findElements(this, result, matchesEveryThing);\n return findElements(this, result, matchesLocalName, localName);\n }\n\n if (localName === '*')\n return findElements(this, result, matchesNameSpace, ns);\n\n return findElements(this, result, matchesLocalNameNS, ns, localName);\n }\n };\n\n scope.GetElementsByInterface = GetElementsByInterface;\n scope.SelectorsInterface = SelectorsInterface;\n\n})(window.ShadowDOMPolyfill);\n","// Copyright 2013 The Polymer Authors. All rights reserved.\n// Use of this source code is goverened by a BSD-style\n// license that can be found in the LICENSE file.\n\n(function(scope) {\n 'use strict';\n\n var NodeList = scope.wrappers.NodeList;\n\n function forwardElement(node) {\n while (node && node.nodeType !== Node.ELEMENT_NODE) {\n node = node.nextSibling;\n }\n return node;\n }\n\n function backwardsElement(node) {\n while (node && node.nodeType !== Node.ELEMENT_NODE) {\n node = node.previousSibling;\n }\n return node;\n }\n\n var ParentNodeInterface = {\n get firstElementChild() {\n return forwardElement(this.firstChild);\n },\n\n get lastElementChild() {\n return backwardsElement(this.lastChild);\n },\n\n get childElementCount() {\n var count = 0;\n for (var child = this.firstElementChild;\n child;\n child = child.nextElementSibling) {\n count++;\n }\n return count;\n },\n\n get children() {\n var wrapperList = new NodeList();\n var i = 0;\n for (var child = this.firstElementChild;\n child;\n child = child.nextElementSibling) {\n wrapperList[i++] = child;\n }\n wrapperList.length = i;\n return wrapperList;\n },\n\n remove: function() {\n var p = this.parentNode;\n if (p)\n p.removeChild(this);\n }\n };\n\n var ChildNodeInterface = {\n get nextElementSibling() {\n return forwardElement(this.nextSibling);\n },\n\n get previousElementSibling() {\n return backwardsElement(this.previousSibling);\n }\n };\n\n scope.ChildNodeInterface = ChildNodeInterface;\n scope.ParentNodeInterface = ParentNodeInterface;\n\n})(window.ShadowDOMPolyfill);\n","// Copyright 2013 The Polymer Authors. All rights reserved.\n// Use of this source code is goverened by a BSD-style\n// license that can be found in the LICENSE file.\n\n(function(scope) {\n 'use strict';\n\n var ChildNodeInterface = scope.ChildNodeInterface;\n var Node = scope.wrappers.Node;\n var enqueueMutation = scope.enqueueMutation;\n var mixin = scope.mixin;\n var registerWrapper = scope.registerWrapper;\n\n var OriginalCharacterData = window.CharacterData;\n\n function CharacterData(node) {\n Node.call(this, node);\n }\n CharacterData.prototype = Object.create(Node.prototype);\n mixin(CharacterData.prototype, {\n get textContent() {\n return this.data;\n },\n set textContent(value) {\n this.data = value;\n },\n get data() {\n return this.impl.data;\n },\n set data(value) {\n var oldValue = this.impl.data;\n enqueueMutation(this, 'characterData', {\n oldValue: oldValue\n });\n this.impl.data = value;\n }\n });\n\n mixin(CharacterData.prototype, ChildNodeInterface);\n\n registerWrapper(OriginalCharacterData, CharacterData,\n document.createTextNode(''));\n\n scope.wrappers.CharacterData = CharacterData;\n})(window.ShadowDOMPolyfill);\n","// Copyright 2014 The Polymer Authors. All rights reserved.\n// Use of this source code is goverened by a BSD-style\n// license that can be found in the LICENSE file.\n\n(function(scope) {\n 'use strict';\n\n var CharacterData = scope.wrappers.CharacterData;\n var enqueueMutation = scope.enqueueMutation;\n var mixin = scope.mixin;\n var registerWrapper = scope.registerWrapper;\n\n function toUInt32(x) {\n return x >>> 0;\n }\n\n var OriginalText = window.Text;\n\n function Text(node) {\n CharacterData.call(this, node);\n }\n Text.prototype = Object.create(CharacterData.prototype);\n mixin(Text.prototype, {\n splitText: function(offset) {\n offset = toUInt32(offset);\n var s = this.data;\n if (offset > s.length)\n throw new Error('IndexSizeError');\n var head = s.slice(0, offset);\n var tail = s.slice(offset);\n this.data = head;\n var newTextNode = this.ownerDocument.createTextNode(tail);\n if (this.parentNode)\n this.parentNode.insertBefore(newTextNode, this.nextSibling);\n return newTextNode;\n }\n });\n\n registerWrapper(OriginalText, Text, document.createTextNode(''));\n\n scope.wrappers.Text = Text;\n})(window.ShadowDOMPolyfill);\n","// Copyright 2014 The Polymer Authors. All rights reserved.\n// Use of this source code is goverened by a BSD-style\n// license that can be found in the LICENSE file.\n\n(function(scope) {\n 'use strict';\n\n function invalidateClass(el) {\n scope.invalidateRendererBasedOnAttribute(el, 'class');\n }\n\n function DOMTokenList(impl, ownerElement) {\n this.impl = impl;\n this.ownerElement_ = ownerElement;\n }\n\n DOMTokenList.prototype = {\n get length() {\n return this.impl.length;\n },\n item: function(index) {\n return this.impl.item(index);\n },\n contains: function(token) {\n return this.impl.contains(token);\n },\n add: function() {\n this.impl.add.apply(this.impl, arguments);\n invalidateClass(this.ownerElement_);\n },\n remove: function() {\n this.impl.remove.apply(this.impl, arguments);\n invalidateClass(this.ownerElement_);\n },\n toggle: function(token) {\n var rv = this.impl.toggle.apply(this.impl, arguments);\n invalidateClass(this.ownerElement_);\n return rv;\n },\n toString: function() {\n return this.impl.toString();\n }\n };\n\n scope.wrappers.DOMTokenList = DOMTokenList;\n})(window.ShadowDOMPolyfill);\n","// Copyright 2013 The Polymer Authors. All rights reserved.\n// Use of this source code is goverened by a BSD-style\n// license that can be found in the LICENSE file.\n\n(function(scope) {\n 'use strict';\n\n var ChildNodeInterface = scope.ChildNodeInterface;\n var GetElementsByInterface = scope.GetElementsByInterface;\n var Node = scope.wrappers.Node;\n var DOMTokenList = scope.wrappers.DOMTokenList;\n var ParentNodeInterface = scope.ParentNodeInterface;\n var SelectorsInterface = scope.SelectorsInterface;\n var addWrapNodeListMethod = scope.addWrapNodeListMethod;\n var enqueueMutation = scope.enqueueMutation;\n var mixin = scope.mixin;\n var oneOf = scope.oneOf;\n var registerWrapper = scope.registerWrapper;\n var unwrap = scope.unwrap;\n var wrappers = scope.wrappers;\n\n var OriginalElement = window.Element;\n\n var matchesNames = [\n 'matches', // needs to come first.\n 'mozMatchesSelector',\n 'msMatchesSelector',\n 'webkitMatchesSelector',\n ].filter(function(name) {\n return OriginalElement.prototype[name];\n });\n\n var matchesName = matchesNames[0];\n\n var originalMatches = OriginalElement.prototype[matchesName];\n\n function invalidateRendererBasedOnAttribute(element, name) {\n // Only invalidate if parent node is a shadow host.\n var p = element.parentNode;\n if (!p || !p.shadowRoot)\n return;\n\n var renderer = scope.getRendererForHost(p);\n if (renderer.dependsOnAttribute(name))\n renderer.invalidate();\n }\n\n function enqueAttributeChange(element, name, oldValue) {\n // This is not fully spec compliant. We should use localName (which might\n // have a different case than name) and the namespace (which requires us\n // to get the Attr object).\n enqueueMutation(element, 'attributes', {\n name: name,\n namespace: null,\n oldValue: oldValue\n });\n }\n\n var classListTable = new WeakMap();\n\n function Element(node) {\n Node.call(this, node);\n }\n Element.prototype = Object.create(Node.prototype);\n mixin(Element.prototype, {\n createShadowRoot: function() {\n var newShadowRoot = new wrappers.ShadowRoot(this);\n this.impl.polymerShadowRoot_ = newShadowRoot;\n\n var renderer = scope.getRendererForHost(this);\n renderer.invalidate();\n\n return newShadowRoot;\n },\n\n get shadowRoot() {\n return this.impl.polymerShadowRoot_ || null;\n },\n\n // getDestinationInsertionPoints added in ShadowRenderer.js\n\n setAttribute: function(name, value) {\n var oldValue = this.impl.getAttribute(name);\n this.impl.setAttribute(name, value);\n enqueAttributeChange(this, name, oldValue);\n invalidateRendererBasedOnAttribute(this, name);\n },\n\n removeAttribute: function(name) {\n var oldValue = this.impl.getAttribute(name);\n this.impl.removeAttribute(name);\n enqueAttributeChange(this, name, oldValue);\n invalidateRendererBasedOnAttribute(this, name);\n },\n\n matches: function(selector) {\n return originalMatches.call(this.impl, selector);\n },\n\n get classList() {\n var list = classListTable.get(this);\n if (!list) {\n classListTable.set(this,\n list = new DOMTokenList(unwrap(this).classList, this));\n }\n return list;\n },\n\n get className() {\n return unwrap(this).className;\n },\n\n set className(v) {\n this.setAttribute('class', v);\n },\n\n get id() {\n return unwrap(this).id;\n },\n\n set id(v) {\n this.setAttribute('id', v);\n }\n });\n\n matchesNames.forEach(function(name) {\n if (name !== 'matches') {\n Element.prototype[name] = function(selector) {\n return this.matches(selector);\n };\n }\n });\n\n if (OriginalElement.prototype.webkitCreateShadowRoot) {\n Element.prototype.webkitCreateShadowRoot =\n Element.prototype.createShadowRoot;\n }\n\n mixin(Element.prototype, ChildNodeInterface);\n mixin(Element.prototype, GetElementsByInterface);\n mixin(Element.prototype, ParentNodeInterface);\n mixin(Element.prototype, SelectorsInterface);\n\n registerWrapper(OriginalElement, Element,\n document.createElementNS(null, 'x'));\n\n scope.invalidateRendererBasedOnAttribute = invalidateRendererBasedOnAttribute;\n scope.matchesNames = matchesNames;\n scope.wrappers.Element = Element;\n})(window.ShadowDOMPolyfill);\n","// Copyright 2013 The Polymer Authors. All rights reserved.\n// Use of this source code is goverened by a BSD-style\n// license that can be found in the LICENSE file.\n\n(function(scope) {\n 'use strict';\n\n var Element = scope.wrappers.Element;\n var defineGetter = scope.defineGetter;\n var enqueueMutation = scope.enqueueMutation;\n var mixin = scope.mixin;\n var nodesWereAdded = scope.nodesWereAdded;\n var nodesWereRemoved = scope.nodesWereRemoved;\n var registerWrapper = scope.registerWrapper;\n var snapshotNodeList = scope.snapshotNodeList;\n var unwrap = scope.unwrap;\n var wrap = scope.wrap;\n var wrappers = scope.wrappers;\n\n /////////////////////////////////////////////////////////////////////////////\n // innerHTML and outerHTML\n\n // http://www.whatwg.org/specs/web-apps/current-work/multipage/the-end.html#escapingString\n var escapeAttrRegExp = /[&\\u00A0\"]/g;\n var escapeDataRegExp = /[&\\u00A0<>]/g;\n\n function escapeReplace(c) {\n switch (c) {\n case '&':\n return '&';\n case '<':\n return '<';\n case '>':\n return '>';\n case '\"':\n return '"'\n case '\\u00A0':\n return ' ';\n }\n }\n\n function escapeAttr(s) {\n return s.replace(escapeAttrRegExp, escapeReplace);\n }\n\n function escapeData(s) {\n return s.replace(escapeDataRegExp, escapeReplace);\n }\n\n function makeSet(arr) {\n var set = {};\n for (var i = 0; i < arr.length; i++) {\n set[arr[i]] = true;\n }\n return set;\n }\n\n // http://www.whatwg.org/specs/web-apps/current-work/#void-elements\n var voidElements = makeSet([\n 'area',\n 'base',\n 'br',\n 'col',\n 'command',\n 'embed',\n 'hr',\n 'img',\n 'input',\n 'keygen',\n 'link',\n 'meta',\n 'param',\n 'source',\n 'track',\n 'wbr'\n ]);\n\n var plaintextParents = makeSet([\n 'style',\n 'script',\n 'xmp',\n 'iframe',\n 'noembed',\n 'noframes',\n 'plaintext',\n 'noscript'\n ]);\n\n function getOuterHTML(node, parentNode) {\n switch (node.nodeType) {\n case Node.ELEMENT_NODE:\n var tagName = node.tagName.toLowerCase();\n var s = '<' + tagName;\n var attrs = node.attributes;\n for (var i = 0, attr; attr = attrs[i]; i++) {\n s += ' ' + attr.name + '=\"' + escapeAttr(attr.value) + '\"';\n }\n s += '>';\n if (voidElements[tagName])\n return s;\n\n return s + getInnerHTML(node) + '</' + tagName + '>';\n\n case Node.TEXT_NODE:\n var data = node.data;\n if (parentNode && plaintextParents[parentNode.localName])\n return data;\n return escapeData(data);\n\n case Node.COMMENT_NODE:\n return '<!--' + node.data + '-->';\n\n default:\n console.error(node);\n throw new Error('not implemented');\n }\n }\n\n function getInnerHTML(node) {\n if (node instanceof wrappers.HTMLTemplateElement)\n node = node.content;\n\n var s = '';\n for (var child = node.firstChild; child; child = child.nextSibling) {\n s += getOuterHTML(child, node);\n }\n return s;\n }\n\n function setInnerHTML(node, value, opt_tagName) {\n var tagName = opt_tagName || 'div';\n node.textContent = '';\n var tempElement = unwrap(node.ownerDocument.createElement(tagName));\n tempElement.innerHTML = value;\n var firstChild;\n while (firstChild = tempElement.firstChild) {\n node.appendChild(wrap(firstChild));\n }\n }\n\n // IE11 does not have MSIE in the user agent string.\n var oldIe = /MSIE/.test(navigator.userAgent);\n\n var OriginalHTMLElement = window.HTMLElement;\n var OriginalHTMLTemplateElement = window.HTMLTemplateElement;\n\n function HTMLElement(node) {\n Element.call(this, node);\n }\n HTMLElement.prototype = Object.create(Element.prototype);\n mixin(HTMLElement.prototype, {\n get innerHTML() {\n return getInnerHTML(this);\n },\n set innerHTML(value) {\n // IE9 does not handle set innerHTML correctly on plaintextParents. It\n // creates element children. For example\n //\n // scriptElement.innerHTML = '<a>test</a>'\n //\n // Creates a single HTMLAnchorElement child.\n if (oldIe && plaintextParents[this.localName]) {\n this.textContent = value;\n return;\n }\n\n var removedNodes = snapshotNodeList(this.childNodes);\n\n if (this.invalidateShadowRenderer()) {\n if (this instanceof wrappers.HTMLTemplateElement)\n setInnerHTML(this.content, value);\n else\n setInnerHTML(this, value, this.tagName);\n\n // If we have a non native template element we need to handle this\n // manually since setting impl.innerHTML would add the html as direct\n // children and not be moved over to the content fragment.\n } else if (!OriginalHTMLTemplateElement &&\n this instanceof wrappers.HTMLTemplateElement) {\n setInnerHTML(this.content, value);\n } else {\n this.impl.innerHTML = value;\n }\n\n var addedNodes = snapshotNodeList(this.childNodes);\n\n enqueueMutation(this, 'childList', {\n addedNodes: addedNodes,\n removedNodes: removedNodes\n });\n\n nodesWereRemoved(removedNodes);\n nodesWereAdded(addedNodes, this);\n },\n\n get outerHTML() {\n return getOuterHTML(this, this.parentNode);\n },\n set outerHTML(value) {\n var p = this.parentNode;\n if (p) {\n p.invalidateShadowRenderer();\n var df = frag(p, value);\n p.replaceChild(df, this);\n }\n },\n\n insertAdjacentHTML: function(position, text) {\n var contextElement, refNode;\n switch (String(position).toLowerCase()) {\n case 'beforebegin':\n contextElement = this.parentNode;\n refNode = this;\n break;\n case 'afterend':\n contextElement = this.parentNode;\n refNode = this.nextSibling;\n break;\n case 'afterbegin':\n contextElement = this;\n refNode = this.firstChild;\n break;\n case 'beforeend':\n contextElement = this;\n refNode = null;\n break;\n default:\n return;\n }\n\n var df = frag(contextElement, text);\n contextElement.insertBefore(df, refNode);\n }\n });\n\n function frag(contextElement, html) {\n // TODO(arv): This does not work with SVG and other non HTML elements.\n var p = unwrap(contextElement.cloneNode(false));\n p.innerHTML = html;\n var df = unwrap(document.createDocumentFragment());\n var c;\n while (c = p.firstChild) {\n df.appendChild(c);\n }\n return wrap(df);\n }\n\n function getter(name) {\n return function() {\n scope.renderAllPending();\n return this.impl[name];\n };\n }\n\n function getterRequiresRendering(name) {\n defineGetter(HTMLElement, name, getter(name));\n }\n\n [\n 'clientHeight',\n 'clientLeft',\n 'clientTop',\n 'clientWidth',\n 'offsetHeight',\n 'offsetLeft',\n 'offsetTop',\n 'offsetWidth',\n 'scrollHeight',\n 'scrollWidth',\n ].forEach(getterRequiresRendering);\n\n function getterAndSetterRequiresRendering(name) {\n Object.defineProperty(HTMLElement.prototype, name, {\n get: getter(name),\n set: function(v) {\n scope.renderAllPending();\n this.impl[name] = v;\n },\n configurable: true,\n enumerable: true\n });\n }\n\n [\n 'scrollLeft',\n 'scrollTop',\n ].forEach(getterAndSetterRequiresRendering);\n\n function methodRequiresRendering(name) {\n Object.defineProperty(HTMLElement.prototype, name, {\n value: function() {\n scope.renderAllPending();\n return this.impl[name].apply(this.impl, arguments);\n },\n configurable: true,\n enumerable: true\n });\n }\n\n [\n 'getBoundingClientRect',\n 'getClientRects',\n 'scrollIntoView'\n ].forEach(methodRequiresRendering);\n\n // HTMLElement is abstract so we use a subclass that has no members.\n registerWrapper(OriginalHTMLElement, HTMLElement,\n document.createElement('b'));\n\n scope.wrappers.HTMLElement = HTMLElement;\n\n // TODO: Find a better way to share these two with WrapperShadowRoot.\n scope.getInnerHTML = getInnerHTML;\n scope.setInnerHTML = setInnerHTML\n})(window.ShadowDOMPolyfill);\n","// Copyright 2013 The Polymer Authors. All rights reserved.\n// Use of this source code is goverened by a BSD-style\n// license that can be found in the LICENSE file.\n\n(function(scope) {\n 'use strict';\n\n var HTMLElement = scope.wrappers.HTMLElement;\n var mixin = scope.mixin;\n var registerWrapper = scope.registerWrapper;\n var wrap = scope.wrap;\n\n var OriginalHTMLCanvasElement = window.HTMLCanvasElement;\n\n function HTMLCanvasElement(node) {\n HTMLElement.call(this, node);\n }\n HTMLCanvasElement.prototype = Object.create(HTMLElement.prototype);\n\n mixin(HTMLCanvasElement.prototype, {\n getContext: function() {\n var context = this.impl.getContext.apply(this.impl, arguments);\n return context && wrap(context);\n }\n });\n\n registerWrapper(OriginalHTMLCanvasElement, HTMLCanvasElement,\n document.createElement('canvas'));\n\n scope.wrappers.HTMLCanvasElement = HTMLCanvasElement;\n})(window.ShadowDOMPolyfill);\n","// Copyright 2013 The Polymer Authors. All rights reserved.\n// Use of this source code is goverened by a BSD-style\n// license that can be found in the LICENSE file.\n\n(function(scope) {\n 'use strict';\n\n var HTMLElement = scope.wrappers.HTMLElement;\n var mixin = scope.mixin;\n var registerWrapper = scope.registerWrapper;\n\n var OriginalHTMLContentElement = window.HTMLContentElement;\n\n function HTMLContentElement(node) {\n HTMLElement.call(this, node);\n }\n HTMLContentElement.prototype = Object.create(HTMLElement.prototype);\n mixin(HTMLContentElement.prototype, {\n get select() {\n return this.getAttribute('select');\n },\n set select(value) {\n this.setAttribute('select', value);\n },\n\n setAttribute: function(n, v) {\n HTMLElement.prototype.setAttribute.call(this, n, v);\n if (String(n).toLowerCase() === 'select')\n this.invalidateShadowRenderer(true);\n }\n\n // getDistributedNodes is added in ShadowRenderer\n });\n\n if (OriginalHTMLContentElement)\n registerWrapper(OriginalHTMLContentElement, HTMLContentElement);\n\n scope.wrappers.HTMLContentElement = HTMLContentElement;\n})(window.ShadowDOMPolyfill);\n","/*\n * Copyright 2014 The Polymer Authors. All rights reserved.\n * Use of this source code is governed by a BSD-style\n * license that can be found in the LICENSE file.\n */\n\n(function(scope) {\n 'use strict';\n\n var HTMLElement = scope.wrappers.HTMLElement;\n var mixin = scope.mixin;\n var registerWrapper = scope.registerWrapper;\n var wrapHTMLCollection = scope.wrapHTMLCollection;\n var unwrap = scope.unwrap;\n\n var OriginalHTMLFormElement = window.HTMLFormElement;\n\n function HTMLFormElement(node) {\n HTMLElement.call(this, node);\n }\n HTMLFormElement.prototype = Object.create(HTMLElement.prototype);\n mixin(HTMLFormElement.prototype, {\n get elements() {\n // Note: technically this should be an HTMLFormControlsCollection, but\n // that inherits from HTMLCollection, so should be good enough. Spec:\n // http://www.whatwg.org/specs/web-apps/current-work/multipage/common-dom-interfaces.html#htmlformcontrolscollection\n return wrapHTMLCollection(unwrap(this).elements);\n }\n });\n\n registerWrapper(OriginalHTMLFormElement, HTMLFormElement,\n document.createElement('form'));\n\n scope.wrappers.HTMLFormElement = HTMLFormElement;\n})(window.ShadowDOMPolyfill);\n","// Copyright 2013 The Polymer Authors. All rights reserved.\n// Use of this source code is goverened by a BSD-style\n// license that can be found in the LICENSE file.\n\n(function(scope) {\n 'use strict';\n\n var HTMLElement = scope.wrappers.HTMLElement;\n var registerWrapper = scope.registerWrapper;\n var unwrap = scope.unwrap;\n var rewrap = scope.rewrap;\n\n var OriginalHTMLImageElement = window.HTMLImageElement;\n\n function HTMLImageElement(node) {\n HTMLElement.call(this, node);\n }\n HTMLImageElement.prototype = Object.create(HTMLElement.prototype);\n\n registerWrapper(OriginalHTMLImageElement, HTMLImageElement,\n document.createElement('img'));\n\n function Image(width, height) {\n if (!(this instanceof Image)) {\n throw new TypeError(\n 'DOM object constructor cannot be called as a function.');\n }\n\n var node = unwrap(document.createElement('img'));\n HTMLElement.call(this, node);\n rewrap(node, this);\n\n if (width !== undefined)\n node.width = width;\n if (height !== undefined)\n node.height = height;\n }\n\n Image.prototype = HTMLImageElement.prototype;\n\n scope.wrappers.HTMLImageElement = HTMLImageElement;\n scope.wrappers.Image = Image;\n})(window.ShadowDOMPolyfill);\n","// Copyright 2013 The Polymer Authors. All rights reserved.\n// Use of this source code is goverened by a BSD-style\n// license that can be found in the LICENSE file.\n\n(function(scope) {\n 'use strict';\n\n var HTMLElement = scope.wrappers.HTMLElement;\n var mixin = scope.mixin;\n var NodeList = scope.wrappers.NodeList;\n var registerWrapper = scope.registerWrapper;\n\n var OriginalHTMLShadowElement = window.HTMLShadowElement;\n\n function HTMLShadowElement(node) {\n HTMLElement.call(this, node);\n }\n HTMLShadowElement.prototype = Object.create(HTMLElement.prototype);\n\n // getDistributedNodes is added in ShadowRenderer\n\n if (OriginalHTMLShadowElement)\n registerWrapper(OriginalHTMLShadowElement, HTMLShadowElement);\n\n scope.wrappers.HTMLShadowElement = HTMLShadowElement;\n})(window.ShadowDOMPolyfill);\n","// Copyright 2013 The Polymer Authors. All rights reserved.\n// Use of this source code is goverened by a BSD-style\n// license that can be found in the LICENSE file.\n\n(function(scope) {\n 'use strict';\n\n var HTMLElement = scope.wrappers.HTMLElement;\n var mixin = scope.mixin;\n var registerWrapper = scope.registerWrapper;\n var unwrap = scope.unwrap;\n var wrap = scope.wrap;\n\n var contentTable = new WeakMap();\n var templateContentsOwnerTable = new WeakMap();\n\n // http://dvcs.w3.org/hg/webcomponents/raw-file/tip/spec/templates/index.html#dfn-template-contents-owner\n function getTemplateContentsOwner(doc) {\n if (!doc.defaultView)\n return doc;\n var d = templateContentsOwnerTable.get(doc);\n if (!d) {\n // TODO(arv): This should either be a Document or HTMLDocument depending\n // on doc.\n d = doc.implementation.createHTMLDocument('');\n while (d.lastChild) {\n d.removeChild(d.lastChild);\n }\n templateContentsOwnerTable.set(doc, d);\n }\n return d;\n }\n\n function extractContent(templateElement) {\n // templateElement is not a wrapper here.\n var doc = getTemplateContentsOwner(templateElement.ownerDocument);\n var df = unwrap(doc.createDocumentFragment());\n var child;\n while (child = templateElement.firstChild) {\n df.appendChild(child);\n }\n return df;\n }\n\n var OriginalHTMLTemplateElement = window.HTMLTemplateElement;\n\n function HTMLTemplateElement(node) {\n HTMLElement.call(this, node);\n if (!OriginalHTMLTemplateElement) {\n var content = extractContent(node);\n contentTable.set(this, wrap(content));\n }\n }\n HTMLTemplateElement.prototype = Object.create(HTMLElement.prototype);\n\n mixin(HTMLTemplateElement.prototype, {\n get content() {\n if (OriginalHTMLTemplateElement)\n return wrap(this.impl.content);\n return contentTable.get(this);\n },\n\n // TODO(arv): cloneNode needs to clone content.\n\n });\n\n if (OriginalHTMLTemplateElement)\n registerWrapper(OriginalHTMLTemplateElement, HTMLTemplateElement);\n\n scope.wrappers.HTMLTemplateElement = HTMLTemplateElement;\n})(window.ShadowDOMPolyfill);\n","// Copyright 2013 The Polymer Authors. All rights reserved.\n// Use of this source code is goverened by a BSD-style\n// license that can be found in the LICENSE file.\n\n(function(scope) {\n 'use strict';\n\n var HTMLElement = scope.wrappers.HTMLElement;\n var registerWrapper = scope.registerWrapper;\n\n var OriginalHTMLMediaElement = window.HTMLMediaElement;\n\n function HTMLMediaElement(node) {\n HTMLElement.call(this, node);\n }\n HTMLMediaElement.prototype = Object.create(HTMLElement.prototype);\n\n registerWrapper(OriginalHTMLMediaElement, HTMLMediaElement,\n document.createElement('audio'));\n\n scope.wrappers.HTMLMediaElement = HTMLMediaElement;\n})(window.ShadowDOMPolyfill);\n","// Copyright 2013 The Polymer Authors. All rights reserved.\n// Use of this source code is goverened by a BSD-style\n// license that can be found in the LICENSE file.\n\n(function(scope) {\n 'use strict';\n\n var HTMLMediaElement = scope.wrappers.HTMLMediaElement;\n var registerWrapper = scope.registerWrapper;\n var unwrap = scope.unwrap;\n var rewrap = scope.rewrap;\n\n var OriginalHTMLAudioElement = window.HTMLAudioElement;\n\n function HTMLAudioElement(node) {\n HTMLMediaElement.call(this, node);\n }\n HTMLAudioElement.prototype = Object.create(HTMLMediaElement.prototype);\n\n registerWrapper(OriginalHTMLAudioElement, HTMLAudioElement,\n document.createElement('audio'));\n\n function Audio(src) {\n if (!(this instanceof Audio)) {\n throw new TypeError(\n 'DOM object constructor cannot be called as a function.');\n }\n\n var node = unwrap(document.createElement('audio'));\n HTMLMediaElement.call(this, node);\n rewrap(node, this);\n\n node.setAttribute('preload', 'auto');\n if (src !== undefined)\n node.setAttribute('src', src);\n }\n\n Audio.prototype = HTMLAudioElement.prototype;\n\n scope.wrappers.HTMLAudioElement = HTMLAudioElement;\n scope.wrappers.Audio = Audio;\n})(window.ShadowDOMPolyfill);\n","// Copyright 2013 The Polymer Authors. All rights reserved.\n// Use of this source code is goverened by a BSD-style\n// license that can be found in the LICENSE file.\n\n(function(scope) {\n 'use strict';\n\n var HTMLElement = scope.wrappers.HTMLElement;\n var mixin = scope.mixin;\n var registerWrapper = scope.registerWrapper;\n var rewrap = scope.rewrap;\n var unwrap = scope.unwrap;\n var wrap = scope.wrap;\n\n var OriginalHTMLOptionElement = window.HTMLOptionElement;\n\n function trimText(s) {\n return s.replace(/\\s+/g, ' ').trim();\n }\n\n function HTMLOptionElement(node) {\n HTMLElement.call(this, node);\n }\n HTMLOptionElement.prototype = Object.create(HTMLElement.prototype);\n mixin(HTMLOptionElement.prototype, {\n get text() {\n return trimText(this.textContent);\n },\n set text(value) {\n this.textContent = trimText(String(value));\n },\n get form() {\n return wrap(unwrap(this).form);\n }\n });\n\n registerWrapper(OriginalHTMLOptionElement, HTMLOptionElement,\n document.createElement('option'));\n\n function Option(text, value, defaultSelected, selected) {\n if (!(this instanceof Option)) {\n throw new TypeError(\n 'DOM object constructor cannot be called as a function.');\n }\n\n var node = unwrap(document.createElement('option'));\n HTMLElement.call(this, node);\n rewrap(node, this);\n\n if (text !== undefined)\n node.text = text;\n if (value !== undefined)\n node.setAttribute('value', value);\n if (defaultSelected === true)\n node.setAttribute('selected', '');\n node.selected = selected === true;\n }\n\n Option.prototype = HTMLOptionElement.prototype;\n\n scope.wrappers.HTMLOptionElement = HTMLOptionElement;\n scope.wrappers.Option = Option;\n})(window.ShadowDOMPolyfill);\n","// Copyright 2014 The Polymer Authors. All rights reserved.\n// Use of this source code is goverened by a BSD-style\n// license that can be found in the LICENSE file.\n\n(function(scope) {\n 'use strict';\n\n var HTMLElement = scope.wrappers.HTMLElement;\n var mixin = scope.mixin;\n var registerWrapper = scope.registerWrapper;\n var unwrap = scope.unwrap;\n var wrap = scope.wrap;\n\n var OriginalHTMLSelectElement = window.HTMLSelectElement;\n\n function HTMLSelectElement(node) {\n HTMLElement.call(this, node);\n }\n HTMLSelectElement.prototype = Object.create(HTMLElement.prototype);\n mixin(HTMLSelectElement.prototype, {\n add: function(element, before) {\n if (typeof before === 'object') // also includes null\n before = unwrap(before);\n unwrap(this).add(unwrap(element), before);\n },\n\n remove: function(indexOrNode) {\n // Spec only allows index but implementations allow index or node.\n // remove() is also allowed which is same as remove(undefined)\n if (indexOrNode === undefined) {\n HTMLElement.prototype.remove.call(this);\n return;\n }\n\n if (typeof indexOrNode === 'object')\n indexOrNode = unwrap(indexOrNode);\n\n unwrap(this).remove(indexOrNode);\n },\n\n get form() {\n return wrap(unwrap(this).form);\n }\n });\n\n registerWrapper(OriginalHTMLSelectElement, HTMLSelectElement,\n document.createElement('select'));\n\n scope.wrappers.HTMLSelectElement = HTMLSelectElement;\n})(window.ShadowDOMPolyfill);\n","/*\n * Copyright 2014 The Polymer Authors. All rights reserved.\n * Use of this source code is goverened by a BSD-style\n * license that can be found in the LICENSE file.\n */\n\n(function(scope) {\n 'use strict';\n\n var HTMLElement = scope.wrappers.HTMLElement;\n var mixin = scope.mixin;\n var registerWrapper = scope.registerWrapper;\n var unwrap = scope.unwrap;\n var wrap = scope.wrap;\n var wrapHTMLCollection = scope.wrapHTMLCollection;\n\n var OriginalHTMLTableElement = window.HTMLTableElement;\n\n function HTMLTableElement(node) {\n HTMLElement.call(this, node);\n }\n HTMLTableElement.prototype = Object.create(HTMLElement.prototype);\n mixin(HTMLTableElement.prototype, {\n get caption() {\n return wrap(unwrap(this).caption);\n },\n createCaption: function() {\n return wrap(unwrap(this).createCaption());\n },\n\n get tHead() {\n return wrap(unwrap(this).tHead);\n },\n createTHead: function() {\n return wrap(unwrap(this).createTHead());\n },\n\n createTFoot: function() {\n return wrap(unwrap(this).createTFoot());\n },\n get tFoot() {\n return wrap(unwrap(this).tFoot);\n },\n\n get tBodies() {\n return wrapHTMLCollection(unwrap(this).tBodies);\n },\n createTBody: function() {\n return wrap(unwrap(this).createTBody());\n },\n\n get rows() {\n return wrapHTMLCollection(unwrap(this).rows);\n },\n insertRow: function(index) {\n return wrap(unwrap(this).insertRow(index));\n }\n });\n\n registerWrapper(OriginalHTMLTableElement, HTMLTableElement,\n document.createElement('table'));\n\n scope.wrappers.HTMLTableElement = HTMLTableElement;\n})(window.ShadowDOMPolyfill);\n","/*\n * Copyright 2014 The Polymer Authors. All rights reserved.\n * Use of this source code is goverened by a BSD-style\n * license that can be found in the LICENSE file.\n */\n\n(function(scope) {\n 'use strict';\n\n var HTMLElement = scope.wrappers.HTMLElement;\n var mixin = scope.mixin;\n var registerWrapper = scope.registerWrapper;\n var wrapHTMLCollection = scope.wrapHTMLCollection;\n var unwrap = scope.unwrap;\n var wrap = scope.wrap;\n\n var OriginalHTMLTableSectionElement = window.HTMLTableSectionElement;\n\n function HTMLTableSectionElement(node) {\n HTMLElement.call(this, node);\n }\n HTMLTableSectionElement.prototype = Object.create(HTMLElement.prototype);\n mixin(HTMLTableSectionElement.prototype, {\n get rows() {\n return wrapHTMLCollection(unwrap(this).rows);\n },\n insertRow: function(index) {\n return wrap(unwrap(this).insertRow(index));\n }\n });\n\n registerWrapper(OriginalHTMLTableSectionElement, HTMLTableSectionElement,\n document.createElement('thead'));\n\n scope.wrappers.HTMLTableSectionElement = HTMLTableSectionElement;\n})(window.ShadowDOMPolyfill);\n","/*\n * Copyright 2014 The Polymer Authors. All rights reserved.\n * Use of this source code is goverened by a BSD-style\n * license that can be found in the LICENSE file.\n */\n\n(function(scope) {\n 'use strict';\n\n var HTMLElement = scope.wrappers.HTMLElement;\n var mixin = scope.mixin;\n var registerWrapper = scope.registerWrapper;\n var wrapHTMLCollection = scope.wrapHTMLCollection;\n var unwrap = scope.unwrap;\n var wrap = scope.wrap;\n\n var OriginalHTMLTableRowElement = window.HTMLTableRowElement;\n\n function HTMLTableRowElement(node) {\n HTMLElement.call(this, node);\n }\n HTMLTableRowElement.prototype = Object.create(HTMLElement.prototype);\n mixin(HTMLTableRowElement.prototype, {\n get cells() {\n return wrapHTMLCollection(unwrap(this).cells);\n },\n\n insertCell: function(index) {\n return wrap(unwrap(this).insertCell(index));\n }\n });\n\n registerWrapper(OriginalHTMLTableRowElement, HTMLTableRowElement,\n document.createElement('tr'));\n\n scope.wrappers.HTMLTableRowElement = HTMLTableRowElement;\n})(window.ShadowDOMPolyfill);\n","// Copyright 2013 The Polymer Authors. All rights reserved.\n// Use of this source code is goverened by a BSD-style\n// license that can be found in the LICENSE file.\n\n(function(scope) {\n 'use strict';\n\n var HTMLContentElement = scope.wrappers.HTMLContentElement;\n var HTMLElement = scope.wrappers.HTMLElement;\n var HTMLShadowElement = scope.wrappers.HTMLShadowElement;\n var HTMLTemplateElement = scope.wrappers.HTMLTemplateElement;\n var mixin = scope.mixin;\n var registerWrapper = scope.registerWrapper;\n\n var OriginalHTMLUnknownElement = window.HTMLUnknownElement;\n\n function HTMLUnknownElement(node) {\n switch (node.localName) {\n case 'content':\n return new HTMLContentElement(node);\n case 'shadow':\n return new HTMLShadowElement(node);\n case 'template':\n return new HTMLTemplateElement(node);\n }\n HTMLElement.call(this, node);\n }\n HTMLUnknownElement.prototype = Object.create(HTMLElement.prototype);\n registerWrapper(OriginalHTMLUnknownElement, HTMLUnknownElement);\n scope.wrappers.HTMLUnknownElement = HTMLUnknownElement;\n})(window.ShadowDOMPolyfill);\n","// Copyright 2014 The Polymer Authors. All rights reserved.\n// Use of this source code is goverened by a BSD-style\n// license that can be found in the LICENSE file.\n\n(function(scope) {\n 'use strict';\n\n var Element = scope.wrappers.Element;\n var HTMLElement = scope.wrappers.HTMLElement;\n var registerObject = scope.registerObject;\n\n var SVG_NS = 'http://www.w3.org/2000/svg';\n var svgTitleElement = document.createElementNS(SVG_NS, 'title');\n var SVGTitleElement = registerObject(svgTitleElement);\n var SVGElement = Object.getPrototypeOf(SVGTitleElement.prototype).constructor;\n\n // IE11 does not have classList for SVG elements. The spec says that classList\n // is an accessor on Element, but IE11 puts classList on HTMLElement, leaving\n // SVGElement without a classList property. We therefore move the accessor for\n // IE11.\n if (!('classList' in svgTitleElement)) {\n var descr = Object.getOwnPropertyDescriptor(Element.prototype, 'classList');\n Object.defineProperty(HTMLElement.prototype, 'classList', descr);\n delete Element.prototype.classList;\n }\n\n scope.wrappers.SVGElement = SVGElement;\n})(window.ShadowDOMPolyfill);\n","// Copyright 2014 The Polymer Authors. All rights reserved.\n// Use of this source code is goverened by a BSD-style\n// license that can be found in the LICENSE file.\n\n(function(scope) {\n 'use strict';\n\n var mixin = scope.mixin;\n var registerWrapper = scope.registerWrapper;\n var unwrap = scope.unwrap;\n var wrap = scope.wrap;\n\n var OriginalSVGUseElement = window.SVGUseElement;\n\n // IE uses SVGElement as parent interface, SVG2 (Blink & Gecko) uses\n // SVGGraphicsElement. Use the <g> element to get the right prototype.\n\n var SVG_NS = 'http://www.w3.org/2000/svg';\n var gWrapper = wrap(document.createElementNS(SVG_NS, 'g'));\n var useElement = document.createElementNS(SVG_NS, 'use');\n var SVGGElement = gWrapper.constructor;\n var parentInterfacePrototype = Object.getPrototypeOf(SVGGElement.prototype);\n var parentInterface = parentInterfacePrototype.constructor;\n\n function SVGUseElement(impl) {\n parentInterface.call(this, impl);\n }\n\n SVGUseElement.prototype = Object.create(parentInterfacePrototype);\n\n // Firefox does not expose instanceRoot.\n if ('instanceRoot' in useElement) {\n mixin(SVGUseElement.prototype, {\n get instanceRoot() {\n return wrap(unwrap(this).instanceRoot);\n },\n get animatedInstanceRoot() {\n return wrap(unwrap(this).animatedInstanceRoot);\n },\n });\n }\n\n registerWrapper(OriginalSVGUseElement, SVGUseElement, useElement);\n\n scope.wrappers.SVGUseElement = SVGUseElement;\n})(window.ShadowDOMPolyfill);\n","// Copyright 2014 The Polymer Authors. All rights reserved.\n// Use of this source code is goverened by a BSD-style\n// license that can be found in the LICENSE file.\n\n(function(scope) {\n 'use strict';\n\n var EventTarget = scope.wrappers.EventTarget;\n var mixin = scope.mixin;\n var registerWrapper = scope.registerWrapper;\n var wrap = scope.wrap;\n\n var OriginalSVGElementInstance = window.SVGElementInstance;\n if (!OriginalSVGElementInstance)\n return;\n\n function SVGElementInstance(impl) {\n EventTarget.call(this, impl);\n }\n\n SVGElementInstance.prototype = Object.create(EventTarget.prototype);\n mixin(SVGElementInstance.prototype, {\n /** @type {SVGElement} */\n get correspondingElement() {\n return wrap(this.impl.correspondingElement);\n },\n\n /** @type {SVGUseElement} */\n get correspondingUseElement() {\n return wrap(this.impl.correspondingUseElement);\n },\n\n /** @type {SVGElementInstance} */\n get parentNode() {\n return wrap(this.impl.parentNode);\n },\n\n /** @type {SVGElementInstanceList} */\n get childNodes() {\n throw new Error('Not implemented');\n },\n\n /** @type {SVGElementInstance} */\n get firstChild() {\n return wrap(this.impl.firstChild);\n },\n\n /** @type {SVGElementInstance} */\n get lastChild() {\n return wrap(this.impl.lastChild);\n },\n\n /** @type {SVGElementInstance} */\n get previousSibling() {\n return wrap(this.impl.previousSibling);\n },\n\n /** @type {SVGElementInstance} */\n get nextSibling() {\n return wrap(this.impl.nextSibling);\n }\n });\n\n registerWrapper(OriginalSVGElementInstance, SVGElementInstance);\n\n scope.wrappers.SVGElementInstance = SVGElementInstance;\n})(window.ShadowDOMPolyfill);\n","// Copyright 2013 The Polymer Authors. All rights reserved.\n// Use of this source code is goverened by a BSD-style\n// license that can be found in the LICENSE file.\n\n(function(scope) {\n 'use strict';\n\n var mixin = scope.mixin;\n var registerWrapper = scope.registerWrapper;\n var unwrap = scope.unwrap;\n var unwrapIfNeeded = scope.unwrapIfNeeded;\n var wrap = scope.wrap;\n\n var OriginalCanvasRenderingContext2D = window.CanvasRenderingContext2D;\n\n function CanvasRenderingContext2D(impl) {\n this.impl = impl;\n }\n\n mixin(CanvasRenderingContext2D.prototype, {\n get canvas() {\n return wrap(this.impl.canvas);\n },\n\n drawImage: function() {\n arguments[0] = unwrapIfNeeded(arguments[0]);\n this.impl.drawImage.apply(this.impl, arguments);\n },\n\n createPattern: function() {\n arguments[0] = unwrap(arguments[0]);\n return this.impl.createPattern.apply(this.impl, arguments);\n }\n });\n\n registerWrapper(OriginalCanvasRenderingContext2D, CanvasRenderingContext2D,\n document.createElement('canvas').getContext('2d'));\n\n scope.wrappers.CanvasRenderingContext2D = CanvasRenderingContext2D;\n})(window.ShadowDOMPolyfill);\n","// Copyright 2013 The Polymer Authors. All rights reserved.\n// Use of this source code is goverened by a BSD-style\n// license that can be found in the LICENSE file.\n\n(function(scope) {\n 'use strict';\n\n var mixin = scope.mixin;\n var registerWrapper = scope.registerWrapper;\n var unwrapIfNeeded = scope.unwrapIfNeeded;\n var wrap = scope.wrap;\n\n var OriginalWebGLRenderingContext = window.WebGLRenderingContext;\n\n // IE10 does not have WebGL.\n if (!OriginalWebGLRenderingContext)\n return;\n\n function WebGLRenderingContext(impl) {\n this.impl = impl;\n }\n\n mixin(WebGLRenderingContext.prototype, {\n get canvas() {\n return wrap(this.impl.canvas);\n },\n\n texImage2D: function() {\n arguments[5] = unwrapIfNeeded(arguments[5]);\n this.impl.texImage2D.apply(this.impl, arguments);\n },\n\n texSubImage2D: function() {\n arguments[6] = unwrapIfNeeded(arguments[6]);\n this.impl.texSubImage2D.apply(this.impl, arguments);\n }\n });\n\n // Blink/WebKit has broken DOM bindings. Usually we would create an instance\n // of the object and pass it into registerWrapper as a \"blueprint\" but\n // creating WebGL contexts is expensive and might fail so we use a dummy\n // object with dummy instance properties for these broken browsers.\n var instanceProperties = /WebKit/.test(navigator.userAgent) ?\n {drawingBufferHeight: null, drawingBufferWidth: null} : {};\n\n registerWrapper(OriginalWebGLRenderingContext, WebGLRenderingContext,\n instanceProperties);\n\n scope.wrappers.WebGLRenderingContext = WebGLRenderingContext;\n})(window.ShadowDOMPolyfill);\n","// Copyright 2013 The Polymer Authors. All rights reserved.\n// Use of this source code is goverened by a BSD-style\n// license that can be found in the LICENSE file.\n\n(function(scope) {\n 'use strict';\n\n var registerWrapper = scope.registerWrapper;\n var unwrap = scope.unwrap;\n var unwrapIfNeeded = scope.unwrapIfNeeded;\n var wrap = scope.wrap;\n\n var OriginalRange = window.Range;\n\n function Range(impl) {\n this.impl = impl;\n }\n Range.prototype = {\n get startContainer() {\n return wrap(this.impl.startContainer);\n },\n get endContainer() {\n return wrap(this.impl.endContainer);\n },\n get commonAncestorContainer() {\n return wrap(this.impl.commonAncestorContainer);\n },\n setStart: function(refNode,offset) {\n this.impl.setStart(unwrapIfNeeded(refNode), offset);\n },\n setEnd: function(refNode,offset) {\n this.impl.setEnd(unwrapIfNeeded(refNode), offset);\n },\n setStartBefore: function(refNode) {\n this.impl.setStartBefore(unwrapIfNeeded(refNode));\n },\n setStartAfter: function(refNode) {\n this.impl.setStartAfter(unwrapIfNeeded(refNode));\n },\n setEndBefore: function(refNode) {\n this.impl.setEndBefore(unwrapIfNeeded(refNode));\n },\n setEndAfter: function(refNode) {\n this.impl.setEndAfter(unwrapIfNeeded(refNode));\n },\n selectNode: function(refNode) {\n this.impl.selectNode(unwrapIfNeeded(refNode));\n },\n selectNodeContents: function(refNode) {\n this.impl.selectNodeContents(unwrapIfNeeded(refNode));\n },\n compareBoundaryPoints: function(how, sourceRange) {\n return this.impl.compareBoundaryPoints(how, unwrap(sourceRange));\n },\n extractContents: function() {\n return wrap(this.impl.extractContents());\n },\n cloneContents: function() {\n return wrap(this.impl.cloneContents());\n },\n insertNode: function(node) {\n this.impl.insertNode(unwrapIfNeeded(node));\n },\n surroundContents: function(newParent) {\n this.impl.surroundContents(unwrapIfNeeded(newParent));\n },\n cloneRange: function() {\n return wrap(this.impl.cloneRange());\n },\n isPointInRange: function(node, offset) {\n return this.impl.isPointInRange(unwrapIfNeeded(node), offset);\n },\n comparePoint: function(node, offset) {\n return this.impl.comparePoint(unwrapIfNeeded(node), offset);\n },\n intersectsNode: function(node) {\n return this.impl.intersectsNode(unwrapIfNeeded(node));\n },\n toString: function() {\n return this.impl.toString();\n }\n };\n\n // IE9 does not have createContextualFragment.\n if (OriginalRange.prototype.createContextualFragment) {\n Range.prototype.createContextualFragment = function(html) {\n return wrap(this.impl.createContextualFragment(html));\n };\n }\n\n registerWrapper(window.Range, Range, document.createRange());\n\n scope.wrappers.Range = Range;\n\n})(window.ShadowDOMPolyfill);\n","// Copyright 2013 The Polymer Authors. All rights reserved.\n// Use of this source code is goverened by a BSD-style\n// license that can be found in the LICENSE file.\n\n(function(scope) {\n 'use strict';\n\n var GetElementsByInterface = scope.GetElementsByInterface;\n var ParentNodeInterface = scope.ParentNodeInterface;\n var SelectorsInterface = scope.SelectorsInterface;\n var mixin = scope.mixin;\n var registerObject = scope.registerObject;\n\n var DocumentFragment = registerObject(document.createDocumentFragment());\n mixin(DocumentFragment.prototype, ParentNodeInterface);\n mixin(DocumentFragment.prototype, SelectorsInterface);\n mixin(DocumentFragment.prototype, GetElementsByInterface);\n\n var Comment = registerObject(document.createComment(''));\n\n scope.wrappers.Comment = Comment;\n scope.wrappers.DocumentFragment = DocumentFragment;\n\n})(window.ShadowDOMPolyfill);\n","// Copyright 2013 The Polymer Authors. All rights reserved.\n// Use of this source code is goverened by a BSD-style\n// license that can be found in the LICENSE file.\n\n(function(scope) {\n 'use strict';\n\n var DocumentFragment = scope.wrappers.DocumentFragment;\n var TreeScope = scope.TreeScope;\n var elementFromPoint = scope.elementFromPoint;\n var getInnerHTML = scope.getInnerHTML;\n var getTreeScope = scope.getTreeScope;\n var mixin = scope.mixin;\n var rewrap = scope.rewrap;\n var setInnerHTML = scope.setInnerHTML;\n var unwrap = scope.unwrap;\n\n var shadowHostTable = new WeakMap();\n var nextOlderShadowTreeTable = new WeakMap();\n\n var spaceCharRe = /[ \\t\\n\\r\\f]/;\n\n function ShadowRoot(hostWrapper) {\n var node = unwrap(hostWrapper.impl.ownerDocument.createDocumentFragment());\n DocumentFragment.call(this, node);\n\n // createDocumentFragment associates the node with a wrapper\n // DocumentFragment instance. Override that.\n rewrap(node, this);\n\n var oldShadowRoot = hostWrapper.shadowRoot;\n nextOlderShadowTreeTable.set(this, oldShadowRoot);\n\n this.treeScope_ =\n new TreeScope(this, getTreeScope(oldShadowRoot || hostWrapper));\n\n shadowHostTable.set(this, hostWrapper);\n }\n ShadowRoot.prototype = Object.create(DocumentFragment.prototype);\n mixin(ShadowRoot.prototype, {\n get innerHTML() {\n return getInnerHTML(this);\n },\n set innerHTML(value) {\n setInnerHTML(this, value);\n this.invalidateShadowRenderer();\n },\n\n get olderShadowRoot() {\n return nextOlderShadowTreeTable.get(this) || null;\n },\n\n get host() {\n return shadowHostTable.get(this) || null;\n },\n\n invalidateShadowRenderer: function() {\n return shadowHostTable.get(this).invalidateShadowRenderer();\n },\n\n elementFromPoint: function(x, y) {\n return elementFromPoint(this, this.ownerDocument, x, y);\n },\n\n getElementById: function(id) {\n if (spaceCharRe.test(id))\n return null;\n return this.querySelector('[id=\"' + id + '\"]');\n }\n });\n\n scope.wrappers.ShadowRoot = ShadowRoot;\n\n})(window.ShadowDOMPolyfill);\n","// Copyright 2013 The Polymer Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\n(function(scope) {\n 'use strict';\n\n var Element = scope.wrappers.Element;\n var HTMLContentElement = scope.wrappers.HTMLContentElement;\n var HTMLShadowElement = scope.wrappers.HTMLShadowElement;\n var Node = scope.wrappers.Node;\n var ShadowRoot = scope.wrappers.ShadowRoot;\n var assert = scope.assert;\n var getTreeScope = scope.getTreeScope;\n var mixin = scope.mixin;\n var oneOf = scope.oneOf;\n var unwrap = scope.unwrap;\n var wrap = scope.wrap;\n\n /**\n * Updates the fields of a wrapper to a snapshot of the logical DOM as needed.\n * Up means parentNode\n * Sideways means previous and next sibling.\n * @param {!Node} wrapper\n */\n function updateWrapperUpAndSideways(wrapper) {\n wrapper.previousSibling_ = wrapper.previousSibling;\n wrapper.nextSibling_ = wrapper.nextSibling;\n wrapper.parentNode_ = wrapper.parentNode;\n }\n\n /**\n * Updates the fields of a wrapper to a snapshot of the logical DOM as needed.\n * Down means first and last child\n * @param {!Node} wrapper\n */\n function updateWrapperDown(wrapper) {\n wrapper.firstChild_ = wrapper.firstChild;\n wrapper.lastChild_ = wrapper.lastChild;\n }\n\n function updateAllChildNodes(parentNodeWrapper) {\n assert(parentNodeWrapper instanceof Node);\n for (var childWrapper = parentNodeWrapper.firstChild;\n childWrapper;\n childWrapper = childWrapper.nextSibling) {\n updateWrapperUpAndSideways(childWrapper);\n }\n updateWrapperDown(parentNodeWrapper);\n }\n\n function insertBefore(parentNodeWrapper, newChildWrapper, refChildWrapper) {\n var parentNode = unwrap(parentNodeWrapper);\n var newChild = unwrap(newChildWrapper);\n var refChild = refChildWrapper ? unwrap(refChildWrapper) : null;\n\n remove(newChildWrapper);\n updateWrapperUpAndSideways(newChildWrapper);\n\n if (!refChildWrapper) {\n parentNodeWrapper.lastChild_ = parentNodeWrapper.lastChild;\n if (parentNodeWrapper.lastChild === parentNodeWrapper.firstChild)\n parentNodeWrapper.firstChild_ = parentNodeWrapper.firstChild;\n\n var lastChildWrapper = wrap(parentNode.lastChild);\n if (lastChildWrapper)\n lastChildWrapper.nextSibling_ = lastChildWrapper.nextSibling;\n } else {\n if (parentNodeWrapper.firstChild === refChildWrapper)\n parentNodeWrapper.firstChild_ = refChildWrapper;\n\n refChildWrapper.previousSibling_ = refChildWrapper.previousSibling;\n }\n\n parentNode.insertBefore(newChild, refChild);\n }\n\n function remove(nodeWrapper) {\n var node = unwrap(nodeWrapper)\n var parentNode = node.parentNode;\n if (!parentNode)\n return;\n\n var parentNodeWrapper = wrap(parentNode);\n updateWrapperUpAndSideways(nodeWrapper);\n\n if (nodeWrapper.previousSibling)\n nodeWrapper.previousSibling.nextSibling_ = nodeWrapper;\n if (nodeWrapper.nextSibling)\n nodeWrapper.nextSibling.previousSibling_ = nodeWrapper;\n\n if (parentNodeWrapper.lastChild === nodeWrapper)\n parentNodeWrapper.lastChild_ = nodeWrapper;\n if (parentNodeWrapper.firstChild === nodeWrapper)\n parentNodeWrapper.firstChild_ = nodeWrapper;\n\n parentNode.removeChild(node);\n }\n\n var distributedNodesTable = new WeakMap();\n var destinationInsertionPointsTable = new WeakMap();\n var rendererForHostTable = new WeakMap();\n\n function resetDistributedNodes(insertionPoint) {\n distributedNodesTable.set(insertionPoint, []);\n }\n\n function getDistributedNodes(insertionPoint) {\n var rv = distributedNodesTable.get(insertionPoint);\n if (!rv)\n distributedNodesTable.set(insertionPoint, rv = []);\n return rv;\n }\n\n function getChildNodesSnapshot(node) {\n var result = [], i = 0;\n for (var child = node.firstChild; child; child = child.nextSibling) {\n result[i++] = child;\n }\n return result;\n }\n\n var request = oneOf(window, [\n 'requestAnimationFrame',\n 'mozRequestAnimationFrame',\n 'webkitRequestAnimationFrame',\n 'setTimeout'\n ]);\n\n var pendingDirtyRenderers = [];\n var renderTimer;\n\n function renderAllPending() {\n // TODO(arv): Order these in document order. That way we do not have to\n // render something twice.\n for (var i = 0; i < pendingDirtyRenderers.length; i++) {\n var renderer = pendingDirtyRenderers[i];\n var parentRenderer = renderer.parentRenderer;\n if (parentRenderer && parentRenderer.dirty)\n continue;\n renderer.render();\n }\n\n pendingDirtyRenderers = [];\n }\n\n function handleRequestAnimationFrame() {\n renderTimer = null;\n renderAllPending();\n }\n\n /**\n * Returns existing shadow renderer for a host or creates it if it is needed.\n * @params {!Element} host\n * @return {!ShadowRenderer}\n */\n function getRendererForHost(host) {\n var renderer = rendererForHostTable.get(host);\n if (!renderer) {\n renderer = new ShadowRenderer(host);\n rendererForHostTable.set(host, renderer);\n }\n return renderer;\n }\n\n function getShadowRootAncestor(node) {\n var root = getTreeScope(node).root;\n if (root instanceof ShadowRoot)\n return root;\n return null;\n }\n\n function getRendererForShadowRoot(shadowRoot) {\n return getRendererForHost(shadowRoot.host);\n }\n\n var spliceDiff = new ArraySplice();\n spliceDiff.equals = function(renderNode, rawNode) {\n return unwrap(renderNode.node) === rawNode;\n };\n\n /**\n * RenderNode is used as an in memory \"render tree\". When we render the\n * composed tree we create a tree of RenderNodes, then we diff this against\n * the real DOM tree and make minimal changes as needed.\n */\n function RenderNode(node) {\n this.skip = false;\n this.node = node;\n this.childNodes = [];\n }\n\n RenderNode.prototype = {\n append: function(node) {\n var rv = new RenderNode(node);\n this.childNodes.push(rv);\n return rv;\n },\n\n sync: function(opt_added) {\n if (this.skip)\n return;\n\n var nodeWrapper = this.node;\n // plain array of RenderNodes\n var newChildren = this.childNodes;\n // plain array of real nodes.\n var oldChildren = getChildNodesSnapshot(unwrap(nodeWrapper));\n var added = opt_added || new WeakMap();\n\n var splices = spliceDiff.calculateSplices(newChildren, oldChildren);\n\n var newIndex = 0, oldIndex = 0;\n var lastIndex = 0;\n for (var i = 0; i < splices.length; i++) {\n var splice = splices[i];\n for (; lastIndex < splice.index; lastIndex++) {\n oldIndex++;\n newChildren[newIndex++].sync(added);\n }\n\n var removedCount = splice.removed.length;\n for (var j = 0; j < removedCount; j++) {\n var wrapper = wrap(oldChildren[oldIndex++]);\n if (!added.get(wrapper))\n remove(wrapper);\n }\n\n var addedCount = splice.addedCount;\n var refNode = oldChildren[oldIndex] && wrap(oldChildren[oldIndex]);\n for (var j = 0; j < addedCount; j++) {\n var newChildRenderNode = newChildren[newIndex++];\n var newChildWrapper = newChildRenderNode.node;\n insertBefore(nodeWrapper, newChildWrapper, refNode);\n\n // Keep track of added so that we do not remove the node after it\n // has been added.\n added.set(newChildWrapper, true);\n\n newChildRenderNode.sync(added);\n }\n\n lastIndex += addedCount;\n }\n\n for (var i = lastIndex; i < newChildren.length; i++) {\n newChildren[i].sync(added);\n }\n }\n };\n\n function ShadowRenderer(host) {\n this.host = host;\n this.dirty = false;\n this.invalidateAttributes();\n this.associateNode(host);\n }\n\n ShadowRenderer.prototype = {\n\n // http://dvcs.w3.org/hg/webcomponents/raw-file/tip/spec/shadow/index.html#rendering-shadow-trees\n render: function(opt_renderNode) {\n if (!this.dirty)\n return;\n\n this.invalidateAttributes();\n\n var host = this.host;\n\n this.distribution(host);\n var renderNode = opt_renderNode || new RenderNode(host);\n this.buildRenderTree(renderNode, host);\n\n var topMostRenderer = !opt_renderNode;\n if (topMostRenderer)\n renderNode.sync();\n\n this.dirty = false;\n },\n\n get parentRenderer() {\n return getTreeScope(this.host).renderer;\n },\n\n invalidate: function() {\n if (!this.dirty) {\n this.dirty = true;\n var parentRenderer = this.parentRenderer;\n if (parentRenderer)\n parentRenderer.invalidate();\n pendingDirtyRenderers.push(this);\n if (renderTimer)\n return;\n renderTimer = window[request](handleRequestAnimationFrame, 0);\n }\n },\n\n // http://w3c.github.io/webcomponents/spec/shadow/#distribution-algorithms\n distribution: function(root) {\n this.resetAll(root);\n this.distributionResolution(root);\n },\n\n resetAll: function(node) {\n if (isInsertionPoint(node))\n resetDistributedNodes(node);\n else\n resetDestinationInsertionPoints(node);\n\n for (var child = node.firstChild; child; child = child.nextSibling) {\n this.resetAll(child);\n }\n\n if (node.shadowRoot)\n this.resetAll(node.shadowRoot);\n\n if (node.olderShadowRoot)\n this.resetAll(node.olderShadowRoot);\n },\n\n // http://w3c.github.io/webcomponents/spec/shadow/#distribution-results\n distributionResolution: function(node) {\n if (isShadowHost(node)) {\n var shadowHost = node;\n // 1.1\n var pool = poolPopulation(shadowHost);\n\n var shadowTrees = getShadowTrees(shadowHost);\n\n // 1.2\n for (var i = 0; i < shadowTrees.length; i++) {\n // 1.2.1\n this.poolDistribution(shadowTrees[i], pool);\n }\n\n // 1.3\n for (var i = shadowTrees.length - 1; i >= 0; i--) {\n var shadowTree = shadowTrees[i];\n\n // 1.3.1\n // TODO(arv): We should keep the shadow insertion points on the\n // shadow root (or renderer) so we don't have to search the tree\n // every time.\n var shadow = getShadowInsertionPoint(shadowTree);\n\n // 1.3.2\n if (shadow) {\n\n // 1.3.2.1\n var olderShadowRoot = shadowTree.olderShadowRoot;\n if (olderShadowRoot) {\n // 1.3.2.1.1\n pool = poolPopulation(olderShadowRoot);\n }\n\n // 1.3.2.2\n for (var j = 0; j < pool.length; j++) {\n // 1.3.2.2.1\n destributeNodeInto(pool[j], shadow);\n }\n }\n\n // 1.3.3\n this.distributionResolution(shadowTree);\n }\n }\n\n for (var child = node.firstChild; child; child = child.nextSibling) {\n this.distributionResolution(child);\n }\n },\n\n // http://w3c.github.io/webcomponents/spec/shadow/#dfn-pool-distribution-algorithm\n poolDistribution: function (node, pool) {\n if (node instanceof HTMLShadowElement)\n return;\n\n if (node instanceof HTMLContentElement) {\n var content = node;\n this.updateDependentAttributes(content.getAttribute('select'));\n\n var anyDistributed = false;\n\n // 1.1\n for (var i = 0; i < pool.length; i++) {\n var node = pool[i];\n if (!node)\n continue;\n if (matches(node, content)) {\n destributeNodeInto(node, content);\n pool[i] = undefined;\n anyDistributed = true;\n }\n }\n\n // 1.2\n // Fallback content\n if (!anyDistributed) {\n for (var child = content.firstChild;\n child;\n child = child.nextSibling) {\n destributeNodeInto(child, content);\n }\n }\n\n return;\n }\n\n for (var child = node.firstChild; child; child = child.nextSibling) {\n this.poolDistribution(child, pool);\n }\n },\n\n buildRenderTree: function(renderNode, node) {\n var children = this.compose(node);\n for (var i = 0; i < children.length; i++) {\n var child = children[i];\n var childRenderNode = renderNode.append(child);\n this.buildRenderTree(childRenderNode, child);\n }\n\n if (isShadowHost(node)) {\n var renderer = getRendererForHost(node);\n renderer.dirty = false;\n }\n\n },\n\n compose: function(node) {\n var children = [];\n var p = node.shadowRoot || node;\n for (var child = p.firstChild; child; child = child.nextSibling) {\n if (isInsertionPoint(child)) {\n this.associateNode(p);\n var distributedNodes = getDistributedNodes(child);\n for (var j = 0; j < distributedNodes.length; j++) {\n var distributedNode = distributedNodes[j];\n if (isFinalDestination(child, distributedNode))\n children.push(distributedNode);\n }\n } else {\n children.push(child);\n }\n }\n return children;\n },\n\n /**\n * Invalidates the attributes used to keep track of which attributes may\n * cause the renderer to be invalidated.\n */\n invalidateAttributes: function() {\n this.attributes = Object.create(null);\n },\n\n /**\n * Parses the selector and makes this renderer dependent on the attribute\n * being used in the selector.\n * @param {string} selector\n */\n updateDependentAttributes: function(selector) {\n if (!selector)\n return;\n\n var attributes = this.attributes;\n\n // .class\n if (/\\.\\w+/.test(selector))\n attributes['class'] = true;\n\n // #id\n if (/#\\w+/.test(selector))\n attributes['id'] = true;\n\n selector.replace(/\\[\\s*([^\\s=\\|~\\]]+)/g, function(_, name) {\n attributes[name] = true;\n });\n\n // Pseudo selectors have been removed from the spec.\n },\n\n dependsOnAttribute: function(name) {\n return this.attributes[name];\n },\n\n associateNode: function(node) {\n node.impl.polymerShadowRenderer_ = this;\n }\n };\n\n // http://w3c.github.io/webcomponents/spec/shadow/#dfn-pool-population-algorithm\n function poolPopulation(node) {\n var pool = [];\n for (var child = node.firstChild; child; child = child.nextSibling) {\n if (isInsertionPoint(child)) {\n pool.push.apply(pool, getDistributedNodes(child));\n } else {\n pool.push(child);\n }\n }\n return pool;\n }\n\n function getShadowInsertionPoint(node) {\n if (node instanceof HTMLShadowElement)\n return node;\n if (node instanceof HTMLContentElement)\n return null;\n for (var child = node.firstChild; child; child = child.nextSibling) {\n var res = getShadowInsertionPoint(child);\n if (res)\n return res;\n }\n return null;\n }\n\n function destributeNodeInto(child, insertionPoint) {\n getDistributedNodes(insertionPoint).push(child);\n var points = destinationInsertionPointsTable.get(child);\n if (!points)\n destinationInsertionPointsTable.set(child, [insertionPoint]);\n else\n points.push(insertionPoint);\n }\n\n function getDestinationInsertionPoints(node) {\n return destinationInsertionPointsTable.get(node);\n }\n\n function resetDestinationInsertionPoints(node) {\n // IE11 crashes when delete is used.\n destinationInsertionPointsTable.set(node, undefined);\n }\n\n // AllowedSelectors :\n // TypeSelector\n // *\n // ClassSelector\n // IDSelector\n // AttributeSelector\n var selectorStartCharRe = /^[*.#[a-zA-Z_|]/;\n\n function matches(node, contentElement) {\n var select = contentElement.getAttribute('select');\n if (!select)\n return true;\n\n // Here we know the select attribute is a non empty string.\n select = select.trim();\n if (!select)\n return true;\n\n if (!(node instanceof Element))\n return false;\n\n if (!selectorStartCharRe.test(select))\n return false;\n\n try {\n return node.matches(select);\n } catch (ex) {\n // Invalid selector.\n return false;\n }\n }\n\n function isFinalDestination(insertionPoint, node) {\n var points = getDestinationInsertionPoints(node);\n return points && points[points.length - 1] === insertionPoint;\n }\n\n function isInsertionPoint(node) {\n return node instanceof HTMLContentElement ||\n node instanceof HTMLShadowElement;\n }\n\n function isShadowHost(shadowHost) {\n return shadowHost.shadowRoot;\n }\n\n // Returns the shadow trees as an array, with the youngest tree at the\n // beginning of the array.\n function getShadowTrees(host) {\n var trees = [];\n\n for (var tree = host.shadowRoot; tree; tree = tree.olderShadowRoot) {\n trees.push(tree);\n }\n return trees;\n }\n\n function render(host) {\n new ShadowRenderer(host).render();\n };\n\n // Need to rerender shadow host when:\n //\n // - a direct child to the ShadowRoot is added or removed\n // - a direct child to the host is added or removed\n // - a new shadow root is created\n // - a direct child to a content/shadow element is added or removed\n // - a sibling to a content/shadow element is added or removed\n // - content[select] is changed\n // - an attribute in a direct child to a host is modified\n\n /**\n * This gets called when a node was added or removed to it.\n */\n Node.prototype.invalidateShadowRenderer = function(force) {\n var renderer = this.impl.polymerShadowRenderer_;\n if (renderer) {\n renderer.invalidate();\n return true;\n }\n\n return false;\n };\n\n HTMLContentElement.prototype.getDistributedNodes =\n HTMLShadowElement.prototype.getDistributedNodes = function() {\n // TODO(arv): We should only rerender the dirty ancestor renderers (from\n // the root and down).\n renderAllPending();\n return getDistributedNodes(this);\n };\n\n Element.prototype.getDestinationInsertionPoints = function() {\n renderAllPending();\n return getDestinationInsertionPoints(this) || [];\n };\n\n HTMLContentElement.prototype.nodeIsInserted_ =\n HTMLShadowElement.prototype.nodeIsInserted_ = function() {\n // Invalidate old renderer if any.\n this.invalidateShadowRenderer();\n\n var shadowRoot = getShadowRootAncestor(this);\n var renderer;\n if (shadowRoot)\n renderer = getRendererForShadowRoot(shadowRoot);\n this.impl.polymerShadowRenderer_ = renderer;\n if (renderer)\n renderer.invalidate();\n };\n\n scope.getRendererForHost = getRendererForHost;\n scope.getShadowTrees = getShadowTrees;\n scope.renderAllPending = renderAllPending;\n\n scope.getDestinationInsertionPoints = getDestinationInsertionPoints;\n\n // Exposed for testing\n scope.visual = {\n insertBefore: insertBefore,\n remove: remove,\n };\n\n})(window.ShadowDOMPolyfill);\n","// Copyright 2013 The Polymer Authors. All rights reserved.\n// Use of this source code is goverened by a BSD-style\n// license that can be found in the LICENSE file.\n\n(function(scope) {\n 'use strict';\n\n var HTMLElement = scope.wrappers.HTMLElement;\n var assert = scope.assert;\n var mixin = scope.mixin;\n var registerWrapper = scope.registerWrapper;\n var unwrap = scope.unwrap;\n var wrap = scope.wrap;\n\n var elementsWithFormProperty = [\n 'HTMLButtonElement',\n 'HTMLFieldSetElement',\n 'HTMLInputElement',\n 'HTMLKeygenElement',\n 'HTMLLabelElement',\n 'HTMLLegendElement',\n 'HTMLObjectElement',\n // HTMLOptionElement is handled in HTMLOptionElement.js\n 'HTMLOutputElement',\n // HTMLSelectElement is handled in HTMLSelectElement.js\n 'HTMLTextAreaElement',\n ];\n\n function createWrapperConstructor(name) {\n if (!window[name])\n return;\n\n // Ensure we are not overriding an already existing constructor.\n assert(!scope.wrappers[name]);\n\n var GeneratedWrapper = function(node) {\n // At this point all of them extend HTMLElement.\n HTMLElement.call(this, node);\n }\n GeneratedWrapper.prototype = Object.create(HTMLElement.prototype);\n mixin(GeneratedWrapper.prototype, {\n get form() {\n return wrap(unwrap(this).form);\n },\n });\n\n registerWrapper(window[name], GeneratedWrapper,\n document.createElement(name.slice(4, -7)));\n scope.wrappers[name] = GeneratedWrapper;\n }\n\n elementsWithFormProperty.forEach(createWrapperConstructor);\n\n})(window.ShadowDOMPolyfill);\n","// Copyright 2014 The Polymer Authors. All rights reserved.\n// Use of this source code is goverened by a BSD-style\n// license that can be found in the LICENSE file.\n\n(function(scope) {\n 'use strict';\n\n var registerWrapper = scope.registerWrapper;\n var unwrap = scope.unwrap;\n var unwrapIfNeeded = scope.unwrapIfNeeded;\n var wrap = scope.wrap;\n\n var OriginalSelection = window.Selection;\n\n function Selection(impl) {\n this.impl = impl;\n }\n Selection.prototype = {\n get anchorNode() {\n return wrap(this.impl.anchorNode);\n },\n get focusNode() {\n return wrap(this.impl.focusNode);\n },\n addRange: function(range) {\n this.impl.addRange(unwrap(range));\n },\n collapse: function(node, index) {\n this.impl.collapse(unwrapIfNeeded(node), index);\n },\n containsNode: function(node, allowPartial) {\n return this.impl.containsNode(unwrapIfNeeded(node), allowPartial);\n },\n extend: function(node, offset) {\n this.impl.extend(unwrapIfNeeded(node), offset);\n },\n getRangeAt: function(index) {\n return wrap(this.impl.getRangeAt(index));\n },\n removeRange: function(range) {\n this.impl.removeRange(unwrap(range));\n },\n selectAllChildren: function(node) {\n this.impl.selectAllChildren(unwrapIfNeeded(node));\n },\n toString: function() {\n return this.impl.toString();\n }\n };\n\n // WebKit extensions. Not implemented.\n // readonly attribute Node baseNode;\n // readonly attribute long baseOffset;\n // readonly attribute Node extentNode;\n // readonly attribute long extentOffset;\n // [RaisesException] void setBaseAndExtent([Default=Undefined] optional Node baseNode,\n // [Default=Undefined] optional long baseOffset,\n // [Default=Undefined] optional Node extentNode,\n // [Default=Undefined] optional long extentOffset);\n // [RaisesException, ImplementedAs=collapse] void setPosition([Default=Undefined] optional Node node,\n // [Default=Undefined] optional long offset);\n\n registerWrapper(window.Selection, Selection, window.getSelection());\n\n scope.wrappers.Selection = Selection;\n\n})(window.ShadowDOMPolyfill);\n","// Copyright 2013 The Polymer Authors. All rights reserved.\n// Use of this source code is goverened by a BSD-style\n// license that can be found in the LICENSE file.\n\n(function(scope) {\n 'use strict';\n\n var GetElementsByInterface = scope.GetElementsByInterface;\n var Node = scope.wrappers.Node;\n var ParentNodeInterface = scope.ParentNodeInterface;\n var Selection = scope.wrappers.Selection;\n var SelectorsInterface = scope.SelectorsInterface;\n var ShadowRoot = scope.wrappers.ShadowRoot;\n var TreeScope = scope.TreeScope;\n var cloneNode = scope.cloneNode;\n var defineWrapGetter = scope.defineWrapGetter;\n var elementFromPoint = scope.elementFromPoint;\n var forwardMethodsToWrapper = scope.forwardMethodsToWrapper;\n var matchesNames = scope.matchesNames;\n var mixin = scope.mixin;\n var registerWrapper = scope.registerWrapper;\n var renderAllPending = scope.renderAllPending;\n var rewrap = scope.rewrap;\n var unwrap = scope.unwrap;\n var wrap = scope.wrap;\n var wrapEventTargetMethods = scope.wrapEventTargetMethods;\n var wrapNodeList = scope.wrapNodeList;\n\n var implementationTable = new WeakMap();\n\n function Document(node) {\n Node.call(this, node);\n this.treeScope_ = new TreeScope(this, null);\n }\n Document.prototype = Object.create(Node.prototype);\n\n defineWrapGetter(Document, 'documentElement');\n\n // Conceptually both body and head can be in a shadow but suporting that seems\n // overkill at this point.\n defineWrapGetter(Document, 'body');\n defineWrapGetter(Document, 'head');\n\n // document cannot be overridden so we override a bunch of its methods\n // directly on the instance.\n\n function wrapMethod(name) {\n var original = document[name];\n Document.prototype[name] = function() {\n return wrap(original.apply(this.impl, arguments));\n };\n }\n\n [\n 'createComment',\n 'createDocumentFragment',\n 'createElement',\n 'createElementNS',\n 'createEvent',\n 'createEventNS',\n 'createRange',\n 'createTextNode',\n 'getElementById'\n ].forEach(wrapMethod);\n\n var originalAdoptNode = document.adoptNode;\n\n function adoptNodeNoRemove(node, doc) {\n originalAdoptNode.call(doc.impl, unwrap(node));\n adoptSubtree(node, doc);\n }\n\n function adoptSubtree(node, doc) {\n if (node.shadowRoot)\n doc.adoptNode(node.shadowRoot);\n if (node instanceof ShadowRoot)\n adoptOlderShadowRoots(node, doc);\n for (var child = node.firstChild; child; child = child.nextSibling) {\n adoptSubtree(child, doc);\n }\n }\n\n function adoptOlderShadowRoots(shadowRoot, doc) {\n var oldShadowRoot = shadowRoot.olderShadowRoot;\n if (oldShadowRoot)\n doc.adoptNode(oldShadowRoot);\n }\n\n var originalGetSelection = document.getSelection;\n\n mixin(Document.prototype, {\n adoptNode: function(node) {\n if (node.parentNode)\n node.parentNode.removeChild(node);\n adoptNodeNoRemove(node, this);\n return node;\n },\n elementFromPoint: function(x, y) {\n return elementFromPoint(this, this, x, y);\n },\n importNode: function(node, deep) {\n return cloneNode(node, deep, this.impl);\n },\n getSelection: function() {\n renderAllPending();\n return new Selection(originalGetSelection.call(unwrap(this)));\n },\n getElementsByName: function(name) {\n return SelectorsInterface.querySelectorAll.call(this,\n '[name=' + JSON.stringify(String(name)) + ']');\n }\n });\n\n if (document.registerElement) {\n var originalRegisterElement = document.registerElement;\n Document.prototype.registerElement = function(tagName, object) {\n var prototype, extendsOption;\n if (object !== undefined) {\n prototype = object.prototype;\n extendsOption = object.extends;\n }\n\n if (!prototype)\n prototype = Object.create(HTMLElement.prototype);\n\n\n // If we already used the object as a prototype for another custom\n // element.\n if (scope.nativePrototypeTable.get(prototype)) {\n // TODO(arv): DOMException\n throw new Error('NotSupportedError');\n }\n\n // Find first object on the prototype chain that already have a native\n // prototype. Keep track of all the objects before that so we can create\n // a similar structure for the native case.\n var proto = Object.getPrototypeOf(prototype);\n var nativePrototype;\n var prototypes = [];\n while (proto) {\n nativePrototype = scope.nativePrototypeTable.get(proto);\n if (nativePrototype)\n break;\n prototypes.push(proto);\n proto = Object.getPrototypeOf(proto);\n }\n\n if (!nativePrototype) {\n // TODO(arv): DOMException\n throw new Error('NotSupportedError');\n }\n\n // This works by creating a new prototype object that is empty, but has\n // the native prototype as its proto. The original prototype object\n // passed into register is used as the wrapper prototype.\n\n var newPrototype = Object.create(nativePrototype);\n for (var i = prototypes.length - 1; i >= 0; i--) {\n newPrototype = Object.create(newPrototype);\n }\n\n // Add callbacks if present.\n // Names are taken from:\n // https://code.google.com/p/chromium/codesearch#chromium/src/third_party/WebKit/Source/bindings/v8/CustomElementConstructorBuilder.cpp&sq=package:chromium&type=cs&l=156\n // and not from the spec since the spec is out of date.\n [\n 'createdCallback',\n 'attachedCallback',\n 'detachedCallback',\n 'attributeChangedCallback',\n ].forEach(function(name) {\n var f = prototype[name];\n if (!f)\n return;\n newPrototype[name] = function() {\n // if this element has been wrapped prior to registration,\n // the wrapper is stale; in this case rewrap\n if (!(wrap(this) instanceof CustomElementConstructor)) {\n rewrap(this);\n }\n f.apply(wrap(this), arguments);\n };\n });\n\n var p = {prototype: newPrototype};\n if (extendsOption)\n p.extends = extendsOption;\n\n function CustomElementConstructor(node) {\n if (!node) {\n if (extendsOption) {\n return document.createElement(extendsOption, tagName);\n } else {\n return document.createElement(tagName);\n }\n }\n this.impl = node;\n }\n CustomElementConstructor.prototype = prototype;\n CustomElementConstructor.prototype.constructor = CustomElementConstructor;\n\n scope.constructorTable.set(newPrototype, CustomElementConstructor);\n scope.nativePrototypeTable.set(prototype, newPrototype);\n\n // registration is synchronous so do it last\n var nativeConstructor = originalRegisterElement.call(unwrap(this),\n tagName, p);\n return CustomElementConstructor;\n };\n\n forwardMethodsToWrapper([\n window.HTMLDocument || window.Document, // Gecko adds these to HTMLDocument\n ], [\n 'registerElement',\n ]);\n }\n\n // We also override some of the methods on document.body and document.head\n // for convenience.\n forwardMethodsToWrapper([\n window.HTMLBodyElement,\n window.HTMLDocument || window.Document, // Gecko adds these to HTMLDocument\n window.HTMLHeadElement,\n window.HTMLHtmlElement,\n ], [\n 'appendChild',\n 'compareDocumentPosition',\n 'contains',\n 'getElementsByClassName',\n 'getElementsByTagName',\n 'getElementsByTagNameNS',\n 'insertBefore',\n 'querySelector',\n 'querySelectorAll',\n 'removeChild',\n 'replaceChild',\n ].concat(matchesNames));\n\n forwardMethodsToWrapper([\n window.HTMLDocument || window.Document, // Gecko adds these to HTMLDocument\n ], [\n 'adoptNode',\n 'importNode',\n 'contains',\n 'createComment',\n 'createDocumentFragment',\n 'createElement',\n 'createElementNS',\n 'createEvent',\n 'createEventNS',\n 'createRange',\n 'createTextNode',\n 'elementFromPoint',\n 'getElementById',\n 'getElementsByName',\n 'getSelection',\n ]);\n\n mixin(Document.prototype, GetElementsByInterface);\n mixin(Document.prototype, ParentNodeInterface);\n mixin(Document.prototype, SelectorsInterface);\n\n mixin(Document.prototype, {\n get implementation() {\n var implementation = implementationTable.get(this);\n if (implementation)\n return implementation;\n implementation =\n new DOMImplementation(unwrap(this).implementation);\n implementationTable.set(this, implementation);\n return implementation;\n },\n\n get defaultView() {\n return wrap(unwrap(this).defaultView);\n }\n });\n\n registerWrapper(window.Document, Document,\n document.implementation.createHTMLDocument(''));\n\n // Both WebKit and Gecko uses HTMLDocument for document. HTML5/DOM only has\n // one Document interface and IE implements the standard correctly.\n if (window.HTMLDocument)\n registerWrapper(window.HTMLDocument, Document);\n\n wrapEventTargetMethods([\n window.HTMLBodyElement,\n window.HTMLDocument || window.Document, // Gecko adds these to HTMLDocument\n window.HTMLHeadElement,\n ]);\n\n function DOMImplementation(impl) {\n this.impl = impl;\n }\n\n function wrapImplMethod(constructor, name) {\n var original = document.implementation[name];\n constructor.prototype[name] = function() {\n return wrap(original.apply(this.impl, arguments));\n };\n }\n\n function forwardImplMethod(constructor, name) {\n var original = document.implementation[name];\n constructor.prototype[name] = function() {\n return original.apply(this.impl, arguments);\n };\n }\n\n wrapImplMethod(DOMImplementation, 'createDocumentType');\n wrapImplMethod(DOMImplementation, 'createDocument');\n wrapImplMethod(DOMImplementation, 'createHTMLDocument');\n forwardImplMethod(DOMImplementation, 'hasFeature');\n\n registerWrapper(window.DOMImplementation, DOMImplementation);\n\n forwardMethodsToWrapper([\n window.DOMImplementation,\n ], [\n 'createDocumentType',\n 'createDocument',\n 'createHTMLDocument',\n 'hasFeature',\n ]);\n\n scope.adoptNodeNoRemove = adoptNodeNoRemove;\n scope.wrappers.DOMImplementation = DOMImplementation;\n scope.wrappers.Document = Document;\n\n})(window.ShadowDOMPolyfill);\n","// Copyright 2013 The Polymer Authors. All rights reserved.\n// Use of this source code is goverened by a BSD-style\n// license that can be found in the LICENSE file.\n\n(function(scope) {\n 'use strict';\n\n var EventTarget = scope.wrappers.EventTarget;\n var Selection = scope.wrappers.Selection;\n var mixin = scope.mixin;\n var registerWrapper = scope.registerWrapper;\n var renderAllPending = scope.renderAllPending;\n var unwrap = scope.unwrap;\n var unwrapIfNeeded = scope.unwrapIfNeeded;\n var wrap = scope.wrap;\n\n var OriginalWindow = window.Window;\n var originalGetComputedStyle = window.getComputedStyle;\n var originalGetSelection = window.getSelection;\n\n function Window(impl) {\n EventTarget.call(this, impl);\n }\n Window.prototype = Object.create(EventTarget.prototype);\n\n OriginalWindow.prototype.getComputedStyle = function(el, pseudo) {\n return wrap(this || window).getComputedStyle(unwrapIfNeeded(el), pseudo);\n };\n\n OriginalWindow.prototype.getSelection = function() {\n return wrap(this || window).getSelection();\n };\n\n // Work around for https://bugzilla.mozilla.org/show_bug.cgi?id=943065\n delete window.getComputedStyle;\n delete window.getSelection;\n\n ['addEventListener', 'removeEventListener', 'dispatchEvent'].forEach(\n function(name) {\n OriginalWindow.prototype[name] = function() {\n var w = wrap(this || window);\n return w[name].apply(w, arguments);\n };\n\n // Work around for https://bugzilla.mozilla.org/show_bug.cgi?id=943065\n delete window[name];\n });\n\n mixin(Window.prototype, {\n getComputedStyle: function(el, pseudo) {\n renderAllPending();\n return originalGetComputedStyle.call(unwrap(this), unwrapIfNeeded(el),\n pseudo);\n },\n getSelection: function() {\n renderAllPending();\n return new Selection(originalGetSelection.call(unwrap(this)));\n },\n\n get document() {\n return wrap(unwrap(this).document);\n }\n });\n\n registerWrapper(OriginalWindow, Window, window);\n\n scope.wrappers.Window = Window;\n\n})(window.ShadowDOMPolyfill);\n","/**\n * Copyright 2014 The Polymer Authors. All rights reserved.\n * Use of this source code is goverened by a BSD-style\n * license that can be found in the LICENSE file.\n */\n\n(function(scope) {\n 'use strict';\n\n var unwrap = scope.unwrap;\n\n // DataTransfer (Clipboard in old Blink/WebKit) has a single method that\n // requires wrapping. Since it is only a method we do not need a real wrapper,\n // we can just override the method.\n\n var OriginalDataTransfer = window.DataTransfer || window.Clipboard;\n var OriginalDataTransferSetDragImage =\n OriginalDataTransfer.prototype.setDragImage;\n\n if (OriginalDataTransferSetDragImage) {\n OriginalDataTransfer.prototype.setDragImage = function(image, x, y) {\n OriginalDataTransferSetDragImage.call(this, unwrap(image), x, y);\n };\n }\n\n})(window.ShadowDOMPolyfill);\n","/**\n * Copyright 2014 The Polymer Authors. All rights reserved.\n * Use of this source code is goverened by a BSD-style\n * license that can be found in the LICENSE file.\n */\n\n(function(scope) {\n 'use strict';\n\n var registerWrapper = scope.registerWrapper;\n var unwrap = scope.unwrap;\n\n var OriginalFormData = window.FormData;\n\n function FormData(formElement) {\n this.impl = new OriginalFormData(formElement && unwrap(formElement));\n }\n\n registerWrapper(OriginalFormData, FormData, new OriginalFormData());\n\n scope.wrappers.FormData = FormData;\n\n})(window.ShadowDOMPolyfill);\n","// Copyright 2013 The Polymer Authors. All rights reserved.\n// Use of this source code is goverened by a BSD-style\n// license that can be found in the LICENSE file.\n\n(function(scope) {\n 'use strict';\n\n var isWrapperFor = scope.isWrapperFor;\n\n // This is a list of the elements we currently override the global constructor\n // for.\n var elements = {\n 'a': 'HTMLAnchorElement',\n // Do not create an applet element by default since it shows a warning in\n // IE.\n // https://github.com/Polymer/polymer/issues/217\n // 'applet': 'HTMLAppletElement',\n 'area': 'HTMLAreaElement',\n 'audio': 'HTMLAudioElement',\n 'base': 'HTMLBaseElement',\n 'body': 'HTMLBodyElement',\n 'br': 'HTMLBRElement',\n 'button': 'HTMLButtonElement',\n 'canvas': 'HTMLCanvasElement',\n 'caption': 'HTMLTableCaptionElement',\n 'col': 'HTMLTableColElement',\n // 'command': 'HTMLCommandElement', // Not fully implemented in Gecko.\n 'content': 'HTMLContentElement',\n 'data': 'HTMLDataElement',\n 'datalist': 'HTMLDataListElement',\n 'del': 'HTMLModElement',\n 'dir': 'HTMLDirectoryElement',\n 'div': 'HTMLDivElement',\n 'dl': 'HTMLDListElement',\n 'embed': 'HTMLEmbedElement',\n 'fieldset': 'HTMLFieldSetElement',\n 'font': 'HTMLFontElement',\n 'form': 'HTMLFormElement',\n 'frame': 'HTMLFrameElement',\n 'frameset': 'HTMLFrameSetElement',\n 'h1': 'HTMLHeadingElement',\n 'head': 'HTMLHeadElement',\n 'hr': 'HTMLHRElement',\n 'html': 'HTMLHtmlElement',\n 'iframe': 'HTMLIFrameElement',\n 'img': 'HTMLImageElement',\n 'input': 'HTMLInputElement',\n 'keygen': 'HTMLKeygenElement',\n 'label': 'HTMLLabelElement',\n 'legend': 'HTMLLegendElement',\n 'li': 'HTMLLIElement',\n 'link': 'HTMLLinkElement',\n 'map': 'HTMLMapElement',\n 'marquee': 'HTMLMarqueeElement',\n 'menu': 'HTMLMenuElement',\n 'menuitem': 'HTMLMenuItemElement',\n 'meta': 'HTMLMetaElement',\n 'meter': 'HTMLMeterElement',\n 'object': 'HTMLObjectElement',\n 'ol': 'HTMLOListElement',\n 'optgroup': 'HTMLOptGroupElement',\n 'option': 'HTMLOptionElement',\n 'output': 'HTMLOutputElement',\n 'p': 'HTMLParagraphElement',\n 'param': 'HTMLParamElement',\n 'pre': 'HTMLPreElement',\n 'progress': 'HTMLProgressElement',\n 'q': 'HTMLQuoteElement',\n 'script': 'HTMLScriptElement',\n 'select': 'HTMLSelectElement',\n 'shadow': 'HTMLShadowElement',\n 'source': 'HTMLSourceElement',\n 'span': 'HTMLSpanElement',\n 'style': 'HTMLStyleElement',\n 'table': 'HTMLTableElement',\n 'tbody': 'HTMLTableSectionElement',\n // WebKit and Moz are wrong:\n // https://bugs.webkit.org/show_bug.cgi?id=111469\n // https://bugzilla.mozilla.org/show_bug.cgi?id=848096\n // 'td': 'HTMLTableCellElement',\n 'template': 'HTMLTemplateElement',\n 'textarea': 'HTMLTextAreaElement',\n 'thead': 'HTMLTableSectionElement',\n 'time': 'HTMLTimeElement',\n 'title': 'HTMLTitleElement',\n 'tr': 'HTMLTableRowElement',\n 'track': 'HTMLTrackElement',\n 'ul': 'HTMLUListElement',\n 'video': 'HTMLVideoElement',\n };\n\n function overrideConstructor(tagName) {\n var nativeConstructorName = elements[tagName];\n var nativeConstructor = window[nativeConstructorName];\n if (!nativeConstructor)\n return;\n var element = document.createElement(tagName);\n var wrapperConstructor = element.constructor;\n window[nativeConstructorName] = wrapperConstructor;\n }\n\n Object.keys(elements).forEach(overrideConstructor);\n\n Object.getOwnPropertyNames(scope.wrappers).forEach(function(name) {\n window[name] = scope.wrappers[name]\n });\n\n})(window.ShadowDOMPolyfill);\n","/*\n * Copyright (c) 2014 The Polymer Project Authors. All rights reserved.\n * This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt\n * The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt\n * The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt\n * Code distributed by Google as part of the polymer project is also\n * subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt\n */\n\n(function(scope) {\n\n // convenient global\n window.wrap = ShadowDOMPolyfill.wrapIfNeeded;\n window.unwrap = ShadowDOMPolyfill.unwrapIfNeeded;\n\n // users may want to customize other types\n // TODO(sjmiles): 'button' is now supported by ShadowDOMPolyfill, but\n // I've left this code here in case we need to temporarily patch another\n // type\n /*\n (function() {\n var elts = {HTMLButtonElement: 'button'};\n for (var c in elts) {\n window[c] = function() { throw 'Patched Constructor'; };\n window[c].prototype = Object.getPrototypeOf(\n document.createElement(elts[c]));\n }\n })();\n */\n\n // patch in prefixed name\n Object.defineProperty(Element.prototype, 'webkitShadowRoot',\n Object.getOwnPropertyDescriptor(Element.prototype, 'shadowRoot'));\n\n var originalCreateShadowRoot = Element.prototype.createShadowRoot;\n Element.prototype.createShadowRoot = function() {\n var root = originalCreateShadowRoot.call(this);\n CustomElements.watchShadow(this);\n return root;\n };\n\n Element.prototype.webkitCreateShadowRoot = Element.prototype.createShadowRoot;\n\n function queryShadow(node, selector) {\n var m, el = node.firstElementChild;\n var shadows, sr, i;\n shadows = [];\n sr = node.shadowRoot;\n while(sr) {\n shadows.push(sr);\n sr = sr.olderShadowRoot;\n }\n for(i = shadows.length - 1; i >= 0; i--) {\n m = shadows[i].querySelector(selector);\n if (m) {\n return m;\n }\n }\n while(el) {\n m = queryShadow(el, selector);\n if (m) {\n return m;\n }\n el = el.nextElementSibling;\n }\n return null;\n }\n\n function queryAllShadows(node, selector, results) {\n var el = node.firstElementChild;\n var temp, sr, shadows, i, j;\n shadows = [];\n sr = node.shadowRoot;\n while(sr) {\n shadows.push(sr);\n sr = sr.olderShadowRoot;\n }\n for (i = shadows.length - 1; i >= 0; i--) {\n temp = shadows[i].querySelectorAll(selector);\n for(j = 0; j < temp.length; j++) {\n results.push(temp[j]);\n }\n }\n while (el) {\n queryAllShadows(el, selector, results);\n el = el.nextElementSibling;\n }\n return results;\n }\n\n scope.queryAllShadows = function(node, selector, all) {\n if (all) {\n return queryAllShadows(node, selector, []);\n } else {\n return queryShadow(node, selector);\n }\n };\n})(window.Platform);\n","/*\n * Copyright (c) 2014 The Polymer Project Authors. All rights reserved.\n * This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt\n * The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt\n * The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt\n * Code distributed by Google as part of the polymer project is also\n * subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt\n */\n\n/*\n This is a limited shim for ShadowDOM css styling.\n https://dvcs.w3.org/hg/webcomponents/raw-file/tip/spec/shadow/index.html#styles\n \n The intention here is to support only the styling features which can be \n relatively simply implemented. The goal is to allow users to avoid the \n most obvious pitfalls and do so without compromising performance significantly. \n For ShadowDOM styling that's not covered here, a set of best practices\n can be provided that should allow users to accomplish more complex styling.\n\n The following is a list of specific ShadowDOM styling features and a brief\n discussion of the approach used to shim.\n\n Shimmed features:\n\n * :host, :host-context: ShadowDOM allows styling of the shadowRoot's host\n element using the :host rule. To shim this feature, the :host styles are \n reformatted and prefixed with a given scope name and promoted to a \n document level stylesheet.\n For example, given a scope name of .foo, a rule like this:\n \n :host {\n background: red;\n }\n }\n \n becomes:\n \n .foo {\n background: red;\n }\n \n * encapsultion: Styles defined within ShadowDOM, apply only to \n dom inside the ShadowDOM. Polymer uses one of two techniques to imlement\n this feature.\n \n By default, rules are prefixed with the host element tag name \n as a descendant selector. This ensures styling does not leak out of the 'top'\n of the element's ShadowDOM. For example,\n\n div {\n font-weight: bold;\n }\n \n becomes:\n\n x-foo div {\n font-weight: bold;\n }\n \n becomes:\n\n\n Alternatively, if Platform.ShadowCSS.strictStyling is set to true then \n selectors are scoped by adding an attribute selector suffix to each\n simple selector that contains the host element tag name. Each element \n in the element's ShadowDOM template is also given the scope attribute. \n Thus, these rules match only elements that have the scope attribute.\n For example, given a scope name of x-foo, a rule like this:\n \n div {\n font-weight: bold;\n }\n \n becomes:\n \n div[x-foo] {\n font-weight: bold;\n }\n\n Note that elements that are dynamically added to a scope must have the scope\n selector added to them manually.\n\n * upper/lower bound encapsulation: Styles which are defined outside a\n shadowRoot should not cross the ShadowDOM boundary and should not apply\n inside a shadowRoot.\n\n This styling behavior is not emulated. Some possible ways to do this that \n were rejected due to complexity and/or performance concerns include: (1) reset\n every possible property for every possible selector for a given scope name;\n (2) re-implement css in javascript.\n \n As an alternative, users should make sure to use selectors\n specific to the scope in which they are working.\n \n * ::distributed: This behavior is not emulated. It's often not necessary\n to style the contents of a specific insertion point and instead, descendants\n of the host element can be styled selectively. Users can also create an \n extra node around an insertion point and style that node's contents\n via descendent selectors. For example, with a shadowRoot like this:\n \n <style>\n ::content(div) {\n background: red;\n }\n </style>\n <content></content>\n \n could become:\n \n <style>\n / *@polyfill .content-container div * / \n ::content(div) {\n background: red;\n }\n </style>\n <div class=\"content-container\">\n <content></content>\n </div>\n \n Note the use of @polyfill in the comment above a ShadowDOM specific style\n declaration. This is a directive to the styling shim to use the selector \n in comments in lieu of the next selector when running under polyfill.\n*/\n(function(scope) {\n\nvar ShadowCSS = {\n strictStyling: false,\n registry: {},\n // Shim styles for a given root associated with a name and extendsName\n // 1. cache root styles by name\n // 2. optionally tag root nodes with scope name\n // 3. shim polyfill directives /* @polyfill */ and /* @polyfill-rule */\n // 4. shim :host and scoping\n shimStyling: function(root, name, extendsName) {\n var scopeStyles = this.prepareRoot(root, name, extendsName);\n var typeExtension = this.isTypeExtension(extendsName);\n var scopeSelector = this.makeScopeSelector(name, typeExtension);\n // use caching to make working with styles nodes easier and to facilitate\n // lookup of extendee\n var cssText = stylesToCssText(scopeStyles, true);\n cssText = this.scopeCssText(cssText, scopeSelector);\n // cache shimmed css on root for user extensibility\n if (root) {\n root.shimmedStyle = cssText;\n }\n // add style to document\n this.addCssToDocument(cssText, name);\n },\n /*\n * Shim a style element with the given selector. Returns cssText that can\n * be included in the document via Platform.ShadowCSS.addCssToDocument(css).\n */\n shimStyle: function(style, selector) {\n return this.shimCssText(style.textContent, selector);\n },\n /*\n * Shim some cssText with the given selector. Returns cssText that can\n * be included in the document via Platform.ShadowCSS.addCssToDocument(css).\n */\n shimCssText: function(cssText, selector) {\n cssText = this.insertDirectives(cssText);\n return this.scopeCssText(cssText, selector);\n },\n makeScopeSelector: function(name, typeExtension) {\n if (name) {\n return typeExtension ? '[is=' + name + ']' : name;\n }\n return '';\n },\n isTypeExtension: function(extendsName) {\n return extendsName && extendsName.indexOf('-') < 0;\n },\n prepareRoot: function(root, name, extendsName) {\n var def = this.registerRoot(root, name, extendsName);\n this.replaceTextInStyles(def.rootStyles, this.insertDirectives);\n // remove existing style elements\n this.removeStyles(root, def.rootStyles);\n // apply strict attr\n if (this.strictStyling) {\n this.applyScopeToContent(root, name);\n }\n return def.scopeStyles;\n },\n removeStyles: function(root, styles) {\n for (var i=0, l=styles.length, s; (i<l) && (s=styles[i]); i++) {\n s.parentNode.removeChild(s);\n }\n },\n registerRoot: function(root, name, extendsName) {\n var def = this.registry[name] = {\n root: root,\n name: name,\n extendsName: extendsName\n }\n var styles = this.findStyles(root);\n def.rootStyles = styles;\n def.scopeStyles = def.rootStyles;\n var extendee = this.registry[def.extendsName];\n if (extendee) {\n def.scopeStyles = extendee.scopeStyles.concat(def.scopeStyles);\n }\n return def;\n },\n findStyles: function(root) {\n if (!root) {\n return [];\n }\n var styles = root.querySelectorAll('style');\n return Array.prototype.filter.call(styles, function(s) {\n return !s.hasAttribute(NO_SHIM_ATTRIBUTE);\n });\n },\n applyScopeToContent: function(root, name) {\n if (root) {\n // add the name attribute to each node in root.\n Array.prototype.forEach.call(root.querySelectorAll('*'),\n function(node) {\n node.setAttribute(name, '');\n });\n // and template contents too\n Array.prototype.forEach.call(root.querySelectorAll('template'),\n function(template) {\n this.applyScopeToContent(template.content, name);\n },\n this);\n }\n },\n insertDirectives: function(cssText) {\n cssText = this.insertPolyfillDirectivesInCssText(cssText);\n return this.insertPolyfillRulesInCssText(cssText);\n },\n /*\n * Process styles to convert native ShadowDOM rules that will trip\n * up the css parser; we rely on decorating the stylesheet with inert rules.\n * \n * For example, we convert this rule:\n * \n * polyfill-next-selector { content: ':host menu-item'; }\n * ::content menu-item {\n * \n * to this:\n * \n * scopeName menu-item {\n *\n **/\n insertPolyfillDirectivesInCssText: function(cssText) {\n // TODO(sorvell): remove either content or comment\n cssText = cssText.replace(cssCommentNextSelectorRe, function(match, p1) {\n // remove end comment delimiter and add block start\n return p1.slice(0, -2) + '{';\n });\n return cssText.replace(cssContentNextSelectorRe, function(match, p1) {\n return p1 + ' {';\n });\n },\n /*\n * Process styles to add rules which will only apply under the polyfill\n * \n * For example, we convert this rule:\n * \n * polyfill-rule {\n * content: ':host menu-item';\n * ...\n * }\n * \n * to this:\n * \n * scopeName menu-item {...}\n *\n **/\n insertPolyfillRulesInCssText: function(cssText) {\n // TODO(sorvell): remove either content or comment\n cssText = cssText.replace(cssCommentRuleRe, function(match, p1) {\n // remove end comment delimiter\n return p1.slice(0, -1);\n });\n return cssText.replace(cssContentRuleRe, function(match, p1, p2, p3) {\n var rule = match.replace(p1, '').replace(p2, '');\n return p3 + rule;\n });\n },\n /* Ensure styles are scoped. Pseudo-scoping takes a rule like:\n * \n * .foo {... } \n * \n * and converts this to\n * \n * scopeName .foo { ... }\n */\n scopeCssText: function(cssText, scopeSelector) {\n var unscoped = this.extractUnscopedRulesFromCssText(cssText);\n cssText = this.insertPolyfillHostInCssText(cssText);\n cssText = this.convertColonHost(cssText);\n cssText = this.convertColonHostContext(cssText);\n cssText = this.convertShadowDOMSelectors(cssText);\n if (scopeSelector) {\n var self = this, cssText;\n withCssRules(cssText, function(rules) {\n cssText = self.scopeRules(rules, scopeSelector);\n });\n\n }\n cssText = cssText + '\\n' + unscoped;\n return cssText.trim();\n },\n /*\n * Process styles to add rules which will only apply under the polyfill\n * and do not process via CSSOM. (CSSOM is destructive to rules on rare \n * occasions, e.g. -webkit-calc on Safari.)\n * For example, we convert this rule:\n * \n * (comment start) @polyfill-unscoped-rule menu-item { \n * ... } (comment end)\n * \n * to this:\n * \n * menu-item {...}\n *\n **/\n extractUnscopedRulesFromCssText: function(cssText) {\n // TODO(sorvell): remove either content or comment\n var r = '', m;\n while (m = cssCommentUnscopedRuleRe.exec(cssText)) {\n r += m[1].slice(0, -1) + '\\n\\n';\n }\n while (m = cssContentUnscopedRuleRe.exec(cssText)) {\n r += m[0].replace(m[2], '').replace(m[1], m[3]) + '\\n\\n';\n }\n return r;\n },\n /*\n * convert a rule like :host(.foo) > .bar { }\n *\n * to\n *\n * scopeName.foo > .bar\n */\n convertColonHost: function(cssText) {\n return this.convertColonRule(cssText, cssColonHostRe,\n this.colonHostPartReplacer);\n },\n /*\n * convert a rule like :host-context(.foo) > .bar { }\n *\n * to\n *\n * scopeName.foo > .bar, .foo scopeName > .bar { }\n * \n * and\n *\n * :host-context(.foo:host) .bar { ... }\n * \n * to\n * \n * scopeName.foo .bar { ... }\n */\n convertColonHostContext: function(cssText) {\n return this.convertColonRule(cssText, cssColonHostContextRe,\n this.colonHostContextPartReplacer);\n },\n convertColonRule: function(cssText, regExp, partReplacer) {\n // p1 = :host, p2 = contents of (), p3 rest of rule\n return cssText.replace(regExp, function(m, p1, p2, p3) {\n p1 = polyfillHostNoCombinator;\n if (p2) {\n var parts = p2.split(','), r = [];\n for (var i=0, l=parts.length, p; (i<l) && (p=parts[i]); i++) {\n p = p.trim();\n r.push(partReplacer(p1, p, p3));\n }\n return r.join(',');\n } else {\n return p1 + p3;\n }\n });\n },\n colonHostContextPartReplacer: function(host, part, suffix) {\n if (part.match(polyfillHost)) {\n return this.colonHostPartReplacer(host, part, suffix);\n } else {\n return host + part + suffix + ', ' + part + ' ' + host + suffix;\n }\n },\n colonHostPartReplacer: function(host, part, suffix) {\n return host + part.replace(polyfillHost, '') + suffix;\n },\n /*\n * Convert combinators like ::shadow and pseudo-elements like ::content\n * by replacing with space.\n */\n convertShadowDOMSelectors: function(cssText) {\n for (var i=0; i < shadowDOMSelectorsRe.length; i++) {\n cssText = cssText.replace(shadowDOMSelectorsRe[i], ' ');\n }\n return cssText;\n },\n // change a selector like 'div' to 'name div'\n scopeRules: function(cssRules, scopeSelector) {\n var cssText = '';\n if (cssRules) {\n Array.prototype.forEach.call(cssRules, function(rule) {\n if (rule.selectorText && (rule.style && rule.style.cssText !== undefined)) {\n cssText += this.scopeSelector(rule.selectorText, scopeSelector, \n this.strictStyling) + ' {\\n\\t';\n cssText += this.propertiesFromRule(rule) + '\\n}\\n\\n';\n } else if (rule.type === CSSRule.MEDIA_RULE) {\n cssText += '@media ' + rule.media.mediaText + ' {\\n';\n cssText += this.scopeRules(rule.cssRules, scopeSelector);\n cssText += '\\n}\\n\\n';\n } else {\n // TODO(sjmiles): KEYFRAMES_RULE in IE11 throws when we query cssText\n // 'cssText' in rule returns true, but rule.cssText throws anyway\n // We can test the rule type, e.g.\n // else if (rule.type !== CSSRule.KEYFRAMES_RULE && rule.cssText) {\n // but this will prevent cssText propagation in other browsers which\n // support it.\n // KEYFRAMES_RULE has a CSSRuleSet, so the text can probably be reconstructed\n // from that collection; this would be a proper fix.\n // For now, I'm trapping the exception so IE11 is unblocked in other areas.\n try {\n if (rule.cssText) {\n cssText += rule.cssText + '\\n\\n';\n }\n } catch(x) {\n // squelch\n }\n }\n }, this);\n }\n return cssText;\n },\n scopeSelector: function(selector, scopeSelector, strict) {\n var r = [], parts = selector.split(',');\n parts.forEach(function(p) {\n p = p.trim();\n if (this.selectorNeedsScoping(p, scopeSelector)) {\n p = (strict && !p.match(polyfillHostNoCombinator)) ? \n this.applyStrictSelectorScope(p, scopeSelector) :\n this.applySelectorScope(p, scopeSelector);\n }\n r.push(p);\n }, this);\n return r.join(', ');\n },\n selectorNeedsScoping: function(selector, scopeSelector) {\n if (Array.isArray(scopeSelector)) {\n return true;\n }\n var re = this.makeScopeMatcher(scopeSelector);\n return !selector.match(re);\n },\n makeScopeMatcher: function(scopeSelector) {\n scopeSelector = scopeSelector.replace(/\\[/g, '\\\\[').replace(/\\[/g, '\\\\]');\n return new RegExp('^(' + scopeSelector + ')' + selectorReSuffix, 'm');\n },\n applySelectorScope: function(selector, selectorScope) {\n return Array.isArray(selectorScope) ?\n this.applySelectorScopeList(selector, selectorScope) :\n this.applySimpleSelectorScope(selector, selectorScope);\n },\n // apply an array of selectors\n applySelectorScopeList: function(selector, scopeSelectorList) {\n var r = [];\n for (var i=0, s; (s=scopeSelectorList[i]); i++) {\n r.push(this.applySimpleSelectorScope(selector, s));\n }\n return r.join(', ');\n },\n // scope via name and [is=name]\n applySimpleSelectorScope: function(selector, scopeSelector) {\n if (selector.match(polyfillHostRe)) {\n selector = selector.replace(polyfillHostNoCombinator, scopeSelector);\n return selector.replace(polyfillHostRe, scopeSelector + ' ');\n } else {\n return scopeSelector + ' ' + selector;\n }\n },\n // return a selector with [name] suffix on each simple selector\n // e.g. .foo.bar > .zot becomes .foo[name].bar[name] > .zot[name]\n applyStrictSelectorScope: function(selector, scopeSelector) {\n scopeSelector = scopeSelector.replace(/\\[is=([^\\]]*)\\]/g, '$1');\n var splits = [' ', '>', '+', '~'],\n scoped = selector,\n attrName = '[' + scopeSelector + ']';\n splits.forEach(function(sep) {\n var parts = scoped.split(sep);\n scoped = parts.map(function(p) {\n // remove :host since it should be unnecessary\n var t = p.trim().replace(polyfillHostRe, '');\n if (t && (splits.indexOf(t) < 0) && (t.indexOf(attrName) < 0)) {\n p = t.replace(/([^:]*)(:*)(.*)/, '$1' + attrName + '$2$3')\n }\n return p;\n }).join(sep);\n });\n return scoped;\n },\n insertPolyfillHostInCssText: function(selector) {\n return selector.replace(colonHostContextRe, polyfillHostContext).replace(\n colonHostRe, polyfillHost);\n },\n propertiesFromRule: function(rule) {\n var cssText = rule.style.cssText;\n // TODO(sorvell): Safari cssom incorrectly removes quotes from the content\n // property. (https://bugs.webkit.org/show_bug.cgi?id=118045)\n // don't replace attr rules\n if (rule.style.content && !rule.style.content.match(/['\"]+|attr/)) {\n cssText = cssText.replace(/content:[^;]*;/g, 'content: \\'' + \n rule.style.content + '\\';');\n }\n // TODO(sorvell): we can workaround this issue here, but we need a list\n // of troublesome properties to fix https://github.com/Polymer/platform/issues/53\n //\n // inherit rules can be omitted from cssText\n // TODO(sorvell): remove when Blink bug is fixed:\n // https://code.google.com/p/chromium/issues/detail?id=358273\n var style = rule.style;\n for (var i in style) {\n if (style[i] === 'initial') {\n cssText += i + ': initial; ';\n }\n }\n return cssText;\n },\n replaceTextInStyles: function(styles, action) {\n if (styles && action) {\n if (!(styles instanceof Array)) {\n styles = [styles];\n }\n Array.prototype.forEach.call(styles, function(s) {\n s.textContent = action.call(this, s.textContent);\n }, this);\n }\n },\n addCssToDocument: function(cssText, name) {\n if (cssText.match('@import')) {\n addOwnSheet(cssText, name);\n } else {\n addCssToDocument(cssText);\n }\n }\n};\n\nvar selectorRe = /([^{]*)({[\\s\\S]*?})/gim,\n cssCommentRe = /\\/\\*[^*]*\\*+([^/*][^*]*\\*+)*\\//gim,\n // TODO(sorvell): remove either content or comment\n cssCommentNextSelectorRe = /\\/\\*\\s*@polyfill ([^*]*\\*+([^/*][^*]*\\*+)*\\/)([^{]*?){/gim,\n cssContentNextSelectorRe = /polyfill-next-selector[^}]*content\\:[\\s]*['|\"]([^'\"]*)['|\"][^}]*}([^{]*?){/gim,\n // TODO(sorvell): remove either content or comment\n cssCommentRuleRe = /\\/\\*\\s@polyfill-rule([^*]*\\*+([^/*][^*]*\\*+)*)\\//gim,\n cssContentRuleRe = /(polyfill-rule)[^}]*(content\\:[\\s]*['|\"]([^'\"]*)['|\"][^;]*;)[^}]*}/gim,\n // TODO(sorvell): remove either content or comment\n cssCommentUnscopedRuleRe = /\\/\\*\\s@polyfill-unscoped-rule([^*]*\\*+([^/*][^*]*\\*+)*)\\//gim,\n cssContentUnscopedRuleRe = /(polyfill-unscoped-rule)[^}]*(content\\:[\\s]*['|\"]([^'\"]*)['|\"][^;]*;)[^}]*}/gim,\n cssPseudoRe = /::(x-[^\\s{,(]*)/gim,\n cssPartRe = /::part\\(([^)]*)\\)/gim,\n // note: :host pre-processed to -shadowcsshost.\n polyfillHost = '-shadowcsshost',\n // note: :host-context pre-processed to -shadowcsshostcontext.\n polyfillHostContext = '-shadowcsscontext',\n parenSuffix = ')(?:\\\\((' +\n '(?:\\\\([^)(]*\\\\)|[^)(]*)+?' +\n ')\\\\))?([^,{]*)';\n cssColonHostRe = new RegExp('(' + polyfillHost + parenSuffix, 'gim'),\n cssColonHostContextRe = new RegExp('(' + polyfillHostContext + parenSuffix, 'gim'),\n selectorReSuffix = '([>\\\\s~+\\[.,{:][\\\\s\\\\S]*)?$',\n colonHostRe = /\\:host/gim,\n colonHostContextRe = /\\:host-context/gim,\n /* host name without combinator */\n polyfillHostNoCombinator = polyfillHost + '-no-combinator',\n polyfillHostRe = new RegExp(polyfillHost, 'gim'),\n polyfillHostContextRe = new RegExp(polyfillHostContext, 'gim'),\n shadowDOMSelectorsRe = [\n /\\^\\^/g,\n /\\^/g,\n /\\/shadow\\//g,\n /\\/shadow-deep\\//g,\n /::shadow/g,\n /\\/deep\\//g,\n /::content/g\n ];\n\nfunction stylesToCssText(styles, preserveComments) {\n var cssText = '';\n Array.prototype.forEach.call(styles, function(s) {\n cssText += s.textContent + '\\n\\n';\n });\n // strip comments for easier processing\n if (!preserveComments) {\n cssText = cssText.replace(cssCommentRe, '');\n }\n return cssText;\n}\n\nfunction cssTextToStyle(cssText) {\n var style = document.createElement('style');\n style.textContent = cssText;\n return style;\n}\n\nfunction cssToRules(cssText) {\n var style = cssTextToStyle(cssText);\n document.head.appendChild(style);\n var rules = [];\n if (style.sheet) {\n // TODO(sorvell): Firefox throws when accessing the rules of a stylesheet\n // with an @import\n // https://bugzilla.mozilla.org/show_bug.cgi?id=625013\n try {\n rules = style.sheet.cssRules;\n } catch(e) {\n //\n }\n } else {\n console.warn('sheet not found', style);\n }\n style.parentNode.removeChild(style);\n return rules;\n}\n\nvar frame = document.createElement('iframe');\nframe.style.display = 'none';\n\nfunction initFrame() {\n frame.initialized = true;\n document.body.appendChild(frame);\n var doc = frame.contentDocument;\n var base = doc.createElement('base');\n base.href = document.baseURI;\n doc.head.appendChild(base);\n}\n\nfunction inFrame(fn) {\n if (!frame.initialized) {\n initFrame();\n }\n document.body.appendChild(frame);\n fn(frame.contentDocument);\n document.body.removeChild(frame);\n}\n\n// TODO(sorvell): use an iframe if the cssText contains an @import to workaround\n// https://code.google.com/p/chromium/issues/detail?id=345114\nvar isChrome = navigator.userAgent.match('Chrome');\nfunction withCssRules(cssText, callback) {\n if (!callback) {\n return;\n }\n var rules;\n if (cssText.match('@import') && isChrome) {\n var style = cssTextToStyle(cssText);\n inFrame(function(doc) {\n doc.head.appendChild(style.impl);\n rules = style.sheet.cssRules;\n callback(rules);\n });\n } else {\n rules = cssToRules(cssText);\n callback(rules);\n }\n}\n\nfunction rulesToCss(cssRules) {\n for (var i=0, css=[]; i < cssRules.length; i++) {\n css.push(cssRules[i].cssText);\n }\n return css.join('\\n\\n');\n}\n\nfunction addCssToDocument(cssText) {\n if (cssText) {\n getSheet().appendChild(document.createTextNode(cssText));\n }\n}\n\nfunction addOwnSheet(cssText, name) {\n var style = cssTextToStyle(cssText);\n style.setAttribute(name, '');\n style.setAttribute(SHIMMED_ATTRIBUTE, '');\n document.head.appendChild(style);\n}\n\nvar SHIM_ATTRIBUTE = 'shim-shadowdom';\nvar SHIMMED_ATTRIBUTE = 'shim-shadowdom-css';\nvar NO_SHIM_ATTRIBUTE = 'no-shim';\n\nvar sheet;\nfunction getSheet() {\n if (!sheet) {\n sheet = document.createElement(\"style\");\n sheet.setAttribute(SHIMMED_ATTRIBUTE, '');\n sheet[SHIMMED_ATTRIBUTE] = true;\n }\n return sheet;\n}\n\n// add polyfill stylesheet to document\nif (window.ShadowDOMPolyfill) {\n addCssToDocument('style { display: none !important; }\\n');\n var doc = wrap(document);\n var head = doc.querySelector('head');\n head.insertBefore(getSheet(), head.childNodes[0]);\n\n // TODO(sorvell): monkey-patching HTMLImports is abusive;\n // consider a better solution.\n document.addEventListener('DOMContentLoaded', function() {\n var urlResolver = scope.urlResolver;\n \n if (window.HTMLImports && !HTMLImports.useNative) {\n var SHIM_SHEET_SELECTOR = 'link[rel=stylesheet]' +\n '[' + SHIM_ATTRIBUTE + ']';\n var SHIM_STYLE_SELECTOR = 'style[' + SHIM_ATTRIBUTE + ']';\n HTMLImports.importer.documentPreloadSelectors += ',' + SHIM_SHEET_SELECTOR;\n HTMLImports.importer.importsPreloadSelectors += ',' + SHIM_SHEET_SELECTOR;\n\n HTMLImports.parser.documentSelectors = [\n HTMLImports.parser.documentSelectors,\n SHIM_SHEET_SELECTOR,\n SHIM_STYLE_SELECTOR\n ].join(',');\n \n var originalParseGeneric = HTMLImports.parser.parseGeneric;\n\n HTMLImports.parser.parseGeneric = function(elt) {\n if (elt[SHIMMED_ATTRIBUTE]) {\n return;\n }\n var style = elt.__importElement || elt;\n if (!style.hasAttribute(SHIM_ATTRIBUTE)) {\n originalParseGeneric.call(this, elt);\n return;\n }\n if (elt.__resource) {\n style = elt.ownerDocument.createElement('style');\n style.textContent = urlResolver.resolveCssText(\n elt.__resource, elt.href);\n } else {\n urlResolver.resolveStyle(style); \n }\n style.textContent = ShadowCSS.shimStyle(style);\n style.removeAttribute(SHIM_ATTRIBUTE, '');\n style.setAttribute(SHIMMED_ATTRIBUTE, '');\n style[SHIMMED_ATTRIBUTE] = true;\n // place in document\n if (style.parentNode !== head) {\n // replace links in head\n if (elt.parentNode === head) {\n head.replaceChild(style, elt);\n } else {\n head.appendChild(style);\n }\n }\n style.__importParsed = true;\n this.markParsingComplete(elt);\n this.parseNext();\n }\n\n var hasResource = HTMLImports.parser.hasResource;\n HTMLImports.parser.hasResource = function(node) {\n if (node.localName === 'link' && node.rel === 'stylesheet' &&\n node.hasAttribute(SHIM_ATTRIBUTE)) {\n return (node.__resource);\n } else {\n return hasResource.call(this, node);\n }\n }\n\n }\n });\n}\n\n// exports\nscope.ShadowCSS = ShadowCSS;\n\n})(window.Platform);\n","/*\n * Copyright (c) 2014 The Polymer Project Authors. All rights reserved.\n * This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt\n * The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt\n * The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt\n * Code distributed by Google as part of the polymer project is also\n * subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt\n */\n\n(function(scope) {\n\n // so we can call wrap/unwrap without testing for ShadowDOMPolyfill\n window.wrap = window.unwrap = function(n){\n return n;\n }\n\n addEventListener('DOMContentLoaded', function() {\n if (CustomElements.useNative === false) {\n var originalCreateShadowRoot = Element.prototype.createShadowRoot;\n Element.prototype.createShadowRoot = function() {\n var root = originalCreateShadowRoot.call(this);\n CustomElements.watchShadow(this);\n return root;\n };\n }\n });\n\n Platform.templateContent = function(inTemplate) {\n // if MDV exists, it may need to boostrap this template to reveal content\n if (window.HTMLTemplateElement && HTMLTemplateElement.bootstrap) {\n HTMLTemplateElement.bootstrap(inTemplate);\n }\n // fallback when there is no Shadow DOM polyfill, no MDV polyfill, and no\n // native template support\n if (!inTemplate.content && !inTemplate._content) {\n var frag = document.createDocumentFragment();\n while (inTemplate.firstChild) {\n frag.appendChild(inTemplate.firstChild);\n }\n inTemplate._content = frag;\n }\n return inTemplate.content || inTemplate._content;\n };\n\n})(window.Platform);\n","/* Any copyright is dedicated to the Public Domain.\n * http://creativecommons.org/publicdomain/zero/1.0/ */\n\n(function(scope) {\n 'use strict';\n\n // feature detect for URL constructor\n var hasWorkingUrl = false;\n if (!scope.forceJURL) {\n try {\n var u = new URL('b', 'http://a');\n hasWorkingUrl = u.href === 'http://a/b';\n } catch(e) {}\n }\n\n if (hasWorkingUrl)\n return;\n\n var relative = Object.create(null);\n relative['ftp'] = 21;\n relative['file'] = 0;\n relative['gopher'] = 70;\n relative['http'] = 80;\n relative['https'] = 443;\n relative['ws'] = 80;\n relative['wss'] = 443;\n\n var relativePathDotMapping = Object.create(null);\n relativePathDotMapping['%2e'] = '.';\n relativePathDotMapping['.%2e'] = '..';\n relativePathDotMapping['%2e.'] = '..';\n relativePathDotMapping['%2e%2e'] = '..';\n\n function isRelativeScheme(scheme) {\n return relative[scheme] !== undefined;\n }\n\n function invalid() {\n clear.call(this);\n this._isInvalid = true;\n }\n\n function IDNAToASCII(h) {\n if ('' == h) {\n invalid.call(this)\n }\n // XXX\n return h.toLowerCase()\n }\n\n function percentEscape(c) {\n var unicode = c.charCodeAt(0);\n if (unicode > 0x20 &&\n unicode < 0x7F &&\n // \" # < > ? `\n [0x22, 0x23, 0x3C, 0x3E, 0x3F, 0x60].indexOf(unicode) == -1\n ) {\n return c;\n }\n return encodeURIComponent(c);\n }\n\n function percentEscapeQuery(c) {\n // XXX This actually needs to encode c using encoding and then\n // convert the bytes one-by-one.\n\n var unicode = c.charCodeAt(0);\n if (unicode > 0x20 &&\n unicode < 0x7F &&\n // \" # < > ` (do not escape '?')\n [0x22, 0x23, 0x3C, 0x3E, 0x60].indexOf(unicode) == -1\n ) {\n return c;\n }\n return encodeURIComponent(c);\n }\n\n var EOF = undefined,\n ALPHA = /[a-zA-Z]/,\n ALPHANUMERIC = /[a-zA-Z0-9\\+\\-\\.]/;\n\n function parse(input, stateOverride, base) {\n function err(message) {\n errors.push(message)\n }\n\n var state = stateOverride || 'scheme start',\n cursor = 0,\n buffer = '',\n seenAt = false,\n seenBracket = false,\n errors = [];\n\n loop: while ((input[cursor - 1] != EOF || cursor == 0) && !this._isInvalid) {\n var c = input[cursor];\n switch (state) {\n case 'scheme start':\n if (c && ALPHA.test(c)) {\n buffer += c.toLowerCase(); // ASCII-safe\n state = 'scheme';\n } else if (!stateOverride) {\n buffer = '';\n state = 'no scheme';\n continue;\n } else {\n err('Invalid scheme.');\n break loop;\n }\n break;\n\n case 'scheme':\n if (c && ALPHANUMERIC.test(c)) {\n buffer += c.toLowerCase(); // ASCII-safe\n } else if (':' == c) {\n this._scheme = buffer;\n buffer = '';\n if (stateOverride) {\n break loop;\n }\n if (isRelativeScheme(this._scheme)) {\n this._isRelative = true;\n }\n if ('file' == this._scheme) {\n state = 'relative';\n } else if (this._isRelative && base && base._scheme == this._scheme) {\n state = 'relative or authority';\n } else if (this._isRelative) {\n state = 'authority first slash';\n } else {\n state = 'scheme data';\n }\n } else if (!stateOverride) {\n buffer = '';\n cursor = 0;\n state = 'no scheme';\n continue;\n } else if (EOF == c) {\n break loop;\n } else {\n err('Code point not allowed in scheme: ' + c)\n break loop;\n }\n break;\n\n case 'scheme data':\n if ('?' == c) {\n query = '?';\n state = 'query';\n } else if ('#' == c) {\n this._fragment = '#';\n state = 'fragment';\n } else {\n // XXX error handling\n if (EOF != c && '\\t' != c && '\\n' != c && '\\r' != c) {\n this._schemeData += percentEscape(c);\n }\n }\n break;\n\n case 'no scheme':\n if (!base || !(isRelativeScheme(base._scheme))) {\n err('Missing scheme.');\n invalid.call(this);\n } else {\n state = 'relative';\n continue;\n }\n break;\n\n case 'relative or authority':\n if ('/' == c && '/' == input[cursor+1]) {\n state = 'authority ignore slashes';\n } else {\n err('Expected /, got: ' + c);\n state = 'relative';\n continue\n }\n break;\n\n case 'relative':\n this._isRelative = true;\n if ('file' != this._scheme)\n this._scheme = base._scheme;\n if (EOF == c) {\n this._host = base._host;\n this._port = base._port;\n this._path = base._path.slice();\n this._query = base._query;\n break loop;\n } else if ('/' == c || '\\\\' == c) {\n if ('\\\\' == c)\n err('\\\\ is an invalid code point.');\n state = 'relative slash';\n } else if ('?' == c) {\n this._host = base._host;\n this._port = base._port;\n this._path = base._path.slice();\n this._query = '?';\n state = 'query';\n } else if ('#' == c) {\n this._host = base._host;\n this._port = base._port;\n this._path = base._path.slice();\n this._query = base._query;\n this._fragment = '#';\n state = 'fragment';\n } else {\n var nextC = input[cursor+1]\n var nextNextC = input[cursor+2]\n if (\n 'file' != this._scheme || !ALPHA.test(c) ||\n (nextC != ':' && nextC != '|') ||\n (EOF != nextNextC && '/' != nextNextC && '\\\\' != nextNextC && '?' != nextNextC && '#' != nextNextC)) {\n this._host = base._host;\n this._port = base._port;\n this._path = base._path.slice();\n this._path.pop();\n }\n state = 'relative path';\n continue;\n }\n break;\n\n case 'relative slash':\n if ('/' == c || '\\\\' == c) {\n if ('\\\\' == c) {\n err('\\\\ is an invalid code point.');\n }\n if ('file' == this._scheme) {\n state = 'file host';\n } else {\n state = 'authority ignore slashes';\n }\n } else {\n if ('file' != this._scheme) {\n this._host = base._host;\n this._port = base._port;\n }\n state = 'relative path';\n continue;\n }\n break;\n\n case 'authority first slash':\n if ('/' == c) {\n state = 'authority second slash';\n } else {\n err(\"Expected '/', got: \" + c);\n state = 'authority ignore slashes';\n continue;\n }\n break;\n\n case 'authority second slash':\n state = 'authority ignore slashes';\n if ('/' != c) {\n err(\"Expected '/', got: \" + c);\n continue;\n }\n break;\n\n case 'authority ignore slashes':\n if ('/' != c && '\\\\' != c) {\n state = 'authority';\n continue;\n } else {\n err('Expected authority, got: ' + c);\n }\n break;\n\n case 'authority':\n if ('@' == c) {\n if (seenAt) {\n err('@ already seen.');\n buffer += '%40';\n }\n seenAt = true;\n for (var i = 0; i < buffer.length; i++) {\n var cp = buffer[i];\n if ('\\t' == cp || '\\n' == cp || '\\r' == cp) {\n err('Invalid whitespace in authority.');\n continue;\n }\n // XXX check URL code points\n if (':' == cp && null === this._password) {\n this._password = '';\n continue;\n }\n var tempC = percentEscape(cp);\n (null !== this._password) ? this._password += tempC : this._username += tempC;\n }\n buffer = '';\n } else if (EOF == c || '/' == c || '\\\\' == c || '?' == c || '#' == c) {\n cursor -= buffer.length;\n buffer = '';\n state = 'host';\n continue;\n } else {\n buffer += c;\n }\n break;\n\n case 'file host':\n if (EOF == c || '/' == c || '\\\\' == c || '?' == c || '#' == c) {\n if (buffer.length == 2 && ALPHA.test(buffer[0]) && (buffer[1] == ':' || buffer[1] == '|')) {\n state = 'relative path';\n } else if (buffer.length == 0) {\n state = 'relative path start';\n } else {\n this._host = IDNAToASCII.call(this, buffer);\n buffer = '';\n state = 'relative path start';\n }\n continue;\n } else if ('\\t' == c || '\\n' == c || '\\r' == c) {\n err('Invalid whitespace in file host.');\n } else {\n buffer += c;\n }\n break;\n\n case 'host':\n case 'hostname':\n if (':' == c && !seenBracket) {\n // XXX host parsing\n this._host = IDNAToASCII.call(this, buffer);\n buffer = '';\n state = 'port';\n if ('hostname' == stateOverride) {\n break loop;\n }\n } else if (EOF == c || '/' == c || '\\\\' == c || '?' == c || '#' == c) {\n this._host = IDNAToASCII.call(this, buffer);\n buffer = '';\n state = 'relative path start';\n if (stateOverride) {\n break loop;\n }\n continue;\n } else if ('\\t' != c && '\\n' != c && '\\r' != c) {\n if ('[' == c) {\n seenBracket = true;\n } else if (']' == c) {\n seenBracket = false;\n }\n buffer += c;\n } else {\n err('Invalid code point in host/hostname: ' + c);\n }\n break;\n\n case 'port':\n if (/[0-9]/.test(c)) {\n buffer += c;\n } else if (EOF == c || '/' == c || '\\\\' == c || '?' == c || '#' == c || stateOverride) {\n if ('' != buffer) {\n var temp = parseInt(buffer, 10);\n if (temp != relative[this._scheme]) {\n this._port = temp + '';\n }\n buffer = '';\n }\n if (stateOverride) {\n break loop;\n }\n state = 'relative path start';\n continue;\n } else if ('\\t' == c || '\\n' == c || '\\r' == c) {\n err('Invalid code point in port: ' + c);\n } else {\n invalid.call(this);\n }\n break;\n\n case 'relative path start':\n if ('\\\\' == c)\n err(\"'\\\\' not allowed in path.\");\n state = 'relative path';\n if ('/' != c && '\\\\' != c) {\n continue;\n }\n break;\n\n case 'relative path':\n if (EOF == c || '/' == c || '\\\\' == c || (!stateOverride && ('?' == c || '#' == c))) {\n if ('\\\\' == c) {\n err('\\\\ not allowed in relative path.');\n }\n var tmp;\n if (tmp = relativePathDotMapping[buffer.toLowerCase()]) {\n buffer = tmp;\n }\n if ('..' == buffer) {\n this._path.pop();\n if ('/' != c && '\\\\' != c) {\n this._path.push('');\n }\n } else if ('.' == buffer && '/' != c && '\\\\' != c) {\n this._path.push('');\n } else if ('.' != buffer) {\n if ('file' == this._scheme && this._path.length == 0 && buffer.length == 2 && ALPHA.test(buffer[0]) && buffer[1] == '|') {\n buffer = buffer[0] + ':';\n }\n this._path.push(buffer);\n }\n buffer = '';\n if ('?' == c) {\n this._query = '?';\n state = 'query';\n } else if ('#' == c) {\n this._fragment = '#';\n state = 'fragment';\n }\n } else if ('\\t' != c && '\\n' != c && '\\r' != c) {\n buffer += percentEscape(c);\n }\n break;\n\n case 'query':\n if (!stateOverride && '#' == c) {\n this._fragment = '#';\n state = 'fragment';\n } else if (EOF != c && '\\t' != c && '\\n' != c && '\\r' != c) {\n this._query += percentEscapeQuery(c);\n }\n break;\n\n case 'fragment':\n if (EOF != c && '\\t' != c && '\\n' != c && '\\r' != c) {\n this._fragment += c;\n }\n break;\n }\n\n cursor++;\n }\n }\n\n function clear() {\n this._scheme = '';\n this._schemeData = '';\n this._username = '';\n this._password = null;\n this._host = '';\n this._port = '';\n this._path = [];\n this._query = '';\n this._fragment = '';\n this._isInvalid = false;\n this._isRelative = false;\n }\n\n // Does not process domain names or IP addresses.\n // Does not handle encoding for the query parameter.\n function jURL(url, base /* , encoding */) {\n if (base !== undefined && !(base instanceof jURL))\n base = new jURL(String(base));\n\n this._url = url;\n clear.call(this);\n\n var input = url.replace(/^[ \\t\\r\\n\\f]+|[ \\t\\r\\n\\f]+$/g, '');\n // encoding = encoding || 'utf-8'\n\n parse.call(this, input, null, base);\n }\n\n jURL.prototype = {\n get href() {\n if (this._isInvalid)\n return this._url;\n\n var authority = '';\n if ('' != this._username || null != this._password) {\n authority = this._username +\n (null != this._password ? ':' + this._password : '') + '@';\n }\n\n return this.protocol +\n (this._isRelative ? '//' + authority + this.host : '') +\n this.pathname + this._query + this._fragment;\n },\n set href(href) {\n clear.call(this);\n parse.call(this, href);\n },\n\n get protocol() {\n return this._scheme + ':';\n },\n set protocol(protocol) {\n if (this._isInvalid)\n return;\n parse.call(this, protocol + ':', 'scheme start');\n },\n\n get host() {\n return this._isInvalid ? '' : this._port ?\n this._host + ':' + this._port : this._host;\n },\n set host(host) {\n if (this._isInvalid || !this._isRelative)\n return;\n parse.call(this, host, 'host');\n },\n\n get hostname() {\n return this._host;\n },\n set hostname(hostname) {\n if (this._isInvalid || !this._isRelative)\n return;\n parse.call(this, hostname, 'hostname');\n },\n\n get port() {\n return this._port;\n },\n set port(port) {\n if (this._isInvalid || !this._isRelative)\n return;\n parse.call(this, port, 'port');\n },\n\n get pathname() {\n return this._isInvalid ? '' : this._isRelative ?\n '/' + this._path.join('/') : this._schemeData;\n },\n set pathname(pathname) {\n if (this._isInvalid || !this._isRelative)\n return;\n this._path = [];\n parse.call(this, pathname, 'relative path start');\n },\n\n get search() {\n return this._isInvalid || !this._query || '?' == this._query ?\n '' : this._query;\n },\n set search(search) {\n if (this._isInvalid || !this._isRelative)\n return;\n this._query = '?';\n if ('?' == search[0])\n search = search.slice(1);\n parse.call(this, search, 'query');\n },\n\n get hash() {\n return this._isInvalid || !this._fragment || '#' == this._fragment ?\n '' : this._fragment;\n },\n set hash(hash) {\n if (this._isInvalid)\n return;\n this._fragment = '#';\n if ('#' == hash[0])\n hash = hash.slice(1);\n parse.call(this, hash, 'fragment');\n }\n };\n\n scope.URL = jURL;\n\n})(window);\n","/*\n * Copyright (c) 2014 The Polymer Project Authors. All rights reserved.\n * This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt\n * The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt\n * The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt\n * Code distributed by Google as part of the polymer project is also\n * subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt\n */\n\n(function(scope) {\n\n// Old versions of iOS do not have bind.\n\nif (!Function.prototype.bind) {\n Function.prototype.bind = function(scope) {\n var self = this;\n var args = Array.prototype.slice.call(arguments, 1);\n return function() {\n var args2 = args.slice();\n args2.push.apply(args2, arguments);\n return self.apply(scope, args2);\n };\n };\n}\n\n// mixin\n\n// copy all properties from inProps (et al) to inObj\nfunction mixin(inObj/*, inProps, inMoreProps, ...*/) {\n var obj = inObj || {};\n for (var i = 1; i < arguments.length; i++) {\n var p = arguments[i];\n try {\n for (var n in p) {\n copyProperty(n, p, obj);\n }\n } catch(x) {\n }\n }\n return obj;\n}\n\n// copy property inName from inSource object to inTarget object\nfunction copyProperty(inName, inSource, inTarget) {\n var pd = getPropertyDescriptor(inSource, inName);\n Object.defineProperty(inTarget, inName, pd);\n}\n\n// get property descriptor for inName on inObject, even if\n// inName exists on some link in inObject's prototype chain\nfunction getPropertyDescriptor(inObject, inName) {\n if (inObject) {\n var pd = Object.getOwnPropertyDescriptor(inObject, inName);\n return pd || getPropertyDescriptor(Object.getPrototypeOf(inObject), inName);\n }\n}\n\n// export\n\nscope.mixin = mixin;\n\n})(window.Platform);\n","/*\n * Copyright (c) 2014 The Polymer Project Authors. All rights reserved.\n * This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt\n * The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt\n * The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt\n * Code distributed by Google as part of the polymer project is also\n * subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt\n */\n\n(function(scope) {\n\n 'use strict';\n\n // polyfill DOMTokenList\n // * add/remove: allow these methods to take multiple classNames\n // * toggle: add a 2nd argument which forces the given state rather\n // than toggling.\n\n var add = DOMTokenList.prototype.add;\n var remove = DOMTokenList.prototype.remove;\n DOMTokenList.prototype.add = function() {\n for (var i = 0; i < arguments.length; i++) {\n add.call(this, arguments[i]);\n }\n };\n DOMTokenList.prototype.remove = function() {\n for (var i = 0; i < arguments.length; i++) {\n remove.call(this, arguments[i]);\n }\n };\n DOMTokenList.prototype.toggle = function(name, bool) {\n if (arguments.length == 1) {\n bool = !this.contains(name);\n }\n bool ? this.add(name) : this.remove(name);\n };\n DOMTokenList.prototype.switch = function(oldName, newName) {\n oldName && this.remove(oldName);\n newName && this.add(newName);\n };\n\n // add array() to NodeList, NamedNodeMap, HTMLCollection\n\n var ArraySlice = function() {\n return Array.prototype.slice.call(this);\n };\n\n var namedNodeMap = (window.NamedNodeMap || window.MozNamedAttrMap || {});\n\n NodeList.prototype.array = ArraySlice;\n namedNodeMap.prototype.array = ArraySlice;\n HTMLCollection.prototype.array = ArraySlice;\n\n // polyfill performance.now\n\n if (!window.performance) {\n var start = Date.now();\n // only at millisecond precision\n window.performance = {now: function(){ return Date.now() - start }};\n }\n\n // polyfill for requestAnimationFrame\n\n if (!window.requestAnimationFrame) {\n window.requestAnimationFrame = (function() {\n var nativeRaf = window.webkitRequestAnimationFrame ||\n window.mozRequestAnimationFrame;\n\n return nativeRaf ?\n function(callback) {\n return nativeRaf(function() {\n callback(performance.now());\n });\n } :\n function( callback ){\n return window.setTimeout(callback, 1000 / 60);\n };\n })();\n }\n\n if (!window.cancelAnimationFrame) {\n window.cancelAnimationFrame = (function() {\n return window.webkitCancelAnimationFrame ||\n window.mozCancelAnimationFrame ||\n function(id) {\n clearTimeout(id);\n };\n })();\n }\n\n // utility\n\n function createDOM(inTagOrNode, inHTML, inAttrs) {\n var dom = typeof inTagOrNode == 'string' ?\n document.createElement(inTagOrNode) : inTagOrNode.cloneNode(true);\n dom.innerHTML = inHTML;\n if (inAttrs) {\n for (var n in inAttrs) {\n dom.setAttribute(n, inAttrs[n]);\n }\n }\n return dom;\n }\n // Make a stub for Polymer() for polyfill purposes; under the HTMLImports\n // polyfill, scripts in the main document run before imports. That means\n // if (1) polymer is imported and (2) Polymer() is called in the main document\n // in a script after the import, 2 occurs before 1. We correct this here\n // by specfiically patching Polymer(); this is not necessary under native\n // HTMLImports.\n var elementDeclarations = [];\n\n var polymerStub = function(name, dictionary) {\n elementDeclarations.push(arguments);\n }\n window.Polymer = polymerStub;\n\n // deliver queued delcarations\n scope.deliverDeclarations = function() {\n scope.deliverDeclarations = function() {\n throw 'Possible attempt to load Polymer twice';\n };\n return elementDeclarations;\n }\n\n // Once DOMContent has loaded, any main document scripts that depend on\n // Polymer() should have run. Calling Polymer() now is an error until\n // polymer is imported.\n window.addEventListener('DOMContentLoaded', function() {\n if (window.Polymer === polymerStub) {\n window.Polymer = function() {\n console.error('You tried to use polymer without loading it first. To ' +\n 'load polymer, <link rel=\"import\" href=\"' + \n 'components/polymer/polymer.html\">');\n };\n }\n });\n\n // exports\n scope.createDOM = createDOM;\n\n})(window.Platform);\n","/*\n * Copyright (c) 2014 The Polymer Project Authors. All rights reserved.\n * This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt\n * The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt\n * The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt\n * Code distributed by Google as part of the polymer project is also\n * subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt\n */\n\n// poor man's adapter for template.content on various platform scenarios\n(function(scope) {\n scope.templateContent = scope.templateContent || function(inTemplate) {\n return inTemplate.content;\n };\n})(window.Platform);\n","/*\n * Copyright (c) 2014 The Polymer Project Authors. All rights reserved.\n * This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt\n * The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt\n * The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt\n * Code distributed by Google as part of the polymer project is also\n * subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt\n */\n\n(function(scope) {\n \n scope = scope || (window.Inspector = {});\n \n var inspector;\n\n window.sinspect = function(inNode, inProxy) {\n if (!inspector) {\n inspector = window.open('', 'ShadowDOM Inspector', null, true);\n inspector.document.write(inspectorHTML);\n //inspector.document.close();\n inspector.api = {\n shadowize: shadowize\n };\n }\n inspect(inNode || wrap(document.body), inProxy);\n };\n\n var inspectorHTML = [\n '<!DOCTYPE html>',\n '<html>',\n ' <head>',\n ' <title>ShadowDOM Inspector</title>',\n ' <style>',\n ' body {',\n ' }',\n ' pre {',\n ' font: 9pt \"Courier New\", monospace;',\n ' line-height: 1.5em;',\n ' }',\n ' tag {',\n ' color: purple;',\n ' }',\n ' ul {',\n ' margin: 0;',\n ' padding: 0;',\n ' list-style: none;',\n ' }',\n ' li {',\n ' display: inline-block;',\n ' background-color: #f1f1f1;',\n ' padding: 4px 6px;',\n ' border-radius: 4px;',\n ' margin-right: 4px;',\n ' }',\n ' </style>',\n ' </head>',\n ' <body>',\n ' <ul id=\"crumbs\">',\n ' </ul>',\n ' <div id=\"tree\"></div>',\n ' </body>',\n '</html>'\n ].join('\\n');\n \n var crumbs = [];\n\n var displayCrumbs = function() {\n // alias our document\n var d = inspector.document;\n // get crumbbar\n var cb = d.querySelector('#crumbs');\n // clear crumbs\n cb.textContent = '';\n // build new crumbs\n for (var i=0, c; c=crumbs[i]; i++) {\n var a = d.createElement('a');\n a.href = '#';\n a.textContent = c.localName;\n a.idx = i;\n a.onclick = function(event) {\n var c;\n while (crumbs.length > this.idx) {\n c = crumbs.pop();\n }\n inspect(c.shadow || c, c);\n event.preventDefault();\n };\n cb.appendChild(d.createElement('li')).appendChild(a);\n }\n };\n\n var inspect = function(inNode, inProxy) {\n // alias our document\n var d = inspector.document;\n // reset list of drillable nodes\n drillable = [];\n // memoize our crumb proxy\n var proxy = inProxy || inNode;\n crumbs.push(proxy);\n // update crumbs\n displayCrumbs();\n // reflect local tree\n d.body.querySelector('#tree').innerHTML =\n '<pre>' + output(inNode, inNode.childNodes) + '</pre>';\n };\n\n var forEach = Array.prototype.forEach.call.bind(Array.prototype.forEach);\n\n var blacklisted = {STYLE:1, SCRIPT:1, \"#comment\": 1, TEMPLATE: 1};\n var blacklist = function(inNode) {\n return blacklisted[inNode.nodeName];\n };\n\n var output = function(inNode, inChildNodes, inIndent) {\n if (blacklist(inNode)) {\n return '';\n }\n var indent = inIndent || '';\n if (inNode.localName || inNode.nodeType == 11) {\n var name = inNode.localName || 'shadow-root';\n //inChildNodes = ShadowDOM.localNodes(inNode);\n var info = indent + describe(inNode);\n // if only textNodes\n // TODO(sjmiles): make correct for ShadowDOM\n /*if (!inNode.children.length && inNode.localName !== 'content' && inNode.localName !== 'shadow') {\n info += catTextContent(inChildNodes);\n } else*/ {\n // TODO(sjmiles): native <shadow> has no reference to its projection\n if (name == 'content' /*|| name == 'shadow'*/) {\n inChildNodes = inNode.getDistributedNodes();\n }\n info += '<br/>';\n var ind = indent + ' ';\n forEach(inChildNodes, function(n) {\n info += output(n, n.childNodes, ind);\n });\n info += indent;\n }\n if (!({br:1}[name])) {\n info += '<tag></' + name + '></tag>';\n info += '<br/>';\n }\n } else {\n var text = inNode.textContent.trim();\n info = text ? indent + '\"' + text + '\"' + '<br/>' : '';\n }\n return info;\n };\n\n var catTextContent = function(inChildNodes) {\n var info = '';\n forEach(inChildNodes, function(n) {\n info += n.textContent.trim();\n });\n return info;\n };\n\n var drillable = [];\n\n var describe = function(inNode) {\n var tag = '<tag>' + '<';\n var name = inNode.localName || 'shadow-root';\n if (inNode.webkitShadowRoot || inNode.shadowRoot) {\n tag += ' <button idx=\"' + drillable.length +\n '\" onclick=\"api.shadowize.call(this)\">' + name + '</button>';\n drillable.push(inNode);\n } else {\n tag += name || 'shadow-root';\n }\n if (inNode.attributes) {\n forEach(inNode.attributes, function(a) {\n tag += ' ' + a.name + (a.value ? '=\"' + a.value + '\"' : '');\n });\n }\n tag += '>'+ '</tag>';\n return tag;\n };\n\n // remote api\n\n shadowize = function() {\n var idx = Number(this.attributes.idx.value);\n //alert(idx);\n var node = drillable[idx];\n if (node) {\n inspect(node.webkitShadowRoot || node.shadowRoot, node)\n } else {\n console.log(\"bad shadowize node\");\n console.dir(this);\n }\n };\n \n // export\n \n scope.output = output;\n \n})(window.Inspector);\n","/*\n * Copyright (c) 2014 The Polymer Project Authors. All rights reserved.\n * This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt\n * The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt\n * The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt\n * Code distributed by Google as part of the polymer project is also\n * subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt\n */\n\n(function(scope) {\n\n // TODO(sorvell): It's desireable to provide a default stylesheet \n // that's convenient for styling unresolved elements, but\n // it's cumbersome to have to include this manually in every page.\n // It would make sense to put inside some HTMLImport but \n // the HTMLImports polyfill does not allow loading of stylesheets \n // that block rendering. Therefore this injection is tolerated here.\n\n var style = document.createElement('style');\n style.textContent = ''\n + 'body {'\n + 'transition: opacity ease-in 0.2s;' \n + ' } \\n'\n + 'body[unresolved] {'\n + 'opacity: 0; display: block; overflow: hidden;' \n + ' } \\n'\n ;\n var head = document.querySelector('head');\n head.insertBefore(style, head.firstChild);\n\n})(Platform);\n","/*\n * Copyright (c) 2014 The Polymer Project Authors. All rights reserved.\n * This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt\n * The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt\n * The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt\n * Code distributed by Google as part of the polymer project is also\n * subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt\n */\n\n(function(scope) {\n\n function withDependencies(task, depends) {\n depends = depends || [];\n if (!depends.map) {\n depends = [depends];\n }\n return task.apply(this, depends.map(marshal));\n }\n\n function module(name, dependsOrFactory, moduleFactory) {\n var module;\n switch (arguments.length) {\n case 0:\n return;\n case 1:\n module = null;\n break;\n case 2:\n // dependsOrFactory is `factory` in this case\n module = dependsOrFactory.apply(this);\n break;\n default:\n // dependsOrFactory is `depends` in this case\n module = withDependencies(moduleFactory, dependsOrFactory);\n break;\n }\n modules[name] = module;\n };\n\n function marshal(name) {\n return modules[name];\n }\n\n var modules = {};\n\n function using(depends, task) {\n HTMLImports.whenImportsReady(function() {\n withDependencies(task, depends);\n });\n };\n\n // exports\n\n scope.marshal = marshal;\n // `module` confuses commonjs detectors\n scope.modularize = module;\n scope.using = using;\n\n})(window);\n","/*\n * Copyright (c) 2014 The Polymer Project Authors. All rights reserved.\n * This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt\n * The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt\n * The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt\n * Code distributed by Google as part of the polymer project is also\n * subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt\n */\n\n(function(scope) {\n\nvar iterations = 0;\nvar callbacks = [];\nvar twiddle = document.createTextNode('');\n\nfunction endOfMicrotask(callback) {\n twiddle.textContent = iterations++;\n callbacks.push(callback);\n}\n\nfunction atEndOfMicrotask() {\n while (callbacks.length) {\n callbacks.shift()();\n }\n}\n\nnew (window.MutationObserver || JsMutationObserver)(atEndOfMicrotask)\n .observe(twiddle, {characterData: true})\n ;\n\n// exports\n\nscope.endOfMicrotask = endOfMicrotask;\n\n})(Platform);\n\n","/*\n * Copyright (c) 2014 The Polymer Project Authors. All rights reserved.\n * This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt\n * The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt\n * The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt\n * Code distributed by Google as part of the polymer project is also\n * subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt\n */\n\n(function(scope) {\n\nvar urlResolver = {\n resolveDom: function(root, url) {\n url = url || root.ownerDocument.baseURI;\n this.resolveAttributes(root, url);\n this.resolveStyles(root, url);\n // handle template.content\n var templates = root.querySelectorAll('template');\n if (templates) {\n for (var i = 0, l = templates.length, t; (i < l) && (t = templates[i]); i++) {\n if (t.content) {\n this.resolveDom(t.content, url);\n }\n }\n }\n },\n resolveTemplate: function(template) {\n this.resolveDom(template.content, template.ownerDocument.baseURI);\n },\n resolveStyles: function(root, url) {\n var styles = root.querySelectorAll('style');\n if (styles) {\n for (var i = 0, l = styles.length, s; (i < l) && (s = styles[i]); i++) {\n this.resolveStyle(s, url);\n }\n }\n },\n resolveStyle: function(style, url) {\n url = url || style.ownerDocument.baseURI;\n style.textContent = this.resolveCssText(style.textContent, url);\n },\n resolveCssText: function(cssText, baseUrl, keepAbsolute) {\n cssText = replaceUrlsInCssText(cssText, baseUrl, keepAbsolute, CSS_URL_REGEXP);\n return replaceUrlsInCssText(cssText, baseUrl, keepAbsolute, CSS_IMPORT_REGEXP);\n },\n resolveAttributes: function(root, url) {\n if (root.hasAttributes && root.hasAttributes()) {\n this.resolveElementAttributes(root, url);\n }\n // search for attributes that host urls\n var nodes = root && root.querySelectorAll(URL_ATTRS_SELECTOR);\n if (nodes) {\n for (var i = 0, l = nodes.length, n; (i < l) && (n = nodes[i]); i++) {\n this.resolveElementAttributes(n, url);\n }\n }\n },\n resolveElementAttributes: function(node, url) {\n url = url || node.ownerDocument.baseURI;\n URL_ATTRS.forEach(function(v) {\n var attr = node.attributes[v];\n var value = attr && attr.value;\n var replacement;\n if (value && value.search(URL_TEMPLATE_SEARCH) < 0) {\n if (v === 'style') {\n replacement = replaceUrlsInCssText(value, url, false, CSS_URL_REGEXP);\n } else {\n replacement = resolveRelativeUrl(url, value);\n }\n attr.value = replacement;\n }\n });\n }\n};\n\nvar CSS_URL_REGEXP = /(url\\()([^)]*)(\\))/g;\nvar CSS_IMPORT_REGEXP = /(@import[\\s]+(?!url\\())([^;]*)(;)/g;\nvar URL_ATTRS = ['href', 'src', 'action', 'style', 'url'];\nvar URL_ATTRS_SELECTOR = '[' + URL_ATTRS.join('],[') + ']';\nvar URL_TEMPLATE_SEARCH = '{{.*}}';\n\nfunction replaceUrlsInCssText(cssText, baseUrl, keepAbsolute, regexp) {\n return cssText.replace(regexp, function(m, pre, url, post) {\n var urlPath = url.replace(/[\"']/g, '');\n urlPath = resolveRelativeUrl(baseUrl, urlPath, keepAbsolute);\n return pre + '\\'' + urlPath + '\\'' + post;\n });\n}\n\nfunction resolveRelativeUrl(baseUrl, url, keepAbsolute) {\n // do not resolve '/' absolute urls\n if (url && url[0] === '/') {\n return url;\n }\n var u = new URL(url, baseUrl);\n return keepAbsolute ? u.href : makeDocumentRelPath(u.href);\n}\n\nfunction makeDocumentRelPath(url) {\n var root = new URL(document.baseURI);\n var u = new URL(url, root);\n if (u.host === root.host && u.port === root.port &&\n u.protocol === root.protocol) {\n return makeRelPath(root, u);\n } else {\n return url;\n }\n}\n\n// make a relative path from source to target\nfunction makeRelPath(sourceUrl, targetUrl) {\n var source = sourceUrl.pathname;\n var target = targetUrl.pathname;\n var s = source.split('/');\n var t = target.split('/');\n while (s.length && s[0] === t[0]){\n s.shift();\n t.shift();\n }\n for (var i = 0, l = s.length - 1; i < l; i++) {\n t.unshift('..');\n }\n return t.join('/') + targetUrl.search + targetUrl.hash;\n}\n\n// exports\nscope.urlResolver = urlResolver;\n\n})(Platform);\n","/*\n * Copyright 2012 The Polymer Authors. All rights reserved.\n * Use of this source code is goverened by a BSD-style\n * license that can be found in the LICENSE file.\n */\n\n(function(global) {\n\n var registrationsTable = new WeakMap();\n\n // We use setImmediate or postMessage for our future callback.\n var setImmediate = window.msSetImmediate;\n\n // Use post message to emulate setImmediate.\n if (!setImmediate) {\n var setImmediateQueue = [];\n var sentinel = String(Math.random());\n window.addEventListener('message', function(e) {\n if (e.data === sentinel) {\n var queue = setImmediateQueue;\n setImmediateQueue = [];\n queue.forEach(function(func) {\n func();\n });\n }\n });\n setImmediate = function(func) {\n setImmediateQueue.push(func);\n window.postMessage(sentinel, '*');\n };\n }\n\n // This is used to ensure that we never schedule 2 callas to setImmediate\n var isScheduled = false;\n\n // Keep track of observers that needs to be notified next time.\n var scheduledObservers = [];\n\n /**\n * Schedules |dispatchCallback| to be called in the future.\n * @param {MutationObserver} observer\n */\n function scheduleCallback(observer) {\n scheduledObservers.push(observer);\n if (!isScheduled) {\n isScheduled = true;\n setImmediate(dispatchCallbacks);\n }\n }\n\n function wrapIfNeeded(node) {\n return window.ShadowDOMPolyfill &&\n window.ShadowDOMPolyfill.wrapIfNeeded(node) ||\n node;\n }\n\n function dispatchCallbacks() {\n // http://dom.spec.whatwg.org/#mutation-observers\n\n isScheduled = false; // Used to allow a new setImmediate call above.\n\n var observers = scheduledObservers;\n scheduledObservers = [];\n // Sort observers based on their creation UID (incremental).\n observers.sort(function(o1, o2) {\n return o1.uid_ - o2.uid_;\n });\n\n var anyNonEmpty = false;\n observers.forEach(function(observer) {\n\n // 2.1, 2.2\n var queue = observer.takeRecords();\n // 2.3. Remove all transient registered observers whose observer is mo.\n removeTransientObserversFor(observer);\n\n // 2.4\n if (queue.length) {\n observer.callback_(queue, observer);\n anyNonEmpty = true;\n }\n });\n\n // 3.\n if (anyNonEmpty)\n dispatchCallbacks();\n }\n\n function removeTransientObserversFor(observer) {\n observer.nodes_.forEach(function(node) {\n var registrations = registrationsTable.get(node);\n if (!registrations)\n return;\n registrations.forEach(function(registration) {\n if (registration.observer === observer)\n registration.removeTransientObservers();\n });\n });\n }\n\n /**\n * This function is used for the \"For each registered observer observer (with\n * observer's options as options) in target's list of registered observers,\n * run these substeps:\" and the \"For each ancestor ancestor of target, and for\n * each registered observer observer (with options options) in ancestor's list\n * of registered observers, run these substeps:\" part of the algorithms. The\n * |options.subtree| is checked to ensure that the callback is called\n * correctly.\n *\n * @param {Node} target\n * @param {function(MutationObserverInit):MutationRecord} callback\n */\n function forEachAncestorAndObserverEnqueueRecord(target, callback) {\n for (var node = target; node; node = node.parentNode) {\n var registrations = registrationsTable.get(node);\n\n if (registrations) {\n for (var j = 0; j < registrations.length; j++) {\n var registration = registrations[j];\n var options = registration.options;\n\n // Only target ignores subtree.\n if (node !== target && !options.subtree)\n continue;\n\n var record = callback(options);\n if (record)\n registration.enqueue(record);\n }\n }\n }\n }\n\n var uidCounter = 0;\n\n /**\n * The class that maps to the DOM MutationObserver interface.\n * @param {Function} callback.\n * @constructor\n */\n function JsMutationObserver(callback) {\n this.callback_ = callback;\n this.nodes_ = [];\n this.records_ = [];\n this.uid_ = ++uidCounter;\n }\n\n JsMutationObserver.prototype = {\n observe: function(target, options) {\n target = wrapIfNeeded(target);\n\n // 1.1\n if (!options.childList && !options.attributes && !options.characterData ||\n\n // 1.2\n options.attributeOldValue && !options.attributes ||\n\n // 1.3\n options.attributeFilter && options.attributeFilter.length &&\n !options.attributes ||\n\n // 1.4\n options.characterDataOldValue && !options.characterData) {\n\n throw new SyntaxError();\n }\n\n var registrations = registrationsTable.get(target);\n if (!registrations)\n registrationsTable.set(target, registrations = []);\n\n // 2\n // If target's list of registered observers already includes a registered\n // observer associated with the context object, replace that registered\n // observer's options with options.\n var registration;\n for (var i = 0; i < registrations.length; i++) {\n if (registrations[i].observer === this) {\n registration = registrations[i];\n registration.removeListeners();\n registration.options = options;\n break;\n }\n }\n\n // 3.\n // Otherwise, add a new registered observer to target's list of registered\n // observers with the context object as the observer and options as the\n // options, and add target to context object's list of nodes on which it\n // is registered.\n if (!registration) {\n registration = new Registration(this, target, options);\n registrations.push(registration);\n this.nodes_.push(target);\n }\n\n registration.addListeners();\n },\n\n disconnect: function() {\n this.nodes_.forEach(function(node) {\n var registrations = registrationsTable.get(node);\n for (var i = 0; i < registrations.length; i++) {\n var registration = registrations[i];\n if (registration.observer === this) {\n registration.removeListeners();\n registrations.splice(i, 1);\n // Each node can only have one registered observer associated with\n // this observer.\n break;\n }\n }\n }, this);\n this.records_ = [];\n },\n\n takeRecords: function() {\n var copyOfRecords = this.records_;\n this.records_ = [];\n return copyOfRecords;\n }\n };\n\n /**\n * @param {string} type\n * @param {Node} target\n * @constructor\n */\n function MutationRecord(type, target) {\n this.type = type;\n this.target = target;\n this.addedNodes = [];\n this.removedNodes = [];\n this.previousSibling = null;\n this.nextSibling = null;\n this.attributeName = null;\n this.attributeNamespace = null;\n this.oldValue = null;\n }\n\n function copyMutationRecord(original) {\n var record = new MutationRecord(original.type, original.target);\n record.addedNodes = original.addedNodes.slice();\n record.removedNodes = original.removedNodes.slice();\n record.previousSibling = original.previousSibling;\n record.nextSibling = original.nextSibling;\n record.attributeName = original.attributeName;\n record.attributeNamespace = original.attributeNamespace;\n record.oldValue = original.oldValue;\n return record;\n };\n\n // We keep track of the two (possibly one) records used in a single mutation.\n var currentRecord, recordWithOldValue;\n\n /**\n * Creates a record without |oldValue| and caches it as |currentRecord| for\n * later use.\n * @param {string} oldValue\n * @return {MutationRecord}\n */\n function getRecord(type, target) {\n return currentRecord = new MutationRecord(type, target);\n }\n\n /**\n * Gets or creates a record with |oldValue| based in the |currentRecord|\n * @param {string} oldValue\n * @return {MutationRecord}\n */\n function getRecordWithOldValue(oldValue) {\n if (recordWithOldValue)\n return recordWithOldValue;\n recordWithOldValue = copyMutationRecord(currentRecord);\n recordWithOldValue.oldValue = oldValue;\n return recordWithOldValue;\n }\n\n function clearRecords() {\n currentRecord = recordWithOldValue = undefined;\n }\n\n /**\n * @param {MutationRecord} record\n * @return {boolean} Whether the record represents a record from the current\n * mutation event.\n */\n function recordRepresentsCurrentMutation(record) {\n return record === recordWithOldValue || record === currentRecord;\n }\n\n /**\n * Selects which record, if any, to replace the last record in the queue.\n * This returns |null| if no record should be replaced.\n *\n * @param {MutationRecord} lastRecord\n * @param {MutationRecord} newRecord\n * @param {MutationRecord}\n */\n function selectRecord(lastRecord, newRecord) {\n if (lastRecord === newRecord)\n return lastRecord;\n\n // Check if the the record we are adding represents the same record. If\n // so, we keep the one with the oldValue in it.\n if (recordWithOldValue && recordRepresentsCurrentMutation(lastRecord))\n return recordWithOldValue;\n\n return null;\n }\n\n /**\n * Class used to represent a registered observer.\n * @param {MutationObserver} observer\n * @param {Node} target\n * @param {MutationObserverInit} options\n * @constructor\n */\n function Registration(observer, target, options) {\n this.observer = observer;\n this.target = target;\n this.options = options;\n this.transientObservedNodes = [];\n }\n\n Registration.prototype = {\n enqueue: function(record) {\n var records = this.observer.records_;\n var length = records.length;\n\n // There are cases where we replace the last record with the new record.\n // For example if the record represents the same mutation we need to use\n // the one with the oldValue. If we get same record (this can happen as we\n // walk up the tree) we ignore the new record.\n if (records.length > 0) {\n var lastRecord = records[length - 1];\n var recordToReplaceLast = selectRecord(lastRecord, record);\n if (recordToReplaceLast) {\n records[length - 1] = recordToReplaceLast;\n return;\n }\n } else {\n scheduleCallback(this.observer);\n }\n\n records[length] = record;\n },\n\n addListeners: function() {\n this.addListeners_(this.target);\n },\n\n addListeners_: function(node) {\n var options = this.options;\n if (options.attributes)\n node.addEventListener('DOMAttrModified', this, true);\n\n if (options.characterData)\n node.addEventListener('DOMCharacterDataModified', this, true);\n\n if (options.childList)\n node.addEventListener('DOMNodeInserted', this, true);\n\n if (options.childList || options.subtree)\n node.addEventListener('DOMNodeRemoved', this, true);\n },\n\n removeListeners: function() {\n this.removeListeners_(this.target);\n },\n\n removeListeners_: function(node) {\n var options = this.options;\n if (options.attributes)\n node.removeEventListener('DOMAttrModified', this, true);\n\n if (options.characterData)\n node.removeEventListener('DOMCharacterDataModified', this, true);\n\n if (options.childList)\n node.removeEventListener('DOMNodeInserted', this, true);\n\n if (options.childList || options.subtree)\n node.removeEventListener('DOMNodeRemoved', this, true);\n },\n\n /**\n * Adds a transient observer on node. The transient observer gets removed\n * next time we deliver the change records.\n * @param {Node} node\n */\n addTransientObserver: function(node) {\n // Don't add transient observers on the target itself. We already have all\n // the required listeners set up on the target.\n if (node === this.target)\n return;\n\n this.addListeners_(node);\n this.transientObservedNodes.push(node);\n var registrations = registrationsTable.get(node);\n if (!registrations)\n registrationsTable.set(node, registrations = []);\n\n // We know that registrations does not contain this because we already\n // checked if node === this.target.\n registrations.push(this);\n },\n\n removeTransientObservers: function() {\n var transientObservedNodes = this.transientObservedNodes;\n this.transientObservedNodes = [];\n\n transientObservedNodes.forEach(function(node) {\n // Transient observers are never added to the target.\n this.removeListeners_(node);\n\n var registrations = registrationsTable.get(node);\n for (var i = 0; i < registrations.length; i++) {\n if (registrations[i] === this) {\n registrations.splice(i, 1);\n // Each node can only have one registered observer associated with\n // this observer.\n break;\n }\n }\n }, this);\n },\n\n handleEvent: function(e) {\n // Stop propagation since we are managing the propagation manually.\n // This means that other mutation events on the page will not work\n // correctly but that is by design.\n e.stopImmediatePropagation();\n\n switch (e.type) {\n case 'DOMAttrModified':\n // http://dom.spec.whatwg.org/#concept-mo-queue-attributes\n\n var name = e.attrName;\n var namespace = e.relatedNode.namespaceURI;\n var target = e.target;\n\n // 1.\n var record = new getRecord('attributes', target);\n record.attributeName = name;\n record.attributeNamespace = namespace;\n\n // 2.\n var oldValue =\n e.attrChange === MutationEvent.ADDITION ? null : e.prevValue;\n\n forEachAncestorAndObserverEnqueueRecord(target, function(options) {\n // 3.1, 4.2\n if (!options.attributes)\n return;\n\n // 3.2, 4.3\n if (options.attributeFilter && options.attributeFilter.length &&\n options.attributeFilter.indexOf(name) === -1 &&\n options.attributeFilter.indexOf(namespace) === -1) {\n return;\n }\n // 3.3, 4.4\n if (options.attributeOldValue)\n return getRecordWithOldValue(oldValue);\n\n // 3.4, 4.5\n return record;\n });\n\n break;\n\n case 'DOMCharacterDataModified':\n // http://dom.spec.whatwg.org/#concept-mo-queue-characterdata\n var target = e.target;\n\n // 1.\n var record = getRecord('characterData', target);\n\n // 2.\n var oldValue = e.prevValue;\n\n\n forEachAncestorAndObserverEnqueueRecord(target, function(options) {\n // 3.1, 4.2\n if (!options.characterData)\n return;\n\n // 3.2, 4.3\n if (options.characterDataOldValue)\n return getRecordWithOldValue(oldValue);\n\n // 3.3, 4.4\n return record;\n });\n\n break;\n\n case 'DOMNodeRemoved':\n this.addTransientObserver(e.target);\n // Fall through.\n case 'DOMNodeInserted':\n // http://dom.spec.whatwg.org/#concept-mo-queue-childlist\n var target = e.relatedNode;\n var changedNode = e.target;\n var addedNodes, removedNodes;\n if (e.type === 'DOMNodeInserted') {\n addedNodes = [changedNode];\n removedNodes = [];\n } else {\n\n addedNodes = [];\n removedNodes = [changedNode];\n }\n var previousSibling = changedNode.previousSibling;\n var nextSibling = changedNode.nextSibling;\n\n // 1.\n var record = getRecord('childList', target);\n record.addedNodes = addedNodes;\n record.removedNodes = removedNodes;\n record.previousSibling = previousSibling;\n record.nextSibling = nextSibling;\n\n forEachAncestorAndObserverEnqueueRecord(target, function(options) {\n // 2.1, 3.2\n if (!options.childList)\n return;\n\n // 2.2, 3.3\n return record;\n });\n\n }\n\n clearRecords();\n }\n };\n\n global.JsMutationObserver = JsMutationObserver;\n\n if (!global.MutationObserver)\n global.MutationObserver = JsMutationObserver;\n\n\n})(this);\n","/*\n * Copyright 2013 The Polymer Authors. All rights reserved.\n * Use of this source code is governed by a BSD-style\n * license that can be found in the LICENSE file.\n */\nwindow.HTMLImports = window.HTMLImports || {flags:{}};","/*\n * Copyright 2013 The Polymer Authors. All rights reserved.\n * Use of this source code is governed by a BSD-style\n * license that can be found in the LICENSE file.\n */\n\n(function(scope) {\n\n // imports\n var path = scope.path;\n var xhr = scope.xhr;\n var flags = scope.flags;\n\n // TODO(sorvell): this loader supports a dynamic list of urls\n // and an oncomplete callback that is called when the loader is done.\n // The polyfill currently does *not* need this dynamism or the onComplete\n // concept. Because of this, the loader could be simplified quite a bit.\n var Loader = function(onLoad, onComplete) {\n this.cache = {};\n this.onload = onLoad;\n this.oncomplete = onComplete;\n this.inflight = 0;\n this.pending = {};\n };\n\n Loader.prototype = {\n addNodes: function(nodes) {\n // number of transactions to complete\n this.inflight += nodes.length;\n // commence transactions\n for (var i=0, l=nodes.length, n; (i<l) && (n=nodes[i]); i++) {\n this.require(n);\n }\n // anything to do?\n this.checkDone();\n },\n addNode: function(node) {\n // number of transactions to complete\n this.inflight++;\n // commence transactions\n this.require(node);\n // anything to do?\n this.checkDone();\n },\n require: function(elt) {\n var url = elt.src || elt.href;\n // ensure we have a standard url that can be used\n // reliably for deduping.\n // TODO(sjmiles): ad-hoc\n elt.__nodeUrl = url;\n // deduplication\n if (!this.dedupe(url, elt)) {\n // fetch this resource\n this.fetch(url, elt);\n }\n },\n dedupe: function(url, elt) {\n if (this.pending[url]) {\n // add to list of nodes waiting for inUrl\n this.pending[url].push(elt);\n // don't need fetch\n return true;\n }\n var resource;\n if (this.cache[url]) {\n this.onload(url, elt, this.cache[url]);\n // finished this transaction\n this.tail();\n // don't need fetch\n return true;\n }\n // first node waiting for inUrl\n this.pending[url] = [elt];\n // need fetch (not a dupe)\n return false;\n },\n fetch: function(url, elt) {\n flags.load && console.log('fetch', url, elt);\n if (url.match(/^data:/)) {\n // Handle Data URI Scheme\n var pieces = url.split(',');\n var header = pieces[0];\n var body = pieces[1];\n if(header.indexOf(';base64') > -1) {\n body = atob(body);\n } else {\n body = decodeURIComponent(body);\n }\n setTimeout(function() {\n this.receive(url, elt, null, body);\n }.bind(this), 0);\n } else {\n var receiveXhr = function(err, resource, redirectedUrl) {\n this.receive(url, elt, err, resource, redirectedUrl);\n }.bind(this);\n xhr.load(url, receiveXhr);\n // TODO(sorvell): blocked on)\n // https://code.google.com/p/chromium/issues/detail?id=257221\n // xhr'ing for a document makes scripts in imports runnable; otherwise\n // they are not; however, it requires that we have doctype=html in\n // the import which is unacceptable. This is only needed on Chrome\n // to avoid the bug above.\n /*\n if (isDocumentLink(elt)) {\n xhr.loadDocument(url, receiveXhr);\n } else {\n xhr.load(url, receiveXhr);\n }\n */\n }\n },\n receive: function(url, elt, err, resource, redirectedUrl) {\n this.cache[url] = resource;\n var $p = this.pending[url];\n if ( redirectedUrl && redirectedUrl !== url ) {\n this.cache[redirectedUrl] = resource;\n $p = $p.concat(this.pending[redirectedUrl]);\n }\n for (var i=0, l=$p.length, p; (i<l) && (p=$p[i]); i++) {\n //if (!err) {\n // If url was redirected, use the redirected location so paths are\n // calculated relative to that.\n this.onload(redirectedUrl || url, p, resource);\n //}\n this.tail();\n }\n this.pending[url] = null;\n if ( redirectedUrl && redirectedUrl !== url ) {\n this.pending[redirectedUrl] = null;\n }\n },\n tail: function() {\n --this.inflight;\n this.checkDone();\n },\n checkDone: function() {\n if (!this.inflight) {\n this.oncomplete();\n }\n }\n };\n\n xhr = xhr || {\n async: true,\n ok: function(request) {\n return (request.status >= 200 && request.status < 300)\n || (request.status === 304)\n || (request.status === 0);\n },\n load: function(url, next, nextContext) {\n var request = new XMLHttpRequest();\n if (scope.flags.debug || scope.flags.bust) {\n url += '?' + Math.random();\n }\n request.open('GET', url, xhr.async);\n request.addEventListener('readystatechange', function(e) {\n if (request.readyState === 4) {\n // Servers redirecting an import can add a Location header to help us\n // polyfill correctly.\n var locationHeader = request.getResponseHeader(\"Location\");\n var redirectedUrl = null;\n if (locationHeader) {\n var redirectedUrl = (locationHeader.substr( 0, 1 ) === \"/\")\n ? location.origin + locationHeader // Location is a relative path\n : redirectedUrl; // Full path\n }\n next.call(nextContext, !xhr.ok(request) && request,\n request.response || request.responseText, redirectedUrl);\n }\n });\n request.send();\n return request;\n },\n loadDocument: function(url, next, nextContext) {\n this.load(url, next, nextContext).responseType = 'document';\n }\n };\n\n // exports\n scope.xhr = xhr;\n scope.Loader = Loader;\n\n})(window.HTMLImports);\n","/*\n * Copyright 2013 The Polymer Authors. All rights reserved.\n * Use of this source code is governed by a BSD-style\n * license that can be found in the LICENSE file.\n */\n\n(function(scope) {\n\nvar IMPORT_LINK_TYPE = 'import';\nvar flags = scope.flags;\nvar isIe = /Trident/.test(navigator.userAgent);\n// TODO(sorvell): SD polyfill intrusion\nvar mainDoc = window.ShadowDOMPolyfill ? \n window.ShadowDOMPolyfill.wrapIfNeeded(document) : document;\n\n// importParser\n// highlander object to manage parsing of imports\n// parses import related elements\n// and ensures proper parse order\n// parse order is enforced by crawling the tree and monitoring which elements\n// have been parsed; async parsing is also supported.\n\n// highlander object for parsing a document tree\nvar importParser = {\n // parse selectors for main document elements\n documentSelectors: 'link[rel=' + IMPORT_LINK_TYPE + ']',\n // parse selectors for import document elements\n importsSelectors: [\n 'link[rel=' + IMPORT_LINK_TYPE + ']',\n 'link[rel=stylesheet]',\n 'style',\n 'script:not([type])',\n 'script[type=\"text/javascript\"]'\n ].join(','),\n map: {\n link: 'parseLink',\n script: 'parseScript',\n style: 'parseStyle'\n },\n // try to parse the next import in the tree\n parseNext: function() {\n var next = this.nextToParse();\n if (next) {\n this.parse(next);\n }\n },\n parse: function(elt) {\n if (this.isParsed(elt)) {\n flags.parse && console.log('[%s] is already parsed', elt.localName);\n return;\n }\n var fn = this[this.map[elt.localName]];\n if (fn) {\n this.markParsing(elt);\n fn.call(this, elt);\n }\n },\n // only 1 element may be parsed at a time; parsing is async so each\n // parsing implementation must inform the system that parsing is complete\n // via markParsingComplete.\n // To prompt the system to parse the next element, parseNext should then be\n // called.\n // Note, parseNext used to be included at the end of markParsingComplete, but\n // we must not do this so that, for example, we can (1) mark parsing complete \n // then (2) fire an import load event, and then (3) parse the next resource.\n markParsing: function(elt) {\n flags.parse && console.log('parsing', elt);\n this.parsingElement = elt;\n },\n markParsingComplete: function(elt) {\n elt.__importParsed = true;\n if (elt.__importElement) {\n elt.__importElement.__importParsed = true;\n }\n this.parsingElement = null;\n flags.parse && console.log('completed', elt);\n },\n invalidateParse: function(doc) {\n if (doc && doc.__importLink) {\n doc.__importParsed = doc.__importLink.__importParsed = false;\n this.parseSoon();\n }\n },\n parseSoon: function() {\n if (this._parseSoon) {\n cancelAnimationFrame(this._parseDelay);\n }\n var parser = this;\n this._parseSoon = requestAnimationFrame(function() {\n parser.parseNext();\n });\n },\n parseImport: function(elt) {\n // TODO(sorvell): consider if there's a better way to do this;\n // expose an imports parsing hook; this is needed, for example, by the\n // CustomElements polyfill.\n if (HTMLImports.__importsParsingHook) {\n HTMLImports.__importsParsingHook(elt);\n }\n elt.import.__importParsed = true;\n this.markParsingComplete(elt);\n // fire load event\n if (elt.__resource) {\n elt.dispatchEvent(new CustomEvent('load', {bubbles: false})); \n } else {\n elt.dispatchEvent(new CustomEvent('error', {bubbles: false}));\n }\n // TODO(sorvell): workaround for Safari addEventListener not working\n // for elements not in the main document.\n if (elt.__pending) {\n var fn;\n while (elt.__pending.length) {\n fn = elt.__pending.shift();\n if (fn) {\n fn({target: elt});\n }\n }\n }\n this.parseNext();\n },\n parseLink: function(linkElt) {\n if (nodeIsImport(linkElt)) {\n this.parseImport(linkElt);\n } else {\n // make href absolute\n linkElt.href = linkElt.href;\n this.parseGeneric(linkElt);\n }\n },\n parseStyle: function(elt) {\n // TODO(sorvell): style element load event can just not fire so clone styles\n var src = elt;\n elt = cloneStyle(elt);\n elt.__importElement = src;\n this.parseGeneric(elt);\n },\n parseGeneric: function(elt) {\n this.trackElement(elt);\n document.head.appendChild(elt);\n },\n // tracks when a loadable element has loaded\n trackElement: function(elt, callback) {\n var self = this;\n var done = function(e) {\n if (callback) {\n callback(e);\n }\n self.markParsingComplete(elt);\n self.parseNext();\n };\n elt.addEventListener('load', done);\n elt.addEventListener('error', done);\n\n // NOTE: IE does not fire \"load\" event for styles that have already loaded\n // This is in violation of the spec, so we try our hardest to work around it\n if (isIe && elt.localName === 'style') {\n var fakeLoad = false;\n // If there's not @import in the textContent, assume it has loaded\n if (elt.textContent.indexOf('@import') == -1) {\n fakeLoad = true;\n // if we have a sheet, we have been parsed\n } else if (elt.sheet) {\n fakeLoad = true;\n var csr = elt.sheet.cssRules;\n var len = csr ? csr.length : 0;\n // search the rules for @import's\n for (var i = 0, r; (i < len) && (r = csr[i]); i++) {\n if (r.type === CSSRule.IMPORT_RULE) {\n // if every @import has resolved, fake the load\n fakeLoad = fakeLoad && Boolean(r.styleSheet);\n }\n }\n }\n // dispatch a fake load event and continue parsing\n if (fakeLoad) {\n elt.dispatchEvent(new CustomEvent('load', {bubbles: false}));\n }\n }\n },\n // NOTE: execute scripts by injecting them and watching for the load/error\n // event. Inline scripts are handled via dataURL's because browsers tend to\n // provide correct parsing errors in this case. If this has any compatibility\n // issues, we can switch to injecting the inline script with textContent.\n // Scripts with dataURL's do not appear to generate load events and therefore\n // we assume they execute synchronously.\n parseScript: function(scriptElt) {\n var script = document.createElement('script');\n script.__importElement = scriptElt;\n script.src = scriptElt.src ? scriptElt.src : \n generateScriptDataUrl(scriptElt);\n scope.currentScript = scriptElt;\n this.trackElement(script, function(e) {\n script.parentNode.removeChild(script);\n scope.currentScript = null; \n });\n document.head.appendChild(script);\n },\n // determine the next element in the tree which should be parsed\n nextToParse: function() {\n return !this.parsingElement && this.nextToParseInDoc(mainDoc);\n },\n nextToParseInDoc: function(doc, link) {\n var nodes = doc.querySelectorAll(this.parseSelectorsForNode(doc));\n for (var i=0, l=nodes.length, p=0, n; (i<l) && (n=nodes[i]); i++) {\n if (!this.isParsed(n)) {\n if (this.hasResource(n)) {\n return nodeIsImport(n) ? this.nextToParseInDoc(n.import, n) : n;\n } else {\n return;\n }\n }\n }\n // all nodes have been parsed, ready to parse import, if any\n return link;\n },\n // return the set of parse selectors relevant for this node.\n parseSelectorsForNode: function(node) {\n var doc = node.ownerDocument || node;\n return doc === mainDoc ? this.documentSelectors : this.importsSelectors;\n },\n isParsed: function(node) {\n return node.__importParsed;\n },\n hasResource: function(node) {\n if (nodeIsImport(node) && !node.import) {\n return false;\n }\n return true;\n }\n};\n\nfunction nodeIsImport(elt) {\n return (elt.localName === 'link') && (elt.rel === IMPORT_LINK_TYPE);\n}\n\nfunction generateScriptDataUrl(script) {\n var scriptContent = generateScriptContent(script);\n var b64 = 'data:text/javascript';\n // base64 may be smaller, but does not handle unicode characters\n // attempt base64 first, fall back to escaped text\n try {\n b64 += (';base64,' + btoa(scriptContent));\n } catch(e) {\n b64 += (';charset=utf-8,' + encodeURIComponent(scriptContent));\n }\n return b64;\n}\n\nfunction generateScriptContent(script) {\n return script.textContent + generateSourceMapHint(script);\n}\n\n// calculate source map hint\nfunction generateSourceMapHint(script) {\n var moniker = script.__nodeUrl;\n if (!moniker) {\n moniker = script.ownerDocument.baseURI;\n // there could be more than one script this url\n var tag = '[' + Math.floor((Math.random()+1)*1000) + ']';\n // TODO(sjmiles): Polymer hack, should be pluggable if we need to allow \n // this sort of thing\n var matches = script.textContent.match(/Polymer\\(['\"]([^'\"]*)/);\n tag = matches && matches[1] || tag;\n // tag the moniker\n moniker += '/' + tag + '.js';\n }\n return '\\n//# sourceURL=' + moniker + '\\n';\n}\n\n// style/stylesheet handling\n\n// clone style with proper path resolution for main document\n// NOTE: styles are the only elements that require direct path fixup.\nfunction cloneStyle(style) {\n var clone = style.ownerDocument.createElement('style');\n clone.textContent = style.textContent;\n path.resolveUrlsInStyle(clone);\n return clone;\n}\n\n// path fixup: style elements in imports must be made relative to the main \n// document. We fixup url's in url() and @import.\nvar CSS_URL_REGEXP = /(url\\()([^)]*)(\\))/g;\nvar CSS_IMPORT_REGEXP = /(@import[\\s]+(?!url\\())([^;]*)(;)/g;\n\nvar path = {\n resolveUrlsInStyle: function(style) {\n var doc = style.ownerDocument;\n var resolver = doc.createElement('a');\n style.textContent = this.resolveUrlsInCssText(style.textContent, resolver);\n return style; \n },\n resolveUrlsInCssText: function(cssText, urlObj) {\n var r = this.replaceUrls(cssText, urlObj, CSS_URL_REGEXP);\n r = this.replaceUrls(r, urlObj, CSS_IMPORT_REGEXP);\n return r;\n },\n replaceUrls: function(text, urlObj, regexp) {\n return text.replace(regexp, function(m, pre, url, post) {\n var urlPath = url.replace(/[\"']/g, '');\n urlObj.href = urlPath;\n urlPath = urlObj.href;\n return pre + '\\'' + urlPath + '\\'' + post;\n }); \n }\n}\n\n// exports\nscope.parser = importParser;\nscope.path = path;\nscope.isIE = isIe;\n\n})(HTMLImports);\n","/*\n * Copyright 2013 The Polymer Authors. All rights reserved.\n * Use of this source code is governed by a BSD-style\n * license that can be found in the LICENSE file.\n */\n\n(function(scope) {\n\nvar hasNative = ('import' in document.createElement('link'));\nvar useNative = hasNative;\nvar flags = scope.flags;\nvar IMPORT_LINK_TYPE = 'import';\n\n// TODO(sorvell): SD polyfill intrusion\nvar mainDoc = window.ShadowDOMPolyfill ? \n ShadowDOMPolyfill.wrapIfNeeded(document) : document;\n\nif (!useNative) {\n\n // imports\n var xhr = scope.xhr;\n var Loader = scope.Loader;\n var parser = scope.parser;\n\n // importer\n // highlander object to manage loading of imports\n\n // for any document, importer:\n // - loads any linked import documents (with deduping)\n\n var importer = {\n documents: {},\n // nodes to load in the mian document\n documentPreloadSelectors: 'link[rel=' + IMPORT_LINK_TYPE + ']',\n // nodes to load in imports\n importsPreloadSelectors: [\n 'link[rel=' + IMPORT_LINK_TYPE + ']'\n ].join(','),\n loadNode: function(node) {\n importLoader.addNode(node);\n },\n // load all loadable elements within the parent element\n loadSubtree: function(parent) {\n var nodes = this.marshalNodes(parent);\n // add these nodes to loader's queue\n importLoader.addNodes(nodes);\n },\n marshalNodes: function(parent) {\n // all preloadable nodes in inDocument\n return parent.querySelectorAll(this.loadSelectorsForNode(parent));\n },\n // find the proper set of load selectors for a given node\n loadSelectorsForNode: function(node) {\n var doc = node.ownerDocument || node;\n return doc === mainDoc ? this.documentPreloadSelectors :\n this.importsPreloadSelectors;\n },\n loaded: function(url, elt, resource) {\n flags.load && console.log('loaded', url, elt);\n // store generic resource\n // TODO(sorvell): fails for nodes inside <template>.content\n // see https://code.google.com/p/chromium/issues/detail?id=249381.\n elt.__resource = resource;\n if (isDocumentLink(elt)) {\n var doc = this.documents[url];\n // if we've never seen a document at this url\n if (!doc) {\n // generate an HTMLDocument from data\n doc = makeDocument(resource, url);\n doc.__importLink = elt;\n // TODO(sorvell): we cannot use MO to detect parsed nodes because\n // SD polyfill does not report these as mutations.\n this.bootDocument(doc);\n // cache document\n this.documents[url] = doc;\n }\n // don't store import record until we're actually loaded\n // store document resource\n elt.import = doc;\n }\n parser.parseNext();\n },\n bootDocument: function(doc) {\n this.loadSubtree(doc);\n this.observe(doc);\n parser.parseNext();\n },\n loadedAll: function() {\n parser.parseNext();\n }\n };\n\n // loader singleton\n var importLoader = new Loader(importer.loaded.bind(importer), \n importer.loadedAll.bind(importer));\n\n function isDocumentLink(elt) {\n return isLinkRel(elt, IMPORT_LINK_TYPE);\n }\n\n function isLinkRel(elt, rel) {\n return elt.localName === 'link' && elt.getAttribute('rel') === rel;\n }\n\n function isScript(elt) {\n return elt.localName === 'script';\n }\n\n function makeDocument(resource, url) {\n // create a new HTML document\n var doc = resource;\n if (!(doc instanceof Document)) {\n doc = document.implementation.createHTMLDocument(IMPORT_LINK_TYPE);\n }\n // cache the new document's source url\n doc._URL = url;\n // establish a relative path via <base>\n var base = doc.createElement('base');\n base.setAttribute('href', url);\n // add baseURI support to browsers (IE) that lack it.\n if (!doc.baseURI) {\n doc.baseURI = url;\n }\n // ensure UTF-8 charset\n var meta = doc.createElement('meta');\n meta.setAttribute('charset', 'utf-8');\n\n doc.head.appendChild(meta);\n doc.head.appendChild(base);\n // install HTML last as it may trigger CustomElement upgrades\n // TODO(sjmiles): problem wrt to template boostrapping below,\n // template bootstrapping must (?) come before element upgrade\n // but we cannot bootstrap templates until they are in a document\n // which is too late\n if (!(resource instanceof Document)) {\n // install html\n doc.body.innerHTML = resource;\n }\n // TODO(sorvell): ideally this code is not aware of Template polyfill,\n // but for now the polyfill needs help to bootstrap these templates\n if (window.HTMLTemplateElement && HTMLTemplateElement.bootstrap) {\n HTMLTemplateElement.bootstrap(doc);\n }\n return doc;\n }\n} else {\n // do nothing if using native imports\n var importer = {};\n}\n\n// NOTE: We cannot polyfill document.currentScript because it's not possible\n// both to override and maintain the ability to capture the native value;\n// therefore we choose to expose _currentScript both when native imports\n// and the polyfill are in use.\nvar currentScriptDescriptor = {\n get: function() {\n return HTMLImports.currentScript || document.currentScript;\n },\n configurable: true\n};\n\nObject.defineProperty(document, '_currentScript', currentScriptDescriptor);\nObject.defineProperty(mainDoc, '_currentScript', currentScriptDescriptor);\n\n// Polyfill document.baseURI for browsers without it.\nif (!document.baseURI) {\n var baseURIDescriptor = {\n get: function() {\n return window.location.href;\n },\n configurable: true\n };\n\n Object.defineProperty(document, 'baseURI', baseURIDescriptor);\n Object.defineProperty(mainDoc, 'baseURI', baseURIDescriptor);\n}\n\n// call a callback when all HTMLImports in the document at call (or at least\n// document ready) time have loaded.\n// 1. ensure the document is in a ready state (has dom), then \n// 2. watch for loading of imports and call callback when done\nfunction whenImportsReady(callback, doc) {\n doc = doc || mainDoc;\n // if document is loading, wait and try again\n whenDocumentReady(function() {\n watchImportsLoad(callback, doc);\n }, doc);\n}\n\n// call the callback when the document is in a ready state (has dom)\nvar requiredReadyState = HTMLImports.isIE ? 'complete' : 'interactive';\nvar READY_EVENT = 'readystatechange';\nfunction isDocumentReady(doc) {\n return (doc.readyState === 'complete' ||\n doc.readyState === requiredReadyState);\n}\n\n// call <callback> when we ensure the document is in a ready state\nfunction whenDocumentReady(callback, doc) {\n if (!isDocumentReady(doc)) {\n var checkReady = function() {\n if (doc.readyState === 'complete' || \n doc.readyState === requiredReadyState) {\n doc.removeEventListener(READY_EVENT, checkReady);\n whenDocumentReady(callback, doc);\n }\n }\n doc.addEventListener(READY_EVENT, checkReady);\n } else if (callback) {\n callback();\n }\n}\n\n// call <callback> when we ensure all imports have loaded\nfunction watchImportsLoad(callback, doc) {\n var imports = doc.querySelectorAll('link[rel=import]');\n var loaded = 0, l = imports.length;\n function checkDone(d) { \n if (loaded == l) {\n callback && callback();\n }\n }\n function loadedImport(e) {\n loaded++;\n checkDone();\n }\n if (l) {\n for (var i=0, imp; (i<l) && (imp=imports[i]); i++) {\n if (isImportLoaded(imp)) {\n loadedImport.call(imp);\n } else {\n imp.addEventListener('load', loadedImport);\n imp.addEventListener('error', loadedImport);\n }\n }\n } else {\n checkDone();\n }\n}\n\nfunction isImportLoaded(link) {\n return useNative ? (link.import && (link.import.readyState !== 'loading')) || link.__loaded :\n link.__importParsed;\n}\n\n// TODO(sorvell): install a mutation observer to see if HTMLImports have loaded\n// this is a workaround for https://www.w3.org/Bugs/Public/show_bug.cgi?id=25007\n// and should be removed when this bug is addressed.\nif (useNative) {\n new MutationObserver(function(mxns) {\n for (var i=0, l=mxns.length, m; (i < l) && (m=mxns[i]); i++) {\n if (m.addedNodes) {\n handleImports(m.addedNodes);\n }\n }\n }).observe(document.head, {childList: true});\n\n function handleImports(nodes) {\n for (var i=0, l=nodes.length, n; (i<l) && (n=nodes[i]); i++) {\n if (isImport(n)) {\n handleImport(n); \n }\n }\n }\n\n function isImport(element) {\n return element.localName === 'link' && element.rel === 'import';\n }\n\n function handleImport(element) {\n var loaded = element.import;\n if (loaded) {\n markTargetLoaded({target: element});\n } else {\n element.addEventListener('load', markTargetLoaded);\n element.addEventListener('error', markTargetLoaded);\n }\n }\n\n function markTargetLoaded(event) {\n event.target.__loaded = true;\n }\n\n}\n\n// exports\nscope.hasNative = hasNative;\nscope.useNative = useNative;\nscope.importer = importer;\nscope.IMPORT_LINK_TYPE = IMPORT_LINK_TYPE;\nscope.isImportLoaded = isImportLoaded;\nscope.importLoader = importLoader;\nscope.whenReady = whenImportsReady;\n\n// deprecated\nscope.whenImportsReady = whenImportsReady;\n\n})(window.HTMLImports);\n"," /*\nCopyright 2013 The Polymer Authors. All rights reserved.\nUse of this source code is governed by a BSD-style\nlicense that can be found in the LICENSE file.\n*/\n\n(function(scope){\n\nvar IMPORT_LINK_TYPE = scope.IMPORT_LINK_TYPE;\nvar importSelector = 'link[rel=' + IMPORT_LINK_TYPE + ']';\nvar importer = scope.importer;\nvar parser = scope.parser;\n\n// we track mutations for addedNodes, looking for imports\nfunction handler(mutations) {\n for (var i=0, l=mutations.length, m; (i<l) && (m=mutations[i]); i++) {\n if (m.type === 'childList' && m.addedNodes.length) {\n addedNodes(m.addedNodes);\n }\n }\n}\n\n// find loadable elements and add them to the importer\nfunction addedNodes(nodes) {\n var owner;\n for (var i=0, l=nodes.length, n; (i<l) && (n=nodes[i]); i++) {\n owner = owner || n.ownerDocument;\n if (shouldLoadNode(n)) {\n importer.loadNode(n);\n }\n if (n.children && n.children.length) {\n addedNodes(n.children);\n }\n }\n // TODO(sorvell): This is not the right approach here. We shouldn't need to\n // invalidate parsing when an element is added. Disabling this code \n // until a better approach is found.\n /*\n if (owner) {\n parser.invalidateParse(owner);\n }\n */\n}\n\nfunction shouldLoadNode(node) {\n return (node.nodeType === 1) && matches.call(node,\n importer.loadSelectorsForNode(node));\n}\n\n// x-plat matches\nvar matches = HTMLElement.prototype.matches || \n HTMLElement.prototype.matchesSelector || \n HTMLElement.prototype.webkitMatchesSelector ||\n HTMLElement.prototype.mozMatchesSelector ||\n HTMLElement.prototype.msMatchesSelector;\n\nvar observer = new MutationObserver(handler);\n\n// observe the given root for loadable elements\nfunction observe(root) {\n observer.observe(root, {childList: true, subtree: true});\n}\n\n// exports\n// TODO(sorvell): factor so can put on scope\nscope.observe = observe;\nimporter.observe = observe;\n\n})(HTMLImports);\n","/*\n * Copyright 2013 The Polymer Authors. All rights reserved.\n * Use of this source code is governed by a BSD-style\n * license that can be found in the LICENSE file.\n */\n(function(){\n\n// bootstrap\n\n// IE shim for CustomEvent\nif (typeof window.CustomEvent !== 'function') {\n window.CustomEvent = function(inType, dictionary) {\n var e = document.createEvent('HTMLEvents');\n e.initEvent(inType,\n dictionary.bubbles === false ? false : true,\n dictionary.cancelable === false ? false : true,\n dictionary.detail);\n return e;\n };\n}\n\n// TODO(sorvell): SD polyfill intrusion\nvar doc = window.ShadowDOMPolyfill ? \n window.ShadowDOMPolyfill.wrapIfNeeded(document) : document;\n\n// Fire the 'HTMLImportsLoaded' event when imports in document at load time \n// have loaded. This event is required to simulate the script blocking \n// behavior of native imports. A main document script that needs to be sure\n// imports have loaded should wait for this event.\nHTMLImports.whenImportsReady(function() {\n HTMLImports.ready = true;\n HTMLImports.readyTime = new Date().getTime();\n doc.dispatchEvent(\n new CustomEvent('HTMLImportsLoaded', {bubbles: true})\n );\n});\n\n\n// no need to bootstrap the polyfill when native imports is available.\nif (!HTMLImports.useNative) {\n function bootstrap() {\n HTMLImports.importer.bootDocument(doc);\n }\n \n // TODO(sorvell): SD polyfill does *not* generate mutations for nodes added\n // by the parser. For this reason, we must wait until the dom exists to \n // bootstrap.\n if (document.readyState === 'complete' ||\n (document.readyState === 'interactive' && !window.attachEvent)) {\n bootstrap();\n } else {\n document.addEventListener('DOMContentLoaded', bootstrap);\n }\n}\n\n})();\n","/*\n * Copyright 2013 The Polymer Authors. All rights reserved.\n * Use of this source code is governed by a BSD-style\n * license that can be found in the LICENSE file.\n */\nwindow.CustomElements = window.CustomElements || {flags:{}};"," /*\r\nCopyright 2013 The Polymer Authors. All rights reserved.\r\nUse of this source code is governed by a BSD-style\r\nlicense that can be found in the LICENSE file.\r\n*/\r\n\r\n(function(scope){\r\n\r\nvar logFlags = window.logFlags || {};\r\nvar IMPORT_LINK_TYPE = window.HTMLImports ? HTMLImports.IMPORT_LINK_TYPE : 'none';\r\n\r\n// walk the subtree rooted at node, applying 'find(element, data)' function\r\n// to each element\r\n// if 'find' returns true for 'element', do not search element's subtree\r\nfunction findAll(node, find, data) {\r\n var e = node.firstElementChild;\r\n if (!e) {\r\n e = node.firstChild;\r\n while (e && e.nodeType !== Node.ELEMENT_NODE) {\r\n e = e.nextSibling;\r\n }\r\n }\r\n while (e) {\r\n if (find(e, data) !== true) {\r\n findAll(e, find, data);\r\n }\r\n e = e.nextElementSibling;\r\n }\r\n return null;\r\n}\r\n\r\n// walk all shadowRoots on a given node.\r\nfunction forRoots(node, cb) {\r\n var root = node.shadowRoot;\r\n while(root) {\r\n forSubtree(root, cb);\r\n root = root.olderShadowRoot;\r\n }\r\n}\r\n\r\n// walk the subtree rooted at node, including descent into shadow-roots,\r\n// applying 'cb' to each element\r\nfunction forSubtree(node, cb) {\r\n //logFlags.dom && node.childNodes && node.childNodes.length && console.group('subTree: ', node);\r\n findAll(node, function(e) {\r\n if (cb(e)) {\r\n return true;\r\n }\r\n forRoots(e, cb);\r\n });\r\n forRoots(node, cb);\r\n //logFlags.dom && node.childNodes && node.childNodes.length && console.groupEnd();\r\n}\r\n\r\n// manage lifecycle on added node\r\nfunction added(node) {\r\n if (upgrade(node)) {\r\n insertedNode(node);\r\n return true;\r\n }\r\n inserted(node);\r\n}\r\n\r\n// manage lifecycle on added node's subtree only\r\nfunction addedSubtree(node) {\r\n forSubtree(node, function(e) {\r\n if (added(e)) {\r\n return true;\r\n }\r\n });\r\n}\r\n\r\n// manage lifecycle on added node and it's subtree\r\nfunction addedNode(node) {\r\n return added(node) || addedSubtree(node);\r\n}\r\n\r\n// upgrade custom elements at node, if applicable\r\nfunction upgrade(node) {\r\n if (!node.__upgraded__ && node.nodeType === Node.ELEMENT_NODE) {\r\n var type = node.getAttribute('is') || node.localName;\r\n var definition = scope.registry[type];\r\n if (definition) {\r\n logFlags.dom && console.group('upgrade:', node.localName);\r\n scope.upgrade(node);\r\n logFlags.dom && console.groupEnd();\r\n return true;\r\n }\r\n }\r\n}\r\n\r\nfunction insertedNode(node) {\r\n inserted(node);\r\n if (inDocument(node)) {\r\n forSubtree(node, function(e) {\r\n inserted(e);\r\n });\r\n }\r\n}\r\n\r\n// TODO(sorvell): on platforms without MutationObserver, mutations may not be\r\n// reliable and therefore attached/detached are not reliable.\r\n// To make these callbacks less likely to fail, we defer all inserts and removes\r\n// to give a chance for elements to be inserted into dom.\r\n// This ensures attachedCallback fires for elements that are created and\r\n// immediately added to dom.\r\nvar hasPolyfillMutations = (!window.MutationObserver ||\r\n (window.MutationObserver === window.JsMutationObserver));\r\nscope.hasPolyfillMutations = hasPolyfillMutations;\r\n\r\nvar isPendingMutations = false;\r\nvar pendingMutations = [];\r\nfunction deferMutation(fn) {\r\n pendingMutations.push(fn);\r\n if (!isPendingMutations) {\r\n isPendingMutations = true;\r\n var async = (window.Platform && window.Platform.endOfMicrotask) ||\r\n setTimeout;\r\n async(takeMutations);\r\n }\r\n}\r\n\r\nfunction takeMutations() {\r\n isPendingMutations = false;\r\n var $p = pendingMutations;\r\n for (var i=0, l=$p.length, p; (i<l) && (p=$p[i]); i++) {\r\n p();\r\n }\r\n pendingMutations = [];\r\n}\r\n\r\nfunction inserted(element) {\r\n if (hasPolyfillMutations) {\r\n deferMutation(function() {\r\n _inserted(element);\r\n });\r\n } else {\r\n _inserted(element);\r\n }\r\n}\r\n\r\n// TODO(sjmiles): if there are descents into trees that can never have inDocument(*) true, fix this\r\nfunction _inserted(element) {\r\n // TODO(sjmiles): it's possible we were inserted and removed in the space\r\n // of one microtask, in which case we won't be 'inDocument' here\r\n // But there are other cases where we are testing for inserted without\r\n // specific knowledge of mutations, and must test 'inDocument' to determine\r\n // whether to call inserted\r\n // If we can factor these cases into separate code paths we can have\r\n // better diagnostics.\r\n // TODO(sjmiles): when logging, do work on all custom elements so we can\r\n // track behavior even when callbacks not defined\r\n //console.log('inserted: ', element.localName);\r\n if (element.attachedCallback || element.detachedCallback || (element.__upgraded__ && logFlags.dom)) {\r\n logFlags.dom && console.group('inserted:', element.localName);\r\n if (inDocument(element)) {\r\n element.__inserted = (element.__inserted || 0) + 1;\r\n // if we are in a 'removed' state, bluntly adjust to an 'inserted' state\r\n if (element.__inserted < 1) {\r\n element.__inserted = 1;\r\n }\r\n // if we are 'over inserted', squelch the callback\r\n if (element.__inserted > 1) {\r\n logFlags.dom && console.warn('inserted:', element.localName,\r\n 'insert/remove count:', element.__inserted)\r\n } else if (element.attachedCallback) {\r\n logFlags.dom && console.log('inserted:', element.localName);\r\n element.attachedCallback();\r\n }\r\n }\r\n logFlags.dom && console.groupEnd();\r\n }\r\n}\r\n\r\nfunction removedNode(node) {\r\n removed(node);\r\n forSubtree(node, function(e) {\r\n removed(e);\r\n });\r\n}\r\n\r\nfunction removed(element) {\r\n if (hasPolyfillMutations) {\r\n deferMutation(function() {\r\n _removed(element);\r\n });\r\n } else {\r\n _removed(element);\r\n }\r\n}\r\n\r\nfunction _removed(element) {\r\n // TODO(sjmiles): temporary: do work on all custom elements so we can track\r\n // behavior even when callbacks not defined\r\n if (element.attachedCallback || element.detachedCallback || (element.__upgraded__ && logFlags.dom)) {\r\n logFlags.dom && console.group('removed:', element.localName);\r\n if (!inDocument(element)) {\r\n element.__inserted = (element.__inserted || 0) - 1;\r\n // if we are in a 'inserted' state, bluntly adjust to an 'removed' state\r\n if (element.__inserted > 0) {\r\n element.__inserted = 0;\r\n }\r\n // if we are 'over removed', squelch the callback\r\n if (element.__inserted < 0) {\r\n logFlags.dom && console.warn('removed:', element.localName,\r\n 'insert/remove count:', element.__inserted)\r\n } else if (element.detachedCallback) {\r\n element.detachedCallback();\r\n }\r\n }\r\n logFlags.dom && console.groupEnd();\r\n }\r\n}\r\n\r\n// SD polyfill intrustion due mainly to the fact that 'document'\r\n// is not entirely wrapped\r\nfunction wrapIfNeeded(node) {\r\n return window.ShadowDOMPolyfill ? ShadowDOMPolyfill.wrapIfNeeded(node)\r\n : node;\r\n}\r\n\r\nfunction inDocument(element) {\r\n var p = element;\r\n var doc = wrapIfNeeded(document);\r\n while (p) {\r\n if (p == doc) {\r\n return true;\r\n }\r\n p = p.parentNode || p.host;\r\n }\r\n}\r\n\r\nfunction watchShadow(node) {\r\n if (node.shadowRoot && !node.shadowRoot.__watched) {\r\n logFlags.dom && console.log('watching shadow-root for: ', node.localName);\r\n // watch all unwatched roots...\r\n var root = node.shadowRoot;\r\n while (root) {\r\n watchRoot(root);\r\n root = root.olderShadowRoot;\r\n }\r\n }\r\n}\r\n\r\nfunction watchRoot(root) {\r\n if (!root.__watched) {\r\n observe(root);\r\n root.__watched = true;\r\n }\r\n}\r\n\r\nfunction handler(mutations) {\r\n //\r\n if (logFlags.dom) {\r\n var mx = mutations[0];\r\n if (mx && mx.type === 'childList' && mx.addedNodes) {\r\n if (mx.addedNodes) {\r\n var d = mx.addedNodes[0];\r\n while (d && d !== document && !d.host) {\r\n d = d.parentNode;\r\n }\r\n var u = d && (d.URL || d._URL || (d.host && d.host.localName)) || '';\r\n u = u.split('/?').shift().split('/').pop();\r\n }\r\n }\r\n console.group('mutations (%d) [%s]', mutations.length, u || '');\r\n }\r\n //\r\n mutations.forEach(function(mx) {\r\n //logFlags.dom && console.group('mutation');\r\n if (mx.type === 'childList') {\r\n forEach(mx.addedNodes, function(n) {\r\n //logFlags.dom && console.log(n.localName);\r\n if (!n.localName) {\r\n return;\r\n }\r\n // nodes added may need lifecycle management\r\n addedNode(n);\r\n });\r\n // removed nodes may need lifecycle management\r\n forEach(mx.removedNodes, function(n) {\r\n //logFlags.dom && console.log(n.localName);\r\n if (!n.localName) {\r\n return;\r\n }\r\n removedNode(n);\r\n });\r\n }\r\n //logFlags.dom && console.groupEnd();\r\n });\r\n logFlags.dom && console.groupEnd();\r\n};\r\n\r\nvar observer = new MutationObserver(handler);\r\n\r\nfunction takeRecords() {\r\n // TODO(sjmiles): ask Raf why we have to call handler ourselves\r\n handler(observer.takeRecords());\r\n takeMutations();\r\n}\r\n\r\nvar forEach = Array.prototype.forEach.call.bind(Array.prototype.forEach);\r\n\r\nfunction observe(inRoot) {\r\n observer.observe(inRoot, {childList: true, subtree: true});\r\n}\r\n\r\nfunction observeDocument(doc) {\r\n observe(doc);\r\n}\r\n\r\nfunction upgradeDocument(doc) {\r\n logFlags.dom && console.group('upgradeDocument: ', (doc.baseURI).split('/').pop());\r\n addedNode(doc);\r\n logFlags.dom && console.groupEnd();\r\n}\r\n\r\nfunction upgradeDocumentTree(doc) {\r\n doc = wrapIfNeeded(doc);\r\n //console.log('upgradeDocumentTree: ', (doc.baseURI).split('/').pop());\r\n // upgrade contained imported documents\r\n var imports = doc.querySelectorAll('link[rel=' + IMPORT_LINK_TYPE + ']');\r\n for (var i=0, l=imports.length, n; (i<l) && (n=imports[i]); i++) {\r\n if (n.import && n.import.__parsed) {\r\n upgradeDocumentTree(n.import);\r\n }\r\n }\r\n upgradeDocument(doc);\r\n}\r\n\r\n// exports\r\nscope.IMPORT_LINK_TYPE = IMPORT_LINK_TYPE;\r\nscope.watchShadow = watchShadow;\r\nscope.upgradeDocumentTree = upgradeDocumentTree;\r\nscope.upgradeAll = addedNode;\r\nscope.upgradeSubtree = addedSubtree;\r\nscope.insertedNode = insertedNode;\r\n\r\nscope.observeDocument = observeDocument;\r\nscope.upgradeDocument = upgradeDocument;\r\n\r\nscope.takeRecords = takeRecords;\r\n\r\n})(window.CustomElements);\r\n","/*\n * Copyright 2013 The Polymer Authors. All rights reserved.\n * Use of this source code is governed by a BSD-style\n * license that can be found in the LICENSE file.\n */\n\n/**\n * Implements `document.register`\n * @module CustomElements\n*/\n\n/**\n * Polyfilled extensions to the `document` object.\n * @class Document\n*/\n\n(function(scope) {\n\n// imports\n\nif (!scope) {\n scope = window.CustomElements = {flags:{}};\n}\nvar flags = scope.flags;\n\n// native document.registerElement?\n\nvar hasNative = Boolean(document.registerElement);\n// For consistent timing, use native custom elements only when not polyfilling\n// other key related web components features.\nvar useNative = !flags.register && hasNative && !window.ShadowDOMPolyfill && (!window.HTMLImports || HTMLImports.useNative);\n\nif (useNative) {\n\n // stub\n var nop = function() {};\n\n // exports\n scope.registry = {};\n scope.upgradeElement = nop;\n\n scope.watchShadow = nop;\n scope.upgrade = nop;\n scope.upgradeAll = nop;\n scope.upgradeSubtree = nop;\n scope.observeDocument = nop;\n scope.upgradeDocument = nop;\n scope.upgradeDocumentTree = nop;\n scope.takeRecords = nop;\n scope.reservedTagList = [];\n\n} else {\n\n /**\n * Registers a custom tag name with the document.\n *\n * When a registered element is created, a `readyCallback` method is called\n * in the scope of the element. The `readyCallback` method can be specified on\n * either `options.prototype` or `options.lifecycle` with the latter taking\n * precedence.\n *\n * @method register\n * @param {String} name The tag name to register. Must include a dash ('-'),\n * for example 'x-component'.\n * @param {Object} options\n * @param {String} [options.extends]\n * (_off spec_) Tag name of an element to extend (or blank for a new\n * element). This parameter is not part of the specification, but instead\n * is a hint for the polyfill because the extendee is difficult to infer.\n * Remember that the input prototype must chain to the extended element's\n * prototype (or HTMLElement.prototype) regardless of the value of\n * `extends`.\n * @param {Object} options.prototype The prototype to use for the new\n * element. The prototype must inherit from HTMLElement.\n * @param {Object} [options.lifecycle]\n * Callbacks that fire at important phases in the life of the custom\n * element.\n *\n * @example\n * FancyButton = document.registerElement(\"fancy-button\", {\n * extends: 'button',\n * prototype: Object.create(HTMLButtonElement.prototype, {\n * readyCallback: {\n * value: function() {\n * console.log(\"a fancy-button was created\",\n * }\n * }\n * })\n * });\n * @return {Function} Constructor for the newly registered type.\n */\n function register(name, options) {\n //console.warn('document.registerElement(\"' + name + '\", ', options, ')');\n // construct a defintion out of options\n // TODO(sjmiles): probably should clone options instead of mutating it\n var definition = options || {};\n if (!name) {\n // TODO(sjmiles): replace with more appropriate error (EricB can probably\n // offer guidance)\n throw new Error('document.registerElement: first argument `name` must not be empty');\n }\n if (name.indexOf('-') < 0) {\n // TODO(sjmiles): replace with more appropriate error (EricB can probably\n // offer guidance)\n throw new Error('document.registerElement: first argument (\\'name\\') must contain a dash (\\'-\\'). Argument provided was \\'' + String(name) + '\\'.');\n }\n // prevent registering reserved names\n if (isReservedTag(name)) {\n throw new Error('Failed to execute \\'registerElement\\' on \\'Document\\': Registration failed for type \\'' + String(name) + '\\'. The type name is invalid.');\n }\n // elements may only be registered once\n if (getRegisteredDefinition(name)) {\n throw new Error('DuplicateDefinitionError: a type with name \\'' + String(name) + '\\' is already registered');\n }\n // must have a prototype, default to an extension of HTMLElement\n // TODO(sjmiles): probably should throw if no prototype, check spec\n if (!definition.prototype) {\n // TODO(sjmiles): replace with more appropriate error (EricB can probably\n // offer guidance)\n throw new Error('Options missing required prototype property');\n }\n // record name\n definition.__name = name.toLowerCase();\n // ensure a lifecycle object so we don't have to null test it\n definition.lifecycle = definition.lifecycle || {};\n // build a list of ancestral custom elements (for native base detection)\n // TODO(sjmiles): we used to need to store this, but current code only\n // uses it in 'resolveTagName': it should probably be inlined\n definition.ancestry = ancestry(definition.extends);\n // extensions of native specializations of HTMLElement require localName\n // to remain native, and use secondary 'is' specifier for extension type\n resolveTagName(definition);\n // some platforms require modifications to the user-supplied prototype\n // chain\n resolvePrototypeChain(definition);\n // overrides to implement attributeChanged callback\n overrideAttributeApi(definition.prototype);\n // 7.1.5: Register the DEFINITION with DOCUMENT\n registerDefinition(definition.__name, definition);\n // 7.1.7. Run custom element constructor generation algorithm with PROTOTYPE\n // 7.1.8. Return the output of the previous step.\n definition.ctor = generateConstructor(definition);\n definition.ctor.prototype = definition.prototype;\n // force our .constructor to be our actual constructor\n definition.prototype.constructor = definition.ctor;\n // if initial parsing is complete\n if (scope.ready) {\n // upgrade any pre-existing nodes of this type\n scope.upgradeDocumentTree(document);\n }\n return definition.ctor;\n }\n\n function isReservedTag(name) {\n for (var i = 0; i < reservedTagList.length; i++) {\n if (name === reservedTagList[i]) {\n return true;\n }\n }\n }\n\n var reservedTagList = [\n 'annotation-xml', 'color-profile', 'font-face', 'font-face-src',\n 'font-face-uri', 'font-face-format', 'font-face-name', 'missing-glyph'\n ];\n\n function ancestry(extnds) {\n var extendee = getRegisteredDefinition(extnds);\n if (extendee) {\n return ancestry(extendee.extends).concat([extendee]);\n }\n return [];\n }\n\n function resolveTagName(definition) {\n // if we are explicitly extending something, that thing is our\n // baseTag, unless it represents a custom component\n var baseTag = definition.extends;\n // if our ancestry includes custom components, we only have a\n // baseTag if one of them does\n for (var i=0, a; (a=definition.ancestry[i]); i++) {\n baseTag = a.is && a.tag;\n }\n // our tag is our baseTag, if it exists, and otherwise just our name\n definition.tag = baseTag || definition.__name;\n if (baseTag) {\n // if there is a base tag, use secondary 'is' specifier\n definition.is = definition.__name;\n }\n }\n\n function resolvePrototypeChain(definition) {\n // if we don't support __proto__ we need to locate the native level\n // prototype for precise mixing in\n if (!Object.__proto__) {\n // default prototype\n var nativePrototype = HTMLElement.prototype;\n // work out prototype when using type-extension\n if (definition.is) {\n var inst = document.createElement(definition.tag);\n var expectedPrototype = Object.getPrototypeOf(inst);\n // only set nativePrototype if it will actually appear in the definition's chain\n if (expectedPrototype === definition.prototype) {\n nativePrototype = expectedPrototype;\n }\n }\n // ensure __proto__ reference is installed at each point on the prototype\n // chain.\n // NOTE: On platforms without __proto__, a mixin strategy is used instead\n // of prototype swizzling. In this case, this generated __proto__ provides\n // limited support for prototype traversal.\n var proto = definition.prototype, ancestor;\n while (proto && (proto !== nativePrototype)) {\n ancestor = Object.getPrototypeOf(proto);\n proto.__proto__ = ancestor;\n proto = ancestor;\n }\n // cache this in case of mixin\n definition.native = nativePrototype;\n }\n }\n\n // SECTION 4\n\n function instantiate(definition) {\n // 4.a.1. Create a new object that implements PROTOTYPE\n // 4.a.2. Let ELEMENT by this new object\n //\n // the custom element instantiation algorithm must also ensure that the\n // output is a valid DOM element with the proper wrapper in place.\n //\n return upgrade(domCreateElement(definition.tag), definition);\n }\n\n function upgrade(element, definition) {\n // some definitions specify an 'is' attribute\n if (definition.is) {\n element.setAttribute('is', definition.is);\n }\n // remove 'unresolved' attr, which is a standin for :unresolved.\n element.removeAttribute('unresolved');\n // make 'element' implement definition.prototype\n implement(element, definition);\n // flag as upgraded\n element.__upgraded__ = true;\n // lifecycle management\n created(element);\n // attachedCallback fires in tree order, call before recursing\n scope.insertedNode(element);\n // there should never be a shadow root on element at this point\n scope.upgradeSubtree(element);\n // OUTPUT\n return element;\n }\n\n function implement(element, definition) {\n // prototype swizzling is best\n if (Object.__proto__) {\n element.__proto__ = definition.prototype;\n } else {\n // where above we can re-acquire inPrototype via\n // getPrototypeOf(Element), we cannot do so when\n // we use mixin, so we install a magic reference\n customMixin(element, definition.prototype, definition.native);\n element.__proto__ = definition.prototype;\n }\n }\n\n function customMixin(inTarget, inSrc, inNative) {\n // TODO(sjmiles): 'used' allows us to only copy the 'youngest' version of\n // any property. This set should be precalculated. We also need to\n // consider this for supporting 'super'.\n var used = {};\n // start with inSrc\n var p = inSrc;\n // The default is HTMLElement.prototype, so we add a test to avoid mixing in\n // native prototypes\n while (p !== inNative && p !== HTMLElement.prototype) {\n var keys = Object.getOwnPropertyNames(p);\n for (var i=0, k; k=keys[i]; i++) {\n if (!used[k]) {\n Object.defineProperty(inTarget, k,\n Object.getOwnPropertyDescriptor(p, k));\n used[k] = 1;\n }\n }\n p = Object.getPrototypeOf(p);\n }\n }\n\n function created(element) {\n // invoke createdCallback\n if (element.createdCallback) {\n element.createdCallback();\n }\n }\n\n // attribute watching\n\n function overrideAttributeApi(prototype) {\n // overrides to implement callbacks\n // TODO(sjmiles): should support access via .attributes NamedNodeMap\n // TODO(sjmiles): preserves user defined overrides, if any\n if (prototype.setAttribute._polyfilled) {\n return;\n }\n var setAttribute = prototype.setAttribute;\n prototype.setAttribute = function(name, value) {\n changeAttribute.call(this, name, value, setAttribute);\n }\n var removeAttribute = prototype.removeAttribute;\n prototype.removeAttribute = function(name) {\n changeAttribute.call(this, name, null, removeAttribute);\n }\n prototype.setAttribute._polyfilled = true;\n }\n\n // https://dvcs.w3.org/hg/webcomponents/raw-file/tip/spec/custom/\n // index.html#dfn-attribute-changed-callback\n function changeAttribute(name, value, operation) {\n name = name.toLowerCase();\n var oldValue = this.getAttribute(name);\n operation.apply(this, arguments);\n var newValue = this.getAttribute(name);\n if (this.attributeChangedCallback\n && (newValue !== oldValue)) {\n this.attributeChangedCallback(name, oldValue, newValue);\n }\n }\n\n // element registry (maps tag names to definitions)\n\n var registry = {};\n\n function getRegisteredDefinition(name) {\n if (name) {\n return registry[name.toLowerCase()];\n }\n }\n\n function registerDefinition(name, definition) {\n registry[name] = definition;\n }\n\n function generateConstructor(definition) {\n return function() {\n return instantiate(definition);\n };\n }\n\n var HTML_NAMESPACE = 'http://www.w3.org/1999/xhtml';\n function createElementNS(namespace, tag, typeExtension) {\n // NOTE: we do not support non-HTML elements,\n // just call createElementNS for non HTML Elements\n if (namespace === HTML_NAMESPACE) {\n return createElement(tag, typeExtension);\n } else {\n return domCreateElementNS(namespace, tag);\n }\n }\n\n function createElement(tag, typeExtension) {\n // TODO(sjmiles): ignore 'tag' when using 'typeExtension', we could\n // error check it, or perhaps there should only ever be one argument\n var definition = getRegisteredDefinition(typeExtension || tag);\n if (definition) {\n if (tag == definition.tag && typeExtension == definition.is) {\n return new definition.ctor();\n }\n // Handle empty string for type extension.\n if (!typeExtension && !definition.is) {\n return new definition.ctor();\n }\n }\n\n if (typeExtension) {\n var element = createElement(tag);\n element.setAttribute('is', typeExtension);\n return element;\n }\n var element = domCreateElement(tag);\n // Custom tags should be HTMLElements even if not upgraded.\n if (tag.indexOf('-') >= 0) {\n implement(element, HTMLElement);\n }\n return element;\n }\n\n function upgradeElement(element) {\n if (!element.__upgraded__ && (element.nodeType === Node.ELEMENT_NODE)) {\n var is = element.getAttribute('is');\n var definition = getRegisteredDefinition(is || element.localName);\n if (definition) {\n if (is && definition.tag == element.localName) {\n return upgrade(element, definition);\n } else if (!is && !definition.extends) {\n return upgrade(element, definition);\n }\n }\n }\n }\n\n function cloneNode(deep) {\n // call original clone\n var n = domCloneNode.call(this, deep);\n // upgrade the element and subtree\n scope.upgradeAll(n);\n // return the clone\n return n;\n }\n // capture native createElement before we override it\n\n var domCreateElement = document.createElement.bind(document);\n var domCreateElementNS = document.createElementNS.bind(document);\n\n // capture native cloneNode before we override it\n\n var domCloneNode = Node.prototype.cloneNode;\n\n // exports\n\n document.registerElement = register;\n document.createElement = createElement; // override\n document.createElementNS = createElementNS; // override\n Node.prototype.cloneNode = cloneNode; // override\n\n scope.registry = registry;\n\n /**\n * Upgrade an element to a custom element. Upgrading an element\n * causes the custom prototype to be applied, an `is` attribute\n * to be attached (as needed), and invocation of the `readyCallback`.\n * `upgrade` does nothing if the element is already upgraded, or\n * if it matches no registered custom tag name.\n *\n * @method ugprade\n * @param {Element} element The element to upgrade.\n * @return {Element} The upgraded element.\n */\n scope.upgrade = upgradeElement;\n}\n\n// Create a custom 'instanceof'. This is necessary when CustomElements\n// are implemented via a mixin strategy, as for example on IE10.\nvar isInstance;\nif (!Object.__proto__ && !useNative) {\n isInstance = function(obj, ctor) {\n var p = obj;\n while (p) {\n // NOTE: this is not technically correct since we're not checking if\n // an object is an instance of a constructor; however, this should\n // be good enough for the mixin strategy.\n if (p === ctor.prototype) {\n return true;\n }\n p = p.__proto__;\n }\n return false;\n }\n} else {\n isInstance = function(obj, base) {\n return obj instanceof base;\n }\n}\n\n// exports\nscope.instanceof = isInstance;\nscope.reservedTagList = reservedTagList;\n\n// bc\ndocument.register = document.registerElement;\n\nscope.hasNative = hasNative;\nscope.useNative = useNative;\n\n})(window.CustomElements);\n","/*\n * Copyright 2013 The Polymer Authors. All rights reserved.\n * Use of this source code is governed by a BSD-style\n * license that can be found in the LICENSE file.\n */\n\n(function(scope) {\n\n// import\n\nvar IMPORT_LINK_TYPE = scope.IMPORT_LINK_TYPE;\n\n// highlander object for parsing a document tree\n\nvar parser = {\n selectors: [\n 'link[rel=' + IMPORT_LINK_TYPE + ']'\n ],\n map: {\n link: 'parseLink'\n },\n parse: function(inDocument) {\n if (!inDocument.__parsed) {\n // only parse once\n inDocument.__parsed = true;\n // all parsable elements in inDocument (depth-first pre-order traversal)\n var elts = inDocument.querySelectorAll(parser.selectors);\n // for each parsable node type, call the mapped parsing method\n forEach(elts, function(e) {\n parser[parser.map[e.localName]](e);\n });\n // upgrade all upgradeable static elements, anything dynamically\n // created should be caught by observer\n CustomElements.upgradeDocument(inDocument);\n // observe document for dom changes\n CustomElements.observeDocument(inDocument);\n }\n },\n parseLink: function(linkElt) {\n // imports\n if (isDocumentLink(linkElt)) {\n this.parseImport(linkElt);\n }\n },\n parseImport: function(linkElt) {\n if (linkElt.import) {\n parser.parse(linkElt.import);\n }\n }\n};\n\nfunction isDocumentLink(inElt) {\n return (inElt.localName === 'link'\n && inElt.getAttribute('rel') === IMPORT_LINK_TYPE);\n}\n\nvar forEach = Array.prototype.forEach.call.bind(Array.prototype.forEach);\n\n// exports\n\nscope.parser = parser;\nscope.IMPORT_LINK_TYPE = IMPORT_LINK_TYPE;\n\n})(window.CustomElements);","/*\n * Copyright 2013 The Polymer Authors. All rights reserved.\n * Use of this source code is governed by a BSD-style\n * license that can be found in the LICENSE file.\n */\n(function(scope){\n\n// bootstrap parsing\nfunction bootstrap() {\n // parse document\n CustomElements.parser.parse(document);\n // one more pass before register is 'live'\n CustomElements.upgradeDocument(document);\n // choose async\n var async = window.Platform && Platform.endOfMicrotask ? \n Platform.endOfMicrotask :\n setTimeout;\n async(function() {\n // set internal 'ready' flag, now document.registerElement will trigger \n // synchronous upgrades\n CustomElements.ready = true;\n // capture blunt profiling data\n CustomElements.readyTime = Date.now();\n if (window.HTMLImports) {\n CustomElements.elapsed = CustomElements.readyTime - HTMLImports.readyTime;\n }\n // notify the system that we are bootstrapped\n document.dispatchEvent(\n new CustomEvent('WebComponentsReady', {bubbles: true})\n );\n\n // install upgrade hook if HTMLImports are available\n if (window.HTMLImports) {\n HTMLImports.__importsParsingHook = function(elt) {\n CustomElements.parser.parse(elt.import);\n }\n }\n });\n}\n\n// CustomEvent shim for IE\nif (typeof window.CustomEvent !== 'function') {\n window.CustomEvent = function(inType) {\n var e = document.createEvent('HTMLEvents');\n e.initEvent(inType, true, true);\n return e;\n };\n}\n\n// When loading at readyState complete time (or via flag), boot custom elements\n// immediately.\n// If relevant, HTMLImports must already be loaded.\nif (document.readyState === 'complete' || scope.flags.eager) {\n bootstrap();\n// When loading at readyState interactive time, bootstrap only if HTMLImports\n// are not pending. Also avoid IE as the semantics of this state are unreliable.\n} else if (document.readyState === 'interactive' && !window.attachEvent &&\n (!window.HTMLImports || window.HTMLImports.ready)) {\n bootstrap();\n// When loading at other readyStates, wait for the appropriate DOM event to \n// bootstrap.\n} else {\n var loadEvent = window.HTMLImports && !HTMLImports.ready ?\n 'HTMLImportsLoaded' : 'DOMContentLoaded';\n window.addEventListener(loadEvent, bootstrap);\n}\n\n})(window.CustomElements);\n","/*\n * Copyright (c) 2014 The Polymer Project Authors. All rights reserved.\n * This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt\n * The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt\n * The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt\n * Code distributed by Google as part of the polymer project is also\n * subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt\n */\n\n(function() {\n\nif (window.ShadowDOMPolyfill) {\n\n // ensure wrapped inputs for these functions\n var fns = ['upgradeAll', 'upgradeSubtree', 'observeDocument',\n 'upgradeDocument'];\n\n // cache originals\n var original = {};\n fns.forEach(function(fn) {\n original[fn] = CustomElements[fn];\n });\n\n // override\n fns.forEach(function(fn) {\n CustomElements[fn] = function(inNode) {\n return original[fn](wrap(inNode));\n };\n });\n\n}\n\n})();\n","/*\n * Copyright (c) 2014 The Polymer Project Authors. All rights reserved.\n * This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt\n * The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt\n * The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt\n * Code distributed by Google as part of the polymer project is also\n * subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt\n */\n\n(function(scope) {\n var endOfMicrotask = scope.endOfMicrotask;\n\n // Generic url loader\n function Loader(regex) {\n this.cache = Object.create(null);\n this.map = Object.create(null);\n this.requests = 0;\n this.regex = regex;\n }\n Loader.prototype = {\n\n // TODO(dfreedm): there may be a better factoring here\n // extract absolute urls from the text (full of relative urls)\n extractUrls: function(text, base) {\n var matches = [];\n var matched, u;\n while ((matched = this.regex.exec(text))) {\n u = new URL(matched[1], base);\n matches.push({matched: matched[0], url: u.href});\n }\n return matches;\n },\n // take a text blob, a root url, and a callback and load all the urls found within the text\n // returns a map of absolute url to text\n process: function(text, root, callback) {\n var matches = this.extractUrls(text, root);\n\n // every call to process returns all the text this loader has ever received\n var done = callback.bind(null, this.map);\n this.fetch(matches, done);\n },\n // build a mapping of url -> text from matches\n fetch: function(matches, callback) {\n var inflight = matches.length;\n\n // return early if there is no fetching to be done\n if (!inflight) {\n return callback();\n }\n\n // wait for all subrequests to return\n var done = function() {\n if (--inflight === 0) {\n callback();\n }\n };\n\n // start fetching all subrequests\n var m, req, url;\n for (var i = 0; i < inflight; i++) {\n m = matches[i];\n url = m.url;\n req = this.cache[url];\n // if this url has already been requested, skip requesting it again\n if (!req) {\n req = this.xhr(url);\n req.match = m;\n this.cache[url] = req;\n }\n // wait for the request to process its subrequests\n req.wait(done);\n }\n },\n handleXhr: function(request) {\n var match = request.match;\n var url = match.url;\n\n // handle errors with an empty string\n var response = request.response || request.responseText || '';\n this.map[url] = response;\n this.fetch(this.extractUrls(response, url), request.resolve);\n },\n xhr: function(url) {\n this.requests++;\n var request = new XMLHttpRequest();\n request.open('GET', url, true);\n request.send();\n request.onerror = request.onload = this.handleXhr.bind(this, request);\n\n // queue of tasks to run after XHR returns\n request.pending = [];\n request.resolve = function() {\n var pending = request.pending;\n for(var i = 0; i < pending.length; i++) {\n pending[i]();\n }\n request.pending = null;\n };\n\n // if we have already resolved, pending is null, async call the callback\n request.wait = function(fn) {\n if (request.pending) {\n request.pending.push(fn);\n } else {\n endOfMicrotask(fn);\n }\n };\n\n return request;\n }\n };\n\n scope.Loader = Loader;\n})(window.Platform);\n","/*\n * Copyright (c) 2014 The Polymer Project Authors. All rights reserved.\n * This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt\n * The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt\n * The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt\n * Code distributed by Google as part of the polymer project is also\n * subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt\n */\n\n(function(scope) {\n\nvar urlResolver = scope.urlResolver;\nvar Loader = scope.Loader;\n\nfunction StyleResolver() {\n this.loader = new Loader(this.regex);\n}\nStyleResolver.prototype = {\n regex: /@import\\s+(?:url)?[\"'\\(]*([^'\"\\)]*)['\"\\)]*;/g,\n // Recursively replace @imports with the text at that url\n resolve: function(text, url, callback) {\n var done = function(map) {\n callback(this.flatten(text, url, map));\n }.bind(this);\n this.loader.process(text, url, done);\n },\n // resolve the textContent of a style node\n resolveNode: function(style, url, callback) {\n var text = style.textContent;\n var done = function(text) {\n style.textContent = text;\n callback(style);\n };\n this.resolve(text, url, done);\n },\n // flatten all the @imports to text\n flatten: function(text, base, map) {\n var matches = this.loader.extractUrls(text, base);\n var match, url, intermediate;\n for (var i = 0; i < matches.length; i++) {\n match = matches[i];\n url = match.url;\n // resolve any css text to be relative to the importer, keep absolute url\n intermediate = urlResolver.resolveCssText(map[url], url, true);\n // flatten intermediate @imports\n intermediate = this.flatten(intermediate, base, map);\n text = text.replace(match.matched, intermediate);\n }\n return text;\n },\n loadStyles: function(styles, base, callback) {\n var loaded=0, l = styles.length;\n // called in the context of the style\n function loadedStyle(style) {\n loaded++;\n if (loaded === l && callback) {\n callback();\n }\n }\n for (var i=0, s; (i<l) && (s=styles[i]); i++) {\n this.resolveNode(s, base, loadedStyle);\n }\n }\n};\n\nvar styleResolver = new StyleResolver();\n\n// exports\nscope.styleResolver = styleResolver;\n\n})(window.Platform);\n","// Copyright (c) 2014 The Polymer Project Authors. All rights reserved.\n// This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt\n// The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt\n// The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt\n// Code distributed by Google as part of the polymer project is also\n// subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt\n\n(function(global) {\n 'use strict';\n\n var filter = Array.prototype.filter.call.bind(Array.prototype.filter);\n\n function getTreeScope(node) {\n while (node.parentNode) {\n node = node.parentNode;\n }\n\n return typeof node.getElementById === 'function' ? node : null;\n }\n\n Node.prototype.bind = function(name, observable) {\n console.error('Unhandled binding to Node: ', this, name, observable);\n };\n\n Node.prototype.bindFinished = function() {};\n\n function updateBindings(node, name, binding) {\n var bindings = node.bindings_;\n if (!bindings)\n bindings = node.bindings_ = {};\n\n if (bindings[name])\n binding[name].close();\n\n return bindings[name] = binding;\n }\n\n function returnBinding(node, name, binding) {\n return binding;\n }\n\n function sanitizeValue(value) {\n return value == null ? '' : value;\n }\n\n function updateText(node, value) {\n node.data = sanitizeValue(value);\n }\n\n function textBinding(node) {\n return function(value) {\n return updateText(node, value);\n };\n }\n\n var maybeUpdateBindings = returnBinding;\n\n Object.defineProperty(Platform, 'enableBindingsReflection', {\n get: function() {\n return maybeUpdateBindings === updateBindings;\n },\n set: function(enable) {\n maybeUpdateBindings = enable ? updateBindings : returnBinding;\n return enable;\n },\n configurable: true\n });\n\n Text.prototype.bind = function(name, value, oneTime) {\n if (name !== 'textContent')\n return Node.prototype.bind.call(this, name, value, oneTime);\n\n if (oneTime)\n return updateText(this, value);\n\n var observable = value;\n updateText(this, observable.open(textBinding(this)));\n return maybeUpdateBindings(this, name, observable);\n }\n\n function updateAttribute(el, name, conditional, value) {\n if (conditional) {\n if (value)\n el.setAttribute(name, '');\n else\n el.removeAttribute(name);\n return;\n }\n\n el.setAttribute(name, sanitizeValue(value));\n }\n\n function attributeBinding(el, name, conditional) {\n return function(value) {\n updateAttribute(el, name, conditional, value);\n };\n }\n\n Element.prototype.bind = function(name, value, oneTime) {\n var conditional = name[name.length - 1] == '?';\n if (conditional) {\n this.removeAttribute(name);\n name = name.slice(0, -1);\n }\n\n if (oneTime)\n return updateAttribute(this, name, conditional, value);\n\n\n var observable = value;\n updateAttribute(this, name, conditional,\n observable.open(attributeBinding(this, name, conditional)));\n\n return maybeUpdateBindings(this, name, observable);\n };\n\n var checkboxEventType;\n (function() {\n // Attempt to feature-detect which event (change or click) is fired first\n // for checkboxes.\n var div = document.createElement('div');\n var checkbox = div.appendChild(document.createElement('input'));\n checkbox.setAttribute('type', 'checkbox');\n var first;\n var count = 0;\n checkbox.addEventListener('click', function(e) {\n count++;\n first = first || 'click';\n });\n checkbox.addEventListener('change', function() {\n count++;\n first = first || 'change';\n });\n\n var event = document.createEvent('MouseEvent');\n event.initMouseEvent(\"click\", true, true, window, 0, 0, 0, 0, 0, false,\n false, false, false, 0, null);\n checkbox.dispatchEvent(event);\n // WebKit/Blink don't fire the change event if the element is outside the\n // document, so assume 'change' for that case.\n checkboxEventType = count == 1 ? 'change' : first;\n })();\n\n function getEventForInputType(element) {\n switch (element.type) {\n case 'checkbox':\n return checkboxEventType;\n case 'radio':\n case 'select-multiple':\n case 'select-one':\n return 'change';\n case 'range':\n if (/Trident|MSIE/.test(navigator.userAgent))\n return 'change';\n default:\n return 'input';\n }\n }\n\n function updateInput(input, property, value, santizeFn) {\n input[property] = (santizeFn || sanitizeValue)(value);\n }\n\n function inputBinding(input, property, santizeFn) {\n return function(value) {\n return updateInput(input, property, value, santizeFn);\n }\n }\n\n function noop() {}\n\n function bindInputEvent(input, property, observable, postEventFn) {\n var eventType = getEventForInputType(input);\n\n function eventHandler() {\n observable.setValue(input[property]);\n observable.discardChanges();\n (postEventFn || noop)(input);\n Platform.performMicrotaskCheckpoint();\n }\n input.addEventListener(eventType, eventHandler);\n\n return {\n close: function() {\n input.removeEventListener(eventType, eventHandler);\n observable.close();\n },\n\n observable_: observable\n }\n }\n\n function booleanSanitize(value) {\n return Boolean(value);\n }\n\n // |element| is assumed to be an HTMLInputElement with |type| == 'radio'.\n // Returns an array containing all radio buttons other than |element| that\n // have the same |name|, either in the form that |element| belongs to or,\n // if no form, in the document tree to which |element| belongs.\n //\n // This implementation is based upon the HTML spec definition of a\n // \"radio button group\":\n // http://www.whatwg.org/specs/web-apps/current-work/multipage/number-state.html#radio-button-group\n //\n function getAssociatedRadioButtons(element) {\n if (element.form) {\n return filter(element.form.elements, function(el) {\n return el != element &&\n el.tagName == 'INPUT' &&\n el.type == 'radio' &&\n el.name == element.name;\n });\n } else {\n var treeScope = getTreeScope(element);\n if (!treeScope)\n return [];\n var radios = treeScope.querySelectorAll(\n 'input[type=\"radio\"][name=\"' + element.name + '\"]');\n return filter(radios, function(el) {\n return el != element && !el.form;\n });\n }\n }\n\n function checkedPostEvent(input) {\n // Only the radio button that is getting checked gets an event. We\n // therefore find all the associated radio buttons and update their\n // check binding manually.\n if (input.tagName === 'INPUT' &&\n input.type === 'radio') {\n getAssociatedRadioButtons(input).forEach(function(radio) {\n var checkedBinding = radio.bindings_.checked;\n if (checkedBinding) {\n // Set the value directly to avoid an infinite call stack.\n checkedBinding.observable_.setValue(false);\n }\n });\n }\n }\n\n HTMLInputElement.prototype.bind = function(name, value, oneTime) {\n if (name !== 'value' && name !== 'checked')\n return HTMLElement.prototype.bind.call(this, name, value, oneTime);\n\n this.removeAttribute(name);\n var sanitizeFn = name == 'checked' ? booleanSanitize : sanitizeValue;\n var postEventFn = name == 'checked' ? checkedPostEvent : noop;\n\n if (oneTime)\n return updateInput(this, name, value, sanitizeFn);\n\n\n var observable = value;\n var binding = bindInputEvent(this, name, observable, postEventFn);\n updateInput(this, name,\n observable.open(inputBinding(this, name, sanitizeFn)),\n sanitizeFn);\n\n // Checkboxes may need to update bindings of other checkboxes.\n return updateBindings(this, name, binding);\n }\n\n HTMLTextAreaElement.prototype.bind = function(name, value, oneTime) {\n if (name !== 'value')\n return HTMLElement.prototype.bind.call(this, name, value, oneTime);\n\n this.removeAttribute('value');\n\n if (oneTime)\n return updateInput(this, 'value', value);\n\n var observable = value;\n var binding = bindInputEvent(this, 'value', observable);\n updateInput(this, 'value',\n observable.open(inputBinding(this, 'value', sanitizeValue)));\n return maybeUpdateBindings(this, name, binding);\n }\n\n function updateOption(option, value) {\n var parentNode = option.parentNode;;\n var select;\n var selectBinding;\n var oldValue;\n if (parentNode instanceof HTMLSelectElement &&\n parentNode.bindings_ &&\n parentNode.bindings_.value) {\n select = parentNode;\n selectBinding = select.bindings_.value;\n oldValue = select.value;\n }\n\n option.value = sanitizeValue(value);\n\n if (select && select.value != oldValue) {\n selectBinding.observable_.setValue(select.value);\n selectBinding.observable_.discardChanges();\n Platform.performMicrotaskCheckpoint();\n }\n }\n\n function optionBinding(option) {\n return function(value) {\n updateOption(option, value);\n }\n }\n\n HTMLOptionElement.prototype.bind = function(name, value, oneTime) {\n if (name !== 'value')\n return HTMLElement.prototype.bind.call(this, name, value, oneTime);\n\n this.removeAttribute('value');\n\n if (oneTime)\n return updateOption(this, value);\n\n var observable = value;\n var binding = bindInputEvent(this, 'value', observable);\n updateOption(this, observable.open(optionBinding(this)));\n return maybeUpdateBindings(this, name, binding);\n }\n\n HTMLSelectElement.prototype.bind = function(name, value, oneTime) {\n if (name === 'selectedindex')\n name = 'selectedIndex';\n\n if (name !== 'selectedIndex' && name !== 'value')\n return HTMLElement.prototype.bind.call(this, name, value, oneTime);\n\n this.removeAttribute(name);\n\n if (oneTime)\n return updateInput(this, name, value);\n\n var observable = value;\n var binding = bindInputEvent(this, name, observable);\n updateInput(this, name,\n observable.open(inputBinding(this, name)));\n\n // Option update events may need to access select bindings.\n return updateBindings(this, name, binding);\n }\n})(this);\n","// Copyright (c) 2014 The Polymer Project Authors. All rights reserved.\n// This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt\n// The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt\n// The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt\n// Code distributed by Google as part of the polymer project is also\n// subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt\n\n(function(global) {\n 'use strict';\n\n function assert(v) {\n if (!v)\n throw new Error('Assertion failed');\n }\n\n var forEach = Array.prototype.forEach.call.bind(Array.prototype.forEach);\n\n function getFragmentRoot(node) {\n var p;\n while (p = node.parentNode) {\n node = p;\n }\n\n return node;\n }\n\n function searchRefId(node, id) {\n if (!id)\n return;\n\n var ref;\n var selector = '#' + id;\n while (!ref) {\n node = getFragmentRoot(node);\n\n if (node.protoContent_)\n ref = node.protoContent_.querySelector(selector);\n else if (node.getElementById)\n ref = node.getElementById(id);\n\n if (ref || !node.templateCreator_)\n break\n\n node = node.templateCreator_;\n }\n\n return ref;\n }\n\n function getInstanceRoot(node) {\n while (node.parentNode) {\n node = node.parentNode;\n }\n return node.templateCreator_ ? node : null;\n }\n\n var Map;\n if (global.Map && typeof global.Map.prototype.forEach === 'function') {\n Map = global.Map;\n } else {\n Map = function() {\n this.keys = [];\n this.values = [];\n };\n\n Map.prototype = {\n set: function(key, value) {\n var index = this.keys.indexOf(key);\n if (index < 0) {\n this.keys.push(key);\n this.values.push(value);\n } else {\n this.values[index] = value;\n }\n },\n\n get: function(key) {\n var index = this.keys.indexOf(key);\n if (index < 0)\n return;\n\n return this.values[index];\n },\n\n delete: function(key, value) {\n var index = this.keys.indexOf(key);\n if (index < 0)\n return false;\n\n this.keys.splice(index, 1);\n this.values.splice(index, 1);\n return true;\n },\n\n forEach: function(f, opt_this) {\n for (var i = 0; i < this.keys.length; i++)\n f.call(opt_this || this, this.values[i], this.keys[i], this);\n }\n };\n }\n\n // JScript does not have __proto__. We wrap all object literals with\n // createObject which uses Object.create, Object.defineProperty and\n // Object.getOwnPropertyDescriptor to create a new object that does the exact\n // same thing. The main downside to this solution is that we have to extract\n // all those property descriptors for IE.\n var createObject = ('__proto__' in {}) ?\n function(obj) { return obj; } :\n function(obj) {\n var proto = obj.__proto__;\n if (!proto)\n return obj;\n var newObject = Object.create(proto);\n Object.getOwnPropertyNames(obj).forEach(function(name) {\n Object.defineProperty(newObject, name,\n Object.getOwnPropertyDescriptor(obj, name));\n });\n return newObject;\n };\n\n // IE does not support have Document.prototype.contains.\n if (typeof document.contains != 'function') {\n Document.prototype.contains = function(node) {\n if (node === this || node.parentNode === this)\n return true;\n return this.documentElement.contains(node);\n }\n }\n\n var BIND = 'bind';\n var REPEAT = 'repeat';\n var IF = 'if';\n\n var templateAttributeDirectives = {\n 'template': true,\n 'repeat': true,\n 'bind': true,\n 'ref': true\n };\n\n var semanticTemplateElements = {\n 'THEAD': true,\n 'TBODY': true,\n 'TFOOT': true,\n 'TH': true,\n 'TR': true,\n 'TD': true,\n 'COLGROUP': true,\n 'COL': true,\n 'CAPTION': true,\n 'OPTION': true,\n 'OPTGROUP': true\n };\n\n var hasTemplateElement = typeof HTMLTemplateElement !== 'undefined';\n if (hasTemplateElement) {\n // TODO(rafaelw): Remove when fix for\n // https://codereview.chromium.org/164803002/\n // makes it to Chrome release.\n (function() {\n var t = document.createElement('template');\n var d = t.content.ownerDocument;\n var html = d.appendChild(d.createElement('html'));\n var head = html.appendChild(d.createElement('head'));\n var base = d.createElement('base');\n base.href = document.baseURI;\n head.appendChild(base);\n })();\n }\n\n var allTemplatesSelectors = 'template, ' +\n Object.keys(semanticTemplateElements).map(function(tagName) {\n return tagName.toLowerCase() + '[template]';\n }).join(', ');\n\n function isSVGTemplate(el) {\n return el.tagName == 'template' &&\n el.namespaceURI == 'http://www.w3.org/2000/svg';\n }\n\n function isHTMLTemplate(el) {\n return el.tagName == 'TEMPLATE' &&\n el.namespaceURI == 'http://www.w3.org/1999/xhtml';\n }\n\n function isAttributeTemplate(el) {\n return Boolean(semanticTemplateElements[el.tagName] &&\n el.hasAttribute('template'));\n }\n\n function isTemplate(el) {\n if (el.isTemplate_ === undefined)\n el.isTemplate_ = el.tagName == 'TEMPLATE' || isAttributeTemplate(el);\n\n return el.isTemplate_;\n }\n\n // FIXME: Observe templates being added/removed from documents\n // FIXME: Expose imperative API to decorate and observe templates in\n // \"disconnected tress\" (e.g. ShadowRoot)\n document.addEventListener('DOMContentLoaded', function(e) {\n bootstrapTemplatesRecursivelyFrom(document);\n // FIXME: Is this needed? Seems like it shouldn't be.\n Platform.performMicrotaskCheckpoint();\n }, false);\n\n function forAllTemplatesFrom(node, fn) {\n var subTemplates = node.querySelectorAll(allTemplatesSelectors);\n\n if (isTemplate(node))\n fn(node)\n forEach(subTemplates, fn);\n }\n\n function bootstrapTemplatesRecursivelyFrom(node) {\n function bootstrap(template) {\n if (!HTMLTemplateElement.decorate(template))\n bootstrapTemplatesRecursivelyFrom(template.content);\n }\n\n forAllTemplatesFrom(node, bootstrap);\n }\n\n if (!hasTemplateElement) {\n /**\n * This represents a <template> element.\n * @constructor\n * @extends {HTMLElement}\n */\n global.HTMLTemplateElement = function() {\n throw TypeError('Illegal constructor');\n };\n }\n\n var hasProto = '__proto__' in {};\n\n function mixin(to, from) {\n Object.getOwnPropertyNames(from).forEach(function(name) {\n Object.defineProperty(to, name,\n Object.getOwnPropertyDescriptor(from, name));\n });\n }\n\n // http://dvcs.w3.org/hg/webcomponents/raw-file/tip/spec/templates/index.html#dfn-template-contents-owner\n function getOrCreateTemplateContentsOwner(template) {\n var doc = template.ownerDocument\n if (!doc.defaultView)\n return doc;\n var d = doc.templateContentsOwner_;\n if (!d) {\n // TODO(arv): This should either be a Document or HTMLDocument depending\n // on doc.\n d = doc.implementation.createHTMLDocument('');\n while (d.lastChild) {\n d.removeChild(d.lastChild);\n }\n doc.templateContentsOwner_ = d;\n }\n return d;\n }\n\n function getTemplateStagingDocument(template) {\n if (!template.stagingDocument_) {\n var owner = template.ownerDocument;\n if (!owner.stagingDocument_) {\n owner.stagingDocument_ = owner.implementation.createHTMLDocument('');\n owner.stagingDocument_.isStagingDocument = true;\n // TODO(rafaelw): Remove when fix for\n // https://codereview.chromium.org/164803002/\n // makes it to Chrome release.\n var base = owner.stagingDocument_.createElement('base');\n base.href = document.baseURI;\n owner.stagingDocument_.head.appendChild(base);\n\n owner.stagingDocument_.stagingDocument_ = owner.stagingDocument_;\n }\n\n template.stagingDocument_ = owner.stagingDocument_;\n }\n\n return template.stagingDocument_;\n }\n\n // For non-template browsers, the parser will disallow <template> in certain\n // locations, so we allow \"attribute templates\" which combine the template\n // element with the top-level container node of the content, e.g.\n //\n // <tr template repeat=\"{{ foo }}\"\" class=\"bar\"><td>Bar</td></tr>\n //\n // becomes\n //\n // <template repeat=\"{{ foo }}\">\n // + #document-fragment\n // + <tr class=\"bar\">\n // + <td>Bar</td>\n //\n function extractTemplateFromAttributeTemplate(el) {\n var template = el.ownerDocument.createElement('template');\n el.parentNode.insertBefore(template, el);\n\n var attribs = el.attributes;\n var count = attribs.length;\n while (count-- > 0) {\n var attrib = attribs[count];\n if (templateAttributeDirectives[attrib.name]) {\n if (attrib.name !== 'template')\n template.setAttribute(attrib.name, attrib.value);\n el.removeAttribute(attrib.name);\n }\n }\n\n return template;\n }\n\n function extractTemplateFromSVGTemplate(el) {\n var template = el.ownerDocument.createElement('template');\n el.parentNode.insertBefore(template, el);\n\n var attribs = el.attributes;\n var count = attribs.length;\n while (count-- > 0) {\n var attrib = attribs[count];\n template.setAttribute(attrib.name, attrib.value);\n el.removeAttribute(attrib.name);\n }\n\n el.parentNode.removeChild(el);\n return template;\n }\n\n function liftNonNativeTemplateChildrenIntoContent(template, el, useRoot) {\n var content = template.content;\n if (useRoot) {\n content.appendChild(el);\n return;\n }\n\n var child;\n while (child = el.firstChild) {\n content.appendChild(child);\n }\n }\n\n var templateObserver;\n if (typeof MutationObserver == 'function') {\n templateObserver = new MutationObserver(function(records) {\n for (var i = 0; i < records.length; i++) {\n records[i].target.refChanged_();\n }\n });\n }\n\n /**\n * Ensures proper API and content model for template elements.\n * @param {HTMLTemplateElement} opt_instanceRef The template element which\n * |el| template element will return as the value of its ref(), and whose\n * content will be used as source when createInstance() is invoked.\n */\n HTMLTemplateElement.decorate = function(el, opt_instanceRef) {\n if (el.templateIsDecorated_)\n return false;\n\n var templateElement = el;\n templateElement.templateIsDecorated_ = true;\n\n var isNativeHTMLTemplate = isHTMLTemplate(templateElement) &&\n hasTemplateElement;\n var bootstrapContents = isNativeHTMLTemplate;\n var liftContents = !isNativeHTMLTemplate;\n var liftRoot = false;\n\n if (!isNativeHTMLTemplate) {\n if (isAttributeTemplate(templateElement)) {\n assert(!opt_instanceRef);\n templateElement = extractTemplateFromAttributeTemplate(el);\n templateElement.templateIsDecorated_ = true;\n isNativeHTMLTemplate = hasTemplateElement;\n liftRoot = true;\n } else if (isSVGTemplate(templateElement)) {\n templateElement = extractTemplateFromSVGTemplate(el);\n templateElement.templateIsDecorated_ = true;\n isNativeHTMLTemplate = hasTemplateElement;\n }\n }\n\n if (!isNativeHTMLTemplate) {\n fixTemplateElementPrototype(templateElement);\n var doc = getOrCreateTemplateContentsOwner(templateElement);\n templateElement.content_ = doc.createDocumentFragment();\n }\n\n if (opt_instanceRef) {\n // template is contained within an instance, its direct content must be\n // empty\n templateElement.instanceRef_ = opt_instanceRef;\n } else if (liftContents) {\n liftNonNativeTemplateChildrenIntoContent(templateElement,\n el,\n liftRoot);\n } else if (bootstrapContents) {\n bootstrapTemplatesRecursivelyFrom(templateElement.content);\n }\n\n return true;\n };\n\n // TODO(rafaelw): This used to decorate recursively all templates from a given\n // node. This happens by default on 'DOMContentLoaded', but may be needed\n // in subtrees not descendent from document (e.g. ShadowRoot).\n // Review whether this is the right public API.\n HTMLTemplateElement.bootstrap = bootstrapTemplatesRecursivelyFrom;\n\n var htmlElement = global.HTMLUnknownElement || HTMLElement;\n\n var contentDescriptor = {\n get: function() {\n return this.content_;\n },\n enumerable: true,\n configurable: true\n };\n\n if (!hasTemplateElement) {\n // Gecko is more picky with the prototype than WebKit. Make sure to use the\n // same prototype as created in the constructor.\n HTMLTemplateElement.prototype = Object.create(htmlElement.prototype);\n\n Object.defineProperty(HTMLTemplateElement.prototype, 'content',\n contentDescriptor);\n }\n\n function fixTemplateElementPrototype(el) {\n if (hasProto)\n el.__proto__ = HTMLTemplateElement.prototype;\n else\n mixin(el, HTMLTemplateElement.prototype);\n }\n\n function ensureSetModelScheduled(template) {\n if (!template.setModelFn_) {\n template.setModelFn_ = function() {\n template.setModelFnScheduled_ = false;\n var map = getBindings(template,\n template.delegate_ && template.delegate_.prepareBinding);\n processBindings(template, map, template.model_);\n };\n }\n\n if (!template.setModelFnScheduled_) {\n template.setModelFnScheduled_ = true;\n Observer.runEOM_(template.setModelFn_);\n }\n }\n\n mixin(HTMLTemplateElement.prototype, {\n bind: function(name, value, oneTime) {\n if (name != 'ref')\n return Element.prototype.bind.call(this, name, value, oneTime);\n\n var self = this;\n var ref = oneTime ? value : value.open(function(ref) {\n self.setAttribute('ref', ref);\n self.refChanged_();\n });\n\n this.setAttribute('ref', ref);\n this.refChanged_();\n if (oneTime)\n return;\n\n if (!this.bindings_) {\n this.bindings_ = { ref: value };\n } else {\n this.bindings_.ref = value;\n }\n\n return value;\n },\n\n processBindingDirectives_: function(directives) {\n if (this.iterator_)\n this.iterator_.closeDeps();\n\n if (!directives.if && !directives.bind && !directives.repeat) {\n if (this.iterator_) {\n this.iterator_.close();\n this.iterator_ = undefined;\n }\n\n return;\n }\n\n if (!this.iterator_) {\n this.iterator_ = new TemplateIterator(this);\n }\n\n this.iterator_.updateDependencies(directives, this.model_);\n\n if (templateObserver) {\n templateObserver.observe(this, { attributes: true,\n attributeFilter: ['ref'] });\n }\n\n return this.iterator_;\n },\n\n createInstance: function(model, bindingDelegate, delegate_) {\n if (bindingDelegate)\n delegate_ = this.newDelegate_(bindingDelegate);\n else if (!delegate_)\n delegate_ = this.delegate_;\n\n if (!this.refContent_)\n this.refContent_ = this.ref_.content;\n var content = this.refContent_;\n if (content.firstChild === null)\n return emptyInstance;\n\n var map = getInstanceBindingMap(content, delegate_);\n var stagingDocument = getTemplateStagingDocument(this);\n var instance = stagingDocument.createDocumentFragment();\n instance.templateCreator_ = this;\n instance.protoContent_ = content;\n instance.bindings_ = [];\n instance.terminator_ = null;\n var instanceRecord = instance.templateInstance_ = {\n firstNode: null,\n lastNode: null,\n model: model\n };\n\n var i = 0;\n var collectTerminator = false;\n for (var child = content.firstChild; child; child = child.nextSibling) {\n // The terminator of the instance is the clone of the last child of the\n // content. If the last child is an active template, it may produce\n // instances as a result of production, so simply collecting the last\n // child of the instance after it has finished producing may be wrong.\n if (child.nextSibling === null)\n collectTerminator = true;\n\n var clone = cloneAndBindInstance(child, instance, stagingDocument,\n map.children[i++],\n model,\n delegate_,\n instance.bindings_);\n clone.templateInstance_ = instanceRecord;\n if (collectTerminator)\n instance.terminator_ = clone;\n }\n\n instanceRecord.firstNode = instance.firstChild;\n instanceRecord.lastNode = instance.lastChild;\n instance.templateCreator_ = undefined;\n instance.protoContent_ = undefined;\n return instance;\n },\n\n get model() {\n return this.model_;\n },\n\n set model(model) {\n this.model_ = model;\n ensureSetModelScheduled(this);\n },\n\n get bindingDelegate() {\n return this.delegate_ && this.delegate_.raw;\n },\n\n refChanged_: function() {\n if (!this.iterator_ || this.refContent_ === this.ref_.content)\n return;\n\n this.refContent_ = undefined;\n this.iterator_.valueChanged();\n this.iterator_.updateIteratedValue();\n },\n\n clear: function() {\n this.model_ = undefined;\n this.delegate_ = undefined;\n if (this.bindings_ && this.bindings_.ref)\n this.bindings_.ref.close()\n this.refContent_ = undefined;\n if (!this.iterator_)\n return;\n this.iterator_.valueChanged();\n this.iterator_.close()\n this.iterator_ = undefined;\n },\n\n setDelegate_: function(delegate) {\n this.delegate_ = delegate;\n this.bindingMap_ = undefined;\n if (this.iterator_) {\n this.iterator_.instancePositionChangedFn_ = undefined;\n this.iterator_.instanceModelFn_ = undefined;\n }\n },\n\n newDelegate_: function(bindingDelegate) {\n if (!bindingDelegate)\n return;\n\n function delegateFn(name) {\n var fn = bindingDelegate && bindingDelegate[name];\n if (typeof fn != 'function')\n return;\n\n return function() {\n return fn.apply(bindingDelegate, arguments);\n };\n }\n\n return {\n bindingMaps: {},\n raw: bindingDelegate,\n prepareBinding: delegateFn('prepareBinding'),\n prepareInstanceModel: delegateFn('prepareInstanceModel'),\n prepareInstancePositionChanged:\n delegateFn('prepareInstancePositionChanged')\n };\n },\n\n set bindingDelegate(bindingDelegate) {\n if (this.delegate_) {\n throw Error('Template must be cleared before a new bindingDelegate ' +\n 'can be assigned');\n }\n\n this.setDelegate_(this.newDelegate_(bindingDelegate));\n },\n\n get ref_() {\n var ref = searchRefId(this, this.getAttribute('ref'));\n if (!ref)\n ref = this.instanceRef_;\n\n if (!ref)\n return this;\n\n var nextRef = ref.ref_;\n return nextRef ? nextRef : ref;\n }\n });\n\n // Returns\n // a) undefined if there are no mustaches.\n // b) [TEXT, (ONE_TIME?, PATH, DELEGATE_FN, TEXT)+] if there is at least one mustache.\n function parseMustaches(s, name, node, prepareBindingFn) {\n if (!s || !s.length)\n return;\n\n var tokens;\n var length = s.length;\n var startIndex = 0, lastIndex = 0, endIndex = 0;\n var onlyOneTime = true;\n while (lastIndex < length) {\n var startIndex = s.indexOf('{{', lastIndex);\n var oneTimeStart = s.indexOf('[[', lastIndex);\n var oneTime = false;\n var terminator = '}}';\n\n if (oneTimeStart >= 0 &&\n (startIndex < 0 || oneTimeStart < startIndex)) {\n startIndex = oneTimeStart;\n oneTime = true;\n terminator = ']]';\n }\n\n endIndex = startIndex < 0 ? -1 : s.indexOf(terminator, startIndex + 2);\n\n if (endIndex < 0) {\n if (!tokens)\n return;\n\n tokens.push(s.slice(lastIndex)); // TEXT\n break;\n }\n\n tokens = tokens || [];\n tokens.push(s.slice(lastIndex, startIndex)); // TEXT\n var pathString = s.slice(startIndex + 2, endIndex).trim();\n tokens.push(oneTime); // ONE_TIME?\n onlyOneTime = onlyOneTime && oneTime;\n var delegateFn = prepareBindingFn &&\n prepareBindingFn(pathString, name, node);\n // Don't try to parse the expression if there's a prepareBinding function\n if (delegateFn == null) {\n tokens.push(Path.get(pathString)); // PATH\n } else {\n tokens.push(null);\n }\n tokens.push(delegateFn); // DELEGATE_FN\n lastIndex = endIndex + 2;\n }\n\n if (lastIndex === length)\n tokens.push(''); // TEXT\n\n tokens.hasOnePath = tokens.length === 5;\n tokens.isSimplePath = tokens.hasOnePath &&\n tokens[0] == '' &&\n tokens[4] == '';\n tokens.onlyOneTime = onlyOneTime;\n\n tokens.combinator = function(values) {\n var newValue = tokens[0];\n\n for (var i = 1; i < tokens.length; i += 4) {\n var value = tokens.hasOnePath ? values : values[(i - 1) / 4];\n if (value !== undefined)\n newValue += value;\n newValue += tokens[i + 3];\n }\n\n return newValue;\n }\n\n return tokens;\n };\n\n function processOneTimeBinding(name, tokens, node, model) {\n if (tokens.hasOnePath) {\n var delegateFn = tokens[3];\n var value = delegateFn ? delegateFn(model, node, true) :\n tokens[2].getValueFrom(model);\n return tokens.isSimplePath ? value : tokens.combinator(value);\n }\n\n var values = [];\n for (var i = 1; i < tokens.length; i += 4) {\n var delegateFn = tokens[i + 2];\n values[(i - 1) / 4] = delegateFn ? delegateFn(model, node) :\n tokens[i + 1].getValueFrom(model);\n }\n\n return tokens.combinator(values);\n }\n\n function processSinglePathBinding(name, tokens, node, model) {\n var delegateFn = tokens[3];\n var observer = delegateFn ? delegateFn(model, node, false) :\n new PathObserver(model, tokens[2]);\n\n return tokens.isSimplePath ? observer :\n new ObserverTransform(observer, tokens.combinator);\n }\n\n function processBinding(name, tokens, node, model) {\n if (tokens.onlyOneTime)\n return processOneTimeBinding(name, tokens, node, model);\n\n if (tokens.hasOnePath)\n return processSinglePathBinding(name, tokens, node, model);\n\n var observer = new CompoundObserver();\n\n for (var i = 1; i < tokens.length; i += 4) {\n var oneTime = tokens[i];\n var delegateFn = tokens[i + 2];\n\n if (delegateFn) {\n var value = delegateFn(model, node, oneTime);\n if (oneTime)\n observer.addPath(value)\n else\n observer.addObserver(value);\n continue;\n }\n\n var path = tokens[i + 1];\n if (oneTime)\n observer.addPath(path.getValueFrom(model))\n else\n observer.addPath(model, path);\n }\n\n return new ObserverTransform(observer, tokens.combinator);\n }\n\n function processBindings(node, bindings, model, instanceBindings) {\n for (var i = 0; i < bindings.length; i += 2) {\n var name = bindings[i]\n var tokens = bindings[i + 1];\n var value = processBinding(name, tokens, node, model);\n var binding = node.bind(name, value, tokens.onlyOneTime);\n if (binding && instanceBindings)\n instanceBindings.push(binding);\n }\n\n node.bindFinished();\n if (!bindings.isTemplate)\n return;\n\n node.model_ = model;\n var iter = node.processBindingDirectives_(bindings);\n if (instanceBindings && iter)\n instanceBindings.push(iter);\n }\n\n function parseWithDefault(el, name, prepareBindingFn) {\n var v = el.getAttribute(name);\n return parseMustaches(v == '' ? '{{}}' : v, name, el, prepareBindingFn);\n }\n\n function parseAttributeBindings(element, prepareBindingFn) {\n assert(element);\n\n var bindings = [];\n var ifFound = false;\n var bindFound = false;\n\n for (var i = 0; i < element.attributes.length; i++) {\n var attr = element.attributes[i];\n var name = attr.name;\n var value = attr.value;\n\n // Allow bindings expressed in attributes to be prefixed with underbars.\n // We do this to allow correct semantics for browsers that don't implement\n // <template> where certain attributes might trigger side-effects -- and\n // for IE which sanitizes certain attributes, disallowing mustache\n // replacements in their text.\n while (name[0] === '_') {\n name = name.substring(1);\n }\n\n if (isTemplate(element) &&\n (name === IF || name === BIND || name === REPEAT)) {\n continue;\n }\n\n var tokens = parseMustaches(value, name, element,\n prepareBindingFn);\n if (!tokens)\n continue;\n\n bindings.push(name, tokens);\n }\n\n if (isTemplate(element)) {\n bindings.isTemplate = true;\n bindings.if = parseWithDefault(element, IF, prepareBindingFn);\n bindings.bind = parseWithDefault(element, BIND, prepareBindingFn);\n bindings.repeat = parseWithDefault(element, REPEAT, prepareBindingFn);\n\n if (bindings.if && !bindings.bind && !bindings.repeat)\n bindings.bind = parseMustaches('{{}}', BIND, element, prepareBindingFn);\n }\n\n return bindings;\n }\n\n function getBindings(node, prepareBindingFn) {\n if (node.nodeType === Node.ELEMENT_NODE)\n return parseAttributeBindings(node, prepareBindingFn);\n\n if (node.nodeType === Node.TEXT_NODE) {\n var tokens = parseMustaches(node.data, 'textContent', node,\n prepareBindingFn);\n if (tokens)\n return ['textContent', tokens];\n }\n\n return [];\n }\n\n function cloneAndBindInstance(node, parent, stagingDocument, bindings, model,\n delegate,\n instanceBindings,\n instanceRecord) {\n var clone = parent.appendChild(stagingDocument.importNode(node, false));\n\n var i = 0;\n for (var child = node.firstChild; child; child = child.nextSibling) {\n cloneAndBindInstance(child, clone, stagingDocument,\n bindings.children[i++],\n model,\n delegate,\n instanceBindings);\n }\n\n if (bindings.isTemplate) {\n HTMLTemplateElement.decorate(clone, node);\n if (delegate)\n clone.setDelegate_(delegate);\n }\n\n processBindings(clone, bindings, model, instanceBindings);\n return clone;\n }\n\n function createInstanceBindingMap(node, prepareBindingFn) {\n var map = getBindings(node, prepareBindingFn);\n map.children = {};\n var index = 0;\n for (var child = node.firstChild; child; child = child.nextSibling) {\n map.children[index++] = createInstanceBindingMap(child, prepareBindingFn);\n }\n\n return map;\n }\n\n var contentUidCounter = 1;\n\n // TODO(rafaelw): Setup a MutationObserver on content which clears the id\n // so that bindingMaps regenerate when the template.content changes.\n function getContentUid(content) {\n var id = content.id_;\n if (!id)\n id = content.id_ = contentUidCounter++;\n return id;\n }\n\n // Each delegate is associated with a set of bindingMaps, one for each\n // content which may be used by a template. The intent is that each binding\n // delegate gets the opportunity to prepare the instance (via the prepare*\n // delegate calls) once across all uses.\n // TODO(rafaelw): Separate out the parse map from the binding map. In the\n // current implementation, if two delegates need a binding map for the same\n // content, the second will have to reparse.\n function getInstanceBindingMap(content, delegate_) {\n var contentId = getContentUid(content);\n if (delegate_) {\n var map = delegate_.bindingMaps[contentId];\n if (!map) {\n map = delegate_.bindingMaps[contentId] =\n createInstanceBindingMap(content, delegate_.prepareBinding) || [];\n }\n return map;\n }\n\n var map = content.bindingMap_;\n if (!map) {\n map = content.bindingMap_ =\n createInstanceBindingMap(content, undefined) || [];\n }\n return map;\n }\n\n Object.defineProperty(Node.prototype, 'templateInstance', {\n get: function() {\n var instance = this.templateInstance_;\n return instance ? instance :\n (this.parentNode ? this.parentNode.templateInstance : undefined);\n }\n });\n\n var emptyInstance = document.createDocumentFragment();\n emptyInstance.bindings_ = [];\n emptyInstance.terminator_ = null;\n\n function TemplateIterator(templateElement) {\n this.closed = false;\n this.templateElement_ = templateElement;\n this.instances = [];\n this.deps = undefined;\n this.iteratedValue = [];\n this.presentValue = undefined;\n this.arrayObserver = undefined;\n }\n\n TemplateIterator.prototype = {\n closeDeps: function() {\n var deps = this.deps;\n if (deps) {\n if (deps.ifOneTime === false)\n deps.ifValue.close();\n if (deps.oneTime === false)\n deps.value.close();\n }\n },\n\n updateDependencies: function(directives, model) {\n this.closeDeps();\n\n var deps = this.deps = {};\n var template = this.templateElement_;\n\n if (directives.if) {\n deps.hasIf = true;\n deps.ifOneTime = directives.if.onlyOneTime;\n deps.ifValue = processBinding(IF, directives.if, template, model);\n\n // oneTime if & predicate is false. nothing else to do.\n if (deps.ifOneTime && !deps.ifValue) {\n this.updateIteratedValue();\n return;\n }\n\n if (!deps.ifOneTime)\n deps.ifValue.open(this.updateIteratedValue, this);\n }\n\n if (directives.repeat) {\n deps.repeat = true;\n deps.oneTime = directives.repeat.onlyOneTime;\n deps.value = processBinding(REPEAT, directives.repeat, template, model);\n } else {\n deps.repeat = false;\n deps.oneTime = directives.bind.onlyOneTime;\n deps.value = processBinding(BIND, directives.bind, template, model);\n }\n\n if (!deps.oneTime)\n deps.value.open(this.updateIteratedValue, this);\n\n this.updateIteratedValue();\n },\n\n updateIteratedValue: function() {\n if (this.deps.hasIf) {\n var ifValue = this.deps.ifValue;\n if (!this.deps.ifOneTime)\n ifValue = ifValue.discardChanges();\n if (!ifValue) {\n this.valueChanged();\n return;\n }\n }\n\n var value = this.deps.value;\n if (!this.deps.oneTime)\n value = value.discardChanges();\n if (!this.deps.repeat)\n value = [value];\n var observe = this.deps.repeat &&\n !this.deps.oneTime &&\n Array.isArray(value);\n this.valueChanged(value, observe);\n },\n\n valueChanged: function(value, observeValue) {\n if (!Array.isArray(value))\n value = [];\n\n if (value === this.iteratedValue)\n return;\n\n this.unobserve();\n this.presentValue = value;\n if (observeValue) {\n this.arrayObserver = new ArrayObserver(this.presentValue);\n this.arrayObserver.open(this.handleSplices, this);\n }\n\n this.handleSplices(ArrayObserver.calculateSplices(this.presentValue,\n this.iteratedValue));\n },\n\n getLastInstanceNode: function(index) {\n if (index == -1)\n return this.templateElement_;\n var instance = this.instances[index];\n var terminator = instance.terminator_;\n if (!terminator)\n return this.getLastInstanceNode(index - 1);\n\n if (terminator.nodeType !== Node.ELEMENT_NODE ||\n this.templateElement_ === terminator) {\n return terminator;\n }\n\n var subtemplateIterator = terminator.iterator_;\n if (!subtemplateIterator)\n return terminator;\n\n return subtemplateIterator.getLastTemplateNode();\n },\n\n getLastTemplateNode: function() {\n return this.getLastInstanceNode(this.instances.length - 1);\n },\n\n insertInstanceAt: function(index, fragment) {\n var previousInstanceLast = this.getLastInstanceNode(index - 1);\n var parent = this.templateElement_.parentNode;\n this.instances.splice(index, 0, fragment);\n\n parent.insertBefore(fragment, previousInstanceLast.nextSibling);\n },\n\n extractInstanceAt: function(index) {\n var previousInstanceLast = this.getLastInstanceNode(index - 1);\n var lastNode = this.getLastInstanceNode(index);\n var parent = this.templateElement_.parentNode;\n var instance = this.instances.splice(index, 1)[0];\n\n while (lastNode !== previousInstanceLast) {\n var node = previousInstanceLast.nextSibling;\n if (node == lastNode)\n lastNode = previousInstanceLast;\n\n instance.appendChild(parent.removeChild(node));\n }\n\n return instance;\n },\n\n getDelegateFn: function(fn) {\n fn = fn && fn(this.templateElement_);\n return typeof fn === 'function' ? fn : null;\n },\n\n handleSplices: function(splices) {\n if (this.closed || !splices.length)\n return;\n\n var template = this.templateElement_;\n\n if (!template.parentNode) {\n this.close();\n return;\n }\n\n ArrayObserver.applySplices(this.iteratedValue, this.presentValue,\n splices);\n\n var delegate = template.delegate_;\n if (this.instanceModelFn_ === undefined) {\n this.instanceModelFn_ =\n this.getDelegateFn(delegate && delegate.prepareInstanceModel);\n }\n\n if (this.instancePositionChangedFn_ === undefined) {\n this.instancePositionChangedFn_ =\n this.getDelegateFn(delegate &&\n delegate.prepareInstancePositionChanged);\n }\n\n // Instance Removals\n var instanceCache = new Map;\n var removeDelta = 0;\n for (var i = 0; i < splices.length; i++) {\n var splice = splices[i];\n var removed = splice.removed;\n for (var j = 0; j < removed.length; j++) {\n var model = removed[j];\n var instance = this.extractInstanceAt(splice.index + removeDelta);\n if (instance !== emptyInstance) {\n instanceCache.set(model, instance);\n }\n }\n\n removeDelta -= splice.addedCount;\n }\n\n // Instance Insertions\n for (var i = 0; i < splices.length; i++) {\n var splice = splices[i];\n var addIndex = splice.index;\n for (; addIndex < splice.index + splice.addedCount; addIndex++) {\n var model = this.iteratedValue[addIndex];\n var instance = instanceCache.get(model);\n if (instance) {\n instanceCache.delete(model);\n } else {\n if (this.instanceModelFn_) {\n model = this.instanceModelFn_(model);\n }\n\n if (model === undefined) {\n instance = emptyInstance;\n } else {\n instance = template.createInstance(model, undefined, delegate);\n }\n }\n\n this.insertInstanceAt(addIndex, instance);\n }\n }\n\n instanceCache.forEach(function(instance) {\n this.closeInstanceBindings(instance);\n }, this);\n\n if (this.instancePositionChangedFn_)\n this.reportInstancesMoved(splices);\n },\n\n reportInstanceMoved: function(index) {\n var instance = this.instances[index];\n if (instance === emptyInstance)\n return;\n\n this.instancePositionChangedFn_(instance.templateInstance_, index);\n },\n\n reportInstancesMoved: function(splices) {\n var index = 0;\n var offset = 0;\n for (var i = 0; i < splices.length; i++) {\n var splice = splices[i];\n if (offset != 0) {\n while (index < splice.index) {\n this.reportInstanceMoved(index);\n index++;\n }\n } else {\n index = splice.index;\n }\n\n while (index < splice.index + splice.addedCount) {\n this.reportInstanceMoved(index);\n index++;\n }\n\n offset += splice.addedCount - splice.removed.length;\n }\n\n if (offset == 0)\n return;\n\n var length = this.instances.length;\n while (index < length) {\n this.reportInstanceMoved(index);\n index++;\n }\n },\n\n closeInstanceBindings: function(instance) {\n var bindings = instance.bindings_;\n for (var i = 0; i < bindings.length; i++) {\n bindings[i].close();\n }\n },\n\n unobserve: function() {\n if (!this.arrayObserver)\n return;\n\n this.arrayObserver.close();\n this.arrayObserver = undefined;\n },\n\n close: function() {\n if (this.closed)\n return;\n this.unobserve();\n for (var i = 0; i < this.instances.length; i++) {\n this.closeInstanceBindings(this.instances[i]);\n }\n\n this.instances.length = 0;\n this.closeDeps();\n this.templateElement_.iterator_ = undefined;\n this.closed = true;\n }\n };\n\n // Polyfill-specific API.\n HTMLTemplateElement.forAllTemplatesFrom_ = forAllTemplatesFrom;\n})(this);\n","/*\n * Copyright (c) 2014 The Polymer Project Authors. All rights reserved.\n * This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt\n * The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt\n * The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt\n * Code distributed by Google as part of the polymer project is also\n * subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt\n */\n\n(function(scope) {\n\n// inject style sheet\nvar style = document.createElement('style');\nstyle.textContent = 'template {display: none !important;} /* injected by platform.js */';\nvar head = document.querySelector('head');\nhead.insertBefore(style, head.firstChild);\n\n// flush (with logging)\nvar flushing;\nfunction flush() {\n if (!flushing) {\n flushing = true;\n scope.endOfMicrotask(function() {\n flushing = false;\n logFlags.data && console.group('Platform.flush()');\n scope.performMicrotaskCheckpoint();\n logFlags.data && console.groupEnd();\n });\n }\n};\n\n// polling dirty checker\n// flush periodically if platform does not have object observe.\nif (!Observer.hasObjectObserve) {\n var FLUSH_POLL_INTERVAL = 125;\n window.addEventListener('WebComponentsReady', function() {\n flush();\n scope.flushPoll = setInterval(flush, FLUSH_POLL_INTERVAL);\n });\n} else {\n // make flush a no-op when we have Object.observe\n flush = function() {};\n}\n\nif (window.CustomElements && !CustomElements.useNative) {\n var originalImportNode = Document.prototype.importNode;\n Document.prototype.importNode = function(node, deep) {\n var imported = originalImportNode.call(this, node, deep);\n CustomElements.upgradeAll(imported);\n return imported;\n }\n}\n\n// exports\nscope.flush = flush;\n\n})(window.Platform);\n\n"]}
\ No newline at end of file diff --git a/third_party/polymer/components/polymer/.bower.json b/third_party/polymer/polymer/.bower.json index 0ccd0d1..0ccd0d1 100644 --- a/third_party/polymer/components/polymer/.bower.json +++ b/third_party/polymer/polymer/.bower.json diff --git a/third_party/polymer/components/polymer/README.md b/third_party/polymer/polymer/README.md index 236a88c..236a88c 100644 --- a/third_party/polymer/components/polymer/README.md +++ b/third_party/polymer/polymer/README.md diff --git a/third_party/polymer/components/polymer/bower.json b/third_party/polymer/polymer/bower.json index faff32b..faff32b 100644 --- a/third_party/polymer/components/polymer/bower.json +++ b/third_party/polymer/polymer/bower.json diff --git a/third_party/polymer/components/polymer/build.log b/third_party/polymer/polymer/build.log index b39ce40..b39ce40 100644 --- a/third_party/polymer/components/polymer/build.log +++ b/third_party/polymer/polymer/build.log diff --git a/third_party/polymer/components/polymer/layout.html b/third_party/polymer/polymer/layout.html index 46dec0a..46dec0a 100644 --- a/third_party/polymer/components/polymer/layout.html +++ b/third_party/polymer/polymer/layout.html diff --git a/third_party/polymer/components/polymer/polymer.html b/third_party/polymer/polymer/polymer.html index 424006a..424006a 100644 --- a/third_party/polymer/components/polymer/polymer.html +++ b/third_party/polymer/polymer/polymer.html diff --git a/third_party/polymer/components/polymer/polymer.js b/third_party/polymer/polymer/polymer.js index 8d46df3..8d46df3 100644 --- a/third_party/polymer/components/polymer/polymer.js +++ b/third_party/polymer/polymer/polymer.js diff --git a/third_party/polymer/components/polymer/polymer.js.map b/third_party/polymer/polymer/polymer.js.map index 81afef8..81afef8 100644 --- a/third_party/polymer/components/polymer/polymer.js.map +++ b/third_party/polymer/polymer/polymer.js.map |