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

Unified Diff: Source/core/frame/RootFrameViewport.cpp

Issue 1208433002: Replaced adjustScrollPositionWithinRange with clampScrollPosition (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Unremoved DoublePoint version of FrameView::setScrollOffset Created 5 years, 6 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/frame/FrameView.cpp ('k') | Source/core/loader/FrameLoader.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/frame/RootFrameViewport.cpp
diff --git a/Source/core/frame/RootFrameViewport.cpp b/Source/core/frame/RootFrameViewport.cpp
index 3ba978fd47f6bf304fb7f05ff327a2e0d915b761..49fc7e3dbe10d92a86d1614e7e9f06fb82ed6dbe 100644
--- a/Source/core/frame/RootFrameViewport.cpp
+++ b/Source/core/frame/RootFrameViewport.cpp
@@ -116,7 +116,7 @@ ScrollResult RootFrameViewport::handleWheel(const PlatformWheelEvent& event)
locationDelta.setY(-event.deltaY());
}
- DoublePoint targetPosition = visualViewport().adjustScrollPositionWithinRange(
+ DoublePoint targetPosition = visualViewport().clampScrollPosition(
visualViewport().scrollPositionDouble() + toDoubleSize(locationDelta));
visualViewport().setScrollPosition(targetPosition, UserScroll);
@@ -190,7 +190,7 @@ void RootFrameViewport::setScrollOffset(const DoublePoint& offset, ScrollType sc
if (delta.isZero())
return;
- DoublePoint targetPosition = layoutViewport().adjustScrollPositionWithinRange(layoutViewport().scrollAnimator()->currentPosition() + delta);
+ DoublePoint targetPosition = layoutViewport().clampScrollPosition(layoutViewport().scrollAnimator()->currentPosition() + delta);
layoutViewport().setScrollPosition(targetPosition, scrollType);
DoubleSize applied = scrollOffsetFromScrollAnimators() - oldPosition;
@@ -199,7 +199,7 @@ void RootFrameViewport::setScrollOffset(const DoublePoint& offset, ScrollType sc
if (delta.isZero())
return;
- targetPosition = visualViewport().adjustScrollPositionWithinRange(visualViewport().scrollAnimator()->currentPosition() + delta);
+ targetPosition = visualViewport().clampScrollPosition(visualViewport().scrollAnimator()->currentPosition() + delta);
visualViewport().setScrollPosition(targetPosition, scrollType);
}
« no previous file with comments | « Source/core/frame/FrameView.cpp ('k') | Source/core/loader/FrameLoader.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698