Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 1508d59b56eb3107cd6fa41c726cc3c3d0a48b94
https://github.com/WebKit/WebKit/commit/1508d59b56eb3107cd6fa41c726cc3c3d0a48b94
Author: Vitaly Dyachkov <[email protected]>
Date: 2026-09-08 (Tue, 08 Sep 2026)
Changed paths:
A
LayoutTests/webanimations/accelerated-animation-not-invalidated-by-sibling-timeline-ticks-expected.txt
A
LayoutTests/webanimations/accelerated-animation-not-invalidated-by-sibling-timeline-ticks.html
M Source/WebCore/animation/KeyframeEffect.cpp
Log Message:
-----------
[Web Animations] Fully accelerated animations unnecessarily invalidate style
while a non-accelerated animation is running
https://bugs.webkit.org/show_bug.cgi?id=323436
Reviewed by Antoine Quint.
When a page has at least one animation that cannot run on the
compositor, that animation forces the page to process animation updates
on every frame. While this happens, other animations on the same page
that are otherwise running entirely on the compositor have their style
needlessly recalculated on every update too, and in some cases this can
force layout.
`KeyframeEffect::animationDidTick()` unconditionally invalidated the
target's style on every tick, even for effects that were fully
accelerated and confirmed running on the compositor, whenever some other
animation on the shared timeline forced that tick.
Skip `invalidate()` when the effect is completely accelerated, confirmed
running accelerated, and its phase hasn't changed since it was last
applied.
Progress-based (scroll/view) timeline effects are excluded from this
fast path, since their current time is driven by input rather than
tracked autonomously by the compositor, and can change within the same
phase.
Test:
webanimations/accelerated-animation-not-invalidated-by-sibling-timeline-ticks.html
* Source/WebCore/animation/KeyframeEffect.cpp:
(WebCore::KeyframeEffect::animationDidTick):
*
LayoutTests/webanimations/accelerated-animation-not-invalidated-by-sibling-timeline-ticks-expected.txt:
Added.
*
LayoutTests/webanimations/accelerated-animation-not-invalidated-by-sibling-timeline-ticks.html:
Added.
Canonical link: https://commits.webkit.org/320647@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications