From 6521f6f9979018eda32443e5c689b6f2dec4fd24 Mon Sep 17 00:00:00 2001 From: Alan Cutter Date: Fri, 14 Apr 2017 09:27:06 +1000 Subject: [PATCH 1/4] Revert "Use strict" This reverts commit 96e1cb697b17661801d038b419cbbca67e14e0a2. --- src/animation.js | 2 +- src/apply-preserving-inline-style.js | 1 - src/apply.js | 1 - src/box-handler.js | 1 - src/color-handler.js | 1 - src/deprecation.js | 1 - src/dev.js | 1 - src/dimension-handler.js | 1 - src/effect-callback.js | 2 -- src/element-animatable.js | 1 - src/font-weight-handler.js | 1 - src/group-constructors.js | 4 +--- src/handler-utils.js | 1 - src/interpolation.js | 1 - src/keyframe-effect-constructor.js | 9 +-------- src/keyframe-effect.js | 1 - src/keyframe-interpolations.js | 1 - src/matrix-decomposition.js | 1 - src/matrix-interpolation.js | 1 - src/normalize-keyframes.js | 1 - src/number-handler.js | 1 - src/position-handler.js | 1 - src/property-interpolation.js | 1 - src/property-names.js | 1 - src/scope.js | 1 - src/shadow-handler.js | 1 - src/shape-handler.js | 1 - src/tick.js | 2 +- src/timeline.js | 2 +- src/timing-utilities.js | 5 ++--- src/transform-handler.js | 1 - src/visibility-handler.js | 1 - src/web-animations-bonus-cancel-events.js | 1 - src/web-animations-bonus-object-form-keyframes.js | 1 - src/web-animations-next-animation.js | 1 - test/testharness-runner.js | 1 - 36 files changed, 7 insertions(+), 48 deletions(-) diff --git a/src/animation.js b/src/animation.js index 0d229783..e9f64826 100644 --- a/src/animation.js +++ b/src/animation.js @@ -12,7 +12,6 @@ // See the License for the specific language governing permissions and // limitations under the License. -'use strict'; (function(shared, scope, testing) { shared.sequenceNumber = 0; @@ -192,6 +191,7 @@ this._inEffect = false; this._idle = true; this._paused = false; + this._isFinished = true; this._finishedFlag = true; this._currentTime = 0; this._startTime = null; diff --git a/src/apply-preserving-inline-style.js b/src/apply-preserving-inline-style.js index 020ccf06..795be364 100644 --- a/src/apply-preserving-inline-style.js +++ b/src/apply-preserving-inline-style.js @@ -12,7 +12,6 @@ // See the License for the specific language governing permissions and // limitations under the License. -'use strict'; (function(scope, testing) { var styleAttributes = { diff --git a/src/apply.js b/src/apply.js index 3d8c33e9..3200f967 100644 --- a/src/apply.js +++ b/src/apply.js @@ -12,7 +12,6 @@ // See the License for the specific language governing permissions and // limitations under the License. -'use strict'; (function(scope, testing) { scope.apply = function(element, property, value) { diff --git a/src/box-handler.js b/src/box-handler.js index 456cef04..3399263a 100644 --- a/src/box-handler.js +++ b/src/box-handler.js @@ -12,7 +12,6 @@ // See the License for the specific language governing permissions and // limitations under the License. -'use strict'; (function(scope, testing) { function consumeLengthPercentOrAuto(string) { return scope.consumeLengthOrPercent(string) || scope.consumeToken(/^auto/, string); diff --git a/src/color-handler.js b/src/color-handler.js index 69fcbdfb..3a05bff0 100644 --- a/src/color-handler.js +++ b/src/color-handler.js @@ -12,7 +12,6 @@ // See the License for the specific language governing permissions and // limitations under the License. -'use strict'; (function(scope, testing) { var canvas = document.createElementNS('http://www.w3.org/1999/xhtml', 'canvas'); diff --git a/src/deprecation.js b/src/deprecation.js index 48fa2c83..6bdb4a22 100644 --- a/src/deprecation.js +++ b/src/deprecation.js @@ -12,7 +12,6 @@ // See the License for the specific language governing permissions and // limitations under the License. -'use strict'; (function(shared) { var silenced = {}; diff --git a/src/dev.js b/src/dev.js index 640d0ad1..a5e225c0 100644 --- a/src/dev.js +++ b/src/dev.js @@ -12,6 +12,5 @@ // See the License for the specific language governing permissions and // limitations under the License. -'use strict'; var WEB_ANIMATIONS_TESTING = false; var webAnimationsTesting = null; diff --git a/src/dimension-handler.js b/src/dimension-handler.js index a423a0c3..f1b263d1 100644 --- a/src/dimension-handler.js +++ b/src/dimension-handler.js @@ -12,7 +12,6 @@ // See the License for the specific language governing permissions and // limitations under the License. -'use strict'; (function(scope, testing) { function parseDimension(unitRegExp, string) { diff --git a/src/effect-callback.js b/src/effect-callback.js index 29b59541..3051a593 100644 --- a/src/effect-callback.js +++ b/src/effect-callback.js @@ -11,8 +11,6 @@ // 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(shared, scope, testing) { var nullTarget = document.createElementNS('http://www.w3.org/1999/xhtml', 'div'); diff --git a/src/element-animatable.js b/src/element-animatable.js index 2b274c2a..765edf06 100644 --- a/src/element-animatable.js +++ b/src/element-animatable.js @@ -12,7 +12,6 @@ // See the License for the specific language governing permissions and // limitations under the License. -'use strict'; (function(scope) { window.Element.prototype.animate = function(effectInput, options) { var id = ''; diff --git a/src/font-weight-handler.js b/src/font-weight-handler.js index 1dc50bfe..4760486a 100644 --- a/src/font-weight-handler.js +++ b/src/font-weight-handler.js @@ -12,7 +12,6 @@ // See the License for the specific language governing permissions and // limitations under the License. -'use strict'; (function(scope) { function parse(string) { var out = Number(string); diff --git a/src/group-constructors.js b/src/group-constructors.js index 446db403..e5c0a102 100644 --- a/src/group-constructors.js +++ b/src/group-constructors.js @@ -12,7 +12,6 @@ // See the License for the specific language governing permissions and // limitations under the License. -'use strict'; (function(shared, scope, testing) { function groupChildDuration(node) { @@ -117,8 +116,7 @@ }, remove: function() { scope.removeMulti([this]); - }, - _updateActiveDuration: function() {} + } }; window.SequenceEffect.prototype = Object.create(constructor.prototype); diff --git a/src/handler-utils.js b/src/handler-utils.js index be71c871..d9f05e17 100644 --- a/src/handler-utils.js +++ b/src/handler-utils.js @@ -12,7 +12,6 @@ // See the License for the specific language governing permissions and // limitations under the License. -'use strict'; (function(scope) { // consume* functions return a 2 value array of [parsed-data, '' or not-yet consumed input] diff --git a/src/interpolation.js b/src/interpolation.js index c1a2c339..ba63ed35 100644 --- a/src/interpolation.js +++ b/src/interpolation.js @@ -12,7 +12,6 @@ // See the License for the specific language governing permissions and // limitations under the License. -'use strict'; (function(scope, testing) { function interpolate(from, to, f) { diff --git a/src/keyframe-effect-constructor.js b/src/keyframe-effect-constructor.js index 13eb2ec4..3d0f1bd6 100644 --- a/src/keyframe-effect-constructor.js +++ b/src/keyframe-effect-constructor.js @@ -12,7 +12,6 @@ // See the License for the specific language governing permissions and // limitations under the License. -'use strict'; (function(shared, scope, testing) { var disassociate = function(effect) { @@ -71,7 +70,7 @@ this._normalizedKeyframes = new KeyframeList(effectInput); } this._keyframes = effectInput; - this._updateActiveDuration(); + this.activeDuration = shared.calculateActiveDuration(this._timing); this._id = id; return this; }; @@ -94,9 +93,6 @@ get parent() { return this._parent; }, - get activeDuration() { - return this._activeDuration; - }, clone: function() { if (typeof this.getFrames() == 'function') { throw new Error('Cloning custom effects is not supported.'); @@ -108,9 +104,6 @@ }, remove: function() { scope.removeMulti([this]); - }, - _updateActiveDuration: function() { - this._activeDuration = shared.calculateActiveDuration(this._timing); } }; diff --git a/src/keyframe-effect.js b/src/keyframe-effect.js index 2261e84f..7775d585 100644 --- a/src/keyframe-effect.js +++ b/src/keyframe-effect.js @@ -12,7 +12,6 @@ // See the License for the specific language governing permissions and // limitations under the License. -'use strict'; (function(shared, scope, testing) { function EffectTime(timing) { diff --git a/src/keyframe-interpolations.js b/src/keyframe-interpolations.js index f57d6b47..cab801ed 100644 --- a/src/keyframe-interpolations.js +++ b/src/keyframe-interpolations.js @@ -12,7 +12,6 @@ // See the License for the specific language governing permissions and // limitations under the License. -'use strict'; (function(shared, scope, testing) { scope.convertEffectInput = function(effectInput) { diff --git a/src/matrix-decomposition.js b/src/matrix-decomposition.js index 948104c3..4172513d 100644 --- a/src/matrix-decomposition.js +++ b/src/matrix-decomposition.js @@ -12,7 +12,6 @@ // See the License for the specific language governing permissions and // limitations under the License. -'use strict'; (function(scope, testing) { var decomposeMatrix = (function() { function determinant(m) { diff --git a/src/matrix-interpolation.js b/src/matrix-interpolation.js index c19dde5c..9a35de3b 100644 --- a/src/matrix-interpolation.js +++ b/src/matrix-interpolation.js @@ -12,7 +12,6 @@ // See the License for the specific language governing permissions and // limitations under the License. -'use strict'; (function(scope, testing) { var composeMatrix = (function() { function multiply(a, b) { diff --git a/src/normalize-keyframes.js b/src/normalize-keyframes.js index 6137c84a..1fd02548 100644 --- a/src/normalize-keyframes.js +++ b/src/normalize-keyframes.js @@ -12,7 +12,6 @@ // See the License for the specific language governing permissions and // limitations under the License. -'use strict'; (function(shared, testing) { var shorthandToLonghand = { background: [ diff --git a/src/number-handler.js b/src/number-handler.js index 2a340ecb..7d0e7f9b 100644 --- a/src/number-handler.js +++ b/src/number-handler.js @@ -12,7 +12,6 @@ // See the License for the specific language governing permissions and // limitations under the License. -'use strict'; (function(scope, testing) { function numberToString(x) { diff --git a/src/position-handler.js b/src/position-handler.js index 32b95933..18cea438 100644 --- a/src/position-handler.js +++ b/src/position-handler.js @@ -12,7 +12,6 @@ // See the License for the specific language governing permissions and // limitations under the License. -'use strict'; (function(scope) { function negateDimension(dimension) { diff --git a/src/property-interpolation.js b/src/property-interpolation.js index 89322571..b7e594f3 100644 --- a/src/property-interpolation.js +++ b/src/property-interpolation.js @@ -12,7 +12,6 @@ // See the License for the specific language governing permissions and // limitations under the License. -'use strict'; (function(shared, scope, testing) { var propertyHandlers = {}; diff --git a/src/property-names.js b/src/property-names.js index 557fccd6..c52d990c 100644 --- a/src/property-names.js +++ b/src/property-names.js @@ -12,7 +12,6 @@ // See the License for the specific language governing permissions and // limitations under the License. -'use strict'; (function(scope, testing) { var aliased = {}; diff --git a/src/scope.js b/src/scope.js index 9bab6b6b..c8248802 100644 --- a/src/scope.js +++ b/src/scope.js @@ -12,7 +12,6 @@ // See the License for the specific language governing permissions and // limitations under the License. -'use strict'; var webAnimationsShared = {}; var webAnimations1 = {}; var webAnimationsNext = {}; diff --git a/src/shadow-handler.js b/src/shadow-handler.js index 531b1b9e..3f8201d8 100644 --- a/src/shadow-handler.js +++ b/src/shadow-handler.js @@ -12,7 +12,6 @@ // See the License for the specific language governing permissions and // limitations under the License. -'use strict'; (function(scope) { function consumeShadow(string) { diff --git a/src/shape-handler.js b/src/shape-handler.js index 1ad5048f..6bbf79fe 100644 --- a/src/shape-handler.js +++ b/src/shape-handler.js @@ -12,7 +12,6 @@ // See the License for the specific language governing permissions and // limitations under the License. -'use strict'; (function(scope) { var consumeLengthOrPercent = scope.consumeParenthesised.bind(null, scope.parseLengthOrPercent); diff --git a/src/tick.js b/src/tick.js index 6d8f7acb..08b0a140 100644 --- a/src/tick.js +++ b/src/tick.js @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -'use strict'; + (function(shared, scope, testing) { var originalRequestAnimationFrame = window.requestAnimationFrame; var rafCallbacks = []; diff --git a/src/timeline.js b/src/timeline.js index 605a54d1..2b213b55 100644 --- a/src/timeline.js +++ b/src/timeline.js @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -'use strict'; + (function(shared, scope, testing) { var originalRequestAnimationFrame = window.requestAnimationFrame; window.requestAnimationFrame = function(f) { diff --git a/src/timing-utilities.js b/src/timing-utilities.js index ffbe008d..2f16f3b1 100644 --- a/src/timing-utilities.js +++ b/src/timing-utilities.js @@ -12,7 +12,6 @@ // See the License for the specific language governing permissions and // limitations under the License. -'use strict'; (function(shared, testing) { var fills = 'backwards|forwards|both|none'.split('|'); @@ -53,7 +52,7 @@ if (this._effect) { this._effect._timingInput[member] = value; this._effect._timing = shared.normalizeTimingInput(this._effect._timingInput); - this._effect._updateActiveDuration(); + this._effect.activeDuration = shared.calculateActiveDuration(this._effect._timing); if (this._effect._animation) { this._effect._animation._rebuildUnderlyingAnimation(); } @@ -144,7 +143,7 @@ if ((property == 'direction') && (directions.indexOf(timingInput[property]) == -1)) { return; } - if (property == 'playbackRate') { + if (property == 'playbackRate' && timingInput[property] !== 1 && shared.isDeprecated('AnimationEffectTiming.playbackRate', '2014-11-28', 'Use Animation.playbackRate instead.')) { return; } timing[property] = timingInput[property]; diff --git a/src/transform-handler.js b/src/transform-handler.js index ad227f5d..c4482961 100644 --- a/src/transform-handler.js +++ b/src/transform-handler.js @@ -12,7 +12,6 @@ // See the License for the specific language governing permissions and // limitations under the License. -'use strict'; (function(scope, testing) { // This returns a function for converting transform functions to equivalent diff --git a/src/visibility-handler.js b/src/visibility-handler.js index 31e8d779..53f29535 100644 --- a/src/visibility-handler.js +++ b/src/visibility-handler.js @@ -12,7 +12,6 @@ // See the License for the specific language governing permissions and // limitations under the License. -'use strict'; (function(scope, testing) { function merge(left, right) { diff --git a/src/web-animations-bonus-cancel-events.js b/src/web-animations-bonus-cancel-events.js index 2e9cf1f6..3905496f 100644 --- a/src/web-animations-bonus-cancel-events.js +++ b/src/web-animations-bonus-cancel-events.js @@ -12,7 +12,6 @@ // See the License for the specific language governing permissions and // limitations under the License. -'use strict'; (function() { if (document.createElement('div').animate([]).oncancel !== undefined) { diff --git a/src/web-animations-bonus-object-form-keyframes.js b/src/web-animations-bonus-object-form-keyframes.js index 8aeebcb3..c1b6ecdc 100644 --- a/src/web-animations-bonus-object-form-keyframes.js +++ b/src/web-animations-bonus-object-form-keyframes.js @@ -12,7 +12,6 @@ // See the License for the specific language governing permissions and // limitations under the License. -'use strict'; (function(shared) { // If the polyfill is being loaded in a context where Element.animate is // supported but object-form syntax is not, then creating an animation diff --git a/src/web-animations-next-animation.js b/src/web-animations-next-animation.js index 4738694a..698532cd 100644 --- a/src/web-animations-next-animation.js +++ b/src/web-animations-next-animation.js @@ -12,7 +12,6 @@ // See the License for the specific language governing permissions and // limitations under the License. -'use strict'; (function(shared, scope, testing) { scope.animationsWithPromises = []; diff --git a/test/testharness-runner.js b/test/testharness-runner.js index 71e9ddbf..1a9a909e 100644 --- a/test/testharness-runner.js +++ b/test/testharness-runner.js @@ -12,7 +12,6 @@ // See the License for the specific language governing permissions and // limitations under the License. -'use strict'; (function() { var assert = chai.assert; mocha.setup({ ui: 'tdd' }); From 65f79621e045d27b14933c601fd4ac63707da4fc Mon Sep 17 00:00:00 2001 From: Alan Cutter Date: Fri, 14 Apr 2017 09:37:40 +1000 Subject: [PATCH 2/4] Update history --- History.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/History.md b/History.md index 3585857d..33f8267b 100644 --- a/History.md +++ b/History.md @@ -1,3 +1,7 @@ +### 2.2.4 - *April 14 2017* + + * [Reverted adding 'use strict' to source files.](https://github.com/web-animations/web-animations-next/pull/97) + ### 2.2.3 - *April 13 2017* * [Added HTML import targets.](https://github.com/web-animations/web-animations-js/pull/94) From f34cb745593ee2460da6d81e0d6b01c5d137548e Mon Sep 17 00:00:00 2001 From: Alan Cutter Date: Fri, 14 Apr 2017 09:39:28 +1000 Subject: [PATCH 3/4] Update version --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index b6064ccd..60db6c28 100644 --- a/package.json +++ b/package.json @@ -5,7 +5,7 @@ "type": "git", "url": "https://github.com/web-animations/web-animations-js.git" }, - "version": "2.2.3", + "version": "2.2.4", "keywords": [ "animations", "polyfill" From b63f7d6b4d5252641e7eea540b4e046f366511f2 Mon Sep 17 00:00:00 2001 From: Alan Cutter Date: Fri, 14 Apr 2017 09:42:45 +1000 Subject: [PATCH 4/4] Update pull request link --- History.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/History.md b/History.md index 33f8267b..1bfe0153 100644 --- a/History.md +++ b/History.md @@ -1,6 +1,6 @@ ### 2.2.4 - *April 14 2017* - * [Reverted adding 'use strict' to source files.](https://github.com/web-animations/web-animations-next/pull/97) + * [Reverted adding 'use strict' to source files.](https://github.com/web-animations/web-animations-next/pull/124) ### 2.2.3 - *April 13 2017*