NEW317712
View Transitions: rendering quality degrades when capturing elements with CSS transforms
https://bugs.webkit.org/show_bug.cgi?id=317712
Summary View Transitions: rendering quality degrades when capturing elements with CSS...
Alice Tang
Reported 2026-06-23 19:19:36 PDT
When a view-transition-named element has a CSS transform (e.g. scale(2, 3)) applied, WebKit captures its snapshot at the element's CSS layout size rather than its visual size. The GPU then upscales the bitmap when compositing it through the ::view-transition-group transform, which causes a subtle but measurable rendering quality difference compared to natively rendered content at the same size. Chromium avoids this by capturing at visual resolution. This came up while working on the object-view-box WPT tests. The two failing tests (object-view-box-old-image.html and object-view-box-new-image.html) both have #target with transform: scale(2, 3), and their actual rendering requires fuzzy tolerance (maxDifference=85; totalPixels=600) to pass because of this quality difference. For comparison, content-with-transform-old-image.html covers the same scenario without object-view-box and passes pixel-perfectly even with the fuzzy annotation removed. Additionally, removing the object-view-box property from the two failing object-view-box WPT tests does not eliminate the blur, confirming that the rendering quality difference is caused by the CSS transform on the captured element, not by object-view-box itself. Proposed Patch: The fix could be in snapshotElementVisualOverflowClippedToViewport() in ViewTransition.cpp, accounting for the element's accumulated CSS transforms when computing the capture size.
Attachments
object-view-box-old-image-diff.png (117.07 KB, image/png)
2026-06-23 19:21 PDT, Alice Tang
no flags
object-view-box-old-image-actual.png (52.12 KB, image/png)
2026-06-23 19:22 PDT, Alice Tang
no flags
object-view-box-old-image-expected.png (40.88 KB, image/png)
2026-06-23 19:23 PDT, Alice Tang
no flags
Alice Tang
Comment 1 2026-06-23 19:21:03 PDT
Created attachment 480186 [details] object-view-box-old-image-diff.png
Alice Tang
Comment 2 2026-06-23 19:22:02 PDT
Created attachment 480187 [details] object-view-box-old-image-actual.png
Alice Tang
Comment 3 2026-06-23 19:23:17 PDT
Created attachment 480188 [details] object-view-box-old-image-expected.png
Radar WebKit Bug Importer
Comment 4 2026-06-25 10:16:31 PDT
Note You need to log in before you can comment on or make changes to this bug.