Subpixel rendering: Clip-path does not work properly on subpixel positions.
authorzalan@apple.com <zalan@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 9 Jun 2015 00:29:13 +0000 (00:29 +0000)
committerzalan@apple.com <zalan@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 9 Jun 2015 00:29:13 +0000 (00:29 +0000)
commitf7a6a2baba029571ea68557c565bbf0bca162fee
treed96ba0fd37f15a556c1519e0261e85cbd4710ebd
parentf085d730562694724b9e0be87acca289c5f29c58
Subpixel rendering: Clip-path does not work properly on subpixel positions.
https://bugs.webkit.org/show_bug.cgi?id=145749
rdar://problem/20824305

Reviewed by Simon Fraser.

This patch ensures that clip-path is device pixel snapped both for composited and
non-composited content.

Source/WebCore:

Tests: compositing/masks/compositing-clip-path-on-subpixel-position.html
       fast/masking/clip-path-on-subpixel-position.html

* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::setupClipPath):
* rendering/RenderLayerBacking.cpp:
(WebCore::RenderLayerBacking::updateMaskingLayerGeometry):

LayoutTests:

* compositing/masks/compositing-clip-path-on-subpixel-position-expected.html: Added.
* compositing/masks/compositing-clip-path-on-subpixel-position.html: Added.
* fast/masking/clip-path-on-subpixel-position-expected.html: Added.
* fast/masking/clip-path-on-subpixel-position.html: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@185343 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/ChangeLog
LayoutTests/compositing/masks/compositing-clip-path-on-subpixel-position-expected.html [new file with mode: 0644]
LayoutTests/compositing/masks/compositing-clip-path-on-subpixel-position.html [new file with mode: 0644]
LayoutTests/fast/masking/clip-path-on-subpixel-position-expected.html [new file with mode: 0644]
LayoutTests/fast/masking/clip-path-on-subpixel-position.html [new file with mode: 0644]
Source/WebCore/ChangeLog
Source/WebCore/rendering/ClipPathOperation.h
Source/WebCore/rendering/RenderLayer.cpp
Source/WebCore/rendering/RenderLayerBacking.cpp