Bug 24628 - Default viewport for SVG documents is rarely useful
Summary: Default viewport for SVG documents is rarely useful
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: SVG (show other bugs)
Version: 528+ (Nightly build)
Hardware: Mac OS X 10.5
: P2 Normal
Assignee: Nobody
URL: http://code.haskell.org/~dons/images/...
Keywords:
Depends on:
Blocks:
 
Reported: 2009-03-16 13:58 PDT by Kevin Ballard
Modified: 2010-02-15 11:55 PST (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Kevin Ballard 2009-03-16 13:58:49 PDT
In any non-trivial SVG document I've viewed, the default viewport chosen by Safari is far smaller than is useful. For example, in the following SVG document, the default viewport shows nothing but white space, and even zooming out 10 times showed nothing.

http://code.haskell.org/~dons/images/svg/hackage-circo.svg

WebKit should try to pick a viewport based on the overall size of the SVG document. A fairly simple way would be to default to displaying the entire document in the viewport, even this simple change would be far more useful than the current default.
Comment 1 Dean Jackson 2009-03-16 18:13:27 PDT
It's not the default viewport that is the issue here, the SVG content has this:

<svg width="124422pt" height="143420pt"

this is telling webkit the image size, which is huge.

Also, much of the graphics in the file is positioned outside that anyway - see all the negative y coordinates.
Comment 2 Kevin Ballard 2009-03-16 18:19:50 PDT
Huh, I didn't actually inspect the contents of this file (since it's so huge; I picked it because it was the same file I used to file another bug), but speaking purely as a user and not as someone who knows anything at all about SVG, most non-trivial SVG documents I've encountered defaulted to a useless viewport. Unfortunately I don't have any others on-hand, as I encounter SVG documents so rarely.
Comment 3 Nikolas Zimmermann 2010-02-15 11:55:19 PST
Crazy large SVG :-) The bug is fixed in trunk, you'll now see scrollbars to navigate around...