Bug 1425548 - Update references to Web Animations spec in dom/animation; r=hiro

MozReview-Commit-ID: 1f2Mz0VhnBm
This commit is contained in:
Brian Birtles
2017-12-15 14:55:08 -06:00
parent 8e151bcae7
commit 0c6901d581
10 changed files with 32 additions and 32 deletions

View File

@@ -131,7 +131,7 @@ Animation::SetEffect(AnimationEffectReadOnly* aEffect)
PostUpdate();
}
// https://w3c.github.io/web-animations/#setting-the-target-effect
// https://drafts.csswg.org/web-animations/#setting-the-target-effect
void
Animation::SetEffectNoUpdate(AnimationEffectReadOnly* aEffect)
{
@@ -223,7 +223,7 @@ Animation::SetTimeline(AnimationTimeline* aTimeline)
PostUpdate();
}
// https://w3c.github.io/web-animations/#setting-the-timeline
// https://drafts.csswg.org/web-animations/#setting-the-timeline
void
Animation::SetTimelineNoUpdate(AnimationTimeline* aTimeline)
{
@@ -251,7 +251,7 @@ Animation::SetTimelineNoUpdate(AnimationTimeline* aTimeline)
UpdateTiming(SeekFlag::NoSeek, SyncNotifyFlag::Async);
}
// https://w3c.github.io/web-animations/#set-the-animation-start-time
// https://drafts.csswg.org/web-animations/#set-the-animation-start-time
void
Animation::SetStartTime(const Nullable<TimeDuration>& aNewStartTime)
{
@@ -296,7 +296,7 @@ Animation::SetStartTime(const Nullable<TimeDuration>& aNewStartTime)
PostUpdate();
}
// https://w3c.github.io/web-animations/#current-time
// https://drafts.csswg.org/web-animations/#current-time
Nullable<TimeDuration>
Animation::GetCurrentTime() const
{
@@ -316,7 +316,7 @@ Animation::GetCurrentTime() const
return result;
}
// https://w3c.github.io/web-animations/#set-the-current-time
// https://drafts.csswg.org/web-animations/#set-the-current-time
void
Animation::SetCurrentTime(const TimeDuration& aSeekTime)
{
@@ -351,7 +351,7 @@ Animation::SetCurrentTime(const TimeDuration& aSeekTime)
PostUpdate();
}
// https://w3c.github.io/web-animations/#set-the-animation-playback-rate
// https://drafts.csswg.org/web-animations/#set-the-animation-playback-rate
void
Animation::SetPlaybackRate(double aPlaybackRate)
{
@@ -382,7 +382,7 @@ Animation::SetPlaybackRate(double aPlaybackRate)
PostUpdate();
}
// https://w3c.github.io/web-animations/#play-state
// https://drafts.csswg.org/web-animations/#play-state
AnimationPlayState
Animation::PlayState() const
{
@@ -450,7 +450,7 @@ Animation::Cancel()
PostUpdate();
}
// https://w3c.github.io/web-animations/#finish-an-animation
// https://drafts.csswg.org/web-animations/#finish-an-animation
void
Animation::Finish(ErrorResult& aRv)
{
@@ -520,7 +520,7 @@ Animation::Pause(ErrorResult& aRv)
PostUpdate();
}
// https://w3c.github.io/web-animations/#reverse-an-animation
// https://drafts.csswg.org/web-animations/#reverse-an-animation
void
Animation::Reverse(ErrorResult& aRv)
{
@@ -751,7 +751,7 @@ Animation::ElapsedTimeToTimeStamp(
return AnimationTimeToTimeStamp(aElapsedTime + delay);
}
// https://w3c.github.io/web-animations/#silently-set-the-current-time
// https://drafts.csswg.org/web-animations/#silently-set-the-current-time
void
Animation::SilentlySetCurrentTime(const TimeDuration& aSeekTime)
{
@@ -782,7 +782,7 @@ Animation::SilentlySetPlaybackRate(double aPlaybackRate)
}
}
// https://w3c.github.io/web-animations/#cancel-an-animation
// https://drafts.csswg.org/web-animations/#cancel-an-animation
void
Animation::CancelNoUpdate()
{
@@ -1046,7 +1046,7 @@ Animation::NotifyGeometricAnimationsStartingThisFrame()
mSyncWithGeometricAnimations = true;
}
// https://w3c.github.io/web-animations/#play-an-animation
// https://drafts.csswg.org/web-animations/#play-an-animation
void
Animation::PlayNoUpdate(ErrorResult& aRv, LimitBehavior aLimitBehavior)
{
@@ -1131,7 +1131,7 @@ Animation::PlayNoUpdate(ErrorResult& aRv, LimitBehavior aLimitBehavior)
}
}
// https://w3c.github.io/web-animations/#pause-an-animation
// https://drafts.csswg.org/web-animations/#pause-an-animation
void
Animation::PauseNoUpdate(ErrorResult& aRv)
{
@@ -1244,7 +1244,7 @@ Animation::UpdateTiming(SeekFlag aSeekFlag, SyncNotifyFlag aSyncNotifyFlag)
}
}
// https://w3c.github.io/web-animations/#update-an-animations-finished-state
// https://drafts.csswg.org/web-animations/#update-an-animations-finished-state
void
Animation::UpdateFinishedState(SeekFlag aSeekFlag,
SyncNotifyFlag aSyncNotifyFlag)
@@ -1357,7 +1357,7 @@ Animation::CancelPendingTasks()
mPendingReadyTime.SetNull();
}
// https://w3c.github.io/web-animations/#reset-an-animations-pending-tasks
// https://drafts.csswg.org/web-animations/#reset-an-animations-pending-tasks
void
Animation::ResetPendingTasks()
{

View File

@@ -442,14 +442,14 @@ protected:
// A Promise that is replaced on each call to Play()
// and fulfilled when Play() is successfully completed.
// This object is lazily created by GetReady.
// See http://w3c.github.io/web-animations/#current-ready-promise
// See http://drafts.csswg.org/web-animations/#current-ready-promise
RefPtr<Promise> mReady;
// A Promise that is resolved when we reach the end of the effect, or
// 0 when playing backwards. The Promise is replaced if the animation is
// finished but then a state change makes it not finished.
// This object is lazily created by GetFinished.
// See http://w3c.github.io/web-animations/#current-finished-promise
// See http://drafts.csswg.org/web-animations/#current-finished-promise
RefPtr<Promise> mFinished;
// Indicates if the animation is in the pending state (and what state it is

View File

@@ -46,7 +46,7 @@ AnimationEffectReadOnly::AnimationEffectReadOnly(
MOZ_ASSERT(aTiming);
}
// https://w3c.github.io/web-animations/#current
// https://drafts.csswg.org/web-animations/#current
bool
AnimationEffectReadOnly::IsCurrent() const
{
@@ -59,7 +59,7 @@ AnimationEffectReadOnly::IsCurrent() const
computedTiming.mPhase == ComputedTiming::AnimationPhase::Active;
}
// https://w3c.github.io/web-animations/#in-effect
// https://drafts.csswg.org/web-animations/#in-effect
bool
AnimationEffectReadOnly::IsInEffect() const
{
@@ -171,7 +171,7 @@ AnimationEffectReadOnly::GetComputedTimingAt(
}
// Convert active time to a multiple of iterations.
// https://w3c.github.io/web-animations/#overall-progress
// https://drafts.csswg.org/web-animations/#overall-progress
double overallProgress;
if (!result.mDuration) {
overallProgress = result.mPhase == ComputedTiming::AnimationPhase::Before
@@ -187,7 +187,7 @@ AnimationEffectReadOnly::GetComputedTimingAt(
}
// Determine the 0-based index of the current iteration.
// https://w3c.github.io/web-animations/#current-iteration
// https://drafts.csswg.org/web-animations/#current-iteration
result.mCurrentIteration =
(result.mIterations >= UINT64_MAX
&& result.mPhase == ComputedTiming::AnimationPhase::After)
@@ -198,7 +198,7 @@ AnimationEffectReadOnly::GetComputedTimingAt(
// Convert the overall progress to a fraction of a single iteration--the
// simply iteration progress.
// https://w3c.github.io/web-animations/#simple-iteration-progress
// https://drafts.csswg.org/web-animations/#simple-iteration-progress
double progress = IsFinite(overallProgress)
? fmod(overallProgress, 1.0)
: fmod(result.mIterationStart, 1.0);

View File

@@ -45,7 +45,7 @@ public:
void Init(const nsTimingFunction& aFunction);
// BeforeFlag is used in step timing function.
// https://w3c.github.io/web-animations/#before-flag
// https://drafts.csswg.org/css-timing/#before-flag
enum class BeforeFlag {
Unset,
Set

View File

@@ -180,7 +180,7 @@ KeyframesEqualIgnoringComputedOffsets(const nsTArray<Keyframe>& aLhs,
return true;
}
// https://w3c.github.io/web-animations/#dom-keyframeeffect-setkeyframes
// https://drafts.csswg.org/web-animations/#dom-keyframeeffect-setkeyframes
void
KeyframeEffectReadOnly::SetKeyframes(JSContext* aContext,
JS::Handle<JSObject*> aKeyframes,

View File

@@ -1452,7 +1452,7 @@ GetKeyframeListFromPropertyIndexedKeyframe(JSContext* aCx,
// Fill in any specified offsets
//
// This corresponds to step 5, "Otherwise," branch, substeps 5-6 of
// https://w3c.github.io/web-animations/#processing-a-keyframes-argument
// https://drafts.csswg.org/web-animations/#processing-a-keyframes-argument
const FallibleTArray<Nullable<double>>* offsets = nullptr;
AutoTArray<Nullable<double>, 1> singleOffset;
auto& offset = keyframeDict.mOffset;
@@ -1482,7 +1482,7 @@ GetKeyframeListFromPropertyIndexedKeyframe(JSContext* aCx,
// are between 0.0 and 1.0 inclusive.
//
// This corresponds to steps 6-7 of
// https://w3c.github.io/web-animations/#processing-a-keyframes-argument
// https://drafts.csswg.org/web-animations/#processing-a-keyframes-argument
//
// In the spec, TypeErrors arising from invalid offsets and easings are thrown
// at the end of the procedure since it assumes we initially store easing
@@ -1502,7 +1502,7 @@ GetKeyframeListFromPropertyIndexedKeyframe(JSContext* aCx,
// Fill in any easings.
//
// This corresponds to step 5, "Otherwise," branch, substeps 7-11 of
// https://w3c.github.io/web-animations/#processing-a-keyframes-argument
// https://drafts.csswg.org/web-animations/#processing-a-keyframes-argument
FallibleTArray<Maybe<ComputedTimingFunction>> easings;
auto parseAndAppendEasing = [&](const nsString& easingString,
ErrorResult& aRv) {
@@ -1546,7 +1546,7 @@ GetKeyframeListFromPropertyIndexedKeyframe(JSContext* aCx,
// Fill in any composite operations.
//
// This corresponds to step 5, "Otherwise," branch, substep 12 of
// https://w3c.github.io/web-animations/#processing-a-keyframes-argument
// https://drafts.csswg.org/web-animations/#processing-a-keyframes-argument
const FallibleTArray<dom::CompositeOperation>* compositeOps;
AutoTArray<dom::CompositeOperation, 1> singleCompositeOp;
auto& composite = keyframeDict.mComposite;

View File

@@ -67,7 +67,7 @@ public:
* Calculate the computed offset of keyframes by evenly distributing keyframes
* with a missing offset.
*
* @see https://w3c.github.io/web-animations/#calculating-computed-keyframes
* @see https://drafts.csswg.org/web-animations/#calculating-computed-keyframes
*
* @param aKeyframes The set of keyframes to adjust.
*/

View File

@@ -69,7 +69,7 @@ const END_POSITION = 200;
// terms used in the Web Animations specification for specific phases of an
// animation. The terms can be found here:
//
// http://w3c.github.io/web-animations/#animation-effect-phases-and-states
// http://drafts.csswg.org/web-animations/#animation-effect-phases-and-states
// Called when currentTime is set to zero (the beginning of the start delay).
function checkStateOnSettingCurrentTimeToZero(animation)

View File

@@ -68,7 +68,7 @@ const END_POSITION = 200;
// terms used in the Web Animations specification for specific phases of an
// animation. The terms can be found here:
//
// https://w3c.github.io/web-animations/#animation-effect-phases-and-states
// https://drafts.csswg.org/web-animations/#animation-effect-phases-and-states
//
// Note the distinction between the "animation start time" which occurs before
// the start delay and the start of the active interval which occurs after it.

View File

@@ -17,7 +17,7 @@ const MS_PER_SEC = 1000;
/* The recommended minimum precision to use for time values[1].
*
* [1] https://w3c.github.io/web-animations/#precision-of-time-values
* [1] https://drafts.csswg.org/web-animations/#precision-of-time-values
*/
var TIME_PRECISION = 0.0005; // ms