Subpixel rendering: Transforms on non-compositing layers leave bits behind when the...
authorzalan@apple.com <zalan@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sun, 10 Aug 2014 00:48:59 +0000 (00:48 +0000)
committerzalan@apple.com <zalan@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sun, 10 Aug 2014 00:48:59 +0000 (00:48 +0000)
commit3882675825caa2d4644ed4c473aa3709867097a5
treed3769a3fc38410ba52f539fd0b35531815f09479
parentcf43c17a7fc4be2d80f0f7650a8ac6e5c221a977
Subpixel rendering: Transforms on non-compositing layers leave bits behind when the box boundaries changes.
https://bugs.webkit.org/show_bug.cgi?id=135786

Reviewed by Simon Fraser.

Since we don't control the transformed context painting's snapping strategy, our best bet to fully
include the transformed box when requesting for repaint is to use enclosing.
Pixelsnapping doesn't work here for all cases. For example, a scaled box at 0.8px can be anti-aliased painted
both at 0.5px and 1px, while with pixelsnapping we'd expect it to be painted starting from 1px;

Source/WebCore:

Test: fast/repaint/hidpi-transform-on-subpixel-repaintrect.html

* rendering/RenderBox.cpp:
(WebCore::RenderBox::computeRectForRepaint): enclose the result of the transform.

LayoutTests:

* fast/repaint/hidpi-transform-on-subpixel-repaintrect-expected.txt: Added.
* fast/repaint/hidpi-transform-on-subpixel-repaintrect.html: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@172373 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/ChangeLog
LayoutTests/fast/repaint/hidpi-transform-on-subpixel-repaintrect-expected.txt [new file with mode: 0644]
LayoutTests/fast/repaint/hidpi-transform-on-subpixel-repaintrect.html [new file with mode: 0644]
Source/WebCore/ChangeLog
Source/WebCore/rendering/RenderBox.cpp