update polymer

This commit is contained in:
Luke Pulverenti 2015-11-17 11:35:09 -05:00
parent 64e22073e0
commit 3223d4672a
55 changed files with 359 additions and 253 deletions

View File

@ -31,6 +31,6 @@
"commit": "34fc5e4a0f252964ed2790138b8d7d30d04b55c1" "commit": "34fc5e4a0f252964ed2790138b8d7d30d04b55c1"
}, },
"_source": "git://github.com/desandro/get-style-property.git", "_source": "git://github.com/desandro/get-style-property.git",
"_target": "~1.0.4", "_target": "1.x",
"_originalSource": "get-style-property" "_originalSource": "get-style-property"
} }

View File

@ -1,6 +1,6 @@
{ {
"name": "iron-behaviors", "name": "iron-behaviors",
"version": "1.0.10", "version": "1.0.11",
"description": "Provides a set of behaviors for the iron elements", "description": "Provides a set of behaviors for the iron elements",
"private": true, "private": true,
"authors": [ "authors": [
@ -16,25 +16,27 @@
], ],
"license": "http://polymer.github.io/LICENSE.txt", "license": "http://polymer.github.io/LICENSE.txt",
"dependencies": { "dependencies": {
"polymer": "Polymer/polymer#^1.0.0", "polymer": "Polymer/polymer#^1.2.0",
"iron-a11y-keys-behavior": "PolymerElements/iron-a11y-keys-behavior#^1.0.0" "iron-a11y-keys-behavior": "PolymerElements/iron-a11y-keys-behavior#^1.0.0"
}, },
"devDependencies": { "devDependencies": {
"paper-styles": "polymerelements/paper-styles#^1.0.2", "paper-styles": "polymerelements/paper-styles#^1.0.2",
"paper-input": "polymerelements/paper-input#^1.0.0",
"iron-test-helpers": "polymerelements/iron-test-helpers#^1.0.0", "iron-test-helpers": "polymerelements/iron-test-helpers#^1.0.0",
"iron-component-page": "polymerelements/iron-component-page#^1.0.0", "iron-component-page": "polymerelements/iron-component-page#^1.0.0",
"test-fixture": "polymerelements/test-fixture#^1.0.0", "test-fixture": "polymerelements/test-fixture#^1.0.0",
"web-component-tester": "*", "web-component-tester": "polymer/web-component-tester#^3.4.0",
"webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0" "webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0"
}, },
"homepage": "https://github.com/polymerelements/iron-behaviors", "ignore": [],
"_release": "1.0.10", "homepage": "https://github.com/PolymerElements/iron-behaviors",
"_release": "1.0.11",
"_resolution": { "_resolution": {
"type": "version", "type": "version",
"tag": "v1.0.10", "tag": "v1.0.11",
"commit": "da937a6c5841fc9dba57f3087083445c9ad709a8" "commit": "084fbc7f60343d717bb2208f350774f4c9899777"
}, },
"_source": "git://github.com/polymerelements/iron-behaviors.git", "_source": "git://github.com/PolymerElements/iron-behaviors.git",
"_target": "^1.0.0", "_target": "^1.0.0",
"_originalSource": "polymerelements/iron-behaviors" "_originalSource": "PolymerElements/iron-behaviors"
} }

View File

@ -1,12 +1,9 @@
language: node_js language: node_js
sudo: false sudo: false
cache:
directories:
- node_modules
matrix: matrix:
include: include:
- node_js: stable - node_js: stable
script: xvfb-run -a wct --simpleOutput -l firefox -l chrome script: xvfb-run wct
addons: addons:
firefox: latest firefox: latest
apt: apt:
@ -18,10 +15,11 @@ matrix:
script: script:
- | - |
if [ "${TRAVIS_PULL_REQUEST}" = "false" ]; then if [ "${TRAVIS_PULL_REQUEST}" = "false" ]; then
wct --simpleOutput -s 'Windows 10/microsoftedge' -s 'Windows 8.1/internet explorer@11' -s 'Windows 7/internet explorer@10' -s 'OS X 10.10/safari@8' -s 'OS X 10.9/safari@7' wct -s 'default'
fi fi
before_script: before_script:
- npm install bower web-component-tester - npm install bower
- npm install web-component-tester
- export PATH=$PWD/node_modules/.bin:$PATH - export PATH=$PWD/node_modules/.bin:$PATH
- bower install - bower install
env: env:

View File

@ -1,6 +1,6 @@
{ {
"name": "iron-behaviors", "name": "iron-behaviors",
"version": "1.0.10", "version": "1.0.11",
"description": "Provides a set of behaviors for the iron elements", "description": "Provides a set of behaviors for the iron elements",
"private": true, "private": true,
"authors": [ "authors": [
@ -16,15 +16,17 @@
], ],
"license": "http://polymer.github.io/LICENSE.txt", "license": "http://polymer.github.io/LICENSE.txt",
"dependencies": { "dependencies": {
"polymer": "Polymer/polymer#^1.0.0", "polymer": "Polymer/polymer#^1.2.0",
"iron-a11y-keys-behavior": "PolymerElements/iron-a11y-keys-behavior#^1.0.0" "iron-a11y-keys-behavior": "PolymerElements/iron-a11y-keys-behavior#^1.0.0"
}, },
"devDependencies": { "devDependencies": {
"paper-styles": "polymerelements/paper-styles#^1.0.2", "paper-styles": "polymerelements/paper-styles#^1.0.2",
"paper-input": "polymerelements/paper-input#^1.0.0",
"iron-test-helpers": "polymerelements/iron-test-helpers#^1.0.0", "iron-test-helpers": "polymerelements/iron-test-helpers#^1.0.0",
"iron-component-page": "polymerelements/iron-component-page#^1.0.0", "iron-component-page": "polymerelements/iron-component-page#^1.0.0",
"test-fixture": "polymerelements/test-fixture#^1.0.0", "test-fixture": "polymerelements/test-fixture#^1.0.0",
"web-component-tester": "*", "web-component-tester": "polymer/web-component-tester#^3.4.0",
"webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0" "webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0"
} },
"ignore": []
} }

View File

