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

Unified Diff: third_party/WebKit/Source/platform/scroll/ScrollAnimatorBase.h

Issue 1496693005: Update RootFrameViewport::userScroll to distribute scrolls between viewports. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years 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
Index: third_party/WebKit/Source/platform/scroll/ScrollAnimatorBase.h
diff --git a/third_party/WebKit/Source/platform/scroll/ScrollAnimatorBase.h b/third_party/WebKit/Source/platform/scroll/ScrollAnimatorBase.h
index 49b51eb452cd6a5de037288af65c6f48fc143af7..3503b7f1a0b5e0a8f8009496307d7a62f18c5035 100644
--- a/third_party/WebKit/Source/platform/scroll/ScrollAnimatorBase.h
+++ b/third_party/WebKit/Source/platform/scroll/ScrollAnimatorBase.h
@@ -72,6 +72,10 @@ public:
void setCurrentPosition(const FloatPoint&);
FloatPoint currentPosition() const;
+ // Returns how much of pixelDelta will be used by the underlying scrollable
+ // area.
+ virtual float computeDeltaToConsume(ScrollbarOrientation, float pixelDelta) const;
+
virtual void cancelAnimations() { }
virtual void serviceScrollAnimations() { }
virtual bool hasRunningAnimation() const { return false; }
@@ -109,12 +113,11 @@ protected:
virtual void notifyPositionChanged();
+ float clampScrollPosition(ScrollbarOrientation, float) const;
+
RawPtrWillBeMember<ScrollableArea> m_scrollableArea;
float m_currentPosX; // We avoid using a FloatPoint in order to reduce
float m_currentPosY; // subclass code complexity.
-
-private:
- float clampScrollPosition(ScrollbarOrientation, float);
};
} // namespace blink

Powered by Google App Engine
This is Rietveld 408576698