REGRESSION: Horizontal scrollbar thumbs leave artifacts over page content when scroll...
[WebKit.git] / Source / WebCore / platform / ScrollView.cpp
index e3d6b1cd85a721d480fbf684b00fae3804553c21..382fef94b6fe230e87558f0f7ec81bf0ace3b453 100644 (file)
@@ -594,6 +594,14 @@ void ScrollView::scrollContents(const IntSize& scrollDelta)
     // with the clip rect every time to keep it smooth.
     IntRect clipRect = windowClipRect();
     IntRect scrollViewRect = convertToContainingWindow(IntRect(0, 0, visibleWidth(), visibleHeight()));
+    if (ScrollbarTheme::nativeTheme()->usesOverlayScrollbars()) {
+        int verticalScrollbarWidth = verticalScrollbar() ? verticalScrollbar()->width() : 0;
+        int horizontalScrollbarHeight = horizontalScrollbar() ? horizontalScrollbar()->height() : 0;
+
+        scrollViewRect.setWidth(scrollViewRect.width() - verticalScrollbarWidth);
+        scrollViewRect.setHeight(scrollViewRect.height() - horizontalScrollbarHeight);
+    }
+    
     IntRect updateRect = clipRect;
     updateRect.intersect(scrollViewRect);