https://bugs.webkit.org/show_bug.cgi?id=56493
Drag-scrolling overlay scrollbars thumb in overflow regions does not work
-and corresponding-
<rdar://problem/9112688>

Reviewed by Simon Fraser.

There was an original change to fix this in the normal hit-testing case, but hit 
testing of transformed and/or positioned objects was still broken. The transformed 
case is fixed by sending an OverlayScrollbarSizeRelevancy parameter to 
calculateRects(). Getting positioned objects right is a little trickier. Those need 
to opt into using temporary clip rects during hit testing. To avoid doing that when 
it is not necessary, I added a new bit to ScrollView to track whether there are 
currently overlay scrollbars painted in the view.
* platform/ScrollView.cpp:
(WebCore::ScrollView::ScrollView):
(WebCore::ScrollView::wheelEvent):
* platform/ScrollView.h:
(WebCore::ScrollView::containsScrollableAreaWithOverlayScrollbars):
(WebCore::ScrollView::setContainsScrollableAreaWithOverlayScrollbars):
* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::paintOverflowControls):
(WebCore::RenderLayer::hitTestLayer):
(WebCore::RenderLayer::updateClipRects):
(WebCore::RenderLayer::calculateClipRects):
(WebCore::RenderLayer::parentClipRects):
(WebCore::RenderLayer::backgroundClipRect):
(WebCore::RenderLayer::calculateRects):
* rendering/RenderLayer.h:



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@83899 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/Source/WebCore/platform/ScrollView.cpp b/Source/WebCore/platform/ScrollView.cpp
index 14d961b..7caf820 100644
--- a/Source/WebCore/platform/ScrollView.cpp
+++ b/Source/WebCore/platform/ScrollView.cpp
@@ -57,6 +57,7 @@
     , m_paintsEntireContents(false)
     , m_clipsRepaints(true)
     , m_delegatesScrolling(false)
+    , m_containsScrollableAreaWithOverlayScrollbars(false)
 {
     platformInit();
 }
@@ -982,6 +983,9 @@
         return;
 
     notifyPageThatContentAreaWillPaint();
+
+    // If we encounter any overlay scrollbars as we paint, this will be set to true.
+    m_containsScrollableAreaWithOverlayScrollbars = false;
     
     IntRect documentDirtyRect = rect;
     documentDirtyRect.intersect(frameRect());