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

Unified Diff: third_party/WebKit/Source/core/frame/RootFrameViewport.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/RootFrameViewport.cpp
diff --git a/third_party/WebKit/Source/core/frame/RootFrameViewport.cpp b/third_party/WebKit/Source/core/frame/RootFrameViewport.cpp
index 509cc8627efd3f1f5cdfacd2f5610235bb648734..a0ccb201b4ff0917e0f1f6ca37f8c308fe95488a 100644
--- a/third_party/WebKit/Source/core/frame/RootFrameViewport.cpp
+++ b/third_party/WebKit/Source/core/frame/RootFrameViewport.cpp
@@ -207,14 +207,14 @@ LayoutRect RootFrameViewport::scrollIntoView(const LayoutRect& rectInContent,
return rectInContent;
}
-void RootFrameViewport::setScrollOffset(const DoublePoint& offset,
- ScrollType scrollType) {
- distributeScrollBetweenViewports(DoublePoint(offset), scrollType,
+void RootFrameViewport::updateScrollPosition(const DoublePoint& position,
+ ScrollType scrollType) {
+ distributeScrollBetweenViewports(DoublePoint(position), scrollType,
ScrollBehaviorInstant, VisualViewport);
}
void RootFrameViewport::distributeScrollBetweenViewports(
- const DoublePoint& offset,
+ const DoublePoint& position,
ScrollType scrollType,
ScrollBehavior behavior,
ViewportToScrollFirst scrollFirst) {
@@ -222,7 +222,7 @@ void RootFrameViewport::distributeScrollBetweenViewports(
// ScrollableArea's position may have the fractional part truncated off.
DoublePoint oldPosition = scrollOffsetFromScrollAnimators();
- DoubleSize delta = offset - oldPosition;
+ DoubleSize delta = position - oldPosition;
if (delta.isZero())
return;

Powered by Google App Engine
This is Rietveld 408576698