RESOLVED DUPLICATE of bug 266702 266826
SVG in an iframe is incorrectly scaled instead of allowing scrolling
https://bugs.webkit.org/show_bug.cgi?id=266826
Summary SVG in an iframe is incorrectly scaled instead of allowing scrolling
tarquinwj
Reported 2023-12-22 16:14:04 PST
Created attachment 469181 [details] HTML part of the testcase Make a very wide SVG .svg file (eg. 10000px). Use height and width attributes, and viewbox to make it big. Make a HTML page, and use an <iframe> to embed the SVG in the HTML page. Use whatever approaches you can to try to make the SVG display in its native resolution. Safari (tested 15-17 on Sonoma-Monterey, and 15 on iOS) is the only browser that scales the image so small that it is unusable, and refuses to allow it to display in its native size. All others show it at the correct size, and you scroll to see the rest. I have tried using xhtml:meta viewport in the SVG, which has no effect. I have tried setting object-fit:none; which is ignored. I have tried using CSS to explicitly set the size. Nothing seems to work. It appears to be impossible to make the iframe scrollable when it is displaying an SVG file. http://www.howtocreate.co.uk/working/svgscaling.html
Attachments
HTML part of the testcase (451 bytes, text/html)
2023-12-22 16:14 PST, tarquinwj
no flags
SVG file part of the testcase (298 bytes, image/svg+xml)
2023-12-22 16:14 PST, tarquinwj
no flags
tarquinwj
Comment 1 2023-12-22 16:14:52 PST
Created attachment 469182 [details] SVG file part of the testcase
Ahmad Saleem
Comment 2 2023-12-22 17:21:09 PST
bug 266702 fixes this issue. :)
tarquinwj
Comment 3 2023-12-22 23:43:04 PST
Oh excellent! Any idea if this will go out to older platforms, or if it will only go out on Sonoma and the latest iPhones? (Just wondering if I will have to keep maintaining my horrible hackaround forever because of abandoned hardware.)
Alexey Proskuryakov
Comment 4 2023-12-24 11:26:43 PST
Duping per Ahmad's comment. You can see that latest releases of Safari 17 support macOS Monterey, Ventura, and Sonoma. And iOS 17 supports devices as old as iPhone Xs. So historically, fixes become available to users of older devices. When exactly workarounds can be removed depends on your user base, and how quickly they upgrade. *** This bug has been marked as a duplicate of bug 266702 ***
tarquinwj
Comment 5 2023-12-24 12:27:06 PST
Many thanks.
Note You need to log in before you can comment on or make changes to this bug.