box-shadow causes overlay scrollbars to be in the wrong position when element is...
authorsimon.fraser@apple.com <simon.fraser@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 8 Sep 2012 00:48:40 +0000 (00:48 +0000)
committersimon.fraser@apple.com <simon.fraser@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 8 Sep 2012 00:48:40 +0000 (00:48 +0000)
commit7a0f6e6fe448a55035540b64f6b6f162ef9685ef
treea265cf81017bcb6d7a13cd9dcba14d65210220e7
parent230b34bb0175ad8ee1ec02228adbfed97e8c8c6a
box-shadow causes overlay scrollbars to be in the wrong position when element is composited
https://bugs.webkit.org/show_bug.cgi?id=85647

Reviewed by James Robinson.

Test overlay scrollbars in composited layers.

* ManualTests/scrollbars/scrollbars-in-composited-layers.html: Added.

Source/WebCore:

The code that positioned the GraphicsLayers for scrollbars failed to take
into account any offset between the origin of the compositing layer,
and the renderer. This caused scrollbar layers to be misplaced or hidden
on layers with, for example, box-shadows.

Also moved the code that positions the scrollbar layers into RendderLayerBacking,
since this is where all the rest of the GraphicsLayer-positioning code lives.

Renamed an "offsetFromLayer" param to "offsetFromRoot" which is more accurate.

Manual test, since overlay scrollbars are not enabled in DRT/WTR:
    ManualTests/scrollbars/scrollbars-in-composited-layers.html

* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::positionOverflowControls):
* rendering/RenderLayerBacking.cpp:
(WebCore::RenderLayerBacking::positionOverflowControlsLayers):
* rendering/RenderLayerBacking.h:
(RenderLayerBacking):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@127943 268f45cc-cd09-0410-ab3c-d52691b4dbfc
ChangeLog
ManualTests/scrollbars/scrollbars-in-composited-layers.html [new file with mode: 0644]
Source/WebCore/ChangeLog
Source/WebCore/rendering/RenderLayer.cpp
Source/WebCore/rendering/RenderLayerBacking.cpp
Source/WebCore/rendering/RenderLayerBacking.h