Position replaced elements on pixel bounds
authoreae@chromium.org <eae@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 3 Jul 2012 02:22:46 +0000 (02:22 +0000)
committereae@chromium.org <eae@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 3 Jul 2012 02:22:46 +0000 (02:22 +0000)
commita5c3fb7a27e476a13516c9cc0a1ae7cef527bfb1
treecc737ce3333a211320d516e0b1cf88abb72afa5b
parent11d8fa7ba1ad8a7d2c3680512b7754c375482af1
Position replaced elements on pixel bounds
https://bugs.webkit.org/show_bug.cgi?id=90354

Reviewed by Eric Seidel.

To avoid sizing and repaint issues we should layout replaced elements on
pixel bounds. We already ensure that replaced elements are sized in full
pixels and that they are painted on pixel bounds. By also ensuring that
they are placed on pixel bounds we avoid pixel having the size be
expanded by pixel snapping and repainting/invalidation rect issues when
scrolling.

Test: fast/repaint/repaint-during-scroll-with-zoom.html

* rendering/RenderBox.cpp:
(WebCore::RenderBox::computePositionedLogicalWidthReplaced):
(WebCore::RenderBox::computePositionedLogicalHeightReplaced):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@121722 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/fast/repaint/repaint-during-scroll-with-zoom.html [new file with mode: 0644]
LayoutTests/platform/chromium-linux/fast/repaint/repaint-during-scroll-with-zoom-expected.png [new file with mode: 0644]
LayoutTests/platform/chromium-linux/fast/repaint/repaint-during-scroll-with-zoom-expected.txt [new file with mode: 0644]
LayoutTests/platform/chromium-win/fast/box-sizing/box-sizing-expected.txt
LayoutTests/platform/chromium-win/media/media-document-audio-repaint-expected.txt
LayoutTests/platform/chromium-win/svg/custom/object-sizing-width-50p-height-75p-on-target-svg-absolute-expected.png
LayoutTests/platform/chromium-win/svg/custom/object-sizing-width-50p-height-75p-on-target-svg-absolute-expected.txt
LayoutTests/platform/chromium-win/svg/custom/object-sizing-width-50p-height-75p-on-target-svg-expected.png
LayoutTests/platform/chromium-win/svg/custom/object-sizing-width-50p-height-75p-on-target-svg-expected.txt
Source/WebCore/ChangeLog
Source/WebCore/rendering/RenderBox.cpp