Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 93d628d634775d4b04e14b9b6490b15f367f4377
https://github.com/WebKit/WebKit/commit/93d628d634775d4b04e14b9b6490b15f367f4377
Author: Antoine Quint <[email protected]>
Date: 2025-11-07 (Fri, 07 Nov 2025)
Changed paths:
A
LayoutTests/webanimations/threaded-animations/scroll-animation-no-timeline-invalidation-after-acceleration-expected.txt
A
LayoutTests/webanimations/threaded-animations/scroll-animation-no-timeline-invalidation-after-acceleration.html
M Source/WebCore/animation/AnimationEffect.h
M Source/WebCore/animation/KeyframeEffect.cpp
M Source/WebCore/animation/KeyframeEffect.h
M Source/WebCore/animation/WebAnimation.cpp
Log Message:
-----------
[threaded-animations] JS-originated scroll-driven animations force animation
resolution on each rendering update
https://bugs.webkit.org/show_bug.cgi?id=302170
rdar://164274737
Reviewed by Simon Fraser.
In 302634@main we added support for JS-originated scroll-driven animations to
be accelerated. To do that,
we made sure to update the accelerated effect stack when an animation ticked.
However, we only need to do
this for the tick that transitions the animation from pending [0] to ready [1].
Indeed, otherwise we keep
scheduling animation resolution on each rendering update in a loop.
To test this, we use an existing `internals` testing API to check that once an
animation has been accelerated
the number of timeline invalidations does not increase.
[0] https://drafts.csswg.org/web-animations-1/#dom-animation-pending
[1] https://drafts.csswg.org/web-animations-1/#ready
Test:
webanimations/threaded-animations/scroll-animation-no-timeline-invalidation-after-acceleration.html
*
LayoutTests/webanimations/threaded-animations/scroll-animation-no-timeline-invalidation-after-acceleration-expected.txt:
Added.
*
LayoutTests/webanimations/threaded-animations/scroll-animation-no-timeline-invalidation-after-acceleration.html:
Added.
* Source/WebCore/animation/AnimationEffect.h:
(WebCore::AnimationEffect::animationBecameReady):
* Source/WebCore/animation/KeyframeEffect.cpp:
(WebCore::KeyframeEffect::animationDidTick):
(WebCore::KeyframeEffect::animationBecameReady):
* Source/WebCore/animation/KeyframeEffect.h:
* Source/WebCore/animation/WebAnimation.cpp:
(WebCore::WebAnimation::tick):
Canonical link: https://commits.webkit.org/302761@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications