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

Unified Diff: third_party/WebKit/Source/platform/scroll/ScrollAnimator.cpp

Issue 2123053002: Improve scroll anchoring's interactions with the visual viewport (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix broken tests Created 4 years, 5 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
Index: third_party/WebKit/Source/platform/scroll/ScrollAnimator.cpp
diff --git a/third_party/WebKit/Source/platform/scroll/ScrollAnimator.cpp b/third_party/WebKit/Source/platform/scroll/ScrollAnimator.cpp
index 9a5b5efe9ddbd6a14e9209ff5a406eb8634ebf24..56021998d5cf2b2e34a0f0b3a0fe154ba1a9e0bf 100644
--- a/third_party/WebKit/Source/platform/scroll/ScrollAnimator.cpp
+++ b/third_party/WebKit/Source/platform/scroll/ScrollAnimator.cpp
@@ -200,14 +200,13 @@ bool ScrollAnimator::willAnimateToOffset(const FloatPoint& targetPos)
}
void ScrollAnimator::adjustAnimationAndSetScrollPosition(
- IntSize adjustment, ScrollType scrollType)
+ const DoublePoint& position, ScrollType scrollType)
{
- DoublePoint adjustedPos = m_scrollableArea->clampScrollPosition(
- m_scrollableArea->scrollPositionDouble() + adjustment);
+ DoublePoint adjustedPos = m_scrollableArea->clampScrollPosition(position);
IntSize actualAdjustment = roundedIntPoint(adjustedPos) -
roundedIntPoint(m_scrollableArea->scrollPositionDouble());
- m_scrollableArea->setScrollPosition(adjustedPos, scrollType);
+ scrollPositionChanged(adjustedPos, scrollType);
if (m_runState == RunState::Idle) {
adjustImplOnlyScrollOffsetAnimation(actualAdjustment);

Powered by Google App Engine
This is Rietveld 408576698