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

Unified Diff: third_party/WebKit/Source/web/ResizeViewportAnchor.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/web/ResizeViewportAnchor.cpp
diff --git a/third_party/WebKit/Source/web/ResizeViewportAnchor.cpp b/third_party/WebKit/Source/web/ResizeViewportAnchor.cpp
index b67a63b74285beca859de56743484d0249601b23..bd6ca7274d1c73d653ffe19c3b74b7445c33b5e1 100644
--- a/third_party/WebKit/Source/web/ResizeViewportAnchor.cpp
+++ b/third_party/WebKit/Source/web/ResizeViewportAnchor.cpp
@@ -19,10 +19,10 @@ void ResizeViewportAnchor::resizeFrameView(IntSize size) {
DCHECK(frameView);
ScrollableArea* rootViewport = frameView->getScrollableArea();
- DoublePoint position = rootViewport->scrollPositionDouble();
+ ScrollOffset offset = rootViewport->scrollOffset();
frameView->resize(size);
- m_drift += rootViewport->scrollPositionDouble() - position;
+ m_drift += rootViewport->scrollOffset() - offset;
}
void ResizeViewportAnchor::endScope() {
@@ -33,8 +33,8 @@ void ResizeViewportAnchor::endScope() {
if (!frameView)
return;
- DoublePoint visualViewportInDocument =
- frameView->getScrollableArea()->scrollPositionDouble() - m_drift;
+ ScrollOffset visualViewportInDocument =
+ frameView->getScrollableArea()->scrollOffset() - m_drift;
// TODO(bokan): Don't use RootFrameViewport::setScrollPosition since it
// assumes we can just set a sub-pixel precision offset on the FrameView.
@@ -46,7 +46,7 @@ void ResizeViewportAnchor::endScope() {
DCHECK(frameView->getRootFrameViewport());
frameView->getRootFrameViewport()->restoreToAnchor(visualViewportInDocument);
- m_drift = DoubleSize();
+ m_drift = ScrollOffset();
}
FrameView* ResizeViewportAnchor::rootFrameView() {
« no previous file with comments | « third_party/WebKit/Source/web/ResizeViewportAnchor.h ('k') | third_party/WebKit/Source/web/RotationViewportAnchor.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698