Clipping of render layer boundaries does not take page scale into account
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 25 Jan 2012 15:50:53 +0000 (15:50 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 25 Jan 2012 15:50:53 +0000 (15:50 +0000)
commitc2b515d5803c573cbf6b30c16bf183b7c21a6b67
tree479a4a34469a182885161f692b38a996578a48a9
parentd24be8f6f651d14c71c2f8eff64a1bff2e62a6dd
Clipping of render layer boundaries does not take page scale into account
https://bugs.webkit.org/show_bug.cgi?id=76850

Source/WebCore:

Patch by Sami Kyostila <skyostil@chromium.org> on 2012-01-25
Reviewed by Simon Fraser.

When inserting render layers into the compositor's overlap map, the
layer boundaries are clipped against any potential parent clip rects.
The clip rects are given in CSS coordinates, while the render layer
boundaries are in scaled CSS coordinates, so the result is incorrect.
This patch scales the clip rects before calculating the intersection.

Test: compositing/overflow/overflow-scaled-descendant-overlapping.html

* rendering/RenderLayerCompositor.cpp:
(WebCore::RenderLayerCompositor::addToOverlapMap):

LayoutTests:

Added new test to make sure render layers inside clipped containers
are correctly tested for overlap with other layers.

Patch by Sami Kyostila <skyostil@chromium.org> on 2012-01-25
Reviewed by Simon Fraser.

* compositing/overflow/overflow-scaled-descendant-overlapping.html: Added.
* platform/chromium-linux/compositing/overflow/overflow-scaled-descendant-overlapping-expected.png: Added.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@105879 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/ChangeLog
LayoutTests/compositing/overflow/overflow-scaled-descendant-overlapping.html [new file with mode: 0644]
LayoutTests/platform/chromium-linux/compositing/overflow/overflow-scaled-descendant-overlapping-expected.png [new file with mode: 0644]
Source/WebCore/ChangeLog
Source/WebCore/rendering/RenderLayerCompositor.cpp