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

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

Issue 2387883002: Use float for scroll offset. (Closed)
Patch Set: Fix README.md 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/LocalFrame.cpp
diff --git a/third_party/WebKit/Source/core/frame/LocalFrame.cpp b/third_party/WebKit/Source/core/frame/LocalFrame.cpp
index 4f3f496b44233d9d1cbcaaca20c459b07bbd1504..31dccf7ce79d4712ffe1406454109bdc41eb5dda 100644
--- a/third_party/WebKit/Source/core/frame/LocalFrame.cpp
+++ b/third_party/WebKit/Source/core/frame/LocalFrame.cpp
@@ -637,11 +637,11 @@ void LocalFrame::setPageAndTextZoomFactors(float pageZoomFactor,
if (FrameView* view = this->view()) {
// Update the scroll position when doing a full page zoom, so the content
// stays in relatively the same position.
- LayoutPoint scrollPosition = view->scrollPosition();
+ ScrollOffset scrollOffset = view->scrollOffset();
float percentDifference = (pageZoomFactor / m_pageZoomFactor);
- view->setScrollPosition(
- DoublePoint(scrollPosition.x() * percentDifference,
- scrollPosition.y() * percentDifference),
+ view->setScrollOffset(
+ ScrollOffset(scrollOffset.width() * percentDifference,
+ scrollOffset.height() * percentDifference),
ProgrammaticScroll);
}
}
« no previous file with comments | « third_party/WebKit/Source/core/frame/LocalDOMWindow.cpp ('k') | third_party/WebKit/Source/core/frame/RootFrameViewport.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698