Bug 13502 - image scaling/placement problem, viewBox related
Summary: image scaling/placement problem, viewBox related
Status: RESOLVED WORKSFORME
Alias: None
Product: WebKit
Classification: Unclassified
Component: SVG (show other bugs)
Version: 523.x (Safari 3)
Hardware: All All
: P2 Normal
Assignee: Rob Buis
URL: http://www.carto.net/neumann/webkitsv...
Keywords: SVGHitList
Depends on:
Blocks:
 
Reported: 2007-04-26 08:46 PDT by Andreas Neumann
Modified: 2009-12-30 11:03 PST (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Andreas Neumann 2007-04-26 08:46:17 PDT
In this example the raster image is incorrectly placed (scaled/positioned). The green outline of Switzerlands border in the raster image should roughly match the orange vector outlines of Switzerland. Also compare to other viewers (Opera, Batik, ASV, Firefox) to see the correct rendering.

The same behavior can be seen at this URL: http://www.geofoto.ch/geophotomap/ or other similar applications. It seems to be viewBox related when the viewBox has large width/height values set in the viewBox attribute. Interestingly, vectors display correctly, but rasters don't.

Please contact if you need further examples/information.
Comment 1 Eric Seidel (no email) 2007-06-01 03:25:10 PDT
It would be nice to have a simpler example.  But something definitely seems a little wrong here.
Comment 2 Nikolas Zimmermann 2007-06-11 17:49:15 PDT
The bug is only visable for certain window sizes.
Comment 3 Bruce Rindahl 2007-07-12 11:13:45 PDT
You can see the issue clearly if you load the URL.  The SVG and image will fill the browser window.  Resize the Safari window and slowly resize the entire window from small to large.  The vector graphics will maintain the correct location but the image will gradually distort and then even jump radically to a new scale.  This is occuring in every SVG display with an image that I have tested.
Comment 4 Nikolas Zimmermann 2007-07-14 16:23:49 PDT
Finally got some time to look at this bug.

Thanks Bruce for the good explaination. I'm now fully aware of this bug.
I never looked close enough it seems :-)

Greetings,
Niko
Comment 5 Bruce Rindahl 2007-07-17 07:32:21 PDT
The really strange thing is first the images is distorted in horizontal direction, then after the jump the distortion is in the vertical direction.  Again this is reproducible in every SVG I have.  It is almost as if the screen to image pixel ratio is an integer instead of a float causing first the distortion then the jumps.  This doesn't explain the distortion occurring first horizontally then vertically.
Comment 6 Eric Seidel (no email) 2007-09-27 07:25:07 PDT
It would appear this is still broken on feature branch.  It definitely looks like an int v. float issue.
Comment 7 Andreas Neumann 2007-09-27 10:54:43 PDT
it would be really cool if this could be fixed for the final version of Webkit. Many of my examples are using the same method and wouldn't work well if this bug isn't fixed in the final version.

Thanks for having a look at this
Comment 8 Eric Seidel (no email) 2007-12-27 01:52:14 PST
This is one of several right-sizing issues we have in WebKit.
Comment 9 Bruce Rindahl 2008-01-29 08:09:17 PST
Has there been any progress on this issue?  There has been lots of great addtions to SVG in WebKit but my sites look kind of silly where the images and vectors don't line up.  Thanks!
Comment 10 Bruce Rindahl 2008-03-30 07:01:25 PDT
tickle
Comment 11 Bruce Rindahl 2008-05-28 14:50:34 PDT
I am sorry but I have to ask again on this bug.  It has been over a year now and apparently there has been no progress.  I have a published site in SVG that shows floodplains (vectors) overlaid on aerial photos to show if a property is in the floodplain.  I cannot depend on any WebKit based browser to show this accurately due to this bug.  We will soon be forced to add a note not to use any WebKit browser because our logs are showing more and more hits by Safari.  Please look into this.
Thank you.
Comment 12 Andreas Neumann 2008-05-28 15:06:19 PDT
same problem for me - I would really appreciate if this could be fixed soon.

Thank you very much!
Comment 13 Andreas Neumann 2008-06-16 01:25:04 PDT
It appears that this bug doesn't exist anymore on my system (MacOSX Tiger) with the newer releases. Could someone on Windows check if the problem still exists? If not, we can close this bug.
Comment 14 Bruce Rindahl 2008-06-16 07:43:59 PDT
This seems to be fixed in Windows r-34578.
Thanks!
Comment 15 Dirk Schulze 2009-12-30 11:03:58 PST
It also works for me, independent of the window size. Closing the bug now.