Skip to content

Commit

Permalink
Merge pull request #124 from alancutter/revertUseStrict
Browse files Browse the repository at this point in the history
Revert adding 'use strict'
  • Loading branch information
alancutter authored Apr 13, 2017
2 parents 024b061 + b63f7d6 commit 866e017
Show file tree
Hide file tree
Showing 38 changed files with 12 additions and 49 deletions.
4 changes: 4 additions & 0 deletions History.md
Original file line number Diff line number Diff line change
@@ -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/124)

### 2.2.3 - *April 13 2017*

* [Added HTML import targets.](https://github.com/web-animations/web-animations-js/pull/94)
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
2 changes: 1 addition & 1 deletion src/animation.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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;
Expand Down
1 change: 0 additions & 1 deletion src/apply-preserving-inline-style.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 = {
Expand Down
1 change: 0 additions & 1 deletion src/apply.js
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
1 change: 0 additions & 1 deletion src/box-handler.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
1 change: 0 additions & 1 deletion src/color-handler.js
Original file line number Diff line number Diff line change
Expand Up @@ -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');
Expand Down
1 change: 0 additions & 1 deletion src/deprecation.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.

'use strict';
(function(shared) {

var silenced = {};
Expand Down
1 change: 0 additions & 1 deletion src/dev.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
1 change: 0 additions & 1 deletion src/dimension-handler.js
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
2 changes: 0 additions & 2 deletions src/effect-callback.js
Original file line number Diff line number Diff line change
Expand Up @@ -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');
Expand Down
1 change: 0 additions & 1 deletion src/element-animatable.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 = '';
Expand Down
1 change: 0 additions & 1 deletion src/font-weight-handler.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
4 changes: 1 addition & 3 deletions src/group-constructors.js
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down Expand Up @@ -117,8 +116,7 @@
},
remove: function() {
scope.removeMulti([this]);
},
_updateActiveDuration: function() {}
}
};

window.SequenceEffect.prototype = Object.create(constructor.prototype);
Expand Down
1 change: 0 additions & 1 deletion src/handler-utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand Down
1 change: 0 additions & 1 deletion src/interpolation.js
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
9 changes: 1 addition & 8 deletions src/keyframe-effect-constructor.js
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down Expand Up @@ -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;
};
Expand All @@ -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.');
Expand All @@ -108,9 +104,6 @@
},
remove: function() {
scope.removeMulti([this]);
},
_updateActiveDuration: function() {
this._activeDuration = shared.calculateActiveDuration(this._timing);
}
};

Expand Down
1 change: 0 additions & 1 deletion src/keyframe-effect.js
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
1 change: 0 additions & 1 deletion src/keyframe-interpolations.js
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
1 change: 0 additions & 1 deletion src/matrix-decomposition.js
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
1 change: 0 additions & 1 deletion src/matrix-interpolation.js
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
1 change: 0 additions & 1 deletion src/normalize-keyframes.js
Original file line number Diff line number Diff line change
Expand Up @@ -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: [
Expand Down
1 change: 0 additions & 1 deletion src/number-handler.js
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
1 change: 0 additions & 1 deletion src/position-handler.js
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
1 change: 0 additions & 1 deletion src/property-interpolation.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 = {};
Expand Down
1 change: 0 additions & 1 deletion src/property-names.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 = {};
Expand Down
1 change: 0 additions & 1 deletion src/scope.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 = {};
Expand Down
1 change: 0 additions & 1 deletion src/shadow-handler.js
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
1 change: 0 additions & 1 deletion src/shape-handler.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
2 changes: 1 addition & 1 deletion src/tick.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 = [];
Expand Down
2 changes: 1 addition & 1 deletion src/timeline.js
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
5 changes: 2 additions & 3 deletions src/timing-utilities.js
Original file line number Diff line number Diff line change
Expand Up @@ -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('|');
Expand Down Expand Up @@ -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();
}
Expand Down Expand Up @@ -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];
Expand Down
1 change: 0 additions & 1 deletion src/transform-handler.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 0 additions & 1 deletion src/visibility-handler.js
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
1 change: 0 additions & 1 deletion src/web-animations-bonus-cancel-events.js
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
1 change: 0 additions & 1 deletion src/web-animations-bonus-object-form-keyframes.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 0 additions & 1 deletion src/web-animations-next-animation.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 = [];

Expand Down
1 change: 0 additions & 1 deletion test/testharness-runner.js
Original file line number Diff line number Diff line change
Expand Up @@ -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' });
Expand Down

0 comments on commit 866e017

Please sign in to comment.