Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(307)

Unified Diff: Source/platform/scroll/ScrollView.cpp

Issue 191693002: Delay scrollContents until the next paint (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« Source/platform/scroll/ScrollView.h ('K') | « Source/platform/scroll/ScrollView.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/platform/scroll/ScrollView.cpp
diff --git a/Source/platform/scroll/ScrollView.cpp b/Source/platform/scroll/ScrollView.cpp
index 4b778ab6951c066d3e4ed868b0a655f81cec7463..17d6860d6738efb7e143d34351af724566231ffc 100644
--- a/Source/platform/scroll/ScrollView.cpp
+++ b/Source/platform/scroll/ScrollView.cpp
@@ -274,8 +274,10 @@ void ScrollView::scrollTo(const IntSize& newOffset)
if (scrollbarsSuppressed())
return;
+ m_scrollDelta += scrollDelta;
+
+ // invalidateFixedElementsBeforeScrolling(scrollDelta, rectToCopyOnScroll());
abarth-chromium 2014/03/08 06:54:52 I couldn't find where we actually call this functi
ykyyip 2014/03/11 01:59:39 Yes, I actually don't need this function with the
repaintFixedElementsAfterScrolling();
- scrollContents(scrollDelta);
updateFixedElementsAfterScrolling();
}
@@ -515,6 +517,14 @@ IntRect ScrollView::rectToCopyOnScroll() const
return scrollViewRect;
}
+void ScrollView::scrollContentsIfNeeded()
+{
+ if (m_scrollDelta.isZero())
+ return;
+ scrollContents(m_scrollDelta);
+ m_scrollDelta = IntSize();
+}
+
void ScrollView::scrollContents(const IntSize& scrollDelta)
{
HostWindow* window = hostWindow();
« Source/platform/scroll/ScrollView.h ('K') | « Source/platform/scroll/ScrollView.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698