@ -136,14 +136,6 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
this._setPressed(false); this._setPressed(false);
}, },
__isFocusedLightDescendant: function(target) {
var root = Polymer.dom(this).getOwnerRoot() || document;
var focusedElement = root.activeElement;
// TODO(noms): remove the `this !== target` check once polymer#2610 is fixed.
return this !== target && this.isLightDescendant(target) && target == focusedElement;
},
/** /**
* @param {!KeyboardEvent} event . * @param {!KeyboardEvent} event .
*/ */
@ -153,7 +145,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
// Ignore the event if this is coming from a focused light child, since that // Ignore the event if this is coming from a focused light child, since that
// element will deal with it. // element will deal with it.
if (this.__isFocusedLightDescendant(target)) if (this.isLightDescendant(target))
return; return;
keyboardEvent.preventDefault(); keyboardEvent.preventDefault();
@ -170,7 +162,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
// Ignore the event if this is coming from a focused light child, since that // Ignore the event if this is coming from a focused light child, since that
// element will deal with it. // element will deal with it.
if (this.__isFocusedLightDescendant(target)) if (this.isLightDescendant(target))
return; return;
if (this.pressed) { if (this.pressed) {

View File

@ -13,12 +13,9 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
<script src="../../webcomponentsjs/webcomponents-lite.js"></script> <script src="../../webcomponentsjs/webcomponents-lite.js"></script>
<script src="../../web-component-tester/browser.js"></script> <script src="../../web-component-tester/browser.js"></script>
<script src="../../test-fixture/test-fixture-mocha.js"></script>
<script src="../../iron-test-helpers/mock-interactions.js"></script> <script src="../../iron-test-helpers/mock-interactions.js"></script>
<link rel="import" href="../../polymer/polymer.html">
<link rel="import" href="../../test-fixture/test-fixture.html">
<link rel="import" href="test-elements.html"> <link rel="import" href="test-elements.html">
<link rel="import" href="../../paper-input/paper-input.html">
</head> </head>
<body> <body>
<test-fixture id="TrivialActiveState"> <test-fixture id="TrivialActiveState">
@ -33,12 +30,18 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
</template> </template>
</test-fixture> </test-fixture>
<test-fixture id="ButtonWithInput"> <test-fixture id="ButtonWithNativeInput">
<template> <template>
<test-light-dom><input id="input"></test-light-dom> <test-light-dom><input id="input"></test-light-dom>
</template> </template>
</test-fixture> </test-fixture>
<test-fixture id="ButtonWithPaperInput">
<template>
<test-light-dom><paper-input id="input"></paper-input></test-light-dom>
</template>
</test-fixture>
<script> <script>
suite('active-state', function() { suite('active-state', function() {
var activeTarget; var activeTarget;
@ -199,9 +202,9 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
}); });
}); });
suite('nested input inside button', function() { suite('nested native input inside button', function() {
test('space in light child input does not trigger a button click event', function(done) { test('space in light child input does not trigger a button click event', function(done) {
var item = fixture('ButtonWithInput'); var item = fixture('ButtonWithNativeInput');
var input = item.querySelector('#input'); var input = item.querySelector('#input');
var itemClickHandler = sinon.spy(); var itemClickHandler = sinon.spy();
@ -209,14 +212,14 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
input.focus(); input.focus();
MockInteractions.pressSpace(input); MockInteractions.pressSpace(input);
setTimeout(function(){ Polymer.Base.async(function(){
expect(itemClickHandler.callCount).to.be.equal(0); expect(itemClickHandler.callCount).to.be.equal(0);
done(); done();
}, 100); }, 1);
}); });
test('space in button triggers a button click event', function(done) { test('space in button triggers a button click event', function(done) {
var item = fixture('ButtonWithInput'); var item = fixture('ButtonWithNativeInput');
var input = item.querySelector('#input'); var input = item.querySelector('#input');
var itemClickHandler = sinon.spy(); var itemClickHandler = sinon.spy();
@ -224,10 +227,49 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
MockInteractions.pressSpace(item); MockInteractions.pressSpace(item);
setTimeout(function(){ Polymer.Base.async(function(){
expect(itemClickHandler.callCount).to.be.equal(1); // You need two ticks, one for the MockInteractions event, and one
// for the button event.
Polymer.Base.async(function(){
expect(itemClickHandler.callCount).to.be.equal(1);
done();
}, 1);
}, 1);
});
});
suite('nested paper-input inside button', function() {
test('space in light child input does not trigger a button click event', function(done) {
var item = fixture('ButtonWithPaperInput');
var input = item.querySelector('#input');
var itemClickHandler = sinon.spy();
item.addEventListener('click', itemClickHandler);
input.focus();
MockInteractions.pressSpace(input);
Polymer.Base.async(function(){
expect(itemClickHandler.callCount).to.be.equal(0);
done(); done();
}, 100); }, 1);
});
test('space in button triggers a button click event', function(done) {
var item = fixture('ButtonWithPaperInput');
var input = item.querySelector('#input');
var itemClickHandler = sinon.spy();
item.addEventListener('click', itemClickHandler);
MockInteractions.pressSpace(item);
Polymer.Base.async(function(){
// You need two ticks, one for the MockInteractions event, and one
// for the button event.
Polymer.Base.async(function(){
expect(itemClickHandler.callCount).to.be.equal(1);
done();
}, 1);
}, 1);
}); });
}); });

View File

@ -13,10 +13,6 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
<script src="../../webcomponentsjs/webcomponents-lite.js"></script> <script src="../../webcomponentsjs/webcomponents-lite.js"></script>
<script src="../../web-component-tester/browser.js"></script> <script src="../../web-component-tester/browser.js"></script>
<script src="../../test-fixture/test-fixture-mocha.js"></script>
<link rel="import" href="../../polymer/polymer.html">
<link rel="import" href="../../test-fixture/test-fixture.html">
<link rel="import" href="test-elements.html"> <link rel="import" href="test-elements.html">
</head> </head>
<body> <body>

View File

@ -13,11 +13,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
<script src="../../webcomponentsjs/webcomponents-lite.js"></script> <script src="../../webcomponentsjs/webcomponents-lite.js"></script>
<script src="../../web-component-tester/browser.js"></script> <script src="../../web-component-tester/browser.js"></script>
<script src="../../test-fixture/test-fixture-mocha.js"></script>
<script src="../../iron-test-helpers/mock-interactions.js"></script> <script src="../../iron-test-helpers/mock-interactions.js"></script>
<link rel="import" href="../../polymer/polymer.html">
<link rel="import" href="../../test-fixture/test-fixture.html">
<link rel="import" href="test-elements.html"> <link rel="import" href="test-elements.html">
</head> </head>
<body> <body>

View File

@ -7,6 +7,7 @@ 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 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="../iron-control-state.html"> <link rel="import" href="../iron-control-state.html">
<link rel="import" href="../iron-button-state.html"> <link rel="import" href="../iron-button-state.html">

View File

@ -1,6 +1,6 @@
{ {
"name": "iron-checked-element-behavior", "name": "iron-checked-element-behavior",
"version": "1.0.2", "version": "1.0.3",
"description": "Implements an element that has a checked attribute and can be added to a form", "description": "Implements an element that has a checked attribute and can be added to a form",
"authors": "The Polymer Authors", "authors": "The Polymer Authors",
"keywords": [ "keywords": [
@ -9,9 +9,7 @@
"iron", "iron",
"behavior" "behavior"
], ],
"main": [ "main": "iron-checked-element-behavior.html",
"iron-checked-element-behavior.html"
],
"private": true, "private": true,
"repository": { "repository": {
"type": "git", "type": "git",
@ -33,11 +31,11 @@
"web-component-tester": "*", "web-component-tester": "*",
"webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0" "webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0"
}, },
"_release": "1.0.2", "_release": "1.0.3",
"_resolution": { "_resolution": {
"type": "version", "type": "version",
"tag": "v1.0.2", "tag": "v1.0.3",
"commit": "975b9f22ebd89ef457491fcc44cb86b660fc42cd" "commit": "5a0520d20eb8883076ce64117f2726ba209ebc97"
}, },
"_source": "git://github.com/PolymerElements/iron-checked-element-behavior.git", "_source": "git://github.com/PolymerElements/iron-checked-element-behavior.git",
"_target": "^1.0.0", "_target": "^1.0.0",

View File

@ -1,6 +1,6 @@
{ {
"name": "iron-checked-element-behavior", "name": "iron-checked-element-behavior",
"version": "1.0.2", "version": "1.0.3",
"description": "Implements an element that has a checked attribute and can be added to a form", "description": "Implements an element that has a checked attribute and can be added to a form",
"authors": "The Polymer Authors", "authors": "The Polymer Authors",
"keywords": [ "keywords": [
@ -9,9 +9,7 @@
"iron", "iron",
"behavior" "behavior"
], ],
"main": [ "main": "iron-checked-element-behavior.html",
"iron-checked-element-behavior.html"
],
"private": true, "private": true,
"repository": { "repository": {
"type": "git", "type": "git",

View File

@ -56,7 +56,8 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
/* Overriden from Polymer.IronFormElementBehavior */ /* Overriden from Polymer.IronFormElementBehavior */
value: { value: {
type: String, type: String,
value: '' value: 'on',
observer: '_valueChanged'
} }
}, },
@ -64,6 +65,13 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
'_requiredChanged(required)' '_requiredChanged(required)'
], ],
created: function() {
// Used by `iron-form` to handle the case that an element with this behavior
// doesn't have a role of 'checkbox' or 'radio', but should still only be
// included when the form is serialized if `this.checked === true`.
this._hasIronCheckedElementBehavior = true;
},
/** /**
* Returns false if the element is required and not checked, and true otherwise. * Returns false if the element is required and not checked, and true otherwise.
* @return {boolean} true if `required` is false, or if `required` and `checked` are both true. * @return {boolean} true if `required` is false, or if `required` and `checked` are both true.
@ -84,15 +92,20 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
}, },
/** /**
* Update the element's value when checked. * Fire `iron-changed` when the checked state changes.
*/ */
_checkedChanged: function() { _checkedChanged: function() {
this.active = this.checked; this.active = this.checked;
// Unless the user has specified a value, a checked element has the
// default value "on" when checked.
if (this.value === '')
this.value = this.checked ? 'on' : '';
this.fire('iron-change'); this.fire('iron-change');
},
/**
* Reset value to 'on' if it is set to `undefined`.
*/
_valueChanged: function() {
if (this.value === undefined || this.value === null) {
this.value = 'on';
}
} }
}; };

