Index: Source/platform/scroll/ScrollView.cpp |
diff --git a/Source/platform/scroll/ScrollView.cpp b/Source/platform/scroll/ScrollView.cpp |
index 4b778ab6951c066d3e4ed868b0a655f81cec7463..4608aeceb358b06a16fd0f547c2217f4b7aeb187 100644 |
--- a/Source/platform/scroll/ScrollView.cpp |
+++ b/Source/platform/scroll/ScrollView.cpp |
@@ -274,9 +274,7 @@ void ScrollView::scrollTo(const IntSize& newOffset) |
if (scrollbarsSuppressed()) |
return; |
- repaintFixedElementsAfterScrolling(); |
- scrollContents(scrollDelta); |
- updateFixedElementsAfterScrolling(); |
+ m_pendingScrollDelta += scrollDelta; |
} |
void ScrollView::setScrollPosition(const IntPoint& scrollPoint) |
@@ -515,6 +513,15 @@ IntRect ScrollView::rectToCopyOnScroll() const |
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(); |