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

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

Issue 191693002: Delay scrollContents until the next paint (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: fix nit 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
« no previous file with comments | « Source/core/rendering/RenderView.cpp ('k') | Source/platform/scroll/ScrollView.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/platform/scroll/ScrollView.h
diff --git a/Source/platform/scroll/ScrollView.h b/Source/platform/scroll/ScrollView.h
index 753c618506af2d37d5fa755974bcac471651e567..32b329cfcad0496a1506f28c46806cb8f711af26 100644
--- a/Source/platform/scroll/ScrollView.h
+++ b/Source/platform/scroll/ScrollView.h
@@ -144,6 +144,7 @@ public:
// Functions for querying the current scrolled position (both as a point, a size, or as individual X and Y values).
virtual IntPoint scrollPosition() const OVERRIDE { return visibleContentRect().location(); }
IntSize scrollOffset() const { return toIntSize(visibleContentRect().location()); } // Gets the scrolled position as an IntSize. Convenient for adding to other sizes.
+ IntSize pendingScrollDelta() const { return m_pendingScrollDelta; }
virtual IntPoint maximumScrollPosition() const OVERRIDE; // The maximum position we can be scrolled to.
virtual IntPoint minimumScrollPosition() const OVERRIDE; // The minimum position we can be scrolled to.
// Adjust the passed in scroll position to keep it between the minimum and maximum positions.
@@ -268,6 +269,7 @@ protected:
virtual void updateScrollCorner();
virtual void invalidateScrollCornerRect(const IntRect&) OVERRIDE;
+ virtual void scrollContentsIfNeeded();
// Scroll the content by blitting the pixels.
virtual bool scrollContentsFastPath(const IntSize& scrollDelta, const IntRect& rectToScroll, const IntRect& clipRect);
// Scroll the content by invalidating everything.
@@ -295,6 +297,7 @@ private:
HashSet<RefPtr<Widget> > m_children;
+ IntSize m_pendingScrollDelta;
IntSize m_scrollOffset; // FIXME: Would rather store this as a position, but we will wait to make this change until more code is shared.
IntPoint m_cachedScrollPosition;
IntSize m_contentsSize;
@@ -316,10 +319,6 @@ private:
IntRect rectToCopyOnScroll() const;
- // Called when the scroll position within this view changes. FrameView overrides this to generate repaint invalidations.
- virtual void repaintFixedElementsAfterScrolling() { }
- virtual void updateFixedElementsAfterScrolling() { }
-
void calculateOverhangAreasForPainting(IntRect& horizontalOverhangRect, IntRect& verticalOverhangRect);
void updateOverhangAreas();
« no previous file with comments | « Source/core/rendering/RenderView.cpp ('k') | Source/platform/scroll/ScrollView.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698