WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
180830
[Web Animations] Implement the cancel() method on Animation
https://bugs.webkit.org/show_bug.cgi?id=180830
Summary
[Web Animations] Implement the cancel() method on Animation
Antoine Quint
Reported
2017-12-14 12:59:03 PST
We need to expose the cancel() method on the Animation interface.
Attachments
Patch
(10.63 KB, patch)
2017-12-14 13:02 PST
,
Antoine Quint
dino
: review+
Details
Formatted Diff
Diff
View All
Add attachment
proposed patch, testcase, etc.
Radar WebKit Bug Importer
Comment 1
2017-12-14 12:59:37 PST
<
rdar://problem/36055816
>
Antoine Quint
Comment 2
2017-12-14 13:02:20 PST
Created
attachment 329387
[details]
Patch
Dean Jackson
Comment 3
2017-12-14 14:04:18 PST
Comment on
attachment 329387
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=329387&action=review
> Source/WebCore/animation/WebAnimation.cpp:342 > + // 2. Reject the current finished promise with a DOMException named "AbortError". > + m_finishedPromise.reject(Exception { AbortError });
Are you confirming that all these changes are covered by existing tests? I don't see any changes in the expected results that are looking for this. If not, you should be writing new tests.
> Source/WebCore/animation/WebAnimation.cpp:356 > + // 4. Create an AnimationPlaybackEvent, cancelEvent. > + // 5. Set cancelEvent's type attribute to cancel. > + // 6. Set cancelEvent's currentTime to null. > + // 7. Let timeline time be the current time of the timeline with which animation is associated. If animation is not associated with an > + // active timeline, let timeline time be n unresolved time value. > + // 8. Set cancelEvent's timelineTime to timeline time. If timeline time is unresolved, set it to null. > + // 9. If animation has a document for timing, then append cancelEvent to its document for timing's pending animation event queue along > + // with its target, animation. If animation is associated with an active timeline that defines a procedure to convert timeline times > + // to origin-relative time, let the scheduled event time be the result of applying that procedure to timeline time. Otherwise, the > + // scheduled event time is an unresolved time value.
Do you have bugs for all these missing steps?
Antoine Quint
Comment 4
2017-12-14 14:10:03 PST
(In reply to Dean Jackson from
comment #3
)
> Comment on
attachment 329387
[details]
> Patch > > View in context: >
https://bugs.webkit.org/attachment.cgi?id=329387&action=review
> > > Source/WebCore/animation/WebAnimation.cpp:342 > > + // 2. Reject the current finished promise with a DOMException named "AbortError". > > + m_finishedPromise.reject(Exception { AbortError }); > > Are you confirming that all these changes are covered by existing tests? I > don't see any changes in the expected results that are looking for this. If > not, you should be writing new tests. > > > Source/WebCore/animation/WebAnimation.cpp:356 > > + // 4. Create an AnimationPlaybackEvent, cancelEvent. > > + // 5. Set cancelEvent's type attribute to cancel. > > + // 6. Set cancelEvent's currentTime to null. > > + // 7. Let timeline time be the current time of the timeline with which animation is associated. If animation is not associated with an > > + // active timeline, let timeline time be n unresolved time value. > > + // 8. Set cancelEvent's timelineTime to timeline time. If timeline time is unresolved, set it to null. > > + // 9. If animation has a document for timing, then append cancelEvent to its document for timing's pending animation event queue along > > + // with its target, animation. If animation is associated with an active timeline that defines a procedure to convert timeline times > > + // to origin-relative time, let the scheduled event time be the result of applying that procedure to timeline time. Otherwise, the > > + // scheduled event time is an unresolved time value. > > Do you have bugs for all these missing steps?
They're all implemented via the single function call below those comments: enqueueAnimationPlaybackEvent(eventNames().cancelEvent, std::nullopt, m_timeline ? m_timeline->currentTime() : std::nullopt);
Antoine Quint
Comment 5
2017-12-14 14:12:45 PST
Committed
r225927
: <
https://trac.webkit.org/changeset/225927
>
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug