Skip to content

Commit 866e017

Browse files
authored
Merge pull request #124 from alancutter/revertUseStrict
Revert adding 'use strict'
2 parents 024b061 + b63f7d6 commit 866e017

38 files changed

+12
-49
lines changed

History.md

+4
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
### 2.2.4 - *April 14 2017*
2+
3+
* [Reverted adding 'use strict' to source files.](https://github.com/web-animations/web-animations-next/pull/124)
4+
15
### 2.2.3 - *April 13 2017*
26

37
* [Added HTML import targets.](https://github.com/web-animations/web-animations-js/pull/94)

package.json

+1-1
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.3",
8+
"version": "2.2.4",
99
"keywords": [
1010
"animations",
1111
"polyfill"

src/animation.js

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

15-
'use strict';
1615
(function(shared, scope, testing) {
1716

1817
shared.sequenceNumber = 0;
@@ -192,6 +191,7 @@
192191
this._inEffect = false;
193192
this._idle = true;
194193
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

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

15-
'use strict';
1615
(function(scope, testing) {
1716

1817
var styleAttributes = {

src/apply.js

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

15-
'use strict';
1615
(function(scope, testing) {
1716

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

src/box-handler.js

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

15-
'use strict';
1615
(function(scope, testing) {
1716
function consumeLengthPercentOrAuto(string) {
1817
return scope.consumeLengthOrPercent(string) || scope.consumeToken(/^auto/, string);

src/color-handler.js

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

15-
'use strict';
1615
(function(scope, testing) {
1716

1817
var canvas = document.createElementNS('http://www.w3.org/1999/xhtml', 'canvas');

src/deprecation.js

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

15-
'use strict';
1615
(function(shared) {
1716

1817
var silenced = {};

src/dev.js

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

15-
'use strict';
1615
var WEB_ANIMATIONS_TESTING = false;
1716
var webAnimationsTesting = null;

src/dimension-handler.js

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

15-
'use strict';
1615
(function(scope, testing) {
1716

1817
function parseDimension(unitRegExp, string) {

src/effect-callback.js

-2
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,6 @@
1111
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1212
// See the License for the specific language governing permissions and
1313
// limitations under the License.
14-
15-
'use strict';
1614
(function(shared, scope, testing) {
1715

1816
var nullTarget = document.createElementNS('http://www.w3.org/1999/xhtml', 'div');

src/element-animatable.js

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

15-
'use strict';
1615
(function(scope) {
1716
window.Element.prototype.animate = function(effectInput, options) {
1817
var id = '';

src/font-weight-handler.js

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

15-
'use strict';
1615
(function(scope) {
1716
function parse(string) {
1817
var out = Number(string);

src/group-constructors.js

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

15-
'use strict';
1615
(function(shared, scope, testing) {
1716

1817
function groupChildDuration(node) {
@@ -117,8 +116,7 @@
117116
},
118117
remove: function() {
119118
scope.removeMulti([this]);
120-
},
121-
_updateActiveDuration: function() {}
119+
}
122120
};
123121

124122
window.SequenceEffect.prototype = Object.create(constructor.prototype);

src/handler-utils.js

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

15-
'use strict';
1615
(function(scope) {
1716

1817
// consume* functions return a 2 value array of [parsed-data, '' or not-yet consumed input]

src/interpolation.js

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

15-
'use strict';
1615
(function(scope, testing) {
1716

1817
function interpolate(from, to, f) {

src/keyframe-effect-constructor.js

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

15-
'use strict';
1615
(function(shared, scope, testing) {
1716

1817
var disassociate = function(effect) {
@@ -71,7 +70,7 @@
7170
this._normalizedKeyframes = new KeyframeList(effectInput);
7271
}
7372
this._keyframes = effectInput;
74-
this._updateActiveDuration();
73+
this.activeDuration = shared.calculateActiveDuration(this._timing);
7574
this._id = id;
7675
return this;
7776
};
@@ -94,9 +93,6 @@
9493
get parent() {
9594
return this._parent;
9695
},
97-
get activeDuration() {
98-
return this._activeDuration;
99-
},
10096
clone: function() {
10197
if (typeof this.getFrames() == 'function') {
10298
throw new Error('Cloning custom effects is not supported.');
@@ -108,9 +104,6 @@
108104
},
109105
remove: function() {
110106
scope.removeMulti([this]);
111-
},
112-
_updateActiveDuration: function() {
113-
this._activeDuration = shared.calculateActiveDuration(this._timing);
114107
}
115108
};
116109

src/keyframe-effect.js

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

15-
'use strict';
1615
(function(shared, scope, testing) {
1716

1817
function EffectTime(timing) {

src/keyframe-interpolations.js

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

15-
'use strict';
1615
(function(shared, scope, testing) {
1716

1817
scope.convertEffectInput = function(effectInput) {

src/matrix-decomposition.js

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

15-
'use strict';
1615
(function(scope, testing) {
1716
var decomposeMatrix = (function() {
1817
function determinant(m) {

src/matrix-interpolation.js

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

15-
'use strict';
1615
(function(scope, testing) {
1716
var composeMatrix = (function() {
1817
function multiply(a, b) {

src/normalize-keyframes.js

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

15-
'use strict';
1615
(function(shared, testing) {
1716
var shorthandToLonghand = {
1817
background: [

src/number-handler.js

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

15-
'use strict';
1615
(function(scope, testing) {
1716

1817
function numberToString(x) {

src/position-handler.js

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

15-
'use strict';
1615
(function(scope) {
1716

1817
function negateDimension(dimension) {

src/property-interpolation.js

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

15-
'use strict';
1615
(function(shared, scope, testing) {
1716

1817
var propertyHandlers = {};

src/property-names.js

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

15-
'use strict';
1615
(function(scope, testing) {
1716

1817
var aliased = {};

src/scope.js

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

15-
'use strict';
1615
var webAnimationsShared = {};
1716
var webAnimations1 = {};
1817
var webAnimationsNext = {};

src/shadow-handler.js

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

15-
'use strict';
1615
(function(scope) {
1716

1817
function consumeShadow(string) {

src/shape-handler.js

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

15-
'use strict';
1615
(function(scope) {
1716

1817
var consumeLengthOrPercent = scope.consumeParenthesised.bind(null, scope.parseLengthOrPercent);

src/tick.js

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

15-
'use strict';
15+
1616
(function(shared, scope, testing) {
1717
var originalRequestAnimationFrame = window.requestAnimationFrame;
1818
var rafCallbacks = [];

src/timeline.js

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

15-
'use strict';
15+
1616
(function(shared, scope, testing) {
1717
var originalRequestAnimationFrame = window.requestAnimationFrame;
1818
window.requestAnimationFrame = function(f) {

src/timing-utilities.js

+2-3
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212
// See the License for the specific language governing permissions and
1313
// limitations under the License.
1414

15-
'use strict';
1615
(function(shared, testing) {
1716

1817
var fills = 'backwards|forwards|both|none'.split('|');
@@ -53,7 +52,7 @@
5352
if (this._effect) {
5453
this._effect._timingInput[member] = value;
5554
this._effect._timing = shared.normalizeTimingInput(this._effect._timingInput);
56-
this._effect._updateActiveDuration();
55+
this._effect.activeDuration = shared.calculateActiveDuration(this._effect._timing);
5756
if (this._effect._animation) {
5857
this._effect._animation._rebuildUnderlyingAnimation();
5958
}
@@ -144,7 +143,7 @@
144143
if ((property == 'direction') && (directions.indexOf(timingInput[property]) == -1)) {
145144
return;
146145
}
147-
if (property == 'playbackRate') {
146+
if (property == 'playbackRate' && timingInput[property] !== 1 && shared.isDeprecated('AnimationEffectTiming.playbackRate', '2014-11-28', 'Use Animation.playbackRate instead.')) {
148147
return;
149148
}
150149
timing[property] = timingInput[property];

src/transform-handler.js

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

15-
'use strict';
1615
(function(scope, testing) {
1716

1817
// This returns a function for converting transform functions to equivalent

src/visibility-handler.js

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

15-
'use strict';
1615
(function(scope, testing) {
1716

1817
function merge(left, right) {

src/web-animations-bonus-cancel-events.js

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

15-
'use strict';
1615
(function() {
1716

1817
if (document.createElement('div').animate([]).oncancel !== undefined) {

src/web-animations-bonus-object-form-keyframes.js

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

15-
'use strict';
1615
(function(shared) {
1716
// If the polyfill is being loaded in a context where Element.animate is
1817
// supported but object-form syntax is not, then creating an animation

src/web-animations-next-animation.js

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

15-
'use strict';
1615
(function(shared, scope, testing) {
1716
scope.animationsWithPromises = [];
1817

test/testharness-runner.js

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

15-
'use strict';
1615
(function() {
1716
var assert = chai.assert;
1817
mocha.setup({ ui: 'tdd' });

0 commit comments

Comments
 (0)