Index: third_party/WebKit/Source/web/WebViewImpl.cpp |
diff --git a/third_party/WebKit/Source/web/WebViewImpl.cpp b/third_party/WebKit/Source/web/WebViewImpl.cpp |
index 3ce96f9ad006087364986b5c9a1798856ca3bb94..9372c08095d699c302c696f9fabe32045a584f14 100644 |
--- a/third_party/WebKit/Source/web/WebViewImpl.cpp |
+++ b/third_party/WebKit/Source/web/WebViewImpl.cpp |
@@ -1020,9 +1020,10 @@ bool WebViewImpl::startPageScaleAnimation(const IntPoint& targetPosition, |
setPageScaleFactor(newScale); |
FrameView* view = mainFrameImpl()->frameView(); |
- if (view && view->getScrollableArea()) |
- view->getScrollableArea()->setScrollPosition( |
- DoublePoint(clampedPoint.x, clampedPoint.y), ProgrammaticScroll); |
+ if (view && view->getScrollableArea()) { |
+ view->getScrollableArea()->setScrollOffset( |
+ ScrollOffset(clampedPoint.x, clampedPoint.y), ProgrammaticScroll); |
+ } |
return false; |
} |
@@ -3368,7 +3369,7 @@ void WebViewImpl::scrollAndRescaleViewports( |
// Order is important: visual viewport location is clamped based on |
// main frame scroll position and visual viewport scale. |
- view->setScrollPosition(mainFrameOrigin, ProgrammaticScroll); |
+ view->setScrollOffset(toScrollOffset(mainFrameOrigin), ProgrammaticScroll); |
setPageScaleFactor(scaleFactor); |
@@ -3679,9 +3680,8 @@ void WebViewImpl::resetScrollAndScaleState() { |
if (FrameView* frameView = toLocalFrame(page()->mainFrame())->view()) { |
ScrollableArea* scrollableArea = frameView->layoutViewportScrollableArea(); |
- if (scrollableArea->scrollPositionDouble() != DoublePoint::zero()) |
- scrollableArea->setScrollPosition(DoublePoint::zero(), |
- ProgrammaticScroll); |
+ if (!scrollableArea->scrollOffset().isZero()) |
+ scrollableArea->setScrollOffset(ScrollOffset(), ProgrammaticScroll); |
} |
pageScaleConstraintsSet().setNeedsReset(true); |