Skip to content

Update the Web Animations spec URLs #191

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

Merged
merged 1 commit into from
Jun 13, 2018
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.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion History.md
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@

* Added arbitrary easing capitalisation.

* Added "id" effect option. (http://w3c.github.io/web-animations/#dom-keyframeanimationoptions-id)
* Added "id" effect option. (https://drafts.csswg.org/web-animations/#dom-keyframeanimationoptions-id)

* Added "oncancel" event handler.

Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ Documentation
* [Examples of usage](/docs/examples.md)
* [Live demos](https://web-animations.github.io/web-animations-demos)
* [MDN reference](https://developer.mozilla.org/en-US/docs/Web/API/Element/animate)
* [W3C specification](http://w3c.github.io/web-animations/)
* [W3C specification](https://drafts.csswg.org/web-animations/)

We love feedback!
-----------------
Expand Down
4 changes: 2 additions & 2 deletions docs/examples.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ element.animate([
Timing parameters
-----------------
- Web Animations inherits many of its timing parameters from CSS Animations.
- See the [specification](http://w3c.github.io/web-animations/#animationeffecttimingreadonly) for details on each parameter.
- See the [specification](https://drafts.csswg.org/web-animations/#animationeffecttimingreadonly) for details on each parameter.

[**Live demo**](http://jsbin.com/dabehipiyo/edit?js,output)
```javascript
Expand Down Expand Up @@ -106,7 +106,7 @@ element.animate({
Playback controls
-----------------
- element.animate() returns an Animation object with basic playback controls.
- See the [specification](http://w3c.github.io/web-animations/#the-animation-interface) for details on each method.
- See the [specification](https://drafts.csswg.org/web-animations/#the-animation-interface) for details on each method.

[**Live demo**](http://jsbin.com/kutaqoxejo/edit?js,output)
```javascript
Expand Down
2 changes: 1 addition & 1 deletion externs/web-animations.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
/**
* @fileoverview Basic externs for the Web Animations API. This is not
* nessecarily exhaustive. For more information, see the spec-
* https://w3c.github.io/web-animations
* https://drafts.csswg.org/web-animations/
* @externs
*/

Expand Down
2 changes: 1 addition & 1 deletion src/normalize-keyframes.js
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@
}

function isNotAnimatable(property) {
// https://w3c.github.io/web-animations/#concept-not-animatable
// https://drafts.csswg.org/web-animations/#concept-not-animatable
return property === 'display' || property.lastIndexOf('animation', 0) === 0 || property.lastIndexOf('transition', 0) === 0;
}

Expand Down
18 changes: 9 additions & 9 deletions src/timing-utilities.js
Original file line number Diff line number Diff line change
Expand Up @@ -278,7 +278,7 @@
}

function repeatedDuration(timing) {
// https://w3c.github.io/web-animations/#calculating-the-active-duration
// https://drafts.csswg.org/web-animations/#calculating-the-active-duration
if (timing.duration === 0 || timing.iterations === 0) {
return 0;
}
Expand All @@ -291,7 +291,7 @@
var PhaseActive = 3;

function calculatePhase(activeDuration, localTime, timing) {
// https://w3c.github.io/web-animations/#animation-effect-phases-and-states
// https://drafts.csswg.org/web-animations/#animation-effect-phases-and-states
if (localTime == null) {
return PhaseNone;
}
Expand All @@ -308,7 +308,7 @@
}

function calculateActiveTime(activeDuration, fillMode, localTime, phase, delay) {
// https://w3c.github.io/web-animations/#calculating-the-active-time
// https://drafts.csswg.org/web-animations/#calculating-the-active-time
switch (phase) {
case PhaseBefore:
if (fillMode == 'backwards' || fillMode == 'both')
Expand All @@ -326,7 +326,7 @@
}

function calculateOverallProgress(iterationDuration, phase, iterations, activeTime, iterationStart) {
// https://w3c.github.io/web-animations/#calculating-the-overall-progress
// https://drafts.csswg.org/web-animations/#calculating-the-overall-progress
var overallProgress = iterationStart;
if (iterationDuration === 0) {
if (phase !== PhaseBefore) {
Expand All @@ -339,7 +339,7 @@
}

function calculateSimpleIterationProgress(overallProgress, iterationStart, phase, iterations, activeTime, iterationDuration) {
// https://w3c.github.io/web-animations/#calculating-the-simple-iteration-progress
// https://drafts.csswg.org/web-animations/#calculating-the-simple-iteration-progress

var simpleIterationProgress = (overallProgress === Infinity) ? iterationStart % 1 : overallProgress % 1;
if (simpleIterationProgress === 0 && phase === PhaseAfter && iterations !== 0 &&
Expand All @@ -350,7 +350,7 @@
}

function calculateCurrentIteration(phase, iterations, simpleIterationProgress, overallProgress) {
// https://w3c.github.io/web-animations/#calculating-the-current-iteration
// https://drafts.csswg.org/web-animations/#calculating-the-current-iteration
if (phase === PhaseAfter && iterations === Infinity) {
return Infinity;
}
Expand All @@ -361,7 +361,7 @@
}

function calculateDirectedProgress(playbackDirection, currentIteration, simpleIterationProgress) {
// https://w3c.github.io/web-animations/#calculating-the-directed-progress
// https://drafts.csswg.org/web-animations/#calculating-the-directed-progress
var currentDirection = playbackDirection;
if (playbackDirection !== 'normal' && playbackDirection !== 'reverse') {
var d = currentIteration;
Expand Down Expand Up @@ -390,8 +390,8 @@
var currentIteration = calculateCurrentIteration(phase, timing.iterations, simpleIterationProgress, overallProgress);
var directedProgress = calculateDirectedProgress(timing.direction, currentIteration, simpleIterationProgress);

// https://w3c.github.io/web-animations/#calculating-the-transformed-progress
// https://w3c.github.io/web-animations/#calculating-the-iteration-progress
// https://drafts.csswg.org/web-animations/#calculating-the-transformed-progress
// https://drafts.csswg.org/web-animations/#calculating-the-iteration-progress
return timing._easingFunction(directedProgress);
}

Expand Down