<rdar://problem/
8962457>
Reviewed by Sam Weinig and Beth Dakin.
* platform/ScrollView.cpp:
(WebCore::ScrollView::scrollContents):
Subtract scrollbars from the scroll view rect if overlay scrollers are enabled.
* platform/ScrollableArea.cpp:
(WebCore::ScrollableArea::setScrollOffsetFromAnimation):
Make sure to invalidate both scrollbars if overlay scrollers are enabled.
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@77715
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
+2011-02-04 Anders Carlsson <andersca@apple.com>
+
+ Reviewed by Sam Weinig and Beth Dakin.
+
+ REGRESSION: Horizontal scrollbar thumbs leave artifacts over page content when scrolling vertically
+ <rdar://problem/8962457>
+
+ * platform/ScrollView.cpp:
+ (WebCore::ScrollView::scrollContents):
+ Subtract scrollbars from the scroll view rect if overlay scrollers are enabled.
+
+ * platform/ScrollableArea.cpp:
+ (WebCore::ScrollableArea::setScrollOffsetFromAnimation):
+ Make sure to invalidate both scrollbars if overlay scrollers are enabled.
+
2011-02-04 Adam Barth <abarth@webkit.org>
Reviewed by Eric Seidel.
// 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);
#include "FloatPoint.h"
#include "PlatformWheelEvent.h"
#include "ScrollAnimator.h"
+#include "ScrollbarTheme.h"
#include <wtf/PassOwnPtr.h>
namespace WebCore {
// Tell the derived class to scroll its contents.
setScrollOffset(offset);
+ bool hasOverlayScrollbars = ScrollbarTheme::nativeTheme()->usesOverlayScrollbars();
+
// Tell the scrollbars to update their thumb postions.
- if (Scrollbar* horizontalScrollbar = this->horizontalScrollbar())
+ if (Scrollbar* horizontalScrollbar = this->horizontalScrollbar()) {
horizontalScrollbar->offsetDidChange();
- if (Scrollbar* verticalScrollbar = this->verticalScrollbar())
+ if (hasOverlayScrollbars)
+ horizontalScrollbar->invalidate();
+ }
+ if (Scrollbar* verticalScrollbar = this->verticalScrollbar()) {
verticalScrollbar->offsetDidChange();
+ if (hasOverlayScrollbars)
+ verticalScrollbar->invalidate();
+ }
}
void ScrollableArea::willStartLiveResize()