Round image sizes when zooming
authoreae@chromium.org <eae@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 3 Oct 2012 22:07:59 +0000 (22:07 +0000)
committereae@chromium.org <eae@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 3 Oct 2012 22:07:59 +0000 (22:07 +0000)
commitbab262b598104722dfdcd28655012b35f66a198a
tree3116e0f7a7582ce74ab9b65539a5e1bad0ca663b
parent9de9b25376ec65959d5187c2768bf73d76f9f2f6
Round image sizes when zooming
https://bugs.webkit.org/show_bug.cgi?id=98205

Reviewed by Eric Seidel.

Source/WebCore:

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.

Test: fast/sub-pixel/zoomed-image-tiles.html

* loader/cache/CachedImage.cpp:
(WebCore::CachedImage::imageSizeForRenderer):

LayoutTests:

Add test for zoomed large image tiles.

* fast/images/zoomed-img-size.html:
* fast/sub-pixel/zoomed-image-tiles-expected.html: Added.
* fast/sub-pixel/zoomed-image-tiles.html: Added.
* platform/chromium-linux/svg/zoom/page/zoom-svg-through-object-with-absolute-size-2-expected.png:
* platform/chromium-linux/svg/zoom/page/zoom-svg-through-object-with-absolute-size-2-expected.txt:
* platform/chromium-linux/svg/zoom/page/zoom-svg-through-object-with-absolute-size-expected.png:
* platform/chromium-linux/svg/zoom/page/zoom-svg-through-object-with-absolute-size-expected.txt:
* platform/chromium-linux/svg/zoom/page/zoom-svg-through-object-with-percentage-size-expected.png:
* platform/chromium-linux/svg/zoom/page/zoom-svg-through-object-with-percentage-size-expected.txt:
* platform/chromium/fast/images/zoomed-img-size-expected.txt: Added.
* platform/gtk/TestExpectations:
* platform/mac-lion/TestExpectations:
* platform/mac-snowleopard/TestExpectations:
* platform/mac-wk2/TestExpectations:
* platform/mac/TestExpectations:
* platform/qt-4.8/TestExpectations:
* platform/qt/TestExpectations:
* platform/win-wk2/TestExpectations:
* platform/win-xp/TestExpectations:
* platform/win/TestExpectations:
* platform/wincairo/TestExpectations:
* platform/wk2/TestExpectations:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@130329 268f45cc-cd09-0410-ab3c-d52691b4dbfc
23 files changed:
LayoutTests/ChangeLog
LayoutTests/fast/images/zoomed-img-size.html
LayoutTests/fast/sub-pixel/zoomed-image-tiles-expected.html [new file with mode: 0644]
LayoutTests/fast/sub-pixel/zoomed-image-tiles.html [new file with mode: 0644]
LayoutTests/platform/chromium-linux/svg/zoom/page/zoom-svg-through-object-with-absolute-size-2-expected.png
LayoutTests/platform/chromium-linux/svg/zoom/page/zoom-svg-through-object-with-absolute-size-2-expected.txt
LayoutTests/platform/chromium-linux/svg/zoom/page/zoom-svg-through-object-with-absolute-size-expected.png
LayoutTests/platform/chromium-linux/svg/zoom/page/zoom-svg-through-object-with-absolute-size-expected.txt
LayoutTests/platform/chromium-linux/svg/zoom/page/zoom-svg-through-object-with-percentage-size-expected.png
LayoutTests/platform/chromium-linux/svg/zoom/page/zoom-svg-through-object-with-percentage-size-expected.txt
LayoutTests/platform/chromium/fast/images/zoomed-img-size-expected.txt [new file with mode: 0644]
LayoutTests/platform/gtk/TestExpectations
LayoutTests/platform/mac-lion/TestExpectations
LayoutTests/platform/mac-wk2/TestExpectations
LayoutTests/platform/mac/TestExpectations
LayoutTests/platform/qt-4.8/TestExpectations
LayoutTests/platform/qt/TestExpectations
LayoutTests/platform/win-wk2/TestExpectations
LayoutTests/platform/win-xp/TestExpectations
LayoutTests/platform/win/TestExpectations
LayoutTests/platform/wk2/TestExpectations
Source/WebCore/ChangeLog
Source/WebCore/loader/cache/CachedImage.cpp