Bug 220903

Summary: SVG inside <img> does not scale contents with respect to screen width or height
Product: WebKit Reporter: Jeffrey <jeffreyca16>
Component: SVGAssignee: Nobody <webkit-unassigned>
Status: NEW ---    
Severity: Major CC: sabouhallawa, simon.fraser, smoley, webkit-bug-importer, zalan, zimmermann
Priority: P2 Keywords: InRadar
Version: Safari 14   
Hardware: All   
OS: All   

Description Jeffrey 2021-01-24 14:25:35 PST
Codepen: https://codepen.io/JeffreyCA/pen/abmgBze

Open the above snippet on a Mac and then resize the Safari window width until it's less than the width of the SVG.

Observed:
Notice how the background/borders do scale properly, but the contents (text, images) are not scaled. They are instead truncated by the borders of the SVG.

Expected:
The entire SVG (including text, images, background/borders) should be scaled against the window width.

Other browsers:
Both Chrome and Firefox perform scaling as expected.
Comment 1 Smoley 2021-01-27 17:41:27 PST
Thanks for filing, I'm seeing this issue on Safari 13.1.3 and STP118.
Comment 2 Radar WebKit Bug Importer 2021-01-27 17:43:21 PST
<rdar://problem/73688284>