| 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 ac287f78df832b9dd1af804a633af619106d17ef..7cb8c71e158ad348b340314c4f59d46e9ea094b3 100644
|
| --- a/third_party/WebKit/Source/core/page/SpatialNavigation.cpp
|
| +++ b/third_party/WebKit/Source/core/page/SpatialNavigation.cpp
|
| @@ -160,7 +160,7 @@ bool hasOffscreenRect(Node* node, WebFocusType type)
|
| // exposed after we scroll. Adjust the viewport to post-scrolling position.
|
| // If the container has overflow:hidden, we cannot scroll, so we do not pass direction
|
| // and we do not adjust for scrolling.
|
| - int pixelsPerLineStep = ScrollableArea::pixelsPerLineStep(frameView->getHostWindow());
|
| + int pixelsPerLineStep = ScrollableArea::pixelsPerLineStep(frameView->getHostWindow(), frameView);
|
| switch (type) {
|
| case WebFocusTypeLeft:
|
| containerViewportRect.setX(containerViewportRect.x() - pixelsPerLineStep);
|
| @@ -198,7 +198,7 @@ bool scrollInDirection(LocalFrame* frame, WebFocusType type)
|
| if (frame && canScrollInDirection(frame->document(), type)) {
|
| int dx = 0;
|
| int dy = 0;
|
| - int pixelsPerLineStep = ScrollableArea::pixelsPerLineStep(frame->view()->getHostWindow());
|
| + int pixelsPerLineStep = ScrollableArea::pixelsPerLineStep(frame->view()->getHostWindow(), frame->view());
|
| switch (type) {
|
| case WebFocusTypeLeft:
|
| dx = - pixelsPerLineStep;
|
| @@ -237,7 +237,7 @@ bool scrollInDirection(Node* container, WebFocusType type)
|
| int dy = 0;
|
| // TODO(leviw): Why are these values truncated (toInt) instead of rounding?
|
| FrameView* frameView = container->document().view();
|
| - int pixelsPerLineStep = ScrollableArea::pixelsPerLineStep(frameView ? frameView->getHostWindow() : nullptr);
|
| + int pixelsPerLineStep = ScrollableArea::pixelsPerLineStep(frameView ? frameView->getHostWindow() : nullptr, frameView);
|
| switch (type) {
|
| case WebFocusTypeLeft:
|
| dx = - std::min(pixelsPerLineStep, container->layoutBox()->scrollLeft().toInt());
|
|
|