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

Unified Diff: third_party/WebKit/Source/core/page/SpatialNavigation.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/page/SpatialNavigation.cpp
diff --git a/third_party/WebKit/Source/core/page/SpatialNavigation.cpp b/third_party/WebKit/Source/core/page/SpatialNavigation.cpp
index 5a41a5c66b6e95c404bc604dff779fdc3e285447..8fb5fc2f9b50efaae4e983b2d33736e2764d3df2 100644
--- a/third_party/WebKit/Source/core/page/SpatialNavigation.cpp
+++ b/third_party/WebKit/Source/core/page/SpatialNavigation.cpp
@@ -221,7 +221,7 @@ bool scrollInDirection(LocalFrame* frame, WebFocusType type) {
return false;
}
- frame->view()->scrollBy(IntSize(dx, dy), UserScroll);
+ frame->view()->scrollBy(ScrollOffset(dx, dy), UserScroll);
return true;
}
return false;
@@ -266,7 +266,7 @@ bool scrollInDirection(Node* container, WebFocusType type) {
return false;
}
- container->layoutBox()->scrollByRecursively(IntSize(dx, dy));
+ container->layoutBox()->scrollByRecursively(ScrollOffset(dx, dy));
return true;
}
@@ -367,7 +367,7 @@ bool canScrollInDirection(const LocalFrame* frame, WebFocusType type) {
ScrollbarAlwaysOff == verticalMode)
return false;
LayoutSize size(frame->view()->contentsSize());
- LayoutSize offset(frame->view()->scrollOffset());
+ LayoutSize offset(frame->view()->scrollOffsetInt());
LayoutRect rect(frame->view()->visibleContentRect(IncludeScrollbars));
switch (type) {
@@ -399,7 +399,7 @@ static LayoutRect rectToAbsoluteCoordinates(LocalFrame* initialFrame,
LayoutObject* layoutObject = element->layoutObject();
element = layoutObject ? layoutObject->offsetParent() : nullptr;
} while (element);
- rect.move((-toLocalFrame(frame)->view()->scrollOffset()));
+ rect.move((-toLocalFrame(frame)->view()->scrollOffsetInt()));
}
}
return rect;
« no previous file with comments | « third_party/WebKit/Source/core/page/Page.cpp ('k') | third_party/WebKit/Source/core/page/scrolling/ScrollingCoordinator.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698