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

Unified Diff: Source/core/frame/FrameView.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 | « no previous file | Source/core/frame/RootFrameViewport.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/frame/FrameView.cpp
diff --git a/Source/core/frame/FrameView.cpp b/Source/core/frame/FrameView.cpp
index a0b1ca42fd2e2c67c177dd25d6beba3eb333583f..51730262e91dc8cae92d226185173c72dbbef685 100644
--- a/Source/core/frame/FrameView.cpp
+++ b/Source/core/frame/FrameView.cpp
@@ -1491,7 +1491,7 @@ void FrameView::setScrollPosition(const DoublePoint& scrollPoint, ScrollType scr
{
m_maintainScrollPositionAnchor = nullptr;
- DoublePoint newScrollPosition = adjustScrollPositionWithinRange(scrollPoint);
+ DoublePoint newScrollPosition = clampScrollPosition(scrollPoint);
if (newScrollPosition == scrollPositionDouble())
return;
@@ -3198,12 +3198,12 @@ int FrameView::scrollSize(ScrollbarOrientation orientation) const
void FrameView::setScrollOffset(const IntPoint& offset, ScrollType)
{
- scrollTo(DoublePoint(adjustScrollPositionWithinRange(offset)));
+ scrollTo(clampScrollPosition(offset));
}
void FrameView::setScrollOffset(const DoublePoint& offset, ScrollType)
{
- scrollTo(adjustScrollPositionWithinRange(offset));
+ scrollTo(clampScrollPosition(offset));
}
void FrameView::windowResizerRectChanged()
@@ -3438,9 +3438,7 @@ void FrameView::updateScrollbars(const DoubleSize& desiredOffset)
void FrameView::setScrollOffsetFromUpdateScrollbars(const DoubleSize& offset)
{
- DoublePoint adjustedScrollPosition = DoublePoint(offset);
-
- adjustedScrollPosition = adjustScrollPositionWithinRange(adjustedScrollPosition);
+ DoublePoint adjustedScrollPosition = clampScrollPosition(DoublePoint(offset));
if (adjustedScrollPosition != scrollPositionDouble() || scrollOriginChanged()) {
ScrollableArea::setScrollPosition(adjustedScrollPosition, ProgrammaticScroll);
« no previous file with comments | « no previous file | Source/core/frame/RootFrameViewport.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698