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.
It would be nice to have a simpler example. But something definitely seems a little wrong here.
The bug is only visable for certain window sizes.
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.
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 :-)
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.
It would appear this is still broken on feature branch. It definitely looks like an int v. float issue.
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
This is one of several right-sizing issues we have in WebKit.
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!
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.
same problem for me - I would really appreciate if this could be fixed soon.
Thank you very much!
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.
This seems to be fixed in Windows r-34578.
It also works for me, independent of the window size. Closing the bug now.