-webkit-clip-path clips incorrectly if the element bounds go beyond the top edge...
authorsimon.fraser@apple.com <simon.fraser@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 22 Jun 2015 23:32:30 +0000 (23:32 +0000)
committersimon.fraser@apple.com <simon.fraser@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 22 Jun 2015 23:32:30 +0000 (23:32 +0000)
commita913c23457e049d69b310fde8f87b16bdedeeee5
treebb1be45522a5f7b3c427deb61344a61317711d61
parentabf50810e78b1d7dc8126df7daaf1666dc4f285a
-webkit-clip-path clips incorrectly if the element bounds go beyond the top edge of the page
https://bugs.webkit.org/show_bug.cgi?id=146218
rdar://problem/21127840

Reviewed by Zalan Bujtas.
Source/WebCore:

The clip path is computed using the RenderLayer's bounding box, so needs to be offset
by the offsetFromRenderer when set on the mask layer.

Test: compositing/masks/compositing-clip-path-origin.html

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

LayoutTests:

Test clip path on layers with non-zero bounds offsetFromRenderer because of box shadow,
or vertical writing mode.

* compositing/masks/compositing-clip-path-origin-expected.html: Added.
* compositing/masks/compositing-clip-path-origin.html: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@185851 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/ChangeLog
LayoutTests/compositing/masks/compositing-clip-path-origin-expected.html [new file with mode: 0644]
LayoutTests/compositing/masks/compositing-clip-path-origin.html [new file with mode: 0644]
Source/WebCore/ChangeLog
Source/WebCore/rendering/RenderLayerBacking.cpp