Skip to content

Commit b010926

Browse files
committed
Merge remote-tracking branch 'origin/dev'
2 parents e5e2e87 + 024b061 commit b010926

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

55 files changed

+436
-83
lines changed

.travis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
language: node_js
22

33
node_js:
4-
- "4.4.4"
4+
- "6.10.2"
55

66
install:
77
- BROWSER="Firefox-stable" ./.travis-setup.sh

CONTRIBUTING.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
1. `git submodule update --init --recursive` (Necessary for running tests.)
88
1. Install [node](https://nodejs.org/en/) and make sure `npm` is in your $PATH
99
1. Run `npm install` in the respository to pull in development dependencies.
10-
1. Run `npm install -g grunt grunt-cli` to get the build tools for the command line.
10+
1. Run `npm install -g grunt-cli` to get the build tools for the command line.
1111

1212
### Contributing
1313

History.md

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,23 @@
1+
### 2.2.3 - *April 13 2017*
2+
3+
* [Added HTML import targets.](https://github.com/web-animations/web-animations-js/pull/94)
4+
5+
* Added support for animating SVG related properties:
6+
* [fill](https://github.com/web-animations/web-animations-next/pull/484)
7+
* [floodColor](https://github.com/web-animations/web-animations-next/pull/484)
8+
* [lightingColor](https://github.com/web-animations/web-animations-next/pull/484)
9+
* [stopColor](https://github.com/web-animations/web-animations-next/pull/484)
10+
* [strokeDashoffset](https://github.com/web-animations/web-animations-js/pull/96)
11+
* [strokeDasharray](https://github.com/web-animations/web-animations-js/pull/120)
12+
13+
* [Fixed crash when animating non-invertable matrices.](https://github.com/web-animations/web-animations-js/pull/121)
14+
15+
* [Fixed source maps for Bower installs.](https://github.com/web-animations/web-animations-js/pull/93)
16+
17+
* [Updated README.md documentation structure.](https://github.com/web-animations/web-animations-next/pull/489)
18+
19+
* [Added 'use strict' to source files.](https://github.com/web-animations/web-animations-next/pull/488)
20+
121
### 2.2.2 - *August 3 2016*
222

323
* [Fixed handling of keyframes with overlapping offsets.](https://github.com/web-animations/web-animations-next/pull/470)

bower.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@
1616
"node_modules",
1717
"templates",
1818
"test",
19-
"src",
2019
"Gruntfile.js",
2120
"package.json",
2221
"target-config.js",

docs/experimental.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ Build target comparison
2323

2424
| | web-animations | web-animations-next | web-animations-next-lite |
2525
|------------------------|:--------------:|:-------------------:|:------------------------:|
26-
|Size (gzipped) | 15KB | 18KB | 15KB |
26+
|Size (gzipped) | 15KB | 19KB | 15KB |
2727
|Element.animate ||||
2828
|Timing input (easings, duration, fillMode, etc.) for animation effects||||
2929
|Playback control ||||

externs/README.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
2+
Closure Compiler Externs for Web Animations
3+
-------------------------------------------
4+
5+
This folder contains externs for using the Web Animations API with the Closure
6+
Compiler. These externs aren't strictly part of the polyfill, as they can be
7+
used for either the native or polyfilled versions.
8+
9+
web-animations-next requires that you also include web-animations.
10+

externs/web-animations-next.js

Lines changed: 113 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,113 @@
1+
/*
2+
* Copyright 2016 Google Inc. All rights reserved.
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
5+
* use this file except in compliance with the License. You may obtain a copy of
6+
* the License at
7+
*
8+
* http://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
12+
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
13+
* License for the specific language governing permissions and limitations under
14+
* the License.
15+
*/
16+
17+
18+
/**
19+
* @fileoverview Basic externs for the Web Animations API (Level 2 / Groups).
20+
* This is not intended to be exhaustive, and requires the base externs from
21+
* web-animations.js.
22+
* @externs
23+
*/
24+
25+
26+
/**
27+
* @interface
28+
*/
29+
var AnimationEffectReadOnly = function() {};
30+
31+
/** @type {!AnimationEffectTiming} */
32+
AnimationEffectReadOnly.prototype.timing;
33+
34+
35+
/**
36+
* @param {Element} target
37+
* @param {!Array<!Object>} frames
38+
* @param {(number|AnimationEffectTimingProperties)=} opt_options
39+
* @constructor
40+
* @implements {AnimationEffectReadOnly}
41+
*/
42+
var KeyframeEffect = function(target, frames, opt_options) {};
43+
44+
/**
45+
* @return {!Array<!Object>}
46+
*/
47+
KeyframeEffect.prototype.getFrames = function() {};
48+
49+
/** @type {!AnimationEffectTiming} */
50+
KeyframeEffect.prototype.timing;
51+
52+
/** @type {Element} */
53+
KeyframeEffect.prototype.target;
54+
55+
/** @type {?function(number, !KeyframeEffect, !Animation)} */
56+
KeyframeEffect.prototype.onsample;
57+
58+
59+
/**
60+
* @param {!Array<!AnimationEffectReadOnly>} children
61+
* @param {AnimationEffectTimingProperties=} opt_timing
62+
* @constructor
63+
* @implements {AnimationEffectReadOnly}
64+
*/
65+
var SequenceEffect = function(children, opt_timing) {};
66+
67+
/** @type {!AnimationEffectTiming} */
68+
SequenceEffect.prototype.timing;
69+
70+
/** @type {!Array<!AnimationEffectReadOnly>} */
71+
SequenceEffect.prototype.children;
72+
73+
74+
/**
75+
* @param {!Array<!AnimationEffectReadOnly>} children
76+
* @param {AnimationEffectTimingProperties=} opt_timing
77+
* @constructor
78+
* @implements {AnimationEffectReadOnly}
79+
*/
80+
var GroupEffect = function(children, opt_timing) {};
81+
82+
/** @type {!AnimationEffectTiming} */
83+
GroupEffect.prototype.timing;
84+
85+
/** @type {!Array<!AnimationEffectReadOnly>} */
86+
GroupEffect.prototype.children;
87+
88+
89+
/**
90+
* @interface
91+
*/
92+
var AnimationTimeline = function() {};
93+
94+
/** @type {?number} */
95+
AnimationTimeline.prototype.currentTime;
96+
97+
/**
98+
* @param {!AnimationEffectReadOnly} effect
99+
* @return {!Animation}
100+
*/
101+
AnimationTimeline.prototype.play = function(effect) {};
102+
103+
/**
104+
* @interface
105+
* @extends {AnimationTimeline}
106+
*/
107+
var DocumentTimeline = function() {};
108+
109+
/** @type {AnimationEffectReadOnly|undefined} */
110+
Animation.prototype.effect;
111+
112+
/** @type {!DocumentTimeline} */
113+
Document.prototype.timeline;

externs/web-animations.js

Lines changed: 126 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,126 @@
1+
/*
2+
* Copyright 2016 Google Inc. All rights reserved.
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
5+
* use this file except in compliance with the License. You may obtain a copy of
6+
* the License at
7+
*
8+
* http://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
12+
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
13+
* License for the specific language governing permissions and limitations under
14+
* the License.
15+
*/
16+
17+
18+
/**
19+
* @fileoverview Basic externs for the Web Animations API. This is not
20+
* nessecarily exhaustive. For more information, see the spec-
21+
* https://w3c.github.io/web-animations
22+
* @externs
23+
*/
24+
25+
26+
/**
27+
* @param {!Array<!Object>} frames
28+
* @param {(number|AnimationEffectTimingProperties)=} opt_options
29+
* @return {!Animation}
30+
*/
31+
Element.prototype.animate = function(frames, opt_options) {};
32+
33+
34+
/**
35+
* @interface
36+
* @extends {EventTarget}
37+
*/
38+
var Animation = function() {};
39+
40+
/**
41+
* @return {undefined}
42+
*/
43+
Animation.prototype.cancel = function() {};
44+
45+
/**
46+
* @return {undefined}
47+
*/
48+
Animation.prototype.finish = function() {};
49+
50+
/**
51+
* @return {undefined}
52+
*/
53+
Animation.prototype.reverse = function() {};
54+
55+
/**
56+
* @return {undefined}
57+
*/
58+
Animation.prototype.pause = function() {};
59+
60+
/**
61+
* @return {undefined}
62+
*/
63+
Animation.prototype.play = function() {};
64+
65+
/** @type {number} */
66+
Animation.prototype.startTime;
67+
68+
/** @type {number} */
69+
Animation.prototype.currentTime;
70+
71+
/** @type {number} */
72+
Animation.prototype.playbackRate;
73+
74+
/** @type {string} */
75+
Animation.prototype.playState;
76+
77+
/** @type {?function(!Event)} */
78+
Animation.prototype.oncancel;
79+
80+
/** @type {?function(!Event)} */
81+
Animation.prototype.onfinish;
82+
83+
84+
/**
85+
* @typedef {{
86+
* delay: (number|undefined),
87+
* endDelay: (number|undefined),
88+
* fillMode: (string|undefined),
89+
* iterationStart: (number|undefined),
90+
* iterations: (number|undefined),
91+
* duration: (number|string|undefined),
92+
* direction: (string|undefined),
93+
* easing: (string|undefined)
94+
* }}
95+
*/
96+
var AnimationEffectTimingProperties;
97+
98+
99+
/**
100+
* @interface
101+
*/
102+
var AnimationEffectTiming = function() {};
103+
104+
/** @type {number} */
105+
AnimationEffectTiming.prototype.delay;
106+
107+
/** @type {number} */
108+
AnimationEffectTiming.prototype.endDelay;
109+
110+
/** @type {string} */
111+
AnimationEffectTiming.prototype.fillMode;
112+
113+
/** @type {number} */
114+
AnimationEffectTiming.prototype.iterationStart;
115+
116+
/** @type {number} */
117+
AnimationEffectTiming.prototype.iterations;
118+
119+
/** @type {number|string} */
120+
AnimationEffectTiming.prototype.duration;
121+
122+
/** @type {string} */
123+
AnimationEffectTiming.prototype.direction;
124+
125+
/** @type {string} */
126+
AnimationEffectTiming.prototype.easing;

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
"type": "git",
66
"url": "https://github.com/web-animations/web-animations-js.git"
77
},
8-
"version": "2.2.2",
8+
"version": "2.2.3",
99
"keywords": [
1010
"animations",
1111
"polyfill"

src/animation.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
// See the License for the specific language governing permissions and
1313
// limitations under the License.
1414

15+
'use strict';
1516
(function(shared, scope, testing) {
1617

1718
shared.sequenceNumber = 0;
@@ -191,7 +192,6 @@
191192
this._inEffect = false;
192193
this._idle = true;
193194
this._paused = false;
194-
this._isFinished = true;
195195
this._finishedFlag = true;
196196
this._currentTime = 0;
197197
this._startTime = null;

src/apply-preserving-inline-style.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
// See the License for the specific language governing permissions and
1313
// limitations under the License.
1414

15+
'use strict';
1516
(function(scope, testing) {
1617

1718
var styleAttributes = {

src/apply.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
// See the License for the specific language governing permissions and
1313
// limitations under the License.
1414

15+
'use strict';
1516
(function(scope, testing) {
1617

1718
scope.apply = function(element, property, value) {

src/box-handler.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
// See the License for the specific language governing permissions and
1313
// limitations under the License.
1414

15+
'use strict';
1516
(function(scope, testing) {
1617
function consumeLengthPercentOrAuto(string) {
1718
return scope.consumeLengthOrPercent(string) || scope.consumeToken(/^auto/, string);

src/color-handler.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
// See the License for the specific language governing permissions and
1313
// limitations under the License.
1414

15+
'use strict';
1516
(function(scope, testing) {
1617

1718
var canvas = document.createElementNS('http://www.w3.org/1999/xhtml', 'canvas');
@@ -51,7 +52,8 @@
5152

5253
scope.addPropertiesHandler(parseColor, mergeColors,
5354
['background-color', 'border-bottom-color', 'border-left-color', 'border-right-color',
54-
'border-top-color', 'color', 'outline-color', 'text-decoration-color']);
55+
'border-top-color', 'color', 'fill', 'flood-color', 'lighting-color',
56+
'outline-color', 'stop-color', 'stroke', 'text-decoration-color']);
5557
scope.consumeColor = scope.consumeParenthesised.bind(null, parseColor);
5658
scope.mergeColors = mergeColors;
5759

src/deprecation.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
// See the License for the specific language governing permissions and
1313
// limitations under the License.
1414

15+
'use strict';
1516
(function(shared) {
1617

1718
var silenced = {};

src/dev.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,5 +12,6 @@
1212
// See the License for the specific language governing permissions and
1313
// limitations under the License.
1414

15+
'use strict';
1516
var WEB_ANIMATIONS_TESTING = false;
1617
var webAnimationsTesting = null;

0 commit comments

Comments
 (0)