Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 4a38bbbd7547d45a97ce02294621513d1559ce7a
https://github.com/WebKit/WebKit/commit/4a38bbbd7547d45a97ce02294621513d1559ce7a
Author: Antoine Quint <[email protected]>
Date: 2023-12-06 (Wed, 06 Dec 2023)
Changed paths:
A
LayoutTests/webanimations/scheduling-of-accelerated-css-animation-without-css-animation-event-listeners-expected.txt
A
LayoutTests/webanimations/scheduling-of-accelerated-css-animation-without-css-animation-event-listeners.html
M Source/WebCore/animation/KeyframeEffect.cpp
Log Message:
-----------
[web-animations] accelerated CSS Animation should not schedule animation
resolution at iteration boundary if no CSS Animation event listener was
registered (affects reddit.com)
https://bugs.webkit.org/show_bug.cgi?id=265936
rdar://119244430
Reviewed by Antti Koivisto.
While we don't need to schedule animation resolution for animations that are
running accelerated
to resolve styles, we do need to schedule resolution in order to dispatch
`animationiteration`
events in the case of CSS Animations.
However, it is unlikely that the content will be interested in such events. As
a cheap optimization,
we can detect whether any CSS Animation event listener is registered for the
document to which the
effect target belongs, and if that is not the case we don't need to schedule
animation resolution.
*
LayoutTests/webanimations/scheduling-of-accelerated-css-animation-without-css-animation-event-listeners-expected.txt:
Added.
*
LayoutTests/webanimations/scheduling-of-accelerated-css-animation-without-css-animation-event-listeners.html:
Added.
* Source/WebCore/animation/KeyframeEffect.cpp:
(WebCore::KeyframeEffect::timeToNextTick const):
Canonical link: https://commits.webkit.org/271604@main
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes