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

Unified Diff: third_party/WebKit/Source/core/frame/FrameView.cpp

Issue 2383113003: Refactor ScrollableArea::setScrollPosition. (Closed)
Patch Set: Created 4 years, 2 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/core/frame/FrameView.cpp
diff --git a/third_party/WebKit/Source/core/frame/FrameView.cpp b/third_party/WebKit/Source/core/frame/FrameView.cpp
index 44f06f71c39688b9e294c312eb2d608559822fb4..db99b13216679a133a8cfd6184aabf405bdf4932 100644
--- a/third_party/WebKit/Source/core/frame/FrameView.cpp
+++ b/third_party/WebKit/Source/core/frame/FrameView.cpp
@@ -3547,11 +3547,9 @@ int FrameView::scrollSize(ScrollbarOrientation orientation) const {
return scrollbar->totalSize() - scrollbar->visibleSize();
}
-void FrameView::setScrollOffset(const DoublePoint& offset,
- ScrollType scrollType) {
- // TODO(skobes): We shouldn't have to clamp here; instead we should update callers
- // ScrollableArea::scrollPositionChanged to only pass clamped offsets.
- DoublePoint newPosition = clampScrollPosition(offset);
+void FrameView::updateScrollPosition(const DoublePoint& position,
+ ScrollType scrollType) {
+ DoublePoint newPosition = clampScrollPosition(position);
DoublePoint oldPosition = m_scrollPosition;
DoubleSize scrollDelta = newPosition - oldPosition;

Powered by Google App Engine
This is Rietveld 408576698