Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Revert adding 'use strict' #124

Merged
merged 4 commits into from Apr 13, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 4 additions & 0 deletions 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/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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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