Bug 252389

Summary: Strange zoom in glitch when exiting fullscreen (on image, that originally spans outside viewport)
Product: WebKit Reporter: Wojciech Czechowski <wojciech.czechowski>
Component: Layout and RenderingAssignee: Nobody <webkit-unassigned>
Status: NEW ---    
Severity: Normal CC: bfulgham, jer.noble, ntim, simon.fraser, webkit-bug-importer, zalan
Priority: P2 Keywords: InRadar
Version: Safari 16   
Hardware: Mac (Intel)   
OS: macOS 13   

Description Wojciech Czechowski 2023-02-16 04:07:12 PST
Example url: https://codepen.io/wojciechczechowski/pen/jOvEXGP

Steps to reproduce the problem: 
1. Open the link above
2. Click "Open fullscreen" button to call webkitRequestFullscreen() method on the image 
3. Exit fullscreen mode with Escape key

Expected behaviour: 
Image smoothly goes back to it's original position

Actual behaviour: 
Image goes to it's original position, but there's a strange zoom-in glitch at the end of the transition.

Additional notes: 
Seems to happen only when the image originally (before / after entering fullscreen) spans outside the viewport. On images, that fits to viewport it doesn't happen.
Comment 1 Radar WebKit Bug Importer 2023-02-23 04:08:18 PST
<rdar://problem/105827852>
Comment 2 Simon Fraser (smfr) 2023-02-23 10:16:38 PST
There's some aspect ratio or object-fit logic missing when snapshotting for fullscreen animations.