RESOLVED FIXED310181
View transition snapshots can capture stale transform values for accelerated CSS transform animations
https://bugs.webkit.org/show_bug.cgi?id=310181
Summary View transition snapshots can capture stale transform values for accelerated ...
Kyouhei Horizumi
Reported 2026-03-18 07:20:47 PDT
Created attachment 478713 [details] Reduced testcase demonstrating stale snapshot capture during `document.startViewTransition()`. # Summary When `document.startViewTransition()` is triggered while a CSS transform animation is running in Safari/WebKit, the old snapshot may be captured using a stale transform value instead of the visually current animated transform. This causes `::view-transition-old(root)` to appear slightly behind the on-screen animation state, producing a visible jump at transition start. # Steps to reproduce 1. Open the attached test case. 2. Wait until the spinner is rotating. 3. Click "Start ViewTransition (DOM swap)" while the animation is in progress. 4. Observe the old snapshot at the beginning of the view transition. # Actual results The old snapshot can be captured from a stale transform value, so the spinner appears to jump slightly backward relative to its visible position at the moment the transition starts. # Expected results The old snapshot should reflect the visually current animated transform at the exact time `document.startViewTransition()` begins.
Attachments
Reduced testcase demonstrating stale snapshot capture during `document.startViewTransition()`. (2.84 KB, text/html)
2026-03-18 07:20 PDT, Kyouhei Horizumi
no flags
Browser comparison video for the repro case. Safari shows an incorrect snapshot state during the view transition, while Chrome and Firefox behave as expected. (537.08 KB, video/mp4)
2026-03-18 07:22 PDT, Kyouhei Horizumi
no flags
Kyouhei Horizumi
Comment 1 2026-03-18 07:22:56 PDT
Created attachment 478714 [details] Browser comparison video for the repro case. Safari shows an incorrect snapshot state during the view transition, while Chrome and Firefox behave as expected. 3-second comparison video showing the same test case in Safari, Chrome, and Firefox. In Safari, the animated element is captured in an incorrect state at view transition start; Chrome and Firefox keep the expected current visual state.
Kyouhei Horizumi
Comment 2 2026-03-18 08:19:50 PDT
I opened a pull request for this issue: https://github.com/WebKit/WebKit/pull/60858 The patch updates `RenderLayer::renderableTransform()` so that during snapshotting, when a transform-related accelerated animation is running, the renderable transform is computed from `animatedStyle()` instead of `m_transform`.
Radar WebKit Bug Importer
Comment 3 2026-03-25 07:21:12 PDT
EWS
Comment 4 2026-03-26 05:58:42 PDT
Committed 309982@main (f1419669ee40): <https://commits.webkit.org/309982@main> Reviewed commits have been landed. Closing PR #60858 and removing active labels.
Note You need to log in before you can comment on or make changes to this bug.