We currently floor image sizes when zooming which can result in images being rendered at one pixel less than the actual size. This is especially likely to happen for very large images. Downstream webkit bug: http://code.google.com/p/chromium/issues/detail?id=150802
Created attachment 166757 [details] Patch
Comment on attachment 166757 [details] Patch LayoutTests/platform/chromium-linux/svg/zoom/page/zoom-svg-through-object-with-percentage-size-expected.png looks like they aren't quite in the same y-offset after zooming?
The(In reply to comment #2) > (From update of attachment 166757 [details]) > LayoutTests/platform/chromium-linux/svg/zoom/page/zoom-svg-through-object-with-percentage-size-expected.png looks like they aren't quite in the same y-offset after zooming? Correct. This patch doesn't change that though, it only changes the size of the image to that it is the same size as the svg element.
Comment on attachment 166757 [details] Patch Attachment 166757 [details] did not pass mac-ews (mac): Output: http://queues.webkit.org/results/14123568 New failing tests: svg/zoom/page/zoom-svg-through-object-with-percentage-size.xhtml svg/zoom/page/zoom-svg-through-object-with-absolute-size-2.xhtml fast/sub-pixel/zoomed-image-tiles.html svg/zoom/page/zoom-svg-through-object-with-absolute-size.xhtml
Created attachment 166941 [details] Patch
Comment on attachment 166941 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=166941&action=review OK. > Source/WebCore/loader/cache/CachedImage.cpp:268 > + imageSize.setWidth(lroundf(imageSize.width() * widthScale)); > + imageSize.setHeight(lroundf(imageSize.height() * heightScale)); We could have also written this in terms of LayoutUnit primatives and done this w/o #ifdefs. :)
(In reply to comment #6) > (From update of attachment 166941 [details]) > View in context: https://bugs.webkit.org/attachment.cgi?id=166941&action=review > > OK. > > > Source/WebCore/loader/cache/CachedImage.cpp:268 > > + imageSize.setWidth(lroundf(imageSize.width() * widthScale)); > > + imageSize.setHeight(lroundf(imageSize.height() * heightScale)); > > We could have also written this in terms of LayoutUnit primatives and done this w/o #ifdefs. :) I'd rather keep it as a IntSize as we need to represent images that way but yeah, I suppose we could have.
Committed r130329: <http://trac.webkit.org/changeset/130329>