Skip to content

[web-animations] add support for canceling style-originated animations silently - #26231

Merged
webkit-commit-queue merged 1 commit into
WebKit:mainfrom
graouts:display-animatable-silently-cancel-style-originated-animations
Mar 21, 2024
Merged

webkit-commit-queue merged 1 commit into
WebKit:mainfrom
graouts:display-animatable-silently-cancel-style-originated-animations

Conversation

@graouts

@graouts graouts commented Mar 21, 2024 •

Copy link
Copy Markdown
Contributor

28a06fc

[web-animations] add support for canceling style-originated animations silently
https://bugs.webkit.org/show_bug.cgi?id=271365

Reviewed by Antti Koivisto.

When we will be adding animation support for the `display` property (see bug 267762) we will
need to resolve animations even when the underlying style has `display: none` to see whether
animations yield a different value. In that process, we may create style-originated animations
that will ultimately be canceled once we're certain `display: none` is still set.

In 276414@main we created a list of style-originated animations created during a style update.

We now add support for canceling that group of style-originated animations in a way that is not
script observable, or "silently" in Web Animations parlance.

Once we get to add animation support for the `display` property proper, we will add a call to
`StyleOriginatedAnimation::cancelFromStyle()` with the list of newly-created style-originated
animations that require silent cancelation.

* Source/WebCore/animation/StyleOriginatedAnimation.cpp:
(WebCore::StyleOriginatedAnimation::cancel):
(WebCore::StyleOriginatedAnimation::cancelFromStyle):
* Source/WebCore/animation/StyleOriginatedAnimation.h:
* Source/WebCore/animation/WebAnimation.cpp:
(WebCore::WebAnimation::cancel):
* Source/WebCore/animation/WebAnimation.h:
* Source/WebCore/style/Styleable.cpp:
(WebCore::Styleable::cancelStyleOriginatedAnimations const):
* Source/WebCore/style/Styleable.h:
(WebCore::Styleable::cancelStyleOriginatedAnimations):

Canonical link: https://commits.webkit.org/276453@main

ebfbed8

Misc iOS, tvOS & watchOS macOS Linux Windows
✅ 🧪 style ✅ 🛠 ios ✅ 🛠 mac ✅ 🛠 wpe ✅ 🛠 wincairo
✅ 🧪 bindings ✅ 🛠 ios-sim ✅ 🛠 mac-AS-debug   🧪 wpe-wk2
✅ 🧪 webkitperl ✅ 🧪 ios-wk2 ✅ 🧪 api-mac ✅ 🧪 api-wpe
✅ 🧪 ios-wk2-wpt   🧪 mac-wk1 ✅ 🛠 wpe-skia
✅ 🧪 api-ios ✅ 🧪 mac-wk2 ✅ 🛠 gtk
✅ 🛠 tv ✅ 🧪 mac-AS-debug-wk2   🧪 gtk-wk2
✅ 🛠 tv-sim   🧪 api-gtk
✅ 🛠 watch
✅ 🛠 🧪 unsafe-merge ✅ 🛠 watch-sim

@graouts graouts self-assigned this Mar 21, 2024
@graouts graouts added the Animations Bugs related to CSS + SVG animations and transitions label Mar 21, 2024
@graouts
graouts requested review from anttijk and grorg March 21, 2024 07:52
@graouts graouts added the unsafe-merge-queue Applied to send a pull request to merge-queue, but skip building and testing label Mar 21, 2024
…s silently

https://bugs.webkit.org/show_bug.cgi?id=271365

Reviewed by Antti Koivisto.

When we will be adding animation support for the `display` property (see bug 267762) we will
need to resolve animations even when the underlying style has `display: none` to see whether
animations yield a different value. In that process, we may create style-originated animations
that will ultimately be canceled once we're certain `display: none` is still set.

In 276414@main we created a list of style-originated animations created during a style update.

We now add support for canceling that group of style-originated animations in a way that is not
script observable, or "silently" in Web Animations parlance.

Once we get to add animation support for the `display` property proper, we will add a call to
`StyleOriginatedAnimation::cancelFromStyle()` with the list of newly-created style-originated
animations that require silent cancelation.

* Source/WebCore/animation/StyleOriginatedAnimation.cpp:
(WebCore::StyleOriginatedAnimation::cancel):
(WebCore::StyleOriginatedAnimation::cancelFromStyle):
* Source/WebCore/animation/StyleOriginatedAnimation.h:
* Source/WebCore/animation/WebAnimation.cpp:
(WebCore::WebAnimation::cancel):
* Source/WebCore/animation/WebAnimation.h:
* Source/WebCore/style/Styleable.cpp:
(WebCore::Styleable::cancelStyleOriginatedAnimations const):
* Source/WebCore/style/Styleable.h:
(WebCore::Styleable::cancelStyleOriginatedAnimations):

Canonical link: https://commits.webkit.org/276453@main
@webkit-commit-queue
webkit-commit-queue force-pushed the display-animatable-silently-cancel-style-originated-animations branch from ebfbed8 to 28a06fc Compare March 21, 2024 10:29
@webkit-commit-queue

Copy link
Copy Markdown
Collaborator

Committed 276453@main (28a06fc): https://commits.webkit.org/276453@main

Reviewed commits have been landed. Closing PR #26231 and removing active labels.

@webkit-commit-queue
webkit-commit-queue merged commit 28a06fc into WebKit:main Mar 21, 2024
@webkit-commit-queue webkit-commit-queue removed the unsafe-merge-queue Applied to send a pull request to merge-queue, but skip building and testing label Mar 21, 2024
@graouts
graouts deleted the display-animatable-silently-cancel-style-originated-animations branch March 21, 2024 10:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Animations Bugs related to CSS + SVG animations and transitions

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants