Fix for https://bugs.webkit.org/show_bug.cgi?id=57057 Overlay scrollbars in overflow
authorbdakin@apple.com <bdakin@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 25 Mar 2011 19:29:35 +0000 (19:29 +0000)
committerbdakin@apple.com <bdakin@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 25 Mar 2011 19:29:35 +0000 (19:29 +0000)
commit2b9078953394d9a4d5dc8939481c4b32cbe02cae
treee46e1be42513efaaf2eda915f593748530afd9fe
parent69fab5676650ebfb6595f3d40653598d50425a1e
Fix for https://bugs.webkit.org/show_bug.cgi?id=57057 Overlay scrollbars in overflow
areas paint behind positive z-index content
-and corresponding-
<rdar://problem/9070500>

Reviewed by Dave Hyatt.

Since overlay scrollbars don't clip the scrollable content like other scrollbars do,
the only way to get them to paint on top of all possible scrollable content is to
make them paint on top of everything. To do this, this patch adds a second trip
through the layer tree if it contains overlay scrollbars that need painting.

After calling paint() on the rootLayer, call paintOverlayScrollers() if
containsDirtyOverlayScrollbars() is true.
* page/FrameView.cpp:
(WebCore::FrameView::paintContents):

RenderLayer has two new member variable. m_containsDirtyOverlayScrollbars is a bool
that is set on the root layer when it has child layers that need overlay scrollbars
to be painted. m_cachedOverlayScrollbarOffset is an IntPoint to cache the tx and ty
of the overlay scrollbars on the first (normal) pass through the layer tree. This
prevents us from having to re-enter the render tree during the second (overlay-only)
pass. Finally, there is also a new paint flag: PaintLayerPaintingOverlayScrollbars.
* rendering/RenderLayer.h:
(WebCore::RenderLayer::containsDirtyOverlayScrollbars):
(WebCore::RenderLayer::setContainsDirtyOverlayScrollbars):
* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::RenderLayer):
(WebCore::RenderLayer::paintOverflowControls):
(WebCore::RenderLayer::paintOverlayScrollbars):
(WebCore::RenderLayer::paintLayer):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@81981 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebCore/ChangeLog
Source/WebCore/page/FrameView.cpp
Source/WebCore/rendering/RenderLayer.cpp
Source/WebCore/rendering/RenderLayer.h