Skip to content

[web-animations-1] Should ready / finished rejections be marked as handled? #4556

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

Closed
birtles opened this issue Dec 3, 2019 · 5 comments · Fixed by #4873
Closed

[web-animations-1] Should ready / finished rejections be marked as handled? #4556

birtles opened this issue Dec 3, 2019 · 5 comments · Fixed by #4873

Comments

@birtles
Copy link
Contributor

birtles commented Dec 3, 2019

In web-platform-tests/wpt#18932 there was some discussion about unhandled rejections for the .ready promise and I wasn't sure what the correct behavior should be.

This morning I discovered whatwg/streams#547 where for streams we decided to explicitly mark rejections for "state promises" like .ready as handled. I wonder if we should be doing the same for .ready and .finished for the Animation interface?

@flackr
Copy link
Contributor

flackr commented Mar 12, 2020

This sounds reasonable to me. I was honestly surprised that the ready promise rejected when we in fact "handled" the requested actions. I think it would make sense to do the same here.

@graouts
Copy link
Contributor

graouts commented Mar 12, 2020

Agreed.

@birtles
Copy link
Contributor Author

birtles commented Mar 13, 2020

I worked on an initial patch for this for Firefox which should include WPT for this spec change:

https://hg.mozilla.org/try/rev/54bc69142ded40d5a5e5b8fef909bfd3fe1dab3e#l6.2

@birtles
Copy link
Contributor Author

birtles commented Mar 18, 2020

WPT for this change: web-platform-tests/wpt#22314

@graouts
Copy link
Contributor

graouts commented Mar 19, 2020

For reference, this change's implementation is tracked as WebKit bug 209240.

bertogg pushed a commit to Igalia/webkit that referenced this issue Mar 20, 2020
https://bugs.webkit.org/show_bug.cgi?id=209240
<rdar://problem/60592305>

Patch by Antoine Quint <graouts@apple.com> on 2020-03-19
Reviewed by Youenn Fablet.

LayoutTests/imported/w3c:

Add the new WPT tests added for this spec change (web-platform-tests/wpt#22314) and revert some workarounds
made in our copy of WPT tests to previously silence flaky console output related to promise rejections (added in r258275 and r258276).

* web-platform-tests/web-animations/interfaces/Animation/finished-expected.txt:
* web-platform-tests/web-animations/interfaces/Animation/finished.html:
* web-platform-tests/web-animations/interfaces/Animation/ready-expected.txt:
* web-platform-tests/web-animations/interfaces/Animation/ready.html:
* web-platform-tests/web-animations/timing-model/animations/finishing-an-animation.html:
* web-platform-tests/web-animations/timing-model/animations/pausing-an-animation.html:

Source/WebCore:

Implementing the spec change discussed in w3c/csswg-drafts#4556.

* animation/WebAnimation.cpp:
(WebCore::WebAnimation::cancel):
(WebCore::WebAnimation::resetPendingTasks):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@258702 268f45cc-cd09-0410-ab3c-d52691b4dbfc
JTensai pushed a commit to JTensai/csswg-drafts that referenced this issue May 13, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants