# HG changeset patch # User Brian Birtles # Date 1518501858 -32400 # Node ID 5ec4adb145cfadbd26a906d04d0aa3d984280578 # Parent bffab24e601a3dfa7d15d38433732071d0b92d7d Bug 1436659 - Add Animation.updatePlaybackRate WebIDL definition; r=bz This is the IDL added to the Web Animations specification: https://github.com/w3c/csswg-drafts/commit/5af5e276badf4df0271bcfa0b8e7837fff24133a Note that some of the changes in the above commit were reverted in the following commit: https://github.com/w3c/csswg-drafts/commit/673f6fc1269829743c707c53dcb04092f958de35 A folded version of the changes: https://gist.github.com/birtles/d147eb2e0e2d4d37fadf217abd709411 MozReview-Commit-ID: CJV7bzizXg4 diff --git a/dom/animation/Animation.h b/dom/animation/Animation.h --- a/dom/animation/Animation.h +++ b/dom/animation/Animation.h @@ -113,16 +113,17 @@ public: bool Pending() const { return mPendingState != PendingState::NotPending; } virtual Promise* GetReady(ErrorResult& aRv); Promise* GetFinished(ErrorResult& aRv); void Cancel(); void Finish(ErrorResult& aRv); virtual void Play(ErrorResult& aRv, LimitBehavior aLimitBehavior); virtual void Pause(ErrorResult& aRv); void Reverse(ErrorResult& aRv); + void UpdatePlaybackRate(double /*aPlaybackRate*/) {} bool IsRunningOnCompositor() const; IMPL_EVENT_HANDLER(finish); IMPL_EVENT_HANDLER(cancel); // Wrapper functions for Animation DOM methods when called // from script. // // We often use the same methods internally and from script but when called diff --git a/dom/webidl/Animation.webidl b/dom/webidl/Animation.webidl --- a/dom/webidl/Animation.webidl +++ b/dom/webidl/Animation.webidl @@ -39,16 +39,17 @@ interface Animation : EventTarget { attribute EventHandler oncancel; void cancel (); [Throws] void finish (); [Throws, BinaryName="playFromJS"] void play (); [Throws, BinaryName="pauseFromJS"] void pause (); + void updatePlaybackRate (double playbackRate); [Throws] void reverse (); }; // Non-standard extensions partial interface Animation { [ChromeOnly] readonly attribute boolean isRunningOnCompositor; };