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

Unified Diff: Source/platform/scroll/ScrollableArea.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/platform/scroll/ScrollableArea.h ('k') | Source/web/RotationViewportAnchor.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/platform/scroll/ScrollableArea.cpp
diff --git a/Source/platform/scroll/ScrollableArea.cpp b/Source/platform/scroll/ScrollableArea.cpp
index a2451c83cb8572429aa21f1fbde4d39981d23277..c2be447d7866ccdfa7958e8267401010f25c37ca 100644
--- a/Source/platform/scroll/ScrollableArea.cpp
+++ b/Source/platform/scroll/ScrollableArea.cpp
@@ -163,7 +163,7 @@ void ScrollableArea::setScrollPosition(const DoublePoint& position, ScrollType s
behavior = scrollBehaviorStyle();
if (scrollType == CompositorScroll)
- scrollPositionChanged(adjustScrollPositionWithinRange(position), CompositorScroll);
+ scrollPositionChanged(clampScrollPosition(position), CompositorScroll);
else if (scrollType == ProgrammaticScroll)
programmaticScrollHelper(position, behavior);
else if (scrollType == UserScroll)
@@ -306,20 +306,6 @@ ScrollResult ScrollableArea::handleWheel(const PlatformWheelEvent& wheelEvent)
return scrollAnimator()->handleWheelEvent(wheelEvent);
}
-IntPoint ScrollableArea::adjustScrollPositionWithinRange(const IntPoint& scrollPoint) const
-{
- IntPoint newScrollPosition = scrollPoint.shrunkTo(maximumScrollPosition());
- newScrollPosition = newScrollPosition.expandedTo(minimumScrollPosition());
- return newScrollPosition;
-}
-
-DoublePoint ScrollableArea::adjustScrollPositionWithinRange(const DoublePoint& scrollPoint) const
-{
- DoublePoint newScrollPosition = scrollPoint.shrunkTo(maximumScrollPositionDouble());
- newScrollPosition = newScrollPosition.expandedTo(minimumScrollPositionDouble());
- return newScrollPosition;
-}
-
// NOTE: Only called from Internals for testing.
void ScrollableArea::setScrollOffsetFromInternals(const IntPoint& offset)
{
« no previous file with comments | « Source/platform/scroll/ScrollableArea.h ('k') | Source/web/RotationViewportAnchor.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698