if (scrollbarsSuppressed())
return;
- m_pendingScrollDelta += scrollDelta;
+ repaintFixedElementsAfterScrolling();
+ scrollContents(scrollDelta);
+ updateFixedElementsAfterScrolling();
}
void ScrollView::setScrollPosition(const IntPoint& scrollPoint)
return scrollViewRect;
}
-void ScrollView::scrollContentsIfNeeded()
-{
- if (m_pendingScrollDelta.isZero())
- return;
- IntSize scrollDelta = m_pendingScrollDelta;
- m_pendingScrollDelta = IntSize();
- scrollContents(scrollDelta);
-}
-
void ScrollView::scrollContents(const IntSize& scrollDelta)
{
HostWindow* window = hostWindow();
scrollViewDirtyRect.intersect(visibleAreaWithScrollbars);
context->translate(x(), y());
scrollViewDirtyRect.moveBy(-location());
+ context->clip(IntRect(IntPoint(), visibleAreaWithScrollbars.size()));
paintScrollbars(context, scrollViewDirtyRect);
}