RESOLVED FIXED310030
[css-animations] animation-fill-mode: forwards not resolved during print
https://bugs.webkit.org/show_bug.cgi?id=310030
Summary [css-animations] animation-fill-mode: forwards not resolved during print
Brandon
Reported 2026-03-16 09:01:22 PDT
When printing, CSS animations with animation-fill-mode: forwards don't resolve to their final state. Elements that animated from opacity: 0 to opacity: 1 remain invisible in print output. The updateAnimations lambda in StyleTreeResolver bailed out entirely when document->printing() was true, which skipped updateCSSAnimations(). This meant animation objects weren't maintained across the screen-to-print media type transition, and for test infrastructure paths where setPrinting() is called before first render, animations were never created at all. Restructure the guard so that only transitions and scroll/view timelines are skipped during print (irrelevant for paginated media), while updateCSSAnimations() is always called. This is safe because updateCSSAnimations() is a no-op when the animation list hasn't changed.
Attachments
Brandon
Comment 1 2026-03-16 09:01:34 PDT
Brandon
Comment 2 2026-03-16 09:03:37 PDT
EWS
Comment 3 2026-03-18 10:12:49 PDT
Committed 309488@main (06f70dafd01f): <https://commits.webkit.org/309488@main> Reviewed commits have been landed. Closing PR #60700 and removing active labels.
Note You need to log in before you can comment on or make changes to this bug.