View File

@ -84,9 +84,10 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
assert.isFalse(c.invalid); assert.isFalse(c.invalid);
}); });
test('has a default value of "on" when checked', function() { test('has a default value of "on", always', function() {
var c = fixture('basic'); var c = fixture('basic');
assert.isTrue(c.value === '');
assert.isTrue(c.value === 'on');
c.checked = true; c.checked = true;
assert.isTrue(c.value === 'on'); assert.isTrue(c.value === 'on');
@ -99,6 +100,32 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
c.checked = true; c.checked = true;
assert.isTrue(c.value === 'batman'); assert.isTrue(c.value === 'batman');
}); });
test('value returns "on" when no explicit value is specified', function() {
var c = fixture('basic');
assert.equal(c.value, 'on', 'returns "on"');
});
test('value returns the value when an explicit value is set', function() {
var c = fixture('basic');
c.value = 'abc';
assert.equal(c.value, 'abc', 'returns "abc"');
c.value = '123';
assert.equal(c.value, '123', 'returns "123"');
});
test('value returns "on" when value is set to undefined', function() {
var c = fixture('basic');
c.value = 'abc';
assert.equal(c.value, 'abc', 'returns "abc"');
c.value = undefined;
assert.equal(c.value, 'on', 'returns "on"');
});
}); });
suite('a11y', function() { suite('a11y', function() {

View File

@ -1,6 +1,6 @@
{ {
"name": "iron-flex-layout", "name": "iron-flex-layout",
"version": "1.0.5", "version": "1.2.0",
"description": "Provide flexbox-based layouts", "description": "Provide flexbox-based layouts",
"keywords": [ "keywords": [
"web-components", "web-components",
@ -18,7 +18,7 @@
"url": "git://github.com/PolymerElements/iron-flex-layout.git" "url": "git://github.com/PolymerElements/iron-flex-layout.git"
}, },
"dependencies": { "dependencies": {
"polymer": "Polymer/polymer#^1.0.0" "polymer": "Polymer/polymer#^1.1.0"
}, },
"devDependencies": { "devDependencies": {
"paper-styles": "polymerelements/paper-styles#^1.0.0", "paper-styles": "polymerelements/paper-styles#^1.0.0",
@ -28,11 +28,11 @@
"iron-component-page": "polymerelements/iron-component-page#^1.0.0" "iron-component-page": "polymerelements/iron-component-page#^1.0.0"
}, },
"homepage": "https://github.com/PolymerElements/iron-flex-layout", "homepage": "https://github.com/PolymerElements/iron-flex-layout",
"_release": "1.0.5", "_release": "1.2.0",
"_resolution": { "_resolution": {
"type": "version", "type": "version",
"tag": "v1.0.5", "tag": "v1.2.0",
"commit": "00daa8acc95fe53d7cbbe5f9059241c4648ff22e" "commit": "4bf53ba623140d0d2663a404e91ee45b96299118"
}, },
"_source": "git://github.com/PolymerElements/iron-flex-layout.git", "_source": "git://github.com/PolymerElements/iron-flex-layout.git",
"_target": "^1.0.0", "_target": "^1.0.0",

View File

@ -3,7 +3,7 @@ sudo: false
matrix: matrix:
include: include:
- node_js: stable - node_js: stable
script: xvfb-run wct script: true || xvfb-run wct
addons: addons:
firefox: latest firefox: latest
apt: apt:
@ -15,7 +15,7 @@ matrix:
script: script:
- | - |
if [ "${TRAVIS_PULL_REQUEST}" = "false" ]; then if [ "${TRAVIS_PULL_REQUEST}" = "false" ]; then
wct -s 'default' true || wct -s 'default'
fi fi
before_script: before_script:
- npm install web-component-tester - npm install web-component-tester

View File

@ -1,6 +1,6 @@
{ {
"name": "iron-flex-layout", "name": "iron-flex-layout",
"version": "1.0.5", "version": "1.2.0",
"description": "Provide flexbox-based layouts", "description": "Provide flexbox-based layouts",
"keywords": [ "keywords": [
"web-components", "web-components",
@ -18,7 +18,7 @@
"url": "git://github.com/PolymerElements/iron-flex-layout.git" "url": "git://github.com/PolymerElements/iron-flex-layout.git"
}, },
"dependencies": { "dependencies": {
"polymer": "Polymer/polymer#^1.0.0" "polymer": "Polymer/polymer#^1.1.0"
}, },
"devDependencies": { "devDependencies": {
"paper-styles": "polymerelements/paper-styles#^1.0.0", "paper-styles": "polymerelements/paper-styles#^1.0.0",

View File

@ -284,7 +284,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
html /deep/ .fixed-right { html /deep/ .fixed-right {
top: 0; top: 0;
right: 0; right: 0;
botttom: 0; bottom: 0;
} }
html /deep/ .fixed-bottom { html /deep/ .fixed-bottom {
@ -295,7 +295,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
html /deep/ .fixed-left { html /deep/ .fixed-left {
top: 0; top: 0;
botttom: 0; bottom: 0;
left: 0; left: 0;
} }

View File

@ -33,30 +33,31 @@ Quick element that can display the source of a code snippet and a rendered demo.
--> -->
<dom-module id="demo-snippet"> <dom-module id="demo-snippet">
<style>
:host {
display:inline-block;
}
.demo {
border-bottom: 1px solid #e5e5e5;
margin: 0;
}
.code {
padding: 0;
margin: 0;
background-color: #fafafa;
font-size: 13px;
word-wrap: break-word;
}
.code > pre {
margin: 0;
padding: 0 0 10px 0;
}
</style>
<template> <template>
<style>
:host {
display:inline-block;
}
.demo {
border-bottom: 1px solid #e5e5e5;
margin: 0;
}
.code {
padding: 0;
margin: 0;
background-color: #fafafa;
font-size: 13px;
word-wrap: break-word;
}
.code > pre {
margin: 0;
padding: 0 0 10px 0;
}
</style>
<prism-highlighter></prism-highlighter> <prism-highlighter></prism-highlighter>
<div class="demo"> <div class="demo">

View File

@ -2,11 +2,11 @@
<!-- <!--
@license @license
Copyright (c) 2015 The Polymer Project Authors. All rights reserved. Copyright (c) 2015 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 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 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 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 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 subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
--> -->
<html> <html>

View File

@ -2,11 +2,11 @@
<!-- <!--
@license @license
Copyright (c) 2015 The Polymer Project Authors. All rights reserved. Copyright (c) 2015 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 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 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 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 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 subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
--> -->
<html> <html>
<head> <head>

View File

@ -295,6 +295,11 @@ A complete [guide](https://elements.polymer-project.org/guides/flex-layout) to `
overflow: auto; overflow: auto;
}; };
--layout-fullbleed: {
margin: 0;
height: 100vh;
}
/* fixed position */ /* fixed position */
--layout-fixed-top: { --layout-fixed-top: {

View File

@ -36,7 +36,7 @@
"tag": "v1.0.8", "tag": "v1.0.8",
"commit": "e9a66727f3da0446f04956d4e4f1dcd51cdec2ff" "commit": "e9a66727f3da0446f04956d4e4f1dcd51cdec2ff"
}, },
"_source": "git://github.com/PolymerElements/iron-selector.git", "_source": "git://github.com/polymerelements/iron-selector.git",
"_target": "^1.0.0", "_target": "^1.0.0",
"_originalSource": "PolymerElements/iron-selector" "_originalSource": "polymerelements/iron-selector"
} }

View File

@ -1,6 +1,6 @@
{ {
"name": "paper-dialog-behavior", "name": "paper-dialog-behavior",
"version": "1.0.6", "version": "1.1.0",
"description": "Implements a behavior used for material design dialogs", "description": "Implements a behavior used for material design dialogs",
"authors": "The Polymer Authors", "authors": "The Polymer Authors",
"keywords": [ "keywords": [
@ -10,9 +10,7 @@
"overlay", "overlay",
"behavior" "behavior"
], ],
"main": [ "main": "paper-dialog-behavior.html",
"paper-dialog-behavior.html"
],
"private": true, "private": true,
"repository": { "repository": {
"type": "git", "type": "git",
@ -24,7 +22,7 @@
"dependencies": { "dependencies": {
"iron-overlay-behavior": "PolymerElements/iron-overlay-behavior#^1.0.0", "iron-overlay-behavior": "PolymerElements/iron-overlay-behavior#^1.0.0",
"paper-styles": "PolymerElements/paper-styles#^1.0.4", "paper-styles": "PolymerElements/paper-styles#^1.0.4",
"polymer": "Polymer/polymer#^1.0.0" "polymer": "Polymer/polymer#^1.1.0"
}, },
"devDependencies": { "devDependencies": {
"iron-component-page": "PolymerElements/iron-component-page#^1.0.0", "iron-component-page": "PolymerElements/iron-component-page#^1.0.0",
@ -34,11 +32,11 @@
"web-component-tester": "*", "web-component-tester": "*",
"webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0" "webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0"
}, },
"_release": "1.0.6", "_release": "1.1.0",
"_resolution": { "_resolution": {
"type": "version", "type": "version",
"tag": "v1.0.6", "tag": "v1.1.0",
"commit": "9714b11aa532e1a59dadc2096616ed2ea3b82157" "commit": "e41d36a798df2ee2f9f49fb27dd7712e55366595"
}, },
"_source": "git://github.com/PolymerElements/paper-dialog-behavior.git", "_source": "git://github.com/PolymerElements/paper-dialog-behavior.git",
"_target": "^1.0.0", "_target": "^1.0.0",

View File

@ -1,6 +1,6 @@
{ {
"name": "paper-dialog-behavior", "name": "paper-dialog-behavior",
"version": "1.0.6", "version": "1.1.0",
"description": "Implements a behavior used for material design dialogs", "description": "Implements a behavior used for material design dialogs",
"authors": "The Polymer Authors", "authors": "The Polymer Authors",
"keywords": [ "keywords": [
@ -10,9 +10,7 @@
"overlay", "overlay",
"behavior" "behavior"
], ],
"main": [ "main": "paper-dialog-behavior.html",
"paper-dialog-behavior.html"
],
"private": true, "private": true,
"repository": { "repository": {
"type": "git", "type": "git",
@ -24,7 +22,7 @@
"dependencies": { "dependencies": {
"iron-overlay-behavior": "PolymerElements/iron-overlay-behavior#^1.0.0", "iron-overlay-behavior": "PolymerElements/iron-overlay-behavior#^1.0.0",
"paper-styles": "PolymerElements/paper-styles#^1.0.4", "paper-styles": "PolymerElements/paper-styles#^1.0.4",
"polymer": "Polymer/polymer#^1.0.0" "polymer": "Polymer/polymer#^1.1.0"
}, },
"devDependencies": { "devDependencies": {
"iron-component-page": "PolymerElements/iron-component-page#^1.0.0", "iron-component-page": "PolymerElements/iron-component-page#^1.0.0",

View File

@ -9,15 +9,12 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
--> -->
<link rel="import" href="../../polymer/polymer.html"> <link rel="import" href="../../polymer/polymer.html">
<link rel="import" href="../../paper-styles/paper-styles.html">
<link rel="import" href="../paper-dialog-behavior.html"> <link rel="import" href="../paper-dialog-behavior.html">
<link rel="import" href="../paper-dialog-shared-styles.html">
<dom-module id="simple-dialog"> <dom-module id="simple-dialog">
<link rel="import" type="css" href="../paper-dialog-common.css">
<template> <template>
<style include="paper-dialog-shared-styles"></style>
<content></content> <content></content>
</template> </template>

View File

@ -10,12 +10,15 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
<link rel="import" href="../polymer/polymer.html"> <link rel="import" href="../polymer/polymer.html">
<link rel="import" href="../iron-overlay-behavior/iron-overlay-behavior.html"> <link rel="import" href="../iron-overlay-behavior/iron-overlay-behavior.html">
<link rel="import" href="../paper-styles/paper-styles.html"> <link rel="import" href="../iron-flex-layout/iron-flex-layout.html">
<link rel="import" href="../paper-styles/default-theme.html">
<link rel="import" href="../paper-styles/typography.html">
<link rel="import" href="../paper-styles/shadow.html">
<script> <script>
/** /**
Use `Polymer.PaperDialogBehavior` and `paper-dialog-common.css` to implement a Material Design Use `Polymer.PaperDialogBehavior` and `paper-dialog-shared-styles.html` to implement a Material Design
dialog. dialog.
For example, if `<paper-dialog-impl>` implements this behavior: For example, if `<paper-dialog-impl>` implements this behavior:
@ -29,7 +32,7 @@ For example, if `<paper-dialog-impl>` implements this behavior:
</div> </div>
</paper-dialog-impl> </paper-dialog-impl>
`paper-dialog-common.css` provide styles for a header, content area, and an action area for buttons. `paper-dialog-shared-styles.html` provide styles for a header, content area, and an action area for buttons.
Use the `<h2>` tag for the header and the `buttons` class for the action area. You can use the Use the `<h2>` tag for the header and the `buttons` class for the action area. You can use the
`paper-dialog-scrollable` element (in its own repository) if you need a scrolling content area. `paper-dialog-scrollable` element (in its own repository) if you need a scrolling content area.

View File

@ -9,15 +9,12 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
--> -->
<link rel="import" href="../../polymer/polymer.html"> <link rel="import" href="../../polymer/polymer.html">
<link rel="import" href="../../paper-styles/paper-styles.html">
<link rel="import" href="../paper-dialog-behavior.html"> <link rel="import" href="../paper-dialog-behavior.html">
<link rel="import" href="../paper-dialog-shared-styles.html">
<dom-module id="test-dialog"> <dom-module id="test-dialog">
<link rel="import" type="css" href="../paper-dialog-common.css">
<template> <template>
<style include="paper-dialog-shared-styles"></style>
<content></content> <content></content>
</template> </template>

View File

@ -1,6 +1,6 @@
{ {
"name": "paper-input", "name": "paper-input",
"version": "1.0.18", "version": "1.1.0",
"description": "Material design text fields", "description": "Material design text fields",
"authors": [ "authors": [
"The Polymer Authors" "The Polymer Authors"
@ -35,20 +35,20 @@
"paper-styles": "PolymerElements/paper-styles#^1.0.0" "paper-styles": "PolymerElements/paper-styles#^1.0.0"
}, },
"devDependencies": { "devDependencies": {
"webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0",
"web-component-tester": "Polymer/web-component-tester#^3.3.0",
"test-fixture": "PolymerElements/test-fixture#^1.0.0",
"iron-component-page": "PolymerElements/iron-component-page#^1.0.0", "iron-component-page": "PolymerElements/iron-component-page#^1.0.0",
"iron-icon": "PolymerElements/iron-icon#^1.0.0", "iron-icon": "PolymerElements/iron-icon#^1.0.0",
"iron-test-helpers": "PolymerElements/iron-test-helpers#^1.0.0", "iron-test-helpers": "PolymerElements/iron-test-helpers#^1.0.0",
"iron-validator-behavior": "PolymerElements/iron-validator-behavior#^1.0.0", "iron-validator-behavior": "PolymerElements/iron-validator-behavior#^1.0.0",
"paper-icon-button": "PolymerElements/paper-icon-button#^1.0.0" "paper-icon-button": "PolymerElements/paper-icon-button#^1.0.0",
"test-fixture": "PolymerElements/test-fixture#^1.0.0",
"web-component-tester": "Polymer/web-component-tester#^3.3.0",
"webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0"
}, },
"_release": "1.0.18", "_release": "1.1.0",
"_resolution": { "_resolution": {
"type": "version", "type": "version",
"tag": "v1.0.18", "tag": "v1.1.0",
"commit": "8bb2b1972158d3a28ca3a350003b8ca78c147b53" "commit": "4da53c84914bea289a1748dcaf883d48801ec9e3"
}, },
"_source": "git://github.com/polymerelements/paper-input.git", "_source": "git://github.com/polymerelements/paper-input.git",
"_target": "^1.0.9", "_target": "^1.0.9",

View File

@ -1,6 +1,6 @@
{ {
"name": "paper-input", "name": "paper-input",
"version": "1.0.18", "version": "1.1.0",
"description": "Material design text fields", "description": "Material design text fields",
"authors": [ "authors": [
"The Polymer Authors" "The Polymer Authors"
@ -35,13 +35,13 @@
"paper-styles": "PolymerElements/paper-styles#^1.0.0" "paper-styles": "PolymerElements/paper-styles#^1.0.0"
}, },
"devDependencies": { "devDependencies": {
"webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0",
"web-component-tester": "Polymer/web-component-tester#^3.3.0",
"test-fixture": "PolymerElements/test-fixture#^1.0.0",
"iron-component-page": "PolymerElements/iron-component-page#^1.0.0", "iron-component-page": "PolymerElements/iron-component-page#^1.0.0",
"iron-icon": "PolymerElements/iron-icon#^1.0.0", "iron-icon": "PolymerElements/iron-icon#^1.0.0",
"iron-test-helpers": "PolymerElements/iron-test-helpers#^1.0.0", "iron-test-helpers": "PolymerElements/iron-test-helpers#^1.0.0",
"iron-validator-behavior": "PolymerElements/iron-validator-behavior#^1.0.0", "iron-validator-behavior": "PolymerElements/iron-validator-behavior#^1.0.0",
"paper-icon-button": "PolymerElements/paper-icon-button#^1.0.0" "paper-icon-button": "PolymerElements/paper-icon-button#^1.0.0",
"test-fixture": "PolymerElements/test-fixture#^1.0.0",
"web-component-tester": "Polymer/web-component-tester#^3.3.0",
"webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0"
} }
} }

View File

@ -310,6 +310,11 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
_ariaDescribedBy: { _ariaDescribedBy: {
type: String, type: String,
value: '' value: ''
},
_ariaLabelledBy: {
type: String,
value: ''
} }
}, },

View File

@ -9,7 +9,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
--> -->
<link rel="import" href="../polymer/polymer.html"> <link rel="import" href="../polymer/polymer.html">
<link rel="import" href="../paper-styles/paper-styles.html"> <link rel="import" href="../paper-styles/typography.html">
<link rel="import" href="paper-input-addon-behavior.html"> <link rel="import" href="paper-input-addon-behavior.html">
<!-- <!--

View File

@ -9,7 +9,10 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
--> -->
<link rel="import" href="../polymer/polymer.html"> <link rel="import" href="../polymer/polymer.html">
<link rel="import" href="../paper-styles/paper-styles.html"> <link rel="import" href="../paper-styles/color.html">
<link rel="import" href="../paper-styles/typography.html">
<link rel="import" href="../paper-styles/default-theme.html">
<link rel="import" href="../iron-flex-layout/iron-flex-layout.html">
<!-- <!--
`<paper-input-container>` is a container for a `<label>`, an `<input is="iron-input">` or `<paper-input-container>` is a container for a `<label>`, an `<input is="iron-input">` or
@ -120,6 +123,7 @@ This element is `display:block` by default, but you can set the `inline` attribu
.focused-line { .focused-line {
height: 2px; height: 2px;
@apply(--layout-fit);
-webkit-transform-origin: center center; -webkit-transform-origin: center center;
transform-origin: center center; transform-origin: center center;
@ -153,6 +157,7 @@ This element is `display:block` by default, but you can set the `inline` attribu
.unfocused-line { .unfocused-line {
height: 1px; height: 1px;
@apply(--layout-fit);
background: var(--paper-input-container-color, --secondary-text-color); background: var(--paper-input-container-color, --secondary-text-color);
@apply(--paper-input-container-underline); @apply(--paper-input-container-underline);
@ -300,8 +305,8 @@ This element is `display:block` by default, but you can set the `inline` attribu
</div> </div>
<div class$="[[_computeUnderlineClass(focused,invalid)]]"> <div class$="[[_computeUnderlineClass(focused,invalid)]]">
<div class="unfocused-line fit"></div> <div class="unfocused-line"></div>
<div class="focused-line fit"></div> <div class="focused-line"></div>
</div> </div>
<div class$="[[_computeAddOnContentClass(focused,invalid)]]"> <div class$="[[_computeAddOnContentClass(focused,invalid)]]">

View File

@ -9,7 +9,8 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
--> -->
<link rel="import" href="../polymer/polymer.html"> <link rel="import" href="../polymer/polymer.html">
<link rel="import" href="../paper-styles/paper-styles.html"> <link rel="import" href="../paper-styles/color.html">
<link rel="import" href="../paper-styles/typography.html">
<link rel="import" href="paper-input-addon-behavior.html"> <link rel="import" href="paper-input-addon-behavior.html">
<!-- <!--

View File

@ -8,12 +8,12 @@ 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 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="../polymer/polymer.html">
<link rel="import" href="../iron-input/iron-input.html">
<link rel="import" href="../iron-form-element-behavior/iron-form-element-behavior.html"> <link rel="import" href="../iron-form-element-behavior/iron-form-element-behavior.html">
<link rel="import" href="../iron-input/iron-input.html">
<link rel="import" href="paper-input-behavior.html"> <link rel="import" href="paper-input-behavior.html">
<link rel="import" href="paper-input-char-counter.html">
<link rel="import" href="paper-input-container.html"> <link rel="import" href="paper-input-container.html">
<link rel="import" href="paper-input-error.html"> <link rel="import" href="paper-input-error.html">
<link rel="import" href="paper-input-char-counter.html">
<!-- <!--
Material design: [Text fields](https://www.google.com/design/spec/components/text-fields.html) Material design: [Text fields](https://www.google.com/design/spec/components/text-fields.html)

View File

@ -10,9 +10,9 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
<link rel="import" href="../polymer/polymer.html"> <link rel="import" href="../polymer/polymer.html">
<link rel="import" href="../iron-autogrow-textarea/iron-autogrow-textarea.html"> <link rel="import" href="../iron-autogrow-textarea/iron-autogrow-textarea.html">
<link rel="import" href="paper-input-behavior.html"> <link rel="import" href="paper-input-behavior.html">
<link rel="import" href="paper-input-char-counter.html">
<link rel="import" href="paper-input-container.html"> <link rel="import" href="paper-input-container.html">
<link rel="import" href="paper-input-error.html"> <link rel="import" href="paper-input-error.html">
<link rel="import" href="paper-input-char-counter.html">
<!-- <!--
`<paper-textarea>` is a multi-line text field with Material Design styling. `<paper-textarea>` is a multi-line text field with Material Design styling.

View File

@ -1,6 +1,6 @@
{ {
"name": "polymer", "name": "polymer",
"version": "1.2.2", "version": "1.2.3",
"main": [ "main": [
"polymer.html" "polymer.html"
], ],
@ -18,18 +18,18 @@
"url": "https://github.com/Polymer/polymer.git" "url": "https://github.com/Polymer/polymer.git"
}, },
"dependencies": { "dependencies": {
"webcomponentsjs": "^0.7.2" "webcomponentsjs": "^0.7.18"
}, },
"devDependencies": { "devDependencies": {
"web-component-tester": "*" "web-component-tester": "*"
}, },
"private": true, "private": true,
"homepage": "https://github.com/Polymer/polymer", "homepage": "https://github.com/Polymer/polymer",
"_release": "1.2.2", "_release": "1.2.3",
"_resolution": { "_resolution": {
"type": "version", "type": "version",
"tag": "v1.2.2", "tag": "v1.2.3",
"commit": "f7b07058659d691b4331c24e4f2134ed84892229" "commit": "aa535d1675342007cbf64dc9c66497cf74cbc616"
}, },
"_source": "git://github.com/Polymer/polymer.git", "_source": "git://github.com/Polymer/polymer.git",
"_target": "^1.0.0", "_target": "^1.0.0",

View File

@ -1,6 +1,6 @@
{ {
"name": "polymer", "name": "polymer",
"version": "1.2.2", "version": "1.2.3",
"main": [ "main": [
"polymer.html" "polymer.html"
], ],
@ -18,7 +18,7 @@
"url": "https://github.com/Polymer/polymer.git" "url": "https://github.com/Polymer/polymer.git"
}, },
"dependencies": { "dependencies": {
"webcomponentsjs": "^0.7.2" "webcomponentsjs": "^0.7.18"
}, },
"devDependencies": { "devDependencies": {
"web-component-tester": "*" "web-component-tester": "*"

View File

@ -127,30 +127,40 @@ Polymer.RenderStatus._makeReady();
_afterNextRenderQueue: [], _afterNextRenderQueue: [],
_waitingNextRender: false, _waitingNextRender: false,
afterNextRender: function (element, fn, args) { afterNextRender: function (element, fn, args) {
if (!this._waitingNextRender) { this._watchNextRender();
this._waitingNextRender = true;
this.whenReady(this._flushAfterNextRender);
}
this._afterNextRenderQueue.push([ this._afterNextRenderQueue.push([
element, element,
fn, fn,
args args
]); ]);
}, },
_flushAfterNextRender: function () { _watchNextRender: function () {
requestAnimationFrame(function () { if (!this._waitingNextRender) {
setTimeout(Polymer.RenderStatus.__flushAfterNextRender); this._waitingNextRender = true;
var fn = function () {
Polymer.RenderStatus._flushNextRender();
};
if (!this._ready) {
this.whenReady(fn);
} else {
requestAnimationFrame(fn);
}
}
},
_flushNextRender: function () {
var self = this;
setTimeout(function () {
self._flushRenderCallbacks(self._afterNextRenderQueue);
self._afterNextRenderQueue = [];
self._waitingNextRender = false;
}); });
}, },
__flushAfterNextRender: function () { _flushRenderCallbacks: function (callbacks) {
var self = Polymer.RenderStatus; for (var i = 0, h; i < callbacks.length; i++) {
self._waitingNextRender = false; h = callbacks[i];
for (var i = 0, h; i < self._afterNextRenderQueue.length; i++) {
h = self._afterNextRenderQueue[i];
h[1].apply(h[0], h[2] || Polymer.nar); h[1].apply(h[0], h[2] || Polymer.nar);
} }
; ;
self._afterNextRenderQueue = [];
} }
}; };
if (window.HTMLImports) { if (window.HTMLImports) {
@ -284,7 +294,7 @@ import: function (id, selector) {
if (id) { if (id) {
var m = findModule(id); var m = findModule(id);
if (!m) { if (!m) {
forceDocumentUpgrade(); forceDomModulesUpgrade();
m = findModule(id); m = findModule(id);
} }
if (m && selector) { if (m && selector) {
@ -296,12 +306,17 @@ return m;
}); });
var cePolyfill = window.CustomElements && !CustomElements.useNative; var cePolyfill = window.CustomElements && !CustomElements.useNative;
document.registerElement('dom-module', DomModule); document.registerElement('dom-module', DomModule);
function forceDocumentUpgrade() { function forceDomModulesUpgrade() {
if (cePolyfill) { if (cePolyfill) {
var script = document._currentScript || document.currentScript; var script = document._currentScript || document.currentScript;
var doc = script && script.ownerDocument || document; var doc = script && script.ownerDocument || document;
if (doc) { var modules = doc.querySelectorAll('dom-module');
CustomElements.upgradeAll(doc); for (var i = modules.length - 1, m; i >= 0 && (m = modules[i]); i--) {
if (m.__upgraded__) {
return;
} else {
CustomElements.upgrade(m);
}
} }
} }
} }
@ -661,7 +676,7 @@ debouncer.stop();
} }
} }
}); });
Polymer.version = '1.2.2'; Polymer.version = '1.2.3';
Polymer.Base._addFeature({ Polymer.Base._addFeature({
_registerFeatures: function () { _registerFeatures: function () {
this._prepIs(); this._prepIs();

View File

@ -16,9 +16,8 @@ this._template = Polymer.DomModule.import(this.is, 'template');
if (this._template && this._template.hasAttribute('is')) { if (this._template && this._template.hasAttribute('is')) {
this._warn(this._logf('_prepTemplate', 'top-level Polymer template ' + 'must not be a type-extension, found', this._template, 'Move inside simple <template>.')); this._warn(this._logf('_prepTemplate', 'top-level Polymer template ' + 'must not be a type-extension, found', this._template, 'Move inside simple <template>.'));
} }
if (this._template && !this._template.content && HTMLTemplateElement.bootstrap) { if (this._template && !this._template.content && window.HTMLTemplateElement && HTMLTemplateElement.decorate) {
HTMLTemplateElement.decorate(this._template); HTMLTemplateElement.decorate(this._template);
HTMLTemplateElement.bootstrap(this._template.content);
} }
}, },
_stampTemplate: function () { _stampTemplate: function () {

View File

@ -741,7 +741,7 @@ prevent = dy > dx;
prevent = dx > dy; prevent = dx > dy;
} }
if (prevent) { if (prevent) {
//ev.preventDefault(); ev.preventDefault();
} else { } else {
Gestures.prevent('track'); Gestures.prevent('track');
} }
@ -3527,19 +3527,19 @@ this._appliesToDocument = true;
var e = this.__appliedElement || this; var e = this.__appliedElement || this;
styleDefaults.addStyle(e); styleDefaults.addStyle(e);
if (e.textContent || this.include) { if (e.textContent || this.include) {
this._apply(); this._apply(true);
} else { } else {
var self = this; var self = this;
var observer = new MutationObserver(function () { var observer = new MutationObserver(function () {
observer.disconnect(); observer.disconnect();
self._apply(); self._apply(true);
}); });
observer.observe(e, { childList: true }); observer.observe(e, { childList: true });
} }
} }
} }
}, },
_apply: function () { _apply: function (deferProperties) {
var e = this.__appliedElement || this; var e = this.__appliedElement || this;
if (this.include) { if (this.include) {
e.textContent = styleUtil.cssFromModules(this.include, true) + e.textContent; e.textContent = styleUtil.cssFromModules(this.include, true) + e.textContent;
@ -3548,7 +3548,19 @@ if (e.textContent) {
styleUtil.forEachStyleRule(styleUtil.rulesForStyle(e), function (rule) { styleUtil.forEachStyleRule(styleUtil.rulesForStyle(e), function (rule) {
styleTransformer.documentRule(rule); styleTransformer.documentRule(rule);
}); });
this._applyCustomProperties(e); var self = this;
function fn() {
self._applyCustomProperties(e);
}
if (this._pendingApplyProperties) {
cancelAnimationFrame(this._pendingApplyProperties);
this._pendingApplyProperties = null;
}
if (deferProperties) {
this._pendingApplyProperties = requestAnimationFrame(fn);
} else {
fn();
}
} }
}, },
_applyCustomProperties: function (element) { _applyCustomProperties: function (element) {

View File

@ -1,7 +1,7 @@
{ {
"name": "webcomponentsjs", "name": "webcomponentsjs",
"main": "webcomponents.js", "main": "webcomponents.js",
"version": "0.7.17", "version": "0.7.18",
"homepage": "http://webcomponents.org", "homepage": "http://webcomponents.org",
"authors": [ "authors": [
"The Polymer Authors" "The Polymer Authors"
@ -18,13 +18,13 @@
"devDependencies": { "devDependencies": {
"web-component-tester": "~3.3.10" "web-component-tester": "~3.3.10"
}, },
"_release": "0.7.17", "_release": "0.7.18",
"_resolution": { "_resolution": {
"type": "version", "type": "version",
"tag": "v0.7.17", "tag": "v0.7.18",
"commit": "c532ebd6c764037242f51f9e4049e3d7dee0974a" "commit": "acdd43ad41c15e1834458da01d228ab22a224051"
}, },
"_source": "git://github.com/Polymer/webcomponentsjs.git", "_source": "git://github.com/Polymer/webcomponentsjs.git",
"_target": "^0.7.2", "_target": "^0.7.18",
"_originalSource": "webcomponentsjs" "_originalSource": "webcomponentsjs"
} }

View File

@ -7,7 +7,7 @@
* Code distributed by Google as part of the polymer project is also * 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 * subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
*/ */
// @version 0.7.17 // @version 0.7.18
if (typeof WeakMap === "undefined") { if (typeof WeakMap === "undefined") {
(function() { (function() {
var defineProperty = Object.defineProperty; var defineProperty = Object.defineProperty;
@ -394,7 +394,8 @@ if (typeof WeakMap === "undefined") {
Object.defineProperty(this, "defaultPrevented", { Object.defineProperty(this, "defaultPrevented", {
get: function() { get: function() {
return true; return true;
} },
configurable: true
}); });
}; };
} }
@ -678,17 +679,11 @@ window.CustomElements.addModule(function(scope) {
return root; return root;
}; };
} }
function upgradeAll(doc) {
if (HTMLTemplateElement && HTMLTemplateElement.bootstrap) {
HTMLTemplateElement.bootstrap(doc);
}
addedNode(doc);
}
scope.watchShadow = watchShadow; scope.watchShadow = watchShadow;
scope.upgradeDocumentTree = upgradeDocumentTree; scope.upgradeDocumentTree = upgradeDocumentTree;
scope.upgradeDocument = upgradeDocument; scope.upgradeDocument = upgradeDocument;
scope.upgradeSubtree = addedSubtree; scope.upgradeSubtree = addedSubtree;
scope.upgradeAll = upgradeAll; scope.upgradeAll = addedNode;
scope.attached = attached; scope.attached = attached;
scope.takeRecords = takeRecords; scope.takeRecords = takeRecords;
}); });
@ -696,6 +691,11 @@ window.CustomElements.addModule(function(scope) {
window.CustomElements.addModule(function(scope) { window.CustomElements.addModule(function(scope) {
var flags = scope.flags; var flags = scope.flags;
function upgrade(node, isAttached) { function upgrade(node, isAttached) {
if (node.localName === "template") {
if (window.HTMLTemplateElement && HTMLTemplateElement.decorate) {
HTMLTemplateElement.decorate(node);
}
}
if (!node.__upgraded__ && node.nodeType === Node.ELEMENT_NODE) { if (!node.__upgraded__ && node.nodeType === Node.ELEMENT_NODE) {
var is = node.getAttribute("is"); var is = node.getAttribute("is");
var definition = scope.getRegisteredDefinition(node.localName) || scope.getRegisteredDefinition(is); var definition = scope.getRegisteredDefinition(node.localName) || scope.getRegisteredDefinition(is);

File diff suppressed because one or more lines are too long

View File

@ -7,7 +7,7 @@
* Code distributed by Google as part of the polymer project is also * 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 * subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
*/ */
// @version 0.7.17 // @version 0.7.18
if (typeof WeakMap === "undefined") { if (typeof WeakMap === "undefined") {
(function() { (function() {
var defineProperty = Object.defineProperty; var defineProperty = Object.defineProperty;
@ -394,7 +394,8 @@ if (typeof WeakMap === "undefined") {
Object.defineProperty(this, "defaultPrevented", { Object.defineProperty(this, "defaultPrevented", {
get: function() { get: function() {
return true; return true;
} },
configurable: true
}); });
}; };
} }

File diff suppressed because one or more lines are too long

View File

@ -7,7 +7,7 @@
* Code distributed by Google as part of the polymer project is also * 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 * subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
*/ */
// @version 0.7.17 // @version 0.7.18
if (typeof WeakMap === "undefined") { if (typeof WeakMap === "undefined") {
(function() { (function() {
var defineProperty = Object.defineProperty; var defineProperty = Object.defineProperty;

File diff suppressed because one or more lines are too long

View File

@ -7,7 +7,7 @@
* Code distributed by Google as part of the polymer project is also * 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 * subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
*/ */
// @version 0.7.17 // @version 0.7.18
if (typeof WeakMap === "undefined") { if (typeof WeakMap === "undefined") {
(function() { (function() {
var defineProperty = Object.defineProperty; var defineProperty = Object.defineProperty;
@ -1131,7 +1131,8 @@ window.ShadowDOMPolyfill = {};
Object.defineProperty(this, "defaultPrevented", { Object.defineProperty(this, "defaultPrevented", {
get: function() { get: function() {
return true; return true;
} },
configurable: true
}); });
}; };
} }

File diff suppressed because one or more lines are too long

View File

@ -1,7 +1,7 @@
{ {
"name": "webcomponentsjs", "name": "webcomponentsjs",
"main": "webcomponents.js", "main": "webcomponents.js",
"version": "0.7.17", "version": "0.7.18",
"homepage": "http://webcomponents.org", "homepage": "http://webcomponents.org",
"authors": [ "authors": [
"The Polymer Authors" "The Polymer Authors"

View File

@ -1,6 +1,6 @@
{ {
"name": "webcomponents.js", "name": "webcomponents.js",
"version": "0.7.17", "version": "0.7.18",
"description": "webcomponents.js", "description": "webcomponents.js",
"main": "webcomponents.js", "main": "webcomponents.js",
"directories": { "directories": {

View File

@ -7,7 +7,7 @@
* Code distributed by Google as part of the polymer project is also * 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 * subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
*/ */
// @version 0.7.17 // @version 0.7.18
(function() { (function() {
window.WebComponents = window.WebComponents || { window.WebComponents = window.WebComponents || {
flags: {} flags: {}
@ -920,9 +920,10 @@ if (typeof HTMLTemplateElement === "undefined") {
HTMLTemplateElement = function() {}; HTMLTemplateElement = function() {};
HTMLTemplateElement.prototype = Object.create(HTMLElement.prototype); HTMLTemplateElement.prototype = Object.create(HTMLElement.prototype);
HTMLTemplateElement.decorate = function(template) { HTMLTemplateElement.decorate = function(template) {
if (!template.content) { if (template.content) {
template.content = contentDoc.createDocumentFragment(); return;
} }
template.content = contentDoc.createDocumentFragment();
var child; var child;
while (child = template.firstChild) { while (child = template.firstChild) {
template.content.appendChild(child); template.content.appendChild(child);
@ -953,6 +954,7 @@ if (typeof HTMLTemplateElement === "undefined") {
canDecorate = false; canDecorate = false;
} }
} }
HTMLTemplateElement.bootstrap(template.content);
}; };
HTMLTemplateElement.bootstrap = function(doc) { HTMLTemplateElement.bootstrap = function(doc) {
var templates = doc.querySelectorAll(TEMPLATE_TAG); var templates = doc.querySelectorAll(TEMPLATE_TAG);
@ -1039,7 +1041,8 @@ if (typeof HTMLTemplateElement === "undefined") {
Object.defineProperty(this, "defaultPrevented", { Object.defineProperty(this, "defaultPrevented", {
get: function() { get: function() {
return true; return true;
} },
configurable: true
}); });
}; };
} }
@ -2057,17 +2060,11 @@ window.CustomElements.addModule(function(scope) {
return root; return root;
}; };
} }
function upgradeAll(doc) {
if (HTMLTemplateElement && HTMLTemplateElement.bootstrap) {
HTMLTemplateElement.bootstrap(doc);
}
addedNode(doc);
}
scope.watchShadow = watchShadow; scope.watchShadow = watchShadow;
scope.upgradeDocumentTree = upgradeDocumentTree; scope.upgradeDocumentTree = upgradeDocumentTree;
scope.upgradeDocument = upgradeDocument; scope.upgradeDocument = upgradeDocument;
scope.upgradeSubtree = addedSubtree; scope.upgradeSubtree = addedSubtree;
scope.upgradeAll = upgradeAll; scope.upgradeAll = addedNode;
scope.attached = attached; scope.attached = attached;
scope.takeRecords = takeRecords; scope.takeRecords = takeRecords;
}); });
@ -2075,6 +2072,11 @@ window.CustomElements.addModule(function(scope) {
window.CustomElements.addModule(function(scope) { window.CustomElements.addModule(function(scope) {
var flags = scope.flags; var flags = scope.flags;
function upgrade(node, isAttached) { function upgrade(node, isAttached) {
if (node.localName === "template") {
if (window.HTMLTemplateElement && HTMLTemplateElement.decorate) {
HTMLTemplateElement.decorate(node);
}
}
if (!node.__upgraded__ && node.nodeType === Node.ELEMENT_NODE) { if (!node.__upgraded__ && node.nodeType === Node.ELEMENT_NODE) {
var is = node.getAttribute("is"); var is = node.getAttribute("is");
var definition = scope.getRegisteredDefinition(node.localName) || scope.getRegisteredDefinition(is); var definition = scope.getRegisteredDefinition(node.localName) || scope.getRegisteredDefinition(is);

File diff suppressed because one or more lines are too long

View File

@ -7,7 +7,7 @@
* Code distributed by Google as part of the polymer project is also * 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 * subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
*/ */
// @version 0.7.17 // @version 0.7.18
(function() { (function() {
window.WebComponents = window.WebComponents || { window.WebComponents = window.WebComponents || {
flags: {} flags: {}
@ -1172,7 +1172,8 @@ if (WebComponents.flags.shadow) {
Object.defineProperty(this, "defaultPrevented", { Object.defineProperty(this, "defaultPrevented", {
get: function() { get: function() {
return true; return true;
} },
configurable: true
}); });
}; };
} }
@ -5770,7 +5771,8 @@ if (WebComponents.flags.shadow) {
Object.defineProperty(this, "defaultPrevented", { Object.defineProperty(this, "defaultPrevented", {
get: function() { get: function() {
return true; return true;
} },
configurable: true
}); });
}; };
} }
@ -6788,17 +6790,11 @@ window.CustomElements.addModule(function(scope) {
return root; return root;
}; };
} }
function upgradeAll(doc) {
if (HTMLTemplateElement && HTMLTemplateElement.bootstrap) {
HTMLTemplateElement.bootstrap(doc);
}
addedNode(doc);
}
scope.watchShadow = watchShadow; scope.watchShadow = watchShadow;
scope.upgradeDocumentTree = upgradeDocumentTree; scope.upgradeDocumentTree = upgradeDocumentTree;
scope.upgradeDocument = upgradeDocument; scope.upgradeDocument = upgradeDocument;
scope.upgradeSubtree = addedSubtree; scope.upgradeSubtree = addedSubtree;
scope.upgradeAll = upgradeAll; scope.upgradeAll = addedNode;
scope.attached = attached; scope.attached = attached;
scope.takeRecords = takeRecords; scope.takeRecords = takeRecords;
}); });
@ -6806,6 +6802,11 @@ window.CustomElements.addModule(function(scope) {
window.CustomElements.addModule(function(scope) { window.CustomElements.addModule(function(scope) {
var flags = scope.flags; var flags = scope.flags;
function upgrade(node, isAttached) { function upgrade(node, isAttached) {
if (node.localName === "template") {
if (window.HTMLTemplateElement && HTMLTemplateElement.decorate) {
HTMLTemplateElement.decorate(node);
}
}
if (!node.__upgraded__ && node.nodeType === Node.ELEMENT_NODE) { if (!node.__upgraded__ && node.nodeType === Node.ELEMENT_NODE) {
var is = node.getAttribute("is"); var is = node.getAttribute("is");
var definition = scope.getRegisteredDefinition(node.localName) || scope.getRegisteredDefinition(is); var definition = scope.getRegisteredDefinition(node.localName) || scope.getRegisteredDefinition(is);

File diff suppressed because one or more lines are too long