Summary: | Round image sizes when zooming | ||||||||
---|---|---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Emil A Eklund <eae> | ||||||
Component: | Layout and Rendering | Assignee: | Emil A Eklund <eae> | ||||||
Status: | RESOLVED FIXED | ||||||||
Severity: | Normal | CC: | eric, japhet, leviw, webkit.review.bot | ||||||
Priority: | P2 | ||||||||
Version: | 528+ (Nightly build) | ||||||||
Hardware: | Unspecified | ||||||||
OS: | Unspecified | ||||||||
Attachments: |
|
Description
Emil A Eklund
2012-10-02 15:01:34 PDT
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> |