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

Unified Diff: third_party/WebKit/Source/core/page/scrolling/ScrollingCoordinator.cpp

Issue 2387883002: Use float for scroll offset. (Closed)
Patch Set: rebase 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/page/scrolling/ScrollingCoordinator.cpp
diff --git a/third_party/WebKit/Source/core/page/scrolling/ScrollingCoordinator.cpp b/third_party/WebKit/Source/core/page/scrolling/ScrollingCoordinator.cpp
index e3518e8738b58e352b99a0b268ea11343d73fb1d..5f840a25ee5da7761d5ef38a9307bac20940deb5 100644
--- a/third_party/WebKit/Source/core/page/scrolling/ScrollingCoordinator.cpp
+++ b/third_party/WebKit/Source/core/page/scrolling/ScrollingCoordinator.cpp
@@ -446,9 +446,10 @@ bool ScrollingCoordinator::scrollableAreaScrollLayerDidChange(
WebLayer* containerLayer = toWebLayer(scrollableArea->layerForContainer());
if (webLayer) {
webLayer->setScrollClipLayer(containerLayer);
- DoublePoint scrollPosition(scrollableArea->scrollPositionDouble() +
- toDoubleSize(scrollableArea->scrollOrigin()));
- webLayer->setScrollPositionDouble(scrollPosition);
+ ScrollOffset scrollOffset(
+ toScrollOffset(FloatPoint(scrollableArea->scrollOrigin()) +
+ scrollableArea->scrollOffset()));
+ webLayer->setScrollOffset(scrollOffset);
webLayer->setBounds(scrollableArea->contentsSize());
bool canScrollX = scrollableArea->userInputScrollable(HorizontalScrollbar);

Powered by Google App Engine
This is Rietveld 408576698